Program: 62110
Project: 62110
Buggy source:
@Override public void onResume(){
  super.onResume();
  ListView listHistory=(ListView)this.getActivity().findViewById(R.id.list_view_history);
  try {
    List<NotificationDateView> rawData=this.getChartData(getResources().getInteger(R.integer.chart_items));
    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,getDateFormat().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);
  }
 catch (  SQLException e) {
    e.printStackTrace();
  }
  if (currentSelectedDate != null) {
    showDayListView(currentSelectedDate);
    chart.highlightValue(selectedXIndex,selectedDataSetIndex);
  }
 else {
    listHistory.setAdapter(new NotificationAppViewAdapter(this.getActivity(),new LinkedList<NotificationAppView>()));
  }
  try {
    ListView listView=(ListView)getActivity().findViewById(R.id.list_view_history);
    TextView textView=(TextView)getActivity().findViewById(R.id.history_empty);
    if (getDatabaseHelper().getApplicationDao().queryForEq(Application.FIELD_IGNORE,false).size() > 0) {
      listView.setVisibility(View.VISIBLE);
      textView.setVisibility(View.GONE);
    }
 else {
      listView.setVisibility(View.GONE);
      textView.setVisibility(View.VISIBLE);
    }
  }
 catch (  SQLException e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
@Override public void onResume(){
  super.onResume();
  ListView listHistory=(ListView)this.getActivity().findViewById(R.id.list_view_history);
  try {
    List<NotificationDateView> rawData=this.getChartData(getResources().getInteger(R.integer.chart_items));
    List<NotificationDateView> finalData=new ArrayList<NotificationDateView>();
    for (int i=0; i < rawData.size(); i++) {
      finalData.add(finalData.size(),rawData.get(i));
      if (i < rawData.size() - 1) {
        Calendar nextRawDate=Calendar.getInstance();
        nextRawDate.setTime(rawData.get(i + 1).Date);
        nextRawDate.set(Calendar.HOUR_OF_DAY,0);
        nextRawDate.set(Calendar.MINUTE,0);
        nextRawDate.set(Calendar.SECOND,0);
        nextRawDate.set(Calendar.MILLISECOND,0);
        Calendar nextCalendarDate=Calendar.getInstance();
        nextCalendarDate.setTime(rawData.get(i).Date);
        nextCalendarDate.add(Calendar.DAY_OF_YEAR,1);
        nextCalendarDate.set(Calendar.HOUR_OF_DAY,0);
        nextCalendarDate.set(Calendar.MINUTE,0);
        nextCalendarDate.set(Calendar.SECOND,0);
        nextCalendarDate.set(Calendar.MILLISECOND,0);
        while (!nextCalendarDate.equals(nextRawDate)) {
          NotificationDateView emptyEntry=new NotificationDateView();
          emptyEntry.Date=nextCalendarDate.getTime();
          finalData.add(finalData.size(),emptyEntry);
          nextCalendarDate.add(Calendar.DAY_OF_YEAR,1);
        }
      }
    }
    ArrayList<String> xVals=new ArrayList<String>(finalData.size());
    ArrayList<BarEntry> yVals=new ArrayList<BarEntry>(finalData.size());
    for (int i=0; i < finalData.size(); i++) {
      Date currentDate=finalData.get(i).Date;
      xVals.add(i,getDateFormat().format(currentDate));
      yVals.add(i,new BarEntry(finalData.get(i).Notifications.floatValue(),i,currentDate));
    }
    BarDataSet dataSet=new BarDataSet(yVals,"String_Node_Str");
    BarData data=new BarData(xVals,dataSet);
    chart.setData(data);
  }
 catch (  SQLException e) {
    e.printStackTrace();
  }
  if (currentSelectedDate != null) {
    showDayListView(currentSelectedDate);
    chart.highlightValue(selectedXIndex,selectedDataSetIndex);
  }
 else {
    listHistory.setAdapter(new NotificationAppViewAdapter(this.getActivity(),new LinkedList<NotificationAppView>()));
  }
  try {
    ListView listView=(ListView)getActivity().findViewById(R.id.list_view_history);
    TextView textView=(TextView)getActivity().findViewById(R.id.history_empty);
    if (getDatabaseHelper().getApplicationDao().queryForEq(Application.FIELD_IGNORE,false).size() > 0) {
      listView.setVisibility(View.VISIBLE);
      textView.setVisibility(View.GONE);
    }
 else {
      listView.setVisibility(View.GONE);
      textView.setVisibility(View.VISIBLE);
    }
  }
 catch (  SQLException e) {
    e.printStackTrace();
  }
}