Program: 48581
Project: 48581
Buggy source:
@Transactional public void updateAppConfig(String clusterName,ClusterCreate clusterCreate){
  logger.debug("String_Node_Str" + clusterName);
  ClusterEntity cluster=clusterEntityMgr.findByName(clusterName);
  if (cluster == null) {
    logger.error("String_Node_Str" + clusterName + "String_Node_Str");
    throw BddException.NOT_FOUND("String_Node_Str",clusterName);
  }
  SoftwareManager softwareManager=getSoftwareManager(cluster.getAppManager());
  clusterCreate.setDistro(cluster.getDistro());
  clusterCreate.setDistroVersion(cluster.getDistroVersion());
  if (!CommonUtil.isBlank(cluster.getAdvancedProperties())) {
    Gson gson=new Gson();
    Map<String,String> advancedProperties=gson.fromJson(cluster.getAdvancedProperties(),Map.class);
    clusterCreate.setExternalHDFS(advancedProperties.get("String_Node_Str"));
    clusterCreate.setExternalMapReduce(advancedProperties.get("String_Node_Str"));
  }
  ClusterBlueprint blueprint=clusterCreate.toBlueprint();
  try {
    softwareManager.validateBlueprint(blueprint);
  }
 catch (  ValidationException e) {
    throw new ClusterConfigException(e,e.getMessage() + e.getFailedMsgList().toString());
  }
  updateInfrastructure(clusterCreate,softwareManager,blueprint);
  Map<String,Object> clusterLevelConfig=clusterCreate.getConfiguration();
  if (clusterLevelConfig != null && clusterLevelConfig.size() > 0) {
    logger.debug("String_Node_Str");
    cluster.setHadoopConfig((new Gson()).toJson(clusterLevelConfig));
    updateVhmJobTrackerPort(clusterCreate,cluster);
  }
 else {
    logger.debug("String_Node_Str");
    cluster.setHadoopConfig(null);
  }
  setAdvancedProperties(clusterCreate.getExternalHDFS(),clusterCreate.getExternalMapReduce(),cluster);
  updateNodegroupAppConfig(clusterCreate,cluster,clusterCreate.isValidateConfig());
}

Fixed version (ground truth):
@Transactional public void updateAppConfig(String clusterName,ClusterCreate clusterCreate){
  logger.debug("String_Node_Str" + clusterName);
  ClusterEntity cluster=clusterEntityMgr.findByName(clusterName);
  if (cluster == null) {
    logger.error("String_Node_Str" + clusterName + "String_Node_Str");
    throw BddException.NOT_FOUND("String_Node_Str",clusterName);
  }
  SoftwareManager softwareManager=getSoftwareManager(cluster.getAppManager());
  clusterCreate.setDistro(cluster.getDistro());
  clusterCreate.setDistroVersion(cluster.getDistroVersion());
  if (!CommonUtil.isBlank(cluster.getAdvancedProperties())) {
    Gson gson=new Gson();
    Map<String,String> advancedProperties=gson.fromJson(cluster.getAdvancedProperties(),Map.class);
    clusterCreate.setExternalHDFS(advancedProperties.get("String_Node_Str"));
    clusterCreate.setExternalMapReduce(advancedProperties.get("String_Node_Str"));
  }
  ClusterBlueprint blueprint=clusterCreate.toBlueprint();
  try {
    softwareManager.validateBlueprint(blueprint);
  }
 catch (  ValidationException e) {
    throw ClusterConfigException.INVALID_SPEC(e.getFailedMsgList());
  }
  updateInfrastructure(clusterCreate,softwareManager,blueprint);
  Map<String,Object> clusterLevelConfig=clusterCreate.getConfiguration();
  if (clusterLevelConfig != null && clusterLevelConfig.size() > 0) {
    logger.debug("String_Node_Str");
    cluster.setHadoopConfig((new Gson()).toJson(clusterLevelConfig));
    updateVhmJobTrackerPort(clusterCreate,cluster);
  }
 else {
    logger.debug("String_Node_Str");
    cluster.setHadoopConfig(null);
  }
  setAdvancedProperties(clusterCreate.getExternalHDFS(),clusterCreate.getExternalMapReduce(),cluster);
  updateNodegroupAppConfig(clusterCreate,cluster,clusterCreate.isValidateConfig());
}