String tip = null;
if (getToolTipGenerator() != null) {
tip = this.toolTipGenerator.generateToolTip(data, k);
}
String url = null;
// if (getURLGenerator() != null) { //dmo: look at this later
// url = getURLGenerator().generateURL(data, series, item);
// }
// Unlike XYItemRenderer, we need to clone entityArea since it
// reused.
ContourEntity entity = new ContourEntity(
(RectangularShape) entityArea.clone(), tip, url);
entity.setIndex(k);
entities.add(entity);
String tip = "";
if (getToolTipGenerator() != null) {
tip = this.toolTipGenerator.generateToolTip(data, k);
}
// Shape s = g2.getClip();
// if (s.contains(rect) || s.intersects(rect)) {
String url = null;
// if (getURLGenerator() != null) { //dmo: look at this later
// url = getURLGenerator().generateURL(data, series, item);
// }
// Unlike XYItemRenderer, we need to clone entityArea since it
// reused.
ContourEntity entity = new ContourEntity(
(Rectangle2D.Double) entityArea.clone(), tip, url);
entity.setIndex(k);
entities.add(entity);
Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/ContourPlot.java
|
|
File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/ContourPlot.java
|
Method name: void pointRenderer(Graphics2D, Rectangle2D, PlotRenderingInfo, ContourPlot, ValueAxis, ValueAxis, ColorBar, ContourDataset, CrosshairState)
|
|
Method name: void contourRenderer(Graphics2D, Rectangle2D, PlotRenderingInfo, ContourPlot, ValueAxis, ValueAxis, ColorBar, ContourDataset, CrosshairState)
|
Number of AST nodes: 7
|
|
Number of AST nodes: 7
|
|
1 | String tip = null;↵ | | 1 | String tip = "";↵
|
2 | if (getToolTipGenerator() != null) {↵ | | 2 | if (getToolTipGenerator() != null) {↵
|
3 | tip = this.toolTipGenerator.generateToolTip(data, k);↵ | | 3 | tip = this.toolTipGenerator.generateToolTip(data, k);↵
|
4 | }↵ | | 4 | }↵
|
| | | 5 | // Shape s = g2.getClip();↵
|
| | | 6 | // if (s.contains(rect) || s.intersects(rect)) {↵
|
5 | String url = null;↵ | | 7 | String url = null;↵
|
6 | // if (getURLGenerator() != null) { //dmo: look at this later↵ | | 8 | // if (getURLGenerator() != null) { //dmo: look at this later↵
|
7 | // url = getURLGenerator().generateURL(data, series, item);↵ | | 9 | // url = getURLGenerator().generateURL(data, series, item);↵
|
8 | // }↵ | | 10 | // }↵
|
9 | // Unlike XYItemRenderer, we need to clone entityArea since it ↵ | | 11 | // Unlike XYItemRenderer, we need to clone entityArea since it ↵
|
10 | // reused.↵ | | 12 | // reused.↵
|
11 | ContourEntity entity = new ContourEntity(↵ | | 13 | ContourEntity entity = new ContourEntity(↵
|
12 | (RectangularShape) entityArea.clone(), tip, url);↵ | | 14 | (Rectangle2D.Double) entityArea.clone(), tip, url);↵
|
13 | entity.setIndex(k);↵ | | 15 | entity.setIndex(k);↵
|
14 | entities.add(entity); | | 16 | entities.add(entity);
|
See real code fragment |
|
See real code fragment |
Summary
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.2 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 19 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 7 |
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) | 3.2 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
35 | String tip = null; | | 89 | String tip = ""; |
36 | if (getToolTipGenerator() != null) | | 90 | if (getToolTipGenerator() != null) |
37 | tip = this.toolTipGenerator.generateToolTip(data, k); | | 91 | tip = this.toolTipGenerator.generateToolTip(data, k); |
38 | String url = null; | | 92 | String url = null; |
39 | ContourEntity entity = new ContourEntity((RectangularShape)entityArea.clone(), tip, url); | | 93 | ContourEntity entity = new ContourEntity((Rectangle2D.Double)entityArea.clone(), tip, url); |
40 | entity.setIndex(k); | | 94 | entity.setIndex(k); |
41 | entities.add(entity); | | 95 | entities.add(entity); |
Precondition Violations (0)
Row |
Violation |