if (hrefAsFile.exists()) {
try {
link = FILE_UTILS.getFileURL(hrefAsFile)
.toExternalForm();
} catch (MalformedURLException ex) {
// should be impossible
log("Warning: link location was invalid "
+ hrefAsFile, Project.MSG_WARN);
}
}
if (error == null) {
try {
assertEquals(expectedValues[calls++],
event.getProject().getProperty(key));
} catch (AssertionFailedError e) {
error = e;
}
}
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/Javadoc.java
|
|
File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/taskdefs/AntTest.java
|
Method name: void execute()
|
|
Method name: void targetStarted(BuildEvent)
|
Number of AST nodes: 3
|
|
Number of AST nodes: 3
|
|
1 | if (hrefAsFile.exists()) {↵ | | 1 | if (↵
|
2 | ↵ | | 2 | error == null) {↵
|
3 | try {↵ | | 3 | try {↵
|
4 | link = FILE_UTILS.getFileURL(hrefAsFile)↵ | | 4 | ↵
|
5 | .toExternalForm();↵ | | |
|
6 | ↵ | | 5 | assertEquals(expectedValues[calls++],↵
|
| | | 6 | event.getProject().getProperty(key));↵
|
7 | } catch (MalformedURLException ex) {↵ | | 7 | } catch (AssertionFailedError e) {↵
|
8 | // should be impossible↵ | | 8 | ↵
|
9 | log("Warning: link location was invalid "↵ | | |
|
10 | + hrefAsFile, Project.MSG_WARN);↵ | | |
|
11 | ↵ | | 9 | error = e;↵
|
12 | }↵ | | 10 | ↵
|
13 | ↵ | | 11 | }↵
|
14 | } | | 12 | }
|
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 |