Iterator iterator = this.domainMarkers.iterator(); while (iterator.hasNext()) { Marker marker = (Marker) iterator.next(); drawDomainMarker(g2, this, getDomainAxis(), marker, dataArea); }
Iterator iterator = this.rangeMarkers.iterator(); while (iterator.hasNext()) { Marker marker = (Marker) iterator.next(); drawRangeMarker(g2, this, getRangeAxis(), marker, dataArea); }
Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/ContourPlot.java File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/ContourPlot.java
Method name: void draw(Graphics2D, Rectangle2D, Point2D, PlotState, PlotRenderingInfo) Method name: void draw(Graphics2D, Rectangle2D, Point2D, PlotState, PlotRenderingInfo)
Number of AST nodes: 4 Number of AST nodes: 4
1
Iterator iterator = this.domainMarkers.iterator();
1
Iterator iterator = this.rangeMarkers.iterator();
2
            while (iterator.hasNext()) {
2
            while (iterator.hasNext()) {
3
                Marker marker = (Marker) iterator.next();
3
                Marker marker = (Marker) iterator.next();
4
                drawDomainMarker(g2, this, getDomainAxis(), marker, dataArea);
4
                drawRangeMarker(g2, this, getRangeAxis(), marker, dataArea);
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.2
Clones locationClones are in the same method
Number of node comparisons11
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements4
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)148.9
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    56
    Iterator iterator = this.domainMarkers.iterator();
    56
    Iterator iterator = this.domainMarkers.iterator();
    61
    Iterator iterator = this.rangeMarkers.iterator();
    Differences
    Expression1Expression2Difference
    domainMarkersrangeMarkersVARIABLE_NAME_MISMATCH
    61
    Iterator iterator = this.rangeMarkers.iterator();
    57
    while (iterator.hasNext())
    62
    while (iterator.hasNext())
    58
    Marker marker = (Marker)iterator.next();
    63
    Marker marker = (Marker)iterator.next();
    59
    drawDomainMarker(g2, this, getDomainAxis(), marker, dataArea);
    59
    drawDomainMarker(g2, this, getDomainAxis(), marker, dataArea);
    64
    drawRangeMarker(g2, this, getRangeAxis(), marker, dataArea);
    Differences
    Expression1Expression2Difference
    getDomainAxisgetRangeAxisMETHOD_INVOCATION_NAME_MISMATCH
    drawDomainMarkerdrawRangeMarkerMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression drawDomainMarker(g2,this,getDomainAxis(),marker,dataArea) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression drawRangeMarker(g2,this,getRangeAxis(),marker,dataArea) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression drawDomainMarker(g2,this,getDomainAxis(),marker,dataArea) is a void method call, and thus it cannot be parameterized
    Expression drawRangeMarker(g2,this,getRangeAxis(),marker,dataArea) is a void method call, and thus it cannot be parameterized
    64
    drawRangeMarker(g2, this, getRangeAxis(), marker, dataArea);
    Precondition Violations (4)
    Row Violation
    1Expression drawDomainMarker(g2,this,getDomainAxis(),marker,dataArea) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression drawRangeMarker(g2,this,getRangeAxis(),marker,dataArea) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression drawDomainMarker(g2,this,getDomainAxis(),marker,dataArea) is a void method call, and thus it cannot be parameterized
    4Expression drawRangeMarker(g2,this,getRangeAxis(),marker,dataArea) is a void method call, and thus it cannot be parameterized