File path: /jruby-1.4.0/src/org/jruby/util/ShellLauncher.java | File path: /jruby-1.4.0/src/org/jruby/util/ShellLauncher.java | |||
Method name: void prepareInerr(Process)
|
Method name: void prepareInput(Process)
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | inerr = unwrapBufferedStream(child.getErrorStream());↵ | 1 | input = unwrapBufferedStream(child.getInputStream());↵ | |
2 | if (inerr instanceof FileInputStream) {↵ | 2 | if (input instanceof FileInputStream) {↵ | |
3 | inerrChannel = ((FileInputStream) inerr).getChannel();↵ | 3 | inputChannel = ((FileInputStream) input).getChannel();↵ | |
4 | } else {↵ | 4 | } else {↵ | |
5 | inerrChannel = null;↵ | 5 | inputChannel = null;↵ | |
6 | }↵ | 6 | }↵ | |
7 | inerrPumper = null; | 7 | inputPumper = null; | |
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.1 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 12 |
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.6 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | inerr = unwrapBufferedStream(child.getErrorStream()); |
| 1 | input = unwrapBufferedStream(child.getInputStream()); | |||||||||||||||||
2 | if (inerr instanceof FileInputStream) |
| 2 | if (input instanceof FileInputStream) | |||||||||||||||||
3 | inerrChannel = ((FileInputStream)inerr).getChannel(); |
| 3 | inputChannel = ((FileInputStream)input).getChannel(); | |||||||||||||||||
else | else | ||||||||||||||||||||
4 | inerrChannel = null; |
| 4 | inputChannel = null; | |||||||||||||||||
5 | inerrPumper = null; |
| 5 | inputPumper = null; |
Row | Violation |
---|---|
1 | Expression inerr is a field being modified, and thus it cannot be parameterized |
2 | Expression input is a field being modified, and thus it cannot be parameterized |
3 | Expression inerr cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression input cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression inerrChannel is a field being modified, and thus it cannot be parameterized |
6 | Expression inputChannel is a field being modified, and thus it cannot be parameterized |
7 | Expression inerr cannot be parameterized, because it has dependencies to/from statements that will be extracted |
8 | Expression input cannot be parameterized, because it has dependencies to/from statements that will be extracted |
9 | Expression inerrChannel is a field being modified, and thus it cannot be parameterized |
10 | Expression inputChannel is a field being modified, and thus it cannot be parameterized |
11 | Expression inerrPumper is a field being modified, and thus it cannot be parameterized |
12 | Expression inputPumper is a field being modified, and thus it cannot be parameterized |