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 handleOutput(String)
|
Method name: void handleErrorOutput(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(randomOutValue)) {↵ | 2 | if (line.length() != 0 && !line.equals(randomErrValue)) {↵ | |
3 | String message = "Received = [" + line + "], expected = ["↵ | 3 | String message = "Received = [" + line + "], expected = ["↵ | |
4 | + randomOutValue + "]";↵ | 4 | + randomErrValue + "]";↵ | |
5 | throw new BuildException(message);↵ | 5 | throw new BuildException(message);↵ | |
6 | }↵ | 6 | }↵ | |
7 | outputReceived = true; | 7 | errorReceived = true; | |
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.2 |
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) | 1.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | line = line.trim(); | 1 | line = line.trim(); | |||||||||||
2 | if (line.length() != 0 && !line.equals(randomOutValue)) |
| 2 | if (line.length() != 0 && !line.equals(randomErrValue)) | ||||||||||
3 | String message = "Received = [" + line + "], expected = [" + randomOutValue + "]"; |
| 3 | String message = "Received = [" + line + "], expected = [" + randomErrValue + "]"; | ||||||||||
4 | throw new BuildException(message); | 4 | throw new BuildException(message); | |||||||||||
5 | outputReceived = true; |
| 5 | errorReceived = true; |
Row | Violation |
---|