if (this.horizontalAxisTrace && area.x < this.verticalTraceLineX && area.x + area.width > this.verticalTraceLineX) { e.gc.drawLine(this.verticalTraceLineX, area.y, this.verticalTraceLineX, area.y + area.height); }
if (this.verticalAxisTrace && area.y < this.horizontalTraceLineY && area.y + area.height > this.horizontalTraceLineY) { e.gc.drawLine(area.x, this.horizontalTraceLineY, area.x + area.width, this.horizontalTraceLineY); }
Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/swt/org/jfree/experimental/chart/swt/ChartComposite.java File path: /jfreechart-1.0.10/swt/org/jfree/experimental/chart/swt/ChartComposite.java
Method name: void paintControl(PaintEvent) Method name: void paintControl(PaintEvent)
Number of AST nodes: 2 Number of AST nodes: 2
1
if (this.horizontalAxisTrace && area.x < this.verticalTraceLineX 
1
if (this.verticalAxisTrace && area.y < this.horizontalTraceLineY 
2
                && area.x + area.width > this.verticalTraceLineX) {
2
                && area.y + area.height > this.horizontalTraceLineY) {
3
            e.gc.drawLine(this.verticalTraceLineX, area.y, 
3
            e.gc.drawLine(area.x, this.horizontalTraceLineY, 
4
                    this.verticalTraceLineX, area.y + area.height);
4
                    area.x + area.width, this.horizontalTraceLineY);
5
        }
5
        }
Summary
Number of common nesting structure subtrees1
Number of refactorable cases1
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.5
Clones locationClones are in the same method
Number of node comparisons4
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements2
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)4.4
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    60
    if (this.horizontalAxisTrace && area.x < this.verticalTraceLineX && area.x + area.width > this.verticalTraceLineX)
    60
    if (this.horizontalAxisTrace && area.x < this.verticalTraceLineX && area.x + area.width > this.verticalTraceLineX)
    62
    if (this.verticalAxisTrace && area.y < this.horizontalTraceLineY && area.y + area.height > this.horizontalTraceLineY)
    Differences
    Expression1Expression2Difference
    horizontalAxisTraceverticalAxisTraceVARIABLE_NAME_MISMATCH
    xyVARIABLE_NAME_MISMATCH
    verticalTraceLineXhorizontalTraceLineYVARIABLE_NAME_MISMATCH
    xyVARIABLE_NAME_MISMATCH
    widthheightVARIABLE_NAME_MISMATCH
    verticalTraceLineXhorizontalTraceLineYVARIABLE_NAME_MISMATCH
    62
    if (this.verticalAxisTrace && area.y < this.horizontalTraceLineY && area.y + area.height > this.horizontalTraceLineY)
    61
    e.gc.drawLine(this.verticalTraceLineX, area.y, this.verticalTraceLineX, area.y + area.height);
    61
    e.gc.drawLine(this.verticalTraceLineX, area.y, this.verticalTraceLineX, area.y + area.height);
    63
    e.gc.drawLine(area.x, this.horizontalTraceLineY, area.x + area.width, this.horizontalTraceLineY);
    Differences
    Expression1Expression2Difference
    this.verticalTraceLineXarea.xTYPE_COMPATIBLE_REPLACEMENT
    area.ythis.horizontalTraceLineYTYPE_COMPATIBLE_REPLACEMENT
    this.verticalTraceLineXarea.x + area.widthTYPE_COMPATIBLE_REPLACEMENT
    area.y + area.heightthis.horizontalTraceLineYTYPE_COMPATIBLE_REPLACEMENT
    Preondition Violations
    Expression area.x cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression area.y cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression area.x + area.width cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression area.y + area.height cannot be parameterized, because it has dependencies to/from statements that will be extracted
    63
    e.gc.drawLine(area.x, this.horizontalTraceLineY, area.x + area.width, this.horizontalTraceLineY);
    Precondition Violations (4)
    Row Violation
    1Expression area.x cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression area.y cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression area.x + area.width cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4Expression area.y + area.height cannot be parameterized, because it has dependencies to/from statements that will be extracted