if (data != null) { PlotOrientation orientation = plot.getOrientation(); double space = 0.0; if (orientation == PlotOrientation.HORIZONTAL) { space = dataArea.getHeight(); } else if (orientation == PlotOrientation.VERTICAL) { space = dataArea.getWidth(); } double maxWidth = space * getMaximumBarWidth(); int columns = data.getColumnCount(); double categoryMargin = 0.0; if (columns > 1) { categoryMargin = xAxis.getCategoryMargin(); } double used = space * (1 - xAxis.getLowerMargin() - xAxis.getUpperMargin() - categoryMargin); if (columns > 0) { state.setBarWidth(Math.min(used / columns, maxWidth)); } else { state.setBarWidth(Math.min(used, maxWidth));
if (data != null) { PlotOrientation orientation = plot.getOrientation(); double space = 0.0; if (orientation == PlotOrientation.HORIZONTAL) { space = dataArea.getHeight(); } else if (orientation == PlotOrientation.VERTICAL) { space = dataArea.getWidth(); } double maxWidth = space * getMaximumBarWidth(); int columns = data.getColumnCount(); double categoryMargin = 0.0; if (columns > 1) { categoryMargin = domainAxis.getCategoryMargin(); } double used = space * (1 - domainAxis.getLowerMargin() - domainAxis.getUpperMargin() - categoryMargin); if (columns > 0) { state.setBarWidth(Math.min(used / columns, maxWidth)); } else { state.setBarWidth(Math.min(used, maxWidth));
Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/category/StackedBarRenderer.java File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/category/StackedBarRenderer3D.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
if (data != null) {
1
if (data != null) {
2
            PlotOrientation orientation = plot.getOrientation();
2
            PlotOrientation orientation = plot.getOrientation();
3
            double space = 0.0;
3
            double space = 0.0;
4
            if (orientation == PlotOrientation.HORIZONTAL) {
4
            if (orientation == PlotOrientation.HORIZONTAL) {
5
                space = dataArea.getHeight();
5
                space = dataArea.getHeight();
6
            }
6
            }
7
            else if (orientation == PlotOrientation.VERTICAL) {
7
            else if (orientation == PlotOrientation.VERTICAL) {
8
                space = dataArea.getWidth();
8
                space = dataArea.getWidth();
9
            }
9
            }
10
            double maxWidth = space * getMaximumBarWidth();
10
            double maxWidth = space * getMaximumBarWidth();
11
            int columns = data.getColumnCount();
11
            int columns = data.getColumnCount();
12
            double categoryMargin = 0.0;
12
            double categoryMargin = 0.0;
13
            if (columns > 1) {
13
            if (columns > 1) {
14
                categoryMargin = xAxis.getCategoryMargin();
14
                categoryMargin = domainAxis.getCategoryMargin();
15
            }
15
            }
16
            double used = space * (1 - xAxis.getLowerMargin()
16
            double used = space * (1 - domainAxis.getLowerMargin()
17
                                     - xAxis.getUpperMargin()
17
                                     - domainAxis.getUpperMargin()
18
                                     - categoryMargin);
18
                                     - categoryMargin);
19
            if (columns > 0) {
19
            if (columns > 0) {
20
                state.setBarWidth(Math.min(used / columns, maxWidth));
20
                state.setBarWidth(Math.min(used / columns, maxWidth));
21
            }
21
            }
22
            else {
22
            else {
23
                state.setBarWidth(Math.min(used, maxWidth));
23
                state.setBarWidth(Math.min(used, maxWidth));
24
            
24
            
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