File path: /jfreechart-1.0.10/src/org/jfree/chart/PaintMap.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/StrokeMap.java | |||
Method name: boolean equals(Object)
|
Method name: boolean equals(Object)
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | while (iterator.hasNext()) {↵ | 1 | while (iterator.hasNext()) {↵ | |
2 | Comparable key = (Comparable) iterator.next();↵ | 2 | Comparable key = (Comparable) iterator.next();↵ | |
3 | Paint p1 = getPaint(key);↵ | 3 | Stroke s1 = getStroke(key);↵ | |
4 | Paint p2 = that.getPaint(key);↵ | 4 | Stroke s2 = that.getStroke(key);↵ | |
5 | if (!PaintUtilities.equal(p1, p2)) {↵ | 5 | if (!ObjectUtilities.equal(s1, s2)) {↵ | |
6 | return false;↵ | 6 | return false;↵ | |
7 | }↵ | 7 | }↵ | |
8 | } | 8 |
| |
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.2 |
Clones location | Clones are in different classes |
Number of node comparisons | 20 |
Number of mapped statements | 4 |
Number of unmapped statements in the first code fragment | 2 |
Number of unmapped statements in the second code fragment | 2 |
Time elapsed for statement mapping (ms) | 20.3 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
10 | while (iterator.hasNext()) | 10 | while (iterator.hasNext()) | ||||||||||||||||||||||||||
11 | Comparable key = (Comparable)iterator.next(); | 11 | Comparable key = (Comparable)iterator.next(); | ||||||||||||||||||||||||||
|
| 12 | Stroke s1 = getStroke(key); | ||||||||||||||||||||||||||
12 | Paint p1 = getPaint(key); |
| | ||||||||||||||||||||||||||
|
| 13 | Stroke s2 = that.getStroke(key); | ||||||||||||||||||||||||||
13 | Paint p2 = that.getPaint(key); |
| | ||||||||||||||||||||||||||
14 | if (!PaintUtilities.equal(p1, p2)) |
| 14 | if (!ObjectUtilities.equal(s1, s2)) | |||||||||||||||||||||||||
15 | return false; | 15 | return false; |
Row | Violation |
---|---|
1 | Unmatched statement Stroke s1=getStroke(key); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Unmatched statement Stroke s1=getStroke(key); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted |
3 | Unmatched statement Paint p1=getPaint(key); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
4 | Unmatched statement Paint p1=getPaint(key); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted |
5 | Unmatched statement Stroke s2=that.getStroke(key); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
6 | Unmatched statement Stroke s2=that.getStroke(key); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted |
7 | Unmatched statement Paint p2=that.getPaint(key); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
8 | Unmatched statement Paint p2=that.getPaint(key); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted |
9 | Type java.awt.Paint of variable p1 does not match with type java.awt.Stroke of variable s1 |
10 | Type java.awt.Paint of variable p2 does not match with type java.awt.Stroke of variable s2 |
11 | Type org.jfree.util.PaintUtilities does not match with type org.jfree.util.ObjectUtilities |
12 | Not all possible execution flows end in a return statement |