if (e == null) {
setExists(false);
return;
}
setName(e.getName());
setExists(true);
if (e == null) {
setExists(false);
return;
}
setName(e.getName());
setExists(true);
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/types/resources/TarResource.java
|
|
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/types/resources/ZipResource.java
|
Method name: void setEntry(TarEntry)
|
|
Method name: void setEntry(ZipEntry)
|
Number of AST nodes: 5
|
|
Number of AST nodes: 5
|
|
1 | if (e == null) {↵ | | 1 | if (e == null) {↵
|
2 | setExists(false);↵ | | 2 | setExists(false);↵
|
3 | return;↵ | | 3 | return;↵
|
4 | }↵ | | 4 | }↵
|
5 | setName(e.getName());↵ | | 5 | setName(e.getName());↵
|
6 | setExists(true); | | 6 | setExists(true);
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 1 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.1 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 13 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 5 |
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) | 0.7 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | if (e == null) | | 1 | if (e == null) |
2 | | | 2 | |
3 | | | 3 | |
4 | setName(e.getName()); | | 4 | setName(e.getName()); |
5 | setExists(true); | | 5 | setExists(true); |
Precondition Violations (4)
Row |
Violation |
1 | Type org.apache.tools.tar.TarEntry of variable e does not match with type org.apache.tools.zip.ZipEntry of variable e |
2 | Conditional return; |
3 | Conditional return; |
4 | Type org.apache.tools.tar.TarEntry of variable e does not match with type org.apache.tools.zip.ZipEntry of variable e |