auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void getNextAvailableDiskAliasNameByVMId ( 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 ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetNextAvailableDiskAliasNameByVMId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) , aQuery ) ; }

Target:
private void getVlanParentInterface ( org.ovirt.engine.core.compat.Guid vdsID , org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface , 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 ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVlanParent , new org.ovirt.engine.core.common.queries.InterfaceAndIdQueryParameters ( vdsID , iface ) , aQuery ) ; }
Source:
public void testNotRemovingLabeledNetworksNicHasLabelOldAttachRemovedNewAttachWithSameNetworkAddedToNicValid ( ) { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nicWithLabel = createNic ( "nicWithLabel" ) ; nicWithLabel.setLabels ( java.util.Collections.singleton ( "lbl1" ) ) ; org.ovirt.engine.core.common.businessentities.network.Network network = createNetworkWithNameAndLabel ( "net" , "lbl1" ) ; org.ovirt.engine.core.common.businessentities.network.NetworkAttachment removedAttachment = createNetworkAttachment ( network , nicWithLabel ) ; org.ovirt.engine.core.common.businessentities.network.NetworkAttachment addedAttachment = new org.ovirt.engine.core.common.businessentities.network.NetworkAttachment ( removedAttachment ) ; addedAttachment.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; assertTestNotRemovingLabeledNetworksValid ( nicWithLabel , removedAttachment , new org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidatorTest.ParametersBuilder ( ) . addNetworkAttachments ( addedAttachment ) . build ( ) , network ) ; }

Target:
public void testValidateModifiedBondSlavesWhenSlaveIsNotValid ( ) throws java.lang.Exception { org.ovirt.engine.core.common.action.CreateOrUpdateBond createOrUpdateBond = createNewCreateOrUpdateBond ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , "bond1" , "slaveA" , "slaveB" ) ; org.ovirt.engine.core.bll.ValidationResult cannotBeSlaveValidationResult = new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.NETWORK_INTERFACE_BOND_OR_VLAN_CANNOT_BE_SLAVE , org.ovirt.engine.core.utils.ReplacementUtils.createSetVariableString ( HostInterfaceValidator.VAR_NIC_NAME , createOrUpdateBond.getName ( ) ) ) ; org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidator validator = new org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidatorTest.HostSetupNetworksValidatorBuilder ( ) . setParams ( new org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidatorTest.ParametersBuilder ( ) . addBonds ( createOrUpdateBond ) ) . build ( ) ; doTestValidateModifiedBondSlaves ( org.mockito.Mockito.spy ( validator ) , ValidationResult.VALID , cannotBeSlaveValidationResult , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( cannotBeSlaveValidationResult ) ) ; }
Source:
protected void executeCommand ( ) { org.ovirt.engine.core.common.vdscommands.VDSReturnValue returnValue = runVdsCommand ( VDSCommandType.StopGlusterVolume , new org.ovirt.engine.core.common.vdscommands.gluster.GlusterVolumeActionVDSParameters ( upServer.getId ( ) , getGlusterVolumeName ( ) , getParameters ( ) . isForceAction ( ) ) ) ; setSucceeded ( returnValue.getSucceeded ( ) ) ; if ( getSucceeded ( ) ) { org.ovirt.engine.core.dao.gluster.GlusterDBUtils.getInstance ( ) . updateVolumeStatus ( getParameters ( ) . getVolumeId ( ) , GlusterStatus.DOWN ) ; } else { handleVdsError ( AuditLogType.GLUSTER_VOLUME_STOP_FAILED , returnValue.getVdsError ( ) . getMessage ( ) ) ; return ; } }

Target:
protected void executeCommand ( ) { org.ovirt.engine.core.common.vdscommands.VDSReturnValue returnValue = runVdsCommand ( VDSCommandType.StopGlusterVolume , new org.ovirt.engine.core.common.vdscommands.gluster.GlusterVolumeActionVDSParameters ( upServer.getId ( ) , getGlusterVolumeName ( ) , getParameters ( ) . isForceAction ( ) ) ) ; setSucceeded ( returnValue.getSucceeded ( ) ) ; if ( getSucceeded ( ) ) { glusterDBUtils.updateVolumeStatus ( getParameters ( ) . getVolumeId ( ) , GlusterStatus.DOWN ) ; } else { handleVdsError ( AuditLogType.GLUSTER_VOLUME_STOP_FAILED , returnValue.getVdsError ( ) . getMessage ( ) ) ; return ; } }
Source:
protected void executeIrsBrokerCommand ( ) { org.ovirt.engine.core.common.vdscommands.VDSReturnValue returnValue = resourceManager.runVdsCommand ( VDSCommandType.HSMRevertTask , new org.ovirt.engine.core.common.vdscommands.HSMTaskGuidBaseVDSCommandParameters ( org.ovirt.engine.core.vdsbroker.irsbroker.SPMRevertTaskVDSCommand.getCurrentIrsProxyData ( ) . getCurrentVdsId ( ) , org.ovirt.engine.core.vdsbroker.irsbroker.SPMRevertTaskVDSCommand.getParameters ( ) . getTaskId ( ) ) ) ; if ( ( returnValue != null ) && ( ! ( returnValue.getSucceeded ( ) ) ) ) { org.ovirt.engine.core.vdsbroker.irsbroker.SPMRevertTaskVDSCommand.getVDSReturnValue ( ) . setVdsError ( returnValue.getVdsError ( ) ) ; org.ovirt.engine.core.vdsbroker.irsbroker.SPMRevertTaskVDSCommand.getVDSReturnValue ( ) . setSucceeded ( false ) ; } }

Target:
protected void executeIrsBrokerCommand ( ) { org.ovirt.engine.core.common.vdscommands.VDSReturnValue returnValue = resourceManager.runVdsCommand ( VDSCommandType.HSMRevertTask , new org.ovirt.engine.core.common.vdscommands.HSMTaskGuidBaseVDSCommandParameters ( org.ovirt.engine.core.vdsbroker.irsbroker.SPMRevertTaskVDSCommand.getCurrentIrsProxy ( ) . getCurrentVdsId ( ) , org.ovirt.engine.core.vdsbroker.irsbroker.SPMRevertTaskVDSCommand.getParameters ( ) . getTaskId ( ) ) ) ; if ( ( returnValue != null ) && ( ! ( returnValue.getSucceeded ( ) ) ) ) { org.ovirt.engine.core.vdsbroker.irsbroker.SPMRevertTaskVDSCommand.getVDSReturnValue ( ) . setVdsError ( returnValue.getVdsError ( ) ) ; org.ovirt.engine.core.vdsbroker.irsbroker.SPMRevertTaskVDSCommand.getVDSReturnValue ( ) . setSucceeded ( false ) ; } }
Source:
public void qosBaloonNotSupported ( ) { org.mockito.Mockito.when ( cluster.getCompatibilityVersion ( ) ) . thenReturn ( org.mockito.Mockito.mock ( org.ovirt.engine.core.compat.Version.class ) ) ; org.mockito.Mockito.when ( cluster.isEnableBallooning ( ) ) . thenReturn ( true ) ; validator = new org.ovirt.engine.core.bll.validator.ClusterValidator ( dbFacade , cluster ) ; org.junit.Assert.assertThat ( validator.qosBaloonSupported ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.QOS_BALLOON_NOT_SUPPORTED ) ) ; }

Target:
public void qosBaloonNotSupported ( ) { org.mockito.Mockito.when ( cluster.getCompatibilityVersion ( ) ) . thenReturn ( org.mockito.Mockito.mock ( org.ovirt.engine.core.compat.Version.class ) ) ; org.mockito.Mockito.when ( cluster.isEnableBallooning ( ) ) . thenReturn ( true ) ; validator = new org.ovirt.engine.core.bll.validator.ClusterValidator ( dbFacade , cluster , cpuFlagsManagerHandler ) ; org.junit.Assert.assertThat ( validator.qosBaloonSupported ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.QOS_BALLOON_NOT_SUPPORTED ) ) ; }
Source:
public void canDoActionFailedVirtIODisk ( ) throws java.lang.Exception { mockVmStatusUp ( ) ; org.mockito.Mockito.when ( osRepository.hasSpiceSupport ( 0 , Version.v3_1 ) ) . thenReturn ( true ) ; org.mockito.Mockito.when ( osRepository.getOsName ( 0 ) ) . thenReturn ( "RHEL6" ) ; createNotVirtIODisk ( ) ; org.junit.Assert.assertFalse ( command.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( command.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( VdcBllMessages.HOT_PLUG_DISK_IS_NOT_VIRTIO.toString ( ) ) ) ; }

Target:
private void mockSpiceSupportMatrix ( ) { java.util.Map < java.lang.Integer , java.util.Map < org.ovirt.engine.core.compat.Version , java.lang.Boolean > > supportMatrix = new java.util.HashMap < > ( ) ; java.util.HashMap < org.ovirt.engine.core.compat.Version , java.lang.Boolean > chunk = new java.util.HashMap < > ( ) ; chunk.put ( Version.v3_1 , true ) ; supportMatrix.put ( 0 , chunk ) ; org.mockito.Mockito.when ( osRepository.getSpiceSupportMatrix ( ) ) . thenReturn ( supportMatrix ) ; }
Source:
public static org.ovirt.engine.core.common.businessentities.VolumeFormat GetDiskVolumeFormat ( org.ovirt.engine.core.common.businessentities.VolumeType volumeType , org.ovirt.engine.core.common.businessentities.StorageType storageType ) { switch ( storageType ) { case NFS : case LOCALFS : case POSIXFS : case GLUSTERFS : return org.ovirt.engine.core.common.businessentities.VolumeFormat.RAW ; case ISCSI : case FCP : switch ( volumeType ) { case Sparse : return org.ovirt.engine.core.common.businessentities.VolumeFormat.COW ; case Preallocated : return org.ovirt.engine.core.common.businessentities.VolumeFormat.RAW ; default : return org.ovirt.engine.core.common.businessentities.VolumeFormat.Unassigned ; } default : return org.ovirt.engine.core.common.businessentities.VolumeFormat.Unassigned ; } }

Target:
public static org.ovirt.engine.core.common.businessentities.VolumeFormat GetDiskVolumeFormat ( org.ovirt.engine.core.common.businessentities.VolumeType volumeType , org.ovirt.engine.core.common.businessentities.StorageType storageType ) { if ( storageType.isFileDomain ( ) ) { return org.ovirt.engine.core.common.businessentities.VolumeFormat.RAW ; } else if ( storageType.isBlockDomain ( ) ) { switch ( volumeType ) { case Sparse : return org.ovirt.engine.core.common.businessentities.VolumeFormat.COW ; case Preallocated : return org.ovirt.engine.core.common.businessentities.VolumeFormat.RAW ; default : return org.ovirt.engine.core.common.businessentities.VolumeFormat.Unassigned ; } } else { return org.ovirt.engine.core.common.businessentities.VolumeFormat.Unassigned ; } }
Source:
public void canDoActionFailsOnNullCluster ( ) { cmd = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.gluster.EnableGlusterHookCommand ( new org.ovirt.engine.core.common.action.gluster.GlusterHookParameters ( null , HOOK_ID ) ) ) ; setupMocks ( cmd ) ; org.junit.Assert.assertFalse ( cmd.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( cmd.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( VdcBllMessages.ACTION_TYPE_FAILED_CLUSTER_IS_NOT_VALID.toString ( ) ) ) ; }

Target:
public void canDoActionFailsOnNoHook ( ) { cmd = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.gluster.EnableGlusterHookCommand < org.ovirt.engine.core.common.action.gluster.GlusterHookParameters > ( new org.ovirt.engine.core.common.action.gluster.GlusterHookParameters ( HOOK_ID ) ) ) ; setupMocks ( cmd , false ) ; org.junit.Assert.assertFalse ( cmd.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( cmd.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( VdcBllMessages.ACTION_TYPE_FAILED_GLUSTER_HOOK_DOES_NOT_EXIST.toString ( ) ) ) ; }
Source:
private boolean CanFindAnyVds ( java.util.List < java.lang.String > messages , boolean isMigrate ) { return CanFindVdsToRun ( messages , isMigrate , getVdsDAO ( ) . getVdsToRun ( new org.ovirt.engine.core.common.businessentities.VDSType [ ] { org.ovirt.engine.core.common.businessentities.VDSType.VDS , org.ovirt.engine.core.common.businessentities.VDSType.oVirtNode } , getVm ( ) . getvds_group_id ( ) , VDSStatus.Up , getVm ( ) . getnum_of_cpus ( ) ) ) ; }

Target:
private boolean CanFindAnyVds ( java.util.List < java.lang.String > messages , boolean isMigrate ) { return CanFindVdsToRun ( messages , isMigrate , org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVdsDAO ( ) . getAllOfTypes ( new org.ovirt.engine.core.common.businessentities.VDSType [ ] { org.ovirt.engine.core.common.businessentities.VDSType.VDS , org.ovirt.engine.core.common.businessentities.VDSType.oVirtNode } ) ) ; }
Source:
public static void getClusterById ( 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 ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVdsGroupById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }

Target:
public static void getSpiceUsbAutoShare ( 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 ( ) : true ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.SpiceUsbAutoShare , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
public org.ovirt.engine.core.common.businessentities.RepoFileMetaData mapRow ( java.sql.ResultSet rs , int rowNum ) throws java.sql.SQLException { org.ovirt.engine.core.common.businessentities.RepoFileMetaData entity = new org.ovirt.engine.core.common.businessentities.RepoFileMetaData ( ) ; entity.setRepoDomainId ( org.ovirt.engine.core.compat.Guid.createGuidFromString ( rs.getString ( "storage_domain_id" ) ) ) ; entity.setLastRefreshed ( rs.getLong ( "last_refreshed" ) ) ; entity.setFileType ( org.ovirt.engine.core.common.businessentities.ImageFileType.forValue ( rs.getInt ( "file_type" ) ) ) ; return entity ; }

Target:
public org.ovirt.engine.core.common.businessentities.RepoImage mapRow ( java.sql.ResultSet rs , int rowNum ) throws java.sql.SQLException { org.ovirt.engine.core.common.businessentities.RepoImage entity = new org.ovirt.engine.core.common.businessentities.RepoImage ( ) ; entity.setRepoDomainId ( org.ovirt.engine.core.compat.Guid.createGuidFromStringDefaultEmpty ( rs.getString ( "storage_domain_id" ) ) ) ; entity.setLastRefreshed ( rs.getLong ( "last_refreshed" ) ) ; entity.setFileType ( org.ovirt.engine.core.common.businessentities.ImageFileType.forValue ( rs.getInt ( "file_type" ) ) ) ; return entity ; }
Source:
public void updateDefaultDisplayForVmTag ( org.ovirt.engine.core.common.businessentities.tags_vm_map tagsVmMap ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) . addValue ( "tag_id" , tagsVmMap.gettag_id ( ) ) . addValue ( "vm_id" , tagsVmMap.getvm_id ( ) ) . addValue ( "DefaultDisplayType" , tagsVmMap.getDefaultDisplayType ( ) ) ; getCallsHandler ( ) . executeModification ( "UpdateVmTagsDefaultDisplayType" , parameterSource ) ; }

Target:
public void updateDefaultDisplayForVmTag ( org.ovirt.engine.core.common.businessentities.TagsVmMap tagsVmMap ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) . addValue ( "tag_id" , tagsVmMap.gettag_id ( ) ) . addValue ( "vm_id" , tagsVmMap.getvm_id ( ) ) . addValue ( "DefaultDisplayType" , tagsVmMap.getDefaultDisplayType ( ) ) ; getCallsHandler ( ) . executeModification ( "UpdateVmTagsDefaultDisplayType" , parameterSource ) ; }
Source:
public void testSwitchStorageDomainType ( ) { org.mockito.Mockito.when ( command.getStorageDomainStaticDao ( ) . get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( null ) ; org.ovirt.engine.core.common.businessentities.StorageDomainStatic sdStatic = command.getStorageDomain ( ) . getStorageStaticData ( ) ; org.mockito.Mockito.doReturn ( new org.ovirt.engine.core.common.utils.Pair ( sdStatic , sdStatic.getId ( ) ) ) . when ( command ) . executeHSMGetStorageDomainInfo ( org.mockito.Matchers.any ( org.ovirt.engine.core.common.vdscommands.HSMGetStorageDomainInfoVDSCommandParameters.class ) ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionSuccess ( command ) ; }

Target:
public void testSwitchStorageDomainType ( ) { org.mockito.Mockito.when ( command.getStorageDomainStaticDao ( ) . get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( null ) ; org.ovirt.engine.core.common.businessentities.StorageDomainStatic sdStatic = command.getStorageDomain ( ) . getStorageStaticData ( ) ; org.mockito.Mockito.doReturn ( new org.ovirt.engine.core.common.utils.Pair ( sdStatic , sdStatic.getId ( ) ) ) . when ( command ) . executeHSMGetStorageDomainInfo ( org.mockito.Matchers.any ( org.ovirt.engine.core.common.vdscommands.HSMGetStorageDomainInfoVDSCommandParameters.class ) ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateSuccess ( command ) ; }
Source:
public void cpuTypeSupportsVirtServiceForVirtCluster ( ) { org.mockito.Mockito.when ( cluster.supportsVirtService ( ) ) . thenReturn ( true ) ; validator = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.validator.ClusterValidator ( dbFacade , cluster ) ) ; org.mockito.Mockito.doReturn ( true ) . when ( validator ) . cpuExists ( ) ; org.junit.Assert.assertThat ( validator.cpuTypeSupportsVirtService ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }

Target:
public void cpuTypeSupportsVirtServiceForVirtCluster ( ) { org.mockito.Mockito.when ( cluster.supportsVirtService ( ) ) . thenReturn ( true ) ; validator = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.validator.ClusterValidator ( dbFacade , cluster , cpuFlagsManagerHandler ) ) ; org.mockito.Mockito.doReturn ( true ) . when ( validator ) . cpuExists ( ) ; org.junit.Assert.assertThat ( validator.cpuTypeSupportsVirtService ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }
Source:
protected boolean canDoAction ( ) { if ( ! ( super . canDoAction ( ) ) ) { return false ; } org.ovirt.engine.core.bll.validator.gluster.GlusterBrickValidator brickValidator = new org.ovirt.engine.core.bll.validator.gluster.GlusterBrickValidator ( ) ; return validate ( brickValidator.validateBricks ( getParameters ( ) . getBricks ( ) , getGlusterVolume ( ) , getParameters ( ) . getReplicaCount ( ) ) ) ; }

Target:
protected boolean canDoAction ( ) { if ( ! ( super . canDoAction ( ) ) ) { return false ; } org.ovirt.engine.core.bll.validator.gluster.GlusterBrickValidator brickValidator = new org.ovirt.engine.core.bll.validator.gluster.GlusterBrickValidator ( ) ; return validate ( brickValidator.canRemoveBrick ( getParameters ( ) . getBricks ( ) , getGlusterVolume ( ) , getParameters ( ) . getReplicaCount ( ) , false ) ) ; }
Source:
public static void GetNextAvailableDiskAliasNameByVMId ( 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 ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetNextAvailableDiskAliasNameByVMId , new org.ovirt.engine.core.common.queries.GetAllDisksByVmIdParameters ( vmId ) , aQuery ) ; }

Target:
public static void GetVmList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String poolName ) { 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 ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VM > vms = org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.VM > Cast ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.IVdcQueryable > ) ( source ) ) ) ; return vms ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( ( "Vms: pool=" + poolName ) , org.ovirt.engine.core.common.interfaces.SearchType.VM ) , aQuery ) ; }
Source:
public void testAddIncompleteParameters_2 ( ) throws java.lang.Exception { org.ovirt.engine.api.model.Disk model = getModel ( 0 ) ; model.setProvisionedSize ( null ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; control.replay ( ) ; try { collection.add ( model ) ; fail ( "expected WebApplicationException on incomplete parameters" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyIncompleteException ( wae , "Disk" , "testAddIncompleteParameters_2" , "provisionedSize|size" ) ; } }

Target:
public void testAddIncompleteParameters_2 ( ) throws java.lang.Exception { org.ovirt.engine.api.model.Disk model = org.ovirt.engine.api.restapi.resource.BackendVmDisksResourceTest.getModel ( 0 ) ; model.setProvisionedSize ( null ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; control.replay ( ) ; try { collection.add ( model ) ; fail ( "expected WebApplicationException on incomplete parameters" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyIncompleteException ( wae , "Disk" , "testAddIncompleteParameters_2" , "provisionedSize|size" ) ; } }
Source:
private void initInterface ( org.ovirt.engine.core.common.businessentities.network.VmNic iface ) { if ( ( iface.getId ( ) ) == null ) { iface.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; } fillMacAddressIfMissing ( iface ) ; iface.setVmTemplateId ( null ) ; iface.setVmId ( getVmId ( ) ) ; }

Target:
protected void removeVmNetworkInterfaces ( ) { new org.ovirt.engine.core.bll.network.VmInterfaceManager ( org.ovirt.engine.core.bll.ImportVmCommand.getMacPool ( ) ) . removeAll ( getVmId ( ) ) ; }
Source:
protected boolean isSlave ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface , java.lang.String masterName ) { return ( ( iface.getBondName ( ) ) != null ) && ( iface.getBondName ( ) . equals ( masterName ) ) ; }

Target:
public org.ovirt.engine.api.model.HostNic addParents ( org.ovirt.engine.api.model.HostNic hostNic ) { final org.ovirt.engine.api.model.HostNic nic = super . addParents ( hostNic ) ; final org.ovirt.engine.api.model.Host host = new org.ovirt.engine.api.model.Host ( ) ; host.setId ( hostId ) ; nic.setHost ( host ) ; if ( ( nic.getPhysicalFunction ( ) ) != null ) { nic.getPhysicalFunction ( ) . setHost ( host ) ; } return nic ; }
Source:
public void testAddLunDisk_MissingType ( ) { org.ovirt.engine.api.model.Disk model = createIscsiLunDisk ( ) ; model.getLunStorage ( ) . setType ( null ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; control.replay ( ) ; try { collection.add ( model ) ; fail ( "expected WebApplicationException on incomplete parameters" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyIncompleteException ( wae , "HostStorage" , "testAddLunDisk_MissingType" , "type" ) ; } }

Target:
public void testAddLunDiskMissingType ( ) { org.ovirt.engine.api.model.Disk model = createIscsiLunDisk ( ) ; model.getLunStorage ( ) . setType ( null ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; control.replay ( ) ; try { collection.add ( model ) ; fail ( "expected WebApplicationException on incomplete parameters" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyIncompleteException ( wae , "HostStorage" , "testAddLunDiskMissingType" , "type" ) ; } }
Source:
public java.lang.Boolean call ( ) { try { com.woorea.openstack.cinder.model.Snapshot snapshot = proxy.getSnapshotById ( id.toString ( ) ) ; return snapshot != null ; } catch ( com.woorea.openstack.base.client.OpenStackResponseException ex ) { if ( ( ex.getStatus ( ) ) == ( org.apache.commons.httpclient.HttpStatus.SC_NOT_FOUND ) ) { org.ovirt.engine.core.bll.storage.disk.cinder.CinderBroker.log.info ( "Snapshot does not exists" ) ; return false ; } else { org.ovirt.engine.core.bll.storage.disk.cinder.CinderBroker.log.error ( "An error has occurred while looking for snapshot." ) ; throw ex ; } } }

Target:
public boolean isSnapshotExist ( final org.ovirt.engine.core.compat.Guid id ) { return execute ( ( ) -> { try { com.woorea.openstack.cinder.model.Snapshot snapshot = proxy.getSnapshotById ( id.toString ( ) ) ; return snapshot != null ; } catch ( com.woorea.openstack.base.client.OpenStackResponseException ex ) { if ( ( ex.getStatus ( ) ) == ( org.apache.commons.httpclient.HttpStatus.SC_NOT_FOUND ) ) { org.ovirt.engine.core.bll.storage.disk.cinder.CinderBroker.log.info ( "Snapshot does not exists" ) ; return false ; } else { org.ovirt.engine.core.bll.storage.disk.cinder.CinderBroker.log.error ( "An error has occurred while looking for snapshot." ) ; throw ex ; } } } ) ; }
Source:
public void testValues ( ) { java.util.List < java.lang.String > comps = java.util.Arrays.asList ( comp.getCompletion ( "L" ) ) ; org.junit.Assert.assertTrue ( "luke" , comps.contains ( "luke" ) ) ; org.junit.Assert.assertTrue ( "leia" , comps.contains ( "leia" ) ) ; org.junit.Assert.assertEquals ( 0 , comp.getCompletion ( "Z" ) . length ) ; }

Target:
public void testValues ( ) { java.util.List < java.lang.String > comps = java.util.Arrays.asList ( comp.getCompletion ( "L" ) ) ; org.junit.jupiter.api.Assertions.assertTrue ( comps.contains ( "luke" ) , "luke" ) ; org.junit.jupiter.api.Assertions.assertTrue ( comps.contains ( "leia" ) , "leia" ) ; org.junit.jupiter.api.Assertions.assertEquals ( 0 , comp.getCompletion ( "Z" ) . length ) ; }
Source:
public void initialize ( ) { commonInitialize ( ) ; if ( ( getVm ( ) ) != null ) { updateBootableDiskAvailable ( ) ; } }

Target:
protected boolean isEditEnabled ( ) { return ( ( ( ( getIsFloating ( ) ) || ( getIsNew ( ) ) ) || ( getVm ( ) . isDown ( ) ) ) || ( ! ( getDisk ( ) . getPlugged ( ) ) ) ) && ( getIsChangable ( ) ) ; }
Source:
private java.lang.String getTranslatedStorageError ( java.lang.String errorCode ) { java.lang.String translatedError = errorCode ; org.ovirt.engine.core.common.errors.VdcBllErrors error = org.ovirt.engine.core.common.errors.VdcBllErrors.forValue ( java.lang.Integer.parseInt ( errorCode ) ) ; if ( error != null ) { translatedError = org.ovirt.engine.core.bll.Backend.getInstance ( ) . getVdsErrorsTranslator ( ) . TranslateErrorTextSingle ( error.toString ( ) ) ; } return translatedError ; }

Target:
private java.lang.String getTranslatedStorageError ( java.lang.String errorCode ) { java.lang.String translatedError = errorCode ; org.ovirt.engine.core.common.errors.EngineError error = org.ovirt.engine.core.common.errors.EngineError.forValue ( java.lang.Integer.parseInt ( errorCode ) ) ; if ( error != null ) { translatedError = org.ovirt.engine.core.bll.Backend.getInstance ( ) . getVdsErrorsTranslator ( ) . TranslateErrorTextSingle ( error.toString ( ) ) ; } return translatedError ; }
Source:
public void canDoActionPreallocatedSpaceCheckSucceeds ( ) { final int availableSize = 12 ; final int usedSize = 8 ; org.ovirt.engine.core.compat.Guid sdid = org.ovirt.engine.core.compat.Guid.NewGuid ( ) ; initializeCommand ( sdid , VolumeType.Preallocated ) ; mockVm ( ) ; mockStorageDomain ( sdid , availableSize , usedSize ) ; mockStoragePoolIsoMap ( ) ; org.junit.Assert.assertTrue ( command.canDoAction ( ) ) ; }

Target:
public void canDoActionPreallocatedSpaceCheckSucceeds ( ) { final int availableSize = 12 ; final int usedSize = 8 ; org.ovirt.engine.core.compat.Guid sdid = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; initializeCommand ( sdid , VolumeType.Preallocated ) ; mockVm ( ) ; mockStorageDomain ( sdid , availableSize , usedSize ) ; mockStoragePoolIsoMap ( ) ; org.junit.Assert.assertTrue ( command.canDoAction ( ) ) ; }
Source:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event < ? extends org.ovirt.engine.ui.uicompat.EventArgs > ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { updateFencingPolicyContent ( ( ( getVersion ( ) ) == null ? null : getVersion ( ) . getSelectedItem ( ) ) ) ; }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event < ? extends org.ovirt.engine.ui.uicompat.EventArgs > ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { if ( ( ( getIsImportGlusterConfiguration ( ) . getEntity ( ) ) != null ) && ( getIsImportGlusterConfiguration ( ) . getEntity ( ) ) ) { getGlusterHostAddress ( ) . setIsChangeable ( true ) ; getGlusterHostPassword ( ) . setIsChangeable ( true ) ; } else { getGlusterHostAddress ( ) . setIsChangeable ( false ) ; getGlusterHostPassword ( ) . setIsChangeable ( false ) ; } }
Source:
protected boolean validate ( ) { boolean returnValue = true ; if ( ( ( org.ovirt.engine.core.bll.RemoveTagCommand.getTagId ( ) ) == null ) || ( ( org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getTagDao ( ) . get ( org.ovirt.engine.core.bll.RemoveTagCommand.getTagId ( ) ) ) == null ) ) { addValidationMessage ( EngineMessage.TAGS_CANNOT_REMOVE_TAG_NOT_EXIST ) ; returnValue = false ; } return returnValue ; }

Target:
protected boolean validate ( ) { boolean returnValue = true ; if ( ( ( org.ovirt.engine.core.bll.RemoveTagCommand.getTagId ( ) ) == null ) || ( ( tagDao.get ( org.ovirt.engine.core.bll.RemoveTagCommand.getTagId ( ) ) ) == null ) ) { addValidationMessage ( EngineMessage.TAGS_CANNOT_REMOVE_TAG_NOT_EXIST ) ; returnValue = false ; } return returnValue ; }
Source:
public javax.ws.rs.core.Response get ( ) { return adaptRemove ( getDelegate ( ) :: get ) ; }

Target:
public javax.ws.rs.core.Response get ( ) { if ( org.ovirt.engine.api.common.util.QueryHelper.hasConstraint ( ui , "rsdl" ) ) { try { org.ovirt.engine.api.v3.types.V3RSDL rsdl = getRSDL ( ) ; return javax.ws.rs.core.Response.ok ( ) . entity ( rsdl ) . build ( ) ; } catch ( java.lang.Exception exception ) { throw new javax.ws.rs.WebApplicationException ( exception , javax.ws.rs.core.Response.status ( Response.Status.INTERNAL_SERVER_ERROR ) . build ( ) ) ; } } return adaptResponse ( getDelegate ( ) :: get ) ; }
Source:
public void getTemplateById ( 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 ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmTemplate , new org.ovirt.engine.core.common.queries.GetVmTemplateParameters ( templateId ) , aQuery ) ; }

Target:
public void getDataCenterById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStoragePoolById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) . withoutRefresh ( ) , aQuery ) ; }
Source:
private org.ovirt.engine.core.common.action.VdcReturnValueBase restoreCinderDisk ( org.ovirt.engine.core.common.businessentities.storage.CinderDisk cinderDisk , org.ovirt.engine.core.common.action.ImagesContainterParametersBase params ) { java.util.concurrent.Future < org.ovirt.engine.core.common.action.VdcReturnValueBase > future = org.ovirt.engine.core.bll.tasks.CommandCoordinatorUtil.executeAsyncCommand ( VdcActionType.RestoreFromCinderSnapshot , params , org.ovirt.engine.core.bll.storage.disk.cinder.RestoreAllCinderSnapshotsCommand.cloneContextAndDetachFromParent ( ) ) ; try { return future.get ( ) ; } catch ( java.lang.InterruptedException | java.util.concurrent.ExecutionException e ) { log.error ( "Error restoring snapshot" , e ) ; } return null ; }

Target:
private org.ovirt.engine.core.common.action.ActionReturnValue restoreCinderDisk ( org.ovirt.engine.core.common.businessentities.storage.CinderDisk cinderDisk , org.ovirt.engine.core.common.action.ImagesContainterParametersBase params ) { java.util.concurrent.Future < org.ovirt.engine.core.common.action.ActionReturnValue > future = commandCoordinatorUtil.executeAsyncCommand ( ActionType.RestoreFromCinderSnapshot , params , org.ovirt.engine.core.bll.storage.disk.cinder.RestoreAllCinderSnapshotsCommand.cloneContextAndDetachFromParent ( ) ) ; try { return future.get ( ) ; } catch ( java.lang.InterruptedException | java.util.concurrent.ExecutionException e ) { log.error ( "Error restoring snapshot" , e ) ; } return null ; }
Source:
public static void getDataCenterListByName ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String name ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return 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: name=" + name ) + " 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:
public static void GetClusterGlusterServices ( 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 ) { return source ; } } ; org.ovirt.engine.core.common.queries.gluster.GlusterVolumeAdvancedDetailsParameters parameters = new org.ovirt.engine.core.common.queries.gluster.GlusterVolumeAdvancedDetailsParameters ( clusterId , "" , "" , false ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetGlusterVolumeAdvancedDetails , parameters , aQuery ) ; }

Target:
public static void GetGlusterVolumeBrickDetails ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId , java.lang.String volume , java.lang.String brick ) { 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.gluster.GlusterVolumeAdvancedDetailsParameters parameters = new org.ovirt.engine.core.common.queries.gluster.GlusterVolumeAdvancedDetailsParameters ( clusterId , volume , brick , true ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetGlusterVolumeAdvancedDetails , parameters , aQuery ) ; }
Source:
protected void selectedItemPropertyChanged ( java.lang.Object sender , org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs e ) { super . selectedItemPropertyChanged ( sender , e ) ; if ( e.PropertyName.equals ( "status" ) ) { UpdateActionAvailability ( ) ; } else if ( e.PropertyName.equals ( "display_type" ) ) { updateConsoleModels ( ) ; } }

Target:
protected void onSelectedItemChanged ( ) { super . onSelectedItemChanged ( ) ; updateConsoleModels ( ) ; updateActionAvailability ( ) ; }
Source:
private void AttachIso_EntityChanged ( ) { getIsoImage ( ) . setIsChangable ( ( ( java.lang.Boolean ) ( getAttachIso ( ) . getEntity ( ) ) ) ) ; getBootSequence ( ) . getCdromOption ( ) . setIsChangable ( ( ( java.lang.Boolean ) ( getAttachIso ( ) . getEntity ( ) ) ) ) ; }

Target:
private void attachIso_EntityChanged ( ) { getIsoImage ( ) . setIsChangable ( ( ( java.lang.Boolean ) ( getAttachIso ( ) . getEntity ( ) ) ) ) ; getBootSequence ( ) . getCdromOption ( ) . setIsChangable ( ( ( java.lang.Boolean ) ( getAttachIso ( ) . getEntity ( ) ) ) ) ; updateInitialRunFields ( ) ; }
Source:
private void updateInfoPanel ( ) { org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface vmNetworkInterface = ( ( org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface ) ( getModel ( ) . getSelectedItem ( ) ) ) ; if ( ( vmNetworkInterface != null ) && ( ! ( getTable ( ) . getSelectionModel ( ) . isSelected ( vmNetworkInterface ) ) ) ) { getTable ( ) . getSelectionModel ( ) . setSelected ( vmNetworkInterface , true ) ; } vmInterfaceInfoPanel.updatePanel ( vmNetworkInterface ) ; }

Target:
public void execute ( ) { getTable ( ) . getSelectionModel ( ) . setSelected ( vmNetworkInterface , true ) ; }
Source:
public java.util.List < org.ovirt.engine.core.bll.quota.QuotaConsumptionParameter > getQuotaStorageConsumptionParameters ( ) { java.util.List < org.ovirt.engine.core.bll.quota.QuotaConsumptionParameter > list = new java.util.ArrayList < org.ovirt.engine.core.bll.quota.QuotaConsumptionParameter > ( ) ; for ( org.ovirt.engine.core.common.businessentities.DiskImage disk : diskInfoDestinationMap.values ( ) ) { list.add ( new org.ovirt.engine.core.bll.quota.QuotaStorageConsumptionParameter ( disk.getQuotaId ( ) , null , QuotaStorageConsumptionParameter.QuotaAction.CONSUME , disk.getStorageIds ( ) . get ( 0 ) , ( ( double ) ( disk.getSizeInGigabytes ( ) ) ) ) ) ; } return list ; }

Target:
public java.util.List < org.ovirt.engine.core.bll.quota.QuotaConsumptionParameter > getQuotaStorageConsumptionParameters ( ) { java.util.List < org.ovirt.engine.core.bll.quota.QuotaConsumptionParameter > list = new java.util.ArrayList < org.ovirt.engine.core.bll.quota.QuotaConsumptionParameter > ( ) ; for ( org.ovirt.engine.core.common.businessentities.DiskImage disk : org.ovirt.engine.core.bll.AddVmTemplateCommand.getVm ( ) . getDiskList ( ) ) { list.add ( new org.ovirt.engine.core.bll.quota.QuotaStorageConsumptionParameter ( getQuotaIdForDisk ( disk ) , null , QuotaStorageConsumptionParameter.QuotaAction.CONSUME , disk.getStorageIds ( ) . get ( 0 ) , ( ( double ) ( disk.getSizeInGigabytes ( ) ) ) ) ) ; } return list ; }
Source:
public void edit ( final org.ovirt.engine.ui.uicommonweb.models.vms.CloneVmModel object ) { driver.edit ( object ) ; }

Target:
public void edit ( final org.ovirt.engine.ui.uicommonweb.models.vms.CloneVmModel object ) { driver.edit ( object ) ; object.getPropertyChangedEvent ( ) . addListener ( new org.ovirt.engine.ui.uicompat.IEventListener ( ) { @ java.lang.Override public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { java.lang.String propName = ( ( org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ) ( args ) ) . propertyName ; if ( "Message" . equals ( propName ) ) { appendMessage ( object.getMessage ( ) ) ; } } } ) ; }
Source:
public void setId ( org.ovirt.engine.core.compat.Guid value ) { if ( ( ( ( id ) == null ) && ( value != null ) ) || ( ( ( id ) != null ) && ( ! ( id.equals ( value ) ) ) ) ) { id = value ; OnPropertyChanged ( new org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ( "Id" ) ) ; } }

Target:
public void setId ( org.ovirt.engine.core.compat.Guid value ) { if ( ( ( ( id ) == null ) && ( value != null ) ) || ( ( ( id ) != null ) && ( ! ( id.equals ( value ) ) ) ) ) { id = value ; onPropertyChanged ( new org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ( "Id" ) ) ; } }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.LUNListReturnForXmlRpc getDeviceList ( int storageType ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "Host.getDeviceList" ) . withParameter ( "storageType" , storageType ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) . withResponseType ( java.lang.Object [ ] . class ) . withResponseKey ( "devList" ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.LUNListReturnForXmlRpc ( response ) ; }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.VMNamesListReturnForXmlRpc getExternalVmNamesList ( java.lang.String uri , java.lang.String username , java.lang.String password ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "Host.getExternalVMNames" ) . withParameter ( "uri" , uri ) . withParameter ( "username" , username ) . withParameter ( "password" , password ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) . withResponseKey ( "vmNames" ) . withResponseType ( java.lang.Object [ ] . class ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.VMNamesListReturnForXmlRpc ( response ) ; }
Source:
public void testGetAllForStoragePoolOfStorageType ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage_domain_static > result = dao.getAllForStoragePoolOfStorageType ( StorageType.ISCSI , org.ovirt.engine.core.dao.StorageDomainStaticDAOTest.EXISTING_POOL_ID ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertFalse ( result.isEmpty ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.storage_domain_static domain : result ) { org.junit.Assert.assertEquals ( StorageType.ISCSI , domain.getstorage_type ( ) ) ; } }

Target:
public void testGetAllForStoragePoolOfStorageType ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomainStatic > result = dao.getAllForStoragePoolOfStorageType ( StorageType.ISCSI , org.ovirt.engine.core.dao.StorageDomainStaticDAOTest.EXISTING_POOL_ID ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertFalse ( result.isEmpty ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.StorageDomainStatic domain : result ) { org.junit.Assert.assertEquals ( StorageType.ISCSI , domain.getstorage_type ( ) ) ; } }
Source:
public java.lang.String toString ( ) { java.lang.StringBuilder builder = new java.lang.StringBuilder ( ) ; builder.append ( "[outAverageLinkshare=" ) . append ( renderQosParameter ( outAverageLinkshare ) ) . append ( ", outAverageUpperlimit=" ) . append ( renderQosParameter ( outAverageUpperlimit ) ) . append ( ", outAverageRealtime=" ) . append ( renderQosParameter ( outAverageRealtime ) ) . append ( "]" ) ; return builder.toString ( ) ; }

Target:
public java.lang.String toString ( ) { return org.ovirt.engine.core.common.utils.ToStringBuilder.forInstance ( this ) . append ( "outAverageLinkshare" , renderQosParameter ( outAverageLinkshare ) ) . append ( "outAverageUpperlimit" , renderQosParameter ( outAverageUpperlimit ) ) . append ( "outAverageRealtime" , renderQosParameter ( outAverageRealtime ) ) . build ( ) ; }
Source:
public javax.ws.rs.core.Response upgrade ( org.ovirt.engine.api.model.Action action ) { org.ovirt.engine.core.common.action.hostdeploy.UpgradeHostParameters params = new org.ovirt.engine.core.common.action.hostdeploy.UpgradeHostParameters ( guid ) ; if ( action.isSetImage ( ) ) { params.setoVirtIsoFile ( action.getImage ( ) ) ; } return doAction ( ActionType.UpgradeHost , params , action ) ; }

Target:
public javax.ws.rs.core.Response upgrade ( org.ovirt.engine.api.model.Action action ) { org.ovirt.engine.core.common.action.hostdeploy.UpgradeHostParameters params = new org.ovirt.engine.core.common.action.hostdeploy.UpgradeHostParameters ( guid ) ; if ( action.isSetImage ( ) ) { params.setoVirtIsoFile ( action.getImage ( ) ) ; } if ( action.isSetReboot ( ) ) { params.setReboot ( action.isReboot ( ) ) ; } return doAction ( ActionType.UpgradeHost , params , action ) ; }
Source:
protected boolean entityExists ( ) { org.ovirt.engine.core.compat.Guid entityId = org.ovirt.engine.core.bll.AbstractRngDeviceCommand.getParameters ( ) . getRngDevice ( ) . getVmId ( ) ; if ( org.ovirt.engine.core.bll.AbstractRngDeviceCommand.getParameters ( ) . isVm ( ) ) { return ( org.ovirt.engine.core.bll.AbstractRngDeviceCommand.getVmDAO ( ) . get ( entityId ) ) != null ; } else { return ( org.ovirt.engine.core.bll.AbstractRngDeviceCommand.getVmTemplateDAO ( ) . get ( entityId ) ) != null ; } }

Target:
protected boolean isRngSupportedByCluster ( ) { org.ovirt.engine.core.common.businessentities.VDSGroup cluster = org.ovirt.engine.core.bll.AbstractRngDeviceCommand.getVdsGroup ( ) ; org.ovirt.engine.core.common.businessentities.VmRngDevice.Source source = org.ovirt.engine.core.bll.AbstractRngDeviceCommand.getParameters ( ) . getRngDevice ( ) . getSource ( ) ; return ( ( cluster != null ) && ( isFeatureSupported ( cluster.getcompatibility_version ( ) ) ) ) && ( cluster.getRequiredRngSources ( ) . contains ( source ) ) ; }
Source:
public void testHostsRuleStructure ( ) throws java.lang.Exception { org.ovirt.engine.api.model.AffinityGroup model = new org.ovirt.engine.api.model.AffinityGroup ( ) ; org.ovirt.engine.api.model.AffinityRule rule = new org.ovirt.engine.api.model.AffinityRule ( ) ; rule.setEnabled ( true ) ; rule.setEnforcing ( true ) ; rule.setPositive ( false ) ; model.setHostsRule ( rule ) ; org.ovirt.engine.api.model.AffinityGroup entity = new org.ovirt.engine.api.model.AffinityGroup ( ) ; org.ovirt.engine.api.restapi.types.AffinityGroupMapper.map ( model , entity ) ; org.junit.Assert.assertEquals ( EntityAffinityRule.NEGATIVE , entity.getVdsAffinityRule ( ) ) ; org.junit.Assert.assertEquals ( true , entity.isVdsEnforcing ( ) ) ; }

Target:
public void testHostsRuleStructure ( ) throws java.lang.Exception { org.ovirt.engine.api.model.AffinityGroup model = new org.ovirt.engine.api.model.AffinityGroup ( ) ; org.ovirt.engine.api.model.AffinityRule rule = new org.ovirt.engine.api.model.AffinityRule ( ) ; rule.setEnabled ( true ) ; rule.setEnforcing ( true ) ; rule.setPositive ( false ) ; model.setHostsRule ( rule ) ; org.ovirt.engine.api.model.AffinityGroup entity = new org.ovirt.engine.api.model.AffinityGroup ( ) ; org.ovirt.engine.api.restapi.types.AffinityGroupMapper.map ( model , entity ) ; org.junit.Assert.assertEquals ( EntityAffinityRule.NEGATIVE , entity.getVdsAffinityRule ( ) ) ; org.junit.Assert.assertTrue ( entity.isVdsEnforcing ( ) ) ; }