File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/ejb/WeblogicDeploymentTool.java | File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/ejb/WebsphereDeploymentTool.java | |||
Method name: boolean isRebuildRequired(File, File)
|
Method name: boolean isRebuildRequired(File, File)
|
|||
Number of AST nodes: 8 | Number of AST nodes: 8 | |||
1 | String classname↵ | 1 | String classname↵ | |
2 | = genericEntry.getName().replace(File.separatorChar, '.');↵ | 2 | = genericEntry.getName().replace(File.separatorChar, '.');↵ | |
3 | classname = classname.substring(0, classname.lastIndexOf(".class"));↵ | 3 | classname = classname.substring(0, classname.lastIndexOf(".class"));↵ | |
4 | Class genclass = genericLoader.loadClass(classname);↵ | 4 | Class genclass = genericLoader.loadClass(classname);↵ | |
5 | if (genclass.isInterface()) {↵ | 5 | if (genclass.isInterface()) {↵ | |
6 | //Interface changed rebuild jar.↵ | 6 | //Interface changed rebuild jar.↵ | |
7 | log("Interface " + genclass.getName()↵ | 7 | log("Interface " + genclass.getName()↵ | |
8 | + " has changed", Project.MSG_VERBOSE);↵ | 8 | + " has changed", Project.MSG_VERBOSE);↵ | |
9 | rebuild = true;↵ | 9 | rebuild = true;↵ | |
10 | break;↵ | 10 | break;↵ | |
11 | } else {↵ | 11 | } else {↵ | |
12 | //Object class Changed update it.↵ | 12 | //Object class Changed update it.↵ | |
13 | replaceEntries.put(filepath, genericEntry);↵ | 13 | replaceEntries.put(filepath, genericEntry);↵ | |
14 | } | 14 |
| |
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.3 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 36 |
Number of mapped statements | 8 |
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.3 |
Clone type | Type 1 |
ID | Statement | ID | Statement | |||||||
---|---|---|---|---|---|---|---|---|---|---|
29 | String classname = genericEntry.getName().replace(File.separatorChar, '.'); | 28 | String classname = genericEntry.getName().replace(File.separatorChar, '.'); | |||||||
30 | classname = classname.substring(0, classname.lastIndexOf(".class")); | 29 | classname = classname.substring(0, classname.lastIndexOf(".class")); | |||||||
31 | Class genclass = genericLoader.loadClass(classname); | 30 | Class genclass = genericLoader.loadClass(classname); | |||||||
32 | if (genclass.isInterface()) | 31 | if (genclass.isInterface()) | |||||||
33 | log("Interface " + genclass.getName() + " has changed", Project.MSG_VERBOSE); | 32 | log("Interface " + genclass.getName() + " has changed", Project.MSG_VERBOSE); | |||||||
34 | rebuild = true; | 33 | rebuild = true; | |||||||
35 | break; |
| 34 | break; | ||||||
else | else | |||||||||
36 | replaceEntries.put(filepath, genericEntry); | 35 | replaceEntries.put(filepath, genericEntry); |
Row | Violation |
---|---|
1 | Statement break; without innermost loop |
2 | Statement break; without innermost loop |