File path: /jfreechart-1.0.10/tests/org/jfree/chart/block/junit/EmptyBlockTests.java | File path: /jfreechart-1.0.10/tests/org/jfree/data/xy/junit/VectorTests.java | |||
Method name: void testEquals()
|
Method name: void testEquals()
|
|||
Number of AST nodes: 12 | Number of AST nodes: 12 | |||
1 | EmptyBlock b1 = new EmptyBlock(1.0, 2.0);↵ | 1 | Vector v1 = new Vector(1.0, 2.0);↵ | |
2 | EmptyBlock b2 = new EmptyBlock(1.0, 2.0);↵ | 2 | Vector v2 = new Vector(1.0, 2.0);↵ | |
3 | assertTrue(b1.equals(b2));↵ | 3 | assertTrue(v1.equals(v2));↵ | |
4 | assertTrue(b2.equals(b2));↵ | 4 | assertTrue(v2.equals(v1));↵ | |
5 | ↵ | |||
6 | b1 = new EmptyBlock(1.1, 2.0);↵ | 5 | v1 = new Vector(1.1, 2.0);↵ | |
7 | assertFalse(b1.equals(b2));↵ | 6 | assertFalse(v1.equals(v2));↵ | |
8 | b2 = new EmptyBlock(1.1, 2.0);↵ | 7 | v2 = new Vector(1.1, 2.0);↵ | |
9 | assertTrue(b1.equals(b2));↵ | 8 | assertTrue(v1.equals(v2));↵ | |
9 | ↵ | |||
10 | b1 = new EmptyBlock(1.1, 2.2);↵ | 10 | v1 = new Vector(1.1, 2.2);↵ | |
11 | assertFalse(b1.equals(b2));↵ | 11 | assertFalse(v1.equals(v2));↵ | |
12 | b2 = new EmptyBlock(1.1, 2.2);↵ | 12 | v2 = new Vector(1.1, 2.2);↵ | |
13 | assertTrue(b1.equals(b2)); | 13 | assertTrue(v1.equals(v2)); | |
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 having the same super class |
Number of node comparisons | 62 |
Number of mapped statements | 6 |
Number of unmapped statements in the first code fragment | 6 |
Number of unmapped statements in the second code fragment | 6 |
Time elapsed for statement mapping (ms) | 0.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
| 1 | Vector v1 = new Vector(1.0, 2.0); | ||||||||||||||||||||||||
1 | EmptyBlock b1 = new EmptyBlock(1.0, 2.0); | | |||||||||||||||||||||||||
|
| 2 | Vector v2 = new Vector(1.0, 2.0); | ||||||||||||||||||||||||
2 | EmptyBlock b2 = new EmptyBlock(1.0, 2.0); | | |||||||||||||||||||||||||
3 | assertTrue(b1.equals(b2)); |
| 3 | assertTrue(v1.equals(v2)); | |||||||||||||||||||||||
4 | assertTrue(b2.equals(b2)); |
| 4 | assertTrue(v2.equals(v1)); | |||||||||||||||||||||||
|
| 5 | v1 = new Vector(1.1, 2.0); | ||||||||||||||||||||||||
5 | b1 = new EmptyBlock(1.1, 2.0); |
| | ||||||||||||||||||||||||
6 | assertFalse(b1.equals(b2)); |
| 6 | assertFalse(v1.equals(v2)); | |||||||||||||||||||||||
|
| 7 | v2 = new Vector(1.1, 2.0); | ||||||||||||||||||||||||
7 | b2 = new EmptyBlock(1.1, 2.0); |
| | ||||||||||||||||||||||||
8 | assertTrue(b1.equals(b2)); |
| 8 | assertTrue(v1.equals(v2)); | |||||||||||||||||||||||
|
| 9 | v1 = new Vector(1.1, 2.2); | ||||||||||||||||||||||||
9 | b1 = new EmptyBlock(1.1, 2.2); |
| | ||||||||||||||||||||||||
10 | assertFalse(b1.equals(b2)); |
| 10 | assertFalse(v1.equals(v2)); | |||||||||||||||||||||||
|
| 11 | v2 = new Vector(1.1, 2.2); | ||||||||||||||||||||||||
11 | b2 = new EmptyBlock(1.1, 2.2); |
| | ||||||||||||||||||||||||
12 | assertTrue(b1.equals(b2)); |
| 12 | assertTrue(v1.equals(v2)); |
Row | Violation |
---|---|
1 | Unmatched statement Vector v1=new Vector(1.0,2.0); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
2 | Unmatched statement Vector v2=new Vector(1.0,2.0); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
3 | Type org.jfree.chart.block.EmptyBlock of variable b2 does not match with type org.jfree.data.xy.Vector of variable v2 |
4 | Expression b1 cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression v1 cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Type org.jfree.chart.block.EmptyBlock of variable b1 does not match with type org.jfree.data.xy.Vector of variable v1 |
7 | Expression b2 cannot be parameterized, because it has dependencies to/from statements that will be extracted |
8 | Expression v1 cannot be parameterized, because it has dependencies to/from statements that will be extracted |
9 | Type org.jfree.chart.block.EmptyBlock of variable b2 does not match with type org.jfree.data.xy.Vector of variable v1 |
10 | Type org.jfree.chart.block.EmptyBlock of variable b2 does not match with type org.jfree.data.xy.Vector of variable v2 |
11 | Unmatched statement v1=new Vector(1.1,2.0); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
12 | Unmatched statement b1=new EmptyBlock(1.1,2.0); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
13 | Type org.jfree.chart.block.EmptyBlock of variable b2 does not match with type org.jfree.data.xy.Vector of variable v2 |
14 | Expression b1 cannot be parameterized, because it has dependencies to/from statements that will be extracted |
15 | Expression v1 cannot be parameterized, because it has dependencies to/from statements that will be extracted |
16 | Type org.jfree.chart.block.EmptyBlock of variable b1 does not match with type org.jfree.data.xy.Vector of variable v1 |
17 | Unmatched statement v2=new Vector(1.1,2.0); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
18 | Unmatched statement b2=new EmptyBlock(1.1,2.0); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
19 | Type org.jfree.chart.block.EmptyBlock of variable b2 does not match with type org.jfree.data.xy.Vector of variable v2 |
20 | Expression b1 cannot be parameterized, because it has dependencies to/from statements that will be extracted |
21 | Expression v1 cannot be parameterized, because it has dependencies to/from statements that will be extracted |
22 | Type org.jfree.chart.block.EmptyBlock of variable b1 does not match with type org.jfree.data.xy.Vector of variable v1 |
23 | Unmatched statement v1=new Vector(1.1,2.2); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
24 | Unmatched statement b1=new EmptyBlock(1.1,2.2); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
25 | Type org.jfree.chart.block.EmptyBlock of variable b2 does not match with type org.jfree.data.xy.Vector of variable v2 |
26 | Expression b1 cannot be parameterized, because it has dependencies to/from statements that will be extracted |
27 | Expression v1 cannot be parameterized, because it has dependencies to/from statements that will be extracted |
28 | Type org.jfree.chart.block.EmptyBlock of variable b1 does not match with type org.jfree.data.xy.Vector of variable v1 |
29 | Unmatched statement v2=new Vector(1.1,2.2); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
30 | Unmatched statement b2=new EmptyBlock(1.1,2.2); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
31 | Type org.jfree.chart.block.EmptyBlock of variable b2 does not match with type org.jfree.data.xy.Vector of variable v2 |
32 | Expression b1 cannot be parameterized, because it has dependencies to/from statements that will be extracted |
33 | Expression v1 cannot be parameterized, because it has dependencies to/from statements that will be extracted |
34 | Type org.jfree.chart.block.EmptyBlock of variable b1 does not match with type org.jfree.data.xy.Vector of variable v1 |