auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public int hashCode ( ) { final int prime = 31 ; int result = super . hashCode ( ) ; result = ( prime * result ) + ( ( outAverageLinkshare ) == null ? 0 : outAverageLinkshare.hashCode ( ) ) ; result = ( prime * result ) + ( ( outAverageRealtime ) == null ? 0 : outAverageRealtime.hashCode ( ) ) ; result = ( prime * result ) + ( ( outAverageUpperlimit ) == null ? 0 : outAverageUpperlimit.hashCode ( ) ) ; return result ; }

Target:
public boolean equals ( java.lang.Object obj ) { if ( ( this ) == obj ) { return true ; } if ( ! ( obj instanceof org.ovirt.engine.core.common.businessentities.network.HostNetworkQos ) ) { return false ; } org.ovirt.engine.core.common.businessentities.network.HostNetworkQos other = ( ( org.ovirt.engine.core.common.businessentities.network.HostNetworkQos ) ( obj ) ) ; return ( ( ( super . equals ( obj ) ) && ( java.util.Objects.equals ( outAverageLinkshare , other.outAverageLinkshare ) ) ) && ( java.util.Objects.equals ( outAverageUpperlimit , other.outAverageUpperlimit ) ) ) && ( java.util.Objects.equals ( outAverageRealtime , other.outAverageRealtime ) ) ; }
Source:
public static void getRedirectServletReportsPage ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.String ) ( source ) ) : "" ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.RedirectServletReportsPage , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public static void getAllDataCenterNetworks ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.Network > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.Network > ( ) ; } } ; org.ovirt.engine.core.common.queries.IdQueryParameters params = new org.ovirt.engine.core.common.queries.IdQueryParameters ( storagePoolId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetNetworksByDataCenterId , params , aQuery ) ; }
Source:
protected void executeIrsBrokerCommand ( ) { org.ovirt.engine.core.vdsbroker.ResourceManager.getInstance ( ) . runVdsCommand ( VDSCommandType.ResetIrs , new org.ovirt.engine.core.common.vdscommands.ResetIrsVDSCommandParameters ( org.ovirt.engine.core.vdsbroker.irsbroker.SpmStopOnIrsVDSCommand.getParameters ( ) . getStoragePoolId ( ) , org.ovirt.engine.core.vdsbroker.irsbroker.SpmStopOnIrsVDSCommand.getCurrentIrsProxyData ( ) . getCurrentVdsId ( ) , org.ovirt.engine.core.vdsbroker.irsbroker.SpmStopOnIrsVDSCommand.getParameters ( ) . getPreferredSPMId ( ) ) ) ; }

Target:
protected void executeIrsBrokerCommand ( ) { org.ovirt.engine.core.vdsbroker.irsbroker.SpmStopOnIrsVDSCommand.getVDSReturnValue ( ) . setSucceeded ( org.ovirt.engine.core.vdsbroker.ResourceManager.getInstance ( ) . runVdsCommand ( VDSCommandType.ResetIrs , new org.ovirt.engine.core.common.vdscommands.ResetIrsVDSCommandParameters ( org.ovirt.engine.core.vdsbroker.irsbroker.SpmStopOnIrsVDSCommand.getParameters ( ) . getStoragePoolId ( ) , org.ovirt.engine.core.vdsbroker.irsbroker.SpmStopOnIrsVDSCommand.getCurrentIrsProxyData ( ) . getCurrentVdsId ( ) , org.ovirt.engine.core.vdsbroker.irsbroker.SpmStopOnIrsVDSCommand.getParameters ( ) . getPreferredSPMId ( ) ) ) . getSucceeded ( ) ) ; }
Source:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.VmListModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.VmListModel ) ( target ) ) ; if ( returnValue != null ) { model.setCustomPropertiesKeysList ( ( ( java.util.HashMap < org.ovirt.engine.core.compat.Version , java.util.ArrayList < java.lang.String > > ) ( returnValue ) ) ) ; } }

Target:
public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { getWindow ( ) . stopProgress ( ) ; org.ovirt.engine.core.common.action.VdcReturnValueBase returnValue = result.getReturnValue ( ) ; if ( ( returnValue != null ) && ( returnValue.getSucceeded ( ) ) ) { setWindow ( null ) ; setGuideContext ( returnValue.getActionReturnValue ( ) ) ; updateActionAvailability ( ) ; getGuideCommand ( ) . execute ( ) ; } else { cancel ( ) ; } super . executed ( result ) ; }
Source:
protected void executeCommand ( ) { org.ovirt.engine.core.common.vdscommands.VDSReturnValue vdsReturnaValue = runVdsCommand ( VDSCommandType.StopRebalanceGlusterVolume , new org.ovirt.engine.core.common.vdscommands.gluster.GlusterVolumeVDSParameters ( upServer.getId ( ) , getGlusterVolumeName ( ) ) ) ; setSucceeded ( vdsReturnaValue.getSucceeded ( ) ) ; if ( ! ( getSucceeded ( ) ) ) { handleVdsError ( AuditLogType.GLUSTER_VOLUME_REBALANCE_STOP_FAILED , vdsReturnaValue.getVdsError ( ) . getMessage ( ) ) ; return ; } endStepJob ( ) ; clearVolumeTaskAndReleaseLock ( ) ; getReturnValue ( ) . setActionReturnValue ( vdsReturnaValue ) ; }

Target:
protected void executeCommand ( ) { org.ovirt.engine.core.common.vdscommands.VDSReturnValue vdsReturnaValue = runVdsCommand ( VDSCommandType.StopRebalanceGlusterVolume , new org.ovirt.engine.core.common.vdscommands.gluster.GlusterVolumeVDSParameters ( upServer.getId ( ) , getGlusterVolumeName ( ) ) ) ; setSucceeded ( vdsReturnaValue.getSucceeded ( ) ) ; if ( ! ( getSucceeded ( ) ) ) { handleVdsError ( AuditLogType.GLUSTER_VOLUME_REBALANCE_STOP_FAILED , vdsReturnaValue.getVdsError ( ) . getMessage ( ) ) ; return ; } endStepJob ( ) ; releaseVolumeLock ( ) ; getReturnValue ( ) . setActionReturnValue ( vdsReturnaValue ) ; }
Source:
private void addGraphicsDevice ( ) { for ( org.ovirt.engine.core.common.businessentities.GraphicsDevice graphicsDevice : org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . getGraphicsDevices ( ) . values ( ) ) { if ( graphicsDevice == null ) { continue ; } graphicsDevice.setVmId ( org.ovirt.engine.core.bll.AddVmCommand.getVmId ( ) ) ; org.ovirt.engine.core.bll.AddVmCommand.getBackend ( ) . runInternalAction ( VdcActionType.AddGraphicsDevice , new org.ovirt.engine.core.bll.GraphicsParameters ( graphicsDevice ) ) ; } }

Target:
private void addGraphicsDevice ( ) { for ( org.ovirt.engine.core.common.businessentities.GraphicsDevice graphicsDevice : org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . getGraphicsDevices ( ) . values ( ) ) { if ( graphicsDevice == null ) { continue ; } graphicsDevice.setVmId ( org.ovirt.engine.core.bll.AddVmCommand.getVmId ( ) ) ; org.ovirt.engine.core.bll.AddVmCommand.getBackend ( ) . runInternalAction ( VdcActionType.AddGraphicsDevice , new org.ovirt.engine.core.common.action.GraphicsParameters ( graphicsDevice ) ) ; } }
Source:
public void failedStop ( ) { org.ovirt.engine.core.common.businessentities.pm.FenceOperationResult result = new org.ovirt.engine.core.common.businessentities.pm.FenceOperationResult ( FenceActionType.STOP , 1 , null , null , "initiated" ) ; org.junit.Assert.assertEquals ( Status.ERROR , result.getStatus ( ) ) ; org.junit.Assert.assertEquals ( PowerStatus.UNKNOWN , result.getPowerStatus ( ) ) ; }

Target:
public void failedStop ( ) { org.ovirt.engine.core.common.businessentities.pm.FenceOperationResult result = new org.ovirt.engine.core.common.businessentities.pm.FenceOperationResult ( FenceActionType.STOP , 1 , null , null , "initiated" ) ; org.junit.jupiter.api.Assertions.assertEquals ( Status.ERROR , result.getStatus ( ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( PowerStatus.UNKNOWN , result.getPowerStatus ( ) ) ; }
Source:
protected boolean validateVdsCluster ( ) { org.ovirt.engine.core.common.businessentities.VDSGroup vdsGroup = org.ovirt.engine.core.bll.ImportVmCommandBase.getVdsGroupDao ( ) . get ( org.ovirt.engine.core.bll.ImportVmCommandBase.getVdsGroupId ( ) ) ; return vdsGroup == null ? failCanDoAction ( EngineMessage.VDS_CLUSTER_IS_NOT_VALID ) : ( vdsGroup.getArchitecture ( ) ) != ( org.ovirt.engine.core.bll.ImportVmCommandBase.getVm ( ) . getClusterArch ( ) ) ? failCanDoAction ( EngineMessage.ACTION_TYPE_FAILED_VM_CANNOT_IMPORT_VM_ARCHITECTURE_NOT_SUPPORTED_BY_CLUSTER ) : true ; }

Target:
protected boolean validateUniqueVmName ( ) { return org.ovirt.engine.core.bll.VmHandler.isVmWithSameNameExistStatic ( getVm ( ) . getName ( ) , org.ovirt.engine.core.bll.ImportVmCommandBase.getStoragePoolId ( ) ) ? failValidation ( EngineMessage.VM_CANNOT_IMPORT_VM_NAME_EXISTS ) : true ; }
Source:
private boolean isDomainAttachedToDifferentStoragePool ( ) { if ( ( org.ovirt.engine.core.bll.storage.AddStoragePoolWithStoragesCommand.getStoragePool ( ) . getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.StoragePoolStatus.Uninitialized ) ) { for ( org.ovirt.engine.core.compat.Guid storageDomainId : org.ovirt.engine.core.bll.storage.AddStoragePoolWithStoragesCommand.getParameters ( ) . getStorages ( ) ) { org.ovirt.engine.core.common.businessentities.StorageDomain domain = org.ovirt.engine.core.bll.storage.AddStoragePoolWithStoragesCommand.getStorageDomainDAO ( ) . get ( storageDomainId ) ; if ( ( domain.getStorageDomainType ( ) . isDataDomain ( ) ) && ( isStorageDomainAttachedToStoragePool ( domain ) ) ) { return failCanDoAction ( VdcBllMessages.ERROR_CANNOT_ADD_STORAGE_DOMAIN_WITH_ATTACHED_DATA_DOMAIN ) ; } } } return true ; }

Target:
private boolean isDomainAttachedToDifferentStoragePool ( ) { if ( ( org.ovirt.engine.core.bll.storage.AddStoragePoolWithStoragesCommand.getStoragePool ( ) . getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.StoragePoolStatus.Uninitialized ) ) { for ( org.ovirt.engine.core.compat.Guid storageDomainId : org.ovirt.engine.core.bll.storage.AddStoragePoolWithStoragesCommand.getParameters ( ) . getStorages ( ) ) { org.ovirt.engine.core.common.businessentities.StorageDomain domain = org.ovirt.engine.core.bll.storage.AddStoragePoolWithStoragesCommand.getStorageDomainDao ( ) . get ( storageDomainId ) ; if ( ( domain.getStorageDomainType ( ) . isDataDomain ( ) ) && ( isStorageDomainAttachedToStoragePool ( domain ) ) ) { return failCanDoAction ( VdcBllMessages.ERROR_CANNOT_ADD_STORAGE_DOMAIN_WITH_ATTACHED_DATA_DOMAIN ) ; } } } return true ; }
Source:
public void update ( int index , org.ovirt.engine.core.common.businessentities.DiskImage disk , java.lang.String value ) { org.ovirt.engine.core.common.businessentities.VolumeType tempVolumeType = org.ovirt.engine.core.common.businessentities.VolumeType.Sparse ; if ( value.equals ( constants.thinAllocation ( ) ) ) { tempVolumeType = org.ovirt.engine.core.common.businessentities.VolumeType.Sparse ; } else if ( value.equals ( constants.preallocatedAllocation ( ) ) ) { tempVolumeType = org.ovirt.engine.core.common.businessentities.VolumeType.Preallocated ; } org.ovirt.engine.ui.uicommonweb.models.vms.ImportDiskData importData = importModel.getDiskImportData ( disk.getId ( ) ) ; if ( importData != null ) { importData.setSelectedVolumeType ( tempVolumeType ) ; } }

Target:
public void update ( int index , org.ovirt.engine.core.common.businessentities.storage.DiskImage disk , java.lang.String value ) { org.ovirt.engine.core.common.businessentities.storage.VolumeType tempVolumeType = org.ovirt.engine.core.common.businessentities.storage.VolumeType.Sparse ; if ( value.equals ( constants.thinAllocation ( ) ) ) { tempVolumeType = org.ovirt.engine.core.common.businessentities.storage.VolumeType.Sparse ; } else if ( value.equals ( constants.preallocatedAllocation ( ) ) ) { tempVolumeType = org.ovirt.engine.core.common.businessentities.storage.VolumeType.Preallocated ; } org.ovirt.engine.ui.uicommonweb.models.vms.ImportDiskData importData = importModel.getDiskImportData ( disk.getId ( ) ) ; if ( importData != null ) { importData.setSelectedVolumeType ( tempVolumeType ) ; } }
Source:
public void getVmsFromExternalServer ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId , org.ovirt.engine.core.compat.Guid vdsId , java.lang.String url , java.lang.String username , java.lang.String password , org.ovirt.engine.core.common.businessentities.OriginType originType ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VM > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmsFromExternalProvider , new org.ovirt.engine.core.common.queries.GetVmsFromExternalProviderQueryParameters ( url , username , password , originType , vdsId , dataCenterId ) , aQuery ) ; }

Target:
private void initOsDefaultIconIds ( ) { org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmIconDefaults , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , new org.ovirt.engine.ui.frontend.AsyncQuery ( new org.ovirt.engine.ui.frontend.AsyncCallback < org.ovirt.engine.core.common.queries.VdcQueryReturnValue > ( ) { @ java.lang.Override public void onSuccess ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue returnValue ) { final java.util.Map < java.lang.Integer , org.ovirt.engine.core.common.queries.VmIconIdSizePair > returnMap = returnValue.getReturnValue ( ) ; if ( ( returnMap.get ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.DEFAULT_OS_ID ) ) == null ) { throw new java.lang.RuntimeException ( "Engine did not provide icon IDs of default OS." ) ; } osIdToDefaultIconIdMap = java.util.Collections.unmodifiableMap ( returnMap ) ; initializeLargeToSmallIconMap ( ) ; } } ) ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.VDS getVds ( org.ovirt.engine.core.common.businessentities.VDSStatus status ) { org.ovirt.engine.core.common.businessentities.VDS vds = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; vds.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; vds.setVdsName ( "gfs1" ) ; vds.setVdsGroupId ( org.ovirt.engine.core.bll.gluster.GetGlusterVolumeRebalanceStatusQueryTest.CLUSTER_ID ) ; vds.setStatus ( status ) ; return vds ; }

Target:
private org.ovirt.engine.core.common.businessentities.VDS getVds ( org.ovirt.engine.core.common.businessentities.VDSStatus status ) { org.ovirt.engine.core.common.businessentities.VDS vds = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; vds.setId ( org.ovirt.engine.core.bll.gluster.GetGlusterVolumeRebalanceStatusQueryTest.SERVER_ID ) ; vds.setVdsName ( "gfs1" ) ; vds.setVdsGroupId ( org.ovirt.engine.core.bll.gluster.GetGlusterVolumeRebalanceStatusQueryTest.CLUSTER_ID ) ; vds.setStatus ( status ) ; return vds ; }
Source:
protected void setUpGetPayloadExpectations ( int times , int index ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.VmPayload payload = new org.ovirt.engine.core.common.businessentities.VmPayload ( ) ; for ( int i = 0 ; i < times ; i ++ ) { setUpGetEntityExpectations ( VdcQueryType.GetVmPayload , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ index ] } , payload ) ; } }

Target:
private void setUpGetBallooningExpectations ( int times ) throws java.lang.Exception { for ( int i = 0 ; i < times ; i ++ ) { setUpGetEntityExpectations ( VdcQueryType.IsBalloonEnabled , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ i ] } , true ) ; } }
Source:
private static void logField ( org.ovirt.engine.core.common.businessentities.VmStatic vmStaticFromOvf , java.lang.String fieldName , java.lang.String fieldValue ) { java.lang.String vmName = vmStaticFromOvf.getName ( ) ; org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase logable = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; logable.addCustomValue ( "FieldName" , fieldName ) ; logable.addCustomValue ( "VmName" , vmName ) ; logable.addCustomValue ( "FieldValue" , fieldValue ) ; new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector ( ) . log ( logable , AuditLogType.VM_IMPORT_INFO ) ; }

Target:
private void logField ( org.ovirt.engine.core.common.businessentities.VmStatic vmStaticFromOvf , java.lang.String fieldName , java.lang.String fieldValue ) { java.lang.String vmName = vmStaticFromOvf.getName ( ) ; org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase logable = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; logable.addCustomValue ( "FieldName" , fieldName ) ; logable.addCustomValue ( "VmName" , vmName ) ; logable.addCustomValue ( "FieldValue" , fieldValue ) ; auditLogDirector.log ( logable , AuditLogType.VM_IMPORT_INFO ) ; }
Source:
protected boolean validateNoDuplicateVm ( ) { org.ovirt.engine.core.common.businessentities.VmStatic duplicateVm = org.ovirt.engine.core.bll.ImportVmCommandBase.getVmStaticDao ( ) . get ( org.ovirt.engine.core.bll.ImportVmCommandBase.getVm ( ) . getId ( ) ) ; return duplicateVm == null ? true : failCanDoAction ( EngineMessage.VM_CANNOT_IMPORT_VM_EXISTS , java.lang.String.format ( "$VmName %1$s" , duplicateVm.getName ( ) ) ) ; }

Target:
protected boolean validateNoDuplicateVm ( ) { org.ovirt.engine.core.common.businessentities.VmStatic duplicateVm = org.ovirt.engine.core.bll.ImportVmCommandBase.getVmStaticDao ( ) . get ( getVm ( ) . getId ( ) ) ; return duplicateVm == null ? true : failValidation ( EngineMessage.VM_CANNOT_IMPORT_VM_EXISTS , java.lang.String.format ( "$VmName %1$s" , duplicateVm.getName ( ) ) ) ; }
Source:
public < T > java.util.Map < java.lang.String , java.lang.Object > executeReadAndReturnMap ( final java.lang.String procedureName , final org.springframework.jdbc.core.simple.ParameterizedRowMapper < T > mapper , final org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource ) { java.util.Map < java.lang.String , java.lang.Object > resultsMap = executeImpl ( procedureName , parameterSource , createCallForRead ( procedureName , mapper , parameterSource ) ) ; return resultsMap ; }

Target:
public < T > java.util.Map < java.lang.String , java.lang.Object > executeReadAndReturnMap ( final java.lang.String procedureName , final org.springframework.jdbc.core.RowMapper < T > mapper , final org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource ) { java.util.Map < java.lang.String , java.lang.Object > resultsMap = executeImpl ( procedureName , parameterSource , createCallForRead ( procedureName , mapper , parameterSource ) ) ; return resultsMap ; }
Source:
public void validateCantUploadDiskAttached ( ) { initializeSuppliedImage ( ) ; org.mockito.Mockito.doReturn ( new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_DISK_PLUGGED_TO_NON_DOWN_VMS , "" ) ) . when ( diskValidator ) . isDiskPluggedToAnyNonDownVm ( false ) ; getCommand ( ) . validate ( ) ; org.ovirt.engine.core.bll.ValidateTestUtils.assertValidationMessages ( "Can't start a transfer for an image that is attached to any VMs." , getCommand ( ) , EngineMessage.ACTION_TYPE_FAILED_DISK_PLUGGED_TO_NON_DOWN_VMS ) ; }

Target:
public void validateCantUploadDiskAttached ( ) { initializeSuppliedImage ( ) ; org.mockito.Mockito.doReturn ( new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_DISK_PLUGGED_TO_NON_DOWN_VMS , "" ) ) . when ( diskValidator ) . isDiskPluggedToAnyNonDownVm ( false ) ; transferImageCommand.validate ( ) ; org.ovirt.engine.core.bll.ValidateTestUtils.assertValidationMessages ( "Can't start a transfer for an image that is attached to any VMs." , transferImageCommand , EngineMessage.ACTION_TYPE_FAILED_DISK_PLUGGED_TO_NON_DOWN_VMS ) ; }
Source:
public boolean isMixedTypeDC ( org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain ) { boolean isBlockDomain = storageDomain.getStorageType ( ) . isBlockDomain ( ) ; java.util.List < org.ovirt.engine.core.common.businessentities.StorageType > storageTypesOnPool = org.ovirt.engine.core.bll.storage.StorageHandlingCommandBase.getStoragePoolDAO ( ) . getStorageTypesInPool ( org.ovirt.engine.core.bll.storage.StorageHandlingCommandBase.getStoragePoolId ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.StorageType storageType : storageTypesOnPool ) { if ( ( storageType.isBlockDomain ( ) ) != isBlockDomain ) { addCanDoActionMessage ( VdcBllMessages.ACTION_TYPE_FAILED_MIXED_STORAGE_TYPES_NOT_ALLOWED ) ; return true ; } } return false ; }

Target:
public boolean isMixedTypeDC ( org.ovirt.engine.core.common.businessentities.StorageDomainStatic domainStatic ) { boolean isBlockDomain = domainStatic.getStorageType ( ) . isBlockDomain ( ) ; java.util.List < org.ovirt.engine.core.common.businessentities.StorageType > storageTypesOnPool = org.ovirt.engine.core.bll.storage.StorageHandlingCommandBase.getStoragePoolDAO ( ) . getStorageTypesInPool ( org.ovirt.engine.core.bll.storage.StorageHandlingCommandBase.getStoragePoolId ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.StorageType storageType : storageTypesOnPool ) { if ( ( storageType.isBlockDomain ( ) ) != isBlockDomain ) { addCanDoActionMessage ( VdcBllMessages.ACTION_TYPE_FAILED_MIXED_STORAGE_TYPES_NOT_ALLOWED ) ; return true ; } } return false ; }
Source:
public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { stopProgress ( ) ; org.ovirt.engine.core.common.action.VdcReturnValueBase res = result.getReturnValue ( ) ; if ( ( res == null ) || ( ! ( res.getSucceeded ( ) ) ) ) { return ; } cancel ( ) ; sourceListModel.getSearchCommand ( ) . execute ( ) ; }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { boolean requiresAuthentication = ( ( java.lang.Boolean ) ( privateRequiresAuthentication.getEntity ( ) ) ) ; getUsername ( ) . setIsChangable ( requiresAuthentication ) ; getPassword ( ) . setIsChangable ( requiresAuthentication ) ; }
Source:
protected void executeCommand ( ) { org.ovirt.engine.core.common.businessentities.AuditLog auditLog = auditLogDao.get ( org.ovirt.engine.core.bll.RemoveAuditLogByIdCommand.getParameters ( ) . getAuditLogId ( ) ) ; auditLogDao.remove ( org.ovirt.engine.core.bll.RemoveAuditLogByIdCommand.getParameters ( ) . getAuditLogId ( ) ) ; setAuditLogDetails ( auditLog ) ; evict ( auditLogDirector.composeSystemObjectId ( this , auditLog.getLogType ( ) ) ) ; org.ovirt.engine.core.bll.RemoveAuditLogByIdCommand.setSucceeded ( true ) ; }

Target:
protected void executeCommand ( ) { org.ovirt.engine.core.common.businessentities.AuditLog auditLog = getAuditLog ( ) ; auditLogDao.remove ( org.ovirt.engine.core.bll.RemoveAuditLogByIdCommand.getParameters ( ) . getAuditLogId ( ) ) ; setAuditLogDetails ( auditLog ) ; auditLog.setUserId ( Guid.Empty ) ; org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase logableToClear = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( auditLog ) ; org.ovirt.engine.core.dal.dbbroker.auditloghandling.EventFloodRegulator eventFloodRegulator = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.EventFloodRegulator ( logableToClear , auditLog.getLogType ( ) ) ; eventFloodRegulator.evict ( ) ; org.ovirt.engine.core.bll.RemoveAuditLogByIdCommand.setSucceeded ( true ) ; }
Source:
public static void sendJsonData ( javax.servlet.http.HttpServletResponse response , java.util.Map < java.lang.String , java.lang.Object > payload ) throws java.io.IOException { try ( java.io.OutputStream os = response.getOutputStream ( ) ) { java.lang.String jsonPayload = org.ovirt.engine.core.sso.utils.SSOUtils.getJson ( payload ) ; response.setContentType ( "application/json" ) ; response.setContentLength ( jsonPayload.length ( ) ) ; os.write ( jsonPayload.getBytes ( java.nio.charset.StandardCharsets.UTF_8.name ( ) ) ) ; org.ovirt.engine.core.sso.utils.SSOUtils.log.trace ( "Sending json data {}" , jsonPayload ) ; } }

Target:
public static void sendJsonData ( javax.servlet.http.HttpServletResponse response , java.util.Map < java.lang.String , java.lang.Object > payload ) throws java.io.IOException { try ( java.io.OutputStream os = response.getOutputStream ( ) ) { java.lang.String jsonPayload = org.ovirt.engine.core.sso.utils.SSOUtils.getJson ( payload ) ; response.setContentType ( "application/json" ) ; byte [ ] jsonPayloadBytes = jsonPayload.getBytes ( java.nio.charset.StandardCharsets.UTF_8.name ( ) ) ; response.setContentLength ( jsonPayloadBytes.length ) ; os.write ( jsonPayloadBytes ) ; org.ovirt.engine.core.sso.utils.SSOUtils.log.trace ( "Sending json data {}" , jsonPayload ) ; } }
Source:
public static void getHostFingerprint ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String hostAddress ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.String ) ( source ) ) : "" ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetServerSSHKeyFingerprint , new org.ovirt.engine.core.common.queries.ServerParameters ( hostAddress ) , aQuery ) ; }

Target:
public static void getDataCenterById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStoragePoolById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) . withoutRefresh ( ) , aQuery ) ; }
Source:
public void setSearchString ( java.lang.String searchString ) { searchStringInput.setText ( searchString ) ; }

Target:
public void setSearchString ( java.lang.String searchString ) { if ( ( org.ovirt.engine.ui.uicompat.external.StringUtils.isNotEmpty ( searchString ) ) && ( searchString.trim ( ) . toUpperCase ( ) . startsWith ( searchStringPrefixLabel.getText ( ) . toUpperCase ( ) ) ) ) { searchStringInput.setText ( searchString.trim ( ) . substring ( searchStringPrefixLabel.getText ( ) . length ( ) ) ) ; } else { searchStringInput.setText ( searchString ) ; } }
Source:
public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ( ) ; } return source ; }

Target:
public void getExternalProviderHostList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid providerId , boolean filterOutExistingHosts , java.lang.String searchFilter ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.ListConverter < > ( ) ; org.ovirt.engine.core.common.queries.GetHostListFromExternalProviderParameters params = new org.ovirt.engine.core.common.queries.GetHostListFromExternalProviderParameters ( ) ; params.setFilterOutExistingHosts ( filterOutExistingHosts ) ; params.setProviderId ( providerId ) ; params.setSearchFilter ( searchFilter ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetHostListFromExternalProvider , params , aQuery ) ; }
Source:
private boolean allowedNetworkLabelManipulation ( ) { boolean labelNotChanged = ! ( labelChanged ( ) ) ; return ( ! ( org.ovirt.engine.core.bll.network.dc.UpdateNetworkCommand.getNetwork ( ) . isExternal ( ) ) ) && ( labelNotChanged || ( labelAdded ( ) ) ) ; }

Target:
private void applyNetworkChangesToHosts ( ) { java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > parameters = syncNetworkParametersBuilder.buildParameters ( org.ovirt.engine.core.bll.network.dc.UpdateNetworkCommand.getNetwork ( ) , getOldNetwork ( ) ) ; if ( ! ( parameters.isEmpty ( ) ) ) { org.ovirt.engine.core.bll.network.HostSetupNetworksParametersBuilder.updateParametersSequencing ( parameters ) ; runInternalMultipleActions ( VdcActionType.PersistentHostSetupNetworks , parameters ) ; } }
Source:
protected org.ovirt.engine.core.common.businessentities.network.NetworkAttachment addParents ( org.ovirt.engine.core.common.businessentities.network.NetworkAttachment model ) { org.ovirt.engine.api.model.Host host = new org.ovirt.engine.api.model.Host ( ) ; model.setHost ( host ) ; model.getHost ( ) . setId ( getHostId ( ) . toString ( ) ) ; if ( model.isSetHostNic ( ) ) { model.getHostNic ( ) . setHost ( host ) ; } return model ; }

Target:
protected org.ovirt.engine.api.model.NetworkAttachment addParents ( org.ovirt.engine.api.model.NetworkAttachment model ) { org.ovirt.engine.api.model.Host host = new org.ovirt.engine.api.model.Host ( ) ; model.setHost ( host ) ; model.getHost ( ) . setId ( getHostId ( ) . toString ( ) ) ; if ( model.isSetHostNic ( ) ) { model.getHostNic ( ) . setHost ( host ) ; } return model ; }
Source:
private static org.ovirt.engine.core.common.action.VmManagementParametersBase initParams ( ) { org.ovirt.engine.core.common.businessentities.VmStatic vmStatic = new org.ovirt.engine.core.common.businessentities.VmStatic ( ) ; vmStatic.setClusterId ( org.ovirt.engine.core.bll.UpdateVmCommandTest.clusterId ) ; vmStatic.setName ( "my_vm" ) ; vmStatic.setMaxMemorySizeMb ( org.ovirt.engine.core.bll.UpdateVmCommandTest.MAX_MEMORY_SIZE ) ; org.ovirt.engine.core.common.action.VmManagementParametersBase params = new org.ovirt.engine.core.common.action.VmManagementParametersBase ( ) ; params.setCommandType ( ActionType.UpdateVm ) ; params.setVmStaticData ( vmStatic ) ; return params ; }

Target:
private static org.ovirt.engine.core.common.action.VmManagementParametersBase initParams ( ) { org.ovirt.engine.core.common.businessentities.VmStatic vmStatic = new org.ovirt.engine.core.common.businessentities.VmStatic ( ) ; vmStatic.setClusterId ( org.ovirt.engine.core.bll.UpdateVmCommandTest.clusterId ) ; vmStatic.setName ( "my_vm" ) ; vmStatic.setMaxMemorySizeMb ( org.ovirt.engine.core.bll.UpdateVmCommandTest.MAX_MEMORY_SIZE ) ; org.ovirt.engine.core.common.action.VmManagementParametersBase params = new org.ovirt.engine.core.common.action.VmManagementParametersBase ( ) ; params.setCommandType ( ActionType.UpdateVm ) ; params.setVmStaticData ( vmStatic ) ; params.setUpdateNuma ( true ) ; return params ; }
Source:
public com.google.gwt.resources.client.ImageResource getValue ( org.ovirt.engine.core.common.businessentities.network.NetworkCluster net_cluster ) { setEnumTitle ( net_cluster.getStatus ( ) ) ; switch ( net_cluster.getStatus ( ) ) { case OPERATIONAL : return getApplicationResources ( ) . upImage ( ) ; case NON_OPERATIONAL : return getApplicationResources ( ) . downImage ( ) ; default : return getApplicationResources ( ) . downImage ( ) ; } }

Target:
public com.google.gwt.resources.client.ImageResource getValue ( org.ovirt.engine.core.common.businessentities.network.NetworkCluster net_cluster ) { setEnumTitle ( net_cluster.getStatus ( ) ) ; switch ( net_cluster.getStatus ( ) ) { case OPERATIONAL : return org.ovirt.engine.ui.webadmin.widget.table.column.NetworkStatusColumn.resources.upImage ( ) ; case NON_OPERATIONAL : return org.ovirt.engine.ui.webadmin.widget.table.column.NetworkStatusColumn.resources.downImage ( ) ; default : return org.ovirt.engine.ui.webadmin.widget.table.column.NetworkStatusColumn.resources.downImage ( ) ; } }
Source:
protected java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > getVmDisksFromDB ( ) { if ( ( cachedDisksFromDb ) == null ) { cachedDisksFromDb = org.ovirt.engine.core.bll.ImagesHandler.filterImageDisks ( org.ovirt.engine.core.bll.AddVmTemplateFromSnapshotCommand.getVm ( ) . getDiskMap ( ) . values ( ) , false , true , true ) ; cachedDisksFromDb.addAll ( org.ovirt.engine.core.bll.ImagesHandler.filterDisksBasedOnCinder ( org.ovirt.engine.core.bll.AddVmTemplateFromSnapshotCommand.getVm ( ) . getDiskMap ( ) . values ( ) , true ) ) ; } return cachedDisksFromDb ; }

Target:
protected java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > getVmDisksFromDB ( ) { if ( ( cachedDisksFromDb ) == null ) { cachedDisksFromDb = org.ovirt.engine.core.bll.storage.disk.image.ImagesHandler.filterImageDisks ( org.ovirt.engine.core.bll.AddVmTemplateFromSnapshotCommand.getVm ( ) . getDiskMap ( ) . values ( ) , false , true , true ) ; cachedDisksFromDb.addAll ( org.ovirt.engine.core.bll.storage.disk.image.ImagesHandler.filterDisksBasedOnCinder ( org.ovirt.engine.core.bll.AddVmTemplateFromSnapshotCommand.getVm ( ) . getDiskMap ( ) . values ( ) , true ) ) ; } return cachedDisksFromDb ; }
Source:
public java.util.Date convertDate ( java.util.Date inDate , java.lang.String tZone ) { if ( inDate == null ) { return null ; } java.text.DateFormat format = new java.text.SimpleDateFormat ( "MM/dd/yyyy HH:mm:ss" ) ; java.lang.String formattedStartDate = format.format ( inDate ) ; format.setTimeZone ( java.util.TimeZone.getTimeZone ( tZone ) ) ; try { return format.parse ( formattedStartDate ) ; } catch ( java.lang.Exception ex ) { log.error ( "Error while converting the date to engine time zone" ) ; return null ; } }

Target:
public java.util.Date convertDate ( java.util.Date inDate , java.lang.String tZone ) { if ( inDate == null ) { return null ; } java.text.DateFormat format = new java.text.SimpleDateFormat ( "MM/dd/yyyy HH:mm:ss" ) ; java.lang.String formattedStartDate = format.format ( inDate ) ; format.setTimeZone ( java.util.TimeZone.getTimeZone ( tZone ) ) ; try { return format.parse ( formattedStartDate ) ; } catch ( java.lang.Exception ex ) { org.ovirt.engine.core.bll.utils.GlusterUtil.log.error ( "Error while converting the date to engine time zone" ) ; return null ; } }
Source:
public java.util.List < org.ovirt.engine.core.common.businessentities.AsyncTasks > getAllAsyncTasksFromDb ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.AsyncTasks > asyncTasks = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getAsyncTaskDao ( ) . getAll ( ) ; for ( org.ovirt.engine.core.common.businessentities.AsyncTasks asyncTask : asyncTasks ) { copyFromCommandEntity ( asyncTask , commandsCache.get ( asyncTask.getCommandId ( ) ) ) ; } return asyncTasks ; }

Target:
public java.util.concurrent.Future < org.ovirt.engine.core.common.action.VdcReturnValueBase > executeAsyncCommand ( org.ovirt.engine.core.common.action.VdcActionType actionType , org.ovirt.engine.core.common.action.VdcActionParametersBase parameters ) { return cmdExecutor.executeAsyncCommand ( actionType , parameters ) ; }
Source:
public void getVmsFromExternalServer ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId , org.ovirt.engine.core.compat.Guid vdsId , java.lang.String url , java.lang.String username , java.lang.String password , org.ovirt.engine.core.common.businessentities.OriginType originType ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VM > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmsFromExternalProvider , new org.ovirt.engine.core.common.queries.GetVmsFromExternalProviderQueryParameters ( url , username , password , originType , vdsId , dataCenterId ) , aQuery ) ; }

Target:
public void getVmSnapshotList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Snapshot > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Snapshot > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllVmSnapshotsByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }
Source:
public void isPoolNameUnique ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String name ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { return ! ( ( java.lang.Boolean ) ( source ) ) ; } return false ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.IsVmPoolWithSameNameExists , new org.ovirt.engine.core.common.queries.NameQueryParameters ( name ) , aQuery ) ; }

Target:
public void isPoolNameUnique ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String name ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { return ! ( ( java.lang.Boolean ) ( source ) ) ; } return false ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.IsVmPoolWithSameNameExists , new org.ovirt.engine.core.common.queries.NameQueryParameters ( name ) , aQuery ) ; }
Source:
public void raise ( java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs e ) { java.util.ArrayList < org.ovirt.engine.ui.uicompat.IEventListener > list = new java.util.ArrayList < org.ovirt.engine.ui.uicompat.IEventListener > ( ) ; for ( org.ovirt.engine.ui.uicompat.IEventListener listener : listeners ) { list.add ( listener ) ; } for ( org.ovirt.engine.ui.uicompat.IEventListener listener : list ) { setContext ( ( contexts.containsKey ( listener ) ? contexts.get ( listener ) : null ) ) ; listener.eventRaised ( this , sender , e ) ; } }

Target:
public void raise ( java.lang.Object sender , T e ) { java.util.ArrayList < org.ovirt.engine.ui.uicompat.IEventListener < T > > list = new java.util.ArrayList < org.ovirt.engine.ui.uicompat.IEventListener < T > > ( ) ; for ( org.ovirt.engine.ui.uicompat.IEventListener < T > listener : listeners ) { list.add ( listener ) ; } for ( org.ovirt.engine.ui.uicompat.IEventListener < T > listener : list ) { setContext ( ( contexts.containsKey ( listener ) ? contexts.get ( listener ) : null ) ) ; listener.eventRaised ( this , sender , e ) ; } }
Source:
public static java.io.File makeFileFromSanePath ( java.lang.String path , java.io.File base ) { java.io.File file = null ; if ( path == null ) { file = base ; } else if ( ! ( org.ovirt.engine.core.utils.servlet.ServletUtils.isSane ( path ) ) ) { org.ovirt.engine.core.utils.servlet.ServletUtils.log.error ( "The path '{}' is not sane, will return null." , path ) ; } else { file = new java.io.File ( base , path ) ; } return file ; }

Target:
public static java.io.File makeFileFromSanePath ( java.lang.String path , java.io.File base ) { java.io.File file = null ; if ( path == null ) { file = base ; } else if ( ! ( org.ovirt.engine.core.utils.servlet.ServletUtils.isSane ( path ) ) ) { org.ovirt.engine.core.utils.servlet.ServletUtils.log.info ( "The path '{}' is not sane, will return null." , path ) ; } else { file = new java.io.File ( base , path ) ; } return file ; }
Source:
public static void GetRedirectServletReportsPage ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.String ) ( source ) ) : "" ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.RedirectServletReportsPage ) , aQuery ) ; }

Target:
public static void GetDocumentationBaseURL ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.String ) ( source ) ) : "" ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.DocsURL ) , aQuery ) ; }
Source:
public static void IsHotPlugAvailable ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String version ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Boolean ) ( source ) ) . booleanValue ( ) : true ; } } ; org.ovirt.engine.core.common.queries.GetConfigurationValueParameters tempVar = new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.HotPlugEnabled ) ; tempVar.setVersion ( version ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( tempVar , aQuery ) ; }

Target:
public static void GetDocumentationBaseURL ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.String ) ( source ) ) : "" ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.DocsURL , org.ovirt.engine.core.common.config.Config.DefaultConfigurationVersion ) , aQuery ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity getBrick ( org.ovirt.engine.core.compat.Guid volumeId ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity brick = new org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity ( volumeId , new org.ovirt.engine.core.common.businessentities.VdsStatic ( serverName , "127.0.0.1" , "0934390834" , 20 , org.ovirt.engine.core.compat.Guid.newGuid ( ) , serverId , serverName , true , org.ovirt.engine.core.common.businessentities.VDSType.oVirtNode ) , org.ovirt.engine.core.bll.gluster.AddBricksToGlusterVolumeCommandTest.BRICK_DIRECTORY , org.ovirt.engine.core.common.businessentities.gluster.GlusterStatus.UP ) ; return brick ; }

Target:
private org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity getBrick ( org.ovirt.engine.core.compat.Guid volumeId ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity brick = new org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity ( volumeId , new org.ovirt.engine.core.common.businessentities.VdsStatic ( serverName , "127.0.0.1" , "0934390834" , 20 , 22 , "root" , org.ovirt.engine.core.compat.Guid.newGuid ( ) , serverId , serverName , true , org.ovirt.engine.core.common.businessentities.VDSType.oVirtNode ) , org.ovirt.engine.core.bll.gluster.AddBricksToGlusterVolumeCommandTest.BRICK_DIRECTORY , org.ovirt.engine.core.common.businessentities.gluster.GlusterStatus.UP ) ; return brick ; }
Source:
public void testRemoveNonExistant ( ) { setUpEntityQueryExpectations ( QueryType.GetMacPoolById , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendMacPoolResourceTest.MAC_POOL_ID } , null ) ; try { resource.remove ( ) ; org.junit.jupiter.api.Assertions.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { org.junit.jupiter.api.Assertions.assertNotNull ( wae.getResponse ( ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( 404 , wae.getResponse ( ) . getStatus ( ) ) ; } }

Target:
public void testRemoveNonExistant ( ) { setUpEntityQueryExpectations ( QueryType.GetMacPoolById , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendMacPoolResourceTest.MAC_POOL_ID } , null ) ; try { resource.remove ( ) ; org.junit.jupiter.api.Assertions.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }
Source:
public void onSucceeded ( org.ovirt.engine.core.compat.Guid cmdId , java.util.List < org.ovirt.engine.core.compat.Guid > childCmdIds ) { java.lang.String ovf = getOvf ( ) ; if ( ovf == null ) { return ; } org.ovirt.engine.core.common.businessentities.VM vm = readVmFromOvf ( ovf ) ; if ( vm == null ) { return ; } addImportedDevices ( vm.getStaticData ( ) ) ; deleteV2VJob ( ) ; }

Target:
private org.ovirt.engine.core.common.businessentities.V2VJobInfo getV2VJobInfo ( ) { org.ovirt.engine.core.bll.ConvertVmCommand < ? > command = getCommand ( ) ; return command.getVdsManager ( ) . getV2VJobInfoForVm ( command.getVmId ( ) ) ; }
Source:
public static void getVmSnapshotList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Snapshot > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Snapshot > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllVmSnapshotsByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }

Target:
public static void getAttachedTagsToUser ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.setAttachedTagsConverter ( aQuery ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetTagsByUserId , new org.ovirt.engine.core.common.queries.GetTagsByUserIdParameters ( id.toString ( ) ) , aQuery ) ; }