File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/javacc/JJDoc.java | File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/javacc/JavaCC.java | |||
Method name: void execute()
|
Method name: void execute()
|
|||
Number of AST nodes: 7 | Number of AST nodes: 7 | |||
1 | Enumeration iter = optionalAttrs.keys();↵ | 1 | Enumeration iter = optionalAttrs.keys();↵ | |
2 | while (iter.hasMoreElements()) {↵ | 2 | while (iter.hasMoreElements()) {↵ | |
3 | String name = (String) iter.nextElement();↵ | 3 | String name = (String) iter.nextElement();↵ | |
4 | Object value = optionalAttrs.get(name);↵ | 4 | Object value = optionalAttrs.get(name);↵ | |
5 | cmdl.createArgument()↵ | 5 | cmdl.createArgument()↵ | |
6 | .setValue("-" + name + ":" + value.toString());↵ | 6 | .setValue("-" + name + ":" + value.toString());↵ | |
7 | }↵ | 7 | }↵ | |
8 | // check the target is a file↵ | |||
8 | if (targetFile == null || !targetFile.isFile()) {↵ | 9 | if (targetFile == null || !targetFile.isFile()) {↵ | |
9 | throw new BuildException("Invalid target: " + targetFile);↵ | 10 | throw new BuildException("Invalid target: " + targetFile);↵ | |
10 | } | 11 |
| |
See real code fragment | See real code fragment |
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.7 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 23 |
Number of mapped statements | 7 |
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) | 4.9 |
Clone type | Type 1 |
ID | Statement | ID | Statement | |
---|---|---|---|---|
1 | Enumeration iter = optionalAttrs.keys(); | 1 | Enumeration iter = optionalAttrs.keys(); | |
2 | while (iter.hasMoreElements()) | 2 | while (iter.hasMoreElements()) | |
3 | String name = (String)iter.nextElement(); | 3 | String name = (String)iter.nextElement(); | |
4 | Object value = optionalAttrs.get(name); | 4 | Object value = optionalAttrs.get(name); | |
5 | cmdl.createArgument().setValue("-" + name + ":" + value.toString()); | 5 | cmdl.createArgument().setValue("-" + name + ":" + value.toString()); | |
6 | if (targetFile == null || !targetFile.isFile()) | 6 | if (targetFile == null || !targetFile.isFile()) | |
7 | throw new BuildException("Invalid target: " + targetFile); | 7 | throw new BuildException("Invalid target: " + targetFile); |
Row | Violation |
---|