1565-1-3

TestSuite suite = new TestSuite("org.jfree.data.category"); suite.addTestSuite(CategoryToPieDatasetTests.class); suite.addTestSuite(DefaultCategoryDatasetTests.class); suite.addTestSuite(DefaultIntervalCategoryDatasetTests.class); suite.addTestSuite(SlidingCategoryDatasetTests.class); return suite;
TestSuite suite = new TestSuite("org.jfree.data.time.ohlc"); suite.addTestSuite(OHLCItemTests.class); suite.addTestSuite(OHLCSeriesCollectionTests.class); suite.addTestSuite(OHLCSeriesTests.class); suite.addTestSuite(OHLCTests.class); return suite;

Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/tests/org/jfree/data/category/junit/DataCategoryPackageTests.java |  | File path: /jfreechart-1.0.10/tests/org/jfree/data/time/ohlc/junit/OHLCPackageTests.java
Method name: `Test suite()` |  | Method name: `Test suite()`
Number of AST nodes: 6 |  | Number of AST nodes: 6

1

    TestSuite suite = new TestSuite("org.jfree.data.category");↵

1

    TestSuite suite = new TestSuite("org.jfree.data.time.ohlc");↵

2

            suite.addTestSuite(CategoryToPieDatasetTests.class);↵

2

            suite.addTestSuite(OHLCItemTests.class);↵

3

            suite.addTestSuite(DefaultCategoryDatasetTests.class);↵

3

            suite.addTestSuite(OHLCSeriesCollectionTests.class);↵

4

            suite.addTestSuite(DefaultIntervalCategoryDatasetTests.class);↵

4

            suite.addTestSuite(OHLCSeriesTests.class);↵

5

            suite.addTestSuite(SlidingCategoryDatasetTests.class);↵

5

            suite.addTestSuite(OHLCTests.class);↵

6

            return suite;

6

            return suite;

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

1. {Refactorable}

   Mapping Summary
   Number of mapped statements | 6
   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) | 0.0
   Clone type | Type 2

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

   1

       TestSuite suite = new TestSuite("org.jfree.data.category");

   1 | TestSuite suite = new TestSuite("org.jfree.data.category");
   1 | TestSuite suite = new TestSuite("org.jfree.data.time.ohlc");

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   "org.jfree.data.category" | "org.jfree.data.time.ohlc" | LITERAL_VALUE_MISMATCH

   1

       TestSuite suite = new TestSuite("org.jfree.data.time.ohlc");

   2

       suite.addTestSuite(CategoryToPieDatasetTests.class);

   2

       suite.addTestSuite(OHLCItemTests.class);

   3

       suite.addTestSuite(DefaultCategoryDatasetTests.class);

   3

       suite.addTestSuite(OHLCSeriesCollectionTests.class);

   4

       suite.addTestSuite(DefaultIntervalCategoryDatasetTests.class);

   4

       suite.addTestSuite(OHLCSeriesTests.class);

   5

       suite.addTestSuite(SlidingCategoryDatasetTests.class);

   5

       suite.addTestSuite(OHLCTests.class);

   6

       return suite;

   6

       return suite;

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