if (base != null) {
try {
URL baseURL = new URL(base);
entryCopy = new ResourceLocation();
entryCopy.setBase(baseURL);
} catch (MalformedURLException ex) {
// ignore
}
}
if (base != null) {
try {
URL baseURL = new URL(base);
entryCopy = new ResourceLocation();
entryCopy.setBase(baseURL);
} catch (MalformedURLException ex) {
// ignore
}
}
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/types/XMLCatalog.java
|
|
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/types/XMLCatalog.java
|
Method name: Source resolve(String, String)
|
|
Method name: Source resolve(String, String)
|
Number of AST nodes: 5
|
|
Number of AST nodes: 5
|
|
1 | if (base != null) {↵ | | 1 | if (base != null) {↵
|
2 | try {↵ | | 2 | try {↵
|
3 | URL baseURL = new URL(base);↵ | | 3 | URL baseURL = new URL(base);↵
|
4 | entryCopy = new ResourceLocation();↵ | | 4 | entryCopy = new ResourceLocation();↵
|
5 | entryCopy.setBase(baseURL);↵ | | 5 | entryCopy.setBase(baseURL);↵
|
6 | } catch (MalformedURLException ex) {↵ | | 6 | } catch (MalformedURLException ex) {↵
|
7 | // ignore↵ | | 7 | // ignore↵
|
8 | }↵ | | 8 | }↵
|
9 | } | | 9 | }
|
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 the same java file |
Number of node comparisons | 18 |
-
{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) | 0.9 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
7 | if (base != null) | | 8 | if (base != null) |
8 | | | 9 | |
9 | URL baseURL = new URL(base); | | 10 | URL baseURL = new URL(base); |
10 | entryCopy = new ResourceLocation(); | | 11 | entryCopy = new ResourceLocation(); |
11 | entryCopy.setBase(baseURL); | | 12 | entryCopy.setBase(baseURL); |
Precondition Violations (0)
Row |
Violation |