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: InputSource urlLookup(ResourceLocation)
|
Method name: InputSource filesystemLookup(ResourceLocation)
|
|||
Number of AST nodes: 8 | Number of AST nodes: 8 | |||
1 | URL baseURL = null;↵ | 1 | URL baseURL = null;↵ | |
2 | //↵ | 2 | //↵ | |
3 | // The ResourceLocation may specify a relative url for its↵ | 3 | // The ResourceLocation may specify a relative path for its↵ | |
4 | // location attribute. This is resolved using the appropriate↵ | 4 | // location attribute. This is resolved using the appropriate↵ | |
5 | // base.↵ | 5 | // base.↵ | |
6 | //↵ | 6 | //↵ | |
7 | if (matchingEntry.getBase() != null) {↵ | 7 | if (matchingEntry.getBase() != null) {↵ | |
8 | baseURL = matchingEntry.getBase();↵ | 8 | baseURL = matchingEntry.getBase();↵ | |
9 | } else {↵ | 9 | } else {↵ | |
10 | try {↵ | 10 | try {↵ | |
11 | baseURL = FILE_UTILS.getFileURL(getProject().getBaseDir());↵ | 11 | baseURL = FILE_UTILS.getFileURL(getProject().getBaseDir());↵ | |
12 | } catch (MalformedURLException ex) {↵ | 12 | } catch (MalformedURLException ex) {↵ | |
13 | throw new BuildException("Project basedir cannot be converted to a URL");↵ | 13 | throw new BuildException("Project basedir cannot be converted to a URL");↵ | |
14 | }↵ | 14 | }↵ | |
15 | }↵ | 15 | }↵ | |
16 | InputSource source = null;↵ | 16 | InputSource source = null;↵ | |
17 | URL url = null;↵ | 17 | URL url = null;↵ | |
18 | try {↵ | 18 | try {↵ | |
19 | url = new URL(baseURL, uri); | 19 |
| |
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.3 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 17 |
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.8 |
Clone type | Type 1 |
ID | Statement | ID | Statement | |
---|---|---|---|---|
2 | URL baseURL = null; | 3 | URL baseURL = null; | |
3 | if (matchingEntry.getBase() != null) | 4 | if (matchingEntry.getBase() != null) | |
4 | baseURL = matchingEntry.getBase(); | 5 | baseURL = matchingEntry.getBase(); | |
5 | try | 6 | try | |
6 | baseURL = FILE_UTILS.getFileURL(getProject().getBaseDir()); | 7 | baseURL = FILE_UTILS.getFileURL(getProject().getBaseDir()); | |
7 | InputSource source = null; | 8 | InputSource source = null; | |
8 | URL url = null; | 9 | URL url = null; |
Row | Violation |
---|---|
1 | Clone fragment #1 returns variables baseURL, url, source , while Clone fragment #2 returns variables baseURL, url, source |