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 filesystemLookup(ResourceLocation)
|
Method name: InputSource urlLookup(ResourceLocation)
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | if (matchingEntry.getBase() != null) {↵ | 1 | if (matchingEntry.getBase() != null) {↵ | |
2 | baseURL = matchingEntry.getBase();↵ | 2 | baseURL = matchingEntry.getBase();↵ | |
3 | } else {↵ | 3 | } else {↵ | |
4 | try {↵ | 4 | try {↵ | |
5 | baseURL = FILE_UTILS.getFileURL(getProject().getBaseDir());↵ | 5 | baseURL = FILE_UTILS.getFileURL(getProject().getBaseDir());↵ | |
6 | } catch (MalformedURLException ex) {↵ | 6 | } catch (MalformedURLException ex) {↵ | |
7 | throw new BuildException("Project basedir cannot be converted to a URL");↵ | 7 | throw new BuildException("Project basedir cannot be converted to a URL");↵ | |
8 | }↵ | 8 | }↵ | |
9 | }↵ | 9 | }↵ | |
10 | InputSource source = null;↵ | 10 | InputSource source = null;↵ | |
11 | URL url = null; | 11 |
| |
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 | 12 |
Number of mapped statements | 6 |
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 | |
---|---|---|---|---|
4 | if (matchingEntry.getBase() != null) | 3 | if (matchingEntry.getBase() != null) | |
5 | baseURL = matchingEntry.getBase(); | 4 | baseURL = matchingEntry.getBase(); | |
6 | try | 5 | try | |
7 | baseURL = FILE_UTILS.getFileURL(getProject().getBaseDir()); | 6 | baseURL = FILE_UTILS.getFileURL(getProject().getBaseDir()); | |
8 | InputSource source = null; | 7 | InputSource source = null; | |
9 | URL url = null; | 8 | URL url = null; |
Row | Violation |
---|---|
1 | Clone fragment #1 returns variables baseURL, url, source , while Clone fragment #2 returns variables baseURL, url, source |