nus-yam/ex-repair huggingface dataset:
Program: 26749
Project: 26749
Buggy source:
@Override public View onCreateView(LayoutInflater inflater,ViewGroup container,Bundle savedInstanceState){
  View v=inflater.inflate(R.layout.frag_simple_scatter,container,false);
  mChart=(ScatterChart)v.findViewById(R.id.scatterChart1);
  mChart.setDescription("String_Node_Str");
  Typeface tf=Typeface.createFromAsset(getActivity().getAssets(),"String_Node_Str");
  YAxis labels=mChart.getAxisLeft();
  labels.setTypeface(tf);
  MyMarkerView mv=new MyMarkerView(getActivity(),R.layout.custom_marker_view);
  mChart.setMarkerView(mv);
  mChart.setHighlightIndicatorEnabled(false);
  mChart.setDrawBorder(false);
  mChart.setDrawGridBackground(false);
  mChart.setDrawXLabels(false);
  mChart.setData(generateScatterData(3,10000,150));
  XAxis xAxis=mChart.getXAxis();
  xAxis.setDrawGridLines(false);
  Legend l=mChart.getLegend();
  l.setTypeface(tf);
  return v;
}

Fixed version (ground truth):
@Override public View onCreateView(LayoutInflater inflater,ViewGroup container,Bundle savedInstanceState){
  View v=inflater.inflate(R.layout.frag_simple_scatter,container,false);
  mChart=(ScatterChart)v.findViewById(R.id.scatterChart1);
  mChart.setDescription("String_Node_Str");
  Typeface tf=Typeface.createFromAsset(getActivity().getAssets(),"String_Node_Str");
  MyMarkerView mv=new MyMarkerView(getActivity(),R.layout.custom_marker_view);
  mChart.setMarkerView(mv);
  mChart.setHighlightIndicatorEnabled(false);
  mChart.setDrawBorder(false);
  mChart.setDrawGridBackground(false);
  mChart.setData(generateScatterData(3,10000,150));
  XAxis xAxis=mChart.getXAxis();
  xAxis.setEnabled(false);
  YAxis leftAxis=mChart.getAxisLeft();
  leftAxis.setTypeface(tf);
  YAxis rightAxis=mChart.getAxisRight();
  rightAxis.setTypeface(tf);
  rightAxis.setDrawGridLines(false);
  Legend l=mChart.getLegend();
  l.setTypeface(tf);
  return v;
}
Program: 26750
Project: 26750
Buggy source:
@Override public View onCreateView(LayoutInflater inflater,ViewGroup container,Bundle savedInstanceState){
  View v=inflater.inflate(R.layout.frag_simple_line,container,false);
  mChart=(LineChart)v.findViewById(R.id.lineChart1);
  mChart.setDescription("String_Node_Str");
  mChart.setHighlightIndicatorEnabled(false);
  mChart.setDrawBorder(false);
  mChart.setDrawGridBackground(false);
  mChart.setDrawXLabels(false);
  mChart.setData(generateLineData());
  mChart.animateX(3000);
  Typeface tf=Typeface.createFromAsset(getActivity().getAssets(),"String_Node_Str");
  Legend l=mChart.getLegend();
  l.setTypeface(tf);
  YAxis labels=mChart.getAxisLeft();
  labels.setTypeface(tf);
  XAxis xAxis=mChart.getXAxis();
  xAxis.setDrawGridLines(false);
  return v;
}

Fixed version (ground truth):
@Override public View onCreateView(LayoutInflater inflater,ViewGroup container,Bundle savedInstanceState){
  View v=inflater.inflate(R.layout.frag_simple_line,container,false);
  mChart=(LineChart)v.findViewById(R.id.lineChart1);
  mChart.setDescription("String_Node_Str");
  mChart.setHighlightIndicatorEnabled(false);
  mChart.setDrawBorder(false);
  mChart.setDrawGridBackground(false);
  mChart.setData(generateLineData());
  mChart.animateX(3000);
  Typeface tf=Typeface.createFromAsset(getActivity().getAssets(),"String_Node_Str");
  Legend l=mChart.getLegend();
  l.setTypeface(tf);
  YAxis leftAxis=mChart.getAxisLeft();
  leftAxis.setTypeface(tf);
  leftAxis.setStartAtZero(false);
  leftAxis.setAxisMaxValue(1.2f);
  leftAxis.setAxisMinValue(-1.2f);
  mChart.getAxisRight().setEnabled(false);
  XAxis xAxis=mChart.getXAxis();
  xAxis.setEnabled(false);
  return v;
}
Program: 26751
Project: 26751
Buggy source:
public BarChartItem(ChartData cd,Context c){
  super(cd);
  mTf=Typeface.createFromAsset(c.getAssets(),"String_Node_Str");
}

Fixed version (ground truth):
public BarChartItem(ChartData<?> cd,Context c){
  super(cd);
  mTf=Typeface.createFromAsset(c.getAssets(),"String_Node_Str");
}
Program: 26752
Project: 26752
Buggy source:
public ChartItem(ChartData cd){
  this.mChartData=cd;
}

Fixed version (ground truth):
public ChartItem(ChartData<?> cd){
  this.mChartData=cd;
}
Program: 26753
Project: 26753
Buggy source:
public LineChartItem(ChartData cd,Context c){
  super(cd);
  mTf=Typeface.createFromAsset(c.getAssets(),"String_Node_Str");
}

Fixed version (ground truth):
public LineChartItem(ChartData<?> cd,Context c){
  super(cd);
  mTf=Typeface.createFromAsset(c.getAssets(),"String_Node_Str");
}
Program: 26754
Project: 26754
Buggy source:
public PieChartItem(ChartData cd,Context c){
  super(cd);
  mTf=Typeface.createFromAsset(c.getAssets(),"String_Node_Str");
}

Fixed version (ground truth):
public PieChartItem(ChartData<?> cd,Context c){
  super(cd);
  mTf=Typeface.createFromAsset(c.getAssets(),"String_Node_Str");
}
Program: 26756
Project: 26756
Buggy source:
@Override protected void init(){
  super.init();
  setDrawXLabels(false);
}

Fixed version (ground truth):
@Override protected void init(){
  super.init();
}
Program: 26758
Project: 26758
Buggy source:
@Override protected void calcMinMax(boolean fixedValues){
  super.calcMinMax(fixedValues);
  mDeltaX++;
  mDeltaX*=mData.getDataSetCount();
  int maxEntry=0;
  for (int i=0; i < mData.getDataSetCount(); i++) {
    DataSet<? extends Entry> set=mData.getDataSetByIndex(i);
    if (maxEntry < set.getEntryCount())     maxEntry=set.getEntryCount();
  }
  float groupSpace=mData.getGroupSpace();
  mDeltaX+=maxEntry * groupSpace;
}

Fixed version (ground truth):
@Override protected void calcMinMax(){
  super.calcMinMax();
  mDeltaX++;
  mDeltaX*=mData.getDataSetCount();
  int maxEntry=0;
  for (int i=0; i < mData.getDataSetCount(); i++) {
    DataSet<? extends Entry> set=mData.getDataSetByIndex(i);
    if (maxEntry < set.getEntryCount())     maxEntry=set.getEntryCount();
  }
  float groupSpace=mData.getGroupSpace();
  mDeltaX+=maxEntry * groupSpace;
}
Program: 26759
Project: 26759
Buggy source:
@Override public void notifyDataSetChanged(){
  if (mDataNotSet) {
    if (mLogEnabled)     Log.i(LOG_TAG,"String_Node_Str");
    return;
  }
 else {
    if (mLogEnabled)     Log.i(LOG_TAG,"String_Node_Str");
  }
  calcMinMax(false);
  float minLeft=mData.getYMin(AxisDependency.LEFT);
  float maxLeft=mData.getYMax(AxisDependency.LEFT);
  float minRight=mData.getYMin(AxisDependency.RIGHT);
  float maxRight=mData.getYMax(AxisDependency.RIGHT);
  mAxisRendererLeft.computeAxis(minLeft,maxLeft);
  mAxisRendererRight.computeAxis(minRight,maxRight);
  mXAxisRenderer.computeAxis(mData.getXValAverageLength(),mData.getXVals());
  prepareLegend();
  calculateOffsets();
}

Fixed version (ground truth):
@Override public void notifyDataSetChanged(){
  if (mDataNotSet) {
    if (mLogEnabled)     Log.i(LOG_TAG,"String_Node_Str");
    return;
  }
 else {
    if (mLogEnabled)     Log.i(LOG_TAG,"String_Node_Str");
  }
  calcMinMax();
  mAxisRendererLeft.computeAxis(mAxisLeft.mAxisMinimum,mAxisLeft.mAxisMaximum);
  mAxisRendererRight.computeAxis(mAxisRight.mAxisMinimum,mAxisRight.mAxisMaximum);
  mXAxisRenderer.computeAxis(mData.getXValAverageLength(),mData.getXVals());
  prepareLegend();
  calculateOffsets();
}
Program: 26761
Project: 26761
Buggy source:
@Override protected void calcMinMax(boolean fixedValues){
  float minLeft=mData.getYMin(AxisDependency.LEFT);
  float maxLeft=mData.getYMax(AxisDependency.LEFT);
  float minRight=mData.getYMin(AxisDependency.RIGHT);
  float maxRight=mData.getYMax(AxisDependency.RIGHT);
  mDeltaX=mData.getXVals().size() - 1;
  mDeltaYLeft=Math.abs(maxLeft - minLeft);
  mDeltaYRight=Math.abs(maxRight - minRight);
  mAxisLeft.mAxisMaximum=maxLeft;
  mAxisRight.mAxisMaximum=maxRight;
  mAxisLeft.mAxisMinimum=minLeft;
  mAxisRight.mAxisMinimum=minRight;
}

Fixed version (ground truth):
@Override protected void calcMinMax(){
  float minLeft=mData.getYMin(AxisDependency.LEFT);
  float maxLeft=mData.getYMax(AxisDependency.LEFT);
  float minRight=mData.getYMin(AxisDependency.RIGHT);
  float maxRight=mData.getYMax(AxisDependency.RIGHT);
  float leftRange=Math.abs(maxLeft - minLeft);
  float rightRange=Math.abs(maxRight - minRight);
  float topSpaceLeft=leftRange / 100f * mAxisLeft.getSpaceTop();
  float topSpaceRight=rightRange / 100f * mAxisRight.getSpaceTop();
  float bottomSpaceLeft=leftRange / 100f * mAxisLeft.getSpaceBottom();
  float bottomSpaceRight=rightRange / 100f * mAxisRight.getSpaceBottom();
  mDeltaX=mData.getXVals().size() - 1;
  mAxisLeft.mAxisMaximum=maxLeft + topSpaceLeft;
  mAxisRight.mAxisMaximum=maxRight + topSpaceRight;
  mAxisLeft.mAxisMinimum=minLeft - bottomSpaceLeft;
  mAxisRight.mAxisMinimum=minRight - bottomSpaceRight;
  mDeltaYLeft=Math.abs(mAxisLeft.mAxisMaximum - mAxisLeft.mAxisMinimum);
  mDeltaYRight=Math.abs(mAxisRight.mAxisMaximum - mAxisRight.mAxisMinimum);
}
Program: 26762
Project: 26762
Buggy source:
@Override protected void calcMinMax(boolean fixedValues){
  super.calcMinMax(fixedValues);
  mDeltaX++;
}

Fixed version (ground truth):
@Override protected void calcMinMax(){
  super.calcMinMax();
  mDeltaX++;
}
Program: 26763
Project: 26763
Buggy source:
/** 
 * calcualtes the y-min and y-max value and the y-delta and x-delta value
 */
protected abstract void calcMinMax(boolean fixedValues);

Fixed version (ground truth):
/** 
 * calcualtes the y-min and y-max value and the y-delta and x-delta value
 */
protected abstract void calcMinMax();
Program: 26764
Project: 26764
Buggy source:
@Override protected void calcMinMax(boolean fixedValues){
  super.calcMinMax(fixedValues);
  if (mDeltaX == 0 && mData.getYValCount() > 0)   mDeltaX=1;
}

Fixed version (ground truth):
@Override protected void calcMinMax(){
  super.calcMinMax();
  if (mDeltaX == 0 && mData.getYValCount() > 0)   mDeltaX=1;
}
Program: 26765
Project: 26765
Buggy source:
@Override protected void calcMinMax(boolean fixedValues){
  super.calcMinMax(fixedValues);
  calcAngles();
}

Fixed version (ground truth):
@Override protected void calcMinMax(){
  super.calcMinMax();
  calcAngles();
}
Program: 26766
Project: 26766
Buggy source:
@Override protected void calcMinMax(boolean fixedValues){
  mDeltaX=mData.getXVals().size() - 1;
}

Fixed version (ground truth):
@Override protected void calcMinMax(){
  mDeltaX=mData.getXVals().size() - 1;
}
Program: 26767
Project: 26767
Buggy source:
@Override public void notifyDataSetChanged(){
  if (mDataNotSet)   return;
  calcMinMax(false);
  prepareLegend();
  calculateOffsets();
}

Fixed version (ground truth):
@Override public void notifyDataSetChanged(){
  if (mDataNotSet)   return;
  calcMinMax();
  prepareLegend();
  calculateOffsets();
}
Program: 26768
Project: 26768
Buggy source:
@Override protected void calcMinMax(boolean fixedValues){
  super.calcMinMax(fixedValues);
  if (mYAxis.mAxisMaximum <= 0)   mYAxis.mAxisMaximum=1f;
  mYAxis.mAxisMinimum=0;
}

Fixed version (ground truth):
@Override protected void calcMinMax(){
  super.calcMinMax();
  if (mYAxis.mAxisMaximum <= 0)   mYAxis.mAxisMaximum=1f;
  mYAxis.mAxisMinimum=0;
}
Program: 26769
Project: 26769
Buggy source:
@Override protected void calcMinMax(boolean fixedValues){
  super.calcMinMax(fixedValues);
  if (mDeltaX == 0 && mData.getYValCount() > 0)   mDeltaX=1;
}

Fixed version (ground truth):
@Override protected void calcMinMax(){
  super.calcMinMax();
  if (mDeltaX == 0 && mData.getYValCount() > 0)   mDeltaX=1;
}
Program: 26770
Project: 26770
Buggy source:
/** 
 * Computes the axis values.
 * @param yMin - the minimum y-value in the data object for this axis
 * @param yMax - the maximum y-value in the data object for this axis
 */
public void computeAxis(float yMin,float yMax){
  if (mViewPortHandler.contentWidth() > 10 && !mViewPortHandler.isFullyZoomedOutY()) {
    PointD p1=mTrans.getValuesByTouchPoint(mViewPortHandler.contentLeft(),mViewPortHandler.contentTop());
    PointD p2=mTrans.getValuesByTouchPoint(mViewPortHandler.contentLeft(),mViewPortHandler.contentBottom());
    if (!mYAxis.isInverted()) {
      yMin=(float)p2.y;
      yMax=(float)p1.y;
    }
 else {
      if (!mYAxis.isStartAtZeroEnabled())       yMin=(float)Math.min(p1.y,p2.y);
 else       yMin=0;
      yMax=(float)Math.max(p1.y,p2.y);
    }
  }
 else {
    if (!Float.isNaN(mYAxis.getAxisMaxValue())) {
      yMax=mYAxis.getAxisMaxValue();
    }
    if (!Float.isNaN(mYAxis.getAxisMinValue())) {
      yMin=mYAxis.getAxisMinValue();
    }
 else {
      if (mYAxis.isStartAtZeroEnabled()) {
        yMin=0;
      }
    }
  }
  computeAxisValues(yMin,yMax);
}

Fixed version (ground truth):
/** 
 * Computes the axis values.
 * @param yMin - the minimum y-value in the data object for this axis
 * @param yMax - the maximum y-value in the data object for this axis
 */
public void computeAxis(float yMin,float yMax){
  if (mViewPortHandler.contentWidth() > 10 && !mViewPortHandler.isFullyZoomedOutY()) {
    PointD p1=mTrans.getValuesByTouchPoint(mViewPortHandler.contentLeft(),mViewPortHandler.contentTop());
    PointD p2=mTrans.getValuesByTouchPoint(mViewPortHandler.contentLeft(),mViewPortHandler.contentBottom());
    if (!mYAxis.isInverted()) {
      yMin=(float)p2.y;
      yMax=(float)p1.y;
    }
 else {
      if (!mYAxis.isStartAtZeroEnabled())       yMin=(float)Math.min(p1.y,p2.y);
 else       yMin=0;
      yMax=(float)Math.max(p1.y,p2.y);
    }
  }
 else {
    if (!Float.isNaN(mYAxis.getAxisMaxValue())) {
      yMax=mYAxis.getAxisMaxValue();
    }
    if (!Float.isNaN(mYAxis.getAxisMinValue())) {
      yMin=mYAxis.getAxisMinValue();
    }
  }
  computeAxisValues(yMin,yMax);
}
Program: 26771
Project: 26771
Buggy source:
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN);
  setContentView(R.layout.activity_barchart);
  tvX=(TextView)findViewById(R.id.tvXMax);
  tvY=(TextView)findViewById(R.id.tvYMax);
  mSeekBarX=(SeekBar)findViewById(R.id.seekBar1);
  mSeekBarX.setOnSeekBarChangeListener(this);
  mSeekBarY=(SeekBar)findViewById(R.id.seekBar2);
  mSeekBarY.setOnSeekBarChangeListener(this);
  mChart=(BarChart)findViewById(R.id.chart1);
  mChart.setDescription("String_Node_Str");
  mChart.setMaxVisibleValueCount(60);
  mChart.setPinchZoom(false);
  mChart.setDrawBarShadow(false);
  mChart.setDrawVerticalGrid(false);
  mChart.setDrawHorizontalGrid(false);
  mChart.setDrawGridBackground(false);
  XAxis xAxis=mChart.getXAxis();
  xAxis.setPosition(XLabelPosition.BOTTOM);
  xAxis.setCenterXLabelText(true);
  xAxis.setSpaceBetweenLabels(0);
  mChart.setDrawLegend(false);
  mSeekBarX.setProgress(10);
  mSeekBarY.setProgress(100);
  mChart.animateY(2500);
}

Fixed version (ground truth):
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN);
  setContentView(R.layout.activity_barchart);
  tvX=(TextView)findViewById(R.id.tvXMax);
  tvY=(TextView)findViewById(R.id.tvYMax);
  mSeekBarX=(SeekBar)findViewById(R.id.seekBar1);
  mSeekBarX.setOnSeekBarChangeListener(this);
  mSeekBarY=(SeekBar)findViewById(R.id.seekBar2);
  mSeekBarY.setOnSeekBarChangeListener(this);
  mChart=(BarChart)findViewById(R.id.chart1);
  mChart.setDescription("String_Node_Str");
  mChart.setMaxVisibleValueCount(60);
  mChart.setPinchZoom(false);
  mChart.setDrawBarShadow(false);
  mChart.setDrawGridBackground(false);
  XAxis xAxis=mChart.getXAxis();
  xAxis.setPosition(XLabelPosition.BOTTOM);
  xAxis.setCenterXLabelText(true);
  xAxis.setSpaceBetweenLabels(0);
  xAxis.setDrawGridLines(false);
  mChart.getAxisLeft().setDrawGridLines(false);
  mChart.setDrawLegend(false);
  mSeekBarX.setProgress(10);
  mSeekBarY.setProgress(100);
  mChart.animateY(2500);
}
Program: 26772
Project: 26772
Buggy source:
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN);
  setContentView(R.layout.activity_barchart);
  tvX=(TextView)findViewById(R.id.tvXMax);
  tvY=(TextView)findViewById(R.id.tvYMax);
  mSeekBarX=(SeekBar)findViewById(R.id.seekBar1);
  mSeekBarY=(SeekBar)findViewById(R.id.seekBar2);
  mChart=(BarChart)findViewById(R.id.chart1);
  mChart.setOnChartValueSelectedListener(this);
  mChart.setDrawValueAboveBar(true);
  mChart.setDescription("String_Node_Str");
  mChart.setMaxVisibleValueCount(60);
  mChart.setPinchZoom(false);
  mChart.setDrawGridBackground(false);
  mChart.setDrawHorizontalGrid(true);
  mChart.setDrawVerticalGrid(false);
  mChart.setValueTextSize(10f);
  mChart.setDrawBorder(false);
  Typeface tf=Typeface.createFromAsset(getAssets(),"String_Node_Str");
  XAxis xl=mChart.getXAxis();
  xl.setPosition(XLabelPosition.BOTTOM);
  xl.setCenterXLabelText(true);
  xl.setTypeface(tf);
  YAxis yl=mChart.getAxisLeft();
  yl.setTypeface(tf);
  yl.setLabelCount(8);
  mChart.setValueTypeface(tf);
  setData(12,50);
  mSeekBarY.setProgress(50);
  mSeekBarX.setProgress(12);
  mSeekBarY.setOnSeekBarChangeListener(this);
  mSeekBarX.setOnSeekBarChangeListener(this);
  Legend l=mChart.getLegend();
  l.setPosition(LegendPosition.BELOW_CHART_LEFT);
  l.setFormSize(8f);
  l.setXEntrySpace(4f);
}

Fixed version (ground truth):
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN);
  setContentView(R.layout.activity_barchart);
  tvX=(TextView)findViewById(R.id.tvXMax);
  tvY=(TextView)findViewById(R.id.tvYMax);
  mSeekBarX=(SeekBar)findViewById(R.id.seekBar1);
  mSeekBarY=(SeekBar)findViewById(R.id.seekBar2);
  mChart=(BarChart)findViewById(R.id.chart1);
  mChart.setOnChartValueSelectedListener(this);
  mChart.setDrawValueAboveBar(true);
  mChart.setDescription("String_Node_Str");
  mChart.setMaxVisibleValueCount(60);
  mChart.setPinchZoom(false);
  mChart.setDrawGridBackground(false);
  mChart.setValueTextSize(10f);
  mChart.setDrawBorder(false);
  Typeface tf=Typeface.createFromAsset(getAssets(),"String_Node_Str");
  XAxis xl=mChart.getXAxis();
  xl.setPosition(XLabelPosition.BOTTOM);
  xl.setCenterXLabelText(true);
  xl.setTypeface(tf);
  xl.setDrawGridLines(false);
  YAxis yl=mChart.getAxisLeft();
  yl.setTypeface(tf);
  yl.setLabelCount(8);
  mChart.getAxisRight().setDrawGridLines(false);
  mChart.setValueTypeface(tf);
  setData(12,50);
  mSeekBarY.setProgress(50);
  mSeekBarX.setProgress(12);
  mSeekBarY.setOnSeekBarChangeListener(this);
  mSeekBarX.setOnSeekBarChangeListener(this);
  Legend l=mChart.getLegend();
  l.setPosition(LegendPosition.BELOW_CHART_LEFT);
  l.setFormSize(8f);
  l.setXEntrySpace(4f);
}
Program: 26773
Project: 26773
Buggy source:
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN);
  setContentView(R.layout.activity_barchart);
  tvX=(TextView)findViewById(R.id.tvXMax);
  tvY=(TextView)findViewById(R.id.tvYMax);
  mSeekBarX=(SeekBar)findViewById(R.id.seekBar1);
  mSeekBarX.setOnSeekBarChangeListener(this);
  mSeekBarY=(SeekBar)findViewById(R.id.seekBar2);
  mSeekBarY.setOnSeekBarChangeListener(this);
  mChart=(BarChart)findViewById(R.id.chart1);
  mChart.setOnChartValueSelectedListener(this);
  mChart.setDescription("String_Node_Str");
  mChart.setPinchZoom(false);
  mChart.setValueFormatter(new LargeValueFormatter());
  mChart.setDrawBarShadow(false);
  mChart.setDrawGridBackground(false);
  mChart.setDrawHorizontalGrid(false);
  MyMarkerView mv=new MyMarkerView(this,R.layout.custom_marker_view);
  mChart.setMarkerView(mv);
  mSeekBarX.setProgress(10);
  mSeekBarY.setProgress(100);
  Typeface tf=Typeface.createFromAsset(getAssets(),"String_Node_Str");
  Legend l=mChart.getLegend();
  l.setPosition(LegendPosition.RIGHT_OF_CHART_INSIDE);
  l.setTypeface(tf);
  XAxis xl=mChart.getXAxis();
  xl.setCenterXLabelText(true);
  xl.setTypeface(tf);
  YAxis yl=mChart.getAxisLeft();
  yl.setTypeface(tf);
  yl.setFormatter(new LargeValueFormatter());
  mChart.setValueTypeface(tf);
}

Fixed version (ground truth):
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN);
  setContentView(R.layout.activity_barchart);
  tvX=(TextView)findViewById(R.id.tvXMax);
  tvY=(TextView)findViewById(R.id.tvYMax);
  mSeekBarX=(SeekBar)findViewById(R.id.seekBar1);
  mSeekBarX.setOnSeekBarChangeListener(this);
  mSeekBarY=(SeekBar)findViewById(R.id.seekBar2);
  mSeekBarY.setOnSeekBarChangeListener(this);
  mChart=(BarChart)findViewById(R.id.chart1);
  mChart.setOnChartValueSelectedListener(this);
  mChart.setDescription("String_Node_Str");
  mChart.setPinchZoom(false);
  mChart.setValueFormatter(new LargeValueFormatter());
  mChart.setDrawBarShadow(false);
  mChart.setDrawGridBackground(false);
  MyMarkerView mv=new MyMarkerView(this,R.layout.custom_marker_view);
  mChart.setMarkerView(mv);
  mSeekBarX.setProgress(10);
  mSeekBarY.setProgress(100);
  Typeface tf=Typeface.createFromAsset(getAssets(),"String_Node_Str");
  Legend l=mChart.getLegend();
  l.setPosition(LegendPosition.RIGHT_OF_CHART_INSIDE);
  l.setTypeface(tf);
  XAxis xl=mChart.getXAxis();
  xl.setCenterXLabelText(true);
  xl.setTypeface(tf);
  YAxis leftAxis=mChart.getAxisLeft();
  leftAxis.setTypeface(tf);
  leftAxis.setFormatter(new LargeValueFormatter());
  leftAxis.setDrawGridLines(false);
  leftAxis.setSpaceTop(25f);
  mChart.getAxisRight().setEnabled(false);
  mChart.setValueTypeface(tf);
}
Program: 26774
Project: 26774
Buggy source:
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN);
  setContentView(R.layout.activity_candlechart);
  tvX=(TextView)findViewById(R.id.tvXMax);
  tvY=(TextView)findViewById(R.id.tvYMax);
  mSeekBarX=(SeekBar)findViewById(R.id.seekBar1);
  mSeekBarX.setOnSeekBarChangeListener(this);
  mSeekBarY=(SeekBar)findViewById(R.id.seekBar2);
  mSeekBarY.setOnSeekBarChangeListener(this);
  mChart=(CandleStickChart)findViewById(R.id.chart1);
  mChart.setDescription("String_Node_Str");
  mChart.setMaxVisibleValueCount(60);
  mChart.setPinchZoom(false);
  mChart.setDrawVerticalGrid(false);
  mChart.setDrawGridBackground(false);
  XAxis xLabels=mChart.getXAxis();
  xLabels.setPosition(XLabelPosition.BOTTOM);
  xLabels.setCenterXLabelText(true);
  xLabels.setSpaceBetweenLabels(2);
  YAxis yLabels=mChart.getAxisLeft();
  yLabels.setLabelCount(7);
  mChart.setDrawLegend(false);
  mSeekBarX.setProgress(15);
  mSeekBarY.setProgress(100);
}

Fixed version (ground truth):
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN);
  setContentView(R.layout.activity_candlechart);
  tvX=(TextView)findViewById(R.id.tvXMax);
  tvY=(TextView)findViewById(R.id.tvYMax);
  mSeekBarX=(SeekBar)findViewById(R.id.seekBar1);
  mSeekBarX.setOnSeekBarChangeListener(this);
  mSeekBarY=(SeekBar)findViewById(R.id.seekBar2);
  mSeekBarY.setOnSeekBarChangeListener(this);
  mChart=(CandleStickChart)findViewById(R.id.chart1);
  mChart.setDescription("String_Node_Str");
  mChart.setMaxVisibleValueCount(60);
  mChart.setPinchZoom(false);
  mChart.setDrawGridBackground(false);
  XAxis xLabels=mChart.getXAxis();
  xLabels.setPosition(XLabelPosition.BOTTOM);
  xLabels.setCenterXLabelText(true);
  xLabels.setSpaceBetweenLabels(2);
  YAxis yLabels=mChart.getAxisLeft();
  yLabels.setLabelCount(7);
  yLabels.setDrawGridLines(false);
  mChart.setDrawLegend(false);
  mSeekBarX.setProgress(15);
  mSeekBarY.setProgress(100);
}
Program: 26775
Project: 26775
Buggy source:
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN);
  setContentView(R.layout.activity_linechart);
  tvX=(TextView)findViewById(R.id.tvXMax);
  tvY=(TextView)findViewById(R.id.tvYMax);
  mSeekBarX=(SeekBar)findViewById(R.id.seekBar1);
  mSeekBarY=(SeekBar)findViewById(R.id.seekBar2);
  mSeekBarX.setProgress(45);
  mSeekBarY.setProgress(100);
  mSeekBarY.setOnSeekBarChangeListener(this);
  mSeekBarX.setOnSeekBarChangeListener(this);
  mChart=(LineChart)findViewById(R.id.chart1);
  mChart.setDrawBorder(false);
  mChart.setDrawLegend(false);
  mChart.setDescription("String_Node_Str");
  mChart.setHighlightEnabled(true);
  mChart.setTouchEnabled(true);
  mChart.setDragEnabled(true);
  mChart.setScaleEnabled(true);
  mChart.setPinchZoom(false);
  mChart.setDrawGridBackground(false);
  mChart.setDrawVerticalGrid(false);
  Typeface tf=Typeface.createFromAsset(getAssets(),"String_Node_Str");
  mChart.setValueTypeface(tf);
  XAxis x=mChart.getXAxis();
  x.setTypeface(tf);
  YAxis y=mChart.getAxisLeft();
  y.setTypeface(tf);
  y.setLabelCount(5);
  setData(45,100);
  mChart.animateXY(2000,2000);
  mChart.invalidate();
}

Fixed version (ground truth):
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN);
  setContentView(R.layout.activity_linechart);
  tvX=(TextView)findViewById(R.id.tvXMax);
  tvY=(TextView)findViewById(R.id.tvYMax);
  mSeekBarX=(SeekBar)findViewById(R.id.seekBar1);
  mSeekBarY=(SeekBar)findViewById(R.id.seekBar2);
  mSeekBarX.setProgress(45);
  mSeekBarY.setProgress(100);
  mSeekBarY.setOnSeekBarChangeListener(this);
  mSeekBarX.setOnSeekBarChangeListener(this);
  mChart=(LineChart)findViewById(R.id.chart1);
  mChart.setDrawBorder(false);
  mChart.setDrawLegend(false);
  mChart.setDescription("String_Node_Str");
  mChart.setHighlightEnabled(true);
  mChart.setTouchEnabled(true);
  mChart.setDragEnabled(true);
  mChart.setScaleEnabled(true);
  mChart.setPinchZoom(false);
  mChart.setDrawGridBackground(false);
  Typeface tf=Typeface.createFromAsset(getAssets(),"String_Node_Str");
  mChart.setValueTypeface(tf);
  XAxis x=mChart.getXAxis();
  x.setTypeface(tf);
  YAxis y=mChart.getAxisLeft();
  y.setTypeface(tf);
  y.setLabelCount(5);
  y.setDrawGridLines(false);
  setData(45,100);
  mChart.animateXY(2000,2000);
  mChart.invalidate();
}
Program: 26776
Project: 26776
Buggy source:
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN);
  setContentView(R.layout.activity_horizontalbarchart);
  tvX=(TextView)findViewById(R.id.tvXMax);
  tvY=(TextView)findViewById(R.id.tvYMax);
  mSeekBarX=(SeekBar)findViewById(R.id.seekBar1);
  mSeekBarY=(SeekBar)findViewById(R.id.seekBar2);
  mChart=(HorizontalBarChart)findViewById(R.id.chart1);
  mChart.setOnChartValueSelectedListener(this);
  mChart.setDrawBarShadow(false);
  mChart.setDrawValueAboveBar(true);
  mChart.setDescription("String_Node_Str");
  mChart.setMaxVisibleValueCount(60);
  mChart.setPinchZoom(false);
  mChart.setDrawGridBackground(false);
  mChart.setDrawHorizontalGrid(true);
  mChart.setDrawVerticalGrid(false);
  mChart.setValueTextSize(10f);
  mChart.setDrawBorder(false);
  Typeface tf=Typeface.createFromAsset(getAssets(),"String_Node_Str");
  XAxis xl=mChart.getXAxis();
  xl.setPosition(XLabelPosition.BOTTOM);
  xl.setCenterXLabelText(true);
  xl.setTypeface(tf);
  YAxis yl=mChart.getAxisLeft();
  yl.setTypeface(tf);
  yl.setLabelCount(8);
  mChart.setValueTypeface(tf);
  setData(12,50);
  mSeekBarY.setProgress(50);
  mSeekBarX.setProgress(12);
  mSeekBarY.setOnSeekBarChangeListener(this);
  mSeekBarX.setOnSeekBarChangeListener(this);
  Legend l=mChart.getLegend();
  l.setPosition(LegendPosition.BELOW_CHART_LEFT);
  l.setFormSize(8f);
  l.setXEntrySpace(4f);
}

Fixed version (ground truth):
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN);
  setContentView(R.layout.activity_horizontalbarchart);
  tvX=(TextView)findViewById(R.id.tvXMax);
  tvY=(TextView)findViewById(R.id.tvYMax);
  mSeekBarX=(SeekBar)findViewById(R.id.seekBar1);
  mSeekBarY=(SeekBar)findViewById(R.id.seekBar2);
  mChart=(HorizontalBarChart)findViewById(R.id.chart1);
  mChart.setOnChartValueSelectedListener(this);
  mChart.setDrawBarShadow(false);
  mChart.setDrawValueAboveBar(true);
  mChart.setDescription("String_Node_Str");
  mChart.setMaxVisibleValueCount(60);
  mChart.setPinchZoom(false);
  mChart.setDrawGridBackground(false);
  mChart.setValueTextSize(10f);
  mChart.setDrawBorder(false);
  Typeface tf=Typeface.createFromAsset(getAssets(),"String_Node_Str");
  XAxis xl=mChart.getXAxis();
  xl.setPosition(XLabelPosition.BOTTOM);
  xl.setCenterXLabelText(true);
  xl.setTypeface(tf);
  YAxis yl=mChart.getAxisLeft();
  yl.setTypeface(tf);
  yl.setLabelCount(8);
  mChart.setValueTypeface(tf);
  setData(12,50);
  mSeekBarY.setProgress(50);
  mSeekBarX.setProgress(12);
  mSeekBarY.setOnSeekBarChangeListener(this);
  mSeekBarX.setOnSeekBarChangeListener(this);
  Legend l=mChart.getLegend();
  l.setPosition(LegendPosition.BELOW_CHART_LEFT);
  l.setFormSize(8f);
  l.setXEntrySpace(4f);
}
Program: 26778
Project: 26778
Buggy source:
private void setData(int count,float range){
  ArrayList<String> xVals=new ArrayList<String>();
  for (int i=0; i < count; i++) {
    xVals.add((i) + "String_Node_Str");
  }
  ArrayList<Entry> yVals1=new ArrayList<Entry>();
  for (int i=0; i < count; i++) {
    float mult=(range + 1);
    float val=(float)(Math.random() * mult) + 3;
    yVals1.add(new Entry(val,i));
  }
  LineDataSet set1=new LineDataSet(yVals1,"String_Node_Str");
  set1.setAxisDependency(AxisDependency.LEFT);
  set1.setColor(ColorTemplate.getHoloBlue());
  set1.setCircleColor(ColorTemplate.getHoloBlue());
  set1.setLineWidth(2f);
  set1.setCircleSize(4f);
  set1.setFillAlpha(65);
  set1.setFillColor(ColorTemplate.getHoloBlue());
  set1.setHighLightColor(Color.rgb(244,117,117));
  ArrayList<Entry> yVals2=new ArrayList<Entry>();
  for (int i=0; i < count; i++) {
    float mult=(range / 10);
    float val=(float)(Math.random() * mult) + 500;
    yVals2.add(new Entry(val,i));
  }
  LineDataSet set2=new LineDataSet(yVals2,"String_Node_Str");
  set2.setAxisDependency(AxisDependency.RIGHT);
  set2.setColor(Color.RED);
  set2.setCircleColor(Color.RED);
  set2.setLineWidth(2f);
  set2.setCircleSize(4f);
  set2.setFillAlpha(65);
  set2.setFillColor(Color.RED);
  set2.setHighLightColor(Color.rgb(244,117,117));
  ArrayList<LineDataSet> dataSets=new ArrayList<LineDataSet>();
  dataSets.add(set1);
  dataSets.add(set2);
  LineData data=new LineData(xVals,dataSets);
  mChart.setData(data);
}

Fixed version (ground truth):
private void setData(int count,float range){
  ArrayList<String> xVals=new ArrayList<String>();
  for (int i=0; i < count; i++) {
    xVals.add((i) + "String_Node_Str");
  }
  ArrayList<Entry> yVals1=new ArrayList<Entry>();
  for (int i=0; i < count; i++) {
    float mult=range / 2f;
    float val=(float)(Math.random() * mult) + 50;
    yVals1.add(new Entry(val,i));
  }
  LineDataSet set1=new LineDataSet(yVals1,"String_Node_Str");
  set1.setAxisDependency(AxisDependency.LEFT);
  set1.setColor(ColorTemplate.getHoloBlue());
  set1.setCircleColor(ColorTemplate.getHoloBlue());
  set1.setLineWidth(2f);
  set1.setCircleSize(4f);
  set1.setFillAlpha(65);
  set1.setFillColor(ColorTemplate.getHoloBlue());
  set1.setHighLightColor(Color.rgb(244,117,117));
  ArrayList<Entry> yVals2=new ArrayList<Entry>();
  for (int i=0; i < count; i++) {
    float mult=range;
    float val=(float)(Math.random() * mult) + 450;
    yVals2.add(new Entry(val,i));
  }
  LineDataSet set2=new LineDataSet(yVals2,"String_Node_Str");
  set2.setAxisDependency(AxisDependency.RIGHT);
  set2.setColor(Color.RED);
  set2.setCircleColor(Color.RED);
  set2.setLineWidth(2f);
  set2.setCircleSize(4f);
  set2.setFillAlpha(65);
  set2.setFillColor(Color.RED);
  set2.setHighLightColor(Color.rgb(244,117,117));
  ArrayList<LineDataSet> dataSets=new ArrayList<LineDataSet>();
  dataSets.add(set1);
  dataSets.add(set2);
  LineData data=new LineData(xVals,dataSets);
  mChart.setData(data);
}
Program: 26779
Project: 26779
Buggy source:
private void setupChart(LineChart chart,LineData data,int color){
  chart.setDrawBorder(false);
  chart.setDescription("String_Node_Str");
  chart.setNoDataTextDescription("String_Node_Str");
  chart.setDrawVerticalGrid(false);
  chart.setDrawGridBackground(false);
  chart.setGridWidth(1.25f);
  chart.setTouchEnabled(true);
  chart.setDragEnabled(true);
  chart.setScaleEnabled(true);
  chart.setPinchZoom(false);
  chart.setBackgroundColor(color);
  chart.setValueTypeface(mTf);
  chart.setData(data);
  Legend l=chart.getLegend();
  l.setForm(LegendForm.CIRCLE);
  l.setFormSize(6f);
  l.setTextColor(Color.WHITE);
  l.setTypeface(mTf);
  YAxis y=chart.getAxisLeft();
  y.setTextColor(Color.WHITE);
  y.setTypeface(mTf);
  y.setLabelCount(4);
  XAxis x=chart.getXAxis();
  x.setTextColor(Color.WHITE);
  x.setTypeface(mTf);
  chart.animateX(2500);
}

Fixed version (ground truth):
private void setupChart(LineChart chart,LineData data,int color){
  chart.setDrawBorder(false);
  chart.setDescription("String_Node_Str");
  chart.setNoDataTextDescription("String_Node_Str");
  chart.setDrawGridBackground(false);
  chart.setGridWidth(1.25f);
  chart.setTouchEnabled(true);
  chart.setDragEnabled(true);
  chart.setScaleEnabled(true);
  chart.setPinchZoom(false);
  chart.setBackgroundColor(color);
  chart.setValueTypeface(mTf);
  chart.setData(data);
  Legend l=chart.getLegend();
  l.setForm(LegendForm.CIRCLE);
  l.setFormSize(6f);
  l.setTextColor(Color.WHITE);
  l.setTypeface(mTf);
  YAxis y=chart.getAxisLeft();
  y.setTextColor(Color.WHITE);
  y.setTypeface(mTf);
  y.setLabelCount(4);
  XAxis x=chart.getXAxis();
  x.setTextColor(Color.WHITE);
  x.setTypeface(mTf);
  x.setDrawGridLines(false);
  chart.animateX(2500);
}
Program: 26780
Project: 26780
Buggy source:
@Override public View getView(int position,View convertView,ViewGroup parent){
  BarData c=getItem(position);
  ViewHolder holder=null;
  if (convertView == null) {
    holder=new ViewHolder();
    convertView=LayoutInflater.from(getContext()).inflate(R.layout.list_item_barchart,null);
    holder.chart=(BarChart)convertView.findViewById(R.id.chart);
    convertView.setTag(holder);
  }
 else {
    holder=(ViewHolder)convertView.getTag();
  }
  holder.chart.setValueTypeface(mTf);
  holder.chart.setDescription("String_Node_Str");
  holder.chart.setDrawVerticalGrid(false);
  holder.chart.setDrawGridBackground(false);
  holder.chart.setValueTextColor(Color.WHITE);
  XAxis xl=holder.chart.getXAxis();
  xl.setCenterXLabelText(true);
  xl.setPosition(XLabelPosition.BOTTOM);
  xl.setTypeface(mTf);
  YAxis yl=holder.chart.getAxisLeft();
  yl.setTypeface(mTf);
  yl.setLabelCount(5);
  holder.chart.setData(c);
  holder.chart.animateY(700);
  return convertView;
}

Fixed version (ground truth):
@Override public View getView(int position,View convertView,ViewGroup parent){
  BarData c=getItem(position);
  ViewHolder holder=null;
  if (convertView == null) {
    holder=new ViewHolder();
    convertView=LayoutInflater.from(getContext()).inflate(R.layout.list_item_barchart,null);
    holder.chart=(BarChart)convertView.findViewById(R.id.chart);
    convertView.setTag(holder);
  }
 else {
    holder=(ViewHolder)convertView.getTag();
  }
  holder.chart.setValueTypeface(mTf);
  holder.chart.setDescription("String_Node_Str");
  holder.chart.setDrawGridBackground(false);
  holder.chart.setValueTextColor(Color.WHITE);
  XAxis xl=holder.chart.getXAxis();
  xl.setCenterXLabelText(true);
  xl.setPosition(XLabelPosition.BOTTOM);
  xl.setTypeface(mTf);
  xl.setDrawGridLines(false);
  YAxis yl=holder.chart.getAxisLeft();
  yl.setTypeface(mTf);
  yl.setLabelCount(5);
  holder.chart.setData(c);
  holder.chart.animateY(700);
  return convertView;
}
Program: 26781
Project: 26781
Buggy source:
@Override public View onCreateView(LayoutInflater inflater,ViewGroup container,Bundle savedInstanceState){
  View v=inflater.inflate(R.layout.frag_simple_bar,container,false);
  mChart=new BarChart(getActivity());
  mChart.setDescription("String_Node_Str");
  MyMarkerView mv=new MyMarkerView(getActivity(),R.layout.custom_marker_view);
  mChart.setMarkerView(mv);
  mChart.setHighlightIndicatorEnabled(false);
  mChart.setDrawBorder(false);
  mChart.setDrawGridBackground(false);
  mChart.setDrawVerticalGrid(false);
  mChart.setDrawXLabels(false);
  mChart.setDrawBarShadow(false);
  Typeface tf=Typeface.createFromAsset(getActivity().getAssets(),"String_Node_Str");
  mChart.setData(generateBarData(1,20000,12));
  Legend l=mChart.getLegend();
  l.setTypeface(tf);
  YAxis labels=mChart.getAxisLeft();
  labels.setTypeface(tf);
  FrameLayout parent=(FrameLayout)v.findViewById(R.id.parentLayout);
  parent.addView(mChart);
  return v;
}

Fixed version (ground truth):
@Override public View onCreateView(LayoutInflater inflater,ViewGroup container,Bundle savedInstanceState){
  View v=inflater.inflate(R.layout.frag_simple_bar,container,false);
  mChart=new BarChart(getActivity());
  mChart.setDescription("String_Node_Str");
  MyMarkerView mv=new MyMarkerView(getActivity(),R.layout.custom_marker_view);
  mChart.setMarkerView(mv);
  mChart.setHighlightIndicatorEnabled(false);
  mChart.setDrawBorder(false);
  mChart.setDrawGridBackground(false);
  mChart.setDrawXLabels(false);
  mChart.setDrawBarShadow(false);
  Typeface tf=Typeface.createFromAsset(getActivity().getAssets(),"String_Node_Str");
  mChart.setData(generateBarData(1,20000,12));
  Legend l=mChart.getLegend();
  l.setTypeface(tf);
  YAxis labels=mChart.getAxisLeft();
  labels.setTypeface(tf);
  XAxis xAxis=mChart.getXAxis();
  xAxis.setDrawGridLines(false);
  FrameLayout parent=(FrameLayout)v.findViewById(R.id.parentLayout);
  parent.addView(mChart);
  return v;
}
Program: 26782
Project: 26782
Buggy source:
@Override public View onCreateView(LayoutInflater inflater,ViewGroup container,Bundle savedInstanceState){
  View v=inflater.inflate(R.layout.frag_simple_line,container,false);
  mChart=(LineChart)v.findViewById(R.id.lineChart1);
  mChart.setDescription("String_Node_Str");
  mChart.setHighlightIndicatorEnabled(false);
  mChart.setDrawBorder(false);
  mChart.setDrawGridBackground(false);
  mChart.setDrawVerticalGrid(false);
  mChart.setDrawXLabels(false);
  mChart.setData(getComplexity());
  mChart.animateX(3000);
  Typeface tf=Typeface.createFromAsset(getActivity().getAssets(),"String_Node_Str");
  Legend l=mChart.getLegend();
  l.setTypeface(tf);
  YAxis labels=mChart.getAxisLeft();
  labels.setTypeface(tf);
  return v;
}

Fixed version (ground truth):
@Override public View onCreateView(LayoutInflater inflater,ViewGroup container,Bundle savedInstanceState){
  View v=inflater.inflate(R.layout.frag_simple_line,container,false);
  mChart=(LineChart)v.findViewById(R.id.lineChart1);
  mChart.setDescription("String_Node_Str");
  mChart.setHighlightIndicatorEnabled(false);
  mChart.setDrawBorder(false);
  mChart.setDrawGridBackground(false);
  mChart.setDrawXLabels(false);
  mChart.setData(getComplexity());
  mChart.animateX(3000);
  Typeface tf=Typeface.createFromAsset(getActivity().getAssets(),"String_Node_Str");
  Legend l=mChart.getLegend();
  l.setTypeface(tf);
  YAxis labels=mChart.getAxisLeft();
  labels.setTypeface(tf);
  XAxis xAxis=mChart.getXAxis();
  xAxis.setDrawGridLines(false);
  return v;
}
Program: 26783
Project: 26783
Buggy source:
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN);
  setContentView(R.layout.activity_combined);
  mChart=(CombinedChart)findViewById(R.id.chart1);
  mChart.setDescription("String_Node_Str");
  mChart.setDrawGridBackground(false);
  YAxis rightAxis=mChart.getAxisRight();
  rightAxis.setDrawGridLines(false);
  CombinedData data=new CombinedData(mMonths);
  data.setData(generateLineData());
  data.setData(generateBarData());
  data.setData(generateScatterData());
  data.setData(generateCandleData());
  mChart.setData(data);
  mChart.invalidate();
}

Fixed version (ground truth):
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN);
  setContentView(R.layout.activity_combined);
  mChart=(CombinedChart)findViewById(R.id.chart1);
  mChart.setDescription("String_Node_Str");
  mChart.setDrawGridBackground(false);
  YAxis rightAxis=mChart.getAxisRight();
  rightAxis.setDrawGridLines(false);
  CombinedData data=new CombinedData(mMonths);
  data.setData(generateLineData());
  data.setData(generateBarData());
  data.setData(generateCandleData());
  mChart.setData(data);
  mChart.invalidate();
}
Program: 26784
Project: 26784
Buggy source:
private LineData generateLineData(){
  LineData d=new LineData();
  ArrayList<Entry> entries=new ArrayList<Entry>();
  for (int index=0; index < itemcount; index++)   entries.add(new Entry(getRandom(),index));
  LineDataSet set=new LineDataSet(entries,"String_Node_Str");
  set.setColor(Color.RED);
  set.setLineWidth(2.5f);
  set.setCircleColor(Color.RED);
  set.setCircleSize(5f);
  set.setFillColor(Color.RED);
  set.setDrawCubic(true);
  d.addDataSet(set);
  return d;
}

Fixed version (ground truth):
private LineData generateLineData(){
  LineData d=new LineData();
  ArrayList<Entry> entries=new ArrayList<Entry>();
  for (int index=0; index < itemcount; index++)   entries.add(new Entry(getRandom(),index));
  LineDataSet set=new LineDataSet(entries,"String_Node_Str");
  set.setColor(Color.RED);
  set.setLineWidth(2.5f);
  set.setCircleColor(Color.RED);
  set.setCircleSize(5f);
  set.setFillColor(Color.RED);
  set.setDrawCubic(true);
  set.setDrawValues(false);
  d.addDataSet(set);
  return d;
}
Program: 26785
Project: 26785
Buggy source:
private CandleData generateCandleData(){
  CandleData d=new CandleData();
  ArrayList<CandleEntry> entries=new ArrayList<CandleEntry>();
  for (int index=0; index < itemcount; index++)   entries.add(new CandleEntry(index,25f,10f,12f,22f));
  CandleDataSet set=new CandleDataSet(entries,"String_Node_Str");
  set.setColor(Color.rgb(80,80,80));
  d.addDataSet(set);
  return d;
}

Fixed version (ground truth):
private CandleData generateCandleData(){
  CandleData d=new CandleData();
  ArrayList<CandleEntry> entries=new ArrayList<CandleEntry>();
  for (int index=0; index < itemcount; index++)   entries.add(new CandleEntry(index,20f,10f,13f,17f));
  CandleDataSet set=new CandleDataSet(entries,"String_Node_Str");
  set.setColor(Color.rgb(80,80,80));
  set.setBodySpace(0.3f);
  set.setDrawValues(false);
  d.addDataSet(set);
  return d;
}
Program: 26786
Project: 26786
Buggy source:
private ScatterData generateScatterData(){
  ScatterData d=new ScatterData();
  ArrayList<Entry> entries=new ArrayList<Entry>();
  for (int index=0; index < itemcount; index++)   entries.add(new Entry(getRandom(),index));
  ScatterDataSet set=new ScatterDataSet(entries,"String_Node_Str");
  set.setColor(Color.GREEN);
  set.setScatterShapeSize(7.5f);
  d.addDataSet(set);
  return d;
}

Fixed version (ground truth):
private ScatterData generateScatterData(){
  ScatterData d=new ScatterData();
  ArrayList<Entry> entries=new ArrayList<Entry>();
  for (int index=0; index < itemcount; index++)   entries.add(new Entry(getRandom(),index));
  ScatterDataSet set=new ScatterDataSet(entries,"String_Node_Str");
  set.setColor(Color.GREEN);
  set.setScatterShapeSize(7.5f);
  set.setDrawValues(false);
  d.addDataSet(set);
  return d;
}
Program: 26787
Project: 26787
Buggy source:
@Override protected void calcMinMax(){
  super.calcMinMax();
  mDeltaX=Math.abs(mXChartMax - mXChartMin);
}

Fixed version (ground truth):
@Override protected void calcMinMax(){
  super.calcMinMax();
  mXChartMax+=0.5f;
  mDeltaX=Math.abs(mXChartMax - mXChartMin);
}
Program: 26788
Project: 26788
Buggy source:
@Override public void drawValues(Canvas c){
}

Fixed version (ground truth):
@Override public void drawValues(Canvas c){
  if (mChart.getCandleData().getYValCount() < mChart.getMaxVisibleCount() * mViewPortHandler.getScaleX()) {
    ArrayList<CandleDataSet> dataSets=mChart.getCandleData().getDataSets();
    for (int i=0; i < dataSets.size(); i++) {
      CandleDataSet dataSet=dataSets.get(i);
      Transformer trans=mChart.getTransformer(dataSet.getAxisDependency());
      if (!dataSet.isDrawValuesEnabled())       continue;
      ArrayList<CandleEntry> entries=dataSet.getYVals();
      float[] positions=trans.generateTransformedValuesCandle(entries,mAnimator.getPhaseY());
      float yOffset=Utils.convertDpToPixel(5f);
      for (int j=0; j < positions.length * mAnimator.getPhaseX(); j+=2) {
        float x=positions[j];
        float y=positions[j + 1];
        if (!mViewPortHandler.isInBoundsRight(x))         break;
        if (!mViewPortHandler.isInBoundsLeft(x) || !mViewPortHandler.isInBoundsY(y))         continue;
        float val=entries.get(j / 2).getVal();
        c.drawText(mChart.getValueFormatter().getFormattedValue(val),x,y - yOffset,mValuePaint);
      }
    }
  }
}
Program: 26789
Project: 26789
Buggy source:
@Override protected void init(){
  super.init();
  mXAxisRenderer=new XAxisRendererBarChart(mViewPortHandler,mXAxis,mLeftAxisTransformer,this);
}

Fixed version (ground truth):
@Override protected void init(){
  super.init();
  mRenderer=new BarChartRenderer(this,mAnimator,mViewPortHandler);
  mXAxisRenderer=new XAxisRendererBarChart(mViewPortHandler,mXAxis,mLeftAxisTransformer,this);
}
Program: 26790
Project: 26790
Buggy source:
/** 
 * does all necessary preparations, needed when data is changed or flags that effect the data are changed
 */
@Override public void prepare(){
  if (mDataNotSet)   return;
  calcMinMax(mFixedYValues);
  mAxisRendererLeft.computeAxis(this);
  mAxisRendererRight.computeAxis(this);
  mXAxisRenderer.computeAxis(mData.getXValAverageLength(),mData.getXVals());
  prepareLegend();
  calculateOffsets();
}

Fixed version (ground truth):
/** 
 * does all necessary preparations, needed when data is changed or flags that effect the data are changed
 */
@Override public void prepare(){
  if (mDataNotSet) {
    if (mLogEnabled)     Log.i(LOG_TAG,"String_Node_Str");
    return;
  }
 else {
    if (mLogEnabled)     Log.i(LOG_TAG,"String_Node_Str");
  }
  calcMinMax(mFixedYValues);
  mAxisRendererLeft.computeAxis(this);
  mAxisRendererRight.computeAxis(this);
  mXAxisRenderer.computeAxis(mData.getXValAverageLength(),mData.getXVals());
  prepareLegend();
  calculateOffsets();
}