CloneSet57


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
40230.981block
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
1402922
E:/TSE/Projects-CloneDR/jfreechart-1.0.10/src/org/jfree/chart/plot/PiePlot.java
2412973
E:/TSE/Projects-CloneDR/jfreechart-1.0.10/src/org/jfree/chart/plot/PiePlot.java
Next
Last
Clone Instance
1
Line Count
40
Source Line
2922
Source File
E:/TSE/Projects-CloneDR/jfreechart-1.0.10/src/org/jfree/chart/plot/PiePlot.java

{
  double anchorX = state.getLinkArea().getMinX();
  double targetX = anchorX - record.getGap();
  double targetY = record.getAllocatedY();
  if (this.labelLinksVisible) {
    double theta = record.getAngle();
    double linkX = state.getPieCenterX() + Math.cos(theta) * state.getPieWRadius() * record.getLinkPercent();
    double linkY = state.getPieCenterY() - Math.sin(theta) * state.getPieHRadius() * record.getLinkPercent();
    double elbowX = state.getPieCenterX() + Math.cos(theta) * state.getLinkArea().getWidth() / 2.0;
    double elbowY = state.getPieCenterY() - Math.sin(theta) * state.getLinkArea().getHeight() / 2.0;
    double anchorY = elbowY;
    g2.setPaint(this.labelLinkPaint);
    g2.setStroke(this.labelLinkStroke);
    PieLabelLinkStyle style = getLabelLinkStyle();
    if (style.equals(PieLabelLinkStyle.STANDARD)) {
      g2.draw(new Line2D.Double(linkX, linkY, elbowX, elbowY));
      g2.draw(new Line2D.Double(anchorX, anchorY, elbowX, elbowY));
      g2.draw(new Line2D.Double(anchorX, anchorY, targetX, targetY));
    }
    else
      if (style.equals(PieLabelLinkStyle.QUAD_CURVE)) {
        QuadCurve2D q = new QuadCurve2D.Float();
        q.setCurve(targetX, targetY, anchorX, anchorY, elbowX, elbowY);
        g2.draw(q);
        g2.draw(new Line2D.Double(elbowX, elbowY, linkX, linkY));
      }
      else
        if (style.equals(PieLabelLinkStyle.CUBIC_CURVE)) {
          CubicCurve2D c = new CubicCurve2D.Float();
          c.setCurve(targetX, targetY, anchorX, anchorY, elbowX, elbowY, linkX, linkY);
          g2.draw(c);
        }
  }
  TextBox tb = record.getLabel();
  tb.draw(g2, (float) targetX, (float) targetY, RectangleAnchor.RIGHT);
}


First
Previous
Clone Instance
2
Line Count
41
Source Line
2973
Source File
E:/TSE/Projects-CloneDR/jfreechart-1.0.10/src/org/jfree/chart/plot/PiePlot.java

{
  double anchorX = state.getLinkArea().getMaxX();
  double targetX = anchorX + record.getGap();
  double targetY = record.getAllocatedY();
  if (this.labelLinksVisible) {
    double theta = record.getAngle();
    double linkX = state.getPieCenterX() + Math.cos(theta) * state.getPieWRadius() * record.getLinkPercent();
    double linkY = state.getPieCenterY() - Math.sin(theta) * state.getPieHRadius() * record.getLinkPercent();
    double elbowX = state.getPieCenterX() + Math.cos(theta) * state.getLinkArea().getWidth() / 2.0;
    double elbowY = state.getPieCenterY() - Math.sin(theta) * state.getLinkArea().getHeight() / 2.0;
    double anchorY = elbowY;
    g2.setPaint(this.labelLinkPaint);
    g2.setStroke(this.labelLinkStroke);
    PieLabelLinkStyle style = getLabelLinkStyle();
    if (style.equals(PieLabelLinkStyle.STANDARD)) {
      g2.draw(new Line2D.Double(linkX, linkY, elbowX, elbowY));
      g2.draw(new Line2D.Double(anchorX, anchorY, elbowX, elbowY));
      g2.draw(new Line2D.Double(anchorX, anchorY, targetX, targetY));
    }
    else
      if (style.equals(PieLabelLinkStyle.QUAD_CURVE)) {
        QuadCurve2D q = new QuadCurve2D.Float();
        q.setCurve(targetX, targetY, anchorX, anchorY, elbowX, elbowY);
        g2.draw(q);
        g2.draw(new Line2D.Double(elbowX, elbowY, linkX, linkY));
      }
      else
        if (style.equals(PieLabelLinkStyle.CUBIC_CURVE)) {
          CubicCurve2D c = new CubicCurve2D.Float();
          c.setCurve(targetX, targetY, anchorX, anchorY, elbowX, elbowY, linkX, linkY);
          g2.draw(c);
        }
  }
  TextBox tb = record.getLabel();
  tb.draw(g2, (float) targetX, (float) targetY, RectangleAnchor.LEFT);
}


Clone AbstractionParameter Count: 3Parameter Bindings

{
  double anchorX = state.getLinkArea(). [[#variable15068180]]();
  double targetX = [[#variable150680c0]];
  double targetY = record.getAllocatedY();
  if (this.labelLinksVisible) {
    double theta = record.getAngle();
    double linkX = state.getPieCenterX() + Math.cos(theta) * state.getPieWRadius() * record.getLinkPercent();
    double linkY = state.getPieCenterY() - Math.sin(theta) * state.getPieHRadius() * record.getLinkPercent();
    double elbowX = state.getPieCenterX() + Math.cos(theta) * state.getLinkArea().getWidth() / 2.0;
    double elbowY = state.getPieCenterY() - Math.sin(theta) * state.getLinkArea().getHeight() / 2.0;
    double anchorY = elbowY;
    g2.setPaint(this.labelLinkPaint);
    g2.setStroke(this.labelLinkStroke);
    PieLabelLinkStyle style = getLabelLinkStyle();
    if (style.equals(PieLabelLinkStyle.STANDARD)) {
      g2.draw(new Line2D.Double(linkX, linkY, elbowX, elbowY));
      g2.draw(new Line2D.Double(anchorX, anchorY, elbowX, elbowY));
      g2.draw(new Line2D.Double(anchorX, anchorY, targetX, targetY));
    }
    else
      if (style.equals(PieLabelLinkStyle.QUAD_CURVE)) {
        QuadCurve2D q = new QuadCurve2D.Float();
        q.setCurve(targetX, targetY, anchorX, anchorY, elbowX, elbowY);
        g2.draw(q);
        g2.draw(new Line2D.Double(elbowX, elbowY, linkX, linkY));
      }
      else
        if (style.equals(PieLabelLinkStyle.CUBIC_CURVE)) {
          CubicCurve2D c = new CubicCurve2D.Float();
          c.setCurve(targetX, targetY, anchorX, anchorY, elbowX, elbowY, linkX, linkY);
          g2.draw(c);
        }
  }
  TextBox tb = record.getLabel();
  tb.draw(g2, (float) targetX, (float) targetY, RectangleAnchor. [[#variable15067c20]]);
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#15068180]]
getMinX 
12[[#15068180]]
getMaxX 
21[[#150680c0]]
anchorX - record.getGap() 
22[[#150680c0]]
anchorX + record.getGap() 
31[[#15067c20]]
RIGHT 
32[[#15067c20]]
LEFT