CategoryPlot plot = (CategoryPlot) this.subplots.get(i); // calculate sub-plot area if (orientation == PlotOrientation.VERTICAL) { double w = usableSize * plot.getWeight() / this.totalWeight; this.subplotArea[i] = new Rectangle2D.Double(x, y, w, adjustedPlotArea.getHeight()); x = x + w + this.gap; } else if (orientation == PlotOrientation.HORIZONTAL) { double h = usableSize * plot.getWeight() / this.totalWeight; this.subplotArea[i] = new Rectangle2D.Double(x, y, adjustedPlotArea.getWidth(), h); y = y + h + this.gap; } AxisSpace subSpace = plot.calculateDomainAxisSpace(g2, this.subplotArea[i], null); space.ensureAtLeast(subSpace);
XYPlot plot = (XYPlot) this.subplots.get(i); // calculate sub-plot area if (orientation == PlotOrientation.VERTICAL) { double w = usableSize * plot.getWeight() / this.totalWeight; this.subplotAreas[i] = new Rectangle2D.Double(x, y, w, adjustedPlotArea.getHeight()); x = x + w + this.gap; } else if (orientation == PlotOrientation.HORIZONTAL) { double h = usableSize * plot.getWeight() / this.totalWeight; this.subplotAreas[i] = new Rectangle2D.Double(x, y, adjustedPlotArea.getWidth(), h); y = y + h + this.gap; } AxisSpace subSpace = plot.calculateDomainAxisSpace(g2, this.subplotAreas[i], null); space.ensureAtLeast(subSpace);
Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/CombinedRangeCategoryPlot.java File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/CombinedRangeXYPlot.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
CategoryPlot plot = (CategoryPlot) this.subplots.get(i);
1
XYPlot plot = (XYPlot) this.subplots.get(i);
2
            // calculate sub-plot area
2
            // calculate sub-plot area
3
            if (orientation == PlotOrientation.VERTICAL) {
3
            if (orientation == PlotOrientation.VERTICAL) {
4
                double w = usableSize * plot.getWeight() / this.totalWeight;
4
                double w = usableSize * plot.getWeight() / this.totalWeight;
5
                this.subplotArea[i] = new Rectangle2D.Double(x, y, w, 
5
                this.subplotAreas[i] = new Rectangle2D.Double(x, y, w,
6
                        adjustedPlotArea.getHeight());
6
                        adjustedPlotArea.getHeight());
7
                x = x + w + this.gap;
7
                x = x + w + this.gap;
8
            }
8
            }
9
            else if (orientation == PlotOrientation.HORIZONTAL) {
9
            else if (orientation == PlotOrientation.HORIZONTAL) {
10
                double h = usableSize * plot.getWeight() / this.totalWeight;
10
                double h = usableSize * plot.getWeight() / this.totalWeight;
11
                this.subplotArea[i] = new Rectangle2D.Double(x, y, 
11
                this.subplotAreas[i] = new Rectangle2D.Double(x, y,
12
                        adjustedPlotArea.getWidth(), h);
12
                        adjustedPlotArea.getWidth(), h);
13
                y = y + h + this.gap;
13
                y = y + h + this.gap;
14
            }
14
            }
15
            AxisSpace subSpace = plot.calculateDomainAxisSpace(g2, 
15
            AxisSpace subSpace = plot.calculateDomainAxisSpace(g2,
16
                    this.subplotArea[i], null);
16
                    this.subplotAreas[i], null);
17
            space.ensureAtLeast(subSpace);
17
            space.ensureAtLeast(subSpace);
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