if (nestedSequential == null) {
throw new BuildException("Missing sequential element");
}
if (name == null) {
throw new BuildException("Name not specified");
}
name = ProjectHelper.genComponentName(getURI(), name);
if (nestedTask == null) {
throw new BuildException("Missing nested element");
}
if (name == null) {
throw new BuildException("Name not specified");
}
name = ProjectHelper.genComponentName(getURI(), name);
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/MacroDef.java
|
|
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/PreSetDef.java
|
Method name: void execute()
|
|
Method name: void execute()
|
Number of AST nodes: 5
|
|
Number of AST nodes: 5
|
|
1 | if (nestedSequential == null) {↵ | | 1 | if (nestedTask == null) {↵
|
2 | throw new BuildException("Missing sequential element");↵ | | 2 | throw new BuildException("Missing nested element");↵
|
3 | }↵ | | 3 | }↵
|
4 | if (name == null) {↵ | | 4 | if (name == null) {↵
|
5 | throw new BuildException("Name not specified");↵ | | 5 | throw new BuildException("Name not specified");↵
|
6 | }↵ | | 6 | }↵
|
|
7 | name = ProjectHelper.genComponentName(getURI(), name); | | 7 | name = ProjectHelper.genComponentName(getURI(), name);
|
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.4 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 14 |
-
{Non-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) | 210.9 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | if (nestedSequential == null) | | 1 | if (nestedTask == null) |
2 | throw new BuildException("Missing sequential element"); | | 2 | throw new BuildException("Missing nested element"); |
3 | if (name == null) | | 3 | if (name == null) |
4 | throw new BuildException("Name not specified"); | | 4 | throw new BuildException("Name not specified"); |
5 | name = ProjectHelper.genComponentName(getURI(), name); | | 5 | name = ProjectHelper.genComponentName(getURI(), name); |
Precondition Violations (1)
Row |
Violation |
1 | Type org.apache.tools.ant.taskdefs.MacroDef.NestedSequential of variable nestedSequential does not match with type org.apache.tools.ant.UnknownElement of variable nestedTask |