CloneSet930


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
18201.000statement_sequence[5]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
118298
plugins/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/Main.java
218382
plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ClassFile.java
Clone Instance
1
Line Count
18
Source Line
298
Source File
plugins/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/Main.java

                                        char fileSeparatorChar = File.separatorChar;
                                        String fileSeparator = File.separator;
                                        // First we ensure that the outputPath exists
                                        outputPath = outputPath.replace('/', fileSeparatorChar);
                                        // To be able to pass the mkdirs() method we need to remove the extra file separator at the end of the outDir name
                                        int indexOfPackageSeparator = relativeFileName.lastIndexOf(fileSeparatorChar);
                                        if (indexOfPackageSeparator == -1) {
                                                if (outputPath.endsWith(fileSeparator)) {
                                                        fileName = outputPath + relativeFileName;
                                                }
                                                else   {
                                                        fileName = outputPath + fileSeparator + relativeFileName;
                                                }
                                        }
                                        else   {
                                                int length = relativeFileName.length();
                                                if (outputPath.endsWith(fileSeparator)) {
                                                        fileName = outputPath + relativeFileName.substring(indexOfPackageSeparator + 1, length);
                                                }
                                                else   {
                                                        fileName = outputPath + fileSeparator + relativeFileName.substring(indexOfPackageSeparator + 1, length);
                                                }
                                        }


Clone Instance
2
Line Count
18
Source Line
382
Source File
plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ClassFile.java

                        char fileSeparatorChar = File.separatorChar;
                        String fileSeparator = File.separator;
                        // First we ensure that the outputPath exists
                        outputPath = outputPath.replace('/', fileSeparatorChar);
                        // To be able to pass the mkdirs() method we need to remove the extra file separator at the end of the outDir name
                        int indexOfPackageSeparator = relativeFileName.lastIndexOf(fileSeparatorChar);
                        if (indexOfPackageSeparator == -1) {
                                if (outputPath.endsWith(fileSeparator)) {
                                        fileName = outputPath + relativeFileName;
                                }
                                else   {
                                        fileName = outputPath + fileSeparator + relativeFileName;
                                }
                        }
                        else   {
                                int length = relativeFileName.length();
                                if (outputPath.endsWith(fileSeparator)) {
                                        fileName = outputPath + relativeFileName.substring(indexOfPackageSeparator + 1, length);
                                }
                                else   {
                                        fileName = outputPath + fileSeparator + relativeFileName.substring(indexOfPackageSeparator + 1, length);
                                }
                        }


Clone AbstractionParameter Count: 0Parameter Bindings

char fileSeparatorChar = File.separatorChar;
String fileSeparator = File.separator;
// First we ensure that the outputPath exists
outputPath = outputPath.replace('/', fileSeparatorChar);
// To be able to pass the mkdirs() method we need to remove the extra file separator at the end of the outDir name
int indexOfPackageSeparator = relativeFileName.lastIndexOf(fileSeparatorChar);
if (indexOfPackageSeparator == -1) {
  if (outputPath.endsWith(fileSeparator)) {
    fileName = outputPath + relativeFileName;
  }
  else {
    fileName = outputPath + fileSeparator + relativeFileName;
  }
}
else {
  int length = relativeFileName.length();
  if (outputPath.endsWith(fileSeparator)) {
    fileName = outputPath + relativeFileName.substring(indexOfPackageSeparator + 1, length);
  }
  else {
    fileName = outputPath + fileSeparator + relativeFileName.substring(indexOfPackageSeparator + 1, length);
  }
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
None