Program: 166480
Project: 166480
Buggy source:
public VXResponse testConfig(VXAsset vXAsset){
  if (vXAsset.getActiveStatus() == XACommonEnums.STATUS_DELETED) {
    logger.error("String_Node_Str");
    throw restErrorUtil.createRESTException("String_Node_Str" + vXAsset.getName(),MessageEnums.DATA_NOT_FOUND,vXAsset.getId(),null,"String_Node_Str" + vXAsset.getId());
  }
  int assetType=vXAsset.getAssetType();
  VXResponse testResponse=new VXResponse();
  HashMap<String,Object> responseData=new HashMap<String,Object>();
  HashMap<String,String> configMap=(HashMap<String,String>)jsonUtil.jsonToMap(vXAsset.getConfig());
  String password=configMap.get("String_Node_Str");
  String hiddenPasswordString=PropertiesUtil.getProperty("String_Node_Str","String_Node_Str");
  if (password != null && password.equals(hiddenPasswordString)) {
    String assetName=vXAsset.getName();
    if (assetName != null) {
      XXAsset existingVXAsset=xADaoManager.getXXAsset().findByAssetName(assetName);
      if (existingVXAsset != null && existingVXAsset.getConfig() != null) {
        String existingConfig=existingVXAsset.getConfig();
        existingConfig=xAssetService.getConfigWithDecryptedPassword(existingConfig);
        HashMap<String,String> existingConfigMap=(HashMap<String,String>)jsonUtil.jsonToMap(existingConfig);
        String existingPassword=existingConfigMap.get("String_Node_Str");
        if (existingPassword != null) {
          configMap.put("String_Node_Str",existingPassword);
        }
      }
    }
  }
  try {
    String dataSource=vXAsset.getName();
    if (assetType == AppConstants.ASSET_HDFS) {
      responseData=HadoopFS.testConnection(dataSource,configMap);
    }
 else     if (assetType == AppConstants.ASSET_HIVE) {
      responseData=HiveClient.testConnection(dataSource,configMap);
    }
 else     if (assetType == AppConstants.ASSET_HBASE) {
      responseData=HBaseClient.testConnection(dataSource,configMap);
    }
 else     if (assetType == AppConstants.ASSET_KNOX) {
      responseData=KnoxClient.testConnection(dataSource,configMap);
    }
 else     if (assetType == AppConstants.ASSET_STORM) {
      responseData=StormClient.testConnection(dataSource,configMap);
    }
 else {
      throw restErrorUtil.createRESTException("String_Node_Str",MessageEnums.INVALID_INPUT_DATA);
    }
    testResponse=generateResponseForTestConn(responseData,"String_Node_Str");
  }
 catch (  Exception e) {
    String msg="String_Node_Str" + vXAsset.getName();
    HashMap<String,Object> respData=new HashMap<String,Object>();
    String message="String_Node_Str";
    if (e instanceof HadoopException) {
      respData=((HadoopException)e).responseData;
      message=(respData != null && respData.get("String_Node_Str") != null) ? respData.get("String_Node_Str").toString() : msg;
    }
    testResponse=generateResponseForTestConn(respData,message);
    logger.error(msg,e);
  }
  return testResponse;
}

Fixed version (ground truth):
public VXResponse testConfig(VXAsset vXAsset){
  if (vXAsset.getActiveStatus() == XACommonEnums.STATUS_DELETED) {
    logger.error("String_Node_Str");
    throw restErrorUtil.createRESTException("String_Node_Str" + vXAsset.getName(),MessageEnums.DATA_NOT_FOUND,vXAsset.getId(),null,"String_Node_Str" + vXAsset.getId());
  }
  int assetType=vXAsset.getAssetType();
  VXResponse testResponse=new VXResponse();
  HashMap<String,Object> responseData=new HashMap<String,Object>();
  HashMap<String,String> configMap=(HashMap<String,String>)jsonUtil.jsonToMap(vXAsset.getConfig());
  String password=configMap.get("String_Node_Str");
  String hiddenPasswordString=PropertiesUtil.getProperty("String_Node_Str","String_Node_Str");
  if (password != null && password.equals(hiddenPasswordString)) {
    String assetName=vXAsset.getName();
    if (assetName != null) {
      XXAsset existingVXAsset=xADaoManager.getXXAsset().findByAssetName(assetName);
      if (existingVXAsset != null && existingVXAsset.getConfig() != null) {
        String existingConfig=existingVXAsset.getConfig();
        existingConfig=xAssetService.getConfigWithDecryptedPassword(existingConfig);
        HashMap<String,String> existingConfigMap=(HashMap<String,String>)jsonUtil.jsonToMap(existingConfig);
        String existingPassword=existingConfigMap.get("String_Node_Str");
        if (existingPassword != null) {
          configMap.put("String_Node_Str",existingPassword);
        }
      }
    }
  }
  try {
    String dataSource=vXAsset.getName();
    if (assetType == AppConstants.ASSET_HDFS) {
      responseData=HadoopFS.testConnection(dataSource,configMap);
    }
 else     if (assetType == AppConstants.ASSET_HIVE) {
      responseData=HiveClient.testConnection(dataSource,configMap);
    }
 else     if (assetType == AppConstants.ASSET_HBASE) {
      responseData=HBaseClient.testConnection(dataSource,configMap);
    }
 else     if (assetType == AppConstants.ASSET_KNOX) {
      responseData=KnoxClient.testConnection(dataSource,configMap);
    }
 else     if (assetType == AppConstants.ASSET_STORM) {
      responseData=StormClient.testConnection(dataSource,configMap);
    }
 else {
      throw restErrorUtil.createRESTException("String_Node_Str",MessageEnums.INVALID_INPUT_DATA);
    }
    testResponse=generateResponseForTestConn(responseData,"String_Node_Str");
  }
 catch (  Exception e) {
    String msg="String_Node_Str" + vXAsset.getName();
    HashMap<String,Object> respData=new HashMap<String,Object>();
    String message="String_Node_Str";
    if (e instanceof HadoopException) {
      respData=((HadoopException)e).responseData;
      message=(respData != null && respData.get("String_Node_Str") != null) ? respData.get("String_Node_Str").toString() : msg;
    }
    if (respData == null) {
      respData=new HashMap<String,Object>();
    }
    testResponse=generateResponseForTestConn(respData,message);
    logger.error(msg,e);
  }
  return testResponse;
}