if (excludes != null) {
for (int i = 0; i < excludes.length; i++) {
defaultPatterns.createExclude().setName(excludes[i]);
}
directoryScanner = null;
}
if (excludes != null) {
for (int i = 0; i < excludes.length; i++) {
defaultPatterns.createExclude().setName(excludes[i]);
}
ds = null;
}
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/types/AbstractFileSet.java
|
|
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/types/resources/Files.java
|
Method name: void appendExcludes(String[])
|
|
Method name: void appendExcludes(String[])
|
Number of AST nodes: 4
|
|
Number of AST nodes: 4
|
|
1 | if (excludes != null) {↵ | | 1 | if (excludes != null) {↵
|
2 | for (int i = 0; i < excludes.length; i++) {↵ | | 2 | for (int i = 0; i < excludes.length; i++) {↵
|
3 | defaultPatterns.createExclude().setName(excludes[i]);↵ | | 3 | defaultPatterns.createExclude().setName(excludes[i]);↵
|
4 | }↵ | | 4 | }↵
|
5 | directoryScanner = null;↵ | | 5 | ds = null;↵
|
6 | } | | 6 | }
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.3 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 8 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 4 |
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) | 1.6 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
3 | if (excludes != null) | | 2 | if (excludes != null) |
4 | for (int i = 0; i < excludes.length; i++) | | 3 | for (int i = 0; i < excludes.length; i++) |
5 | defaultPatterns.createExclude().setName(excludes[i]); | | 4 | defaultPatterns.createExclude().setName(excludes[i]); |
6 | | | 5 | |
Precondition Violations (0)
Row |
Violation |