Program: 12476
Project: 12476
Buggy source:
@Override public Integer call() throws Exception {
  if (message == null) {
    return 0;
  }
  if (message.getClients() != null) {
    SentProgress thisProg=new SentProgress(message.getClients().size());
    for (    String client : message.getClients()) {
      Connection c=ConnectionKeeper.get(product.getAppKey(),client);
      if (c != null) {
        c.send(thisProg,message);
      }
 else {
        if (product.getClientTypeid().intValue() != ClientType.iOS) {
          continue;
        }
        Client cc=ClientService.instance.findByUserId(client);
        if (cc == null) {
          logger.warn("String_Node_Str" + client);
          continue;
        }
        if (!cc.isDevice(ClientType.iOS)) {
          continue;
        }
        if (StringUtils.isBlank(cc.getDeviceToken())) {
          logger.error("String_Node_Str" + client);
          continue;
        }
        APNSKeeper.push(thisProg,this.product,cc,message);
      }
    }
    try {
      thisProg.getCountDownLatch().await();
    }
 catch (    InterruptedException e) {
      e.printStackTrace();
    }
    logger.info("String_Node_Str" + message.getId() + "String_Node_Str"+ thisProg);
    int total=thisProg.getSuccess().get();
    if (total > 0) {
      MetricBuilder.pushMeter.mark(total);
      MetricBuilder.pushSingleMeter.mark(total);
    }
    try {
      if (message.getStatusId().intValue() == PayloadStatus.Pending0) {
        message.setTotalUsers(total);
        message.setSentDate(new Date().getTime() / 1000);
        message.setStatusId(PayloadStatus.Sent);
        PayloadService.instance.saveWithId(message);
      }
 else {
        PayloadService.instance.updateSendStatus(message,total);
      }
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
    this.progress.incrSuccess();
    return total;
  }
  return 0;
}

Fixed version (ground truth):
@Override public Integer call() throws Exception {
  if (message == null) {
    return 0;
  }
  if (message.getClients() != null) {
    SentProgress thisProg=new SentProgress(message.getClients().size());
    for (    String client : message.getClients()) {
      Connection c=ConnectionKeeper.get(product.getAppKey(),client);
      if (c != null) {
        c.send(thisProg,message);
      }
 else {
        if (product.getClientTypeid().intValue() != ClientType.iOS) {
          continue;
        }
        Client cc=ClientService.instance.findByUserId(client);
        if (cc == null) {
          logger.warn("String_Node_Str" + client);
          continue;
        }
        if (!cc.isDevice(ClientType.iOS)) {
          continue;
        }
        if (StringUtils.isBlank(cc.getDeviceToken())) {
          logger.error("String_Node_Str" + client);
          continue;
        }
        APNSKeeper.push(thisProg,this.product,cc,message);
      }
    }
    try {
      thisProg.getCountDownLatch().await();
    }
 catch (    InterruptedException e) {
      logger.error(e.getMessage(),e);
    }
    logger.info("String_Node_Str" + message.getId() + "String_Node_Str"+ thisProg);
    int total=thisProg.getSuccess().get();
    if (total > 0) {
      MetricBuilder.pushMeter.mark(total);
      MetricBuilder.pushSingleMeter.mark(total);
    }
    try {
      if (message.getStatusId().intValue() == PayloadStatus.Pending0) {
        message.setTotalUsers(total);
        message.setSentDate(new Date().getTime() / 1000);
        message.setStatusId(PayloadStatus.Sent);
        PayloadService.instance.saveWithId(message);
      }
 else {
        PayloadService.instance.updateSendStatus(message,total);
      }
    }
 catch (    Exception e) {
      logger.error(e.getMessage(),e);
    }
    this.progress.incrSuccess();
    return total;
  }
  return 0;
}