File path: /jfreechart-1.0.10/tests/org/jfree/chart/plot/junit/CombinedDomainXYPlotTests.java | File path: /jfreechart-1.0.10/tests/org/jfree/chart/plot/junit/CombinedRangeXYPlotTests.java | |||
Method name: void testRemoveSubplot()
|
Method name: void testRemoveSubplot()
|
|||
Number of AST nodes: 8 | Number of AST nodes: 8 | |||
1 | CombinedDomainXYPlot plot = new CombinedDomainXYPlot();↵ | 1 | CombinedRangeXYPlot plot = new CombinedRangeXYPlot();↵ | |
2 | XYPlot plot1 = new XYPlot();↵ | 2 | XYPlot plot1 = new XYPlot();↵ | |
3 | XYPlot plot2 = new XYPlot();↵ | 3 | XYPlot plot2 = new XYPlot();↵ | |
4 | plot.add(plot1);↵ | 4 | plot.add(plot1);↵ | |
5 | plot.add(plot2);↵ | 5 | plot.add(plot2);↵ | |
6 | // remove plot2, but plot1 is removed instead↵ | 6 | // remove plot2, but plot1 is removed instead↵ | |
7 | plot.remove(plot2);↵ | 7 | plot.remove(plot2);↵ | |
8 | List plots = plot.getSubplots();↵ | 8 | List plots = plot.getSubplots();↵ | |
9 | assertTrue(plots.get(0) == plot1); | 9 |
| |
See real code fragment | See real code fragment |
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 in different classes having the same super class |
Number of node comparisons | 23 |
Number of mapped statements | 8 |
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 | CombinedDomainXYPlot plot = new CombinedDomainXYPlot(); |
| 1 | CombinedRangeXYPlot plot = new CombinedRangeXYPlot(); | ||||||||||||||||||
2 | XYPlot plot1 = new XYPlot(); | 2 | XYPlot plot1 = new XYPlot(); | |||||||||||||||||||
3 | XYPlot plot2 = new XYPlot(); | 3 | XYPlot plot2 = new XYPlot(); | |||||||||||||||||||
4 | plot.add(plot1); |
| 4 | plot.add(plot1); | ||||||||||||||||||
5 | plot.add(plot2); |
| 5 | plot.add(plot2); | ||||||||||||||||||
6 | plot.remove(plot2); |
| 6 | plot.remove(plot2); | ||||||||||||||||||
7 | List plots = plot.getSubplots(); |
| 7 | List plots = plot.getSubplots(); | ||||||||||||||||||
8 | assertTrue(plots.get(0) == plot1); | 8 | assertTrue(plots.get(0) == plot1); |
Row | Violation |
---|---|
1 | Expression new CombinedDomainXYPlot() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression new CombinedRangeXYPlot() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression plot cannot be unified with expression plot , because common superclass org.jfree.chart.plot.XYPlot does not declare member(s) public void add(org.jfree.chart.plot.XYPlot) |
4 | Expression plot cannot be unified with expression plot , because common superclass org.jfree.chart.plot.XYPlot does not declare member(s) public void add(org.jfree.chart.plot.XYPlot) |
5 | Expression plot cannot be unified with expression plot , because common superclass org.jfree.chart.plot.XYPlot does not declare member(s) public void remove(org.jfree.chart.plot.XYPlot) |
6 | Expression plot cannot be unified with expression plot , because common superclass org.jfree.chart.plot.XYPlot does not declare member(s) public List#RAW getSubplots() |