Program: 134372
Project: 134372
Buggy source:
synchronized public void execute(){
  NetLogger netLog=NetLogger.getTlogger();
  netlogger.info(netLog.start("String_Node_Str"));
  int schedJobCount=0;
  int totalJobCount=0;
  Connection conn=null;
  try {
    System.gc();
    MaDDashGlobals globals=MaDDashGlobals.getInstance();
    conn=globals.getDataSource().getConnection();
    long time=System.currentTimeMillis() / 1000;
    netlogger.debug(netLog.start("String_Node_Str"));
    PreparedStatement selStmt=conn.prepareStatement("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
    selStmt.setLong(1,time);
    selStmt.setInt(2,CheckConstants.RESULT_MAINTENANCE);
    selStmt.setMaxRows(globals.getJobBatchSize());
    ResultSet checksToRun=selStmt.executeQuery();
    netlogger.debug(netLog.end("String_Node_Str"));
    while (checksToRun.next()) {
      totalJobCount++;
      if (globals.isCheckScheduled(checksToRun.getInt(1))) {
        continue;
      }
      String jobKey=UUID.randomUUID().toString();
      String triggerName="String_Node_Str" + jobKey;
      String jobName="String_Node_Str" + jobKey;
      SimpleTrigger trigger=new SimpleTrigger(triggerName,null,new Date(),null,0,0L);
      JobDetail jobDetail=new JobDetail(jobName,"String_Node_Str",RunCheckJob.class);
      JobDataMap dataMap=new JobDataMap();
      dataMap.put("String_Node_Str",checksToRun.getInt(1));
      dataMap.put("String_Node_Str",checksToRun.getString(2));
      dataMap.put("String_Node_Str",checksToRun.getString(3));
      dataMap.put("String_Node_Str",checksToRun.getString(4));
      dataMap.put("String_Node_Str",globals.getCheckTypeClassMap().get(checksToRun.getString(5)));
      dataMap.put("String_Node_Str",checksToRun.getString(6));
      dataMap.put("String_Node_Str",checksToRun.getInt(7));
      dataMap.put("String_Node_Str",checksToRun.getInt(8));
      dataMap.put("String_Node_Str",checksToRun.getInt(9));
      dataMap.put("String_Node_Str",checksToRun.getInt(10));
      dataMap.put("String_Node_Str",checksToRun.getString(11));
      dataMap.put("String_Node_Str",DimensionUtil.getParams(checksToRun.getString(3),conn));
      dataMap.put("String_Node_Str",DimensionUtil.getParams(checksToRun.getString(4),conn));
      jobDetail.setJobDataMap(dataMap);
      globals.updateScheduledChecks(checksToRun.getInt(1),true);
      globals.getScheduler().scheduleJob(jobDetail,trigger);
      schedJobCount++;
    }
    conn.close();
    netlogger.info(netLog.end("String_Node_Str"));
    log.debug("String_Node_Str" + schedJobCount + "String_Node_Str"+ totalJobCount+ "String_Node_Str");
  }
 catch (  Exception e) {
    if (conn != null) {
      try {
        conn.close();
      }
 catch (      SQLException e2) {
      }
    }
    netlogger.info(netLog.error("String_Node_Str",e.getMessage()));
    log.error("String_Node_Str" + e.getMessage());
    e.printStackTrace();
    throw new RuntimeException(e.getMessage());
  }
}

Fixed version (ground truth):
synchronized public void execute(){
  NetLogger netLog=NetLogger.getTlogger();
  netlogger.info(netLog.start("String_Node_Str"));
  int schedJobCount=0;
  int totalJobCount=0;
  Connection conn=null;
  try {
    System.gc();
    MaDDashGlobals globals=MaDDashGlobals.getInstance();
    conn=globals.getDataSource().getConnection();
    long time=System.currentTimeMillis() / 1000;
    netlogger.debug(netLog.start("String_Node_Str"));
    PreparedStatement selStmt=conn.prepareStatement("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
    selStmt.setLong(1,time);
    selStmt.setInt(2,CheckConstants.RESULT_MAINTENANCE);
    selStmt.setInt(3,globals.getJobBatchSize());
    selStmt.setMaxRows(globals.getJobBatchSize());
    ResultSet checksToRun=selStmt.executeQuery();
    netlogger.debug(netLog.end("String_Node_Str"));
    while (checksToRun.next()) {
      totalJobCount++;
      if (globals.isCheckScheduled(checksToRun.getInt(1))) {
        continue;
      }
      String jobKey=UUID.randomUUID().toString();
      String triggerName="String_Node_Str" + jobKey;
      String jobName="String_Node_Str" + jobKey;
      SimpleTrigger trigger=new SimpleTrigger(triggerName,null,new Date(),null,0,0L);
      JobDetail jobDetail=new JobDetail(jobName,"String_Node_Str",RunCheckJob.class);
      JobDataMap dataMap=new JobDataMap();
      dataMap.put("String_Node_Str",checksToRun.getInt(1));
      dataMap.put("String_Node_Str",checksToRun.getString(2));
      dataMap.put("String_Node_Str",checksToRun.getString(3));
      dataMap.put("String_Node_Str",checksToRun.getString(4));
      dataMap.put("String_Node_Str",globals.getCheckTypeClassMap().get(checksToRun.getString(5)));
      dataMap.put("String_Node_Str",checksToRun.getString(6));
      dataMap.put("String_Node_Str",checksToRun.getInt(7));
      dataMap.put("String_Node_Str",checksToRun.getInt(8));
      dataMap.put("String_Node_Str",checksToRun.getInt(9));
      dataMap.put("String_Node_Str",checksToRun.getInt(10));
      dataMap.put("String_Node_Str",checksToRun.getString(11));
      dataMap.put("String_Node_Str",DimensionUtil.getParams(checksToRun.getString(3),conn));
      dataMap.put("String_Node_Str",DimensionUtil.getParams(checksToRun.getString(4),conn));
      jobDetail.setJobDataMap(dataMap);
      globals.updateScheduledChecks(checksToRun.getInt(1),true);
      globals.getScheduler().scheduleJob(jobDetail,trigger);
      schedJobCount++;
    }
    conn.close();
    netlogger.info(netLog.end("String_Node_Str"));
    log.debug("String_Node_Str" + schedJobCount + "String_Node_Str"+ totalJobCount+ "String_Node_Str");
  }
 catch (  Exception e) {
    if (conn != null) {
      try {
        conn.close();
      }
 catch (      SQLException e2) {
      }
    }
    netlogger.info(netLog.error("String_Node_Str",e.getMessage()));
    log.error("String_Node_Str" + e.getMessage());
    e.printStackTrace();
    throw new RuntimeException(e.getMessage());
  }
}