try {
listeners.addElement(args[i + 1]);
i++;
} catch (ArrayIndexOutOfBoundsException aioobe) {
String msg = "You must specify a classname when "
+ "using the -listener argument";
throw new BuildException(msg);
}
try {
propertyFiles.addElement(args[i + 1]);
i++;
} catch (ArrayIndexOutOfBoundsException aioobe) {
String msg = "You must specify a property filename when "
+ "using the -propertyfile argument";
throw new BuildException(msg);
}
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/Main.java
|
|
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/Main.java
|
Method name: void processArgs(String[])
|
|
Method name: void processArgs(String[])
|
Number of AST nodes: 3
|
|
Number of AST nodes: 3
|
|
1 | try {↵ | | 1 | try {↵
|
2 | listeners.addElement(args[i + 1]);↵ | | 2 | propertyFiles.addElement(args[i + 1]);↵
|
3 | i++;↵ | | 3 | i++;↵
|
4 | } catch (ArrayIndexOutOfBoundsException aioobe) {↵ | | 4 | } catch (ArrayIndexOutOfBoundsException aioobe) {↵
|
5 | String msg = "You must specify a classname when "↵ | | 5 | String msg = "You must specify a property filename when "↵
|
6 | + "using the -listener argument";↵ | | 6 | + "using the -propertyfile argument";↵
|
7 | throw new BuildException(msg);↵ | | 7 | throw new BuildException(msg);↵
|
8 | } | | 8 | }
|
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.4 |
Clones location | Clones are in the same method |
Number of node comparisons | 11 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 3 |
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) | 3.8 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
43 | try | | 76 | try |
44 | listeners.addElement(args[i + 1]); | | 77 | propertyFiles.addElement(args[i + 1]); |
45 | | | 78 | |
Precondition Violations (0)
Row |
Violation |