469-3-7

public void testDrawWithNullQ1() { boolean success = false; try { DefaultBoxAndWhiskerCategoryDataset dataset = new DefaultBoxAndWhiskerCategoryDataset(); dataset.add(new BoxAndWhiskerItem(new Double(1.0), new Double(2.0), null, new Double(4.0), new Double(0.5), new Double(4.5), new Double(-0.5), new Double(5.5), null), "S1", "C1"); CategoryPlot plot = new CategoryPlot(dataset, new CategoryAxis("Category"), new NumberAxis("Value"), new BoxAndWhiskerRenderer()); ChartRenderingInfo info = new ChartRenderingInfo(); JFreeChart chart = new JFreeChart(plot); /* BufferedImage image = */ chart.createBufferedImage(300, 200, info); success = true; } catch (Exception e) { success = false; } assertTrue(success);
public void testDrawWithNullMinOutlier() { boolean success = false; try { DefaultBoxAndWhiskerCategoryDataset dataset = new DefaultBoxAndWhiskerCategoryDataset(); dataset.add(new BoxAndWhiskerItem(new Double(1.0), new Double(2.0), new Double(3.0), new Double(4.0), new Double(0.5), new Double(4.5), null, new Double(5.5), null), "S1", "C1"); CategoryPlot plot = new CategoryPlot(dataset, new CategoryAxis("Category"), new NumberAxis("Value"), new BoxAndWhiskerRenderer()); ChartRenderingInfo info = new ChartRenderingInfo(); JFreeChart chart = new JFreeChart(plot); /* BufferedImage image = */ chart.createBufferedImage(300, 200, info); 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/renderer/category/junit/BoxAndWhiskerRendererTests.java |  | File path: /jfreechart-1.0.10/tests/org/jfree/chart/renderer/category/junit/BoxAndWhiskerRendererTests.java
Method name: `` |  | Method name: ``
Number of AST nodes: 0 |  | Number of AST nodes: 0

1

    public void testDrawWithNullQ1() {↵

1

    public void testDrawWithNullMinOutlier() {↵

2

            boolean success = false;↵

2

            boolean success = false;↵

3

            try {↵

3

            try {↵

4

                DefaultBoxAndWhiskerCategoryDataset dataset↵

4

                DefaultBoxAndWhiskerCategoryDataset dataset↵

5

                        = new DefaultBoxAndWhiskerCategoryDataset();↵

5

                        = new DefaultBoxAndWhiskerCategoryDataset();↵

6

                dataset.add(new BoxAndWhiskerItem(new Double(1.0), new Double(2.0),↵

6

                dataset.add(new BoxAndWhiskerItem(new Double(1.0), new Double(2.0),↵

7

                        null, new Double(4.0), new Double(0.5),↵

7

                        new Double(3.0), new Double(4.0), new Double(0.5),↵

8

                        new Double(4.5), new Double(-0.5), new Double(5.5),↵

8

                        new Double(4.5), null, new Double(5.5),↵

9

                        null), "S1", "C1");↵

9

                        null), "S1", "C1");↵

10

                CategoryPlot plot = new CategoryPlot(dataset,↵

10

                CategoryPlot plot = new CategoryPlot(dataset,↵

11

                        new CategoryAxis("Category"), new NumberAxis("Value"),↵

11

                        new CategoryAxis("Category"), new NumberAxis("Value"),↵

12

                        new BoxAndWhiskerRenderer());↵

12

                        new BoxAndWhiskerRenderer());↵

13

                ChartRenderingInfo info = new ChartRenderingInfo();↵

13

                ChartRenderingInfo info = new ChartRenderingInfo();↵

14

                JFreeChart chart = new JFreeChart(plot);↵

14

                JFreeChart chart = new JFreeChart(plot);↵

15

                /* BufferedImage image = */ chart.createBufferedImage(300, 200,↵

15

                /* BufferedImage image = */ chart.createBufferedImage(300, 200,↵

16

                        info);↵

16

                        info);↵

17

                success = true;↵

17

                success = true;↵

18

            }↵

18

            }↵

19

            catch (Exception e) {↵

19

            catch (Exception e) {↵

20

                success = false;↵

20

                success = false;↵

21

            }↵

21

            }↵

22

            assertTrue(success);↵

22

            assertTrue(success);↵

23

23

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