Program: 20475
Project: 20475
Buggy source:
private void prepareNotification(){
  List<Pin> watchingPins=ChanApplication.getPinnedManager().getWatchingPins();
  List<Pin> pins=new ArrayList<Pin>();
  int newPostsCount=0;
  int newQuotesCount=0;
  List<Post> posts=new ArrayList<Post>();
  boolean makeSound=false;
  boolean show=true;
  for (  Pin pin : watchingPins) {
    PinWatcher watcher=pin.getPinWatcher();
    if (watcher == null || watcher.isError())     continue;
    boolean add=false;
    if (watcher.getNewPostsCount() > 0) {
      newPostsCount+=watcher.getNewPostsCount();
      for (      Post p : watcher.getNewPosts()) {
        p.title=pin.loadable.title;
        posts.add(p);
      }
      show=true;
      add=true;
    }
    if (watcher.getNewQuoteCount() > 0) {
      newQuotesCount+=watcher.getNewQuoteCount();
      show=true;
      add=true;
    }
    if (watcher.getWereNewQuotes()) {
      makeSound=true;
    }
    if (add) {
      pins.add(pin);
    }
  }
  if (show) {
    String title=newPostsCount + "String_Node_Str";
    if (newQuotesCount > 0) {
      title+="String_Node_Str" + newQuotesCount + "String_Node_Str";
    }
    String descriptor;
    if (pins.size() == 1) {
      descriptor=pins.get(0).loadable.title;
    }
 else {
      descriptor=pins.size() + "String_Node_Str";
    }
    String content=newPostsCount + "String_Node_Str" + descriptor;
    Collections.sort(posts,new PostAgeComparer());
    List<CharSequence> lines=new ArrayList<CharSequence>();
    for (    Post post : posts) {
      if (pins.size() > 1) {
        lines.add(post.title + "String_Node_Str" + post.comment);
      }
 else {
        lines.add(post.comment);
      }
    }
    showNotification(content,title,content,Integer.toString(newPostsCount),lines,makeSound);
  }
}

Fixed version (ground truth):
private void prepareNotification(){
  List<Pin> watchingPins=ChanApplication.getPinnedManager().getWatchingPins();
  List<Pin> pins=new ArrayList<Pin>();
  int newPostsCount=0;
  int newQuotesCount=0;
  List<Post> posts=new ArrayList<Post>();
  boolean makeSound=false;
  boolean show=false;
  for (  Pin pin : watchingPins) {
    PinWatcher watcher=pin.getPinWatcher();
    if (watcher == null || watcher.isError())     continue;
    boolean add=false;
    if (watcher.getNewPostsCount() > 0) {
      newPostsCount+=watcher.getNewPostsCount();
      for (      Post p : watcher.getNewPosts()) {
        p.title=pin.loadable.title;
        posts.add(p);
      }
      show=true;
      add=true;
    }
    if (watcher.getNewQuoteCount() > 0) {
      newQuotesCount+=watcher.getNewQuoteCount();
      show=true;
      add=true;
    }
    if (watcher.getWereNewQuotes()) {
      makeSound=true;
    }
    if (add) {
      pins.add(pin);
    }
  }
  if (show) {
    String title=newPostsCount + "String_Node_Str";
    if (newQuotesCount > 0) {
      title+="String_Node_Str" + newQuotesCount + "String_Node_Str";
    }
    String descriptor;
    if (pins.size() == 1) {
      descriptor=pins.get(0).loadable.title;
    }
 else {
      descriptor=pins.size() + "String_Node_Str";
    }
    String content=newPostsCount + "String_Node_Str" + descriptor;
    Collections.sort(posts,new PostAgeComparer());
    List<CharSequence> lines=new ArrayList<CharSequence>();
    for (    Post post : posts) {
      if (pins.size() > 1) {
        lines.add(post.title + "String_Node_Str" + post.comment);
      }
 else {
        lines.add(post.comment);
      }
    }
    showNotification(content,title,content,Integer.toString(newPostsCount),lines,makeSound);
  }
}