try {
i = srcR.getInputStream();
expandStream(srcR.getName(), i, dir);
} catch (IOException ioe) {
throw new BuildException("Error while expanding " + srcR.getName(),
ioe, getLocation());
} finally {
FileUtils.close(i);
}
if (fast && couldHoldIncluded(name)) {
try {
file.getClient().changeWorkingDirectory(file.curpwd);
} catch (IOException ioe) {
throw new BuildException("could not change directory to curpwd");
}
scandir(file.getName(),
name + File.separator, fast);
}
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/Untar.java
|
|
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/net/FTP.java
|
Method name: void expandResource(Resource, File)
|
|
Method name: void accountForIncludedDir(String, AntFTPFile, boolean)
|
Number of AST nodes: 3
|
|
Number of AST nodes: 4
|
|
1 | try {↵ | | |
|
2 | i = srcR.getInputStream();↵ | | |
|
3 | expandStream(srcR.getName(), i, dir);↵ | | |
|
| | | 1 | if (fast && couldHoldIncluded(name)) {↵
|
| | | 2 | try {↵
|
| | | 3 | file.getClient().changeWorkingDirectory(file.curpwd);↵
|
4 | } catch (IOException ioe) {↵ | | 4 | } catch (IOException ioe) {↵
|
5 | throw new BuildException("Error while expanding " + srcR.getName(),↵ | | 5 | throw new BuildException("could not change directory to curpwd");↵
|
6 | ↵ | | 6 | }↵
|
7 | ioe, getLocation());↵ | | 7 | ↵
|
8 | } finally {↵ | | |
|
9 | FileUtils.close(i);↵ | | |
|
| | | 8 | scandir(file.getName(),↵
|
| | | 9 | name + File.separator, fast);↵
|
10 | } | | 10 | }
|
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.2 |
Clones location | Clones are in different classes |
Number of node comparisons | 1 |