Program: 107474
Project: 107474
Buggy source:
@Override public List<Pair<String,Object>> execute(Map<String,Object> params){
  Long userId=(Long)params.get(BaseCmd.Properties.USER_ID.getName());
  Long domainId=(Long)params.get(BaseCmd.Properties.DOMAIN_ID.getName());
  String name=(String)params.get(BaseCmd.Properties.NAME.getName());
  String displayText=(String)params.get(BaseCmd.Properties.DISPLAY_TEXT.getName());
  Long numGB=(Long)params.get(BaseCmd.Properties.DISK_SIZE.getName());
  String tags=(String)params.get(BaseCmd.Properties.TAGS.getName());
  if (domainId == null) {
    domainId=DomainVO.ROOT_DOMAIN;
  }
  if (userId == null) {
    userId=Long.valueOf(User.UID_SYSTEM);
  }
  DiskOfferingVO diskOffering=null;
  try {
    diskOffering=getManagementServer().createDiskOffering(userId,domainId.longValue(),name,displayText,numGB.intValue(),tags);
  }
 catch (  InvalidParameterValueException ex) {
    throw new ServerApiException(BaseCmd.VM_INVALID_PARAM_ERROR,ex.getMessage());
  }
  if (diskOffering == null) {
    throw new ServerApiException(BaseCmd.INTERNAL_ERROR,"String_Node_Str");
  }
  List<Pair<String,Object>> returnValues=new ArrayList<Pair<String,Object>>();
  returnValues.add(new Pair<String,Object>(BaseCmd.Properties.ID.getName(),Long.toString(diskOffering.getId())));
  returnValues.add(new Pair<String,Object>(BaseCmd.Properties.DOMAIN_ID.getName(),diskOffering.getDomainId()));
  returnValues.add(new Pair<String,Object>(BaseCmd.Properties.DOMAIN.getName(),getManagementServer().findDomainIdById(diskOffering.getDomainId()).getName()));
  returnValues.add(new Pair<String,Object>(BaseCmd.Properties.NAME.getName(),diskOffering.getName()));
  returnValues.add(new Pair<String,Object>(BaseCmd.Properties.DISPLAY_TEXT.getName(),diskOffering.getDisplayText()));
  returnValues.add(new Pair<String,Object>(BaseCmd.Properties.DISK_SIZE.getName(),diskOffering.getDiskSizeInBytes()));
  returnValues.add(new Pair<String,Object>(BaseCmd.Properties.CREATED.getName(),diskOffering.getCreated()));
  returnValues.add(new Pair<String,Object>(BaseCmd.Properties.TAGS.getName(),diskOffering.getTags()));
  return returnValues;
}

Fixed version (ground truth):
@Override public List<Pair<String,Object>> execute(Map<String,Object> params){
  Long userId=(Long)params.get(BaseCmd.Properties.USER_ID.getName());
  Long domainId=(Long)params.get(BaseCmd.Properties.DOMAIN_ID.getName());
  String name=(String)params.get(BaseCmd.Properties.NAME.getName());
  String displayText=(String)params.get(BaseCmd.Properties.DISPLAY_TEXT.getName());
  Long numGB=(Long)params.get(BaseCmd.Properties.DISK_SIZE.getName());
  String tags=(String)params.get(BaseCmd.Properties.TAGS.getName());
  if (domainId == null) {
    domainId=DomainVO.ROOT_DOMAIN;
  }
  if (userId == null) {
    userId=Long.valueOf(User.UID_SYSTEM);
  }
  DiskOfferingVO diskOffering=null;
  try {
    diskOffering=getManagementServer().createDiskOffering(userId,domainId.longValue(),name,displayText,numGB.intValue(),tags);
  }
 catch (  InvalidParameterValueException ex) {
    throw new ServerApiException(BaseCmd.VM_INVALID_PARAM_ERROR,ex.getMessage());
  }
catch (  InternalErrorException e) {
    throw new ServerApiException(BaseCmd.INTERNAL_ERROR,e.getMessage());
  }
  if (diskOffering == null) {
    throw new ServerApiException(BaseCmd.INTERNAL_ERROR,"String_Node_Str");
  }
  List<Pair<String,Object>> returnValues=new ArrayList<Pair<String,Object>>();
  returnValues.add(new Pair<String,Object>(BaseCmd.Properties.ID.getName(),Long.toString(diskOffering.getId())));
  returnValues.add(new Pair<String,Object>(BaseCmd.Properties.DOMAIN_ID.getName(),diskOffering.getDomainId()));
  returnValues.add(new Pair<String,Object>(BaseCmd.Properties.DOMAIN.getName(),getManagementServer().findDomainIdById(diskOffering.getDomainId()).getName()));
  returnValues.add(new Pair<String,Object>(BaseCmd.Properties.NAME.getName(),diskOffering.getName()));
  returnValues.add(new Pair<String,Object>(BaseCmd.Properties.DISPLAY_TEXT.getName(),diskOffering.getDisplayText()));
  returnValues.add(new Pair<String,Object>(BaseCmd.Properties.DISK_SIZE.getName(),diskOffering.getDiskSizeInBytes()));
  returnValues.add(new Pair<String,Object>(BaseCmd.Properties.CREATED.getName(),diskOffering.getCreated()));
  returnValues.add(new Pair<String,Object>(BaseCmd.Properties.TAGS.getName(),diskOffering.getTags()));
  return returnValues;
}