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/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 weblogicDD↵ | 1 | File jbossCMPD↵ | |
2 | = new File(getConfig().descriptorDir, ddPrefix + WL_DD);↵ | 2 | = new File(getConfig().descriptorDir, ddPrefix + descriptorFileName);↵ | |
3 | if (weblogicDD.exists()) {↵ | 3 | if (jbossCMPD.exists()) {↵ | |
4 | ejbFiles.put(META_DIR + WL_DD,↵ | 4 | ejbFiles.put(META_DIR + ↵ | |
5 | weblogicDD);↵ | 5 | descriptorFileName, jbossCMPD);↵ | |
6 | } else {↵ | 6 | } else {↵ | |
7 | log("Unable to locate weblogic deployment descriptor. "↵ | 7 | log("Unable to locate jboss cmp descriptor. "↵ | |
8 | + "It was expected to be in "↵ | 8 | + "It was expected to be in "↵ | |
9 | + weblogicDD.getPath(), Project.MSG_WARN);↵ | 9 | + jbossCMPD.getPath(), 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 different classes having the same super class |
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) | 25.2 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | File weblogicDD = new File(getConfig().descriptorDir, ddPrefix + WL_DD); |
| 9 | File jbossCMPD = new File(getConfig().descriptorDir, ddPrefix + descriptorFileName); | ||||||||||||||||
2 | if (weblogicDD.exists()) |
| 10 | if (jbossCMPD.exists()) | ||||||||||||||||
3 | ejbFiles.put(META_DIR + WL_DD, weblogicDD); |
| 11 | ejbFiles.put(META_DIR + descriptorFileName, jbossCMPD); | ||||||||||||||||
else | else | |||||||||||||||||||
4 | log("Unable to locate weblogic deployment descriptor. " + "It was expected to be in " + weblogicDD.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; |
3 | Clone fragment #1 returns variables weblogicDD , while Clone fragment #2 returns variables |