if (dir != null) {
newProject.setBaseDir(dir);
if (savedDir != null) {
// has been set explicitly
newProject.setInheritedProperty(MagicNames.PROJECT_BASEDIR,
dir.getAbsolutePath());
}
} else {
dir = getProject().getBaseDir();
}
if (map != null) {
buf.append(" mapper: ");
buf.append(map.toString());
} else if (mapperElement != null) {
buf.append(" mapper: ");
buf.append(mapperElement.toString());
}
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/Ant.java
|
|
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/types/selectors/DependSelector.java
|
Method name: void execute()
|
|
Method name: String toString()
|
Number of AST nodes: 5
|
|
Number of AST nodes: 6
|
|
1 | if (dir != null) {↵ | | 1 | if (map != null) {↵
|
2 | newProject.setBaseDir(dir);↵ | | 2 | ↵
|
3 | if (savedDir != null) {↵ | | |
|
4 | // has been set explicitly↵ | | |
|
5 | newProject.setInheritedProperty(MagicNames.PROJECT_BASEDIR,↵ | | |
|
6 | dir.getAbsolutePath());↵ | | |
|
7 | }↵ | | |
|
8 | } else {↵ | | |
|
9 | dir = getProject().getBaseDir↵ | | 3 | buf.append(" mapper: ");↵
|
| | | 4 | buf.append(map.toString());↵
|
| | | 5 | } else if (mapperElement != null) {↵
|
| | | 6 | buf.append(" mapper: ");↵
|
10 | ();↵ | | 7 | buf.append(mapperElement.toString());↵
|
11 | } | | 8 | }
|
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.2 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 2 |