1496-1-2

XYBlockRenderer r = new XYBlockRenderer(); Range range = r.findDomainBounds(null); assertTrue(range == null); DefaultXYZDataset emptyDataset = new DefaultXYZDataset(); range = r.findDomainBounds(emptyDataset); assertTrue(range == null);
XYBlockRenderer r = new XYBlockRenderer(); Range range = r.findRangeBounds(null); assertTrue(range == null); DefaultXYZDataset emptyDataset = new DefaultXYZDataset(); range = r.findRangeBounds(emptyDataset); assertTrue(range == null);

Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/tests/org/jfree/chart/renderer/xy/junit/XYBlockRendererTests.java |  | File path: /jfreechart-1.0.10/tests/org/jfree/chart/renderer/xy/junit/XYBlockRendererTests.java
Method name: `void testBug1766646A()` |  | Method name: `void testBug1766646B()`
Number of AST nodes: 6 |  | Number of AST nodes: 6

1

    XYBlockRenderer r = new XYBlockRenderer();↵

1

    XYBlockRenderer r = new XYBlockRenderer();↵

2

            Range range = r.findDomainBounds(null);↵

2

            Range range = r.findRangeBounds(null);↵

3

            assertTrue(range == null);↵

3

            assertTrue(range == null);↵

4

            DefaultXYZDataset emptyDataset = new DefaultXYZDataset();↵

4

            DefaultXYZDataset emptyDataset = new DefaultXYZDataset();↵

5

            range = r.findDomainBounds(emptyDataset);↵

5

            range = r.findRangeBounds(emptyDataset);↵

6

            assertTrue(range == null);

6

            assertTrue(range == null);

See real code fragment |  | See real code fragment

Summary
Number of common nesting structure subtrees | 1
Number of refactorable cases | 0
Number of non-refactorable cases | 1
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.0
Clones location | Clones are declared in the same class
Number of node comparisons | 11

1. {Non-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

       XYBlockRenderer r = new XYBlockRenderer();

   1

       XYBlockRenderer r = new XYBlockRenderer();

   2

       Range range = r.findDomainBounds(null);

   2 | Range range = r.findDomainBounds(null);
   2 | Range range = r.findRangeBounds(null);

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   findDomainBounds | findRangeBounds | METHOD_INVOCATION_NAME_MISMATCH

   Preondition Violations
   Expression r.findDomainBounds(null) cannot be parameterized, because it has dependencies to/from statements that will be extracted
   Expression r.findRangeBounds(null) cannot be parameterized, because it has dependencies to/from statements that will be extracted

   2

       Range range = r.findRangeBounds(null);

   3

       assertTrue(range == null);

   3

       assertTrue(range == null);

   4

       DefaultXYZDataset emptyDataset = new DefaultXYZDataset();

   4

       DefaultXYZDataset emptyDataset = new DefaultXYZDataset();

   5

       range = r.findDomainBounds(emptyDataset);

   5 | range = r.findDomainBounds(emptyDataset);
   5 | range = r.findRangeBounds(emptyDataset);

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   findDomainBounds | findRangeBounds | METHOD_INVOCATION_NAME_MISMATCH

   Preondition Violations
   Expression r.findDomainBounds(emptyDataset) cannot be parameterized, because it has dependencies to/from statements that will be extracted
   Expression r.findRangeBounds(emptyDataset) cannot be parameterized, because it has dependencies to/from statements that will be extracted

   5

       range = r.findRangeBounds(emptyDataset);

   6

       assertTrue(range == null);

   6

       assertTrue(range == null);

   Precondition Violations (4)
   Row | Violation
   --- | ---
   1 | Expression r.findDomainBounds(null) cannot be parameterized, because it has dependencies to/from statements that will be extracted
   2 | Expression r.findRangeBounds(null) cannot be parameterized, because it has dependencies to/from statements that will be extracted
   3 | Expression r.findDomainBounds(emptyDataset) cannot be parameterized, because it has dependencies to/from statements that will be extracted
   4 | Expression r.findRangeBounds(emptyDataset) cannot be parameterized, because it has dependencies to/from statements that will be extracted