Program: 18603
Project: 18603
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);
  int clipRestoreCount=canvas.save();
  canvas.clipRect(mViewPortHandler.getContentRect());
  mXAxisRenderer.renderGridLines(canvas);
  mAxisRendererLeft.renderGridLines(canvas);
  mAxisRendererRight.renderGridLines(canvas);
  mRenderer.drawData(canvas);
  mAxisRendererLeft.renderLimitLines(canvas);
  mAxisRendererRight.renderLimitLines(canvas);
  if (mHighlightEnabled && mHighLightIndicatorEnabled && valuesToHighlight())   mRenderer.drawHighlighted(canvas,mIndicesToHightlight);
  canvas.restoreToCount(clipRestoreCount);
  mRenderer.drawExtras(canvas);
  mXAxisRenderer.renderAxisLabels(canvas);
  mXAxisRenderer.renderAxisLine(canvas);
  mAxisRendererLeft.renderAxisLabels(canvas);
  mAxisRendererLeft.renderAxisLine(canvas);
  mAxisRendererRight.renderAxisLabels(canvas);
  mAxisRendererRight.renderAxisLine(canvas);
  mRenderer.drawValues(canvas);
  mLegendRenderer.renderLegend(canvas,mLegend);
  drawMarkers(canvas);
  drawDescription(canvas);
  if (true) {
    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();
  drawGridBackground(canvas);
  if (mAxisLeft.isEnabled())   mAxisRendererLeft.computeAxis(mAxisLeft.mAxisMinimum,mAxisLeft.mAxisMaximum);
  if (mAxisRight.isEnabled())   mAxisRendererRight.computeAxis(mAxisRight.mAxisMinimum,mAxisRight.mAxisMaximum);
  int clipRestoreCount=canvas.save();
  canvas.clipRect(mViewPortHandler.getContentRect());
  mXAxisRenderer.renderGridLines(canvas);
  mAxisRendererLeft.renderGridLines(canvas);
  mAxisRendererRight.renderGridLines(canvas);
  mRenderer.drawData(canvas);
  mAxisRendererLeft.renderLimitLines(canvas);
  mAxisRendererRight.renderLimitLines(canvas);
  if (mHighlightEnabled && mHighLightIndicatorEnabled && valuesToHighlight())   mRenderer.drawHighlighted(canvas,mIndicesToHightlight);
  canvas.restoreToCount(clipRestoreCount);
  mRenderer.drawExtras(canvas);
  mXAxisRenderer.renderAxisLabels(canvas);
  mXAxisRenderer.renderAxisLine(canvas);
  mAxisRendererLeft.renderAxisLabels(canvas);
  mAxisRendererLeft.renderAxisLine(canvas);
  mAxisRendererRight.renderAxisLabels(canvas);
  mAxisRendererRight.renderAxisLine(canvas);
  mRenderer.drawValues(canvas);
  mLegendRenderer.renderLegend(canvas,mLegend);
  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);
  }
}