TokenMarker.LineContext[] lineContextN = new TokenMarker.LineContext[(lineCount + 1) * 2]; System.arraycopy(lineContext,0,lineContextN,0, lineContext.length); lineContext = lineContextN;
Node c[] = new Node[i + 1]; System.arraycopy(children, 0, c, 0, children.length); children = c;
Clone fragments detected by clone detection tool
File path: /jEdit-4.2/src/org/gjt/sp/jedit/buffer/LineManager.java File path: /jEdit-4.2/src/bsh/SimpleNode.java
Method name: void contentInserted(int, int, int, int, IntegerArray) Method name: void jjtAddChild(Node, int)
Number of AST nodes: 3 Number of AST nodes: 3
1
TokenMarker.LineContext[] lineContextN
2
					= new TokenMarker.LineContext[(lineCount + 1) * 2];
3
				System.arraycopy(lineContext,0,lineContextN,0,
4
						 lineContext.length);
5
				lineContext = lineContextN
1
Node c[] = new Node[i + 1];
2
				System.arraycopy(children, 0, c, 0, children.length);
6
;
3
				children = c;
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.0
Clones locationClones are in different classes
Number of node comparisons9
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements1
    Number of unmapped statements in the first code fragment2
    Number of unmapped statements in the second code fragment2
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
                                                            
    4
    Node c[] = new Node[i + 1];
    14
    TokenMarker.LineContext[] lineContextN = new TokenMarker.LineContext[(lineCount + 1) * 2];
                                                                                                                                                                                            
    15
    System.arraycopy(lineContext, 0, lineContextN, 0, lineContext.length);
    15
    System.arraycopy(lineContext, 0, lineContextN, 0, lineContext.length);
    5
    System.arraycopy(children, 0, c, 0, children.length);
    Differences
    Expression1Expression2Difference
    lineContextchildrenVARIABLE_NAME_MISMATCH
    org.gjt.sp.jedit.syntax.TokenMarker.LineContext[]bsh.Node[]VARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.gjt.sp.jedit.syntax.TokenMarker.LineContext[] of variable lineContext does not match with type bsh.Node[] of variable children
    • Make classes org.gjt.sp.jedit.syntax.TokenMarker.LineContext[] and bsh.Node[] extend a common superclass
    5
    System.arraycopy(children, 0, c, 0, children.length);
                                
    6
    children = c;
    16
    lineContext = lineContextN;
                                                              
    Precondition Violations (1)
    Row Violation
    1Type org.gjt.sp.jedit.syntax.TokenMarker.LineContext[] of variable lineContext does not match with type bsh.Node[] of variable children