259-1-2

if (xQ1 != null && xQ3 != null && xMax != null && xMin != null) { double xxQ1 = rangeAxis.valueToJava2D(xQ1.doubleValue(), dataArea, location); double xxQ3 = rangeAxis.valueToJava2D(xQ3.doubleValue(), dataArea, location); double xxMax = rangeAxis.valueToJava2D(xMax.doubleValue(), dataArea, location); double xxMin = rangeAxis.valueToJava2D(xMin.doubleValue(), dataArea, location); double yymid = yy + state.getBarWidth() / 2.0; // draw the upper shadow... g2.draw(new Line2D.Double(xxMax, yymid, xxQ3, yymid)); g2.draw(new Line2D.Double(xxMax, yy, xxMax, yy + state.getBarWidth())); // draw the lower shadow... g2.draw(new Line2D.Double(xxMin, yymid, xxQ1, yymid)); g2.draw(new Line2D.Double(xxMin, yy, xxMin, yy + state.getBarWidth())); // draw the box... box = new Rectangle2D.Double(Math.min(xxQ1, xxQ3), yy, Math.abs(xxQ1 - xxQ3), state.getBarWidth()); if (this.fillBox) { g2.fill(box); } g2.setStroke(getItemOutlineStroke(row, column)); g2.setPaint(getItemOutlinePaint(row, column)); g2.draw(box); }
if (yQ1 != null && yQ3 != null && yMax != null && yMin != null) { double yyQ1 = rangeAxis.valueToJava2D(yQ1.doubleValue(), dataArea, location); double yyQ3 = rangeAxis.valueToJava2D(yQ3.doubleValue(), dataArea, location); double yyMax = rangeAxis.valueToJava2D(yMax.doubleValue(), dataArea, location); double yyMin = rangeAxis.valueToJava2D(yMin.doubleValue(), dataArea, location); double xxmid = xx + state.getBarWidth() / 2.0; // draw the upper shadow... g2.draw(new Line2D.Double(xxmid, yyMax, xxmid, yyQ3)); g2.draw(new Line2D.Double(xx, yyMax, xx + state.getBarWidth(), yyMax)); // draw the lower shadow... g2.draw(new Line2D.Double(xxmid, yyMin, xxmid, yyQ1)); g2.draw(new Line2D.Double(xx, yyMin, xx + state.getBarWidth(), yyMin)); // draw the body... box = new Rectangle2D.Double(xx, Math.min(yyQ1, yyQ3), state.getBarWidth(), Math.abs(yyQ1 - yyQ3)); if (this.fillBox) { g2.fill(box); } g2.setStroke(getItemOutlineStroke(row, column)); g2.setPaint(getItemOutlinePaint(row, column)); g2.draw(box); }

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 (xQ1 != null && xQ3 != null && xMax != null && xMin != null) {↵

1

    if (yQ1 != null && yQ3 != null && yMax != null && yMin != null) {↵

2

                double xxQ1 = rangeAxis.valueToJava2D(xQ1.doubleValue(), dataArea,↵

2

                double yyQ1 = rangeAxis.valueToJava2D(yQ1.doubleValue(), dataArea,↵

3

                        location);↵

3

                        location);↵

4

                double xxQ3 = rangeAxis.valueToJava2D(xQ3.doubleValue(), dataArea,↵

4

                double yyQ3 = rangeAxis.valueToJava2D(yQ3.doubleValue(), dataArea,↵

5

                        location);↵

5

                        location);↵

6

                double xxMax = rangeAxis.valueToJava2D(xMax.doubleValue(), dataArea,↵

6

                double yyMax = rangeAxis.valueToJava2D(yMax.doubleValue(),↵

7

                        location);↵

7

                        dataArea, location);↵

8

                double xxMin = rangeAxis.valueToJava2D(xMin.doubleValue(), dataArea,↵

8

                double yyMin = rangeAxis.valueToJava2D(yMin.doubleValue(),↵

9

                        location);↵

9

                        dataArea, location);↵

10

                double yymid = yy + state.getBarWidth() / 2.0;↵

10

                double xxmid = xx + state.getBarWidth() / 2.0;↵

11

                // draw the upper shadow...↵

11

                // draw the upper shadow...↵

12

                g2.draw(new Line2D.Double(xxMax, yymid, xxQ3, yymid));↵

12

                g2.draw(new Line2D.Double(xxmid, yyMax, xxmid, yyQ3));↵

13

                g2.draw(new Line2D.Double(xxMax, yy, xxMax,↵

13

                g2.draw(new Line2D.Double(xx, yyMax, xx + state.getBarWidth(),↵

14

                        yy + state.getBarWidth()));↵

14

                        yyMax));↵

15

                // draw the lower shadow...↵

15

                // draw the lower shadow...↵

16

                g2.draw(new Line2D.Double(xxMin, yymid, xxQ1, yymid));↵

16

                g2.draw(new Line2D.Double(xxmid, yyMin, xxmid, yyQ1));↵

17

                g2.draw(new Line2D.Double(xxMin, yy, xxMin,↵

17

                g2.draw(new Line2D.Double(xx, yyMin, xx + state.getBarWidth(),↵

18

                        yy + state.getBarWidth()));↵

18

                        yyMin));↵

19

                // draw the box...↵

19

                // draw the body...↵

20

                box = new Rectangle2D.Double(Math.min(xxQ1, xxQ3), yy,↵

20

                box = new Rectangle2D.Double(xx, Math.min(yyQ1, yyQ3),↵

21

                        Math.abs(xxQ1 - xxQ3), state.getBarWidth());↵

21

                        state.getBarWidth(), Math.abs(yyQ1 - yyQ3));↵

22

                if (this.fillBox) {↵

22

                if (this.fillBox) {↵

23

                    g2.fill(box);↵

23

                    g2.fill(box);↵

24

                }↵

24

                }↵

25

                g2.setStroke(getItemOutlineStroke(row, column));↵

25

                g2.setStroke(getItemOutlineStroke(row, column));↵

26

                g2.setPaint(getItemOutlinePaint(row, column));↵

26

                g2.setPaint(getItemOutlinePaint(row, column));↵

27

                g2.draw(box);↵

27

                g2.draw(box);↵

28

            }

28

            }

See real code fragment |  | See real code fragment

Summary
Number of common nesting structure subtrees | 0
Number of refactorable cases | 0
Number of non-refactorable cases | 0
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.0
Clones location |
Number of node comparisons | 0