if (seriesCount > 1) { double seriesGap = dataArea.getHeight() * getItemMargin() / (categoryCount * (seriesCount - 1)); double usedWidth = (state.getBarWidth() * seriesCount) + (seriesGap * (seriesCount - 1)); // offset the start of the boxes if the total width used is smaller // than the category width double offset = (categoryWidth - usedWidth) / 2; yy = yy + offset + (row * (state.getBarWidth() + seriesGap)); } else { // offset the start of the box if the box width is smaller than // the category width double offset = (categoryWidth - state.getBarWidth()) / 2; yy = yy + offset; }
if (seriesCount > 1) { double seriesGap = dataArea.getWidth() * getItemMargin() / (categoryCount * (seriesCount - 1)); double usedWidth = (state.getBarWidth() * seriesCount) + (seriesGap * (seriesCount - 1)); // offset the start of the boxes if the total width used is smaller // than the category width double offset = (categoryWidth - usedWidth) / 2; xx = xx + offset + (row * (state.getBarWidth() + seriesGap)); } else { // offset the start of the box if the box width is smaller than the // category width double offset = (categoryWidth - state.getBarWidth()) / 2; xx = xx + offset; }
Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/category/BoxAndWhiskerRenderer.java File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/category/BoxAndWhiskerRenderer.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
if (seriesCount > 1) {
1
if (seriesCount > 1) {
2
            double seriesGap = dataArea.getHeight() * getItemMargin()
2
            double seriesGap = dataArea.getWidth() * getItemMargin()
3
                               / (categoryCount * (seriesCount - 1));
3
                               / (categoryCount * (seriesCount - 1));
4
            double usedWidth = (state.getBarWidth() * seriesCount)
4
            double usedWidth = (state.getBarWidth() * seriesCount)
5
                               + (seriesGap * (seriesCount - 1));
5
                               + (seriesGap * (seriesCount - 1));
6
            // offset the start of the boxes if the total width used is smaller
6
            // offset the start of the boxes if the total width used is smaller
7
            // than the category width
7
            // than the category width
8
            double offset = (categoryWidth - usedWidth) / 2;
8
            double offset = (categoryWidth - usedWidth) / 2;
9
            yy = yy + offset + (row * (state.getBarWidth() + seriesGap));
9
            xx = xx + offset + (row * (state.getBarWidth() + seriesGap));
10
        }
10
        }
11
        else {
11
        else {
12
            // offset the start of the box if the box width is smaller than
12
            // offset the start of the box if the box width is smaller than the
13
            // the category width
13
            // category width
14
            double offset = (categoryWidth - state.getBarWidth()) / 2;
14
            double offset = (categoryWidth - state.getBarWidth()) / 2;
15
            yy = yy + offset;
15
            xx = xx + offset;
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