CloneSet1709


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
12230.974class_body_declaration
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
112500
plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/rename/RenamingNameSuggestor.java
212514
plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/rename/RenamingNameSuggestor.java
Clone Instance
1
Line Count
12
Source Line
500
Source File
plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/rename/RenamingNameSuggestor.java

        private String findLongestPrefix(String name, String[] prefixes) {
                String usedPrefix = ""; //$NON-NLS-1$
                int bestLen = 0;
                for (int i = 0; i < prefixes.length; i++) {
                        if (name.startsWith(prefixes[i])) {
                                if (prefixes[i].length() > bestLen) {
                                        bestLen = prefixes[i].length();
                                        usedPrefix = prefixes[i];
                                }
                        }
                }
                return usedPrefix;
        }


Clone Instance
2
Line Count
12
Source Line
514
Source File
plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/rename/RenamingNameSuggestor.java

        private String findLongestSuffix(String name, String[] suffixes) {
                String usedPrefix = ""; //$NON-NLS-1$
                int bestLen = 0;
                for (int i = 0; i < suffixes.length; i++) {
                        if (name.endsWith(suffixes[i])) {
                                if (suffixes[i].length() > bestLen) {
                                        bestLen = suffixes[i].length();
                                        usedPrefix = suffixes[i];
                                }
                        }
                }
                return usedPrefix;
        }


Clone AbstractionParameter Count: 3Parameter Bindings

private String  [[#variable5b0fa3a0]](String name, String[]  [[#variable5b0fa420]]) {
  String usedPrefix = ""; //$NON-NLS-1$
  int bestLen = 0;
  for (int i = 0; i <  [[#variable5b0fa420]].length; i++) {
    if (name. [[#variable5b0fa400]]( [[#variable5b0fa420]][i])) {
      if ( [[#variable5b0fa420]][i].length() > bestLen) {
        bestLen = [[#variable5b0fa420]][i].length();
        usedPrefix = [[#variable5b0fa420]][i];
      }
    }
  }
  return usedPrefix;
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#5b0fa3a0]]
findLongestPrefix 
12[[#5b0fa3a0]]
findLongestSuffix 
21[[#5b0fa420]]
prefixes 
22[[#5b0fa420]]
suffixes 
31[[#5b0fa400]]
startsWith 
32[[#5b0fa400]]
endsWith