Program: 18460
Project: 18460
Buggy source:
@Override protected void onDraw(Canvas canvas){
  super.onDraw(canvas);
  if (mDataNotSet)   return;
  long starttime=System.currentTimeMillis();
  if (mXAxis.isAdjustXLabelsEnabled())   calcModulus();
  drawGridBackground(canvas);
  if (mAxisLeft.isEnabled())   mAxisRendererLeft.computeAxis(mAxisLeft.mAxisMinimum,mAxisLeft.mAxisMaximum);
  if (mAxisRight.isEnabled())   mAxisRendererRight.computeAxis(mAxisRight.mAxisMinimum,mAxisRight.mAxisMaximum);
  mXAxisRenderer.renderAxisLine(canvas);
  mAxisRendererLeft.renderAxisLine(canvas);
  mAxisRendererRight.renderAxisLine(canvas);
  int clipRestoreCount=canvas.save();
  canvas.clipRect(mViewPortHandler.getContentRect());
  mXAxisRenderer.renderGridLines(canvas);
  mAxisRendererLeft.renderGridLines(canvas);
  mAxisRendererRight.renderGridLines(canvas);
  if (mXAxis.isDrawLimitLinesBehindDataEnabled())   mXAxisRenderer.renderLimitLines(canvas);
  if (mAxisLeft.isDrawLimitLinesBehindDataEnabled())   mAxisRendererLeft.renderLimitLines(canvas);
  if (mAxisRight.isDrawLimitLinesBehindDataEnabled())   mAxisRendererRight.renderLimitLines(canvas);
  mRenderer.drawData(canvas);
  if (!mXAxis.isDrawLimitLinesBehindDataEnabled())   mXAxisRenderer.renderLimitLines(canvas);
  if (!mAxisLeft.isDrawLimitLinesBehindDataEnabled())   mAxisRendererLeft.renderLimitLines(canvas);
  if (!mAxisRight.isDrawLimitLinesBehindDataEnabled())   mAxisRendererRight.renderLimitLines(canvas);
  if (mHighlightEnabled && mHighLightIndicatorEnabled && valuesToHighlight())   mRenderer.drawHighlighted(canvas,mIndicesToHightlight);
  canvas.restoreToCount(clipRestoreCount);
  mRenderer.drawExtras(canvas);
  mXAxisRenderer.renderAxisLabels(canvas);
  mAxisRendererLeft.renderAxisLabels(canvas);
  mAxisRendererRight.renderAxisLabels(canvas);
  mRenderer.drawValues(canvas);
  mLegendRenderer.renderLegend(canvas);
  drawMarkers(canvas);
  drawDescription(canvas);
  if (mLogEnabled) {
    long drawtime=(System.currentTimeMillis() - starttime);
    totalTime+=drawtime;
    drawCycles+=1;
    long average=totalTime / drawCycles;
    Log.i(LOG_TAG,"String_Node_Str" + drawtime + "String_Node_Str"+ average+ "String_Node_Str"+ drawCycles);
  }
}

Fixed version (ground truth):
@Override protected void onDraw(Canvas canvas){
  super.onDraw(canvas);
  if (mDataNotSet)   return;
  long starttime=System.currentTimeMillis();
  if (mXAxis.isAdjustXLabelsEnabled())   calcModulus();
  mXAxisRenderer.calcXBounds(this,mXAxis.mAxisLabelModulus);
  mRenderer.calcXBounds(this,mXAxis.mAxisLabelModulus);
  drawGridBackground(canvas);
  if (mAxisLeft.isEnabled())   mAxisRendererLeft.computeAxis(mAxisLeft.mAxisMinimum,mAxisLeft.mAxisMaximum);
  if (mAxisRight.isEnabled())   mAxisRendererRight.computeAxis(mAxisRight.mAxisMinimum,mAxisRight.mAxisMaximum);
  mXAxisRenderer.renderAxisLine(canvas);
  mAxisRendererLeft.renderAxisLine(canvas);
  mAxisRendererRight.renderAxisLine(canvas);
  int clipRestoreCount=canvas.save();
  canvas.clipRect(mViewPortHandler.getContentRect());
  mXAxisRenderer.renderGridLines(canvas);
  mAxisRendererLeft.renderGridLines(canvas);
  mAxisRendererRight.renderGridLines(canvas);
  if (mXAxis.isDrawLimitLinesBehindDataEnabled())   mXAxisRenderer.renderLimitLines(canvas);
  if (mAxisLeft.isDrawLimitLinesBehindDataEnabled())   mAxisRendererLeft.renderLimitLines(canvas);
  if (mAxisRight.isDrawLimitLinesBehindDataEnabled())   mAxisRendererRight.renderLimitLines(canvas);
  mRenderer.drawData(canvas);
  if (!mXAxis.isDrawLimitLinesBehindDataEnabled())   mXAxisRenderer.renderLimitLines(canvas);
  if (!mAxisLeft.isDrawLimitLinesBehindDataEnabled())   mAxisRendererLeft.renderLimitLines(canvas);
  if (!mAxisRight.isDrawLimitLinesBehindDataEnabled())   mAxisRendererRight.renderLimitLines(canvas);
  if (mHighlightEnabled && mHighLightIndicatorEnabled && valuesToHighlight())   mRenderer.drawHighlighted(canvas,mIndicesToHightlight);
  canvas.restoreToCount(clipRestoreCount);
  mRenderer.drawExtras(canvas);
  mXAxisRenderer.renderAxisLabels(canvas);
  mAxisRendererLeft.renderAxisLabels(canvas);
  mAxisRendererRight.renderAxisLabels(canvas);
  mRenderer.drawValues(canvas);
  mLegendRenderer.renderLegend(canvas);
  drawMarkers(canvas);
  drawDescription(canvas);
  if (mLogEnabled) {
    long drawtime=(System.currentTimeMillis() - starttime);
    totalTime+=drawtime;
    drawCycles+=1;
    long average=totalTime / drawCycles;
    Log.i(LOG_TAG,"String_Node_Str" + drawtime + "String_Node_Str"+ average+ "String_Node_Str"+ drawCycles);
  }
}