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: void filesetManifest(File, InputStream)
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | fis = new FileInputStream(manifestFile);↵ | |||
1 | InputStreamReader isr;↵ | |||
2 | if (encoding == null) {↵ | 2 | if (manifestEncoding == null) {↵ | |
3 | isr = new InputStreamReader(fis, "UTF-8");↵ | 3 | isr = new InputStreamReader(is↵ | |
4 | );↵ | |||
4 | } else {↵ | 5 | } else {↵ | |
5 | isr = new InputStreamReader(fis, encoding);↵ | 6 | isr = new InputStreamReader(is, manifestEncoding);↵ | |
6 | }↵ | 7 | }↵ | |
7 | current = new Manifest(isr); | 8 | manifest = 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 | 4 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 1.5 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 5 | InputStreamReader isr; | ||||||||||||||||||
11 | if (encoding == null) |
| 6 | if (manifestEncoding == null) | ||||||||||||||||
12 | isr = new InputStreamReader(fis, "UTF-8"); |
| 7 | isr = new InputStreamReader(is); | ||||||||||||||||
else | else | |||||||||||||||||||
13 | isr = new InputStreamReader(fis, encoding); |
| 8 | isr = new InputStreamReader(is, manifestEncoding); | ||||||||||||||||
14 | current = new Manifest(isr); |
| 9 | manifest = getManifest(isr); |
Row | Violation |
---|---|
1 | Expression manifest is a field being modified, and thus it cannot be parameterized |
2 | Expression new Manifest(isr) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression getManifest(isr) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Clone fragment #1 returns variables current , while Clone fragment #2 returns variables |