if (DEBUG) System.err.println("Token#compactRanges(): Compaction: ["+this.ranges[base] +", "+this.ranges[base+1] +"], ["+this.ranges[target] +", "+this.ranges[target+1] +"] -> ["+this.ranges[base] +", "+this.ranges[target+1] +"]"); this.ranges[base+1] = this.ranges[target+1];
if (DEBUG) System.err.println("Token#compactRanges(): Compaction: ["+this.ranges[base] +", "+this.ranges[base+1] +"], ["+this.ranges[target] +", "+this.ranges[target+1] +"] -> ["+this.ranges[base] +", "+this.ranges[base+1] +"]"); target += 2;
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/xml/type/internal/RegEx.java File path: /emf-2.4.1/src/org/eclipse/emf/ecore/xml/type/internal/RegEx.java
Method name: void compactRanges() Method name: void compactRanges()
Number of AST nodes: 3 Number of AST nodes: 3
1
if (DEBUG)
1
if (DEBUG)
2
                        System.err.println("Token#compactRanges(): Compaction: ["+this.ranges[base]
2
                        System.err.println("Token#compactRanges(): Compaction: ["+this.ranges[base]
3
                                           +", "+this.ranges[base+1]
3
                                           +", "+this.ranges[base+1]
4
                                           +"], ["+this.ranges[target]
4
                                           +"], ["+this.ranges[target]
5
                                           +", "+this.ranges[target+1]
5
                                           +", "+this.ranges[target+1]
6
                                           +"] -> ["+this.ranges[base]
6
                                           +"] -> ["+this.ranges[base]
7
                                           +", "+this.ranges[target+1]
7
                                           +", "+this.ranges[base+1]
8
                                           +"]");
8
                                           +"]");
9
                    this.ranges[base+1] = this.ranges[target+1];
9
                    target += 2;
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 the same method
Number of node comparisons9
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements2
    Number of unmapped statements in the first code fragment1
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)1.3
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    18
    if (DEBUG)
    24
    if (DEBUG)
    19
    System.err.println("Token#compactRanges(): Compaction: [" + this.ranges[base] + ", " + this.ranges[base + 1] + "], [" + this.ranges[target] + ", " + this.ranges[target + 1] + "] -> [" + this.ranges[base] + ", " + this.ranges[target + 1] + "]");
    19
    System.err.println("Token#compactRanges(): Compaction: [" + this.ranges[base] + ", " + this.ranges[base + 1] + "], [" + this.ranges[target] + ", " + this.ranges[target + 1] + "] -> [" + this.ranges[base] + ", " + this.ranges[target + 1] + "]");
    25
    System.err.println("Token#compactRanges(): Compaction: [" + this.ranges[base] + ", " + this.ranges[base + 1] + "], [" + this.ranges[target] + ", " + this.ranges[target + 1] + "] -> [" + this.ranges[base] + ", " + this.ranges[base + 1] + "]");
    Differences
    Expression1Expression2Difference
    targetbaseVARIABLE_NAME_MISMATCH
    25
    System.err.println("Token#compactRanges(): Compaction: [" + this.ranges[base] + ", " + this.ranges[base + 1] + "], [" + this.ranges[target] + ", " + this.ranges[target + 1] + "] -> [" + this.ranges[base] + ", " + this.ranges[base + 1] + "]");
    20
    this.ranges[base + 1] = this.ranges[target + 1];
    20
    this.ranges[base + 1] = this.ranges[target + 1];
    Preondition Violations
    Unmatched statement this.ranges[base + 1]=this.ranges[target + 1]; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                                                                                        
                                
    26
    target += 2;
    Preondition Violations
    Unmatched statement target+=2; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    26
    target += 2;
    Precondition Violations (2)
    Row Violation
    1Unmatched statement this.ranges[base + 1]=this.ranges[target + 1]; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    2Unmatched statement target+=2; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted