Program: 134364
Project: 134364
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.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;
      Trigger trigger=newTrigger().withIdentity(triggerName).startNow().build();
      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),checksToRun.getString(4),conn));
      dataMap.put("String_Node_Str",DimensionUtil.getParams(checksToRun.getString(4),checksToRun.getString(3),conn));
      JobDetail jobDetail=newJob(RunCheckJob.class).withIdentity(jobName,"String_Node_Str").usingJobData(dataMap).build();
      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());
    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;
      Trigger trigger=newTrigger().withIdentity(triggerName).startNow().build();
      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),checksToRun.getString(4),conn));
      dataMap.put("String_Node_Str",DimensionUtil.getParams(checksToRun.getString(4),checksToRun.getString(3),conn));
      JobDetail jobDetail=newJob(RunCheckJob.class).withIdentity(jobName,"String_Node_Str").usingJobData(dataMap).build();
      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());
  }
}