if (jarFile.equals(destFile)) {
if (lazy) {
//we check the presence of signatures on lazy signing
return isSigned(jarFile);
}
//unsigned or non-lazy self signings are always false
return false;
}
if (null != userProperties.get(name)) {
if (verbose) {
project.log("Override ignored for user property \"" + name
+ "\"", Project.MSG_VERBOSE);
}
return false;
}
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/SignJar.java
|
|
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/PropertyHelper.java
|
Method name: boolean isUpToDate(File, File)
|
|
Method name: boolean setProperty(String, String, Object, boolean)
|
Number of AST nodes: 4
|
|
Number of AST nodes: 4
|
|
1 | if (jarFile.equals(destFile)) {↵ | | 1 | if (null != userProperties.get(name)) {↵
|
2 | if (lazy) {↵ | | 2 | if (verbose) {↵
|
3 | //we check the presence of signatures on lazy signing↵ | | 3 | ↵
|
4 | return isSigned(jarFile);↵ | | 4 | project.log("Override ignored for user property \"" + name↵
|
5 | }↵ | | 5 | ↵
|
6 | //unsigned or non-lazy self signings are always false↵ | | 6 | + "\"", Project.MSG_VERBOSE);↵
|
| | | 7 | }↵
|
7 | return false;↵ | | 8 | return false;↵
|
8 | } | | 9 | }
|
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 |
Number of node comparisons | 5 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 1 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 0.3 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
7 | if (lazy) | | 2 | if (verbose) |
| | | 3 | project.log("Override ignored for user property \"" + name + "\"", Project.MSG_VERBOSE); |
8 | return isSigned(jarFile); | | | |
Precondition Violations (1)
Row |
Violation |
1 | Unmatched return isSigned(jarFile); |