if (h == LengthConstraintType.NONE) { contentSize = arrangeFN(container, g2, constraint.getWidth()); } else if (h == LengthConstraintType.FIXED) { contentSize = arrangeFF(container, g2, constraint); } else if (h == LengthConstraintType.RANGE) { contentSize = arrangeFR(container, g2, constraint); }
if (getPlotShapes()) { shape = getItemShape(series, item); if (orientation == PlotOrientation.VERTICAL) { shape = ShapeUtilities.createTranslatedShape(shape, transX1, transY1); } else if (orientation == PlotOrientation.HORIZONTAL) { shape = ShapeUtilities.createTranslatedShape(shape, transY1, transX1); } g2.draw(shape); }
Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/chart/block/BorderArrangement.java File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/xy/XYAreaRenderer.java
Method name: Size2D arrange(BlockContainer, Graphics2D, RectangleConstraint) Method name: void drawItem(Graphics2D, XYItemRendererState, Rectangle2D, PlotRenderingInfo, XYPlot, ValueAxis, ValueAxis, XYDataset, int, int, CrosshairState, int)
Number of AST nodes: 6 Number of AST nodes: 7
1
if (h == LengthConstraintType.NONE) {
1
if (
2
                contentSize = arrangeFN(container, g2, constraint.getWidth());
3
            }
4
            else if (h == LengthConstraintType.FIXED
2
getPlotShapes()) {
3
            shape = getItemShape(series, item);
5
) {
4
            if (orientation == PlotOrientation.VERTICAL) {
6
                contentSize = arrangeFF(container, g2, constraint
5
                shape = ShapeUtilities.createTranslatedShape(shape, transX1, 
7
);
6
                        transY1);
8
            }
7
            }
9
            else if (h == LengthConstraintType.RANGE) {
8
            else if (orientation == PlotOrientation.HORIZONTAL) {
10
                contentSize = arrangeFR(container, g2, constraint);
9
                
11
    
10
shape = ShapeUtilities.createTranslatedShape(shape, transY1, 
11
                        transX1);
12
            }
13
            g2.draw(shape);
12
        }
14
        }
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.6
Clones locationClones are in different classes
Number of node comparisons6