CloneSet2173


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
12201.000statement_sequence[3]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
112169
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/jarpackager/JarWriter2.java
212231
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/jarpackager/JarWriter3.java
Clone Instance
1
Line Count
12
Source Line
169
Source File
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/jarpackager/JarWriter2.java

                // Set modification time
                newEntry.setTime(lastModified);

                InputStream contentStream = resource.getContents(false);

                try {
                        fJarOutputStream.putNextEntry(newEntry);
                        int count;
                        while ((count = contentStream.read(readBuffer, 0, readBuffer.length)) != -1)
                                fJarOutputStream.write(readBuffer, 0, count);
                } finally  {
                        if (contentStream != null)
                                contentStream.close();

                        /*
                         * Commented out because some JREs throw an NPE if a stream
                         * is closed twice. This works because
                         * a) putNextEntry closes the previous entry
                         * b) closing the stream closes the last entry
                         */
                        // fJarOutputStream.closeEntry();
                  }


Clone Instance
2
Line Count
12
Source Line
231
Source File
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/jarpackager/JarWriter3.java

                // Set modification time
                newEntry.setTime(lastModified);

                InputStream contentStream = resource.getContents(false);

                try {
                        fJarOutputStream.putNextEntry(newEntry);
                        int count;
                        while ((count = contentStream.read(readBuffer, 0, readBuffer.length)) != -1)
                                fJarOutputStream.write(readBuffer, 0, count);
                } finally  {
                        if (contentStream != null)
                                contentStream.close();

                        /*
                         * Commented out because some JREs throw an NPE if a stream
                         * is closed twice. This works because
                         * a) putNextEntry closes the previous entry
                         * b) closing the stream closes the last entry
                         */
                        // fJarOutputStream.closeEntry();
                  }


Clone AbstractionParameter Count: 0Parameter Bindings

// Set modification time
newEntry.setTime(lastModified);
InputStream contentStream = resource.getContents(false);
try {
  fJarOutputStream.putNextEntry(newEntry);
  int count;
  while ((count = contentStream.read(readBuffer, 0, readBuffer.length)) != -1)
    fJarOutputStream.write(readBuffer, 0, count);
}
finally {
  if (contentStream != null)
    contentStream.close();
/*
                         * Commented out because some JREs throw an NPE if a stream
                         * is closed twice. This works because
                         * a) putNextEntry closes the previous entry
                         * b) closing the stream closes the last entry
                         */
// fJarOutputStream.closeEntry();
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
None