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/WeblogicDeploymentTool.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 = new File(getConfig().descriptorDir, ddPrefix + JBOSS_DD);↵ | 1 | File weblogicDD = new File(getConfig().descriptorDir, ddPrefix + WL_DD);↵ | |
2 | if (jbossDD.exists()) {↵ | 2 | if (weblogicDD.exists()) {↵ | |
3 | ejbFiles.put(META_DIR + JBOSS_DD, jboss↵ | 3 | ejbFiles.put(META_DIR + WL_DD,↵ | |
4 | DD);↵ | 4 | weblogicDD);↵ | |
5 | } else {↵ | 5 | } else {↵ | |
6 | log("Unable to locate jboss deployment descriptor. "↵ | 6 | log("Unable to locate weblogic deployment descriptor. "↵ | |
7 | + "It was expected to be in " + jbossDD.getPath(),↵ | 7 | + "It was expected to be in "↵ | |
8 | ↵ | |||
9 | Project.MSG_WARN);↵ | 8 | + weblogicDD.getPath(), Project.MSG_WARN);↵ | |
10 | return;↵ | 9 | return;↵ | |
11 | } | 10 |
| |
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) | 163.4 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | File jbossDD = new File(getConfig().descriptorDir, ddPrefix + JBOSS_DD); |
| 1 | File weblogicDD = new File(getConfig().descriptorDir, ddPrefix + WL_DD); | |||||||||||||
2 | if (jbossDD.exists()) |
| 2 | if (weblogicDD.exists()) | |||||||||||||
3 | ejbFiles.put(META_DIR + JBOSS_DD, jbossDD); |
| 3 | ejbFiles.put(META_DIR + WL_DD, weblogicDD); | |||||||||||||
else | else | ||||||||||||||||
4 | log("Unable to locate jboss deployment descriptor. " + "It was expected to be in " + jbossDD.getPath(), Project.MSG_WARN); |
| 4 | log("Unable to locate weblogic deployment descriptor. " + "It was expected to be in " + weblogicDD.getPath(), Project.MSG_WARN); | |||||||||||||
5 | return; |
| 5 | return; |
Row | Violation |
---|---|
1 | Conditional return; |
2 | Conditional return; |
3 | Clone fragment #1 returns variables , while Clone fragment #2 returns variables weblogicDD |