File path: /jfreechart-1.0.10/src/org/jfree/chart/labels/CustomXYToolTipGenerator.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/urls/CustomXYURLGenerator.java | |||
Method name: String getToolTipText(int, int)
|
Method name: String getURL(int, int)
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | if (series < getListCount()) {↵ | 1 | if (series < getListCount()) {↵ | |
2 | List tooltips = (List) this.toolTipSeries.get(series);↵ | 2 | List urls = (List) this.urlSeries.get(series);↵ | |
3 | if (tooltips != null) {↵ | 3 | if (urls != null) {↵ | |
4 | if (item < tooltips.size()) {↵ | 4 | if (item < urls.size()) {↵ | |
5 | result = (String) tooltips.get(item);↵ | 5 | result = (String) urls.get(item);↵ | |
6 | }↵ | 6 | }↵ | |
7 | }↵ | 7 | }↵ | |
8 | } | 8 |
| |
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.2 |
Clones location | Clones are in different classes |
Number of node comparisons | 9 |
Number of mapped statements | 4 |
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) | 0.8 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2 | if (series < getListCount()) | 2 | if (series < getListCount()) | |||||||||||
|
| 3 | List urls = (List)this.urlSeries.get(series); | |||||||||||
3 | List tooltips = (List)this.toolTipSeries.get(series); |
| | |||||||||||
4 | if (tooltips != null) |
| 4 | if (urls != null) | ||||||||||
5 | if (item < tooltips.size()) |
| 5 | if (item < urls.size()) | ||||||||||
6 | result = (String)tooltips.get(item); |
| 6 | result = (String)urls.get(item); |
Row | Violation |
---|---|
1 | Unmatched statement List urls=(List)this.urlSeries.get(series); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
2 | Unmatched statement List tooltips=(List)this.toolTipSeries.get(series); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |