Program: 6743
Project: 6743
Buggy source:
@Override public void newComment(MidasComment c) throws IOException {
  Set<Long> sentUids=new HashSet<Long>();
  MidasUser commentUser=userDao.getById(c.getUserId());
  if (c.getParentId() > 0) {
    MidasComment par=commentDao.getComment(c.getParentId());
    if (par.getUserId() != c.getUserId()) {
      MidasUserConfig muc=userCfgDao.getUserConfig(par.getUserId());
      String creStr=(muc == null) ? null : muc.getItem("String_Node_Str");
      boolean cre=(creStr == null) ? true : Boolean.valueOf(creStr);
      if (cre) {
        MidasUser origUser=userDao.getById(par.getUserId());
        Matcher pm=PLAYLIST_ITEM_PAT.matcher(c.getResourceId());
        if (pm.matches()) {
          MidasPlaylist p=playlistDao.getPlaylistById(Long.parseLong(pm.group(1)));
          message.sendReplyNotificationForPlaylist(origUser,commentUser,p);
          sentUids.add(origUser.getUserId());
        }
 else {
          Matcher lm=LIBRARY_ITEM_PAT.matcher(c.getResourceId());
          if (lm.matches()) {
            message.sendReplyNotificationForLibrary(origUser,commentUser,Long.parseLong(lm.group(1)));
            sentUids.add(origUser.getUserId());
          }
        }
      }
    }
  }
  Matcher pm=PLAYLIST_ITEM_PAT.matcher(c.getResourceId());
  if (pm.matches()) {
    MidasPlaylist p=playlistDao.getPlaylistById(Long.parseLong(pm.group(1)));
    for (    Long ownerId : p.getOwnerIds()) {
      if (sentUids.contains(ownerId))       continue;
      MidasUserConfig muc=userCfgDao.getUserConfig(ownerId);
      String pceStr=muc.getItem("String_Node_Str");
      boolean pce=(pceStr == null) ? true : Boolean.valueOf(pceStr);
      if (pce) {
        MidasUser owner=userDao.getById(ownerId);
        message.sendCommentNotificationForPlaylist(owner,commentUser,p);
        sentUids.add(ownerId);
      }
    }
  }
 else {
    Matcher lm=LIBRARY_ITEM_PAT.matcher(c.getResourceId());
    if (!lm.matches()) {
      log.error("String_Node_Str" + c.getResourceId());
      return;
    }
    long ownerId=Long.parseLong(lm.group(1));
    if (!sentUids.contains(ownerId)) {
      MidasUserConfig muc=userCfgDao.getUserConfig(ownerId);
      String pceStr=muc.getItem("String_Node_Str");
      boolean pce=(pceStr == null) ? true : Boolean.valueOf(pceStr);
      if (pce) {
        MidasUser owner=userDao.getById(ownerId);
        message.sendCommentNotificationForLibrary(owner,commentUser);
        sentUids.add(ownerId);
      }
    }
  }
}

Fixed version (ground truth):
@Override public void newComment(MidasComment c) throws IOException {
  Set<Long> sentUids=new HashSet<Long>();
  MidasUser commentUser=userDao.getById(c.getUserId());
  if (c.getParentId() > 0) {
    MidasComment par=commentDao.getComment(c.getParentId());
    if (par.getUserId() != c.getUserId()) {
      MidasUserConfig muc=userCfgDao.getUserConfig(par.getUserId());
      String creStr=(muc == null) ? null : muc.getItem("String_Node_Str");
      boolean cre=(creStr == null) ? true : Boolean.valueOf(creStr);
      if (cre) {
        MidasUser origUser=userDao.getById(par.getUserId());
        Matcher pm=PLAYLIST_ITEM_PAT.matcher(c.getResourceId());
        if (pm.matches()) {
          MidasPlaylist p=playlistDao.getPlaylistById(Long.parseLong(pm.group(1)));
          message.sendReplyNotificationForPlaylist(origUser,commentUser,p);
          sentUids.add(origUser.getUserId());
        }
 else {
          Matcher lm=LIBRARY_ITEM_PAT.matcher(c.getResourceId());
          if (lm.matches()) {
            message.sendReplyNotificationForLibrary(origUser,commentUser,Long.parseLong(lm.group(1)));
            sentUids.add(origUser.getUserId());
          }
        }
      }
    }
  }
  Matcher pm=PLAYLIST_ITEM_PAT.matcher(c.getResourceId());
  if (pm.matches()) {
    MidasPlaylist p=playlistDao.getPlaylistById(Long.parseLong(pm.group(1)));
    for (    Long ownerId : p.getOwnerIds()) {
      if (sentUids.contains(ownerId))       continue;
      MidasUserConfig muc=userCfgDao.getUserConfig(ownerId);
      String pceStr=(muc == null) ? null : muc.getItem("String_Node_Str");
      boolean pce=(pceStr == null) ? true : Boolean.valueOf(pceStr);
      if (pce) {
        MidasUser owner=userDao.getById(ownerId);
        message.sendCommentNotificationForPlaylist(owner,commentUser,p);
        sentUids.add(ownerId);
      }
    }
  }
 else {
    Matcher lm=LIBRARY_ITEM_PAT.matcher(c.getResourceId());
    if (!lm.matches()) {
      log.error("String_Node_Str" + c.getResourceId());
      return;
    }
    long ownerId=Long.parseLong(lm.group(1));
    if (!sentUids.contains(ownerId)) {
      MidasUserConfig muc=userCfgDao.getUserConfig(ownerId);
      String pceStr=(muc == null) ? null : muc.getItem("String_Node_Str");
      boolean pce=(pceStr == null) ? true : Boolean.valueOf(pceStr);
      if (pce) {
        MidasUser owner=userDao.getById(ownerId);
        message.sendCommentNotificationForLibrary(owner,commentUser);
        sentUids.add(ownerId);
      }
    }
  }
}