String result = null;
if (series < getListCount()) {
List urls = (List) this.urlSeries.get(series);
if (urls != null) {
if (item < urls.size()) {
result = (String) urls.get(item);
}
}
}
return result;
String result = null;
if (series < getListCount()) {
List urls = (List) this.urlSeries.get(series);
if (urls != null) {
if (item < urls.size()) {
result = (String) urls.get(item);
}
}
}
return result;
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: 7
|
|
Number of AST nodes: 7
|
|
1 | String result = null;↵ | | 1 | String result = null;↵
|
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 | if (urls != null) {↵ | | 4 | if (urls != null) {↵
|
5 | if (item < urls.size()) {↵ | | 5 | if (item < urls.size()) {↵
|
6 | result = (String) urls.get(item);↵ | | 6 | result = (String) urls.get(item);↵
|
7 | }↵ | | 7 | }↵
|
8 | }↵ | | 8 | }↵
|
9 | }↵ | | 9 | }↵
|
10 | return result; | | 10 | return result;
|
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 | 13 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 7 |
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.4 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | String result = null; | | 1 | String result = null; |
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); |
7 | return result; | | 7 | return result; |
Precondition Violations (0)
Row |
Violation |