File path: /jfreechart-1.0.10/tests/org/jfree/data/general/junit/DefaultKeyedValueDatasetTests.java | File path: /jfreechart-1.0.10/tests/org/jfree/data/junit/DefaultKeyedValueTests.java | |||
Method name: void testEquals()
|
Method name: void testEquals()
|
|||
Number of AST nodes: 10 | Number of AST nodes: 10 | |||
1 | DefaultKeyedValueDataset d1 ↵ | 1 | DefaultKeyedValue↵ | |
2 | = new DefaultKeyedValueDataset("Test", new Double(45.5));↵ | 2 | v1 = new DefaultKeyedValue("Test", new Double(45.5));↵ | |
3 | DefaultKeyedValueDataset d2 ↵ | 3 | DefaultKeyedValue↵ | |
4 | = new DefaultKeyedValueDataset("Test", new Double(45.5));↵ | 4 | v2 = new DefaultKeyedValue("Test", new Double(45.5));↵ | |
5 | assertTrue(d1.equals(d2));↵ | 5 | assertTrue(v1.equals(v2));↵ | |
6 | assertTrue(d2.equals(d1));↵ | 6 | assertTrue(v2.equals(v1));↵ | |
7 | d1 = new DefaultKeyedValueDataset("Test 1", new Double(45.5));↵ | 7 | v1 = new DefaultKeyedValue("Test 1", new Double(45.5));↵ | |
8 | d2 = new DefaultKeyedValueDataset("Test 2", new Double(45.5));↵ | 8 | v2 = new DefaultKeyedValue("Test 2", new Double(45.5));↵ | |
9 | assertFalse(d1.equals(d2));↵ | 9 | assertFalse(v1.equals(v2));↵ | |
10 | d1 = new DefaultKeyedValueDataset("Test", new Double(45.5));↵ | 10 | v1 = new DefaultKeyedValue("Test", new Double(45.5));↵ | |
11 | d2 = new DefaultKeyedValueDataset("Test", new Double(45.6));↵ | 11 | v2 = new DefaultKeyedValue("Test", new Double(45.6));↵ | |
12 | assertFalse(d1.equals(d2)); | 12 | assertFalse(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 | 35 |
Number of mapped statements | 10 |
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) | 0.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | DefaultKeyedValueDataset d1 = new DefaultKeyedValueDataset("Test", new Double(45.5)); |
| 1 | DefaultKeyedValue v1 = new DefaultKeyedValue("Test", new Double(45.5)); | ||||||||||||||||||||||
2 | DefaultKeyedValueDataset d2 = new DefaultKeyedValueDataset("Test", new Double(45.5)); |
| 2 | DefaultKeyedValue v2 = new DefaultKeyedValue("Test", new Double(45.5)); | ||||||||||||||||||||||
3 | assertTrue(d1.equals(d2)); |
| 3 | assertTrue(v1.equals(v2)); | ||||||||||||||||||||||
4 | assertTrue(d2.equals(d1)); |
| 4 | assertTrue(v2.equals(v1)); | ||||||||||||||||||||||
5 | d1 = new DefaultKeyedValueDataset("Test 1", new Double(45.5)); |
| 5 | v1 = new DefaultKeyedValue("Test 1", new Double(45.5)); | ||||||||||||||||||||||
6 | d2 = new DefaultKeyedValueDataset("Test 2", new Double(45.5)); |
| 6 | v2 = new DefaultKeyedValue("Test 2", new Double(45.5)); | ||||||||||||||||||||||
7 | assertFalse(d1.equals(d2)); |
| 7 | assertFalse(v1.equals(v2)); | ||||||||||||||||||||||
8 | d1 = new DefaultKeyedValueDataset("Test", new Double(45.5)); |
| 8 | v1 = new DefaultKeyedValue("Test", new Double(45.5)); | ||||||||||||||||||||||
9 | d2 = new DefaultKeyedValueDataset("Test", new Double(45.6)); |
| 9 | v2 = new DefaultKeyedValue("Test", new Double(45.6)); | ||||||||||||||||||||||
10 | assertFalse(d1.equals(d2)); |
| 10 | assertFalse(v1.equals(v2)); |
Row | Violation |
---|---|
1 | Expression new DefaultKeyedValueDataset("Test",new Double(45.5)) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression new DefaultKeyedValue("Test",new Double(45.5)) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression new DefaultKeyedValueDataset("Test",new Double(45.5)) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression new DefaultKeyedValue("Test",new Double(45.5)) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression d2 cannot be unified with expression v2 , because common superclass type org.jfree.data.KeyedValue cannot be passed as an argument to public boolean equals(java.lang.Object) |
6 | Expression d2 cannot be unified with expression v2 , because common superclass org.jfree.data.KeyedValue does not declare member(s) public boolean equals(java.lang.Object) |
7 | Expression d1 cannot be unified with expression v1 , because common superclass org.jfree.data.KeyedValue does not declare member(s) public boolean equals(java.lang.Object) |
8 | Expression d1 cannot be unified with expression v1 , because common superclass type org.jfree.data.KeyedValue cannot be passed as an argument to public boolean equals(java.lang.Object) |
9 | Expression d1 cannot be unified with expression v1 , because common superclass org.jfree.data.KeyedValue does not declare member(s) public boolean equals(java.lang.Object) |
10 | Expression d2 cannot be unified with expression v2 , because common superclass org.jfree.data.KeyedValue does not declare member(s) public boolean equals(java.lang.Object) |
11 | Expression new DefaultKeyedValueDataset("Test 1",new Double(45.5)) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
12 | Expression new DefaultKeyedValue("Test 1",new Double(45.5)) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
13 | Expression new DefaultKeyedValueDataset("Test 2",new Double(45.5)) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
14 | Expression new DefaultKeyedValue("Test 2",new Double(45.5)) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
15 | Expression d2 cannot be unified with expression v2 , because common superclass type org.jfree.data.KeyedValue cannot be passed as an argument to public boolean equals(java.lang.Object) |
16 | Expression d2 cannot be unified with expression v2 , because common superclass org.jfree.data.KeyedValue does not declare member(s) public boolean equals(java.lang.Object) |
17 | Expression d1 cannot be unified with expression v1 , because common superclass org.jfree.data.KeyedValue does not declare member(s) public boolean equals(java.lang.Object) |
18 | Expression new DefaultKeyedValueDataset("Test",new Double(45.5)) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
19 | Expression new DefaultKeyedValue("Test",new Double(45.5)) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
20 | Expression new DefaultKeyedValueDataset("Test",new Double(45.6)) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
21 | Expression new DefaultKeyedValue("Test",new Double(45.6)) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
22 | Expression d2 cannot be unified with expression v2 , because common superclass type org.jfree.data.KeyedValue cannot be passed as an argument to public boolean equals(java.lang.Object) |
23 | Expression d2 cannot be unified with expression v2 , because common superclass org.jfree.data.KeyedValue does not declare member(s) public boolean equals(java.lang.Object) |
24 | Expression d1 cannot be unified with expression v1 , because common superclass org.jfree.data.KeyedValue does not declare member(s) public boolean equals(java.lang.Object) |