File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/category/AbstractCategoryItemRenderer.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/xy/AbstractXYItemRenderer.java | |||
Method name: CategoryURLGenerator getSeriesItemURLGenerator(int)
|
Method name: XYItemLabelGenerator getItemLabelGenerator(int, int)
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | if (this.itemURLGenerator != null) {↵ | 1 | if (this.itemLabelGenerator != null) {↵ | |
2 | return this.itemURLGenerator;↵ | 2 | return this.itemLabelGenerator;↵ | |
3 | }↵ | 3 | }↵ | |
4 | // otherwise look up the generator table↵ | 4 | // otherwise look up the generator table↵ | |
5 | CategoryURLGenerator generator↵ | 5 | XYItemLabelGenerator generator↵ | |
6 | = (CategoryURLGenerator) this.itemURLGeneratorList.get(series);↵ | 6 | = (XYItemLabelGenerator) this.itemLabelGeneratorList.get(series);↵ | |
7 | if (generator == null) {↵ | 7 | if (generator == null) {↵ | |
8 | generator = this.baseItemURLGenerator;↵ | 8 | generator = this.baseItemLabelGenerator;↵ | |
9 | }↵ | 9 | }↵ | |
10 | return generator; | 10 |
| |
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.5 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 14 |
Number of mapped statements | 2 |
Number of unmapped statements in the first code fragment | 4 |
Number of unmapped statements in the second code fragment | 4 |
Time elapsed for statement mapping (ms) | 17.3 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (this.itemURLGenerator != null) |
| 1 | if (this.itemLabelGenerator != null) | ||||||||||||||
|
| 2 | return this.itemLabelGenerator; | |||||||||||||||
2 | return this.itemURLGenerator; |
| | |||||||||||||||
| 3 | XYItemLabelGenerator generator = (XYItemLabelGenerator)this.itemLabelGeneratorList.get(series); | ||||||||||||||||
3 | CategoryURLGenerator generator = (CategoryURLGenerator)this.itemURLGeneratorList.get(series); | | ||||||||||||||||
4 | if (generator == null) |
| 4 | if (generator == null) | ||||||||||||||
|
| 5 | generator = this.baseItemLabelGenerator; | |||||||||||||||
5 | generator = this.baseItemURLGenerator; |
| | |||||||||||||||
|
| 6 | return generator; | |||||||||||||||
6 | return generator; |
| |
Row | Violation |
---|---|
1 | Type org.jfree.chart.urls.CategoryURLGenerator of variable this.itemURLGenerator does not match with type org.jfree.chart.labels.XYItemLabelGenerator of variable this.itemLabelGenerator |
2 | Unmatched statement return this.itemLabelGenerator; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
3 | Unmatched return this.itemLabelGenerator; |
4 | Unmatched statement return this.itemURLGenerator; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
5 | Unmatched return this.itemURLGenerator; |
6 | Type org.jfree.chart.urls.CategoryURLGenerator of variable generator does not match with type org.jfree.chart.labels.XYItemLabelGenerator of variable generator |
7 | Unmatched statement generator=this.baseItemLabelGenerator; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
8 | Unmatched statement generator=this.baseItemURLGenerator; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
9 | Unmatched return generator; |
10 | Unmatched return generator; |
11 | The refactoring of the clones is infeasible, because the number of macthed statements is equal to zero |