Program: 12414
Project: 12414
Buggy source:
@TxMain private void postAddPayload(final Payload payload){
  mainJdbc.update(new PreparedStatementCreator(){
    @Override public PreparedStatement createPreparedStatement(    Connection connection) throws SQLException {
      PreparedStatement ps=connection.prepareStatement(SQL_PAYLOAD_INSERT,Statement.RETURN_GENERATED_KEYS);
      ps.setObject(1,payload.getId());
      ps.setObject(2,payload.getTitle());
      ps.setObject(3,payload.getBadge());
      ps.setObject(4,payload.getExtras());
      ps.setObject(5,payload.getSound());
      ps.setObject(6,payload.getProductId());
      ps.setObject(7,payload.getTotalUsers());
      ps.setObject(8,payload.getCreateAt());
      ps.setObject(9,payload.getStatusId());
      ps.setObject(10,payload.getBroadcast());
      ps.setObject(11,payload.getSentDate());
      ps.setObject(12,payload.getOfflineMode());
      ps.setObject(13,payload.getToMode());
      ps.setObject(14,payload.getApnsMode());
      return ps;
    }
  }
);
  if (payload.getClients() != null) {
    mainJdbc.batchUpdate(SQL_PAYLOAD_CLIENT_INSERT,new BatchPreparedStatementSetter(){
      @Override public void setValues(      PreparedStatement preparedStatement,      int i) throws SQLException {
        preparedStatement.setObject(1,payload.getId());
        preparedStatement.setObject(2,payload.getClients().get(i));
        preparedStatement.setObject(3,payload.getProductId());
        preparedStatement.setObject(4,0);
        preparedStatement.setObject(5,new Date().getTime() / 1000);
      }
      @Override public int getBatchSize(){
        return payload.getClients().size();
      }
    }
);
  }
}

Fixed version (ground truth):
@TxMain private void postAddPayload(final Payload payload){
  mainJdbc.update(new PreparedStatementCreator(){
    @Override public PreparedStatement createPreparedStatement(    Connection connection) throws SQLException {
      PreparedStatement ps=connection.prepareStatement(SQL_PAYLOAD_INSERT,Statement.RETURN_GENERATED_KEYS);
      ps.setObject(1,payload.getId());
      ps.setObject(2,payload.getTitle());
      ps.setObject(3,payload.getBadge());
      ps.setObject(4,payload.getExtras());
      ps.setObject(5,payload.getSound());
      ps.setObject(6,payload.getProductId());
      ps.setObject(7,payload.getTotalUsers());
      ps.setObject(8,payload.getCreateAt());
      ps.setObject(9,payload.getStatusId());
      ps.setObject(10,payload.getBroadcast());
      ps.setObject(11,payload.getSentDate());
      ps.setObject(12,payload.getOfflineMode());
      ps.setObject(13,payload.getToMode());
      ps.setObject(14,payload.getApnsMode());
      return ps;
    }
  }
);
  if (payload.getClients() != null) {
    mainJdbc.batchUpdate(SQL_PAYLOAD_CLIENT_INSERT,new BatchPreparedStatementSetter(){
      @Override public void setValues(      PreparedStatement preparedStatement,      int i) throws SQLException {
        preparedStatement.setObject(1,payload.getId());
        preparedStatement.setObject(2,payload.getClients().get(i));
        preparedStatement.setObject(3,payload.getProductId());
        preparedStatement.setObject(4,0);
        preparedStatement.setObject(5,System.currentTimeMillis() / 1000);
      }
      @Override public int getBatchSize(){
        return payload.getClients().size();
      }
    }
);
  }
}