File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/ejb/JbossDeploymentTool.java | File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/ejb/JbossDeploymentTool.java | |||
Method name: void addVendorFiles(Hashtable, String)
|
Method name: void addVendorFiles(Hashtable, String)
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | File jbossDD↵ | 1 | File jbossCMPD↵ | |
2 | = new File(getConfig().descriptorDir, ddPrefix + JBOSS_DD);↵ | 2 | = new File(getConfig().descriptorDir, ddPrefix + descriptorFileName);↵ | |
3 | if (jbossDD.exists()) {↵ | 3 | if (jbossCMPD.exists()) {↵ | |
4 | ejbFiles.put(META_DIR + JBOSS_DD, jbossDD);↵ | 4 | ejbFiles.put(META_DIR + descriptorFileName, jbossCMPD);↵ | |
5 | } else {↵ | 5 | } else {↵ | |
6 | log("Unable to locate jboss deployment descriptor. "↵ | 6 | log("Unable to locate jboss cmp descriptor. "↵ | |
7 | + "It was expected to be in "↵ | 7 | + "It was expected to be in "↵ | |
8 | + jbossDD.getPath(),↵ | 8 | + jbossCMPD.getPath(),↵ | |
9 | Project.MSG_WARN);↵ | 9 | Project.MSG_VERBOSE);↵ | |
10 | return;↵ | 10 | return;↵ | |
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.2 |
Clones location | Clones are in the same method |
Number of node comparisons | 17 |
Number of mapped statements | 5 |
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) | 23.7 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | File jbossDD = new File(getConfig().descriptorDir, ddPrefix + JBOSS_DD); |
| 9 | File jbossCMPD = new File(getConfig().descriptorDir, ddPrefix + descriptorFileName); | ||||||||||||||||
2 | if (jbossDD.exists()) |
| 10 | if (jbossCMPD.exists()) | ||||||||||||||||
3 | ejbFiles.put(META_DIR + JBOSS_DD, jbossDD); |
| 11 | ejbFiles.put(META_DIR + descriptorFileName, jbossCMPD); | ||||||||||||||||
else | else | |||||||||||||||||||
4 | log("Unable to locate jboss deployment descriptor. " + "It was expected to be in " + jbossDD.getPath(), Project.MSG_WARN); |
| 12 | log("Unable to locate jboss cmp descriptor. " + "It was expected to be in " + jbossCMPD.getPath(), Project.MSG_VERBOSE); | ||||||||||||||||
5 | return; |
| 13 | return; |
Row | Violation |
---|---|
1 | Conditional return; |
2 | Conditional return; |