123-2-4

if (extent > -180.0) { // whole segment stays at the back if (drawBack) { Area side = new Area(new Rectangle2D.Double( arc.getStartPoint().getX(), plotArea.getY(), arc.getEndPoint().getX() - arc.getStartPoint().getX(), plotArea.getHeight())); side.intersect(back); g2.setPaint(paint); g2.fill(side); g2.setPaint(outlinePaint); g2.draw(side); } } else { // starts at the back, wraps around front, and // finishes at back again Area side1 = new Area(new Rectangle2D.Double( arc.getStartPoint().getX(), plotArea.getY(), plotArea.getMaxX() - arc.getStartPoint().getX(), plotArea.getHeight())); side1.intersect(back); Area side2 = new Area(new Rectangle2D.Double( plotArea.getX(), plotArea.getY(), arc.getEndPoint().getX() - plotArea.getX(), plotArea.getHeight())); side2.intersect(back); g2.setPaint(paint); if (drawBack) { g2.fill(side1); g2.fill(side2); } if (drawFront) { g2.fill(front); } g2.setPaint(outlinePaint); if (drawBack) { g2.draw(side1); g2.draw(side2); } if (drawFront) { g2.draw(front);
if (extent < 180.0) { // and finishes at back if (drawBack) { Area side = new Area(new Rectangle2D.Double( arc.getEndPoint().getX(), plotArea.getY(), arc.getStartPoint().getX() - arc.getEndPoint().getX(), plotArea.getHeight())); side.intersect(back); g2.setPaint(paint); g2.fill(side); g2.setPaint(outlinePaint); g2.draw(side); } } else { // starts at back and wraps right around to the // back again Area side1 = new Area(new Rectangle2D.Double( arc.getStartPoint().getX(), plotArea.getY(), plotArea.getX() - arc.getStartPoint().getX(), plotArea.getHeight())); side1.intersect(back); Area side2 = new Area(new Rectangle2D.Double( arc.getEndPoint().getX(), plotArea.getY(), plotArea.getMaxX() - arc.getEndPoint().getX(), plotArea.getHeight())); side2.intersect(back); g2.setPaint(paint); if (drawBack) { g2.fill(side1); g2.fill(side2); } if (drawFront) { g2.fill(front); } g2.setPaint(outlinePaint); if (drawBack) { g2.draw(side1); g2.draw(side2); } if (drawFront) { g2.draw(front);

Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/PiePlot3D.java |  | File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/PiePlot3D.java
Method name: `` |  | Method name: ``
Number of AST nodes: 0 |  | Number of AST nodes: 0

1

    if (extent &gt; -180.0) {  // whole segment stays at the back↵

1

    if (extent &lt; 180.0) {  // and finishes at back↵

2

                            if (drawBack) {↵

2

                            if (drawBack) {↵

3

                                Area side = new Area(new Rectangle2D.Double(↵

3

                                Area side = new Area(new Rectangle2D.Double(↵

4

                                        arc.getStartPoint().getX(), plotArea.getY(),↵

4

                                        arc.getEndPoint().getX(), plotArea.getY(),↵

5

                                        arc.getEndPoint().getX() ↵

5

                                        arc.getStartPoint().getX() ↵

6

                                        - arc.getStartPoint().getX(),↵

6

                                        - arc.getEndPoint().getX(),↵

7

                                        plotArea.getHeight()));↵

7

                                        plotArea.getHeight()));↵

8

                                side.intersect(back);↵

8

                                side.intersect(back);↵

9

                                g2.setPaint(paint);↵

9

                                g2.setPaint(paint);↵

10

                                g2.fill(side);↵

10

                                g2.fill(side);↵

11

                                g2.setPaint(outlinePaint);↵

11

                                g2.setPaint(outlinePaint);↵

12

                                g2.draw(side);↵

12

                                g2.draw(side);↵

13

                            }↵

13

                            }↵

14

                        }↵

14

                        }↵

15

                        else {  // starts at the back, wraps around front, and ↵

15

                        else {  // starts at back and wraps right around to the ↵

16

                                // finishes at back again↵

16

                                // back again↵

17

                            Area side1 = new Area(new Rectangle2D.Double(↵

17

                            Area side1 = new Area(new Rectangle2D.Double(↵

18

                                    arc.getStartPoint().getX(), plotArea.getY(),↵

18

                                    arc.getStartPoint().getX(), plotArea.getY(),↵

19

                                    plotArea.getMaxX() - arc.getStartPoint().getX(),↵

19

                                    plotArea.getX() - arc.getStartPoint().getX(),↵

20

                                    plotArea.getHeight()));↵

20

                                    plotArea.getHeight()));↵

21

                            side1.intersect(back);↵

21

                            side1.intersect(back);↵

22

                            Area side2 = new Area(new Rectangle2D.Double(↵

22

                            Area side2 = new Area(new Rectangle2D.Double(↵

23

                                    plotArea.getX(), plotArea.getY(),↵

23

                                    arc.getEndPoint().getX(), plotArea.getY(),↵

24

                                    arc.getEndPoint().getX() - plotArea.getX(),↵

24

                                    plotArea.getMaxX() - arc.getEndPoint().getX(),↵

25

                                    plotArea.getHeight()));↵

25

                                    plotArea.getHeight()));↵

26

                            side2.intersect(back);↵

26

                            side2.intersect(back);↵

27

                            g2.setPaint(paint);↵

27

                            g2.setPaint(paint);↵

28

                            if (drawBack) {↵

28

                            if (drawBack) {↵

29

                                g2.fill(side1);↵

29

                                g2.fill(side1);↵

30

                                g2.fill(side2);↵

30

                                g2.fill(side2);↵

31

                            }↵

31

                            }↵

32

                            if (drawFront) {↵

32

                            if (drawFront) {↵

33

                                g2.fill(front);↵

33

                                g2.fill(front);↵

34

                            }↵

34

                            }↵

35

                            g2.setPaint(outlinePaint);↵

35

                            g2.setPaint(outlinePaint);↵

36

                            if (drawBack) {↵

36

                            if (drawBack) {↵

37

                                g2.draw(side1);↵

37

                                g2.draw(side1);↵

38

                                g2.draw(side2);↵

38

                                g2.draw(side2);↵

39

                            }↵

39

                            }↵

40

                            if (drawFront) {↵

40

                            if (drawFront) {↵

41

                                g2.draw(front);↵

41

                                g2.draw(front);↵

42

42

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