if (originalManifest == null) {
log("Updating jar since the current jar has no manifest",
Project.MSG_VERBOSE);
needsUpdate = true;
} else {
Manifest mf = createManifest();
if (!mf.equals(originalManifest)) {
log("Updating jar since jar manifest has changed",
Project.MSG_VERBOSE);
needsUpdate = true;
}
}
if (!relativePathCalculated) {
if (parent != null) {
traversesSymlinks = parent.isTraverseSymlinks();
relativePath = getRelativePath(parent.getAbsolutePath(),
parent.getRelativePath());
} else {
relativePath = getRelativePath(rootPath, "");
relativePathCalculated = true;
}
}
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/Jar.java
|
|
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/net/FTP.java
|
Method name: ArchiveState getResourcesToAdd(ResourceCollection[], File, boolean)
|
|
Method name: String getRelativePath()
|
Number of AST nodes: 7
|
|
Number of AST nodes: 6
|
|
1 | if (originalManifest == null) {↵ | | 1 | if (↵
|
2 | log("Updating jar since the current jar has no manifest",↵ | | |
|
3 | Project.MSG_VERBOSE↵ | | 2 | !relativePathCalculated) {↵
|
| | | 3 | if (parent != null) {↵
|
4 | );↵ | | 4 | traversesSymlinks = parent.isTraverseSymlinks();↵
|
5 | needsUpdate = true;↵ | | 5 | relativePath = getRelativePath(parent.getAbsolutePath(),↵
|
6 | } else {↵ | | 6 | ↵
|
7 | Manifest mf = createManifest();↵ | | 7 | ↵
|
8 | if (!mf.equals(originalManifest)) {↵ | | |
|
9 | log("Updating jar since jar manifest has changed",↵ | | |
|
10 | Project.MSG_VERBOSE↵ | | 8 | parent.getRelativePath());↵
|
| | | 9 | } else {↵
|
11 | );↵ | | 10 | relativePath = getRelativePath(rootPath, "");↵
|
12 | needsUpdate = true;↵ | | 11 | relativePathCalculated = true;↵
|
13 | }↵ | | 12 | }↵
|
14 | } | | 13 | }
|
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.1 |
Clones location | Clones are in different classes |
Number of node comparisons | 1 |