Program: 134376
Project: 134376
Buggy source:
public void execute(JobExecutionContext context) throws JobExecutionException {
  MaDDashGlobals globals=null;
  try {
    globals=MaDDashGlobals.getInstance();
  }
 catch (  Exception e) {
    log.error("String_Node_Str" + e.getMessage());
    e.printStackTrace();
  }
  JobDataMap dataMap=context.getJobDetail().getJobDataMap();
  int checkId=dataMap.getInt("String_Node_Str");
  String gridName=dataMap.getString("String_Node_Str");
  String rowName=dataMap.getString("String_Node_Str");
  String colName=dataMap.getString("String_Node_Str");
  Class checkClass=(Class)dataMap.get("String_Node_Str");
  String checkParams=dataMap.getString("String_Node_Str");
  int timeout=dataMap.getInt("String_Node_Str");
  JSONObject paramJson=null;
  Check checkToRun=null;
  try {
    if (checkParams != null && !CheckConstants.EMPTY_PARAMS.equals(checkParams)) {
      paramJson=JSONObject.fromObject(checkParams);
    }
    checkToRun=(Check)checkClass.newInstance();
  }
 catch (  Exception e) {
    this.deactivateCheck(checkId,globals);
    log.error("String_Node_Str" + e.getMessage());
    e.printStackTrace();
    return;
  }
  HashMap<String,String> netLogFields=new HashMap<String,String>();
  netLogFields.put("String_Node_Str",gridName);
  netLogFields.put("String_Node_Str",rowName);
  netLogFields.put("String_Node_Str",colName);
  NetLogger netLog=NetLogger.getTlogger();
  CheckResult result=null;
  try {
    netlogger.info(netLog.start("String_Node_Str",null,null,netLogFields));
    result=checkToRun.check(gridName,rowName,colName,paramJson,timeout);
    netLogFields.put("String_Node_Str",result.getResultCode() + "String_Node_Str");
    netLogFields.put("String_Node_Str",result.getMessage());
    netlogger.info(netLog.end("String_Node_Str",null,null,netLogFields));
    log.debug("String_Node_Str" + result.getResultCode());
    log.debug("String_Node_Str" + result.getMessage());
  }
 catch (  Exception e) {
    result=new CheckResult(CheckConstants.RESULT_UNKNOWN,e.getMessage(),null);
    netlogger.error(netLog.end("String_Node_Str",e.getMessage(),null,netLogFields));
    log.error("String_Node_Str" + e.getMessage());
    e.printStackTrace();
  }
  Connection conn=null;
  try {
    netlogger.debug(netLog.start("String_Node_Str"));
synchronized (globals) {
      conn=globals.getDataSource().getConnection();
      this.updateDatabase(result,dataMap,conn);
      conn.close();
    }
    netlogger.debug(netLog.end("String_Node_Str"));
  }
 catch (  Exception e) {
    if (conn != null) {
      try {
        conn.close();
      }
 catch (      SQLException e1) {
      }
    }
    netlogger.debug(netLog.error("String_Node_Str",e.getMessage()));
    e.printStackTrace();
  }
  globals.updateScheduledChecks(checkId,false);
}

Fixed version (ground truth):
public void execute(JobExecutionContext context) throws JobExecutionException {
  NetLogger netLog=NetLogger.getTlogger();
  netlogger.debug(netLog.start("String_Node_Str"));
  MaDDashGlobals globals=null;
  try {
    globals=MaDDashGlobals.getInstance();
  }
 catch (  Exception e) {
    log.error("String_Node_Str" + e.getMessage());
    e.printStackTrace();
  }
  JobDataMap dataMap=context.getJobDetail().getJobDataMap();
  int checkId=dataMap.getInt("String_Node_Str");
  String gridName=dataMap.getString("String_Node_Str");
  String rowName=dataMap.getString("String_Node_Str");
  String colName=dataMap.getString("String_Node_Str");
  Class checkClass=(Class)dataMap.get("String_Node_Str");
  String checkParams=dataMap.getString("String_Node_Str");
  int timeout=dataMap.getInt("String_Node_Str");
  JSONObject paramJson=null;
  Check checkToRun=null;
  try {
    if (checkParams != null && !CheckConstants.EMPTY_PARAMS.equals(checkParams)) {
      paramJson=JSONObject.fromObject(checkParams);
    }
    checkToRun=(Check)checkClass.newInstance();
  }
 catch (  Exception e) {
    this.deactivateCheck(checkId,globals);
    log.error("String_Node_Str" + e.getMessage());
    e.printStackTrace();
    return;
  }
  HashMap<String,String> netLogFields=new HashMap<String,String>();
  netLogFields.put("String_Node_Str",gridName);
  netLogFields.put("String_Node_Str",rowName);
  netLogFields.put("String_Node_Str",colName);
  CheckResult result=null;
  try {
    netlogger.info(netLog.start("String_Node_Str",null,null,netLogFields));
    result=checkToRun.check(gridName,rowName,colName,paramJson,timeout);
    netLogFields.put("String_Node_Str",result.getResultCode() + "String_Node_Str");
    netLogFields.put("String_Node_Str",result.getMessage());
    netlogger.info(netLog.end("String_Node_Str",null,null,netLogFields));
    log.debug("String_Node_Str" + result.getResultCode());
    log.debug("String_Node_Str" + result.getMessage());
  }
 catch (  Exception e) {
    result=new CheckResult(CheckConstants.RESULT_UNKNOWN,e.getMessage(),null);
    netlogger.error(netLog.end("String_Node_Str",e.getMessage(),null,netLogFields));
    log.error("String_Node_Str" + e.getMessage());
    e.printStackTrace();
  }
  Connection conn=null;
  try {
    netlogger.debug(netLog.start("String_Node_Str"));
synchronized (globals) {
      conn=globals.getDataSource().getConnection();
      this.updateDatabase(result,dataMap,conn);
      conn.close();
    }
    netlogger.debug(netLog.end("String_Node_Str"));
  }
 catch (  Exception e) {
    if (conn != null) {
      try {
        conn.close();
      }
 catch (      SQLException e1) {
      }
    }
    netlogger.debug(netLog.error("String_Node_Str",e.getMessage()));
    e.printStackTrace();
  }
  globals.updateScheduledChecks(checkId,false);
  netlogger.debug(netLog.end("String_Node_Str"));
}