if (orientation == PlotOrientation.HORIZONTAL) { // clip left and right bounds to data area low = Math.max(low, dataArea.getMinX()); high = Math.min(high, dataArea.getMaxX()); rect = new Rectangle2D.Double(low, dataArea.getMinY(), high - low, dataArea.getHeight()); } else if (orientation == PlotOrientation.VERTICAL) { // clip top and bottom bounds to data area low = Math.max(low, dataArea.getMinY()); high = Math.min(high, dataArea.getMaxY()); rect = new Rectangle2D.Double(dataArea.getMinX(), low, dataArea.getWidth(), high - low);
if (orientation == PlotOrientation.HORIZONTAL) { // clip top and bottom bounds to data area low = Math.max(low, dataArea.getMinY()); high = Math.min(high, dataArea.getMaxY()); rect = new Rectangle2D.Double(dataArea.getMinX(), low, dataArea.getWidth(), high - low); } else if (orientation == PlotOrientation.VERTICAL) { // clip left and right bounds to data area low = Math.max(low, dataArea.getMinX()); high = Math.min(high, dataArea.getMaxX()); rect = new Rectangle2D.Double(low, dataArea.getMinY(), high - low, dataArea.getHeight());
Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/category/AbstractCategoryItemRenderer.java File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/xy/AbstractXYItemRenderer.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
if (orientation == PlotOrientation.HORIZONTAL) {
1
if (orientation == PlotOrientation.HORIZONTAL) {
2
                // clip left and right bounds to data area
2
                // clip top and bottom bounds to data area
3
                low = Math.max(low, dataArea.getMinX());
3
                low = Math.max(low, dataArea.getMinY());
4
                high = Math.min(high, dataArea.getMaxX());
4
                high = Math.min(high, dataArea.getMaxY());
5
                rect = new Rectangle2D.Double(low,
5
                rect = new Rectangle2D.Double(dataArea.getMinX(),
6
                        dataArea.getMinY(), high - low,
6
                        low, dataArea.getWidth(),
7
                        dataArea.getHeight());
7
                        high - low);
8
            }
8
            }
9
            else if (orientation == PlotOrientation.VERTICAL) {
9
            else if (orientation == PlotOrientation.VERTICAL) {
10
                // clip top and bottom bounds to data area
10
                // clip left and right bounds to data area
11
                low = Math.max(low, dataArea.getMinY());
11
                low = Math.max(low, dataArea.getMinX());
12
                high = Math.min(high, dataArea.getMaxY());
12
                high = Math.min(high, dataArea.getMaxX());
13
                rect = new Rectangle2D.Double(dataArea.getMinX(),
13
                rect = new Rectangle2D.Double(low,
14
                        low, dataArea.getWidth(),
14
                        dataArea.getMinY(), high - low,
15
                        high - low);
15
                        dataArea.getHeight());
16
            
16
            
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