File path: /jfreechart-1.0.10/tests/org/jfree/chart/renderer/junit/AbstractRendererTests.java | File path: /jfreechart-1.0.10/tests/org/jfree/chart/renderer/junit/AbstractRendererTests.java | |||
Method name: void testPaintLookup()
|
Method name: void testOutlinePaintLookup()
|
|||
Number of AST nodes: 9 | Number of AST nodes: 9 | |||
1 | BarRenderer r = new BarRenderer();↵ | 1 | BarRenderer r = new BarRenderer();↵ | |
2 | assertEquals(Color.blue, r.getBasePaint());↵ | 2 | assertEquals(Color.gray, r.getBaseOutlinePaint());↵ | |
3 | ↵ | 3 | ↵ | |
4 | // first check that autoPopulate==false works as expected↵ | 4 | // first check that autoPopulate==false works as expected↵ | |
5 | r.setAutoPopulateSeriesPaint(false);↵ | 5 | r.setAutoPopulateSeriesOutlinePaint(false);↵ | |
6 | assertEquals(Color.blue, r.lookupSeriesPaint(0));↵ | 6 | assertEquals(Color.gray, r.lookupSeriesOutlinePaint(0));↵ | |
7 | assertNull(r.getSeriesPaint(0));↵ | 7 | assertNull(r.getSeriesOutlinePaint(0));↵ | |
8 | ↵ | 8 | ↵ | |
9 | // now check autoPopulate==true↵ | 9 | // now check autoPopulate==true↵ | |
10 | r.setAutoPopulateSeriesPaint(true);↵ | 10 | r.setAutoPopulateSeriesOutlinePaint(true);↵ | |
11 | /*CategoryPlot plot =*/ new CategoryPlot(null, new CategoryAxis(↵ | 11 | /*CategoryPlot plot =*/ new CategoryPlot(null, new CategoryAxis(↵ | |
12 | "Category"), new NumberAxis("Value"), r);↵ | 12 | "Category"), new NumberAxis("Value"), r);↵ | |
13 | assertEquals(DefaultDrawingSupplier.DEFAULT_PAINT_SEQUENCE[0], ↵ | 13 | assertEquals(DefaultDrawingSupplier.DEFAULT_OUTLINE_PAINT_SEQUENCE[0], ↵ | |
14 | r.lookupSeriesPaint(0));↵ | 14 | r.lookupSeriesOutlinePaint(0));↵ | |
15 | assertNotNull(r.getSeriesPaint(0)); | 15 | assertNotNull(r.getSeriesOutlinePaint(0)); | |
See real code fragment | See real code fragment |
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 declared in the same class |
Number of node comparisons | 41 |
Number of mapped statements | 9 |
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 |
ID | Statement | ID | Statement | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | BarRenderer r = new BarRenderer(); | 1 | BarRenderer r = new BarRenderer(); | ||||||||||||||||||||||
2 | assertEquals(Color.blue, r.getBasePaint()); |
| 5 | assertNull(r.getSeriesOutlinePaint(0)); | |||||||||||||||||||||
3 | r.setAutoPopulateSeriesPaint(false); |
| 3 | r.setAutoPopulateSeriesOutlinePaint(false); | |||||||||||||||||||||
4 | assertEquals(Color.blue, r.lookupSeriesPaint(0)); |
| 4 | assertEquals(Color.gray, r.lookupSeriesOutlinePaint(0)); | |||||||||||||||||||||
5 | assertNull(r.getSeriesPaint(0)); |
| 2 | assertEquals(Color.gray, r.getBaseOutlinePaint()); | |||||||||||||||||||||
6 | r.setAutoPopulateSeriesPaint(true); |
| 6 | r.setAutoPopulateSeriesOutlinePaint(true); | |||||||||||||||||||||
7 | new CategoryPlot(null, new CategoryAxis("Category"), new NumberAxis("Value"), r); | 7 | new CategoryPlot(null, new CategoryAxis("Category"), new NumberAxis("Value"), r); | ||||||||||||||||||||||
8 | assertEquals(DefaultDrawingSupplier.DEFAULT_PAINT_SEQUENCE[0], r.lookupSeriesPaint(0)); |
| 8 | assertEquals(DefaultDrawingSupplier.DEFAULT_OUTLINE_PAINT_SEQUENCE[0], r.lookupSeriesOutlinePaint(0)); | |||||||||||||||||||||
9 | assertNotNull(r.getSeriesPaint(0)); |
| 9 | assertNotNull(r.getSeriesOutlinePaint(0)); |
Row | Violation |
---|---|
1 | Expression assertEquals(Color.blue,r.getBasePaint()) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression assertNull(r.getSeriesOutlinePaint(0)) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression assertEquals(Color.blue,r.getBasePaint()) is a void method call, and thus it cannot be parameterized |
4 | Expression assertNull(r.getSeriesOutlinePaint(0)) is a void method call, and thus it cannot be parameterized |
5 | Expression assertEquals(Color.blue,r.getBasePaint()) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Expression assertNull(r.getSeriesOutlinePaint(0)) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
7 | Expression assertEquals(Color.blue,r.getBasePaint()) is a void method call, and thus it cannot be parameterized |
8 | Expression assertNull(r.getSeriesOutlinePaint(0)) is a void method call, and thus it cannot be parameterized |
9 | Expression r.setAutoPopulateSeriesPaint(false) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
10 | Expression r.setAutoPopulateSeriesOutlinePaint(false) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
11 | Expression r.setAutoPopulateSeriesPaint(false) is a void method call, and thus it cannot be parameterized |
12 | Expression r.setAutoPopulateSeriesOutlinePaint(false) is a void method call, and thus it cannot be parameterized |
13 | Expression r.lookupSeriesPaint(0) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
14 | Expression r.lookupSeriesOutlinePaint(0) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
15 | Expression assertNull(r.getSeriesPaint(0)) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
16 | Expression assertEquals(Color.gray,r.getBaseOutlinePaint()) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
17 | Expression assertNull(r.getSeriesPaint(0)) is a void method call, and thus it cannot be parameterized |
18 | Expression assertEquals(Color.gray,r.getBaseOutlinePaint()) is a void method call, and thus it cannot be parameterized |
19 | Expression assertNull(r.getSeriesPaint(0)) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
20 | Expression assertEquals(Color.gray,r.getBaseOutlinePaint()) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
21 | Expression assertNull(r.getSeriesPaint(0)) is a void method call, and thus it cannot be parameterized |
22 | Expression assertEquals(Color.gray,r.getBaseOutlinePaint()) is a void method call, and thus it cannot be parameterized |
23 | Expression r.setAutoPopulateSeriesPaint(true) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
24 | Expression r.setAutoPopulateSeriesOutlinePaint(true) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
25 | Expression r.setAutoPopulateSeriesPaint(true) is a void method call, and thus it cannot be parameterized |
26 | Expression r.setAutoPopulateSeriesOutlinePaint(true) is a void method call, and thus it cannot be parameterized |
27 | Expression r.lookupSeriesPaint(0) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
28 | Expression r.lookupSeriesOutlinePaint(0) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
29 | Expression r.getSeriesPaint(0) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
30 | Expression r.getSeriesOutlinePaint(0) cannot be parameterized, because it has dependencies to/from statements that will be extracted |