if (markers != null && axis != null) { Iterator iterator = markers.iterator(); while (iterator.hasNext()) { CategoryMarker marker = (CategoryMarker) iterator.next(); r.drawDomainMarker(g2, this, axis, marker, dataArea); } }
if (markers != null && axis != null) { Iterator iterator = markers.iterator(); while (iterator.hasNext()) { Marker marker = (Marker) iterator.next(); r.drawDomainMarker(g2, this, axis, marker, dataArea); } }
Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/CategoryPlot.java File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/XYPlot.java
Method name: void drawDomainMarkers(Graphics2D, Rectangle2D, int, Layer) Method name: void drawDomainMarkers(Graphics2D, Rectangle2D, int, Layer)
Number of AST nodes: 5 Number of AST nodes: 5
1
if (markers != null && axis != null) {
1
if (markers != null && axis != null) {
2
            Iterator iterator = markers.iterator();
2
            Iterator iterator = markers.iterator();
3
            while (iterator.hasNext()) {
3
            while (iterator.hasNext()) {
4
                CategoryMarker marker = (CategoryMarker) iterator.next();
4
                Marker marker = (Marker) iterator.next();
5
                r.drawDomainMarker(g2, this, axis, marker, dataArea);
5
                r.drawDomainMarker(g2, this, axis, marker, dataArea);
6
            }
6
            }
7
        }
7
        }
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.4
Clones locationClones are in different classes having the same super class
Number of node comparisons13
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements5
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)486.3
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    6
    if (markers != null && axis != null)
    6
    if (markers != null && axis != null)
    8
    if (markers != null && axis != null)
    Differences
    Expression1Expression2Difference
    org.jfree.chart.axis.CategoryAxisorg.jfree.chart.axis.ValueAxisSUBCLASS_TYPE_MISMATCH
    8
    if (markers != null && axis != null)
    7
    Iterator iterator = markers.iterator();
    9
    Iterator iterator = markers.iterator();
    8
    while (iterator.hasNext())
    10
    while (iterator.hasNext())
    9
    CategoryMarker marker = (CategoryMarker)iterator.next();
    9
    CategoryMarker marker = (CategoryMarker)iterator.next();
    11
    Marker marker = (Marker)iterator.next();
    Differences
    Expression1Expression2Difference
    org.jfree.chart.plot.CategoryMarkerorg.jfree.chart.plot.MarkerSUBCLASS_TYPE_MISMATCH
    org.jfree.chart.plot.CategoryMarkerorg.jfree.chart.plot.MarkerSUBCLASS_TYPE_MISMATCH
    org.jfree.chart.plot.CategoryMarkerorg.jfree.chart.plot.MarkerSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression (CategoryMarker)iterator.next() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression (Marker)iterator.next() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    11
    Marker marker = (Marker)iterator.next();
    10
    r.drawDomainMarker(g2, this, axis, marker, dataArea);
    10
    r.drawDomainMarker(g2, this, axis, marker, dataArea);
    12
    r.drawDomainMarker(g2, this, axis, marker, dataArea);
    Differences
    Expression1Expression2Difference
    org.jfree.chart.axis.CategoryAxisorg.jfree.chart.axis.ValueAxisSUBCLASS_TYPE_MISMATCH
    org.jfree.chart.plot.CategoryMarkerorg.jfree.chart.plot.MarkerSUBCLASS_TYPE_MISMATCH
    org.jfree.chart.renderer.category.CategoryItemRendererorg.jfree.chart.renderer.xy.XYItemRendererSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression axis cannot be unified with expression axis , because common superclass type org.jfree.chart.axis.Axis cannot be passed as an argument to public abstract void drawDomainMarker(java.awt.Graphics2D, org.jfree.chart.plot.CategoryPlot, org.jfree.chart.axis.CategoryAxis, org.jfree.chart.plot.CategoryMarker, java.awt.geom.Rectangle2D)
    Expression marker cannot be unified with expression marker , because common superclass type org.jfree.chart.plot.Marker cannot be passed as an argument to public abstract void drawDomainMarker(java.awt.Graphics2D, org.jfree.chart.plot.CategoryPlot, org.jfree.chart.axis.CategoryAxis, org.jfree.chart.plot.CategoryMarker, java.awt.geom.Rectangle2D)
    Expression r cannot be unified with expression r , because common superclass org.jfree.chart.LegendItemSource does not declare member(s) public abstract void drawDomainMarker(java.awt.Graphics2D, org.jfree.chart.plot.CategoryPlot, org.jfree.chart.axis.CategoryAxis, org.jfree.chart.plot.CategoryMarker, java.awt.geom.Rectangle2D) , public abstract void drawDomainMarker(java.awt.Graphics2D, org.jfree.chart.plot.XYPlot, org.jfree.chart.axis.ValueAxis, org.jfree.chart.plot.Marker, java.awt.geom.Rectangle2D)
    12
    r.drawDomainMarker(g2, this, axis, marker, dataArea);
    Precondition Violations (5)
    Row Violation
    1Expression (CategoryMarker)iterator.next() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression (Marker)iterator.next() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression axis cannot be unified with expression axis , because common superclass type org.jfree.chart.axis.Axis cannot be passed as an argument to public abstract void drawDomainMarker(java.awt.Graphics2D, org.jfree.chart.plot.CategoryPlot, org.jfree.chart.axis.CategoryAxis, org.jfree.chart.plot.CategoryMarker, java.awt.geom.Rectangle2D)
    4Expression marker cannot be unified with expression marker , because common superclass type org.jfree.chart.plot.Marker cannot be passed as an argument to public abstract void drawDomainMarker(java.awt.Graphics2D, org.jfree.chart.plot.CategoryPlot, org.jfree.chart.axis.CategoryAxis, org.jfree.chart.plot.CategoryMarker, java.awt.geom.Rectangle2D)
    5Expression r cannot be unified with expression r , because common superclass org.jfree.chart.LegendItemSource does not declare member(s) public abstract void drawDomainMarker(java.awt.Graphics2D, org.jfree.chart.plot.CategoryPlot, org.jfree.chart.axis.CategoryAxis, org.jfree.chart.plot.CategoryMarker, java.awt.geom.Rectangle2D) , public abstract void drawDomainMarker(java.awt.Graphics2D, org.jfree.chart.plot.XYPlot, org.jfree.chart.axis.ValueAxis, org.jfree.chart.plot.Marker, java.awt.geom.Rectangle2D)