File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/TraXLiaison.java | File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/types/ResourceOutputTest.java | |||
Method name: void setStylesheet(File)
|
Method name: void teststringoutput1()
|
|||
Number of AST nodes: 4 | Number of AST nodes: 3 | |||
1 | FileResource fr = new FileResource();↵ | 1 | StringResource r = new StringResource();↵ | |
2 | fr.setProject(project);↵ | 2 | ↵ | |
3 | fr.setFile(stylesheet);↵ | |||
4 | setStylesheet(fr↵ | 3 | testoutputbe(r);↵ | |
5 | ); | 4 | assertEquals("foo", r.getValue()); | |
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.0 |
Clones location | Clones are in different classes |
Number of node comparisons | 9 |
Number of mapped statements | 3 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 0.0 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | FileResource fr = new FileResource(); |
| 1 | StringResource r = new StringResource(); | ||||||||||||||||||||||||
2 | fr.setProject(project); | | ||||||||||||||||||||||||||
3 | fr.setFile(stylesheet); |
| 3 | assertEquals("foo", r.getValue()); | ||||||||||||||||||||||||
4 | setStylesheet(fr); |
| 2 | testoutputbe(r); |
Row | Violation |
---|---|
1 | Expression fr.setFile(stylesheet) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression assertEquals("foo",r.getValue()) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression fr.setFile(stylesheet) is a void method call, and thus it cannot be parameterized |
4 | Expression assertEquals("foo",r.getValue()) is a void method call, and thus it cannot be parameterized |
5 | Expression fr.setFile(stylesheet) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Expression assertEquals("foo",r.getValue()) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
7 | Expression fr.setFile(stylesheet) is a void method call, and thus it cannot be parameterized |
8 | Expression assertEquals("foo",r.getValue()) is a void method call, and thus it cannot be parameterized |
9 | Expression setStylesheet(fr) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
10 | Expression testoutputbe(r) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
11 | Expression setStylesheet(fr) is a void method call, and thus it cannot be parameterized |
12 | Expression testoutputbe(r) is a void method call, and thus it cannot be parameterized |
13 | Clone fragment #1 returns variables fr , while Clone fragment #2 returns variables |