Program: 134370
Project: 134370
Buggy source:
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");
  Map<String,String> rowVars=(Map<String,String>)dataMap.get("String_Node_Str");
  Map<String,String> colVars=(Map<String,String>)dataMap.get("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,rowVars,colVars,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"));
    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"));
}

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");
  Map<String,String> rowVarsUnsorted=(Map<String,String>)dataMap.get("String_Node_Str");
  Map<String,String> colVarsUnsorted=(Map<String,String>)dataMap.get("String_Node_Str");
  TemplateVariableMap rowVars=new TemplateVariableMap();
  if (rowVarsUnsorted != null) {
    rowVars.putAll(rowVarsUnsorted);
  }
  TemplateVariableMap colVars=new TemplateVariableMap();
  if (colVarsUnsorted != null) {
    colVars.putAll(colVarsUnsorted);
  }
  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,rowVars,colVars,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"));
    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"));
}