Commandline commandLine = new Commandline();
Project aProj = getProject();
int result = 0;
// Check for required attributes
if (getTypeName() == null) {
throw new BuildException("Required attribute TypeName not specified");
}
Commandline commandLine = new Commandline();
Project aProj = getProject();
int result = 0;
// Check for required attributes
if (getTypeName() == null) {
throw new BuildException("Required attribute TypeName not specified");
}
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/clearcase/CCMkattr.java
|
|
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/clearcase/CCMklabel.java
|
Method name: void execute()
|
|
Method name: void execute()
|
Number of AST nodes: 5
|
|
Number of AST nodes: 5
|
|
1 | Commandline commandLine = new Commandline();↵ | | 1 | Commandline commandLine = new Commandline();↵
|
2 | Project aProj = getProject();↵ | | 2 | Project aProj = getProject();↵
|
3 | int result = 0;↵ | | 3 | int result = 0;↵
|
|
4 | // Check for required attributes↵ | | 4 | // Check for required attributes↵
|
5 | if (getTypeName() == null) {↵ | | 5 | if (getTypeName() == null) {↵
|
6 | throw new BuildException("Required attribute TypeName not specified");↵ | | 6 | throw new BuildException("Required attribute TypeName not specified");↵
|
7 | } | | 7 | }
|
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.2 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 9 |
-
{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) | 13.3 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | Commandline commandLine = new Commandline(); | | 1 | Commandline commandLine = new Commandline(); |
2 | Project aProj = getProject(); | | 2 | Project aProj = getProject(); |
3 | int result = 0; | | 3 | int result = 0; |
4 | if (getTypeName() == null) | | 4 | if (getTypeName() == null) |
5 | throw new BuildException("Required attribute TypeName not specified"); | | 5 | throw new BuildException("Required attribute TypeName not specified"); |
Precondition Violations (1)
Row |
Violation |
1 | Clone fragment #1 returns variables aProj, commandLine, result , while Clone fragment #2 returns variables aProj, commandLine, result |