String simplename = classname.substring(classname.lastIndexOf('.') + 1);
for (int i = 0; i < splitClasses.length; i++) {
if (simplename.equals(splitClasses[i])
|| simplename.startsWith(splitClasses[i] + '$')) {
return true;
}
}
return false;
for (int i = 0; i < includes.length; i++) {
if (matchPatternStart(includes[i], name, isCaseSensitive())
&& isMorePowerfulThanExcludes(name, includes[i])
&& isDeeper(includes[i], name)) {
return true;
}
}
return false;
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java
|
|
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/DirectoryScanner.java
|
Method name: boolean isSplit(String)
|
|
Method name: boolean couldHoldIncluded(String)
|
Number of AST nodes: 5
|
|
Number of AST nodes: 4
|
|
1 | String simplename = classname.substring(classname.lastIndexOf('.') + 1);↵ | | |
|
2 | for (int i = 0; i < splitClasses.length; i++) {↵ | | |
|
3 | if (simplename.equals(splitClasses[i])↵ | | |
|
4 | || simplename.startsWith(splitClasses[i] + '$'↵ | | 1 | for (int i = 0; i < includes.length; i++) {↵
|
| | | 2 | if (matchPatternStart(includes[i], name, isCaseSensitive())↵
|
| | | 3 | && isMorePowerfulThanExcludes(name, includes[i])↵
|
5 | )) {↵ | | 4 | && isDeeper(includes[i], name)) {↵
|
6 | return true;↵ | | 5 | return true;↵
|
7 | }↵ | | 6 | }↵
|
8 | }↵ | | 7 | ↵
|
9 | ↵ | | 8 | }↵
|
10 | return false; | | 9 | return false;
|
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.3 |
Clones location | Clones are in different classes |
Number of node comparisons | 1 |