FileInputStream fis = new FileInputStream(file);
try {
props.load(fis);
} finally {
if (fis != null) {
fis.close();
}
}
addProperties(props);
InputStream rIn = resource.getInputStream();
try {
zipFile(rIn, zOut);
} finally {
rIn.close();
}
Clone fragments detected by clone detection tool
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/Pack.java
|
Method name: void loadFile(File)
|
|
Method name: void zipResource(Resource, OutputStream)
|
Number of AST nodes: 4
|
|
Number of AST nodes: 3
|
|
1 | FileInputStream fis = new FileInputStream(file);↵ | | 1 | InputStream ↵
|
2 | try {↵ | | |
|
3 | props.load(fis);↵ | | |
|
4 | ↵ | | 2 | rIn = resource.getInputStream();↵
|
| | | 3 | try {↵
|
| | | 4 | zipFile(rIn, zOut);↵
|
5 | } finally {↵ | | 5 | } finally {↵
|
6 | if (fis != null) {↵ | | 6 | ↵
|
7 | fis.close();↵ | | 7 | rIn.close();↵
|
8 | }↵ | | 8 | ↵
|
9 | }↵ | | |
|
10 | addProperties(props); | | 9 | }
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 0 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.0 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 1 |