File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/War.java | File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/Ear.java | |||
Method name: void setWebxml(File)
|
Method name: void setAppxml(File)
|
|||
Number of AST nodes: 7 | Number of AST nodes: 7 | |||
1 | deploymentDescriptor = descr;↵ | 1 | deploymentDescriptor = descr;↵ | |
2 | if (!deploymentDescriptor.exists()) {↵ | 2 | if (!deploymentDescriptor.exists()) {↵ | |
3 | throw new BuildException("Deployment descriptor: "↵ | 3 | throw new BuildException("Deployment descriptor: "↵ | |
4 | + deploymentDescriptor↵ | 4 | + deploymentDescriptor↵ | |
5 | + " does not exist.");↵ | 5 | + " does not exist.");↵ | |
6 | }↵ | 6 | }↵ | |
7 | // Create a ZipFileSet for this file, and pass it up.↵ | 7 | // Create a ZipFileSet for this file, and pass it up.↵ | |
8 | ZipFileSet fs = new ZipFileSet();↵ | 8 | ZipFileSet fs = new ZipFileSet();↵ | |
9 | fs.setFile(deploymentDescriptor);↵ | 9 | fs.setFile(deploymentDescriptor);↵ | |
10 | fs.setFullpath(XML_DESCRIPTOR_PATH);↵ | 10 | fs.setFullpath("META-INF/application.xml");↵ | |
11 | super.addFileset(fs); | 11 |
| |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
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 | 18 |
Number of mapped statements | 7 |
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) | 1.5 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | deploymentDescriptor = descr; | 1 | deploymentDescriptor = descr; | |||||||||||
2 | if (!deploymentDescriptor.exists()) | 2 | if (!deploymentDescriptor.exists()) | |||||||||||
3 | throw new BuildException("Deployment descriptor: " + deploymentDescriptor + " does not exist."); | 3 | throw new BuildException("Deployment descriptor: " + deploymentDescriptor + " does not exist."); | |||||||||||
4 | ZipFileSet fs = new ZipFileSet(); | 4 | ZipFileSet fs = new ZipFileSet(); | |||||||||||
5 | fs.setFile(deploymentDescriptor); | 5 | fs.setFile(deploymentDescriptor); | |||||||||||
6 | fs.setFullpath(XML_DESCRIPTOR_PATH); |
| 6 | fs.setFullpath("META-INF/application.xml"); | ||||||||||
7 | super.addFileset(fs); | 7 | super.addFileset(fs); |
Row | Violation |
---|