File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/Rpm.java | File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/Rpm.java | |||
Method name: void execute()
|
Method name: void execute()
|
|||
Number of AST nodes: 7 | Number of AST nodes: 7 | |||
1 | if (output != null) {↵ | 1 | if (error != null) {↵ | |
2 | try {↵ | 2 | try {↵ | |
3 | BufferedOutputStream bos↵ | 3 | BufferedOutputStream bos↵ | |
4 | = new BufferedOutputStream(new FileOutputStream(output));↵ | 4 | = new BufferedOutputStream(new FileOutputStream(error));↵ | |
5 | outputstream = new PrintStream(bos);↵ | 5 | errorstream = new PrintStream(bos);↵ | |
6 | } catch (IOException e) {↵ | 6 | } catch (IOException e) {↵ | |
7 | throw new BuildException(e, getLocation());↵ | 7 | throw new BuildException(e, getLocation());↵ | |
8 | }↵ | 8 | }↵ | |
9 | } else if (!quiet) {↵ | 9 | } else if (!quiet) {↵ | |
10 | outputstream = new LogOutputStream(this, Project.MSG_INFO);↵ | 10 | errorstream = new LogOutputStream(this, Project.MSG_WARN);↵ | |
11 | } else {↵ | 11 | } else {↵ | |
12 | outputstream = new LogOutputStream(this, Project.MSG_DEBUG);↵ | 12 | errorstream = new LogOutputStream(this, Project.MSG_DEBUG);↵ | |
13 | } | 13 |
| |
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.5 |
Clones location | Clones are in the same method |
Number of node comparisons | 21 |
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) | 3.7 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
21 | if (output != null) |
| 28 | if (error != null) | |||||||||||||
22 | try | 29 | try | ||||||||||||||
23 | BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(output)); |
| 30 | BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(error)); | |||||||||||||
24 | outputstream = new PrintStream(bos); |
| 31 | errorstream = new PrintStream(bos); | |||||||||||||
25 | else if (!quiet) | 32 | else if (!quiet) | ||||||||||||||
26 | outputstream = new LogOutputStream(this, Project.MSG_INFO); |
| 33 | errorstream = new LogOutputStream(this, Project.MSG_WARN); | |||||||||||||
else | else | ||||||||||||||||
27 | outputstream = new LogOutputStream(this, Project.MSG_DEBUG); |
| 34 | errorstream = new LogOutputStream(this, Project.MSG_DEBUG); |
Row | Violation |
---|