Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
12 | 2 | 3 | 0.974 | class_body_declaration |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 12 | 500 | plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/rename/RenamingNameSuggestor.java |
2 | 12 | 514 | 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; } |
| ||||
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; } |
| |||
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 Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#5b0fa3a0]] | findLongestPrefix |
1 | 2 | [[#5b0fa3a0]] | findLongestSuffix |
2 | 1 | [[#5b0fa420]] | prefixes |
2 | 2 | [[#5b0fa420]] | suffixes |
3 | 1 | [[#5b0fa400]] | startsWith |
3 | 2 | [[#5b0fa400]] | endsWith |