CloneSet68


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

{
  this.labelDistributor.clear();
  double lGap = plotArea.getWidth() * this.labelGap;
  double verticalLinkRadius = state.getLinkArea().getHeight() / 2.0;
  for (int i = 0; i < leftKeys.getItemCount(); i++) {
    String label = this.labelGenerator.generateSectionLabel(this.dataset, leftKeys.getKey(i));
    if (label != null) {
      TextBlock block = TextUtilities.createTextBlock(label, this.labelFont, this.labelPaint, maxLabelWidth, new G2TextMeasurer(g2));
      TextBox labelBox = new TextBox(block);
      labelBox.setBackgroundPaint(this.labelBackgroundPaint);
      labelBox.setOutlinePaint(this.labelOutlinePaint);
      labelBox.setOutlineStroke(this.labelOutlineStroke);
      labelBox.setShadowPaint(this.labelShadowPaint);
      labelBox.setInteriorGap(this.labelPadding);
      double theta = Math.toRadians(leftKeys.getValue(i).doubleValue());
      double baseY = state.getPieCenterY() - Math.sin(theta) * verticalLinkRadius;
      double hh = labelBox.getHeight(g2);
      this.labelDistributor.addPieLabelRecord(new PieLabelRecord(leftKeys.getKey(i), theta, baseY, labelBox, hh, lGap / 2.0 + lGap / 2.0 * -Math.cos(theta), 0.9 + getExplodePercent(leftKeys.getKey(i))));
    }
  }
  double hh = plotArea.getHeight();
  double gap = hh * getInteriorGap();
  this.labelDistributor.distributeLabels(plotArea.getMinY() + gap, hh - 2 * gap);
  for (int i = 0; i < this.labelDistributor.getItemCount(); i++) {
    drawLeftLabel(g2, state, this.labelDistributor.getPieLabelRecord(i));
  }
}


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

{
  // draw the right labels...
  this.labelDistributor.clear();
  double lGap = plotArea.getWidth() * this.labelGap;
  double verticalLinkRadius = state.getLinkArea().getHeight() / 2.0;
  for (int i = 0; i < keys.getItemCount(); i++) {
    String label = this.labelGenerator.generateSectionLabel(this.dataset, keys.getKey(i));
    if (label != null) {
      TextBlock block = TextUtilities.createTextBlock(label, this.labelFont, this.labelPaint, maxLabelWidth, new G2TextMeasurer(g2));
      TextBox labelBox = new TextBox(block);
      labelBox.setBackgroundPaint(this.labelBackgroundPaint);
      labelBox.setOutlinePaint(this.labelOutlinePaint);
      labelBox.setOutlineStroke(this.labelOutlineStroke);
      labelBox.setShadowPaint(this.labelShadowPaint);
      labelBox.setInteriorGap(this.labelPadding);
      double theta = Math.toRadians(keys.getValue(i).doubleValue());
      double baseY = state.getPieCenterY() - Math.sin(theta) * verticalLinkRadius;
      double hh = labelBox.getHeight(g2);
      this.labelDistributor.addPieLabelRecord(new PieLabelRecord(keys.getKey(i), theta, baseY, labelBox, hh, lGap / 2.0 + lGap / 2.0 * Math.cos(theta), 0.9 + getExplodePercent(keys.getKey(i))));
    }
  }
  double hh = plotArea.getHeight();
  double gap = hh * getInteriorGap();
  this.labelDistributor.distributeLabels(plotArea.getMinY() + gap, hh - 2 * gap);
  for (int i = 0; i < this.labelDistributor.getItemCount(); i++) {
    drawRightLabel(g2, state, this.labelDistributor.getPieLabelRecord(i));
  }
}


Clone AbstractionParameter Count: 3Parameter Bindings

{
  // draw the right labels...
  this.labelDistributor.clear();
  double lGap = plotArea.getWidth() * this.labelGap;
  double verticalLinkRadius = state.getLinkArea().getHeight() / 2.0;
  for (int i = 0; i <  [[#variable150ea280]].getItemCount(); i++) {
    String label = this.labelGenerator.generateSectionLabel(this.dataset,  [[#variable150ea280]].getKey(i));
    if (label != null) {
      TextBlock block = TextUtilities.createTextBlock(label, this.labelFont, this.labelPaint, maxLabelWidth, new G2TextMeasurer(g2));
      TextBox labelBox = new TextBox(block);
      labelBox.setBackgroundPaint(this.labelBackgroundPaint);
      labelBox.setOutlinePaint(this.labelOutlinePaint);
      labelBox.setOutlineStroke(this.labelOutlineStroke);
      labelBox.setShadowPaint(this.labelShadowPaint);
      labelBox.setInteriorGap(this.labelPadding);
      double theta = Math.toRadians( [[#variable150ea280]].getValue(i).doubleValue());
      double baseY = state.getPieCenterY() - Math.sin(theta) * verticalLinkRadius;
      double hh = labelBox.getHeight(g2);
      this.labelDistributor.addPieLabelRecord(new PieLabelRecord( [[#variable150ea280]].getKey(i), theta, baseY, labelBox, hh, lGap / 2.0 + lGap / 2.0 *  [[#variable150ea1e0]], 0.9 + getExplodePercent( [[#variable150ea280]].getKey(i))));
    }
  }
  double hh = plotArea.getHeight();
  double gap = hh * getInteriorGap();
  this.labelDistributor.distributeLabels(plotArea.getMinY() + gap, hh - 2 * gap);
  for (int i = 0; i < this.labelDistributor.getItemCount(); i++) {
     [[#variable150ea0a0]](g2, state, this.labelDistributor.getPieLabelRecord(i));
  }
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#150ea280]]
leftKeys 
12[[#150ea280]]
keys 
21[[#150ea1e0]]
-Math.cos(theta) 
22[[#150ea1e0]]
Math.cos(theta) 
31[[#150ea0a0]]
drawLeftLabel 
32[[#150ea0a0]]
drawRightLabel