Program: 14602
Project: 14602
Buggy source:
private void handleBarChartTap(int tappedBar){
  if (tappedBar < 0 || statsDate.length < tappedBar) {
    return;
  }
  String date=statsDate[tappedBar];
  StatsBarChartUnit unit=getBarChartUnit();
  if (unit == StatsBarChartUnit.DAY) {
    StatsUtils.StatsCredentials credentials=StatsUtils.getCurrentBlogStatsCredentials();
    if (credentials == null) {
      return;
    }
    String statsAuthenticatedUser=credentials.getUsername();
    String statsAuthenticatedPassword=credentials.getPassword();
    String url="String_Node_Str" + WordPress.getCurrentRemoteBlogId() + "String_Node_Str"+ date+ "String_Node_Str";
    Intent statsWebViewIntent=new Intent(this.getActivity(),StatsWebViewActivity.class);
    statsWebViewIntent.putExtra(StatsWebViewActivity.STATS_AUTHENTICATED_USER,statsAuthenticatedUser);
    statsWebViewIntent.putExtra(StatsWebViewActivity.STATS_AUTHENTICATED_PASSWD,statsAuthenticatedPassword);
    statsWebViewIntent.putExtra(StatsWebViewActivity.STATS_AUTHENTICATED_URL,url);
    this.getActivity().startActivity(statsWebViewIntent);
  }
 else {
    GraphViewDataInterface[] views=viewsSeries.getData();
    GraphViewDataInterface[] visitors=visitorsSeries.getData();
    String formattedDate;
    if (unit == StatsBarChartUnit.WEEK) {
      formattedDate=StatsUtils.parseDate(date,"String_Node_Str","String_Node_Str");
    }
 else {
      formattedDate=StatsUtils.parseDate(date,"String_Node_Str","String_Node_Str");
    }
    String message=String.format("String_Node_Str",formattedDate,getString(R.string.stats_totals_views),(int)views[tappedBar].getY(),getString(R.string.stats_totals_visitors),(int)visitors[tappedBar].getY());
    ToastUtils.showToast(this.getActivity(),message,ToastUtils.Duration.LONG);
  }
}

Fixed version (ground truth):
private void handleBarChartTap(int tappedBar){
  if (tappedBar < 0 || mStatsDate.length < tappedBar) {
    return;
  }
  String date=mStatsDate[tappedBar];
  StatsBarChartUnit unit=getBarChartUnit();
  if (unit == StatsBarChartUnit.DAY) {
    StatsUtils.StatsCredentials credentials=StatsUtils.getCurrentBlogStatsCredentials();
    if (credentials == null) {
      return;
    }
    String statsAuthenticatedUser=credentials.getUsername();
    String statsAuthenticatedPassword=credentials.getPassword();
    String url="String_Node_Str" + WordPress.getCurrentRemoteBlogId() + "String_Node_Str"+ date+ "String_Node_Str";
    Intent statsWebViewIntent=new Intent(this.getActivity(),StatsWebViewActivity.class);
    statsWebViewIntent.putExtra(StatsWebViewActivity.STATS_AUTHENTICATED_USER,statsAuthenticatedUser);
    statsWebViewIntent.putExtra(StatsWebViewActivity.STATS_AUTHENTICATED_PASSWD,statsAuthenticatedPassword);
    statsWebViewIntent.putExtra(StatsWebViewActivity.STATS_AUTHENTICATED_URL,url);
    this.getActivity().startActivity(statsWebViewIntent);
  }
 else {
    GraphViewDataInterface[] views=mViewsSeries.getData();
    GraphViewDataInterface[] visitors=mVisitorsSeries.getData();
    String formattedDate;
    if (unit == StatsBarChartUnit.WEEK) {
      formattedDate=StatsUtils.parseDate(date,"String_Node_Str","String_Node_Str");
    }
 else {
      formattedDate=StatsUtils.parseDate(date,"String_Node_Str","String_Node_Str");
    }
    String message=String.format("String_Node_Str",formattedDate,getString(R.string.stats_totals_views),(int)views[tappedBar].getY(),getString(R.string.stats_totals_visitors),(int)visitors[tappedBar].getY());
    ToastUtils.showToast(this.getActivity(),message,ToastUtils.Duration.LONG);
  }
}