| Previous CloneSet | Next CloneSet | Back to Main Report |
| Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
|---|---|---|---|---|
| 14 | 3 | 0 | 1.000 | statement_sequence[2] |
| Clone Abstraction | Parameter Bindings |
| Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
|---|---|---|---|
| 1 | 13 | 298 | plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/ExtractConstantRefactoring.java |
| 2 | 13 | 881 | plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/ExtractTempRefactoring.java |
| 3 | 14 | 420 | plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/IntroduceParameterRefactoring.java |
| ||||
String methodName = selectedMethodInvocation.getName().getIdentifier();
for (int i = 0; i < KNOWN_METHOD_NAME_PREFIXES.length; i++) {
String prefix = KNOWN_METHOD_NAME_PREFIXES[i];
if ( !methodName.startsWith(prefix))
continue ; // not this prefix
if (methodName.length() == prefix.length())
return Collections.EMPTY_LIST;
char firstAfterPrefix = methodName.charAt(prefix.length());
if ( !Character.isUpperCase(firstAfterPrefix))
continue ;
String proposal = Character.toLowerCase(firstAfterPrefix) + methodName.substring(prefix.length() + 1);
methodName = proposal;
break;
}
|
| ||||
String methodName = selectedMethodInvocation.getName().getIdentifier();
for (int i = 0; i < KNOWN_METHOD_NAME_PREFIXES.length; i++) {
String prefix = KNOWN_METHOD_NAME_PREFIXES[i];
if ( !methodName.startsWith(prefix))
continue ; // not this prefix
if (methodName.length() == prefix.length())
return Collections.EMPTY_LIST;
char firstAfterPrefix = methodName.charAt(prefix.length());
if ( !Character.isUpperCase(firstAfterPrefix))
continue ;
String proposal = Character.toLowerCase(firstAfterPrefix) + methodName.substring(prefix.length() + 1);
methodName = proposal;
break;
}
|
| ||||
String methodName = selectedMethodInvocation.getName().getIdentifier();
for (int i = 0; i < KNOWN_METHOD_NAME_PREFIXES.length; i++) {
String prefix = KNOWN_METHOD_NAME_PREFIXES[i];
if ( ! methodName.startsWith(prefix))
continue ; //not this prefix
if (methodName.length() == prefix.length())
return Collections.EMPTY_LIST; // prefix alone -> don't take method name
char firstAfterPrefix = methodName.charAt(prefix.length());
if ( ! Character.isUpperCase(firstAfterPrefix))
continue ; //not uppercase after prefix
//found matching prefix
String proposal = Character.toLowerCase(firstAfterPrefix) + methodName.substring(prefix.length() + 1);
methodName = proposal;
break;
}
|
| |||
String methodName = selectedMethodInvocation.getName().getIdentifier();
for (int i = 0; i < KNOWN_METHOD_NAME_PREFIXES.length; i++) {
String prefix = KNOWN_METHOD_NAME_PREFIXES[i];
if ( !methodName.startsWith(prefix))
continue ; //not this prefix // not this prefix
if (methodName.length() == prefix.length())
return Collections.EMPTY_LIST; // prefix alone -> don't take method name
char firstAfterPrefix = methodName.charAt(prefix.length());
if ( !Character.isUpperCase(firstAfterPrefix))
continue ; //not uppercase after prefix
//found matching prefix
String proposal = Character.toLowerCase(firstAfterPrefix) + methodName.substring(prefix.length() + 1);
methodName = proposal;
break;
}
|
| CloneAbstraction |
| Parameter Index | Clone Instance | Parameter Name | Value |
|---|---|---|---|
| None | |||