File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/Property.java | File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/Property.java | |||
Method name: void loadUrl(URL)
|
Method name: void loadFile(File)
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | InputStream is = url.openStream();↵ | 1 | FileInputStream fis = ↵ | |
2 | new FileInputStream(file);↵ | |||
2 | try {↵ | 3 | try {↵ | |
3 | props.load(is);↵ | 4 | props.load(fis);↵ | |
4 | } finally {↵ | 5 | } finally {↵ | |
5 | if (is != null) {↵ | 6 | if (fis != null) {↵ | |
6 | is.close();↵ | 7 | fis.close();↵ | |
7 | }↵ | 8 | }↵ | |
8 | }↵ | 9 | ↵ | |
10 | }↵ | |||
9 | addProperties(props); | 11 | addProperties(props); | |
See real code fragment | See real code fragment |
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.3 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 9 |
Number of mapped statements | 4 |
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.5 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4 | InputStream is = url.openStream(); |
| 5 | FileInputStream fis = new FileInputStream(file); | |||||||||||||||||||
5 | try |
| 6 | try | |||||||||||||||||||
6 | props.load(is); |
| 7 | props.load(fis); | |||||||||||||||||||
7 | addProperties(props); | 8 | addProperties(props); |
Row | Violation |
---|