File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/taskdefs/DemuxOutputTask.java | File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/taskdefs/DemuxOutputTask.java | |||
Method name: void handleErrorOutput(String)
|
Method name: void handleOutput(String)
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | line = line.trim();↵ | 1 | line = line.trim();↵ | |
2 | if (line.length() != 0 && !line.equals(randomErrValue)) {↵ | 2 | if (line.length() != 0 && !line.equals(randomOutValue)) {↵ | |
3 | String message = "Received = [" + line + "], expected = ["↵ | 3 | String message = "Received = [" + line + "], expected = ["↵ | |
4 | + randomErrValue + "]";↵ | 4 | + randomOutValue + "]";↵ | |
5 | throw new BuildException(message);↵ | 5 | throw new BuildException(message);↵ | |
6 | }↵ | 6 | }↵ | |
7 | errorReceived = true; | 7 | outputReceived = true; | |
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.3 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 11 |
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) | 0.8 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | line = line.trim(); | 1 | line = line.trim(); | |||||||||||||
2 | if (line.length() != 0 && !line.equals(randomErrValue)) |
| 2 | if (line.length() != 0 && !line.equals(randomOutValue)) | ||||||||||||
3 | String message = "Received = [" + line + "], expected = [" + randomErrValue + "]"; |
| 3 | String message = "Received = [" + line + "], expected = [" + randomOutValue + "]"; | ||||||||||||
4 | throw new BuildException(message); | 4 | throw new BuildException(message); | |||||||||||||
5 | errorReceived = true; |
| 5 | outputReceived = true; |
Row | Violation |
---|---|
1 | Expression errorReceived is a field being modified, and thus it cannot be parameterized |
2 | Expression outputReceived is a field being modified, and thus it cannot be parameterized |