if (includes == null) {
// No includes supplied, so set it to 'matches all'
includes = new String[1];
includes[0] = "**";
}
if (excludes == null) {
excludes = new String[0];
}
if (includes == null) {
// No includes supplied, so set it to 'matches all'
includes = new String[1];
includes[0] = "**";
}
if (excludes == null) {
excludes = new String[0];
}
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/net/FTP.java
|
|
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/types/ArchiveScanner.java
|
Method name: void scan()
|
|
Method name: void init()
|
Number of AST nodes: 5
|
|
Number of AST nodes: 5
|
|
1 | if (includes == null) {↵ | | 1 | if (includes == null) {↵
|
2 | // No includes supplied, so set it to 'matches all'↵ | | 2 | // No includes supplied, so set it to 'matches all'↵
|
3 | includes = new String[1];↵ | | 3 | includes = new String[1];↵
|
4 | includes[0] = "**";↵ | | 4 | includes[0] = "**";↵
|
5 | }↵ | | 5 | ↵
|
6 | ↵ | | 6 | }↵
|
7 | if (excludes == null) {↵ | | 7 | if (excludes == null) {↵
|
8 | excludes = new String[0];↵ | | 8 | excludes = new String[0];↵
|
9 | } | | 9 | }
|
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 | 20 |
-
{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) | 19.3 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | if (includes == null) | | 1 | if (includes == null) |
2 | includes = new String[1]; | | 2 | includes = new String[1]; |
3 | | | 3 | |
4 | if (excludes == null) | | 4 | if (excludes == null) |
5 | excludes = new String[0]; | | 5 | excludes = new String[0]; |
Precondition Violations (0)
Row |
Violation |