File path: /jfreechart-1.0.10/tests/org/jfree/chart/labels/junit/StandardCategoryItemLabelGeneratorTests.java | File path: /jfreechart-1.0.10/tests/org/jfree/chart/labels/junit/StandardCategoryToolTipGeneratorTests.java | |||
Method name: void testEquals()
|
Method name: void testEquals()
|
|||
Number of AST nodes: 16 | Number of AST nodes: 16 | |||
1 | StandardCategoryItemLabelGenerator g1↵ | 1 | StandardCategoryToolTipGenerator g1↵ | |
2 | = new StandardCategoryItemLabelGenerator();↵ | 2 | = new StandardCategoryToolTipGenerator();↵ | |
3 | StandardCategoryItemLabelGenerator g2↵ | 3 | StandardCategoryToolTipGenerator g2↵ | |
4 | = new StandardCategoryItemLabelGenerator();↵ | 4 | = new StandardCategoryToolTipGenerator();↵ | |
5 | assertTrue(g1.equals(g2));↵ | 5 | assertTrue(g1.equals(g2));↵ | |
6 | assertTrue(g2.equals(g1));↵ | 6 | assertTrue(g2.equals(g1));↵ | |
7 | g1 = new StandardCategoryItemLabelGenerator("{0}",↵ | 7 | g1 = new StandardCategoryToolTipGenerator("{0}",↵ | |
8 | new DecimalFormat("0.000"));↵ | 8 | new DecimalFormat("0.000"));↵ | |
9 | assertFalse(g1.equals(g2));↵ | 9 | assertFalse(g1.equals(g2));↵ | |
10 | g2 = new StandardCategoryItemLabelGenerator("{0}",↵ | 10 | g2 = new StandardCategoryToolTipGenerator("{0}",↵ | |
11 | new DecimalFormat("0.000"));↵ | 11 | new DecimalFormat("0.000"));↵ | |
12 | assertTrue(g1.equals(g2));↵ | 12 | assertTrue(g1.equals(g2));↵ | |
13 | g1 = new StandardCategoryItemLabelGenerator("{1}",↵ | 13 | g1 = new StandardCategoryToolTipGenerator("{1}",↵ | |
14 | new DecimalFormat("0.000"));↵ | 14 | new DecimalFormat("0.000"));↵ | |
15 | assertFalse(g1.equals(g2));↵ | 15 | assertFalse(g1.equals(g2));↵ | |
16 | g2 = new StandardCategoryItemLabelGenerator("{1}",↵ | 16 | g2 = new StandardCategoryToolTipGenerator("{1}",↵ | |
17 | new DecimalFormat("0.000"));↵ | 17 | new DecimalFormat("0.000"));↵ | |
18 | assertTrue(g1.equals(g2));↵ | 18 | assertTrue(g1.equals(g2));↵ | |
19 | g1 = new StandardCategoryItemLabelGenerator("{2}",↵ | 19 | g1 = new StandardCategoryToolTipGenerator("{2}",↵ | |
20 | new SimpleDateFormat("d-MMM"));↵ | 20 | new SimpleDateFormat("d-MMM"));↵ | |
21 | assertFalse(g1.equals(g2));↵ | 21 | assertFalse(g1.equals(g2));↵ | |
22 | g2 = new StandardCategoryItemLabelGenerator("{2}",↵ | 22 | g2 = new StandardCategoryToolTipGenerator("{2}",↵ | |
23 | new SimpleDateFormat("d-MMM"));↵ | 23 | new SimpleDateFormat("d-MMM"));↵ | |
24 | assertTrue(g1.equals(g2)); | 24 |
| |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
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 | 74 |
Number of mapped statements | 16 |
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 | StandardCategoryItemLabelGenerator g1 = new StandardCategoryItemLabelGenerator(); |
| 1 | StandardCategoryToolTipGenerator g1 = new StandardCategoryToolTipGenerator(); | ||||||||||||||||||
2 | StandardCategoryItemLabelGenerator g2 = new StandardCategoryItemLabelGenerator(); |
| 2 | StandardCategoryToolTipGenerator g2 = new StandardCategoryToolTipGenerator(); | ||||||||||||||||||
3 | assertTrue(g1.equals(g2)); |
| 3 | assertTrue(g1.equals(g2)); | ||||||||||||||||||
4 | assertTrue(g2.equals(g1)); |
| 4 | assertTrue(g2.equals(g1)); | ||||||||||||||||||
5 | g1 = new StandardCategoryItemLabelGenerator("{0}", new DecimalFormat("0.000")); |
| 5 | g1 = new StandardCategoryToolTipGenerator("{0}", new DecimalFormat("0.000")); | ||||||||||||||||||
6 | assertFalse(g1.equals(g2)); |
| 6 | assertFalse(g1.equals(g2)); | ||||||||||||||||||
7 | g2 = new StandardCategoryItemLabelGenerator("{0}", new DecimalFormat("0.000")); |
| 7 | g2 = new StandardCategoryToolTipGenerator("{0}", new DecimalFormat("0.000")); | ||||||||||||||||||
8 | assertTrue(g1.equals(g2)); |
| 8 | assertTrue(g1.equals(g2)); | ||||||||||||||||||
9 | g1 = new StandardCategoryItemLabelGenerator("{1}", new DecimalFormat("0.000")); |
| 9 | g1 = new StandardCategoryToolTipGenerator("{1}", new DecimalFormat("0.000")); | ||||||||||||||||||
10 | assertFalse(g1.equals(g2)); |
| 10 | assertFalse(g1.equals(g2)); | ||||||||||||||||||
11 | g2 = new StandardCategoryItemLabelGenerator("{1}", new DecimalFormat("0.000")); |
| 11 | g2 = new StandardCategoryToolTipGenerator("{1}", new DecimalFormat("0.000")); | ||||||||||||||||||
12 | assertTrue(g1.equals(g2)); |
| 12 | assertTrue(g1.equals(g2)); | ||||||||||||||||||
13 | g1 = new StandardCategoryItemLabelGenerator("{2}", new SimpleDateFormat("d-MMM")); |
| 13 | g1 = new StandardCategoryToolTipGenerator("{2}", new SimpleDateFormat("d-MMM")); | ||||||||||||||||||
14 | assertFalse(g1.equals(g2)); |
| 14 | assertFalse(g1.equals(g2)); | ||||||||||||||||||
15 | g2 = new StandardCategoryItemLabelGenerator("{2}", new SimpleDateFormat("d-MMM")); |
| 15 | g2 = new StandardCategoryToolTipGenerator("{2}", new SimpleDateFormat("d-MMM")); | ||||||||||||||||||
16 | assertTrue(g1.equals(g2)); |
| 16 | assertTrue(g1.equals(g2)); |
Row | Violation |
---|---|
1 | Expression new StandardCategoryItemLabelGenerator() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression new StandardCategoryToolTipGenerator() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression new StandardCategoryItemLabelGenerator() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression new StandardCategoryToolTipGenerator() cannot be parameterized, because it has dependencies to/from statements that will be extracted |