auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public static boolean IsVmPriorityValueLegal ( int value , java.util.List < java.lang.String > reasons ) { boolean res = false ; if ( ( value >= 0 ) && ( value <= ( org.ovirt.engine.core.common.config.Config.< java.lang.Integer > GetValue ( ConfigValues.VmPriorityMaxValue ) ) ) ) { res = true ; } else { reasons.add ( VdcBllMessages.VM_OR_TEMPLATE_ILLEGAL_PRIORITY_VALUE.toString ( ) ) ; reasons.add ( java.lang.String.format ( "$MaxValue %1$s" , org.ovirt.engine.core.common.config.Config.< java.lang.Integer > GetValue ( ConfigValues.VmPriorityMaxValue ) ) ) ; } return res ; }

Target:
public static boolean isVmPriorityValueLegal ( int value , java.util.List < java.lang.String > reasons ) { boolean res = false ; if ( ( value >= 0 ) && ( value <= ( org.ovirt.engine.core.common.config.Config.< java.lang.Integer > GetValue ( ConfigValues.VmPriorityMaxValue ) ) ) ) { res = true ; } else { reasons.add ( VdcBllMessages.VM_OR_TEMPLATE_ILLEGAL_PRIORITY_VALUE.toString ( ) ) ; reasons.add ( java.lang.String.format ( "$MaxValue %1$s" , org.ovirt.engine.core.common.config.Config.< java.lang.Integer > GetValue ( ConfigValues.VmPriorityMaxValue ) ) ) ; } return res ; }
Source:
public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { return org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.VDS > cast ( ( ( java.util.List < ? > ) ( source ) ) ) ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ( ) ; }

Target:
public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { return org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.VDS > cast ( ( ( java.util.List < ? > ) ( source ) ) ) ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ( ) ; }
Source:
public java.lang.String getConfigurationValue ( java.lang.String miimonValue ) { return ( ( ( org.ovirt.engine.core.common.businessentities.network.BondMode.MODE ) + ( value ) ) + " miimon=" ) + miimonValue ; }

Target:
public java.lang.String getConfigurationValue ( java.lang.String miimonValue ) { java.lang.String extraOption ; if ( value.equals ( org.ovirt.engine.core.common.businessentities.network.BondMode.BOND4.value ) ) { extraOption = " xmit_hash_policy=" + ( org.ovirt.engine.core.common.businessentities.network.BondMode.BOND_XMIT_POLICY_LAYER23 ) ; } else { extraOption = "" ; } return ( ( ( ( org.ovirt.engine.core.common.businessentities.network.BondMode.MODE ) + ( value ) ) + " miimon=" ) + miimonValue ) + extraOption ; }
Source:
private org.ovirt.engine.core.common.job.Job getJob ( org.ovirt.engine.core.bll.CommandBase < ? > command , org.ovirt.engine.core.common.action.ActionType actionType ) { org.ovirt.engine.core.common.action.VdcActionParametersBase params = command.getParameters ( ) ; org.ovirt.engine.core.common.job.Job job ; if ( ( params.getJobId ( ) ) != null ) { job = jobDao.get ( params.getJobId ( ) ) ; } else { job = org.ovirt.engine.core.bll.job.ExecutionHandler.createJob ( actionType , command ) ; jobRepository.saveJob ( job ) ; } return job ; }

Target:
private org.ovirt.engine.core.common.job.Job getJob ( org.ovirt.engine.core.bll.CommandBase < ? > command , org.ovirt.engine.core.common.action.ActionType actionType ) { org.ovirt.engine.core.common.action.ActionParametersBase params = command.getParameters ( ) ; org.ovirt.engine.core.common.job.Job job ; if ( ( params.getJobId ( ) ) != null ) { job = jobDao.get ( params.getJobId ( ) ) ; } else { job = org.ovirt.engine.core.bll.job.ExecutionHandler.createJob ( actionType , command ) ; jobRepository.saveJob ( job ) ; } return job ; }
Source:
public static void GetClusterNetworkList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { 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 > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllNetworksByClusterId , new org.ovirt.engine.core.common.queries.VdsGroupQueryParamenters ( clusterId ) , 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.RunQuery ( VdcQueryType.GetStoragePoolById , new org.ovirt.engine.core.common.queries.StoragePoolQueryParametersBase ( dataCenterId ) , aQuery ) ; }
Source:
public static org.ovirt.engine.core.common.businessentities.storage.DiskImage createMetadataDisk ( ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage image = new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ; image.setSize ( org.ovirt.engine.core.bll.memory.MemoryUtils.METADATA_SIZE_IN_BYTES ) ; image.setVolumeType ( VolumeType.Preallocated ) ; image.setvolumeFormat ( VolumeFormat.RAW ) ; image.setDiskInterface ( DiskInterface.VirtIO ) ; return image ; }

Target:
public static org.ovirt.engine.core.common.businessentities.storage.DiskImage createMetadataDisk ( ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage image = new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ; image.setSize ( org.ovirt.engine.core.bll.memory.MemoryUtils.METADATA_SIZE_IN_BYTES ) ; image.setVolumeType ( VolumeType.Preallocated ) ; image.setVolumeFormat ( VolumeFormat.RAW ) ; return image ; }
Source:
public void isClusterEmpty ( 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.Boolean > ( ) { @ java.lang.Override public java.lang.Boolean Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return ( ( java.lang.Boolean ) ( source ) ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.IsClusterEmpty , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }

Target:
public void getFloppyImageList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId ) { getIrsImageList ( aQuery , storagePoolId , false , ImageFileType.Floppy ) ; }
Source:
public java.util.List < org.ovirt.engine.core.bll.utils.PermissionSubject > getPermissionCheckSubjects ( ) { return java.util.Collections.singletonList ( new org.ovirt.engine.core.bll.utils.PermissionSubject ( ( ( org.ovirt.engine.core.bll.storage.AddNetworkCommand.getStoragePoolId ( ) ) == null ? null : org.ovirt.engine.core.bll.storage.AddNetworkCommand.getStoragePoolId ( ) . getValue ( ) ) , org.ovirt.engine.core.common.VdcObjectType.StoragePool , org.ovirt.engine.core.bll.storage.AddNetworkCommand.getActionType ( ) . getActionGroup ( ) ) ) ; }

Target:
public java.util.List < org.ovirt.engine.core.bll.utils.PermissionSubject > getPermissionCheckSubjects ( ) { return java.util.Collections.singletonList ( new org.ovirt.engine.core.bll.utils.PermissionSubject ( ( ( org.ovirt.engine.core.bll.network.dc.AddNetworkCommand.getStoragePoolId ( ) ) == null ? null : org.ovirt.engine.core.bll.network.dc.AddNetworkCommand.getStoragePoolId ( ) . getValue ( ) ) , org.ovirt.engine.core.common.VdcObjectType.StoragePool , org.ovirt.engine.core.bll.network.dc.AddNetworkCommand.getActionType ( ) . getActionGroup ( ) ) ) ; }
Source:
protected void addStoragePoolToDb ( ) { org.ovirt.engine.core.bll.storage.AddEmptyStoragePoolCommand.getStoragePool ( ) . setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; org.ovirt.engine.core.bll.storage.AddEmptyStoragePoolCommand.getStoragePool ( ) . setStatus ( StoragePoolStatus.Uninitialized ) ; org.ovirt.engine.core.bll.storage.AddEmptyStoragePoolCommand.getStoragePool ( ) . setMacPoolId ( calculateMacPoolIdToUse ( ) ) ; org.ovirt.engine.core.bll.storage.AddEmptyStoragePoolCommand.getStoragePoolDAO ( ) . save ( org.ovirt.engine.core.bll.storage.AddEmptyStoragePoolCommand.getStoragePool ( ) ) ; }

Target:
protected void addStoragePoolToDb ( ) { org.ovirt.engine.core.bll.storage.AddEmptyStoragePoolCommand.getStoragePool ( ) . setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; org.ovirt.engine.core.bll.storage.AddEmptyStoragePoolCommand.getStoragePool ( ) . setStatus ( StoragePoolStatus.Uninitialized ) ; org.ovirt.engine.core.bll.storage.AddEmptyStoragePoolCommand.getStoragePool ( ) . setMacPoolId ( calculateMacPoolIdToUse ( ) ) ; org.ovirt.engine.core.bll.storage.AddEmptyStoragePoolCommand.getStoragePoolDao ( ) . save ( org.ovirt.engine.core.bll.storage.AddEmptyStoragePoolCommand.getStoragePool ( ) ) ; }
Source:
public void setItems ( java.lang.Iterable value ) { if ( value == null ) { super . setItems ( null ) ; return ; } java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > disks = org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.Disk > cast ( value ) ; super . setItems ( disks ) ; }

Target:
public void setItems ( java.util.Collection value ) { if ( value == null ) { super . setItems ( null ) ; return ; } java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > disks = org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.Disk > cast ( value ) ; super . setItems ( disks ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.network mockExistingNetwork ( java.lang.String networkName ) { java.util.List < org.ovirt.engine.core.common.businessentities.network > existingNets = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network > ( ) ; org.ovirt.engine.core.common.businessentities.network network = new org.ovirt.engine.core.common.businessentities.network ( "" , "" , org.ovirt.engine.core.compat.Guid.NewGuid ( ) , networkName , "" , "" , 0 , 100 , false , 0 , true ) ; existingNets.add ( network ) ; org.mockito.Mockito.when ( networkDAO.getAllForCluster ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( existingNets ) ; return network ; }

Target:
private void assertNoBondsModified ( org.ovirt.engine.core.bll.SetupNetworksHelper helper ) { org.junit.Assert.assertEquals ( java.text.MessageFormat.format ( "Expected no bonds to be modified but some were modified. Modified bonds: {0}" , helper.getBonds ( ) ) , 0 , helper.getBonds ( ) . size ( ) ) ; }
Source:
protected void unlockVm ( ) { if ( ( org.ovirt.engine.core.bll.VmCommand.getVm ( ) ) != null ) { if ( ( org.ovirt.engine.core.bll.VmCommand.getVm ( ) . getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.ImageLocked ) ) { org.ovirt.engine.core.bll.VmHandler.unlockVm ( org.ovirt.engine.core.bll.VmCommand.getVm ( ) , org.ovirt.engine.core.bll.VmCommand.getCompensationContext ( ) ) ; } } else { org.ovirt.engine.core.bll.VmCommand.setCommandShouldBeLogged ( false ) ; log.warn ( "VmCommand::EndVmCommand: Vm is null - not performing EndAction on Vm" ) ; } }

Target:
protected void unlockVm ( ) { if ( ( org.ovirt.engine.core.bll.VmCommand.getVm ( ) ) != null ) { if ( ( org.ovirt.engine.core.bll.VmCommand.getVm ( ) . getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.ImageLocked ) ) { org.ovirt.engine.core.bll.VmHandler.unlockVm ( org.ovirt.engine.core.bll.VmCommand.getVm ( ) , org.ovirt.engine.core.bll.VmCommand.getCompensationContext ( ) ) ; } } else { setLoggingForCommand ( ) ; log.warn ( "VmCommand::EndVmCommand: Vm is null - not performing EndAction on Vm" ) ; } }
Source:
protected org.ovirt.engine.core.common.businessentities.VDSGroup getVdsGroup ( ) { org.ovirt.engine.core.common.businessentities.VDSGroup vdsGroup = null ; java.util.List < org.ovirt.engine.core.common.businessentities.VDSGroup > vdsGroups = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVdsGroupDao ( ) . getAllForStoragePool ( getEnclosingCommand ( ) . getParameters ( ) . getStoragePoolId ( ) ) ; if ( ! ( vdsGroups.isEmpty ( ) ) ) { vdsGroup = vdsGroups.get ( 0 ) ; } return vdsGroup ; }

Target:
public org.ovirt.engine.core.common.businessentities.VDSGroup getVdsGroup ( org.ovirt.engine.core.compat.Guid vdsGroupId ) { return org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVdsGroupDao ( ) . get ( vdsGroupId ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.irsbroker.OneUuidReturnForXmlRpc createVG ( java.lang.String sdUUID , java.lang.String [ ] deviceList , boolean force ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "LVMVolumeGroup.create" ) . withParameter ( "name" , sdUUID ) . withParameter ( "devlist" , new java.util.ArrayList < > ( java.util.Arrays.asList ( deviceList ) ) ) . withParameter ( "force" , force ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) . withResponseKey ( "uuid" ) ; return new org.ovirt.engine.core.vdsbroker.irsbroker.OneUuidReturnForXmlRpc ( response ) ; }

Target:
public org.ovirt.engine.core.vdsbroker.irsbroker.OneUuidReturn createVG ( java.lang.String sdUUID , java.lang.String [ ] deviceList , boolean force ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "LVMVolumeGroup.create" ) . withParameter ( "name" , sdUUID ) . withParameter ( "devlist" , new java.util.ArrayList < > ( java.util.Arrays.asList ( deviceList ) ) ) . withParameter ( "force" , force ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) . withResponseKey ( "uuid" ) ; return new org.ovirt.engine.core.vdsbroker.irsbroker.OneUuidReturn ( response ) ; }
Source:
private org.ovirt.engine.core.common.vdscommands.VDSReturnValue addStoragePoolInIrs ( ) { return runVdsCommand ( VDSCommandType.CreateStoragePool , new org.ovirt.engine.core.common.vdscommands.CreateStoragePoolVDSCommandParameters ( org.ovirt.engine.core.bll.storage.AddStoragePoolWithStoragesCommand.getVds ( ) . getId ( ) , org.ovirt.engine.core.bll.storage.AddStoragePoolWithStoragesCommand.getStoragePool ( ) . getstorage_pool_type ( ) , org.ovirt.engine.core.bll.storage.AddStoragePoolWithStoragesCommand.getStoragePool ( ) . getId ( ) , org.ovirt.engine.core.bll.storage.AddStoragePoolWithStoragesCommand.getStoragePool ( ) . getName ( ) , masterStorageDomain.getId ( ) , org.ovirt.engine.core.bll.storage.AddStoragePoolWithStoragesCommand.getParameters ( ) . getStorages ( ) , org.ovirt.engine.core.bll.storage.AddStoragePoolWithStoragesCommand.getStoragePool ( ) . getmaster_domain_version ( ) ) ) ; }

Target:
private org.ovirt.engine.core.common.vdscommands.VDSReturnValue addStoragePoolInIrs ( ) { return runVdsCommand ( VDSCommandType.CreateStoragePool , new org.ovirt.engine.core.common.vdscommands.CreateStoragePoolVDSCommandParameters ( org.ovirt.engine.core.bll.storage.AddStoragePoolWithStoragesCommand.getVds ( ) . getId ( ) , org.ovirt.engine.core.bll.storage.AddStoragePoolWithStoragesCommand.getStoragePool ( ) . getStorageType ( ) , org.ovirt.engine.core.bll.storage.AddStoragePoolWithStoragesCommand.getStoragePool ( ) . getId ( ) , org.ovirt.engine.core.bll.storage.AddStoragePoolWithStoragesCommand.getStoragePool ( ) . getName ( ) , masterStorageDomain.getId ( ) , org.ovirt.engine.core.bll.storage.AddStoragePoolWithStoragesCommand.getParameters ( ) . getStorages ( ) , org.ovirt.engine.core.bll.storage.AddStoragePoolWithStoragesCommand.getStoragePool ( ) . getmaster_domain_version ( ) ) ) ; }
Source:
public static 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 ) ; }

Target:
public static void getPoolById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid poolId ) { 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.GetVmPoolById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( poolId ) , aQuery ) ; }
Source:
protected void revertTask ( ) { org.ovirt.engine.core.compat.Guid targetStorageDomainId = getEnclosingCommand ( ) . getParameters ( ) . getTargetStorageDomainId ( ) ; org.ovirt.engine.core.compat.Guid destinationImageId = getEnclosingCommand ( ) . getParameters ( ) . getDestinationImageId ( ) ; org.ovirt.engine.core.common.businessentities.DiskImage diskImage = org.ovirt.engine.core.bll.lsm.VmReplicateDiskFinishTaskHandler.getDiskImageDao ( ) . get ( destinationImageId ) ; if ( ( diskImage != null ) && ( targetStorageDomainId.equals ( diskImage.getStorageIds ( ) . get ( 0 ) ) ) ) { getEnclosingCommand ( ) . getParameters ( ) . setExecutionIndex ( 0 ) ; } }

Target:
protected void revertTask ( ) { org.ovirt.engine.core.compat.Guid targetStorageDomainId = getEnclosingCommand ( ) . getParameters ( ) . getTargetStorageDomainId ( ) ; if ( isMoveDiskInDbSucceded ( targetStorageDomainId ) ) { getEnclosingCommand ( ) . preventRollback ( ) ; } }
Source:
private org.ovirt.engine.api.model.Labels mapCollection ( java.util.List < org.ovirt.engine.core.common.businessentities.network.pseudo.NetworkLabel > networkLabels ) { org.ovirt.engine.api.model.Labels labels = new org.ovirt.engine.api.model.Labels ( ) ; for ( org.ovirt.engine.core.common.businessentities.network.pseudo.NetworkLabel networkLabel : networkLabels ) { org.ovirt.engine.api.model.Label label = new org.ovirt.engine.api.model.Label ( ) ; label.setId ( networkLabel.getId ( ) ) ; labels.getLabels ( ) . add ( label ) ; addLinks ( label , org.ovirt.engine.api.model.HostNIC.class ) ; } return labels ; }

Target:
private org.ovirt.engine.api.model.Labels mapCollection ( java.util.List < org.ovirt.engine.core.common.businessentities.network.pseudo.NetworkLabel > networkLabels ) { org.ovirt.engine.api.model.Labels labels = new org.ovirt.engine.api.model.Labels ( ) ; for ( org.ovirt.engine.core.common.businessentities.network.pseudo.NetworkLabel networkLabel : networkLabels ) { org.ovirt.engine.api.model.Label label = new org.ovirt.engine.api.model.Label ( ) ; label.setId ( networkLabel.getId ( ) ) ; labels.getLabels ( ) . add ( label ) ; addLinks ( label , org.ovirt.engine.api.model.HostNic.class ) ; } return labels ; }
Source:
private org.ovirt.engine.core.common.action.VdcReturnValueBase addVmFromScratch ( org.ovirt.engine.core.common.businessentities.VmStatic vmStatic ) { org.ovirt.engine.core.common.action.AddVmFromScratchParameters parameters = new org.ovirt.engine.core.common.action.AddVmFromScratchParameters ( vmStatic , org.ovirt.engine.core.bll.AddVmAndAttachToPoolCommand.getParameters ( ) . getDiskInfoList ( ) , org.ovirt.engine.core.bll.AddVmAndAttachToPoolCommand.getParameters ( ) . getStorageDomainId ( ) ) ; parameters.setSessionId ( org.ovirt.engine.core.bll.AddVmAndAttachToPoolCommand.getParameters ( ) . getSessionId ( ) ) ; parameters.setDontAttachToDefaultTag ( true ) ; return runInternalActionWithTasksContext ( VdcActionType.AddVmFromScratch , parameters ) ; }

Target:
private org.ovirt.engine.core.common.action.VdcReturnValueBase addVmFromScratch ( org.ovirt.engine.core.common.businessentities.VmStatic vmStatic ) { org.ovirt.engine.core.common.action.AddVmFromScratchParameters parameters = new org.ovirt.engine.core.common.action.AddVmFromScratchParameters ( vmStatic , org.ovirt.engine.core.bll.AddVmAndAttachToPoolCommand.getParameters ( ) . getDiskInfoList ( ) , org.ovirt.engine.core.bll.AddVmAndAttachToPoolCommand.getParameters ( ) . getStorageDomainId ( ) ) ; parameters.setSessionId ( org.ovirt.engine.core.bll.AddVmAndAttachToPoolCommand.getParameters ( ) . getSessionId ( ) ) ; parameters.setDontAttachToDefaultTag ( true ) ; parameters.setDiskOperatorAuthzPrincipalDbId ( org.ovirt.engine.core.bll.AddVmAndAttachToPoolCommand.getParameters ( ) . getDiskOperatorAuthzPrincipalDbId ( ) ) ; return runInternalActionWithTasksContext ( VdcActionType.AddVmFromScratch , parameters ) ; }
Source:
private org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidator createHostSetupNetworksValidator ( java.util.List < org.ovirt.engine.core.common.businessentities.network.Network > networks , org.ovirt.engine.core.common.action.HostSetupNetworksParameters params ) { return new org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidatorTest.HostSetupNetworksValidatorBuilder ( ) . setHost ( host ) . setParams ( params ) . addNetworks ( networks ) . build ( ) ; }

Target:
public org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidatorTest.ParametersBuilder addBonds ( org.ovirt.engine.core.common.businessentities.network.Bond ... bonds ) { if ( nullParameters ( bonds ) ) { return this ; } if ( ( parameters.getBonds ( ) ) == null ) { parameters.setBonds ( new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.Bond > ( ) ) ; } parameters.getBonds ( ) . addAll ( java.util.Arrays.asList ( bonds ) ) ; return this ; }
Source:
public void eventRaised ( org.ovirt.engine.core.compat.Event ev , java.lang.Object sender , org.ovirt.engine.core.compat.EventArgs args ) { org.ovirt.engine.ui.uicommonweb.models.datacenters.NetworkModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.datacenters.NetworkModel ) ( sender ) ) ; java.lang.String propertyName = ( ( org.ovirt.engine.core.compat.PropertyChangedEventArgs ) ( args ) ) . PropertyName ; if ( "NetworkClusterList" . equals ( propertyName ) ) { getView ( ) . setNetworkClusterList ( model.getNetworkClusterList ( ) ) ; } else if ( "Message" . equals ( propertyName ) ) { getView ( ) . setMessageLabel ( model.getMessage ( ) ) ; } }

Target:
public void eventRaised ( org.ovirt.engine.core.compat.Event ev , java.lang.Object sender , org.ovirt.engine.core.compat.EventArgs args ) { org.ovirt.engine.ui.uicommonweb.models.EntityModel entity = ( ( org.ovirt.engine.ui.uicommonweb.models.EntityModel ) ( sender ) ) ; boolean inputFieldsEnabled = ( ( java.lang.Boolean ) ( entity.getEntity ( ) ) ) ; getView ( ) . postModelEnabled ( inputFieldsEnabled ) ; }
Source:
private org.ovirt.engine.core.common.action.VmManagementParametersBase getUpdateVmParameters ( boolean applyCpuChangesLater ) { org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel ) ( getWindow ( ) ) ) ; org.ovirt.engine.core.common.action.VmManagementParametersBase params = new org.ovirt.engine.core.common.action.VmManagementParametersBase ( gettempVm ( ) ) ; params.setSoundDeviceEnabled ( model.getIsSoundcardEnabled ( ) . getEntity ( ) ) ; params.setConsoleEnabled ( model.getIsConsoleDeviceEnabled ( ) . getEntity ( ) ) ; setRngDeviceToParams ( model , params ) ; params.setApplyChangesLater ( applyCpuChangesLater ) ; setRngDeviceToParams ( model , params ) ; return params ; }

Target:
private org.ovirt.engine.core.common.action.VmManagementParametersBase getUpdateVmParameters ( boolean applyCpuChangesLater ) { org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel ) ( getWindow ( ) ) ) ; org.ovirt.engine.core.common.action.VmManagementParametersBase params = new org.ovirt.engine.core.common.action.VmManagementParametersBase ( gettempVm ( ) ) ; params.setSoundDeviceEnabled ( model.getIsSoundcardEnabled ( ) . getEntity ( ) ) ; params.setConsoleEnabled ( model.getIsConsoleDeviceEnabled ( ) . getEntity ( ) ) ; setRngDeviceToParams ( model , params ) ; params.setApplyChangesLater ( applyCpuChangesLater ) ; org.ovirt.engine.ui.uicommonweb.builders.BuilderExecutor.build ( model , params , new org.ovirt.engine.ui.uicommonweb.builders.vm.UnitToGraphicsDeviceParamsBuilder ( ) ) ; return params ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc refreshStoragePool ( java.lang.String spUUID , java.lang.String msdUUID , int masterVersion ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "StoragePool.refresh" ) . withParameter ( "storagepoolID" , spUUID ) . withParameter ( "masterSdUUID" , msdUUID ) . withParameter ( "masterVersion" , masterVersion ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( response ) ; }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.QemuImageInfoReturnForXmlRpc getQemuImageInfo ( java.lang.String sdUUID , java.lang.String spUUID , java.lang.String imgUUID , java.lang.String volUUID ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "Volume.getQemuImageInfo" ) . withParameter ( "storagepoolID" , spUUID ) . withParameter ( "storagedomainID" , sdUUID ) . withParameter ( "imageID" , imgUUID ) . withParameter ( "volumeID" , volUUID ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.QemuImageInfoReturnForXmlRpc ( response ) ; }
Source:
public void testAddOperationAction ( ) { org.ovirt.engine.ui.frontend.communication.VdcOperation < org.ovirt.engine.core.common.action.VdcActionType , org.ovirt.engine.core.common.action.VdcActionParametersBase > testOperation = new org.ovirt.engine.ui.frontend.communication.VdcOperation ( org.ovirt.engine.core.common.action.VdcActionType.AddNetworkOnProvider , new org.ovirt.engine.core.common.action.VdcActionParametersBase ( ) , null ) ; testManager.addOperation ( testOperation ) ; org.mockito.Mockito.verify ( mockOperationProcessor ) . processOperation ( testManager ) ; org.mockito.Mockito.verify ( mockEventBus ) . fireEvent ( org.mockito.ArgumentMatchers.any ( org.ovirt.engine.ui.frontend.communication.EngineSessionRefreshedEvent.class ) ) ; org.junit.Assert.assertEquals ( "Operations must match" , testOperation , testManager.pollOperation ( ) ) ; }

Target:
public void testAddOperationAction ( ) { org.ovirt.engine.ui.frontend.communication.VdcOperation < org.ovirt.engine.core.common.action.ActionType , org.ovirt.engine.core.common.action.VdcActionParametersBase > testOperation = new org.ovirt.engine.ui.frontend.communication.VdcOperation ( org.ovirt.engine.core.common.action.ActionType.AddNetworkOnProvider , new org.ovirt.engine.core.common.action.VdcActionParametersBase ( ) , null ) ; testManager.addOperation ( testOperation ) ; org.mockito.Mockito.verify ( mockOperationProcessor ) . processOperation ( testManager ) ; org.mockito.Mockito.verify ( mockEventBus ) . fireEvent ( org.mockito.ArgumentMatchers.any ( org.ovirt.engine.ui.frontend.communication.EngineSessionRefreshedEvent.class ) ) ; org.junit.Assert.assertEquals ( "Operations must match" , testOperation , testManager.pollOperation ( ) ) ; }
Source:
public void onAsyncCallFail ( com.gwtplatform.mvp.client.proxy.AsyncCallFailEvent event ) { java.lang.Throwable caught = event.getCaught ( ) ; org.ovirt.engine.ui.common.system.AsyncCallFailureHandler.logger.warning ( ( "Error while performing async call: " + ( caught.getLocalizedMessage ( ) ) ) ) ; errorPopupManager.show ( messages.asyncCallFailure ( caught.getLocalizedMessage ( ) ) ) ; }

Target:
public void onAsyncCallFail ( com.gwtplatform.mvp.client.proxy.AsyncCallFailEvent event ) { java.lang.Throwable caught = event.getCaught ( ) ; org.ovirt.engine.ui.common.system.AsyncCallFailureHandler.logger.warning ( ( "Error while performing async call: " + ( caught.getLocalizedMessage ( ) ) ) ) ; errorPopupManager.show ( org.ovirt.engine.ui.common.system.AsyncCallFailureHandler.messages.asyncCallFailure ( caught.getLocalizedMessage ( ) ) ) ; }
Source:
public void appendCustomValueUsesNullSeparator ( ) { final org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase b = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.TestAuditLogableBase ( ) ; final java.lang.String key = "foo" ; final java.lang.String value = org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.NAME ; final java.lang.String newVal = "bar" ; final java.lang.String sep = null ; b.addCustomValue ( key , value ) ; b.appendCustomValue ( key , newVal , sep ) ; }

Target:
public void appendCustomValueUsesNullSeparator ( ) { final org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase b = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.TestAuditLogableBase ( ) ; final java.lang.String key = "foo" ; final java.lang.String value = org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.NAME ; final java.lang.String newVal = "bar" ; final java.lang.String sep = null ; b.addCustomValue ( key , value ) ; b.appendCustomValue ( key , newVal , sep ) ; final java.lang.String s = b.getCustomValue ( key ) ; org.junit.Assert.assertEquals ( ( ( value + sep ) + newVal ) , s ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.irsbroker.OneUuidReturnForXmlRpc uploadImage ( java.util.Map methodInfo , java.lang.String spUUID , java.lang.String sdUUID , java.lang.String srcImgGUID , java.lang.String srcVolUUID ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "Image.upload" ) . withParameter ( "methodArgs" , methodInfo ) . withParameter ( "storagepoolID" , spUUID ) . withParameter ( "storagedomainID" , sdUUID ) . withParameter ( "imageID" , srcImgGUID ) . withParameter ( "volumeID" , srcVolUUID ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) . withResponseKey ( "uuid" ) ; return new org.ovirt.engine.core.vdsbroker.irsbroker.OneUuidReturnForXmlRpc ( response ) ; }

Target:
public org.ovirt.engine.core.vdsbroker.irsbroker.OneUuidReturn uploadImage ( java.util.Map methodInfo , java.lang.String spUUID , java.lang.String sdUUID , java.lang.String srcImgGUID , java.lang.String srcVolUUID ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "Image.upload" ) . withParameter ( "methodArgs" , methodInfo ) . withParameter ( "storagepoolID" , spUUID ) . withParameter ( "storagedomainID" , sdUUID ) . withParameter ( "imageID" , srcImgGUID ) . withParameter ( "volumeID" , srcVolUUID ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) . withResponseKey ( "uuid" ) ; return new org.ovirt.engine.core.vdsbroker.irsbroker.OneUuidReturn ( response ) ; }
Source:
public void testGetEventNotificationMethodsByType ( ) { java.lang.String target = "Email" ; java.util.List < org.ovirt.engine.core.common.businessentities.EventNotificationMethod > result = dao.getEventNotificationMethodsByType ( target ) ; assertNotNull ( result ) ; assertFalse ( result.isEmpty ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.EventNotificationMethod method : result ) { assertEquals ( EventNotificationMethods.EMAIL , method.getmethod_type ( ) ) ; } }

Target:
public void testSubscribe ( ) { dao.subscribe ( newSubscription ) ; java.util.List < org.ovirt.engine.core.common.businessentities.event_subscriber > result = dao.getAllForSubscriber ( newSubscription.getsubscriber_id ( ) ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertFalse ( result.isEmpty ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.event_subscriber subscription : result ) { org.junit.Assert.assertEquals ( newSubscriber , subscription.getsubscriber_id ( ) ) ; } }
Source:
public org.ovirt.engine.api.model.Networks list ( ) { java.util.List < org.ovirt.engine.api.model.Network > entities ; if ( isFiltered ( ) ) { org.ovirt.engine.core.common.queries.IdQueryParameters parameters = new org.ovirt.engine.core.common.queries.IdQueryParameters ( org.ovirt.engine.core.compat.Guid.Empty ) ; entities = getBackendCollection ( VdcQueryType.GetAllNetworks , parameters , SearchType.Network ) ; } else { entities = getBackendCollection ( SearchType.Network ) ; } org.ovirt.engine.api.model.Networks networks = mapCollection ( entities ) ; for ( org.ovirt.engine.api.model.Network network : networks.getNetworks ( ) ) { network.setDisplay ( null ) ; } return networks ; }

Target:
public javax.ws.rs.core.Response add ( org.ovirt.engine.api.model.Network network ) { validateParameters ( network , getRequiredAddFields ( ) ) ; org.ovirt.engine.api.model.Network entity = map ( network ) ; org.ovirt.engine.core.common.action.AddNetworkStoragePoolParameters params = getAddParameters ( network , entity ) ; return performCreate ( addAction , params , new org.ovirt.engine.api.restapi.resource.DataCenterNetworkIdResolver ( network.getName ( ) , params.getStoragePoolId ( ) . toString ( ) ) ) ; }
Source:
public void shouldDetectNeverStartedVM ( ) { final org.ovirt.engine.core.common.businessentities.VM newVM = new org.ovirt.engine.core.common.businessentities.VM ( ) ; org.assertj.core.api.Assertions.assertThat ( filter ( newVM , tooOldHost , newEnoughHost ) ) . containsExactly ( org.ovirt.engine.core.bll.scheduling.policyunits.InClusterUpgradeWeightPolicyUnitTest.weight ( tooOldHost , org.ovirt.engine.core.bll.scheduling.policyunits.InClusterUpgradeWeightPolicyUnit.BEST_WEIGHT ) , org.ovirt.engine.core.bll.scheduling.policyunits.InClusterUpgradeWeightPolicyUnitTest.weight ( newEnoughHost , org.ovirt.engine.core.bll.scheduling.policyunits.InClusterUpgradeWeightPolicyUnit.BEST_WEIGHT ) ) ; }

Target:
public void shouldWeightNothingOnVmStartWithDifferenOsFamilies ( ) { org.ovirt.engine.core.common.businessentities.VDS fedoraHost = newHost ( "Fedora - 23 - 1.fc23" ) ; final org.ovirt.engine.core.common.businessentities.VM newVM = new org.ovirt.engine.core.common.businessentities.VM ( ) ; org.assertj.core.api.Assertions.assertThat ( filter ( newVM , tooOldHost , newEnoughHost , fedoraHost ) ) . contains ( org.ovirt.engine.core.bll.scheduling.policyunits.InClusterUpgradeWeightPolicyUnitTest.weight ( tooOldHost , org.ovirt.engine.core.bll.scheduling.policyunits.InClusterUpgradeWeightPolicyUnit.BEST_WEIGHT ) , org.ovirt.engine.core.bll.scheduling.policyunits.InClusterUpgradeWeightPolicyUnitTest.weight ( newEnoughHost , org.ovirt.engine.core.bll.scheduling.policyunits.InClusterUpgradeWeightPolicyUnit.BEST_WEIGHT ) , org.ovirt.engine.core.bll.scheduling.policyunits.InClusterUpgradeWeightPolicyUnitTest.weight ( fedoraHost , org.ovirt.engine.core.bll.scheduling.policyunits.InClusterUpgradeWeightPolicyUnit.BEST_WEIGHT ) ) ; org.assertj.core.api.Assertions.assertThat ( filter ( newVM , tooOldHost , newEnoughHost , fedoraHost ) ) . hasSize ( 3 ) ; }
Source:
protected boolean validateBallonDevice ( ) { if ( ! ( org.ovirt.engine.core.common.utils.VmDeviceCommonUtils.isBalloonDeviceExists ( org.ovirt.engine.core.bll.ImportVmCommandBase.getVm ( ) . getManagedVmDeviceMap ( ) . values ( ) ) ) ) { return true ; } if ( ! ( osRepository.isBalloonEnabled ( org.ovirt.engine.core.bll.ImportVmCommandBase.getVm ( ) . getStaticData ( ) . getOsId ( ) , getEffectiveCompatibilityVersion ( ) ) ) ) { addCanDoActionMessageVariable ( "clusterArch" , org.ovirt.engine.core.bll.ImportVmCommandBase.getVdsGroup ( ) . getArchitecture ( ) ) ; return failCanDoAction ( EngineMessage.BALLOON_REQUESTED_ON_NOT_SUPPORTED_ARCH ) ; } return true ; }

Target:
protected boolean validateBallonDevice ( ) { if ( ! ( org.ovirt.engine.core.common.utils.VmDeviceCommonUtils.isBalloonDeviceExists ( org.ovirt.engine.core.bll.ImportVmCommandBase.getVm ( ) . getManagedVmDeviceMap ( ) . values ( ) ) ) ) { return true ; } if ( ! ( osRepository.isBalloonEnabled ( org.ovirt.engine.core.bll.ImportVmCommandBase.getVm ( ) . getStaticData ( ) . getOsId ( ) , getEffectiveCompatibilityVersion ( ) ) ) ) { addValidationMessageVariable ( "clusterArch" , org.ovirt.engine.core.bll.ImportVmCommandBase.getVdsGroup ( ) . getArchitecture ( ) ) ; return failValidation ( EngineMessage.BALLOON_REQUESTED_ON_NOT_SUPPORTED_ARCH ) ; } return true ; }
Source:
public static void GetRoleActionGroupsByRoleId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid roleId ) { 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.ActionGroup > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ActionGroup > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetRoleActionGroupsByRoleId , new org.ovirt.engine.core.common.queries.MultilevelAdministrationByRoleIdParameters ( roleId ) , aQuery ) ; }

Target:
public static void GetSANWipeAfterDelete ( 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.Boolean ) ( source ) ) . booleanValue ( ) : false ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.SANWipeAfterDelete , org.ovirt.engine.core.common.config.Config.DefaultConfigurationVersion ) , aQuery ) ; }
Source:
public void getFreeVfOneFreeVf ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.HostDevice > freeVfs = freeVfCommon ( 1 , 4 , 3 , 2 , 1 ) ; org.junit.Assert.assertEquals ( 1 , freeVfs.size ( ) ) ; org.junit.Assert.assertTrue ( freeVfs.contains ( hostNicVfsConfigHelper.getFreeVf ( nic ) ) ) ; }

Target:
public void getFreeVfNoFreeVf ( ) { freeVfCommon ( 0 , 1 , 2 , 3 , 4 ) ; org.junit.Assert.assertNull ( hostNicVfsConfigHelper.getFreeVf ( nic , null ) ) ; }
Source:
private void saveSanStorage ( ) { org.ovirt.engine.ui.uicommonweb.models.storage.StorageModel storageModel = ( ( org.ovirt.engine.ui.uicommonweb.models.storage.StorageModel ) ( getWindow ( ) ) ) ; org.ovirt.engine.ui.uicommonweb.models.storage.SanStorageModel sanStorageModel = ( ( org.ovirt.engine.ui.uicommonweb.models.storage.SanStorageModel ) ( storageModel.getCurrentStorageItem ( ) ) ) ; java.util.ArrayList < java.lang.String > usedLunsMessages = sanStorageModel.getUsedLunsMessages ( ) ; if ( usedLunsMessages.isEmpty ( ) ) { onSaveSanStorage ( ) ; } else { forceCreationWarning ( usedLunsMessages ) ; } }

Target:
private void postGetLunsMessages ( java.util.ArrayList < java.lang.String > usedLunsMessages ) { if ( usedLunsMessages.isEmpty ( ) ) { onSaveSanStorage ( ) ; } else { forceCreationWarning ( usedLunsMessages ) ; } }
Source:
public void testUpdateFailed ( ) { try { update ( true , false , 1 ) ; } catch ( javax.ws.rs.WebApplicationException e ) { org.junit.Assert.assertNotNull ( e.getResponse ( ) ) ; org.junit.Assert.assertEquals ( 400 , e.getResponse ( ) . getStatus ( ) ) ; } }

Target:
public void testUpdateFailed ( ) { try { update ( true , false , 1 ) ; } catch ( javax.ws.rs.WebApplicationException e ) { org.junit.jupiter.api.Assertions.assertNotNull ( e.getResponse ( ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( 400 , e.getResponse ( ) . getStatus ( ) ) ; } }
Source:
public void setSelectedItems ( java.util.List value ) { if ( ( selectedItems ) != value ) { SelectedItemsChanging ( value , selectedItems ) ; selectedItems = value ; SelectedItemsChanged ( ) ; getSelectedItemsChangedEvent ( ) . raise ( this , EventArgs.Empty ) ; OnPropertyChanged ( new org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ( "SelectedItems" ) ) ; } }

Target:
public void setSelectedItems ( java.util.List value ) { if ( ( selectedItems ) != value ) { SelectedItemsChanging ( value , selectedItems ) ; selectedItems = value ; SelectedItemsChanged ( ) ; getSelectedItemsChangedEvent ( ) . raise ( this , EventArgs.Empty ) ; onPropertyChanged ( new org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ( "SelectedItems" ) ) ; } }
Source:
public void setSearchString ( java.lang.String value , boolean checkIfNewValue ) { if ( ( ! checkIfNewValue ) || ( ! ( org.ovirt.engine.core.compat.StringHelper.stringsEqual ( searchString , value ) ) ) ) { searchString = value ; searchStringChanged ( ) ; onPropertyChanged ( new org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ( "SearchString" ) ) ; } }

Target:
public void setSearchString ( java.lang.String value , boolean checkIfNewValue ) { if ( ( ! checkIfNewValue ) || ( ! ( org.ovirt.engine.core.common.utils.ObjectUtils.objectsEqual ( searchString , value ) ) ) ) { searchString = value ; searchStringChanged ( ) ; onPropertyChanged ( new org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ( "SearchString" ) ) ; } }
Source:
protected void ExecuteVdsBrokerCommand ( ) { status = org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeRemoveBricksVDSCommand.getBroker ( ) . glusterVolumeRemoveBrickForce ( org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeRemoveBricksVDSCommand.getParameters ( ) . getVolumeName ( ) , org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeRemoveBricksVDSCommand.getParameters ( ) . getBrickDirectories ( ) . toArray ( new java.lang.String [ 0 ] ) ) ; org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeRemoveBricksVDSCommand.ProceedProxyReturnValue ( ) ; }

Target:
protected void ExecuteVdsBrokerCommand ( ) { status = org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeRemoveBricksVDSCommand.getBroker ( ) . glusterVolumeRemoveBrickForce ( org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeRemoveBricksVDSCommand.getParameters ( ) . getVolumeName ( ) , org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeRemoveBricksVDSCommand.getParameters ( ) . getBrickDirectories ( ) . toArray ( new java.lang.String [ 0 ] ) , org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeRemoveBricksVDSCommand.getParameters ( ) . getReplicaCount ( ) ) ; org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeRemoveBricksVDSCommand.ProceedProxyReturnValue ( ) ; }
Source:
protected boolean canDoAction ( ) { if ( ! ( super . canDoAction ( ) ) ) { return false ; } upServer = getUpServer ( ) ; if ( ( upServer ) == null ) { addCanDoActionMessage ( VdcBllMessages.ACTION_TYPE_FAILED_NO_UP_SERVER_FOUND ) ; return false ; } return true ; }

Target:
protected boolean canDoAction ( ) { if ( ! ( super . canDoAction ( ) ) ) { return false ; } upServer = getUpServer ( ) ; if ( ( upServer ) == null ) { addCanDoActionMessage ( java.lang.String.format ( "$clusterName %1$s" , org.ovirt.engine.core.bll.gluster.GlusterCommandBase.getVdsGroup ( ) . getname ( ) ) ) ; addCanDoActionMessage ( VdcBllMessages.ACTION_TYPE_FAILED_NO_UP_SERVER_FOUND ) ; return false ; } return true ; }
Source:
private static org.ovirt.engine.core.common.businessentities.StoragePool createNewStoragePool ( ) { org.ovirt.engine.core.common.businessentities.StoragePool pool = org.ovirt.engine.core.bll.storage.UpdateStoragePoolCommandTest.createBasicPool ( ) ; pool.setIsLocal ( false ) ; pool.setcompatibility_version ( org.ovirt.engine.core.bll.storage.UpdateStoragePoolCommandTest.VERSION_1_1 ) ; return pool ; }

Target:
private void addNonDefaultClusterToPool ( ) { org.ovirt.engine.core.common.businessentities.VDSGroup defaultCluster = new org.ovirt.engine.core.common.businessentities.VDSGroup ( ) ; defaultCluster.setCompatibilityVersion ( org.ovirt.engine.core.bll.storage.UpdateStoragePoolCommandTest.VERSION_1_1 ) ; defaultCluster.setId ( org.ovirt.engine.core.bll.storage.UpdateStoragePoolCommandTest.NON_DEFAULT_VDS_GROUP_ID ) ; java.util.List < org.ovirt.engine.core.common.businessentities.VDSGroup > clusters = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ( ) ; clusters.add ( defaultCluster ) ; org.mockito.Mockito.when ( vdsGroupDao.getAllForStoragePool ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( clusters ) ; }
Source:
protected void setUpQueryExpectations ( java.lang.String query , java.lang.Object failure ) throws java.lang.Exception { assert query.equals ( "" ) ; setUpEntityQueryExpectations ( VdcQueryType.GetVdsInterfacesByVdsId , org.ovirt.engine.core.common.queries.GetVdsByVdsIdParameters.class , new java.lang.String [ ] { "VdsId" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendHostNicsResourceTest.PARENT_GUID } , org.ovirt.engine.api.restapi.resource.BackendHostNicsResourceTest.setUpInterfaces ( ) , failure ) ; control.replay ( ) ; }

Target:
protected void setUpQueryExpectations ( java.lang.String query , java.lang.Object failure ) throws java.lang.Exception { assert query.equals ( "" ) ; setUpEntityQueryExpectations ( VdcQueryType.GetVdsInterfacesByVdsId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendHostNicsResourceTest.PARENT_GUID } , org.ovirt.engine.api.restapi.resource.BackendHostNicsResourceTest.setUpInterfaces ( ) , failure ) ; control.replay ( ) ; }
Source:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.templates.VmBaseListModel vmListModel = ( ( org.ovirt.engine.ui.uicommonweb.models.templates.VmBaseListModel ) ( target ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > storageDomains = ( ( java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > ) ( returnValue ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > filteredStorageDomains = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ( ) ; for ( org.ovirt.engine.core.common.businessentities.StorageDomain a : storageDomains ) { if ( ( a.getStorageDomainType ( ) ) == ( org.ovirt.engine.core.common.businessentities.StorageDomainType.ImportExport ) ) { filteredStorageDomains.add ( a ) ; } } vmListModel.PostExportGetStorageDomainList ( filteredStorageDomains ) ; }

Target:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.templates.VmBaseListModel vmListModel = ( ( org.ovirt.engine.ui.uicommonweb.models.templates.VmBaseListModel ) ( target ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > storageDomains = ( ( java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > ) ( returnValue ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > filteredStorageDomains = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ( ) ; for ( org.ovirt.engine.core.common.businessentities.StorageDomain a : storageDomains ) { if ( ( a.getStorageDomainType ( ) ) == ( org.ovirt.engine.core.common.businessentities.StorageDomainType.ImportExport ) ) { filteredStorageDomains.add ( a ) ; } } vmListModel.postExportGetStorageDomainList ( filteredStorageDomains ) ; }