if (drawUpOrRight) { double x = 0.0; double y = 0.0; Shape arrow = null; if (edge == RectangleEdge.TOP || edge == RectangleEdge.BOTTOM) { x = dataArea.getMaxX(); y = cursor; arrow = this.rightArrow; } else if (edge == RectangleEdge.LEFT || edge == RectangleEdge.RIGHT) { x = cursor; y = dataArea.getMinY(); arrow = this.upArrow; } // draw the arrow... AffineTransform transformer = new AffineTransform(); transformer.setToTranslation(x, y); Shape shape = transformer.createTransformedShape(arrow); g2.fill(shape); g2.draw(shape); }
if (drawDownOrLeft) { double x = 0.0; double y = 0.0; Shape arrow = null; if (edge == RectangleEdge.TOP || edge == RectangleEdge.BOTTOM) { x = dataArea.getMinX(); y = cursor; arrow = this.leftArrow; } else if (edge == RectangleEdge.LEFT || edge == RectangleEdge.RIGHT) { x = cursor; y = dataArea.getMaxY(); arrow = this.downArrow; } // draw the arrow... AffineTransform transformer = new AffineTransform(); transformer.setToTranslation(x, y); Shape shape = transformer.createTransformedShape(arrow); g2.fill(shape); g2.draw(shape); }
Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/chart/axis/ValueAxis.java File path: /jfreechart-1.0.10/src/org/jfree/chart/axis/ValueAxis.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
if (drawUpOrRight) {
1
if (drawDownOrLeft) {
2
            double x = 0.0;
2
            double x = 0.0;
3
            double y = 0.0;
3
            double y = 0.0;
4
            Shape arrow = null;
4
            Shape arrow = null;
5
            if (edge == RectangleEdge.TOP || edge == RectangleEdge.BOTTOM) {
5
            if (edge == RectangleEdge.TOP || edge == RectangleEdge.BOTTOM) {
6
                x = dataArea.getMaxX();
6
                x = dataArea.getMinX();
7
                y = cursor;
7
                y = cursor;
8
                arrow = this.rightArrow;
8
                arrow = this.leftArrow;
9
            }
9
            }
10
            else if (edge == RectangleEdge.LEFT
10
            else if (edge == RectangleEdge.LEFT
11
                    || edge == RectangleEdge.RIGHT) {
11
                    || edge == RectangleEdge.RIGHT) {
12
                x = cursor;
12
                x = cursor;
13
                y = dataArea.getMinY();
13
                y = dataArea.getMaxY();
14
                arrow = this.upArrow;
14
                arrow = this.downArrow;
15
            }
15
            }
16
            // draw the arrow...
16
            // draw the arrow...
17
            AffineTransform transformer = new AffineTransform();
17
            AffineTransform transformer = new AffineTransform();
18
            transformer.setToTranslation(x, y);
18
            transformer.setToTranslation(x, y);
19
            Shape shape = transformer.createTransformedShape(arrow);
19
            Shape shape = transformer.createTransformedShape(arrow);
20
            g2.fill(shape);
20
            g2.fill(shape);
21
            g2.draw(shape);
21
            g2.draw(shape);
22
        }
22
        }
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.0
Clones location
Number of node comparisons0