File path: /apache-ant-1.7.0/src/org/apache/tools/ant/Project.java | File path: /apache-ant-1.7.0/src/org/apache/tools/ant/Project.java | |||
Method name: void demuxOutput(String, boolean)
|
Method name: void demuxFlush(String, boolean)
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | Task task = getThreadTask(Thread.currentThread());↵ | 1 | Task task = getThreadTask(Thread.currentThread());↵ | |
2 | if (task == null) {↵ | 2 | if (task == null) {↵ | |
3 | log(output, isWarning ? MSG_WARN : MSG_INFO);↵ | 3 | fireMessageLogged(this, output, isError ? MSG_ERR : MSG_INFO);↵ | |
4 | } else {↵ | 4 | } else {↵ | |
5 | if (isWarning) {↵ | 5 | if (isError) {↵ | |
6 | task.handleErrorOutput(output);↵ | 6 | task.handleErrorFlush(output);↵ | |
7 | } else {↵ | 7 | } else {↵ | |
8 | task.handleOutput(output);↵ | 8 | task.handleFlush(output);↵ | |
9 | }↵ | 9 | }↵ | |
10 | } | 10 |
| |
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 declared in the same class |
Number of node comparisons | 14 |
Number of mapped statements | 6 |
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) | 2.4 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | Task task = getThreadTask(Thread.currentThread()); | 1 | Task task = getThreadTask(Thread.currentThread()); | ||||||||||||||||||
2 | if (task == null) | 2 | if (task == null) | ||||||||||||||||||
3 | log(output, isWarning ? MSG_WARN : MSG_INFO); |
| 3 | fireMessageLogged(this, output, isError ? MSG_ERR : MSG_INFO); | |||||||||||||||||
else | else | ||||||||||||||||||||
4 | if (isWarning) |
| 4 | if (isError) | |||||||||||||||||
5 | task.handleErrorOutput(output); |
| 5 | task.handleErrorFlush(output); | |||||||||||||||||
else | else | ||||||||||||||||||||
6 | task.handleOutput(output); |
| 6 | task.handleFlush(output); |
Row | Violation |
---|---|
1 | Expression log(output,isWarning ? MSG_WARN : MSG_INFO) is a void method call, and thus it cannot be parameterized |
2 | Expression fireMessageLogged(this,output,isError ? MSG_ERR : MSG_INFO) is a void method call, and thus it cannot be parameterized |
3 | Expression log(output,isWarning ? MSG_WARN : MSG_INFO) is a void method call, and thus it cannot be parameterized |
4 | Expression fireMessageLogged(this,output,isError ? MSG_ERR : MSG_INFO) is a void method call, and thus it cannot be parameterized |
5 | Expression task.handleErrorOutput(output) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Expression task.handleErrorFlush(output) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
7 | Expression task.handleErrorOutput(output) is a void method call, and thus it cannot be parameterized |
8 | Expression task.handleErrorFlush(output) is a void method call, and thus it cannot be parameterized |
9 | Expression task.handleOutput(output) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
10 | Expression task.handleFlush(output) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
11 | Expression task.handleOutput(output) is a void method call, and thus it cannot be parameterized |
12 | Expression task.handleFlush(output) is a void method call, and thus it cannot be parameterized |