1642-2-3

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

                }

See real code fragment |  | See real code fragment

Summary
Number of common nesting structure subtrees | 1
Number of refactorable cases | 0
Number of non-refactorable cases | 1
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.2
Clones location | Clones are in the same method
Number of node comparisons | 11

1. {Non-refactorable}

   Mapping Summary
   Number of mapped statements | 4
   Number of unmapped statements in the first code fragment | 0
   Number of unmapped statements in the second code fragment | 0
   Time elapsed for statement mapping (ms) | 11.0
   Clone type | Type 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
   Expression1 | Expression2 | Difference
   --- | --- | ---
   domainMarkers | rangeMarkers | VARIABLE_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
   Expression1 | Expression2 | Difference
   --- | --- | ---
   drawDomainMarker | drawRangeMarker | METHOD_INVOCATION_NAME_MISMATCH
   getDomainAxis | getRangeAxis | METHOD_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
   --- | ---
   1 | Expression drawDomainMarker(g2,this,getDomainAxis(),marker,dataArea) cannot be parameterized, because it has dependencies to/from statements that will be extracted
   2 | Expression drawRangeMarker(g2,this,getRangeAxis(),marker,dataArea) cannot be parameterized, because it has dependencies to/from statements that will be extracted
   3 | Expression drawDomainMarker(g2,this,getDomainAxis(),marker,dataArea) is a void method call, and thus it cannot be parameterized
   4 | Expression drawRangeMarker(g2,this,getRangeAxis(),marker,dataArea) is a void method call, and thus it cannot be parameterized