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: 4 | Number of AST nodes: 4 | |||
1 | if (loggerClassname != null) {↵ | 1 | if (inputHandlerClassname != null) {↵ | |
2 | throw new BuildException("Only one logger class may "↵ | 2 | throw new BuildException("Only one input handler class may "↵ | |
3 | + " be specified.");↵ | 3 | + "be specified.");↵ | |
4 | }↵ | 4 | }↵ | |
5 | try {↵ | 5 | try {↵ | |
6 | loggerClassname = args[++i];↵ | 6 | inputHandlerClassname = args[++i];↵ | |
7 | } catch (ArrayIndexOutOfBoundsException aioobe) {↵ | 7 | } catch (ArrayIndexOutOfBoundsException aioobe) {↵ | |
8 | throw new BuildException("You must specify a classname when"↵ | 8 | throw new BuildException("You must specify a classname when"↵ | |
9 | + " using the -logger↵ | 9 | + " using the -inputhandler"↵ | |
10 | argument");↵ | 10 | + " argument");↵ | |
11 | } | 11 |
| |
See real code fragment | See real code fragment |
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 the same method |
Number of node comparisons | 15 |
Number of mapped statements | 4 |
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) | 1.5 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
58 | if (loggerClassname != null) |
| 63 | if (inputHandlerClassname != null) | |||||||||||||
59 | throw new BuildException("Only one logger class may " + " be specified."); |
| 64 | throw new BuildException("Only one input handler class may " + "be specified."); | |||||||||||||
60 | try |
| 65 | try | |||||||||||||
61 | loggerClassname = args[++i]; |
| 66 | inputHandlerClassname = args[++i]; |
Row | Violation |
---|---|
1 | Expression loggerClassname cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression inputHandlerClassname cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression loggerClassname is a field being modified, and thus it cannot be parameterized |
4 | Expression inputHandlerClassname is a field being modified, and thus it cannot be parameterized |