File path: /jfreechart-1.0.10/tests/org/jfree/data/xy/junit/YIntervalTests.java | File path: /jfreechart-1.0.10/tests/org/jfree/data/xy/junit/YWithXIntervalTests.java | |||
Method name: void testEquals()
|
Method name: void testEquals()
|
|||
Number of AST nodes: 15 | Number of AST nodes: 15 | |||
1 | YInterval i1 = new YInterval(1.0, 0.5, 1.5);↵ | 1 | YWithXInterval i1 = new YWithXInterval(1.0, 0.5, 1.5);↵ | |
2 | YInterval i2 = new YInterval(1.0, 0.5, 1.5);↵ | 2 | YWithXInterval i2 = new YWithXInterval(1.0, 0.5, 1.5);↵ | |
3 | assertEquals(i1, i2);↵ | 3 | assertEquals(i1, i2);↵ | |
4 | ↵ | 4 | ↵ | |
5 | i1 = new YInterval(1.1, 0.5, 1.5);↵ | 5 | i1 = new YWithXInterval(1.1, 0.5, 1.5);↵ | |
6 | assertFalse(i1.equals(i2));↵ | 6 | assertFalse(i1.equals(i2));↵ | |
7 | i2 = new YInterval(1.1, 0.5, 1.5);↵ | 7 | i2 = new YWithXInterval(1.1, 0.5, 1.5);↵ | |
8 | assertTrue(i1.equals(i2));↵ | 8 | assertTrue(i1.equals(i2));↵ | |
9 | i1 = new YInterval(1.1, 0.55, 1.5);↵ | 9 | i1 = new YWithXInterval(1.1, 0.55, 1.5);↵ | |
10 | assertFalse(i1.equals(i2));↵ | 10 | assertFalse(i1.equals(i2));↵ | |
11 | i2 = new YInterval(1.1, 0.55, 1.5);↵ | 11 | i2 = new YWithXInterval(1.1, 0.55, 1.5);↵ | |
12 | assertTrue(i1.equals(i2));↵ | 12 | assertTrue(i1.equals(i2));↵ | |
13 | ↵ | 13 | ↵ | |
14 | i1 = new YInterval(1.1, 0.55, 1.55);↵ | 14 | i1 = new YWithXInterval(1.1, 0.55, 1.55);↵ | |
15 | assertFalse(i1.equals(i2));↵ | 15 | assertFalse(i1.equals(i2));↵ | |
16 | i2 = new YInterval(1.1, 0.55, 1.55);↵ | 16 | i2 = new YWithXInterval(1.1, 0.55, 1.55);↵ | |
17 | assertTrue(i1.equals(i2)); | 17 |
| |
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 | 99 |
Number of mapped statements | 7 |
Number of unmapped statements in the first code fragment | 8 |
Number of unmapped statements in the second code fragment | 8 |
Time elapsed for statement mapping (ms) | 0.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
| 1 | YWithXInterval i1 = new YWithXInterval(1.0, 0.5, 1.5); | ||||||||||||||||
1 | YInterval i1 = new YInterval(1.0, 0.5, 1.5); |
| | ||||||||||||||||
|
| 2 | YWithXInterval i2 = new YWithXInterval(1.0, 0.5, 1.5); | ||||||||||||||||
2 | YInterval i2 = new YInterval(1.0, 0.5, 1.5); |
| | ||||||||||||||||
3 | assertEquals(i1, i2); |
| 3 | assertEquals(i1, i2); | |||||||||||||||
|
| 4 | i1 = new YWithXInterval(1.1, 0.5, 1.5); | ||||||||||||||||
4 | i1 = new YInterval(1.1, 0.5, 1.5); |
| | ||||||||||||||||
5 | assertFalse(i1.equals(i2)); |
| 5 | assertFalse(i1.equals(i2)); | |||||||||||||||
|
| 6 | i2 = new YWithXInterval(1.1, 0.5, 1.5); | ||||||||||||||||
6 | i2 = new YInterval(1.1, 0.5, 1.5); |
| | ||||||||||||||||
7 | assertTrue(i1.equals(i2)); |
| 7 | assertTrue(i1.equals(i2)); | |||||||||||||||
|
| 8 | i1 = new YWithXInterval(1.1, 0.55, 1.5); | ||||||||||||||||
8 | i1 = new YInterval(1.1, 0.55, 1.5); |
| | ||||||||||||||||
9 | assertFalse(i1.equals(i2)); |
| 9 | assertFalse(i1.equals(i2)); | |||||||||||||||
|
| 10 | i2 = new YWithXInterval(1.1, 0.55, 1.5); | ||||||||||||||||
10 | i2 = new YInterval(1.1, 0.55, 1.5); |
| | ||||||||||||||||
11 | assertTrue(i1.equals(i2)); |
| 11 | assertTrue(i1.equals(i2)); | |||||||||||||||
|
| 12 | i1 = new YWithXInterval(1.1, 0.55, 1.55); | ||||||||||||||||
12 | i1 = new YInterval(1.1, 0.55, 1.55); |
| | ||||||||||||||||
13 | assertFalse(i1.equals(i2)); |
| 13 | assertFalse(i1.equals(i2)); | |||||||||||||||
|
| 14 | i2 = new YWithXInterval(1.1, 0.55, 1.55); | ||||||||||||||||
14 | i2 = new YInterval(1.1, 0.55, 1.55); |
| | ||||||||||||||||
15 | assertTrue(i1.equals(i2)); |
| 15 | assertTrue(i1.equals(i2)); |
Row | Violation |
---|---|
1 | Unmatched statement YWithXInterval i1=new YWithXInterval(1.0,0.5,1.5); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
2 | Unmatched statement YInterval i1=new YInterval(1.0,0.5,1.5); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
3 | Unmatched statement YWithXInterval i2=new YWithXInterval(1.0,0.5,1.5); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
4 | Unmatched statement YInterval i2=new YInterval(1.0,0.5,1.5); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
5 | Type org.jfree.data.xy.YInterval of variable i1 does not match with type org.jfree.data.xy.YWithXInterval of variable i1 |
6 | Type org.jfree.data.xy.YInterval of variable i2 does not match with type org.jfree.data.xy.YWithXInterval of variable i2 |
7 | Unmatched statement i1=new YWithXInterval(1.1,0.5,1.5); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
8 | Unmatched statement i1=new YInterval(1.1,0.5,1.5); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
9 | Type org.jfree.data.xy.YInterval of variable i2 does not match with type org.jfree.data.xy.YWithXInterval of variable i2 |
10 | Type org.jfree.data.xy.YInterval of variable i1 does not match with type org.jfree.data.xy.YWithXInterval of variable i1 |
11 | Unmatched statement i2=new YWithXInterval(1.1,0.5,1.5); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
12 | Unmatched statement i2=new YInterval(1.1,0.5,1.5); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
13 | Type org.jfree.data.xy.YInterval of variable i2 does not match with type org.jfree.data.xy.YWithXInterval of variable i2 |
14 | Type org.jfree.data.xy.YInterval of variable i1 does not match with type org.jfree.data.xy.YWithXInterval of variable i1 |
15 | Unmatched statement i1=new YWithXInterval(1.1,0.55,1.5); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
16 | Unmatched statement i1=new YInterval(1.1,0.55,1.5); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
17 | Type org.jfree.data.xy.YInterval of variable i2 does not match with type org.jfree.data.xy.YWithXInterval of variable i2 |
18 | Type org.jfree.data.xy.YInterval of variable i1 does not match with type org.jfree.data.xy.YWithXInterval of variable i1 |
19 | Unmatched statement i2=new YWithXInterval(1.1,0.55,1.5); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
20 | Unmatched statement i2=new YInterval(1.1,0.55,1.5); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
21 | Type org.jfree.data.xy.YInterval of variable i2 does not match with type org.jfree.data.xy.YWithXInterval of variable i2 |
22 | Type org.jfree.data.xy.YInterval of variable i1 does not match with type org.jfree.data.xy.YWithXInterval of variable i1 |
23 | Unmatched statement i1=new YWithXInterval(1.1,0.55,1.55); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
24 | Unmatched statement i1=new YInterval(1.1,0.55,1.55); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
25 | Type org.jfree.data.xy.YInterval of variable i2 does not match with type org.jfree.data.xy.YWithXInterval of variable i2 |
26 | Type org.jfree.data.xy.YInterval of variable i1 does not match with type org.jfree.data.xy.YWithXInterval of variable i1 |
27 | Unmatched statement i2=new YWithXInterval(1.1,0.55,1.55); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
28 | Unmatched statement i2=new YInterval(1.1,0.55,1.55); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
29 | Type org.jfree.data.xy.YInterval of variable i2 does not match with type org.jfree.data.xy.YWithXInterval of variable i2 |
30 | Type org.jfree.data.xy.YInterval of variable i1 does not match with type org.jfree.data.xy.YWithXInterval of variable i1 |