Program: 18418
Project: 18418
Buggy source:
/** 
 * draws the description text in the center of the pie chart makes most sense when center-hole is enabled
 */
protected void drawCenterText(Canvas c){
  String centerText=mChart.getCenterText();
  if (mChart.isDrawCenterTextEnabled() && centerText != null) {
    PointF center=mChart.getCenterCircleBox();
    if (mChart.isCenterTextWordWrapEnabled()) {
      float innerRadius=mChart.isDrawHoleEnabled() && mChart.isHoleTransparent() ? mChart.getRadius() * (mChart.getHoleRadius() / 100f) : mChart.getRadius();
      RectF holeRect=mRectBuffer[0];
      holeRect.left=center.x - innerRadius;
      holeRect.top=center.y - innerRadius;
      holeRect.right=center.x + innerRadius;
      holeRect.bottom=center.y + innerRadius;
      RectF boundingRect=mRectBuffer[1];
      boundingRect.set(holeRect);
      float radiusPercent=mChart.getCenterTextRadiusPercent();
      if (radiusPercent > 0.0) {
        boundingRect.inset((boundingRect.width() - boundingRect.width() * radiusPercent) / 2.f,(boundingRect.height() - boundingRect.height() * radiusPercent) / 2.f);
      }
      if (!centerText.equals(mCenterTextLastValue) || !boundingRect.equals(mCenterTextLastBounds)) {
        mCenterTextLastBounds.set(boundingRect);
        mCenterTextLastValue=centerText;
        mCenterTextLayout=new StaticLayout(centerText,0,centerText.length(),mCenterTextPaint,(int)Math.max(Math.ceil(mCenterTextLastBounds.width()),1.f),Layout.Alignment.ALIGN_NORMAL,1.f,0.f,false);
      }
      float layoutWidth=Utils.getStaticLayoutMaxWidth(mCenterTextLayout), layoutHeight=mCenterTextLayout.getHeight();
      c.save();
      c.translate(boundingRect.centerX(),boundingRect.top + (boundingRect.height() - layoutHeight) / 2.f);
      mCenterTextLayout.draw(c);
      c.restore();
    }
 else {
      String[] lines=centerText.split("String_Node_Str");
      float maxlineheight=0f;
      for (      String line : lines) {
        float curHeight=Utils.calcTextHeight(mCenterTextPaint,line);
        if (curHeight > maxlineheight)         maxlineheight=curHeight;
      }
      float linespacing=maxlineheight * 0.25f;
      float totalheight=maxlineheight * lines.length - linespacing * (lines.length - 1);
      int cnt=lines.length;
      float y=center.y;
      for (int i=0; i < lines.length; i++) {
        String line=lines[lines.length - i - 1];
        c.drawText(line,center.x,y + maxlineheight * cnt - totalheight / 2f,mCenterTextPaint);
        cnt--;
        y-=linespacing;
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * draws the description text in the center of the pie chart makes most sense when center-hole is enabled
 */
protected void drawCenterText(Canvas c){
  String centerText=mChart.getCenterText();
  if (mChart.isDrawCenterTextEnabled() && centerText != null) {
    PointF center=mChart.getCenterCircleBox();
    if (mChart.isCenterTextWordWrapEnabled()) {
      float innerRadius=mChart.isDrawHoleEnabled() && mChart.isHoleTransparent() ? mChart.getRadius() * (mChart.getHoleRadius() / 100f) : mChart.getRadius();
      RectF holeRect=mRectBuffer[0];
      holeRect.left=center.x - innerRadius;
      holeRect.top=center.y - innerRadius;
      holeRect.right=center.x + innerRadius;
      holeRect.bottom=center.y + innerRadius;
      RectF boundingRect=mRectBuffer[1];
      boundingRect.set(holeRect);
      float radiusPercent=mChart.getCenterTextRadiusPercent();
      if (radiusPercent > 0.0) {
        boundingRect.inset((boundingRect.width() - boundingRect.width() * radiusPercent) / 2.f,(boundingRect.height() - boundingRect.height() * radiusPercent) / 2.f);
      }
      if (!centerText.equals(mCenterTextLastValue) || !boundingRect.equals(mCenterTextLastBounds)) {
        mCenterTextLastBounds.set(boundingRect);
        mCenterTextLastValue=centerText;
        mCenterTextLayout=new StaticLayout(centerText,0,centerText.length(),mCenterTextPaint,(int)Math.max(Math.ceil(mCenterTextLastBounds.width()),1.f),Layout.Alignment.ALIGN_NORMAL,1.f,0.f,false);
      }
      float layoutHeight=mCenterTextLayout.getHeight();
      c.save();
      c.translate(boundingRect.centerX(),boundingRect.top + (boundingRect.height() - layoutHeight) / 2.f);
      mCenterTextLayout.draw(c);
      c.restore();
    }
 else {
      String[] lines=centerText.split("String_Node_Str");
      float maxlineheight=0f;
      for (      String line : lines) {
        float curHeight=Utils.calcTextHeight(mCenterTextPaint,line);
        if (curHeight > maxlineheight)         maxlineheight=curHeight;
      }
      float linespacing=maxlineheight * 0.25f;
      float totalheight=maxlineheight * lines.length - linespacing * (lines.length - 1);
      int cnt=lines.length;
      float y=center.y;
      for (int i=0; i < lines.length; i++) {
        String line=lines[lines.length - i - 1];
        c.drawText(line,center.x,y + maxlineheight * cnt - totalheight / 2f,mCenterTextPaint);
        cnt--;
        y-=linespacing;
      }
    }
  }
}