File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/AbstractJarSignerTask.java | File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java | |||
Method name: void bindToKeystore(ExecTask)
|
Method name: void execute()
|
|||
Number of AST nodes: 7 | Number of AST nodes: 6 | |||
1 | addValue(cmd, "-keystore");↵ | |||
2 | String loc;↵ | |||
3 | File keystoreFile = getProject().resolveFile(keystore);↵ | |||
4 | if (keystoreFile.exists↵ | 1 | if (splitJunit) {↵ | |
2 | Path path = new Path(getProject());↵ | |||
3 | path.add(antRuntimeClasses);↵ | |||
5 | ()) {↵ | 4 | path.add(getCommandline().getClasspath());↵ | |
6 | loc = keystoreFile.getPath();↵ | 5 | mirrorLoader = new SplitLoader(myLoader, path);↵ | |
7 | } else {↵ | 6 | } else {↵ | |
8 | // must be a URL - just pass as is↵ | 7 | ↵ | |
9 | loc = keystore;↵ | |||
10 | }↵ | |||
11 | addValue(cmd, loc); | 8 | mirrorLoader = myLoader;↵ | |
9 |
| |||
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.1 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 18 |
Number of mapped statements | 1 |
Number of unmapped statements in the first code fragment | 6 |
Number of unmapped statements in the second code fragment | 5 |
Time elapsed for statement mapping (ms) | 12.2 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2 | addValue(cmd, "-keystore"); | | ||||||||||||
3 | String loc; | | ||||||||||||
4 | File keystoreFile = getProject().resolveFile(keystore); | | ||||||||||||
5 | if (keystoreFile.exists()) |
| 3 | if (splitJunit) | ||||||||||
| 4 | Path path = new Path(getProject()); | ||||||||||||
| 5 | path.add(antRuntimeClasses); | ||||||||||||
| 6 | path.add(getCommandline().getClasspath()); | ||||||||||||
6 | loc = keystoreFile.getPath(); |
| | |||||||||||
else | | |||||||||||||
7 | loc = keystore; |
| | |||||||||||
|
| 8 | mirrorLoader = myLoader; | |||||||||||
|
| 7 | mirrorLoader = new SplitLoader(myLoader, path); | |||||||||||
8 | addValue(cmd, loc); | |
Row | Violation |
---|---|
1 | Unmatched statement loc=keystoreFile.getPath(); cannot be moved, because it updates a variable modified in other unmapped statements |
2 | Unmatched statement loc=keystore; cannot be moved, because it updates a variable modified in other unmapped statements |
3 | Unmatched statement mirrorLoader=new SplitLoader(myLoader,path); cannot be moved, because it updates a variable modified in other unmapped statements |
4 | Unmatched statement mirrorLoader=myLoader; cannot be moved, because it updates a variable modified in other unmapped statements |