RectangleEdge xAxisLocation = plot.getDomainAxisEdge(); // BAR Y double rectY = domainAxis.getCategoryStart(column, getColumnCount(), dataArea, xAxisLocation); int seriesCount = getRowCount(); int categoryCount = getColumnCount(); if (seriesCount > 1) { double seriesGap = dataArea.getHeight() * getItemMargin() / (categoryCount * (seriesCount - 1)); rectY = rectY + row * (state.getBarWidth() + seriesGap); } else { rectY = rectY + row * state.getBarWidth(); } // BAR X Number meanValue = dataset.getMeanValue(row, column); if (meanValue == null) { return; } double value = meanValue.doubleValue(); double base = 0.0; double lclip = getLowerClip(); double uclip = getUpperClip(); if (uclip <= 0.0) { // cases 1, 2, 3 and 4 if (value >= uclip) { return; // bar is not visible } base = uclip; if (value <= lclip) { value = lclip; } } else if (lclip <= 0.0) { // cases 5, 6, 7 and 8 if (value >= uclip) { value = uclip; } else { if (value <= lclip) { value = lclip; } } } else { // cases 9, 10, 11 and 12 if (value <= lclip) { return; // bar is not visible } base = getLowerClip(); if (value >= uclip) { value = uclip; } } RectangleEdge yAxisLocation = plot.getRangeAxisEdge(); double transY1 = rangeAxis.valueToJava2D(base, dataArea, yAxisLocation); double transY2 = rangeAxis.valueToJava2D(value, dataArea, yAxisLocation); double rectX = Math.min(transY2, transY1); double rectHeight = state.getBarWidth(); double rectWidth = Math.abs(transY2 - transY1); Rectangle2D bar = new Rectangle2D.Double(rectX, rectY, rectWidth, rectHeight); Paint itemPaint = getItemPaint(row, column); GradientPaintTransformer t = getGradientPaintTransformer(); if (t != null && itemPaint instanceof GradientPaint) { itemPaint = t.transform((GradientPaint) itemPaint, bar); } g2.setPaint(itemPaint); g2.fill(bar); // draw the outline... if (isDrawBarOutline() && state.getBarWidth() > BAR_OUTLINE_WIDTH_THRESHOLD) { Stroke stroke = getItemOutlineStroke(row, column); Paint paint = getItemOutlinePaint(row, column); if (stroke != null && paint != null) { g2.setStroke(stroke); g2.setPaint(paint); g2.draw(bar); } } // standard deviation lines Number n = dataset.getStdDevValue(row, column); if (n != null) { double valueDelta = n.doubleValue(); double highVal = rangeAxis.valueToJava2D(meanValue.doubleValue() + valueDelta, dataArea, yAxisLocation); double lowVal = rangeAxis.valueToJava2D(meanValue.doubleValue() - valueDelta, dataArea, yAxisLocation); if (this.errorIndicatorPaint != null) { g2.setPaint(this.errorIndicatorPaint); } else { g2.setPaint(getItemOutlinePaint(row, column)); } if (this.errorIndicatorStroke != null) { g2.setStroke(this.errorIndicatorStroke); } else { g2.setStroke(getItemOutlineStroke(row, column)); } Line2D line = null; line = new Line2D.Double(lowVal, rectY + rectHeight / 2.0d, highVal, rectY + rectHeight / 2.0d); g2.draw(line); line = new Line2D.Double(highVal, rectY + rectHeight * 0.25, highVal, rectY + rectHeight * 0.75); g2.draw(line); line = new Line2D.Double(lowVal, rectY + rectHeight * 0.25, lowVal, rectY + rectHeight * 0.75); g2.draw(line); } CategoryItemLabelGenerator generator = getItemLabelGenerator(row, column); if (generator != null && isItemLabelVisible(row, column)) { drawItemLabel(g2, dataset, row, column, plot, generator, bar, (value < 0.0)); } // add an item entity, if this information is being collected EntityCollection entities = state.getEntityCollection(); if (entities != null) { addItemEntity(entities, dataset, row, column, bar); }
RectangleEdge xAxisLocation = plot.getDomainAxisEdge(); // BAR X double rectX = domainAxis.getCategoryStart(column, getColumnCount(), dataArea, xAxisLocation); int seriesCount = getRowCount(); int categoryCount = getColumnCount(); if (seriesCount > 1) { double seriesGap = dataArea.getWidth() * getItemMargin() / (categoryCount * (seriesCount - 1)); rectX = rectX + row * (state.getBarWidth() + seriesGap); } else { rectX = rectX + row * state.getBarWidth(); } // BAR Y Number meanValue = dataset.getMeanValue(row, column); if (meanValue == null) { return; } double value = meanValue.doubleValue(); double base = 0.0; double lclip = getLowerClip(); double uclip = getUpperClip(); if (uclip <= 0.0) { // cases 1, 2, 3 and 4 if (value >= uclip) { return; // bar is not visible } base = uclip; if (value <= lclip) { value = lclip; } } else if (lclip <= 0.0) { // cases 5, 6, 7 and 8 if (value >= uclip) { value = uclip; } else { if (value <= lclip) { value = lclip; } } } else { // cases 9, 10, 11 and 12 if (value <= lclip) { return; // bar is not visible } base = getLowerClip(); if (value >= uclip) { value = uclip; } } RectangleEdge yAxisLocation = plot.getRangeAxisEdge(); double transY1 = rangeAxis.valueToJava2D(base, dataArea, yAxisLocation); double transY2 = rangeAxis.valueToJava2D(value, dataArea, yAxisLocation); double rectY = Math.min(transY2, transY1); double rectWidth = state.getBarWidth(); double rectHeight = Math.abs(transY2 - transY1); Rectangle2D bar = new Rectangle2D.Double(rectX, rectY, rectWidth, rectHeight); Paint itemPaint = getItemPaint(row, column); GradientPaintTransformer t = getGradientPaintTransformer(); if (t != null && itemPaint instanceof GradientPaint) { itemPaint = t.transform((GradientPaint) itemPaint, bar); } g2.setPaint(itemPaint); g2.fill(bar); // draw the outline... if (isDrawBarOutline() && state.getBarWidth() > BAR_OUTLINE_WIDTH_THRESHOLD) { Stroke stroke = getItemOutlineStroke(row, column); Paint paint = getItemOutlinePaint(row, column); if (stroke != null && paint != null) { g2.setStroke(stroke); g2.setPaint(paint); g2.draw(bar); } } // standard deviation lines Number n = dataset.getStdDevValue(row, column); if (n != null) { double valueDelta = n.doubleValue(); double highVal = rangeAxis.valueToJava2D(meanValue.doubleValue() + valueDelta, dataArea, yAxisLocation); double lowVal = rangeAxis.valueToJava2D(meanValue.doubleValue() - valueDelta, dataArea, yAxisLocation); if (this.errorIndicatorPaint != null) { g2.setPaint(this.errorIndicatorPaint); } else { g2.setPaint(getItemOutlinePaint(row, column)); } if (this.errorIndicatorStroke != null) { g2.setStroke(this.errorIndicatorStroke); } else { g2.setStroke(getItemOutlineStroke(row, column)); } Line2D line = null; line = new Line2D.Double(rectX + rectWidth / 2.0d, lowVal, rectX + rectWidth / 2.0d, highVal); g2.draw(line); line = new Line2D.Double(rectX + rectWidth / 2.0d - 5.0d, highVal, rectX + rectWidth / 2.0d + 5.0d, highVal); g2.draw(line); line = new Line2D.Double(rectX + rectWidth / 2.0d - 5.0d, lowVal, rectX + rectWidth / 2.0d + 5.0d, lowVal); g2.draw(line); } CategoryItemLabelGenerator generator = getItemLabelGenerator(row, column); if (generator != null && isItemLabelVisible(row, column)) { drawItemLabel(g2, dataset, row, column, plot, generator, bar, (value < 0.0)); } // add an item entity, if this information is being collected EntityCollection entities = state.getEntityCollection(); if (entities != null) { addItemEntity(entities, dataset, row, column, bar); }
Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/category/StatisticalBarRenderer.java File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/category/StatisticalBarRenderer.java
Method name: void drawHorizontalItem(Graphics2D, CategoryItemRendererState, Rectangle2D, CategoryPlot, CategoryAxis, ValueAxis, StatisticalCategoryDataset, int, int) Method name: void drawVerticalItem(Graphics2D, CategoryItemRendererState, Rectangle2D, CategoryPlot, CategoryAxis, ValueAxis, StatisticalCategoryDataset, int, int)
Number of AST nodes: 75 Number of AST nodes: 75
1
RectangleEdge xAxisLocation = plot.getDomainAxisEdge();
1
RectangleEdge xAxisLocation = plot.getDomainAxisEdge();
2
        // BAR Y
2
        // BAR X
3
        double rectY = domainAxis.getCategoryStart(column, getColumnCount(),
3
        double rectX = domainAxis.getCategoryStart(column, getColumnCount(),
4
                dataArea, xAxisLocation);
4
                dataArea, xAxisLocation);
5
        int seriesCount = getRowCount();
5
        int seriesCount = getRowCount();
6
        int categoryCount = getColumnCount();
6
        int categoryCount = getColumnCount();
7
        if (seriesCount > 1) {
7
        if (seriesCount > 1) {
8
            double seriesGap = dataArea.getHeight() * getItemMargin()
8
            double seriesGap = dataArea.getWidth() * getItemMargin()
9
                               / (categoryCount * (seriesCount - 1));
9
                               / (categoryCount * (seriesCount - 1));
10
            rectY = rectY + row * (state.getBarWidth() + seriesGap);
10
            rectX = rectX + row * (state.getBarWidth() + seriesGap);
11
        }
11
        }
12
        else {
12
        else {
13
            rectY = rectY + row * state.getBarWidth();
13
            rectX = rectX + row * state.getBarWidth();
14
        }
14
        }
15
        // BAR X
15
        // BAR Y
16
        Number meanValue = dataset.getMeanValue(row, column);
16
        Number meanValue = dataset.getMeanValue(row, column);
17
        if (meanValue == null) {
17
        if (meanValue == null) {
18
            return;
18
            return;
19
        }
19
        }
20
        double value = meanValue.doubleValue();
20
        double value = meanValue.doubleValue();
21
        double base = 0.0;
21
        double base = 0.0;
22
        double lclip = getLowerClip();
22
        double lclip = getLowerClip();
23
        double uclip = getUpperClip();
23
        double uclip = getUpperClip();
24
        if (uclip <= 0.0) {  // cases 1, 2, 3 and 4
24
        if (uclip <= 0.0) {  // cases 1, 2, 3 and 4
25
            if (value >= uclip) {
25
            if (value >= uclip) {
26
                return; // bar is not visible
26
                return; // bar is not visible
27
            }
27
            }
28
            base = uclip;
28
            base = uclip;
29
            if (value <= lclip) {
29
            if (value <= lclip) {
30
                value = lclip;
30
                value = lclip;
31
            }
31
            }
32
        }
32
        }
33
        else if (lclip <= 0.0) { // cases 5, 6, 7 and 8
33
        else if (lclip <= 0.0) { // cases 5, 6, 7 and 8
34
            if (value >= uclip) {
34
            if (value >= uclip) {
35
                value = uclip;
35
                value = uclip;
36
            }
36
            }
37
            else {
37
            else {
38
                if (value <= lclip) {
38
                if (value <= lclip) {
39
                    value = lclip;
39
                    value = lclip;
40
                }
40
                }
41
            }
41
            }
42
        }
42
        }
43
        else { // cases 9, 10, 11 and 12
43
        else { // cases 9, 10, 11 and 12
44
            if (value <= lclip) {
44
            if (value <= lclip) {
45
                return; // bar is not visible
45
                return; // bar is not visible
46
            }
46
            }
47
            base = getLowerClip();
47
            base = getLowerClip();
48
            if (value >= uclip) {
48
            if (value >= uclip) {
49
               value = uclip;
49
               value = uclip;
50
            }
50
            }
51
        }
51
        }
52
        RectangleEdge yAxisLocation = plot.getRangeAxisEdge();
52
        RectangleEdge yAxisLocation = plot.getRangeAxisEdge();
53
        double transY1 = rangeAxis.valueToJava2D(base, dataArea, yAxisLocation);
53
        double transY1 = rangeAxis.valueToJava2D(base, dataArea, yAxisLocation);
54
        double transY2 = rangeAxis.valueToJava2D(value, dataArea,
54
        double transY2 = rangeAxis.valueToJava2D(value, dataArea,
55
                yAxisLocation);
55
                yAxisLocation);
56
        double rectX = Math.min(transY2, transY1);
56
        double rectY = Math.min(transY2, transY1);
57
        double rectHeight = state.getBarWidth();
57
        double rectWidth = state.getBarWidth();
58
        double rectWidth = Math.abs(transY2 - transY1);
58
        double rectHeight = Math.abs(transY2 - transY1);
59
        Rectangle2D bar = new Rectangle2D.Double(rectX, rectY, rectWidth,
59
        Rectangle2D bar = new Rectangle2D.Double(rectX, rectY, rectWidth,
60
                rectHeight);
60
                rectHeight);
61
        Paint itemPaint = getItemPaint(row, column);
61
        Paint itemPaint = getItemPaint(row, column);
62
        GradientPaintTransformer t = getGradientPaintTransformer();
62
        GradientPaintTransformer t = getGradientPaintTransformer();
63
        if (t != null && itemPaint instanceof GradientPaint) {
63
        if (t != null && itemPaint instanceof GradientPaint) {
64
            itemPaint = t.transform((GradientPaint) itemPaint, bar);
64
            itemPaint = t.transform((GradientPaint) itemPaint, bar);
65
        }
65
        }
66
        g2.setPaint(itemPaint);
66
        g2.setPaint(itemPaint);
67
        g2.fill(bar);
67
        g2.fill(bar);
68
        // draw the outline...
68
        // draw the outline...
69
        if (isDrawBarOutline()
69
        if (isDrawBarOutline()
70
                && state.getBarWidth() > BAR_OUTLINE_WIDTH_THRESHOLD) {
70
                && state.getBarWidth() > BAR_OUTLINE_WIDTH_THRESHOLD) {
71
            Stroke stroke = getItemOutlineStroke(row, column);
71
            Stroke stroke = getItemOutlineStroke(row, column);
72
            Paint paint = getItemOutlinePaint(row, column);
72
            Paint paint = getItemOutlinePaint(row, column);
73
            if (stroke != null && paint != null) {
73
            if (stroke != null && paint != null) {
74
                g2.setStroke(stroke);
74
                g2.setStroke(stroke);
75
                g2.setPaint(paint);
75
                g2.setPaint(paint);
76
                g2.draw(bar);
76
                g2.draw(bar);
77
            }
77
            }
78
        }
78
        }
79
        // standard deviation lines
79
        // standard deviation lines
80
        Number n = dataset.getStdDevValue(row, column);
80
        Number n = dataset.getStdDevValue(row, column);
81
        if (n != null) {
81
        if (n != null) {
82
            double valueDelta = n.doubleValue();
82
            double valueDelta = n.doubleValue();
83
            double highVal = rangeAxis.valueToJava2D(meanValue.doubleValue()
83
            double highVal = rangeAxis.valueToJava2D(meanValue.doubleValue()
84
                    + valueDelta, dataArea, yAxisLocation);
84
                    + valueDelta, dataArea, yAxisLocation);
85
            double lowVal = rangeAxis.valueToJava2D(meanValue.doubleValue()
85
            double lowVal = rangeAxis.valueToJava2D(meanValue.doubleValue()
86
                    - valueDelta, dataArea, yAxisLocation);
86
                    - valueDelta, dataArea, yAxisLocation);
87
            if (this.errorIndicatorPaint != null) {
87
            if (this.errorIndicatorPaint != null) {
88
                g2.setPaint(this.errorIndicatorPaint);
88
                g2.setPaint(this.errorIndicatorPaint);
89
            }
89
            }
90
            else {
90
            else {
91
                g2.setPaint(getItemOutlinePaint(row, column));
91
                g2.setPaint(getItemOutlinePaint(row, column));
92
            }
92
            }
93
            if (this.errorIndicatorStroke != null) {
93
            if (this.errorIndicatorStroke != null) {
94
                g2.setStroke(this.errorIndicatorStroke);
94
                g2.setStroke(this.errorIndicatorStroke);
95
            }
95
            }
96
            else {
96
            else {
97
                g2.setStroke(getItemOutlineStroke(row, column));
97
                g2.setStroke(getItemOutlineStroke(row, column));
98
            }
98
            }
99
            Line2D line = null;
99
            Line2D line = null;
100
            line = new Line2D.Double(lowVal, rectY + rectHeight / 2.0d,
100
            line = new Line2D.Double(rectX + rectWidth / 2.0d, lowVal,
101
                                     highVal, rectY + rectHeight / 2.0d);
101
                                     rectX + rectWidth / 2.0d, highVal);
102
            g2.draw(line);
102
            g2.draw(line);
103
            line = new Line2D.Double(highVal, rectY + rectHeight * 0.25,
103
            line = new Line2D.Double(rectX + rectWidth / 2.0d - 5.0d, highVal,
104
                                     highVal, rectY + rectHeight * 0.75);
104
                                     rectX + rectWidth / 2.0d + 5.0d, highVal);
105
            g2.draw(line);
105
            g2.draw(line);
106
            line = new Line2D.Double(lowVal, rectY + rectHeight * 0.25,
106
            line = new Line2D.Double(rectX + rectWidth / 2.0d - 5.0d, lowVal,
107
                                     lowVal, rectY + rectHeight * 0.75);
107
                                     rectX + rectWidth / 2.0d + 5.0d, lowVal);
108
            g2.draw(line);
108
            g2.draw(line);
109
        }
109
        }
110
        CategoryItemLabelGenerator generator = getItemLabelGenerator(row,
110
        CategoryItemLabelGenerator generator = getItemLabelGenerator(row,
111
                column);
111
                column);
112
        if (generator != null && isItemLabelVisible(row, column)) {
112
        if (generator != null && isItemLabelVisible(row, column)) {
113
            drawItemLabel(g2, dataset, row, column, plot, generator, bar,
113
            drawItemLabel(g2, dataset, row, column, plot, generator, bar,
114
                    (value < 0.0));
114
                    (value < 0.0));
115
        }
115
        }
116
        // add an item entity, if this information is being collected
116
        // add an item entity, if this information is being collected
117
        EntityCollection entities = state.getEntityCollection();
117
        EntityCollection entities = state.getEntityCollection();
118
        if (entities != null) {
118
        if (entities != null) {
119
            addItemEntity(entities, dataset, row, column, bar);
119
            addItemEntity(entities, dataset, row, column, bar);
120
        }
120
        }
Summary
Number of common nesting structure subtrees1
Number of refactorable cases0
Number of non-refactorable cases1
Time elapsed for finding largest common nesting structure subtrees (ms)13.7
Clones locationClones are declared in the same class
Number of node comparisons862
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements75
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)1145.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    RectangleEdge xAxisLocation = plot.getDomainAxisEdge();
    1
    RectangleEdge xAxisLocation = plot.getDomainAxisEdge();
    2
    double rectY = domainAxis.getCategoryStart(column, getColumnCount(), dataArea, xAxisLocation);
    2
    double rectY = domainAxis.getCategoryStart(column, getColumnCount(), dataArea, xAxisLocation);
    2
    double rectX = domainAxis.getCategoryStart(column, getColumnCount(), dataArea, xAxisLocation);
    Differences
    Expression1Expression2Difference
    rectYrectXVARIABLE_NAME_MISMATCH
    2
    double rectX = domainAxis.getCategoryStart(column, getColumnCount(), dataArea, xAxisLocation);
    3
    int seriesCount = getRowCount();
    3
    int seriesCount = getRowCount();
    4
    int categoryCount = getColumnCount();
    4
    int categoryCount = getColumnCount();
    5
    if (seriesCount > 1)
    5
    if (seriesCount > 1)
    6
    double seriesGap = dataArea.getHeight() * getItemMargin() / (categoryCount * (seriesCount - 1));
    6
    double seriesGap = dataArea.getHeight() * getItemMargin() / (categoryCount * (seriesCount - 1));
    6
    double seriesGap = dataArea.getWidth() * getItemMargin() / (categoryCount * (seriesCount - 1));
    Differences
    Expression1Expression2Difference
    getHeightgetWidthMETHOD_INVOCATION_NAME_MISMATCH
    6
    double seriesGap = dataArea.getWidth() * getItemMargin() / (categoryCount * (seriesCount - 1));
    7
    rectY = rectY + row * (state.getBarWidth() + seriesGap);
    7
    rectY = rectY + row * (state.getBarWidth() + seriesGap);
    7
    rectX = rectX + row * (state.getBarWidth() + seriesGap);
    Differences
    Expression1Expression2Difference
    rectYrectXVARIABLE_NAME_MISMATCH
    rectYrectXVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression rectY cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression rectX cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression rectY cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression rectX cannot be parameterized, because it has dependencies to/from statements that will be extracted
    7
    rectX = rectX + row * (state.getBarWidth() + seriesGap);
    else
    else
    8
    rectY = rectY + row * state.getBarWidth();
    8
    rectY = rectY + row * state.getBarWidth();
    8
    rectX = rectX + row * state.getBarWidth();
    Differences
    Expression1Expression2Difference
    rectYrectXVARIABLE_NAME_MISMATCH
    rectYrectXVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression rectY cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression rectX cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression rectY cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression rectX cannot be parameterized, because it has dependencies to/from statements that will be extracted
    8
    rectX = rectX + row * state.getBarWidth();
    9
    Number meanValue = dataset.getMeanValue(row, column);
    9
    Number meanValue = dataset.getMeanValue(row, column);
    10
    if (meanValue == null)
    10
    if (meanValue == null)
    11
    return;
    11
    return;
    12
    double value = meanValue.doubleValue();
    12
    double value = meanValue.doubleValue();
    13
    double base = 0.0;
    13
    double base = 0.0;
    14
    double lclip = getLowerClip();
    14
    double lclip = getLowerClip();
    15
    double uclip = getUpperClip();
    15
    double uclip = getUpperClip();
    16
    if (uclip <= 0.0)
    16
    if (uclip <= 0.0)
    17
    if (value >= uclip)
    17
    if (value >= uclip)
    18
    return;
    18
    return;
    19
    base = uclip;
    19
    base = uclip;
    20
    if (value <= lclip)
    20
    if (value <= lclip)
    21
    value = lclip;
    21
    value = lclip;
    22
    else if (lclip <= 0.0)
    22
    else if (lclip <= 0.0)
    23
    if (value >= uclip)
    23
    if (value >= uclip)
    24
    value = uclip;
    24
    value = uclip;
    else
    else
    25
    if (value <= lclip)
    25
    if (value <= lclip)
    26
    value = lclip;
    26
    value = lclip;
    else
    else
    27
    if (value <= lclip)
    27
    if (value <= lclip)
    28
    return;
    28
    return;
    29
    base = getLowerClip();
    29
    base = getLowerClip();
    30
    if (value >= uclip)
    30
    if (value >= uclip)
    31
    value = uclip;
    31
    value = uclip;
    32
    RectangleEdge yAxisLocation = plot.getRangeAxisEdge();
    32
    RectangleEdge yAxisLocation = plot.getRangeAxisEdge();
    33
    double transY1 = rangeAxis.valueToJava2D(base, dataArea, yAxisLocation);
    33
    double transY1 = rangeAxis.valueToJava2D(base, dataArea, yAxisLocation);
    34
    double transY2 = rangeAxis.valueToJava2D(value, dataArea, yAxisLocation);
    34
    double transY2 = rangeAxis.valueToJava2D(value, dataArea, yAxisLocation);
    35
    double rectX = Math.min(transY2, transY1);
    35
    double rectX = Math.min(transY2, transY1);
    35
    double rectY = Math.min(transY2, transY1);
    Differences
    Expression1Expression2Difference
    rectXrectYVARIABLE_NAME_MISMATCH
    35
    double rectY = Math.min(transY2, transY1);
    36
    double rectHeight = state.getBarWidth();
    36
    double rectHeight = state.getBarWidth();
    36
    double rectWidth = state.getBarWidth();
    Differences
    Expression1Expression2Difference
    rectHeightrectWidthVARIABLE_NAME_MISMATCH
    36
    double rectWidth = state.getBarWidth();
    37
    double rectWidth = Math.abs(transY2 - transY1);
    37
    double rectWidth = Math.abs(transY2 - transY1);
    37
    double rectHeight = Math.abs(transY2 - transY1);
    Differences
    Expression1Expression2Difference
    rectWidthrectHeightVARIABLE_NAME_MISMATCH
    37
    double rectHeight = Math.abs(transY2 - transY1);
    38
    Rectangle2D bar = new Rectangle2D.Double(rectX, rectY, rectWidth, rectHeight);
    38
    Rectangle2D bar = new Rectangle2D.Double(rectX, rectY, rectWidth, rectHeight);
    39
    Paint itemPaint = getItemPaint(row, column);
    39
    Paint itemPaint = getItemPaint(row, column);
    40
    GradientPaintTransformer t = getGradientPaintTransformer();
    40
    GradientPaintTransformer t = getGradientPaintTransformer();
    41
    if (t != null && itemPaint instanceof GradientPaint)
    41
    if (t != null && itemPaint instanceof GradientPaint)
    42
    itemPaint = t.transform((GradientPaint)itemPaint, bar);
    42
    itemPaint = t.transform((GradientPaint)itemPaint, bar);
    43
    g2.setPaint(itemPaint);
    43
    g2.setPaint(itemPaint);
    44
    g2.fill(bar);
    44
    g2.fill(bar);
    45
    if (isDrawBarOutline() && state.getBarWidth() > BAR_OUTLINE_WIDTH_THRESHOLD)
    45
    if (isDrawBarOutline() && state.getBarWidth() > BAR_OUTLINE_WIDTH_THRESHOLD)
    46
    Stroke stroke = getItemOutlineStroke(row, column);
    46
    Stroke stroke = getItemOutlineStroke(row, column);
    47
    Paint paint = getItemOutlinePaint(row, column);
    47
    Paint paint = getItemOutlinePaint(row, column);
    48
    if (stroke != null && paint != null)
    48
    if (stroke != null && paint != null)
    49
    g2.setStroke(stroke);
    49
    g2.setStroke(stroke);
    50
    g2.setPaint(paint);
    50
    g2.setPaint(paint);
    51
    g2.draw(bar);
    51
    g2.draw(bar);
    52
    Number n = dataset.getStdDevValue(row, column);
    52
    Number n = dataset.getStdDevValue(row, column);
    53
    if (n != null)
    53
    if (n != null)
    54
    double valueDelta = n.doubleValue();
    54
    double valueDelta = n.doubleValue();
    55
    double highVal = rangeAxis.valueToJava2D(meanValue.doubleValue() + valueDelta, dataArea, yAxisLocation);
    55
    double highVal = rangeAxis.valueToJava2D(meanValue.doubleValue() + valueDelta, dataArea, yAxisLocation);
    56
    double lowVal = rangeAxis.valueToJava2D(meanValue.doubleValue() - valueDelta, dataArea, yAxisLocation);
    56
    double lowVal = rangeAxis.valueToJava2D(meanValue.doubleValue() - valueDelta, dataArea, yAxisLocation);
    57
    if (this.errorIndicatorPaint != null)
    57
    if (this.errorIndicatorPaint != null)
    58
    g2.setPaint(this.errorIndicatorPaint);
    58
    g2.setPaint(this.errorIndicatorPaint);
    else
    else
    59
    g2.setPaint(getItemOutlinePaint(row, column));
    59
    g2.setPaint(getItemOutlinePaint(row, column));
    60
    if (this.errorIndicatorStroke != null)
    60
    if (this.errorIndicatorStroke != null)
    61
    g2.setStroke(this.errorIndicatorStroke);
    61
    g2.setStroke(this.errorIndicatorStroke);
    else
    else
    62
    g2.setStroke(getItemOutlineStroke(row, column));
    62
    g2.setStroke(getItemOutlineStroke(row, column));
    63
    Line2D line = null;
    63
    Line2D line = null;
    64
    line = new Line2D.Double(lowVal, rectY + rectHeight / 2.0d, highVal, rectY + rectHeight / 2.0d);
    64
    line = new Line2D.Double(lowVal, rectY + rectHeight / 2.0d, highVal, rectY + rectHeight / 2.0d);
    64
    line = new Line2D.Double(rectX + rectWidth / 2.0d, lowVal, rectX + rectWidth / 2.0d, highVal);
    Differences
    Expression1Expression2Difference
    lowValrectX + rectWidth / 2.0dTYPE_COMPATIBLE_REPLACEMENT
    rectY + rectHeight / 2.0dlowValTYPE_COMPATIBLE_REPLACEMENT
    highValrectX + rectWidth / 2.0dTYPE_COMPATIBLE_REPLACEMENT
    rectY + rectHeight / 2.0dhighValTYPE_COMPATIBLE_REPLACEMENT
    Preondition Violations
    Expression lowVal cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression rectX + rectWidth / 2.0d cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression rectY + rectHeight / 2.0d cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression lowVal cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression highVal cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression rectX + rectWidth / 2.0d cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression rectY + rectHeight / 2.0d cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression highVal cannot be parameterized, because it has dependencies to/from statements that will be extracted
    64
    line = new Line2D.Double(rectX + rectWidth / 2.0d, lowVal, rectX + rectWidth / 2.0d, highVal);
    65
    g2.draw(line);
    65
    g2.draw(line);
    66
    line = new Line2D.Double(highVal, rectY + rectHeight * 0.25, highVal, rectY + rectHeight * 0.75);
    66
    line = new Line2D.Double(highVal, rectY + rectHeight * 0.25, highVal, rectY + rectHeight * 0.75);
    66
    line = new Line2D.Double(rectX + rectWidth / 2.0d - 5.0d, highVal, rectX + rectWidth / 2.0d + 5.0d, highVal);
    Differences
    Expression1Expression2Difference
    highValrectX + rectWidth / 2.0d - 5.0dTYPE_COMPATIBLE_REPLACEMENT
    rectY + rectHeight * 0.25highValTYPE_COMPATIBLE_REPLACEMENT
    highValrectX + rectWidth / 2.0d + 5.0dTYPE_COMPATIBLE_REPLACEMENT
    rectY + rectHeight * 0.75highValTYPE_COMPATIBLE_REPLACEMENT
    Preondition Violations
    Expression highVal cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression rectX + rectWidth / 2.0d - 5.0d cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression rectY + rectHeight * 0.25 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression highVal cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression highVal cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression rectX + rectWidth / 2.0d + 5.0d cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression rectY + rectHeight * 0.75 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression highVal cannot be parameterized, because it has dependencies to/from statements that will be extracted
    66
    line = new Line2D.Double(rectX + rectWidth / 2.0d - 5.0d, highVal, rectX + rectWidth / 2.0d + 5.0d, highVal);
    67
    g2.draw(line);
    67
    g2.draw(line);
    68
    line = new Line2D.Double(lowVal, rectY + rectHeight * 0.25, lowVal, rectY + rectHeight * 0.75);
    68
    line = new Line2D.Double(lowVal, rectY + rectHeight * 0.25, lowVal, rectY + rectHeight * 0.75);
    68
    line = new Line2D.Double(rectX + rectWidth / 2.0d - 5.0d, lowVal, rectX + rectWidth / 2.0d + 5.0d, lowVal);
    Differences
    Expression1Expression2Difference
    lowValrectX + rectWidth / 2.0d - 5.0dTYPE_COMPATIBLE_REPLACEMENT
    rectY + rectHeight * 0.25lowValTYPE_COMPATIBLE_REPLACEMENT
    lowValrectX + rectWidth / 2.0d + 5.0dTYPE_COMPATIBLE_REPLACEMENT
    rectY + rectHeight * 0.75lowValTYPE_COMPATIBLE_REPLACEMENT
    Preondition Violations
    Expression lowVal cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression rectX + rectWidth / 2.0d - 5.0d cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression rectY + rectHeight * 0.25 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression lowVal cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression lowVal cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression rectX + rectWidth / 2.0d + 5.0d cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression rectY + rectHeight * 0.75 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression lowVal cannot be parameterized, because it has dependencies to/from statements that will be extracted
    68
    line = new Line2D.Double(rectX + rectWidth / 2.0d - 5.0d, lowVal, rectX + rectWidth / 2.0d + 5.0d, lowVal);
    69
    g2.draw(line);
    69
    g2.draw(line);
    70
    CategoryItemLabelGenerator generator = getItemLabelGenerator(row, column);
    70
    CategoryItemLabelGenerator generator = getItemLabelGenerator(row, column);
    71
    if (generator != null && isItemLabelVisible(row, column))
    71
    if (generator != null && isItemLabelVisible(row, column))
    72
    drawItemLabel(g2, dataset, row, column, plot, generator, bar, (value < 0.0));
    72
    drawItemLabel(g2, dataset, row, column, plot, generator, bar, (value < 0.0));
    73
    EntityCollection entities = state.getEntityCollection();
    73
    EntityCollection entities = state.getEntityCollection();
    74
    if (entities != null)
    74
    if (entities != null)
    75
    addItemEntity(entities, dataset, row, column, bar);
    75
    addItemEntity(entities, dataset, row, column, bar);
    Precondition Violations (32)
    Row Violation
    1Expression rectY cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression rectX cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression rectY cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4Expression rectX cannot be parameterized, because it has dependencies to/from statements that will be extracted
    5Expression rectY cannot be parameterized, because it has dependencies to/from statements that will be extracted
    6Expression rectX cannot be parameterized, because it has dependencies to/from statements that will be extracted
    7Expression rectY cannot be parameterized, because it has dependencies to/from statements that will be extracted
    8Expression rectX cannot be parameterized, because it has dependencies to/from statements that will be extracted
    9Expression lowVal cannot be parameterized, because it has dependencies to/from statements that will be extracted
    10Expression rectX + rectWidth / 2.0d cannot be parameterized, because it has dependencies to/from statements that will be extracted
    11Expression rectY + rectHeight / 2.0d cannot be parameterized, because it has dependencies to/from statements that will be extracted
    12Expression lowVal cannot be parameterized, because it has dependencies to/from statements that will be extracted
    13Expression highVal cannot be parameterized, because it has dependencies to/from statements that will be extracted
    14Expression rectX + rectWidth / 2.0d cannot be parameterized, because it has dependencies to/from statements that will be extracted
    15Expression rectY + rectHeight / 2.0d cannot be parameterized, because it has dependencies to/from statements that will be extracted
    16Expression highVal cannot be parameterized, because it has dependencies to/from statements that will be extracted
    17Expression highVal cannot be parameterized, because it has dependencies to/from statements that will be extracted
    18Expression rectX + rectWidth / 2.0d - 5.0d cannot be parameterized, because it has dependencies to/from statements that will be extracted
    19Expression rectY + rectHeight * 0.25 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    20Expression highVal cannot be parameterized, because it has dependencies to/from statements that will be extracted
    21Expression highVal cannot be parameterized, because it has dependencies to/from statements that will be extracted
    22Expression rectX + rectWidth / 2.0d + 5.0d cannot be parameterized, because it has dependencies to/from statements that will be extracted
    23Expression rectY + rectHeight * 0.75 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    24Expression highVal cannot be parameterized, because it has dependencies to/from statements that will be extracted
    25Expression lowVal cannot be parameterized, because it has dependencies to/from statements that will be extracted
    26Expression rectX + rectWidth / 2.0d - 5.0d cannot be parameterized, because it has dependencies to/from statements that will be extracted
    27Expression rectY + rectHeight * 0.25 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    28Expression lowVal cannot be parameterized, because it has dependencies to/from statements that will be extracted
    29Expression lowVal cannot be parameterized, because it has dependencies to/from statements that will be extracted
    30Expression rectX + rectWidth / 2.0d + 5.0d cannot be parameterized, because it has dependencies to/from statements that will be extracted
    31Expression rectY + rectHeight * 0.75 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    32Expression lowVal cannot be parameterized, because it has dependencies to/from statements that will be extracted