if (series < getListCount()) {
List urls = (List) this.urlSeries.get(series);
if (urls != null) {
if (item < urls.size()) {
result = (String) urls.get(item);
}
}
}
if (series < getListCount()) {
List urls = (List) this.urlSeries.get(series);
if (urls != null) {
if (item < urls.size()) {
result = (String) urls.get(item);
}
}
}
Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/chart/urls/CustomCategoryURLGenerator.java
|
|
File path: /jfreechart-1.0.10/src/org/jfree/chart/urls/CustomXYURLGenerator.java
|
Method name: String getURL(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 urls = (List) this.urlSeries.get(series);↵ | | 2 | List urls = (List) this.urlSeries.get(series);↵
|
3 | if (urls != null) {↵ | | 3 | if (urls != null) {↵
|
4 | if (item < urls.size()) {↵ | | 4 | if (item < urls.size()) {↵
|
5 | result = (String) urls.get(item);↵ | | 5 | result = (String) urls.get(item);↵
|
6 | }↵ | | 6 | }↵
|
7 | }↵ | | 7 | }↵
|
8 | } | | 8 | }
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.2 |
Clones location | Clones are in different classes |
Number of node comparisons | 9 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 5 |
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) | 1.2 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
2 | if (series < getListCount()) | | 2 | if (series < getListCount()) |
3 | List urls = (List)this.urlSeries.get(series); | | 3 | List urls = (List)this.urlSeries.get(series); |
4 | | | 4 | |
5 | | | 5 | |
6 | result = (String)urls.get(item); | | 6 | result = (String)urls.get(item); |
Precondition Violations (0)
Row |
Violation |