for (int i = entityCount - 1; i >= 0; i--) { ChartEntity entity = (ChartEntity) this.entities.get(i); if (entity.getArea().contains(x, y)) { return entity; } }
for (int i = 0; i < this.rangeAxes.size(); i++) { ValueAxis rangeAxis = (ValueAxis) this.rangeAxes.get(i); if (rangeAxis != null) { rangeAxis.zoomRange(lowerPercent, upperPercent); } }
Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/chart/entity/StandardEntityCollection.java File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/CategoryPlot.java
Method name: ChartEntity getEntity(double, double) Method name: void zoomRangeAxes(double, double, PlotRenderingInfo, Point2D)
Number of AST nodes: 4 Number of AST nodes: 4
1
for (int i = entityCount - 1; i &gt;= 0; i--) {
1
for (int i = 0; i &lt; this.rangeAxes.size(); i++) {
2
            ChartEntity entity = (ChartEntity) this.entities.get(i);
2
            ValueAxis rangeAxis = (ValueAxis) this.rangeAxes.get(i);
3
            if (entity.getArea().contains(x, y)) {
3
            if (
4
                return entity
4
rangeAxis != null) {
5
;
5
                rangeAxis.zoomRange(lowerPercent, upperPercent);
6
            }
6
            }
7
        }
7
        }
Summary
Number of common nesting structure subtrees0
Number of refactorable cases0
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.1
Clones locationClones are in different classes
Number of node comparisons1