Program: 26570
Project: 26570
Buggy source:
@Override public boolean onOptionsItemSelected(MenuItem item){
switch (item.getItemId()) {
case R.id.actionToggleValues:
{
      for (      DataSet<?> set : mChart.getData().getDataSets())       set.setDrawValues(!set.isDrawValuesEnabled());
      mChart.invalidate();
      break;
    }
case R.id.actionToggleHighlight:
{
    if (mChart.isHighlightEnabled())     mChart.setHighlightEnabled(false);
 else     mChart.setHighlightEnabled(true);
    mChart.invalidate();
    break;
  }
case R.id.actionToggleFilled:
{
  ArrayList<LineDataSet> sets=(ArrayList<LineDataSet>)mChart.getData().getDataSets();
  for (  LineDataSet set : sets) {
    if (set.isDrawFilledEnabled())     set.setDrawFilled(false);
 else     set.setDrawFilled(true);
  }
  mChart.invalidate();
  break;
}
case R.id.actionToggleCircles:
{
ArrayList<LineDataSet> sets=(ArrayList<LineDataSet>)mChart.getData().getDataSets();
for (LineDataSet set : sets) {
  if (set.isDrawCirclesEnabled())   set.setDrawCircles(false);
 else   set.setDrawCircles(true);
}
mChart.invalidate();
break;
}
case R.id.actionToggleCubic:
{
ArrayList<LineDataSet> sets=(ArrayList<LineDataSet>)mChart.getData().getDataSets();
for (LineDataSet set : sets) {
if (set.isDrawCubicEnabled()) set.setDrawCubic(false);
 else set.setDrawCubic(true);
}
mChart.invalidate();
break;
}
case R.id.actionToggleStartzero:
{
mChart.getAxisLeft().setStartAtZero(!mChart.getAxisLeft().isStartAtZeroEnabled());
mChart.getAxisRight().setStartAtZero(!mChart.getAxisRight().isStartAtZeroEnabled());
mChart.invalidate();
break;
}
case R.id.actionTogglePinch:
{
if (mChart.isPinchZoomEnabled()) mChart.setPinchZoom(false);
 else mChart.setPinchZoom(true);
mChart.invalidate();
break;
}
case R.id.animateX:
{
mChart.animateX(3000);
break;
}
case R.id.animateY:
{
mChart.animateY(3000);
break;
}
case R.id.animateXY:
{
mChart.animateXY(3000,3000);
break;
}
case R.id.actionToggleAdjustXLegend:
{
XAxis xLabels=mChart.getXAxis();
if (xLabels.isAdjustXLabelsEnabled()) xLabels.setAdjustXLabels(false);
 else xLabels.setAdjustXLabels(true);
mChart.invalidate();
break;
}
case R.id.actionToggleFilter:
{
Approximator a=new Approximator(ApproximatorType.DOUGLAS_PEUCKER,35);
if (!mChart.isFilteringEnabled()) {
mChart.enableFiltering(a);
}
 else {
mChart.disableFiltering();
}
mChart.invalidate();
break;
}
case R.id.actionSave:
{
if (mChart.saveToPath("String_Node_Str" + System.currentTimeMillis(),"String_Node_Str")) {
Toast.makeText(getApplicationContext(),"String_Node_Str",Toast.LENGTH_SHORT).show();
}
 else Toast.makeText(getApplicationContext(),"String_Node_Str",Toast.LENGTH_SHORT).show();
break;
}
}
return true;
}

Fixed version (ground truth):
@Override public boolean onOptionsItemSelected(MenuItem item){
switch (item.getItemId()) {
case R.id.actionToggleValues:
{
      for (      DataSet<?> set : mChart.getData().getDataSets())       set.setDrawValues(!set.isDrawValuesEnabled());
      mChart.invalidate();
      break;
    }
case R.id.actionToggleHighlight:
{
    if (mChart.isHighlightEnabled())     mChart.setHighlightEnabled(false);
 else     mChart.setHighlightEnabled(true);
    mChart.invalidate();
    break;
  }
case R.id.actionToggleFilled:
{
  ArrayList<LineDataSet> sets=(ArrayList<LineDataSet>)mChart.getData().getDataSets();
  for (  LineDataSet set : sets) {
    if (set.isDrawFilledEnabled())     set.setDrawFilled(false);
 else     set.setDrawFilled(true);
  }
  mChart.invalidate();
  break;
}
case R.id.actionToggleCircles:
{
ArrayList<LineDataSet> sets=(ArrayList<LineDataSet>)mChart.getData().getDataSets();
for (LineDataSet set : sets) {
  if (set.isDrawCirclesEnabled())   set.setDrawCircles(false);
 else   set.setDrawCircles(true);
}
mChart.invalidate();
break;
}
case R.id.actionToggleCubic:
{
ArrayList<LineDataSet> sets=(ArrayList<LineDataSet>)mChart.getData().getDataSets();
for (LineDataSet set : sets) {
if (set.isDrawCubicEnabled()) set.setDrawCubic(false);
 else set.setDrawCubic(true);
}
mChart.invalidate();
break;
}
case R.id.actionToggleStartzero:
{
mChart.getAxisLeft().setStartAtZero(!mChart.getAxisLeft().isStartAtZeroEnabled());
mChart.getAxisRight().setStartAtZero(!mChart.getAxisRight().isStartAtZeroEnabled());
mChart.invalidate();
break;
}
case R.id.actionTogglePinch:
{
if (mChart.isPinchZoomEnabled()) mChart.setPinchZoom(false);
 else mChart.setPinchZoom(true);
mChart.invalidate();
break;
}
case R.id.animateX:
{
mChart.animateX(3000);
break;
}
case R.id.animateY:
{
mChart.animateY(3000,EasingFunction.EaseInCubic);
break;
}
case R.id.animateXY:
{
mChart.animateXY(3000,3000);
break;
}
case R.id.actionToggleAdjustXLegend:
{
XAxis xLabels=mChart.getXAxis();
if (xLabels.isAdjustXLabelsEnabled()) xLabels.setAdjustXLabels(false);
 else xLabels.setAdjustXLabels(true);
mChart.invalidate();
break;
}
case R.id.actionToggleFilter:
{
Approximator a=new Approximator(ApproximatorType.DOUGLAS_PEUCKER,35);
if (!mChart.isFilteringEnabled()) {
mChart.enableFiltering(a);
}
 else {
mChart.disableFiltering();
}
mChart.invalidate();
break;
}
case R.id.actionSave:
{
if (mChart.saveToPath("String_Node_Str" + System.currentTimeMillis(),"String_Node_Str")) {
Toast.makeText(getApplicationContext(),"String_Node_Str",Toast.LENGTH_SHORT).show();
}
 else Toast.makeText(getApplicationContext(),"String_Node_Str",Toast.LENGTH_SHORT).show();
break;
}
}
return true;
}