1185-1-2

try { this.seriesA.add(new Year(2000), new Integer(102000)); this.seriesA.add(new Year(2001), new Integer(102001)); this.seriesA.add(new Year(2002), new Integer(102002)); this.seriesA.add(new Year(2003), new Integer(102003)); this.seriesA.add(new Year(2004), new Integer(102004)); this.seriesA.add(new Year(2005), new Integer(102005)); } catch (SeriesException e) { System.err.println("Problem creating series."); }
try { this.seriesA.add(new Year(2000), new Integer(102000)); this.seriesA.add(new Year(2001), new Integer(102001)); this.seriesA.add(new Year(2002), new Integer(102002)); this.seriesA.add(new Year(2003), new Integer(102003)); this.seriesA.add(new Year(2004), new Integer(102004)); this.seriesA.add(new Year(2005), new Integer(102005)); } catch (SeriesException e) { System.err.println("Problem creating series."); }

Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/tests/org/jfree/data/time/junit/TimePeriodValuesTests.java |  | File path: /jfreechart-1.0.10/tests/org/jfree/data/time/junit/TimeSeriesTests.java
Method name: `void setUp()` |  | Method name: `void setUp()`
Number of AST nodes: 7 |  | Number of AST nodes: 7

1

    try {↵

1

    try {↵

2

                this.seriesA.add(new Year(2000), new Integer(102000));↵

2

                this.seriesA.add(new Year(2000), new Integer(102000));↵

3

                this.seriesA.add(new Year(2001), new Integer(102001));↵

3

                this.seriesA.add(new Year(2001), new Integer(102001));↵

4

                this.seriesA.add(new Year(2002), new Integer(102002));↵

4

                this.seriesA.add(new Year(2002), new Integer(102002));↵

5

                this.seriesA.add(new Year(2003), new Integer(102003));↵

5

                this.seriesA.add(new Year(2003), new Integer(102003));↵

6

                this.seriesA.add(new Year(2004), new Integer(102004));↵

6

                this.seriesA.add(new Year(2004), new Integer(102004));↵

7

                this.seriesA.add(new Year(2005), new Integer(102005));↵

7

                this.seriesA.add(new Year(2005), new Integer(102005));↵

8

            }↵

8

            }↵

9

            catch (SeriesException e) {↵

9

            catch (SeriesException e) {↵

10

                System.err.println("Problem creating series.");↵

10

                System.err.println("Problem creating series.");↵

11

            }

11

            }

See real code fragment |  | See real code fragment

Summary
Number of common nesting structure subtrees | 1
Number of refactorable cases | 1
Number of non-refactorable cases | 0
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.2
Clones location | Clones are in different classes having the same super class
Number of node comparisons | 49

1. {Refactorable}

   Mapping Summary
   Number of mapped statements | 7
   Number of unmapped statements in the first code fragment | 0
   Number of unmapped statements in the second code fragment | 0
   Time elapsed for statement mapping (ms) | 26.9
   Clone type | Type 1

   Mapped Statements
   ID | Statement |  | ID | Statement
   --- | --- | --- | --- | ---

   2

       try

   2

       try

   3

       this.seriesA.add(new Year(2000), new Integer(102000));

   3

       this.seriesA.add(new Year(2000), new Integer(102000));

   4

       this.seriesA.add(new Year(2001), new Integer(102001));

   4

       this.seriesA.add(new Year(2001), new Integer(102001));

   5

       this.seriesA.add(new Year(2002), new Integer(102002));

   5

       this.seriesA.add(new Year(2002), new Integer(102002));

   6

       this.seriesA.add(new Year(2003), new Integer(102003));

   6

       this.seriesA.add(new Year(2003), new Integer(102003));

   7

       this.seriesA.add(new Year(2004), new Integer(102004));

   7

       this.seriesA.add(new Year(2004), new Integer(102004));

   8

       this.seriesA.add(new Year(2005), new Integer(102005));

   8

       this.seriesA.add(new Year(2005), new Integer(102005));

   Precondition Violations (0)
   Row | Violation
   --- | ---