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: void readObject(ObjectInputStream)
|
Method name: void readObject(ObjectInputStream)
|
|||
Number of AST nodes: 7 | Number of AST nodes: 7 | |||
1 | stream.defaultReadObject();↵ | 1 | stream.defaultReadObject();↵ | |
2 | this.store = new HashMap();↵ | 2 | this.store = new TreeMap();↵ | |
3 | int keyCount = stream.readInt();↵ | 3 | int keyCount = stream.readInt();↵ | |
4 | for (int i = 0; i < keyCount; i++) {↵ | 4 | for (int i = 0; i < keyCount; i++) {↵ | |
5 | Comparable key = (Comparable) stream.readObject();↵ | 5 | Comparable key = (Comparable) stream.readObject();↵ | |
6 | Paint paint = SerialUtilities.readPaint(stream);↵ | 6 | Stroke stroke = SerialUtilities.readStroke(stream);↵ | |
7 | this.store.put(key, paint);↵ | 7 | this.store.put(key, stroke);↵ | |
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.1 |
Clones location | Clones are in different classes |
Number of node comparisons | 21 |
Number of mapped statements | 6 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 11.6 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | stream.defaultReadObject(); | 1 | stream.defaultReadObject(); | |||||||||||||||
2 | this.store = new HashMap(); |
| 2 | this.store = new TreeMap(); | ||||||||||||||
3 | int keyCount = stream.readInt(); | 3 | int keyCount = stream.readInt(); | |||||||||||||||
4 | for (int i = 0; i < keyCount; i++) | 4 | for (int i = 0; i < keyCount; i++) | |||||||||||||||
5 | Comparable key = (Comparable)stream.readObject(); | 5 | Comparable key = (Comparable)stream.readObject(); | |||||||||||||||
|
| 6 | Stroke stroke = SerialUtilities.readStroke(stream); | |||||||||||||||
6 | Paint paint = SerialUtilities.readPaint(stream); |
| | |||||||||||||||
7 | this.store.put(key, paint); |
| 7 | this.store.put(key, stroke); |
Row | Violation |
---|---|
1 | Expression new HashMap() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression new TreeMap() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Unmatched statement Stroke stroke=SerialUtilities.readStroke(stream); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
4 | Unmatched statement Stroke stroke=SerialUtilities.readStroke(stream); 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 Paint paint=SerialUtilities.readPaint(stream); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
6 | Unmatched statement Paint paint=SerialUtilities.readPaint(stream); 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 | Type java.awt.Paint of variable paint does not match with type java.awt.Stroke of variable stroke |