223-5-10

boolean success = false; try { BufferedImage image = new BufferedImage(200 , 100, BufferedImage.TYPE_INT_RGB); Graphics2D g2 = image.createGraphics(); this.chart.draw(g2, new Rectangle2D.Double(0, 0, 200, 100), null, null); g2.dispose(); success = true; } catch (Exception e) { success = false; e.printStackTrace(); } assertTrue(success);
boolean success = false; try { BufferedImage image = new BufferedImage(200 , 100, BufferedImage.TYPE_INT_RGB); Graphics2D g2 = image.createGraphics(); this.chart.draw(g2, new Rectangle2D.Double(0, 0, 200, 100), null, null); g2.dispose(); success = true; } catch (Exception e) { success = false; } assertTrue(success);

Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/tests/org/jfree/chart/junit/XYStepChartTests.java |  | File path: /jfreechart-1.0.10/tests/org/jfree/chart/junit/GanttChartTests.java
Method name: `void testDrawWithNullInfo()` |  | Method name: `void testDrawWithNullInfo()`
Number of AST nodes: 8 |  | Number of AST nodes: 8

1

    boolean success = false;↵

1

    boolean success = false;↵

2

            try {↵

2

            try {↵

3

                BufferedImage image = new BufferedImage(200 , 100, ↵

3

                BufferedImage image = new BufferedImage(200 , 100, ↵

4

                        BufferedImage.TYPE_INT_RGB);↵

4

                        BufferedImage.TYPE_INT_RGB);↵

5

                Graphics2D g2 = image.createGraphics();↵

5

                Graphics2D g2 = image.createGraphics();↵

6

                this.chart.draw(g2, new Rectangle2D.Double(0, 0, 200, 100), null, ↵

6

                this.chart.draw(g2, new Rectangle2D.Double(0, 0, 200, 100), null, ↵

7

                        null);↵

7

                        null);↵

8

                g2.dispose();↵

8

                g2.dispose();↵

9

                success = true;↵

9

                success = true;↵

10

            }↵

10

            }↵

11

            catch (Exception e) {↵

11

            catch (Exception e) {↵

12

              success = false;↵

12

                success = false;↵

13

              e.printStackTrace();↵

14

            }↵

13

            }↵

15

            assertTrue(success);

14

            assertTrue(success);

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.1
Clones location | Clones are in different classes having the same super class
Number of node comparisons | 1