File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/ManifestTask.java | File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/Jar.java | |||
Method name: void execute()
|
Method name: Manifest getManifest(File)
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | fis = new FileInputStream(manifestFile);↵ | 1 | fis = new FileInputStream(manifestFile);↵ | |
2 | if (encoding == null) {↵ | 2 | if (manifestEncoding == null) {↵ | |
3 | isr = new InputStreamReader(fis, "UTF-8");↵ | 3 | isr = new InputStreamReader(fis↵ | |
4 | ↵ | 4 | );↵ | |
5 | } else {↵ | 5 | } else {↵ | |
6 | isr = new InputStreamReader(fis, encoding);↵ | 6 | isr = new InputStreamReader(fis, manifestEncoding);↵ | |
7 | }↵ | 7 | }↵ | |
8 | current = new Manifest(isr); | 8 | newManifest = getManifest(isr); | |
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 | 14 |
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) | 1.3 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
10 | fis = new FileInputStream(manifestFile); | 5 | fis = new FileInputStream(manifestFile); | ||||||||||||||||
11 | if (encoding == null) |
| 6 | if (manifestEncoding == null) | |||||||||||||||
12 | isr = new InputStreamReader(fis, "UTF-8"); |
| 7 | isr = new InputStreamReader(fis); | |||||||||||||||
else | else | ||||||||||||||||||
13 | isr = new InputStreamReader(fis, encoding); |
| 8 | isr = new InputStreamReader(fis, manifestEncoding); | |||||||||||||||
14 | current = new Manifest(isr); |
| 9 | newManifest = getManifest(isr); |
Row | Violation |
---|---|
1 | Expression new InputStreamReader(fis,"UTF-8") cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression new InputStreamReader(fis) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression new Manifest(isr) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression getManifest(isr) cannot be parameterized, because it has dependencies to/from statements that will be extracted |