File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/MeterPlot.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/MultiplePiePlot.java | |||
Method name: void setRange(Range)
|
Method name: void setPieChart(JFreeChart)
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | if (range == null) {↵ | 1 | if (pieChart == null) {↵ | |
2 | throw new IllegalArgumentException("Null 'range' argument.");↵ | 2 | throw new IllegalArgumentException("Null 'pieChart' argument.");↵ | |
3 | }↵ | 3 | }↵ | |
4 | if (!(range.getLength() > 0.0)) {↵ | 4 | if (!(pieChart.getPlot() instanceof PiePlot)) {↵ | |
5 | throw new IllegalArgumentException(↵ | 5 | throw new IllegalArgumentException("The 'pieChart' argument must "↵ | |
6 | "Range length must be positive.");↵ | 6 | + "be a chart based on a PiePlot.");↵ | |
7 | }↵ | 7 | }↵ | |
8 | this.range = range;↵ | 8 | this.pieChart = pieChart;↵ | |
9 | fireChangeEvent(); | 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.4 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 14 |
Number of mapped statements | 5 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 53.8 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (range == null) |
| 1 | if (pieChart == null) | ||||||||||||||
2 | throw new IllegalArgumentException("Null 'range' argument."); |
| 2 | throw new IllegalArgumentException("Null 'pieChart' argument."); | ||||||||||||||
3 | if (!(range.getLength() > 0.0)) |
| 3 | if (!(pieChart.getPlot() instanceof PiePlot)) | ||||||||||||||
4 | throw new IllegalArgumentException("Range length must be positive."); |
| 4 | throw new IllegalArgumentException("The 'pieChart' argument must " + "be a chart based on a PiePlot."); | ||||||||||||||
|
| 5 | this.pieChart = pieChart; | |||||||||||||||
5 | this.range = range; |
| | |||||||||||||||
6 | fireChangeEvent(); | 6 | fireChangeEvent(); |
Row | Violation |
---|---|
1 | Type org.jfree.data.Range of variable range does not match with type org.jfree.chart.JFreeChart of variable pieChart |
2 | Expression range.getLength() > 0.0 cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression pieChart.getPlot() instanceof PiePlot cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Unmatched statement this.pieChart=pieChart; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
5 | Unmatched statement this.range=range; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |