Class [][] candidates = new Class [ constructors.length ] []; for(int i=0; i< candidates.length; i++ ) candidates[i] = constructors[i].getParameterTypes();
Class [][] candidates = new Class[ ma.length ][]; for( int i=0; i< ma.length; i++ ) candidates[i] = ma[i].getParameterTypes();
Clone fragments detected by clone detection tool
File path: /jEdit-4.2/src/bsh/ClassGeneratorUtil.java File path: /jEdit-4.2/src/bsh/NameSpace.java
Method name: ConstructorArgs getConstructorArgs(String, This, Object[], int) Method name: BshMethod getMethod(String, Class[], boolean)
Number of AST nodes: 3 Number of AST nodes: 3
1
Class [][] candidates = new Class [ constructors.length ] [];
1
Class [][] candidates = new Class[ ma.length ][];
2
		for(int i=0; i< candidates.length; i++ )
2
				for( int i=0; i< ma.length; i++ )
3
			candidates[i] = constructors[i].getParameterTypes();
3
					candidates[i] = ma[i].getParameterTypes();
Summary
Number of common nesting structure subtrees1
Number of refactorable cases0
Number of non-refactorable cases1
Time elapsed for finding largest common nesting structure subtrees (ms)0.2
Clones locationClones are in different classes
Number of node comparisons5
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements3
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)1.3
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    45
    Class[][] candidates = new Class[constructors.length];
    45
    Class[][] candidates = new Class[constructors.length];
    14
    Class[][] candidates = new Class[ma.length];
    Differences
    Expression1Expression2Difference
    constructorsmaVARIABLE_NAME_MISMATCH
    bsh.DelayedEvalBshMethod[]bsh.BshMethod[]VARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type bsh.DelayedEvalBshMethod[] of variable constructors does not match with type bsh.BshMethod[] of variable ma
    • Make classes bsh.DelayedEvalBshMethod[] and bsh.BshMethod[] extend a common superclass
    14
    Class[][] candidates = new Class[ma.length];
    46
    for (int i = 0; i < candidates.length; i++)
    46
    for (int i = 0; i < candidates.length; i++)
    15
    for (int i = 0; i < ma.length; i++)
    Differences
    Expression1Expression2Difference
    candidatesmaVARIABLE_NAME_MISMATCH
    java.lang.Class[][]bsh.BshMethod[]VARIABLE_TYPE_MISMATCH
    Preondition Violations
    Expression candidates cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Type java.lang.Class[][] of variable candidates does not match with type bsh.BshMethod[] of variable ma
    • Make classes java.lang.Class[][] and bsh.BshMethod[] extend a common superclass
    15
    for (int i = 0; i < ma.length; i++)
    47
    candidates[i] = constructors[i].getParameterTypes();
    47
    candidates[i] = constructors[i].getParameterTypes();
    16
    candidates[i] = ma[i].getParameterTypes();
    Differences
    Expression1Expression2Difference
    constructorsmaVARIABLE_NAME_MISMATCH
    bsh.DelayedEvalBshMethod[]bsh.BshMethod[]VARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type bsh.DelayedEvalBshMethod[] of variable constructors does not match with type bsh.BshMethod[] of variable ma
    • Make classes bsh.DelayedEvalBshMethod[] and bsh.BshMethod[] extend a common superclass
    16
    candidates[i] = ma[i].getParameterTypes();
    Precondition Violations (4)
    Row Violation
    1Type bsh.DelayedEvalBshMethod[] of variable constructors does not match with type bsh.BshMethod[] of variable ma
    2Expression candidates cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Type java.lang.Class[][] of variable candidates does not match with type bsh.BshMethod[] of variable ma
    4Type bsh.DelayedEvalBshMethod[] of variable constructors does not match with type bsh.BshMethod[] of variable ma