File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/PiePlot.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/dial/DialPlot.java | |||
Method name: double getMaximumExplodePercent()
|
Method name: DialScale getScaleForDataset(int)
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | while (iterator.hasNext()) {↵ | |||
2 | Comparable key = (Comparable) iterator.next();↵ | 1 | DialScale result = (DialScale) this.scales.get(0); ↵ | |
3 | Number explode = (Number) this.explodePercentages.get(key);↵ | 2 | Integer scaleIndex = (Integer) this.↵ | |
4 | ↵ | 3 | datasetToScaleMap.get(datasetIndex);↵ | |
5 | if (explode != null) {↵ | 4 | if (scaleIndex != null) {↵ | |
6 | result = Math.max(result, explode.doubleValue()); ↵ | 5 | result = ↵ | |
7 | ↵ | 6 | getScale(scaleIndex.intValue());↵ | |
8 | }↵ | 7 | }↵ | |
9 | } | 8 | return result; | |
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 having the same super class |
Number of node comparisons | 10 |
Number of mapped statements | 2 |
Number of unmapped statements in the first code fragment | 2 |
Number of unmapped statements in the second code fragment | 3 |
Time elapsed for statement mapping (ms) | 5.4 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | DialScale result = (DialScale)this.scales.get(0); | ||||||||||||||||||||||||||||||||||||
6 | Comparable key = (Comparable)iterator.next(); |
| | |||||||||||||||||||||||||||||||||||
7 | Number explode = (Number)this.explodePercentages.get(key); |
| 2 | Integer scaleIndex = (Integer)this.datasetToScaleMap.get(datasetIndex); | ||||||||||||||||||||||||||||||||||
8 | if (explode != null) |
| 3 | if (scaleIndex != null) | ||||||||||||||||||||||||||||||||||
|
| 4 | result = getScale(scaleIndex.intValue()); | |||||||||||||||||||||||||||||||||||
9 | result = Math.max(result, explode.doubleValue()); |
| | |||||||||||||||||||||||||||||||||||
|
| 5 | return result; |
Row | Violation |
---|---|
1 | Unmatched statement Comparable key=(Comparable)iterator.next(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Expression (Number)this.explodePercentages.get(key) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Type java.lang.Comparable of variable key does not match with type int of variable datasetIndex |
4 | Type java.util.Map of variable this.explodePercentages does not match with type org.jfree.util.ObjectList of variable this.datasetToScaleMap |
5 | Unmatched statement result=getScale(scaleIndex.intValue()); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
6 | Unmatched statement result=Math.max(result,explode.doubleValue()); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
7 | Unmatched return result; |
8 | Clone fragment #1 returns variable explode with type java.lang.Number , while Clone fragment #2 returns variable scaleIndex with type java.lang.Integer |