CloneSet615


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
14301.000statement_sequence[2]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
113298
plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/ExtractConstantRefactoring.java
213881
plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/ExtractTempRefactoring.java
314420
plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/IntroduceParameterRefactoring.java
Clone Instance
1
Line Count
13
Source Line
298
Source File
plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/ExtractConstantRefactoring.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;
                }


Clone Instance
2
Line Count
13
Source Line
881
Source File
plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/ExtractTempRefactoring.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;
                }


Clone Instance
3
Line Count
14
Source Line
420
Source File
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; // 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;
                }


Clone AbstractionParameter Count: 0Parameter Bindings

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 Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
None