File path: /jfreechart-1.0.10/tests/org/jfree/chart/junit/PieChart3DTests.java | File path: /jfreechart-1.0.10/tests/org/jfree/chart/junit/PieChartTests.java | |||
Method name: void testReplaceDatasetOnPieChart()
|
Method name: void testReplaceDatasetOnPieChart()
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | LocalListener l = new LocalListener();↵ | 1 | LocalListener l = new LocalListener();↵ | |
2 | this.pieChart.addChangeListener(l);↵ | 2 | this.pieChart.addChangeListener(l);↵ | |
3 | PiePlot plot = (PiePlot) this.pieChart.getPlot();↵ | 3 | PiePlot plot = (PiePlot) this.pieChart.getPlot();↵ | |
4 | plot.setDataset(null);↵ | 4 | plot.setDataset(null);↵ | |
5 | assertEquals(true, l.flag);↵ | 5 | assertEquals(true, l.flag);↵ | |
6 | assertNull(plot.getDataset()); | 6 |
| |
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 | 16 |
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 |
ID | Statement | ID | Statement | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | LocalListener l = new LocalListener(); |
| 1 | LocalListener l = new LocalListener(); | ||||||||||||||||
2 | this.pieChart.addChangeListener(l); |
| 2 | this.pieChart.addChangeListener(l); | ||||||||||||||||
3 | PiePlot plot = (PiePlot)this.pieChart.getPlot(); | 3 | PiePlot plot = (PiePlot)this.pieChart.getPlot(); | |||||||||||||||||
4 | plot.setDataset(null); | 4 | plot.setDataset(null); | |||||||||||||||||
5 | assertEquals(true, l.flag); |
| 5 | assertEquals(true, l.flag); | ||||||||||||||||
6 | assertNull(plot.getDataset()); | 6 | assertNull(plot.getDataset()); |
Row | Violation |
---|---|
1 | Expression l.flag cannot be unified with expression l.flag , because common superclass org.jfree.chart.event.ChartChangeListener does not declare member(s) private boolean flag |