Stroke[] str = new Stroke[count]; for (int idx=0; idx < count; idx++) { str[idx] = nextStroke(); } return str;
Paint[] pts = new Paint[count]; for (int idx=0; idx < count; idx++) { pts[idx] = nextPaint(); } return pts;
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/visualizers/LineGraph.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/visualizers/LineGraph.java
Method name: Stroke[] createStrokes(int) Method name: Paint[] createPaint(int)
Number of AST nodes: 4 Number of AST nodes: 4
1
Stroke[] str = new Stroke[count];
1
Paint[] pts = new Paint[count];
2
        for (int idx=0; idx < count; idx++) {
2
        for (int idx=0; idx < count; idx++) {
3
            str[idx] = nextStroke();
3
            pts[idx] = nextPaint();
4
        }
4
        }
5
        return str;
5
        return pts;
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.1
Clones locationClones are declared in the same class
Number of node comparisons8
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements1
    Number of unmapped statements in the first code fragment3
    Number of unmapped statements in the second code fragment3
    Time elapsed for statement mapping (ms)0.5
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
                                                                    
    1
    Paint[] pts = new Paint[count];
    1
    Stroke[] str = new Stroke[count];
                                                                        
    2
    for (int idx = 0; idx < count; idx++)
    2
    for (int idx = 0; idx < count; idx++)
                                                    
    3
    pts[idx] = nextPaint();
    Preondition Violations
    Unmatched statement pts[idx]=nextPaint(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    3
    pts[idx] = nextPaint();
    3
    str[idx] = nextStroke();
    3
    str[idx] = nextStroke();
    Preondition Violations
    Unmatched statement str[idx]=nextStroke(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                                      
                                
    4
    return pts;
    Preondition Violations
    Unmatched return pts;
    4
    return pts;
    4
    return str;
    4
    return str;
    Preondition Violations
    Unmatched return str;
                                
    Precondition Violations (4)
    Row Violation
    1Unmatched statement pts[idx]=nextPaint(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    2Unmatched statement str[idx]=nextStroke(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    3Unmatched return pts;
    4Unmatched return str;