Program: 62117
Project: 62117
Buggy source:
@Override public View onCreateView(LayoutInflater inflater,ViewGroup container,Bundle savedInstanceState){
  View view=inflater.inflate(layoutId,container,false);
  ListView listHistory=(ListView)view.findViewById(R.id.list_view_history);
  listHistory.setOnItemClickListener(new AdapterView.OnItemClickListener(){
    @Override public void onItemClick(    AdapterView<?> adapterView,    View view,    int i,    long l){
      Intent intent=new Intent(getActivity(),AppDetail.class);
      NotificationAppView clickedApp=(NotificationAppView)adapterView.getAdapter().getItem(i);
      intent.putExtra(Intent.EXTRA_SUBJECT,clickedApp.AppName);
      startActivity(intent);
    }
  }
);
  BarChart chart=(BarChart)inflater.inflate(R.layout.list_header_barchart,listHistory);
  chart.setDrawBarShadow(false);
  chart.setDrawLegend(false);
  chart.setDescription("String_Node_Str");
  chart.setDrawGridBackground(false);
  chart.setDrawHorizontalGrid(false);
  chart.setDrawVerticalGrid(false);
  chart.setDrawXLabels(true);
  chart.setValueFormatter(new ValueFormatter(){
    @Override public String getFormattedValue(    float value){
      return Integer.toString((int)value);
    }
  }
);
  chart.setValueTextColor(Color.WHITE);
  try {
    List<NotificationDayView> rawData=getDatabaseHelper().getNotificationDao().getSummaryLastDays(14);
    ArrayList<String> xVals=new ArrayList<String>(rawData.size());
    ArrayList<BarEntry> yVals=new ArrayList<BarEntry>(rawData.size());
    for (int i=0; i < rawData.size(); i++) {
      xVals.add(i,dateFormat.format(rawData.get(i).Date));
      yVals.add(i,new BarEntry(rawData.get(i).Notifications.floatValue(),i));
    }
    BarDataSet dataSet=new BarDataSet(yVals,"String_Node_Str");
    BarData data=new BarData(xVals,dataSet);
    chart.setData(data);
    listHistory.addHeaderView(chart,null,false);
  }
 catch (  SQLException e) {
    e.printStackTrace();
  }
  return view;
}

Fixed version (ground truth):
@Override public View onCreateView(LayoutInflater inflater,ViewGroup container,Bundle savedInstanceState){
  View view=inflater.inflate(layoutId,container,false);
  ListView listHistory=(ListView)view.findViewById(R.id.list_view_history);
  listHistory.setOnItemClickListener(new AdapterView.OnItemClickListener(){
    @Override public void onItemClick(    AdapterView<?> adapterView,    View view,    int i,    long l){
      Intent intent=new Intent(getActivity(),AppDetail.class);
      NotificationAppView clickedApp=(NotificationAppView)adapterView.getAdapter().getItem(i);
      intent.putExtra(Intent.EXTRA_SUBJECT,clickedApp.AppName);
      startActivity(intent);
    }
  }
);
  View header=inflater.inflate(R.layout.list_header_barchart,listHistory,false);
  BarChart chart=(BarChart)header.findViewById(R.id.chart);
  chart.setDrawBarShadow(false);
  chart.setDrawLegend(false);
  chart.setDescription("String_Node_Str");
  chart.setDrawGridBackground(false);
  chart.setDrawHorizontalGrid(false);
  chart.setDrawVerticalGrid(false);
  chart.setPaint(paintWhite,Chart.PAINT_XLABEL);
  chart.setDrawXLabels(true);
  chart.setDrawYLabels(false);
  chart.setValueFormatter(new ValueFormatter(){
    @Override public String getFormattedValue(    float value){
      return Integer.toString((int)value);
    }
  }
);
  chart.setOnChartValueSelectedListener(new OnChartValueSelectedListener(){
    @Override public void onValueSelected(    Entry e,    int dataSetIndex){
      showDayListView((Date)e.getData());
    }
    @Override public void onNothingSelected(){
    }
  }
);
  chart.setValueTextColor(Color.WHITE);
  try {
    List<NotificationDayView> rawData=getDatabaseHelper().getNotificationDao().getSummaryLastDays(14);
    ArrayList<String> xVals=new ArrayList<String>(rawData.size());
    ArrayList<BarEntry> yVals=new ArrayList<BarEntry>(rawData.size());
    for (int i=0; i < rawData.size(); i++) {
      Date currentDate=rawData.get(i).Date;
      xVals.add(i,dateFormat.format(currentDate));
      yVals.add(i,new BarEntry(rawData.get(i).Notifications.floatValue(),i,currentDate));
    }
    BarDataSet dataSet=new BarDataSet(yVals,"String_Node_Str");
    BarData data=new BarData(xVals,dataSet);
    chart.setData(data);
    listHistory.addHeaderView(chart,null,false);
  }
 catch (  SQLException e) {
    e.printStackTrace();
  }
  return view;
}