Program: 106444
Project: 106444
Buggy source:
@Override @ActionEvent(eventType=EventTypes.EVENT_AUTOSCALEVMPROFILE_CREATE,eventDescription="String_Node_Str",create=true) public AutoScaleVmProfile createAutoScaleVmProfile(CreateAutoScaleVmProfileCmd cmd){
  Account owner=_accountDao.findById(cmd.getAccountId());
  Account caller=UserContext.current().getCaller();
  _accountMgr.checkAccess(caller,null,true,owner);
  long zoneId=cmd.getZoneId();
  long serviceOfferingId=cmd.getServiceOfferingId();
  Long autoscaleUserId=cmd.getAutoscaleUserId();
  DataCenter zone=_configMgr.getZone(zoneId);
  if (zone == null) {
    throw new InvalidParameterValueException("String_Node_Str");
  }
  ServiceOffering serviceOffering=_configMgr.getServiceOffering(serviceOfferingId);
  if (serviceOffering == null) {
    throw new InvalidParameterValueException("String_Node_Str");
  }
  HashMap<String,String> deployParams=cmd.getDeployParamMap();
  if (deployParams.containsKey("String_Node_Str") && deployParams.get("String_Node_Str").length() > 0) {
    throw new InvalidParameterValueException("String_Node_Str");
  }
  ApiDispatcher.setupParameters(new DeployVMCmd(),deployParams);
  if (autoscaleUserId == null) {
    autoscaleUserId=UserContext.current().getCallerUserId();
  }
  AutoScaleVmProfileVO profileVO=new AutoScaleVmProfileVO(cmd.getZoneId(),cmd.getDomainId(),cmd.getAccountId(),cmd.getServiceOfferingId(),cmd.getTemplateId(),cmd.getOtherDeployParams(),cmd.getCounterParamList(),cmd.getDestroyVmGraceperiod(),autoscaleUserId);
  profileVO=checkValidityAndPersist(profileVO);
  s_logger.info("String_Node_Str" + profileVO.getId());
  return profileVO;
}

Fixed version (ground truth):
@Override @ActionEvent(eventType=EventTypes.EVENT_AUTOSCALEVMPROFILE_CREATE,eventDescription="String_Node_Str",create=true) public AutoScaleVmProfile createAutoScaleVmProfile(CreateAutoScaleVmProfileCmd cmd){
  Account owner=_accountDao.findById(cmd.getAccountId());
  Account caller=UserContext.current().getCaller();
  _accountMgr.checkAccess(caller,null,true,owner);
  long zoneId=cmd.getZoneId();
  long serviceOfferingId=cmd.getServiceOfferingId();
  Long autoscaleUserId=cmd.getAutoscaleUserId();
  DataCenter zone=_configMgr.getZone(zoneId);
  if (zone == null) {
    throw new InvalidParameterValueException("String_Node_Str");
  }
  ServiceOffering serviceOffering=_configMgr.getServiceOffering(serviceOfferingId);
  if (serviceOffering == null) {
    throw new InvalidParameterValueException("String_Node_Str");
  }
  HashMap<String,String> deployParams=cmd.getDeployParamMap();
  if (deployParams.containsKey("String_Node_Str") && deployParams.get("String_Node_Str").length() > 0) {
    throw new InvalidParameterValueException("String_Node_Str");
  }
  ApiDispatcher.setupParameters(new DeployVMCmd(),deployParams,new ArrayList<ControlledEntity>());
  if (autoscaleUserId == null) {
    autoscaleUserId=UserContext.current().getCallerUserId();
  }
  AutoScaleVmProfileVO profileVO=new AutoScaleVmProfileVO(cmd.getZoneId(),cmd.getDomainId(),cmd.getAccountId(),cmd.getServiceOfferingId(),cmd.getTemplateId(),cmd.getOtherDeployParams(),cmd.getCounterParamList(),cmd.getDestroyVmGraceperiod(),autoscaleUserId);
  profileVO=checkValidityAndPersist(profileVO);
  s_logger.info("String_Node_Str" + profileVO.getId());
  return profileVO;
}