auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public static void getAllVnicProfiles ( 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 ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VnicProfileView > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllVnicProfiles , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }

Target:
public static void getVmGuestAgentInterfacesByVmId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid vmId ) { 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.VmGuestAgentInterface > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmGuestAgentInterfacesByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) , aQuery ) ; }
Source:
public void checkAndRemoveVolumeSnapshotSoftLimitAlert ( final org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity volume ) { if ( ! ( org.ovirt.engine.core.dao.gluster.GlusterDBUtils.getInstance ( ) . isSoftLimitReached ( volume.getId ( ) ) ) ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AlertDirector.removeVolumeAlert ( volume.getId ( ) , AuditLogType.GLUSTER_VOLUME_SNAPSHOT_SOFT_LIMIT_REACHED ) ; } }

Target:
public void checkAndRemoveVolumeSnapshotLimitsAlert ( final org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity volume ) { if ( ! ( org.ovirt.engine.core.dao.gluster.GlusterDBUtils.getInstance ( ) . isVolumeSnapshotSoftLimitReached ( volume.getId ( ) ) ) ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AlertDirector.removeVolumeAlert ( volume.getId ( ) , AuditLogType.GLUSTER_VOLUME_SNAPSHOT_SOFT_LIMIT_REACHED ) ; } if ( ! ( org.ovirt.engine.core.dao.gluster.GlusterDBUtils.getInstance ( ) . isVolumeSnapshotHardLimitReached ( volume.getId ( ) ) ) ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AlertDirector.removeVolumeAlert ( volume.getId ( ) , AuditLogType.GLUSTER_VOLUME_SNAPSHOT_HARD_LIMIT_REACHED ) ; } }
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 getAllAttachableDisks ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.compat.Guid vmId ) { 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.Disk > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ( ) ; } } ; org.ovirt.engine.core.common.queries.GetAllAttachableDisks params = new org.ovirt.engine.core.common.queries.GetAllAttachableDisks ( storagePoolId ) ; params.setVmId ( vmId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllAttachableDisks , params , aQuery ) ; }
Source:
public synchronized boolean CachingOver ( org.ovirt.engine.core.bll.SPMAsyncTask task ) { long SubtractMinutesAsMills = java.util.concurrent.TimeUnit.MINUTES.toMillis ( _cacheTimeInMinutes ) ; return ( ( ( task.getState ( ) ) == ( AsyncTaskState.Cleared ) ) || ( ( task.getState ( ) ) == ( AsyncTaskState.ClearFailed ) ) ) && ( ( task.getLastAccessToStatusSinceEnd ( ) ) < ( ( java.lang.System.currentTimeMillis ( ) ) - SubtractMinutesAsMills ) ) ; }

Target:
public synchronized boolean cachingOver ( org.ovirt.engine.core.bll.SPMAsyncTask task ) { long SubtractMinutesAsMills = java.util.concurrent.TimeUnit.MINUTES.toMillis ( _cacheTimeInMinutes ) ; return ( ( ( task.getState ( ) ) == ( AsyncTaskState.Cleared ) ) || ( ( task.getState ( ) ) == ( AsyncTaskState.ClearFailed ) ) ) && ( ( task.getLastAccessToStatusSinceEnd ( ) ) < ( ( java.lang.System.currentTimeMillis ( ) ) - SubtractMinutesAsMills ) ) ; }
Source:
public void fetchPublicKey ( ) { org.ovirt.engine.ui.frontend.AsyncQuery aQuery = new org.ovirt.engine.ui.frontend.AsyncQuery ( ) ; aQuery.setModel ( this ) ; aQuery.asyncCallback = new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model , java.lang.Object result ) { java.lang.String pk = ( ( java.lang.String ) ( result ) ) ; if ( ( pk != null ) && ( ( pk.length ( ) ) > 0 ) ) { getPublicKey ( ) . setEntity ( pk ) ; } } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getHostPublicKey ( aQuery ) ; }

Target:
public void fetchEngineSshPublicKey ( ) { org.ovirt.engine.ui.frontend.AsyncQuery aQuery = new org.ovirt.engine.ui.frontend.AsyncQuery ( ) ; aQuery.setModel ( this ) ; aQuery.asyncCallback = new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model , java.lang.Object result ) { java.lang.String pk = ( ( java.lang.String ) ( result ) ) ; if ( ( pk != null ) && ( ( pk.length ( ) ) > 0 ) ) { getPublicKey ( ) . setEntity ( pk ) ; } } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getEngineSshPublicKey ( aQuery ) ; }
Source:
protected boolean formatStorage ( org.ovirt.engine.core.common.businessentities.StorageDomain dom , org.ovirt.engine.core.common.businessentities.VDS vds ) { try { return runVdsCommand ( VDSCommandType.FormatStorageDomain , new org.ovirt.engine.core.common.vdscommands.FormatStorageDomainVDSCommandParameters ( vds.getId ( ) , dom.getId ( ) ) ) . getSucceeded ( ) ; } catch ( org.ovirt.engine.core.common.errors.VdcBLLException e ) { if ( ( e.getErrorCode ( ) ) != ( org.ovirt.engine.core.common.errors.VdcBllErrors.StorageDomainDoesNotExist ) ) { throw e ; } log.warnFormat ( "Storage Domain {0} which was about to be formatted does not exist in VDS {1}" , dom.getName ( ) , vds.getName ( ) ) ; return true ; } }

Target:
protected boolean formatStorage ( org.ovirt.engine.core.common.businessentities.StorageDomain dom , org.ovirt.engine.core.common.businessentities.VDS vds ) { try { return runVdsCommand ( VDSCommandType.FormatStorageDomain , new org.ovirt.engine.core.common.vdscommands.FormatStorageDomainVDSCommandParameters ( vds.getId ( ) , dom.getId ( ) ) ) . getSucceeded ( ) ; } catch ( org.ovirt.engine.core.common.errors.VdcBLLException e ) { if ( ( e.getErrorCode ( ) ) != ( org.ovirt.engine.core.common.errors.VdcBllErrors.StorageDomainDoesNotExist ) ) { throw e ; } log.warn ( "Storage Domain '{}' which was about to be formatted does not exist in VDS '{}'" , dom.getName ( ) , vds.getName ( ) ) ; return true ; } }
Source:
public void setSource ( org.ovirt.engine.core.common.businessentities.VmRngDevice.Source source ) { if ( source == null ) { getSpecParams ( ) . put ( org.ovirt.engine.core.common.businessentities.VmRngDevice.SOURCE_STRING , org.ovirt.engine.core.common.businessentities.VmRngDevice.Source.RANDOM.name ( ) . toLowerCase ( ) ) ; } else { getSpecParams ( ) . put ( org.ovirt.engine.core.common.businessentities.VmRngDevice.SOURCE_STRING , source.name ( ) . toLowerCase ( ) ) ; } }

Target:
public void setSource ( org.ovirt.engine.core.common.businessentities.VmRngDevice.Source source ) { if ( source == null ) { getSpecParams ( ) . put ( org.ovirt.engine.core.common.businessentities.VmRngDevice.SOURCE_STRING , org.ovirt.engine.core.common.businessentities.VmRngDevice.Source.URANDOM.name ( ) . toLowerCase ( ) ) ; } else { getSpecParams ( ) . put ( org.ovirt.engine.core.common.businessentities.VmRngDevice.SOURCE_STRING , source.name ( ) . toLowerCase ( ) ) ; } }
Source:
public javax.ws.rs.core.Response migrate ( org.ovirt.engine.api.model.Action action ) { boolean forceMigration = ( action.isSetForce ( ) ) ? action.isForce ( ) : false ; if ( ! ( action.isSetHost ( ) ) ) { return doAction ( VdcActionType.MigrateVm , new org.ovirt.engine.core.common.action.MigrateVmParameters ( forceMigration , guid ) , action ) ; } else { return doAction ( VdcActionType.MigrateVmToServer , new org.ovirt.engine.core.common.action.MigrateVmToServerParameters ( forceMigration , guid , getHostId ( action ) ) , action ) ; } }

Target:
public javax.ws.rs.core.Response migrate ( org.ovirt.engine.api.model.Action action ) { boolean forceMigration = ( action.isSetForce ( ) ) ? action.isForce ( ) : false ; if ( ! ( action.isSetHost ( ) ) ) { return doAction ( VdcActionType.MigrateVm , new org.ovirt.engine.core.common.action.MigrateVmParameters ( forceMigration , guid , getTargetClusterId ( action ) ) , action ) ; } else { return doAction ( VdcActionType.MigrateVmToServer , new org.ovirt.engine.core.common.action.MigrateVmToServerParameters ( forceMigration , guid , getHostId ( action ) , getTargetClusterId ( action ) ) , action ) ; } }
Source:
public void getHostArchitecture ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter < org.ovirt.engine.core.common.businessentities.ArchitectureType > ( ) { @ java.lang.Override public org.ovirt.engine.core.common.businessentities.ArchitectureType Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return ( ( org.ovirt.engine.core.common.businessentities.ArchitectureType ) ( source ) ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetHostArchitecture , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }

Target:
public void getDataCenterList ( 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 ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StoragePool > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( "DataCenter: sortby name" , org.ovirt.engine.core.common.interfaces.SearchType.StoragePool ) , aQuery ) ; }
Source:
public void testValidateModifiedBondSlavesWhenSlaveInterfaceDoesNotExist ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.Bond bond = createBond ( ) ; bond.setSlaves ( java.util.Arrays.asList ( "slaveA" , "slaveB" ) ) ; org.ovirt.engine.core.common.action.HostSetupNetworksParameters params = new org.ovirt.engine.core.common.action.HostSetupNetworksParameters ( host.getId ( ) ) ; params.setBonds ( java.util.Collections.singletonList ( bond ) ) ; doTestValidateModifiedBondSlaves ( params , null , java.util.Collections.< org.ovirt.engine.core.common.businessentities.network.NetworkAttachment > emptyList ( ) , java.util.Collections.< org.ovirt.engine.core.common.businessentities.network.Network > emptyList ( ) , new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.HOST_NETWORK_INTERFACE_NOT_EXIST ) , ValidationResult.VALID , new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.HOST_NETWORK_INTERFACE_NOT_EXIST ) ) ; }

Target:
public void testValidModifiedBondsFailsWhenInsufficientNumberOfSlaves ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.Bond bond = createBond ( ) ; doTestValidModifiedBonds ( bond , ValidationResult.VALID , ValidationResult.VALID , new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.NETWORK_BONDS_INVALID_SLAVE_COUNT , org.ovirt.engine.core.utils.ReplacementUtils.createSetVariableString ( HostSetupNetworksValidator.VAR_NETWORK_BONDS_INVALID_SLAVE_COUNT_LIST , bond.getName ( ) ) ) , ValidationResult.VALID ) ; }
Source:
public javax.ws.rs.core.Response export ( org.ovirt.engine.api.model.Action action ) { validateParameters ( action , "storageDomain.id|name" ) ; org.ovirt.engine.core.common.action.MoveOrCopyParameters params = new org.ovirt.engine.core.common.action.MoveOrCopyParameters ( guid , getStorageDomainId ( action ) ) ; if ( ( action.isSetExclusive ( ) ) && ( action.isExclusive ( ) ) ) { params.setForceOverride ( true ) ; } return doAction ( ActionType.ExportVmTemplate , params , action , PollingType.JOB ) ; }

Target:
public javax.ws.rs.core.Response exportToExportDomain ( org.ovirt.engine.api.model.Action action ) { org.ovirt.engine.core.common.action.MoveOrCopyParameters params = new org.ovirt.engine.core.common.action.MoveOrCopyParameters ( guid , getStorageDomainId ( action ) ) ; if ( ( action.isSetExclusive ( ) ) && ( action.isExclusive ( ) ) ) { params.setForceOverride ( true ) ; } return doAction ( ActionType.ExportVmTemplate , params , action , PollingType.JOB ) ; }
Source:
public static void getStorageConnectionsByDataCenterIdAndStorageType ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.common.businessentities.StorageType storageType ) { 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.core.common.queries.GetConnectionsByDataCenterAndStorageTypeParameters params = new org.ovirt.engine.core.common.queries.GetConnectionsByDataCenterAndStorageTypeParameters ( storagePoolId , storageType ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetConnectionsByDataCenterAndStorageType , params , 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:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { org.ovirt.engine.core.common.queries.VdcQueryReturnValue queryRetVal = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) ; java.lang.String signature = ( ( java.lang.String ) ( queryRetVal.getReturnValue ( ) ) ) ; org.ovirt.engine.ui.common.uicommon.WebClientConsoleInvoker invoker = new org.ovirt.engine.ui.common.uicommon.WebClientConsoleInvoker ( signature , getPassword ( ) , getClientUrl ( ) ) ; invoker.invokeClientNative ( ) ; }

Target:
public void connect ( ) { boolean sslTarget = ( ( securePort ) == ( - 1 ) ) ? false : true ; org.ovirt.engine.ui.common.uicommon.WebClientConsoleInvoker invoker = new org.ovirt.engine.ui.common.uicommon.WebClientConsoleInvoker ( org.ovirt.engine.ui.common.uicommon.SpiceHtml5Impl.CLIENT_PAGE , config , getHost ( ) , java.lang.String.valueOf ( ( sslTarget ? securePort : port ) ) , getPassword ( ) , sslTarget ) ; invoker.invokeClient ( ) ; }
Source:
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 ) ; }

Target:
public void getVmsRunningOnOrMigratingToVds ( 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 ) { 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.GetVmsRunningOnOrMigratingToVds , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }
Source:
public java.util.List < org.ovirt.engine.api.model.Version > getSupportedClusterLevels ( ) { java.util.List < org.ovirt.engine.api.model.Version > versions = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.api.model.Version v : ( ( java.util.Set < org.ovirt.engine.api.model.Version > ) ( getConfigurationValueDefault ( java.util.Set.class , ConfigurationValues.SupportedClusterLevels ) ) ) ) { org.ovirt.engine.api.model.Version version = new org.ovirt.engine.api.model.Version ( ) ; version.setMajor ( v.getMajor ( ) ) ; version.setMinor ( v.getMinor ( ) ) ; versions.add ( version ) ; } return versions ; }

Target:
private java.util.List < org.ovirt.engine.api.model.CustomProperty > getVmHooksEnvs ( org.ovirt.engine.api.model.Version version ) { java.util.List < org.ovirt.engine.api.model.CustomProperty > ret = new java.util.ArrayList < > ( ) ; java.lang.String predefinedProperties = getConfigurationValue ( ConfigurationValues.PredefinedVMProperties , version ) ; if ( predefinedProperties != null ) { ret.addAll ( org.ovirt.engine.api.restapi.utils.CustomPropertiesParser.parse ( predefinedProperties , true ) ) ; } java.lang.String userDefinedProperties = getConfigurationValue ( ConfigurationValues.UserDefinedVMProperties , version ) ; if ( userDefinedProperties != null ) { ret.addAll ( org.ovirt.engine.api.restapi.utils.CustomPropertiesParser.parse ( userDefinedProperties , true ) ) ; } return ret ; }
Source:
public static void getAllVnicProfiles ( 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 ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VnicProfileView > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllVnicProfiles , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }

Target:
public static void isSupportBridgesReportByVDSM ( 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.SupportBridgesReportByVDSM ) ; tempVar.setVersion ( version ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigFromCache ( tempVar , aQuery ) ; }
Source:
public void labelNotInVfsConfigNotValid ( ) { labelInVfsConfigCommonTest ( true ) ; org.junit.Assert.assertThat ( validator.labelNotInVfsConfig ( org.ovirt.engine.core.bll.validator.VfsConfigValidatorTest.LABEL ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.ACTION_TYPE_FAILED_LABEL_ALREADY_IN_VFS_CONFIG , java.lang.String.format ( VfsConfigValidator.NIC_NAME_REPLACEMENT , nic.getName ( ) ) , java.lang.String.format ( VfsConfigValidator.LABEL_REPLACEMENT , org.ovirt.engine.core.bll.validator.VfsConfigValidatorTest.LABEL ) ) ) ; }

Target:
public void labelNotInVfsConfigNotValid ( ) { labelInVfsConfigCommonTest ( true ) ; org.hamcrest.MatcherAssert.assertThat ( validator.labelNotInVfsConfig ( org.ovirt.engine.core.bll.validator.VfsConfigValidatorTest.LABEL ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.ACTION_TYPE_FAILED_LABEL_ALREADY_IN_VFS_CONFIG , java.lang.String.format ( VfsConfigValidator.NIC_NAME_REPLACEMENT , nic.getName ( ) ) , java.lang.String.format ( VfsConfigValidator.LABEL_REPLACEMENT , org.ovirt.engine.core.bll.validator.VfsConfigValidatorTest.LABEL ) ) ) ; }
Source:
public void testUpdateNotFound ( ) { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpGetEntityExpectations ( 1 , true ) ; try { resource.update ( getModel ( 1 ) ) ; org.junit.Assert.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }

Target:
public void testUpdateNotFound ( ) { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpGetEntityExpectations ( 1 , true ) ; try { resource.update ( getModel ( 1 ) ) ; org.junit.jupiter.api.Assertions.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }
Source:
private org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity getDistributedVolume ( org.ovirt.engine.core.compat.Guid volumeId ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity volume = getVolume ( volumeId ) ; volume.setStatus ( ( volumeId == ( volumeId1 ) ? org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeStatus.UP : org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeStatus.DOWN ) ) ; volume.setBricks ( getBricks ( volumeId , 2 ) ) ; volume.setVolumeType ( GlusterVolumeType.DISTRIBUTE ) ; volume.setClusterId ( CLUSTER_ID ) ; return volume ; }

Target:
private org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity getDistributedVolume ( org.ovirt.engine.core.compat.Guid volumeId ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity volume = getVolume ( volumeId ) ; volume.setStatus ( ( volumeId == ( volumeId1 ) ? org.ovirt.engine.core.common.businessentities.gluster.GlusterStatus.UP : org.ovirt.engine.core.common.businessentities.gluster.GlusterStatus.DOWN ) ) ; volume.setBricks ( getBricks ( volumeId , 2 ) ) ; volume.setVolumeType ( GlusterVolumeType.DISTRIBUTE ) ; volume.setClusterId ( CLUSTER_ID ) ; return volume ; }
Source:
private void updateDiskImagesToIllegal ( org.ovirt.engine.core.common.businessentities.DiskImage diskImage ) { java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > snapshotDisks = org.ovirt.engine.core.bll.RemoveAllVmImagesCommand.getDbFacade ( ) . getDiskImageDao ( ) . getAllSnapshotsForImageGroup ( diskImage.getId ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.DiskImage diskSnapshot : snapshotDisks ) { diskSnapshot.setvm_snapshot_id ( null ) ; diskSnapshot.setImageStatus ( ImageStatus.ILLEGAL ) ; org.ovirt.engine.core.bll.RemoveAllVmImagesCommand.getDbFacade ( ) . getImageDao ( ) . update ( diskSnapshot.getImage ( ) ) ; } }

Target:
private void updateDiskImagesToIllegal ( org.ovirt.engine.core.common.businessentities.DiskImage diskImage ) { java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > snapshotDisks = org.ovirt.engine.core.bll.RemoveAllVmImagesCommand.getDbFacade ( ) . getDiskImageDao ( ) . getAllSnapshotsForImageGroup ( diskImage.getId ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.DiskImage diskSnapshot : snapshotDisks ) { diskSnapshot.setVmSnapshotId ( null ) ; diskSnapshot.setImageStatus ( ImageStatus.ILLEGAL ) ; org.ovirt.engine.core.bll.RemoveAllVmImagesCommand.getDbFacade ( ) . getImageDao ( ) . update ( diskSnapshot.getImage ( ) ) ; } }
Source:
public static void getVMsWithVNumaNodesByClusterId ( org.ovirt.engine.ui.frontend.AsyncQuery asyncQuery , org.ovirt.engine.core.compat.Guid clusterId ) { asyncQuery.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.GetAllVmsWithNumaByVdsGroupId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( clusterId ) , asyncQuery ) ; }

Target:
public static void getHostNumaTopologyByHostId ( org.ovirt.engine.ui.frontend.AsyncQuery asyncQuery , org.ovirt.engine.core.compat.Guid hostId ) { asyncQuery.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.VdsNumaNode > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVdsNumaNodesByVdsId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( hostId ) , asyncQuery ) ; }
Source:
private void networkNameAvailableTest ( org.hamcrest.Matcher < org.ovirt.engine.core.bll.ValidationResult > matcher , java.util.List < org.ovirt.engine.core.common.businessentities.network.Network > networks ) { this . networks.addAll ( networks ) ; org.mockito.Mockito.when ( network.getName ( ) ) . thenReturn ( org.ovirt.engine.core.bll.validator.NetworkValidatorTest.DEFAULT_NETWORK_NAME ) ; org.mockito.Mockito.when ( network.getId ( ) ) . thenReturn ( org.ovirt.engine.core.bll.validator.NetworkValidatorTest.DEFAULT_GUID ) ; org.junit.Assert.assertThat ( validator.networkNameNotUsed ( ) , matcher ) ; }

Target:
private void networkNameAvailableTest ( org.hamcrest.Matcher < org.ovirt.engine.core.bll.ValidationResult > matcher , java.util.List < org.ovirt.engine.core.common.businessentities.network.Network > networks ) { this . networks.addAll ( networks ) ; org.mockito.Mockito.when ( network.getName ( ) ) . thenReturn ( org.ovirt.engine.core.bll.validator.NetworkValidatorTest.DEFAULT_NETWORK_NAME ) ; org.mockito.Mockito.when ( network.getId ( ) ) . thenReturn ( org.ovirt.engine.core.bll.validator.NetworkValidatorTest.DEFAULT_GUID ) ; org.hamcrest.MatcherAssert.assertThat ( validator.networkNameNotUsed ( ) , matcher ) ; }
Source:
private void removeCinderVolume ( ) { org.ovirt.engine.core.common.businessentities.storage.CinderDisk cinderSnapshot = getRelevantCinderDisk ( ) ; switch ( org.ovirt.engine.core.bll.storage.disk.cinder.RestoreFromCinderSnapshotCommand.getParameters ( ) . getSnapshot ( ) . getType ( ) ) { case REGULAR : java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > cinderSnapshots = org.ovirt.engine.core.bll.storage.disk.cinder.RestoreFromCinderSnapshotCommand.getDiskImageDao ( ) . getAllSnapshotsForParent ( org.ovirt.engine.core.bll.storage.disk.cinder.RestoreFromCinderSnapshotCommand.getParameters ( ) . getImageId ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.storage.DiskImage descendantSnapshot : cinderSnapshots ) { removeDecendedSnapshots ( cinderSnapshot , descendantSnapshot ) ; } break ; case PREVIEW : case STATELESS : deletePreviewedVolume ( cinderSnapshot ) ; break ; } }

Target:
private void removeDescendentSnapshots ( org.ovirt.engine.core.common.businessentities.storage.CinderDisk cinderDiskSnapshot ) { initCinderDiskVolumesParametersList ( cinderDiskSnapshot ) ; }
Source:
public static void GetDiskList ( 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.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > ( ) ; } } ; org.ovirt.engine.core.common.queries.SearchParameters searchParams = new org.ovirt.engine.core.common.queries.SearchParameters ( "Disks:" , org.ovirt.engine.core.common.interfaces.SearchType.Disk ) ; searchParams.setMaxCount ( 9999 ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.Search , searchParams , aQuery ) ; }

Target:
public static void GetPermittedStorageDomainsByStoragePoolId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId , org.ovirt.engine.core.common.businessentities.ActionGroup actionGroup ) { 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.StorageDomain > ( ) ; } return source ; } } ; org.ovirt.engine.core.common.queries.GetPermittedStorageDomainsByStoragePoolIdParameters params = new org.ovirt.engine.core.common.queries.GetPermittedStorageDomainsByStoragePoolIdParameters ( ) ; params.setStoragePoolId ( dataCenterId ) ; params.setActionGroup ( actionGroup ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetPermittedStorageDomainsByStoragePoolId , params , aQuery ) ; }
Source:
public void testGetEventNotificationMethodsById ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.EventNotificationMethod > result = dao.getEventNotificationMethodsById ( 1 ) ; assertNotNull ( result ) ; assertFalse ( result.isEmpty ( ) ) ; assertEquals ( 1 , result.size ( ) ) ; }

Target:
public void testGetEventNotificationMethodsById ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.EventNotificationMethod > result = dao.getEventNotificationMethodsById ( 1 ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertFalse ( result.isEmpty ( ) ) ; org.junit.Assert.assertEquals ( 1 , result.size ( ) ) ; }
Source:
public void testUpdateChildren ( ) { org.ovirt.engine.core.common.businessentities.Tags tag = createTag ( "tag1" , "desc1" ) ; tagsDirector.addTag ( tag ) ; tag.settag_name ( "booboo" ) ; tagsDirector.updateTag ( tag ) ; org.ovirt.engine.core.common.businessentities.Tags rootTag = tagsDirector.getRootTag ( ) ; tag = rootTag.getChildren ( ) . get ( 0 ) ; org.junit.Assert.assertEquals ( "booboo" , tag.gettag_name ( ) ) ; }

Target:
public void testUpdateChildren ( ) { org.ovirt.engine.core.common.businessentities.Tags tag = createTag ( "tag1" , "desc1" ) ; tagsDirector.addTag ( tag ) ; tag.setTagName ( "booboo" ) ; tagsDirector.updateTag ( tag ) ; org.ovirt.engine.core.common.businessentities.Tags rootTag = tagsDirector.getRootTag ( ) ; tag = rootTag.getChildren ( ) . get ( 0 ) ; org.junit.Assert.assertEquals ( "booboo" , tag.getTagName ( ) ) ; }
Source:
public void testRemove ( ) throws java.lang.Exception { setUpGetGraphicsExpectations ( 1 ) ; setUpGetEntityExpectations ( 1 ) ; setUpGetBallooningExpectations ( ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.RemoveVmTemplate , org.ovirt.engine.core.common.action.VmTemplateParametersBase.class , new java.lang.String [ ] { "VmTemplateId" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , true , true ) ) ; javax.ws.rs.core.Response response = resource.remove ( ) ; verifyRemove ( response ) ; }

Target:
public void testRemove ( ) throws java.lang.Exception { setUpGetGraphicsExpectations ( 1 ) ; setUpGetEntityExpectations ( 1 ) ; setUpGetBallooningExpectations ( ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.RemoveVmTemplate , org.ovirt.engine.core.common.action.VmTemplateManagementParameters.class , new java.lang.String [ ] { "VmTemplateId" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , true , true ) ) ; javax.ws.rs.core.Response response = resource.remove ( ) ; verifyRemove ( response ) ; }
Source:
public void testGetAvailableValues ( ) { java.util.Map < java.lang.String , java.lang.String > values = new java.util.HashMap < java.lang.String , java.lang.String > ( ) ; java.util.Set < java.lang.String > properties = new java.util.HashSet < java.lang.String > ( java.util.Arrays.asList ( "somevalue" ) ) ; org.ovirt.engine.core.compat.backendcompat.TypeCompat.getPropertyValues ( this , properties , values ) ; org.junit.Assert.assertFalse ( properties.isEmpty ( ) ) ; org.junit.Assert.assertEquals ( "Standard" , "Anakin" , values.get ( "somevalue" ) ) ; }

Target:
public void testGetAvailableValues ( ) { setSomeValue ( "Anakin" ) ; java.util.Map < java.lang.String , java.lang.String > values = new java.util.HashMap < java.lang.String , java.lang.String > ( ) ; java.util.Set < java.lang.String > properties = new java.util.HashSet < java.lang.String > ( java.util.Arrays.asList ( "somevalue" ) ) ; org.ovirt.engine.core.compat.backendcompat.TypeCompat.getPropertyValues ( this , properties , values ) ; org.junit.Assert.assertFalse ( properties.isEmpty ( ) ) ; org.junit.Assert.assertEquals ( "Standard" , "Anakin" , values.get ( "somevalue" ) ) ; }
Source:
public static java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmOsType > getLinuxOsTypes ( ) { if ( ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.linuxOsTypes ) != null ) { return org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.linuxOsTypes ; } org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.linuxOsTypes = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmOsType > ( java.util.Arrays.asList ( new org.ovirt.engine.core.common.businessentities.VmOsType [ ] { org.ovirt.engine.core.common.businessentities.VmOsType.OtherLinux , org.ovirt.engine.core.common.businessentities.VmOsType.RHEL3 , org.ovirt.engine.core.common.businessentities.VmOsType.RHEL3x64 , org.ovirt.engine.core.common.businessentities.VmOsType.RHEL4 , org.ovirt.engine.core.common.businessentities.VmOsType.RHEL4x64 , org.ovirt.engine.core.common.businessentities.VmOsType.RHEL5 , org.ovirt.engine.core.common.businessentities.VmOsType.RHEL5x64 , org.ovirt.engine.core.common.businessentities.VmOsType.RHEL6 , org.ovirt.engine.core.common.businessentities.VmOsType.RHEL6x64 } ) ) ; return org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.linuxOsTypes ; }

Target:
public static void initUniqueOsNames ( ) { org.ovirt.engine.ui.frontend.AsyncQuery callback = new org.ovirt.engine.ui.frontend.AsyncQuery ( ) ; callback.asyncCallback = new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.uniqueOsNames = ( ( java.util.HashMap < java.lang.Integer , java.lang.String > ) ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ) ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.OsRepository , new org.ovirt.engine.core.common.queries.OsQueryParameters ( org.ovirt.engine.core.common.queries.OsQueryParameters.OsRepositoryVerb.GetUniqueOsNames ) , callback ) ; }
Source:
public void validateEnoughSpace ( ) throws java.lang.Exception { initializeCommand ( new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ) ; initSnapshotValidator ( ) ; initVmForSpace ( ) ; initVmDiskImage ( false ) ; initSrcStorageDomain ( ) ; initDestStorageDomain ( StorageType.NFS ) ; org.mockito.Mockito.doReturn ( org.ovirt.engine.core.bll.storage.disk.MoveOrCopyDiskCommandTest.mockStorageDomainValidatorWithSpace ( ) ) . when ( command ) . createStorageDomainValidator ( ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateSuccess ( command ) ; }

Target:
public void validateDestinationDomainValid ( ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage disk = new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ; initializeCommand ( disk , VmEntityType.VM ) ; disk.getStorageIds ( ) . add ( destStorageId ) ; initSrcStorageDomain ( ) ; initDestStorageDomain ( StorageType.NFS ) ; command.getParameters ( ) . setStorageDomainId ( destStorageId ) ; command.setStorageDomainId ( destStorageId ) ; command.getStorageDomain ( ) . setId ( destStorageId ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( command , EngineMessage.ACTION_TYPE_FAILED_DESTINATION_STORAGE_DOMAIN_ALREADY_CONTAINS_THE_DISK ) ; }
Source:
public void hostProviderDoesNotExist ( ) { org.mockito.Mockito.when ( host.getHostProviderId ( ) ) . thenReturn ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; org.mockito.Mockito.when ( providerDao.get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( null ) ; org.mockito.Mockito.when ( dbFacade.getProviderDao ( ) ) . thenReturn ( providerDao ) ; validator = new org.ovirt.engine.core.bll.validator.UpdateHostValidator ( dbFacade , oldHost , host , false ) ; org.junit.Assert.assertThat ( validator.hostProviderExists ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.ACTION_TYPE_FAILED_PROVIDER_DOESNT_EXIST ) ) ; }

Target:
public void hostProviderDoesNotExist ( ) { org.mockito.Mockito.when ( host.getHostProviderId ( ) ) . thenReturn ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; org.mockito.Mockito.when ( providerDao.get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( null ) ; org.mockito.Mockito.when ( dbFacade.getProviderDao ( ) ) . thenReturn ( providerDao ) ; validator = new org.ovirt.engine.core.bll.validator.UpdateHostValidator ( dbFacade , oldHost , host , false , hostedEngineHelper ) ; org.junit.Assert.assertThat ( validator.hostProviderExists ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.ACTION_TYPE_FAILED_PROVIDER_DOESNT_EXIST ) ) ; }
Source:
public org.ovirt.engine.core.bll.SPMAsyncTask concreteCreateTask ( org.ovirt.engine.core.compat.Guid taskId , org.ovirt.engine.core.common.asynctasks.AsyncTaskCreationInfo asyncTaskCreationInfo , org.ovirt.engine.core.common.action.VdcActionType parentCommand ) { org.ovirt.engine.core.common.asynctasks.AsyncTaskParameters p = new org.ovirt.engine.core.common.asynctasks.AsyncTaskParameters ( asyncTaskCreationInfo , getAsyncTask ( taskId , asyncTaskCreationInfo , parentCommand ) ) ; p.setEntityInfo ( getParameters ( ) . getEntityInfo ( ) ) ; return createTask ( internalGetTaskType ( ) , p ) ; }

Target:
public void persistCommandWithoutContext ( org.ovirt.engine.core.common.action.VdcActionType parentCommand , boolean enableCallBack ) { persistCommand ( parentCommand , null , enableCallBack ) ; }
Source:
public void onSuccess ( org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain ) { getStorageDomain ( ) . setSelectedItem ( storageDomain ) ; }

Target:
protected void updateStorageDomains ( final org.ovirt.engine.core.common.businessentities.StoragePool datacenter ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getStorageDomainById ( new org.ovirt.engine.ui.uicommonweb.models.vms.AsyncQuery ( new org.ovirt.engine.ui.frontend.AsyncCallback < org.ovirt.engine.core.common.businessentities.StorageDomain > ( ) { @ java.lang.Override public void onSuccess ( org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain ) { getStorageDomain ( ) . setSelectedItem ( storageDomain ) ; } } ) , getStorageDomainId ( ) ) ; }
Source:
protected org.ovirt.engine.core.vdsbroker.vdsbroker.StatusForXmlRpc getReturnStatus ( ) { org.ovirt.engine.core.vdsbroker.vdsbroker.StatusForXmlRpc status = new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusForXmlRpc ( ) ; org.ovirt.engine.core.common.businessentities.pm.FenceOperationResult result = ( ( org.ovirt.engine.core.common.businessentities.pm.FenceOperationResult ) ( org.ovirt.engine.core.vdsbroker.vdsbroker.FenceVdsVDSCommand.getReturnValue ( ) ) ) ; if ( result == null ) { status.mCode = 1 ; status.mMessage = "" ; } else { status.mCode = ( ( result.getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.pm.FenceOperationResult.Status.ERROR ) ) ? 1 : 0 ; status.mMessage = result.getMessage ( ) ; } return status ; }

Target:
protected org.ovirt.engine.core.vdsbroker.vdsbroker.StatusForXmlRpc getReturnStatus ( ) { org.ovirt.engine.core.vdsbroker.vdsbroker.StatusForXmlRpc status = new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusForXmlRpc ( ) ; org.ovirt.engine.core.common.businessentities.pm.FenceOperationResult result = ( ( org.ovirt.engine.core.common.businessentities.pm.FenceOperationResult ) ( org.ovirt.engine.core.vdsbroker.vdsbroker.FenceVdsVDSCommand.getReturnValue ( ) ) ) ; if ( result == null ) { status.code = 1 ; status.message = "" ; } else { status.code = ( ( result.getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.pm.FenceOperationResult.Status.ERROR ) ) ? 1 : 0 ; status.message = result.getMessage ( ) ; } return status ; }
Source:
public void testRemoveNonExistant ( ) { setUpEntityQueryExpectations ( QueryType.GetAllNetworks , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.core.compat.Guid.Empty } , new java.util.ArrayList < org.ovirt.engine.api.model.Network > ( ) , null ) ; try { resource.remove ( ) ; org.junit.Assert.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { org.junit.Assert.assertNotNull ( wae.getResponse ( ) ) ; org.junit.Assert.assertEquals ( 404 , wae.getResponse ( ) . getStatus ( ) ) ; } }

Target:
public void testRemoveNonExistant ( ) { setUpEntityQueryExpectations ( QueryType.GetAllNetworks , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.core.compat.Guid.Empty } , new java.util.ArrayList < org.ovirt.engine.api.model.Network > ( ) , 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 ( ) ) ; } }
Source:
public java.util.List < org.ovirt.engine.core.compat.Guid > getVmAndTemplatesIdsWithoutAttachedImageDisks ( boolean shareableDisks ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) . addValue ( "shareable" , shareableDisks ) ; return getCallsHandler ( ) . executeReadList ( "GetVmsAndTemplatesIdsWithoutAttachedImageDisks" , createGuidMapper ( ) , parameterSource ) ; }

Target:
public java.util.List < org.ovirt.engine.core.compat.Guid > getVmAndTemplatesIdsWithoutAttachedImageDisks ( org.ovirt.engine.core.compat.Guid storagePoolId , boolean shareableDisks ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) . addValue ( "storage_pool_id" , storagePoolId ) . addValue ( "shareable" , shareableDisks ) ; return getCallsHandler ( ) . executeReadList ( "GetVmsAndTemplatesIdsWithoutAttachedImageDisks" , createGuidMapper ( ) , parameterSource ) ; }
Source:
public void testCheckVmHostDeviceAvailabilityOnAlreadyAllocatedDevice ( ) { org.junit.Assert.assertTrue ( dao.checkVmHostDeviceAvailability ( org.ovirt.engine.core.dao.HostDeviceDaoTest.EXISTING_VM_ID_2 , org.ovirt.engine.core.dao.HostDeviceDaoTest.EXISTING_HOST_ID ) ) ; }

Target:
public void updateNetworkDevice ( ) { org.ovirt.engine.core.common.businessentities.HostDeviceId netDeviceId = new org.ovirt.engine.core.common.businessentities.HostDeviceId ( FixturesTool.NETWORK_HOST_DEVICE_HOST_ID , FixturesTool.NETWORK_HOST_DEVICE_NAME ) ; org.ovirt.engine.core.common.businessentities.HostDevice before = dao.get ( netDeviceId ) ; before.setNetworkInterfaceName ( ( ( before.getNetworkInterfaceName ( ) ) + "new" ) ) ; dao.update ( before ) ; org.ovirt.engine.core.common.businessentities.HostDevice after = dao.get ( netDeviceId ) ; org.junit.Assert.assertNotNull ( after ) ; org.junit.Assert.assertEquals ( before , after ) ; }
Source:
public static void getClusterList ( 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 ) { if ( source != null ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > list = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ) ( source ) ) ; java.util.Collections.sort ( list , new org.ovirt.engine.core.common.businessentities.comparators.NameableComparator ( ) ) ; return list ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllVdsGroups , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }

Target:
public static void getTemplateDiskList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid templateId ) { 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.DiskImage > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmTemplatesDisks , new org.ovirt.engine.core.common.queries.IdQueryParameters ( templateId ) , aQuery ) ; }