Program: 39397
Project: 39397
Buggy source:
private void refreshPie(){
  mRecordManager.getOutOrInRecordThisMonth(new Handler(){
    @Override public void handleMessage(    Message msg){
      super.handleMessage(msg);
      mTypePieChart.clear();
      xPieVals1.clear();
      yPieVals1.clear();
      ArrayList<Integer> colors=new ArrayList<Integer>();
      List<ChartRecordDo> list=(List<ChartRecordDo>)msg.obj;
      allOutOrInMoney=0;
      int i=0;
      for (      ChartRecordDo chartRecordDo : list) {
        allOutOrInMoney+=Math.abs(TextUtil.gwtFormatNum(chartRecordDo.getRecordMoney()));
        yPieVals1.add(new Entry(Math.abs(new Double(TextUtil.gwtFormatNum(chartRecordDo.getRecordMoney())).floatValue()),i));
        xPieVals1.add(chartRecordDo.getRecordDesc());
        colors.add(IconTypeUtil.getTypeIconOrColor(chartRecordDo.getIconId(),false));
        i++;
      }
      PieDataSet dataSet=new PieDataSet(yPieVals1,"String_Node_Str");
      dataSet.setSliceSpace(2f);
      dataSet.setSelectionShift(4f);
      dataSet.setColors(colors);
      PieData data=new PieData(xPieVals1,dataSet);
      data.setDrawValues(false);
      mTypePieChart.setData(data);
      if (list.size() == 0) {
        mTypePieChart.setCenterText("String_Node_Str" + (pieOut ? "String_Node_Str" : "String_Node_Str") + "String_Node_Str");
        mTypePieChart.setCenterTextColor(Color.RED);
      }
 else {
        mTypePieChart.setCenterTextColor(mainColor);
        mTypePieChart.setCenterText((pieOut ? "String_Node_Str" : "String_Node_Str") + TextUtil.getFormatMoney(allOutOrInMoney));
      }
      mTypePieChart.animateXY(500,500);
    }
  }
,pieOut);
}

Fixed version (ground truth):
private void refreshPie(){
  mRecordManager.getOutOrInRecordThisMonth(new Handler(){
    @Override public void handleMessage(    Message msg){
      super.handleMessage(msg);
      mTypePieChart.clear();
      xPieVals1.clear();
      yPieVals1.clear();
      ArrayList<Integer> colors=new ArrayList<Integer>();
      List<ChartRecordDo> list=(List<ChartRecordDo>)msg.obj;
      allOutOrInMoney=0;
      int i=0;
      double min=Double.MAX_VALUE;
      for (      ChartRecordDo chartRecordDo : list) {
        if (Math.abs(TextUtil.gwtFormatNum(chartRecordDo.getRecordMoney())) < min)         min=Math.abs(TextUtil.gwtFormatNum(chartRecordDo.getRecordMoney()));
        allOutOrInMoney+=Math.abs(TextUtil.gwtFormatNum(chartRecordDo.getRecordMoney()));
        yPieVals1.add(new Entry(Math.abs(new Double(TextUtil.gwtFormatNum(chartRecordDo.getRecordMoney())).floatValue()),i));
        xPieVals1.add(chartRecordDo.getRecordDesc());
        colors.add(IconTypeUtil.getTypeIconOrColor(chartRecordDo.getIconId(),false));
        i++;
      }
      PieDataSet dataSet=new PieDataSet(yPieVals1,"String_Node_Str");
      if (min / allOutOrInMoney > 0.001) {
        dataSet.setSliceSpace(1f);
      }
      dataSet.setSelectionShift(2f);
      dataSet.setColors(colors);
      PieData data=new PieData(xPieVals1,dataSet);
      data.setDrawValues(false);
      mTypePieChart.setData(data);
      if (list.size() == 0) {
        mTypePieChart.setCenterText("String_Node_Str" + (pieOut ? "String_Node_Str" : "String_Node_Str") + "String_Node_Str");
        mTypePieChart.setCenterTextColor(Color.RED);
      }
 else {
        mTypePieChart.setCenterTextColor(mainColor);
        mTypePieChart.setCenterText((pieOut ? "String_Node_Str" : "String_Node_Str") + TextUtil.getFormatMoney(allOutOrInMoney));
      }
      mTypePieChart.animateXY(500,500);
    }
  }
,pieOut);
}