auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private void initCommand ( ) { org.ovirt.engine.core.common.action.FenceVdsActionParameters params = new org.ovirt.engine.core.common.action.FenceVdsActionParameters ( ) ; params.setVdsId ( org.ovirt.engine.core.bll.pm.StartVdsCommandTest.FENCECD_HOST_ID ) ; command = new org.ovirt.engine.core.bll.pm.StartVdsCommand ( params ) ; command.setAuditLogDirector ( auditLogDirector ) ; command = org.mockito.Mockito.spy ( command ) ; org.mockito.Mockito.doReturn ( executor ) . when ( command ) . createHostFenceActionExecutor ( org.mockito.Matchers.any ( org.ovirt.engine.core.common.businessentities.VDS.class ) , org.mockito.Matchers.any ( org.ovirt.engine.core.common.businessentities.FencingPolicy.class ) ) ; org.mockito.Mockito.doReturn ( vdsBrokerFrontend ) . when ( command ) . getVdsBroker ( ) ; command.setClusterId ( org.ovirt.engine.core.bll.pm.StartVdsCommandTest.FENCECD_HOST_CLUSTER_ID ) ; }

Target:
private void initCommand ( ) { org.ovirt.engine.core.common.action.FenceVdsActionParameters params = new org.ovirt.engine.core.common.action.FenceVdsActionParameters ( ) ; params.setVdsId ( org.ovirt.engine.core.bll.pm.StartVdsCommandTest.FENCECD_HOST_ID ) ; command = new org.ovirt.engine.core.bll.pm.StartVdsCommand ( params , null ) ; command.setAuditLogDirector ( auditLogDirector ) ; command = org.mockito.Mockito.spy ( command ) ; org.mockito.Mockito.doReturn ( executor ) . when ( command ) . createHostFenceActionExecutor ( org.mockito.Matchers.any ( org.ovirt.engine.core.common.businessentities.VDS.class ) , org.mockito.Matchers.any ( org.ovirt.engine.core.common.businessentities.FencingPolicy.class ) ) ; org.mockito.Mockito.doReturn ( vdsBrokerFrontend ) . when ( command ) . getVdsBroker ( ) ; command.setClusterId ( org.ovirt.engine.core.bll.pm.StartVdsCommandTest.FENCECD_HOST_CLUSTER_ID ) ; }
Source:
protected boolean canDoAction ( ) { if ( ( ! ( super . canDoAction ( ) ) ) || ( ! ( org.ovirt.engine.core.bll.storage.domain.UpdateStorageDomainCommand.checkStorageDomain ( ) ) ) ) { return false ; } oldDomain = org.ovirt.engine.core.bll.storage.domain.UpdateStorageDomainCommand.getStorageDomainStaticDao ( ) . get ( org.ovirt.engine.core.bll.storage.domain.UpdateStorageDomainCommand.getStorageDomain ( ) . getId ( ) ) ; org.ovirt.engine.core.bll.storage.domain.UpdateStorageDomainCommand.getStorageDomain ( ) . setLastTimeUsedAsMaster ( oldDomain.getLastTimeUsedAsMaster ( ) ) ; return validateStoragePropertiesUpdate ( ) ; }

Target:
protected boolean validate ( ) { if ( ( ! ( super . validate ( ) ) ) || ( ! ( org.ovirt.engine.core.bll.storage.domain.UpdateStorageDomainCommand.checkStorageDomain ( ) ) ) ) { return false ; } oldDomain = org.ovirt.engine.core.bll.storage.domain.UpdateStorageDomainCommand.getStorageDomainStaticDao ( ) . get ( org.ovirt.engine.core.bll.storage.domain.UpdateStorageDomainCommand.getStorageDomain ( ) . getId ( ) ) ; org.ovirt.engine.core.bll.storage.domain.UpdateStorageDomainCommand.getStorageDomain ( ) . setLastTimeUsedAsMaster ( oldDomain.getLastTimeUsedAsMaster ( ) ) ; return validateStoragePropertiesUpdate ( ) ; }
Source:
public void getClusterNotNull ( ) { final org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase b = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; final org.ovirt.engine.core.common.businessentities.Cluster g = new org.ovirt.engine.core.common.businessentities.Cluster ( ) ; b.setCluster ( g ) ; final org.ovirt.engine.core.common.businessentities.Cluster gr = b.getCluster ( ) ; org.junit.Assert.assertEquals ( g , gr ) ; }

Target:
public void getClusterNotNull ( ) { final org.ovirt.engine.core.common.businessentities.Cluster g = new org.ovirt.engine.core.common.businessentities.Cluster ( ) ; b.setCluster ( g ) ; final org.ovirt.engine.core.common.businessentities.Cluster gr = b.getCluster ( ) ; org.junit.Assert.assertEquals ( g , gr ) ; }
Source:
public void storageTypeUnsupported ( ) { org.ovirt.engine.core.common.businessentities.StorageDomain sd = mockGetExistingDomain ( true ) ; sd.setStorageType ( StorageType.CINDER ) ; sd.setId ( org.ovirt.engine.core.bll.storage.domain.ImportHostedEngineStorageDomainCommandTest.HE_SD_ID ) ; cmd.init ( ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( "" , cmd , EngineMessage.ACTION_TYPE_FAILED_STORAGE_DOMAIN_TYPE_UNSUPPORTED ) ; org.mockito.Mockito.verify ( backend , org.mockito.Mockito.times ( 1 ) ) . runInternalQuery ( org.mockito.ArgumentMatchers.eq ( QueryType.GetExistingStorageDomainList ) , org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.common.queries.QueryParametersBase.class ) ) ; org.mockito.Mockito.verify ( cmd , org.mockito.Mockito.times ( 0 ) ) . executeCommand ( ) ; }

Target:
public void storageTypeUnsupported ( ) { org.ovirt.engine.core.common.businessentities.StorageDomain sd = mockGetExistingDomain ( true ) ; sd.setStorageType ( StorageType.CINDER ) ; sd.setId ( org.ovirt.engine.core.bll.storage.domain.ImportHostedEngineStorageDomainCommandTest.HE_SD_ID ) ; cmd.init ( ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( "" , cmd , EngineMessage.ACTION_TYPE_FAILED_STORAGE_DOMAIN_TYPE_UNSUPPORTED ) ; org.mockito.Mockito.verify ( backend , org.mockito.Mockito.times ( 1 ) ) . runInternalQuery ( org.mockito.ArgumentMatchers.eq ( QueryType.GetExistingStorageDomainList ) , org.mockito.ArgumentMatchers.any ( ) ) ; org.mockito.Mockito.verify ( cmd , org.mockito.Mockito.times ( 0 ) ) . executeCommand ( ) ; }
Source:
public boolean eval ( org.ovirt.engine.core.common.businessentities.Network n ) { return ( ( n.getname ( ) . trim ( ) . toLowerCase ( ) . equals ( getNetworkName ( ) . trim ( ) . toLowerCase ( ) ) ) && ( ! ( n.getId ( ) . equals ( getNetwork ( ) . getId ( ) ) ) ) ) && ( getNetwork ( ) . getstorage_pool_id ( ) . equals ( n.getstorage_pool_id ( ) ) ) ; }

Target:
public boolean eval ( org.ovirt.engine.core.common.businessentities.network.Network n ) { return ( ( n.getname ( ) . trim ( ) . toLowerCase ( ) . equals ( getNetworkName ( ) . trim ( ) . toLowerCase ( ) ) ) && ( ! ( n.getId ( ) . equals ( getNetwork ( ) . getId ( ) ) ) ) ) && ( getNetwork ( ) . getstorage_pool_id ( ) . equals ( n.getstorage_pool_id ( ) ) ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.storage.DiskImage createNotVirtIODisk ( ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage disk = getDiskImage ( ) ; disk.setActive ( true ) ; disk.setDiskInterface ( DiskInterface.IDE ) ; org.mockito.Mockito.when ( diskDao.get ( diskImageGuid ) ) . thenReturn ( disk ) ; org.mockito.Mockito.when ( osRepository.getDiskHotpluggableInterfaces ( org.mockito.Matchers.any ( java.lang.Integer.class ) , org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Version.class ) ) ) . thenReturn ( new java.util.HashSet < > ( org.ovirt.engine.core.bll.storage.disk.HotPlugDiskToVmCommandTest.DISK_HOTPLUGGABLE_INTERFACES ) ) ; return disk ; }

Target:
private void createNotVirtIODisk ( ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage disk = getDiskImage ( ) ; disk.setActive ( true ) ; disk.setDiskInterface ( DiskInterface.IDE ) ; org.mockito.Mockito.when ( diskDao.get ( diskImageGuid ) ) . thenReturn ( disk ) ; org.mockito.Mockito.when ( osRepository.getDiskHotpluggableInterfaces ( org.mockito.Matchers.any ( java.lang.Integer.class ) , org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Version.class ) ) ) . thenReturn ( new java.util.HashSet < > ( org.ovirt.engine.core.bll.storage.disk.HotPlugDiskToVmCommandTest.DISK_HOTPLUGGABLE_INTERFACES ) ) ; }
Source:
public java.lang.Boolean getValue ( ) { for ( org.ovirt.engine.ui.uicommonweb.models.EntityModel model : getClustersTableItems ( ) ) { org.ovirt.engine.ui.uicommonweb.models.datacenters.NetworkClusterModel networkClusterModel = ( ( org.ovirt.engine.ui.uicommonweb.models.datacenters.NetworkClusterModel ) ( model ) ) ; if ( networkClusterModel.getIsChangable ( ) ) { if ( ! ( networkClusterModel.isAttached ( ) ) ) { return false ; } } } return true ; }

Target:
public java.lang.Boolean getValue ( ) { for ( org.ovirt.engine.ui.uicommonweb.models.datacenters.NetworkClusterModel networkClusterModel : getClustersTableItems ( ) ) { if ( ( networkClusterModel.getIsChangable ( ) ) && ( ! ( networkClusterModel.isAttached ( ) ) ) ) { return false ; } } return true ; }
Source:
public void updateStepProgress ( ) { java.lang.Integer newProgress = 74 ; org.ovirt.engine.core.common.job.Step s = dao.get ( FixturesTool.STEP_ID ) ; org.junit.Assert.assertNotEquals ( "New progress should be different than the current" , s.getProgress ( ) , newProgress ) ; updateStepProgress ( FixturesTool.STEP_ID , newProgress ) ; s = dao.get ( FixturesTool.STEP_ID ) ; org.junit.Assert.assertEquals ( "New progress should be the same as the current" , s.getProgress ( ) , newProgress ) ; }

Target:
public void updateStepProgress ( ) { java.lang.Integer newProgress = 74 ; org.ovirt.engine.core.common.job.Step s = dao.get ( FixturesTool.STEP_ID ) ; org.junit.Assert.assertNotEquals ( "New progress should be different than the current" , newProgress , s.getProgress ( ) ) ; updateStepProgress ( FixturesTool.STEP_ID , newProgress ) ; s = dao.get ( FixturesTool.STEP_ID ) ; org.junit.Assert.assertEquals ( "New progress should be the same as the current" , newProgress , s.getProgress ( ) ) ; }
Source:
protected boolean canDoAction ( ) { org.ovirt.engine.core.bll.provider.ProviderValidator validatorOld = new org.ovirt.engine.core.bll.provider.ProviderValidator ( getOldProvider ( ) ) ; org.ovirt.engine.core.bll.provider.ProviderValidator validatorNew = new org.ovirt.engine.core.bll.provider.ProviderValidator ( getProvider ( ) ) ; return ( ( validate ( validatorOld.providerIsSet ( ) ) ) && ( ( nameKept ( ) ) || ( validate ( validatorNew.nameAvailable ( ) ) ) ) ) && ( validate ( providerTypeNotChanged ( getOldProvider ( ) , getProvider ( ) ) ) ) ; }

Target:
protected boolean validate ( ) { org.ovirt.engine.core.bll.provider.ProviderValidator validatorOld = new org.ovirt.engine.core.bll.provider.ProviderValidator ( getOldProvider ( ) ) ; org.ovirt.engine.core.bll.provider.ProviderValidator validatorNew = new org.ovirt.engine.core.bll.provider.ProviderValidator ( getProvider ( ) ) ; return ( ( validate ( validatorOld.providerIsSet ( ) ) ) && ( ( nameKept ( ) ) || ( validate ( validatorNew.nameAvailable ( ) ) ) ) ) && ( validate ( providerTypeNotChanged ( getOldProvider ( ) , getProvider ( ) ) ) ) ; }
Source:
public void testRemove ( ) { org.ovirt.engine.core.common.businessentities.Network result = dao.getByName ( org.ovirt.engine.core.dao.NetworkDAOTest.EXISTING_NETWORK_NAME ) ; org.junit.Assert.assertNotNull ( result ) ; dao.remove ( result.getId ( ) ) ; result = dao.getByName ( org.ovirt.engine.core.dao.NetworkDAOTest.EXISTING_NETWORK_NAME ) ; org.junit.Assert.assertNull ( result ) ; }

Target:
public void testRemove ( ) { org.ovirt.engine.core.common.businessentities.network.Network result = dao.getByName ( org.ovirt.engine.core.dao.NetworkDAOTest.EXISTING_NETWORK_NAME ) ; org.junit.Assert.assertNotNull ( result ) ; dao.remove ( result.getId ( ) ) ; result = dao.getByName ( org.ovirt.engine.core.dao.NetworkDAOTest.EXISTING_NETWORK_NAME ) ; org.junit.Assert.assertNull ( result ) ; }
Source:
private void updateActionAvailability ( ) { java.util.List items = ( ( ( getSelectedItems ( ) ) != null ) && ( ( getSelectedItem ( ) ) != null ) ) ? getSelectedItems ( ) : new java.util.ArrayList ( ) ; getEditQuotaCommand ( ) . setIsExecutionAllowed ( ( ( items.size ( ) ) == 1 ) ) ; getRemoveQuotaCommand ( ) . setIsExecutionAllowed ( ( ( items.size ( ) ) == 1 ) ) ; getCloneQuotaCommand ( ) . setIsExecutionAllowed ( ( ( items.size ( ) ) == 1 ) ) ; }

Target:
private void updateActionAvailability ( ) { java.util.List items = ( ( ( getSelectedItems ( ) ) != null ) && ( ( getSelectedItem ( ) ) != null ) ) ? getSelectedItems ( ) : new java.util.ArrayList ( ) ; getEditQuotaCommand ( ) . setIsExecutionAllowed ( ( ( items.size ( ) ) == 1 ) ) ; getRemoveQuotaCommand ( ) . setIsExecutionAllowed ( ( ( items.size ( ) ) > 0 ) ) ; getCloneQuotaCommand ( ) . setIsExecutionAllowed ( ( ( items.size ( ) ) == 1 ) ) ; }
Source:
protected void init ( ) { resource = new org.ovirt.engine.api.restapi.resource.BackendHostResource ( GUIDS [ 0 ] . toString ( ) , new org.ovirt.engine.api.restapi.resource.BackendHostsResource ( ) ) ; resource.setBackend ( backend ) ; resource.setMappingLocator ( mapperLocator ) ; resource.setValidatorLocator ( validatorLocator ) ; resource.setSessionHelper ( sessionHelper ) ; resource.setMessageBundle ( messageBundle ) ; resource.setHttpHeaders ( httpHeaders ) ; }

Target:
protected void init ( ) { resource = new org.ovirt.engine.api.restapi.resource.BackendHostResource ( GUIDS [ 0 ] . toString ( ) , new org.ovirt.engine.api.restapi.resource.BackendHostsResource ( ) ) ; resource.setBackend ( backend ) ; resource.setMappingLocator ( mapperLocator ) ; resource.setValidatorLocator ( validatorLocator ) ; resource.setMessageBundle ( messageBundle ) ; resource.setHttpHeaders ( httpHeaders ) ; }
Source:
public void testRemove ( ) { org.ovirt.engine.core.dao.network.DnsResolverConfigurationDao dnsResolverConfigurationDao = dbFacade.getDnsResolverConfigurationDao ( ) ; org.ovirt.engine.core.common.businessentities.network.Network result = dao.getByNameAndDataCenter ( org.ovirt.engine.core.dao.network.NetworkDaoTest.EXISTING_NETWORK_NAME2 , FixturesTool.DATA_CENTER ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertEquals ( result.getDnsResolverConfiguration ( ) . getId ( ) , FixturesTool.EXISTING_DNS_RESOLVER_CONFIGURATION_TO_REMOVE ) ; dao.remove ( result.getId ( ) ) ; org.junit.Assert.assertNull ( dao.getByNameAndDataCenter ( org.ovirt.engine.core.dao.network.NetworkDaoTest.EXISTING_NETWORK_NAME2 , FixturesTool.DATA_CENTER ) ) ; org.junit.Assert.assertNull ( dnsResolverConfigurationDao.get ( FixturesTool.EXISTING_DNS_RESOLVER_CONFIGURATION_TO_REMOVE ) ) ; }

Target:
public void testRemove ( ) { org.ovirt.engine.core.common.businessentities.network.Network result = dao.getByNameAndDataCenter ( org.ovirt.engine.core.dao.network.NetworkDaoTest.EXISTING_NETWORK_NAME2 , FixturesTool.DATA_CENTER ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertEquals ( result.getDnsResolverConfiguration ( ) . getId ( ) , FixturesTool.EXISTING_DNS_RESOLVER_CONFIGURATION_TO_REMOVE ) ; dao.remove ( result.getId ( ) ) ; org.junit.Assert.assertNull ( dao.getByNameAndDataCenter ( org.ovirt.engine.core.dao.network.NetworkDaoTest.EXISTING_NETWORK_NAME2 , FixturesTool.DATA_CENTER ) ) ; org.junit.Assert.assertNull ( dnsResolverConfigurationDao.get ( FixturesTool.EXISTING_DNS_RESOLVER_CONFIGURATION_TO_REMOVE ) ) ; }
Source:
public void bondWithNoNetworkDidntChange ( ) { org.ovirt.engine.core.common.businessentities.VdsNetworkInterface bond = createBond ( org.ovirt.engine.core.bll.network.host.SetupNetworksHelperTest.BOND_NAME , null ) ; java.util.List < org.ovirt.engine.core.common.businessentities.VdsNetworkInterface > ifaces = createNics ( bond.getName ( ) ) ; mockExistingIfacesWithBond ( bond , ifaces ) ; org.ovirt.engine.core.common.action.SetupNetworksParameters parameters = new org.ovirt.engine.core.common.action.SetupNetworksParameters ( ) ; ifaces.add ( bond ) ; parameters.setInterfaces ( ifaces ) ; org.ovirt.engine.core.bll.network.host.SetupNetworksHelper helper = createHelper ( parameters ) ; validateAndExpectNoViolations ( helper ) ; assertNoBondsModified ( helper ) ; assertNoNetworksModified ( helper ) ; assertNoBondsRemoved ( helper ) ; assertNoNetworksRemoved ( helper ) ; }

Target:
public void bondWithNoNetworkDidntChange ( ) { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface bond = createBond ( org.ovirt.engine.core.bll.network.host.SetupNetworksHelperTest.BOND_NAME , null ) ; java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > ifaces = createNics ( bond.getName ( ) ) ; mockExistingIfacesWithBond ( bond , ifaces ) ; org.ovirt.engine.core.common.action.SetupNetworksParameters parameters = new org.ovirt.engine.core.common.action.SetupNetworksParameters ( ) ; ifaces.add ( bond ) ; parameters.setInterfaces ( ifaces ) ; org.ovirt.engine.core.bll.network.host.SetupNetworksHelper helper = createHelper ( parameters ) ; validateAndExpectNoViolations ( helper ) ; assertNoBondsModified ( helper ) ; assertNoNetworksModified ( helper ) ; assertNoBondsRemoved ( helper ) ; assertNoNetworksRemoved ( helper ) ; }
Source:
private void updateRemovedLabelOnNics ( java.util.Map < java.lang.String , org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > nicsToConfigureByName ) { java.util.Map < java.lang.String , org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > labelToNic = getLabelToNic ( nicsToConfigureByName.values ( ) ) ; for ( java.lang.String removedLabel : org.ovirt.engine.core.bll.network.host.HostSetupNetworksCommand.getParameters ( ) . getRemovedLabels ( ) ) { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nicWithLabel = labelToNic.get ( removedLabel ) ; nicWithLabel.getLabels ( ) . remove ( removedLabel ) ; } }

Target:
private void updateRemovedLabelOnNics ( java.util.Map < java.lang.String , org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > nicsToConfigureByName ) { java.util.Map < java.lang.String , org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > labelToNic = getLabelToNic ( nicsToConfigureByName.values ( ) ) ; for ( java.lang.String removedLabel : org.ovirt.engine.core.bll.network.host.HostSetupNetworksCommand.getParameters ( ) . getRemovedLabels ( ) ) { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nicWithLabel = labelToNic.get ( removedLabel ) ; if ( nicWithLabel != null ) { nicWithLabel.getLabels ( ) . remove ( removedLabel ) ; } } }
Source:
public void setDefaultInterface ( ) { org.ovirt.engine.core.compat.Guid vmId = getVmId ( ) ; if ( org.ovirt.engine.core.compat.Guid.isNullOrEmpty ( vmId ) ) { getDiskInterface ( ) . setSelectedItem ( DiskInterface.VirtIO ) ; } else { getDiskInterface ( ) . setSelectedItem ( getDisk ( ) . getDiskVmElementForVm ( vmId ) . getDiskInterface ( ) ) ; } }

Target:
public void setDefaultInterface ( ) { org.ovirt.engine.core.compat.Guid vmId = getVmId ( ) ; if ( ( org.ovirt.engine.core.compat.Guid.isNullOrEmpty ( vmId ) ) || ( ( getDisk ( ) ) == null ) ) { getDiskInterface ( ) . setSelectedItem ( DiskInterface.VirtIO ) ; } else { getDiskInterface ( ) . setSelectedItem ( getDisk ( ) . getDiskVmElementForVm ( vmId ) . getDiskInterface ( ) ) ; } }
Source:
public void testVdsGroupCorrectStoragePoolName ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VDSGroup > result = dao.getAllForStoragePool ( storagePool.getId ( ) ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertFalse ( result.isEmpty ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.VDSGroup group : result ) { org.junit.Assert.assertEquals ( storagePool.getname ( ) , group.getStoragePoolName ( ) ) ; } }

Target:
public void testVdsGroupCorrectStoragePoolName ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VDSGroup > result = dao.getAllForStoragePool ( storagePool.getId ( ) ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertFalse ( result.isEmpty ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.VDSGroup group : result ) { org.junit.Assert.assertEquals ( storagePool.getName ( ) , group.getStoragePoolName ( ) ) ; } }
Source:
public void testValidNetworkAttachmentIpConfiguration ( ) { org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidator validator = initValidator ( ) ; java.util.Collection < java.lang.String > replacements = new java.util.ArrayList < > ( ) ; org.ovirt.engine.core.common.errors.EngineMessage engineMessage = null ; initMockNetworkAttachmentIpConfigurationValidator ( engineMessage , replacements ) ; org.ovirt.engine.core.bll.ValidationResult actual = validator.validNewOrModifiedNetworkAttachments ( ) ; org.junit.Assert.assertEquals ( ValidationResult.VALID , actual ) ; }

Target:
public void testValidNetworkAttachmentIpConfiguration ( ) { org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidator validator = initValidator ( ) ; org.ovirt.engine.core.bll.ValidationResult actual = validator.validNewOrModifiedNetworkAttachments ( ) ; org.junit.Assert.assertEquals ( ValidationResult.VALID , actual ) ; }
Source:
private void useAlternateCredentials_EntityChanged ( ) { boolean useAlternateCredentials = ( ( java.lang.Boolean ) ( getUseAlternateCredentials ( ) . getEntity ( ) ) ) ; getSysPrepUserName ( ) . setIsChangable ( ( ( java.lang.Boolean ) ( getUseAlternateCredentials ( ) . getEntity ( ) ) ) ) ; getSysPrepPassword ( ) . setIsChangable ( ( ( java.lang.Boolean ) ( getUseAlternateCredentials ( ) . getEntity ( ) ) ) ) ; getSysPrepUserName ( ) . setEntity ( ( useAlternateCredentials ? "" : null ) ) ; getSysPrepPassword ( ) . setEntity ( ( useAlternateCredentials ? "" : null ) ) ; }

Target:
private void useAlternateCredentials_EntityChanged ( ) { boolean useAlternateCredentials = getUseAlternateCredentials ( ) . getEntity ( ) ; getSysPrepUserName ( ) . setIsChangable ( getUseAlternateCredentials ( ) . getEntity ( ) ) ; getSysPrepPassword ( ) . setIsChangable ( getUseAlternateCredentials ( ) . getEntity ( ) ) ; getSysPrepUserName ( ) . setEntity ( ( useAlternateCredentials ? "" : null ) ) ; getSysPrepPassword ( ) . setEntity ( ( useAlternateCredentials ? "" : null ) ) ; }
Source:
protected org.ovirt.engine.core.vdsbroker.irsbroker.IrsBrokerCommand.IrsProxyData getCurrentIrsProxyData ( ) { org.ovirt.engine.core.vdsbroker.irsbroker.IrsBrokerCommand.IrsProxyData returnValue ; if ( org.ovirt.engine.core.vdsbroker.irsbroker.IrsBrokerCommand._irsProxyData.containsKey ( org.ovirt.engine.core.vdsbroker.irsbroker.IrsBrokerCommand.getParameters ( ) . getStoragePoolId ( ) ) ) { returnValue = org.ovirt.engine.core.vdsbroker.irsbroker.IrsBrokerCommand._irsProxyData.get ( org.ovirt.engine.core.vdsbroker.irsbroker.IrsBrokerCommand.getParameters ( ) . getStoragePoolId ( ) ) ; } else { org.ovirt.engine.core.vdsbroker.irsbroker.IrsBrokerCommand._irsProxyData.put ( org.ovirt.engine.core.vdsbroker.irsbroker.IrsBrokerCommand.getParameters ( ) . getStoragePoolId ( ) , new org.ovirt.engine.core.vdsbroker.irsbroker.IrsBrokerCommand.IrsProxyData ( org.ovirt.engine.core.vdsbroker.irsbroker.IrsBrokerCommand.getParameters ( ) . getStoragePoolId ( ) ) ) ; returnValue = org.ovirt.engine.core.vdsbroker.irsbroker.IrsBrokerCommand._irsProxyData.get ( org.ovirt.engine.core.vdsbroker.irsbroker.IrsBrokerCommand.getParameters ( ) . getStoragePoolId ( ) ) ; } return returnValue ; }

Target:
protected org.ovirt.engine.core.vdsbroker.irsbroker.IrsBrokerCommand.IrsProxyData getCurrentIrsProxyData ( ) { if ( ! ( org.ovirt.engine.core.vdsbroker.irsbroker.IrsBrokerCommand._irsProxyData.containsKey ( org.ovirt.engine.core.vdsbroker.irsbroker.IrsBrokerCommand.getParameters ( ) . getStoragePoolId ( ) ) ) ) { org.ovirt.engine.core.vdsbroker.irsbroker.IrsBrokerCommand._irsProxyData.put ( org.ovirt.engine.core.vdsbroker.irsbroker.IrsBrokerCommand.getParameters ( ) . getStoragePoolId ( ) , new org.ovirt.engine.core.vdsbroker.irsbroker.IrsBrokerCommand.IrsProxyData ( org.ovirt.engine.core.vdsbroker.irsbroker.IrsBrokerCommand.getParameters ( ) . getStoragePoolId ( ) ) ) ; } return org.ovirt.engine.core.vdsbroker.irsbroker.IrsBrokerCommand._irsProxyData.get ( org.ovirt.engine.core.vdsbroker.irsbroker.IrsBrokerCommand.getParameters ( ) . getStoragePoolId ( ) ) ; }
Source:
public static org.ovirt.engine.core.bll.ValidationResult isCinderHasNoImages ( org.ovirt.engine.core.compat.Guid storageDomainId ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > cinderDisks = org.ovirt.engine.core.bll.storage.CINDERStorageHelper.getDbFacade ( ) . getDiskImageDao ( ) . getAllForStorageDomain ( storageDomainId ) ; if ( ! ( cinderDisks.isEmpty ( ) ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ERROR_CANNOT_DETACH_CINDER_PROVIDER_WITH_IMAGES ) ; } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }

Target:
public static org.ovirt.engine.core.bll.ValidationResult isCinderHasNoImages ( org.ovirt.engine.core.compat.Guid storageDomainId ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > cinderDisks = org.ovirt.engine.core.bll.storage.CINDERStorageHelper.getDiskImageDao ( ) . getAllForStorageDomain ( storageDomainId ) ; if ( ! ( cinderDisks.isEmpty ( ) ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ERROR_CANNOT_DETACH_CINDER_PROVIDER_WITH_IMAGES ) ; } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }
Source:
private void initComparators ( ) { java.util.List < ? extends java.util.Comparator < org.ovirt.engine.core.common.businessentities.StorageDomain > > comparators = java.util.Arrays.asList ( new org.ovirt.engine.core.bll.memory.MemoryStorageHandlerTest.SmallestStorageDomainComparator ( validStorageDomain2 ) , new org.ovirt.engine.core.bll.memory.MemoryStorageHandlerTest.BiggestStorageDomainComparator ( validStorageDomain3 ) ) ; org.mockito.Mockito.doReturn ( comparators ) . when ( memoryStorageHandler ) . getStorageDomainComparators ( org.mockito.Matchers.anyListOf ( org.ovirt.engine.core.common.businessentities.StorageDomain.class ) , org.mockito.Matchers.anyListOf ( org.ovirt.engine.core.common.businessentities.storage.DiskImage.class ) ) ; }

Target:
private void initComparators ( ) { java.util.List < ? extends java.util.Comparator < org.ovirt.engine.core.common.businessentities.StorageDomain > > comparators = java.util.Arrays.asList ( new org.ovirt.engine.core.bll.memory.MemoryStorageHandlerTest.SmallestStorageDomainComparator ( validStorageDomain2 ) , new org.ovirt.engine.core.bll.memory.MemoryStorageHandlerTest.BiggestStorageDomainComparator ( validStorageDomain3 ) ) ; org.mockito.Mockito.doReturn ( comparators ) . when ( memoryStorageHandler ) . getStorageDomainComparators ( org.mockito.Matchers.anyListOf ( org.ovirt.engine.core.common.businessentities.storage.DiskImage.class ) ) ; }
Source:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.NewVmModelBehavior behavior = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.NewVmModelBehavior ) ( target ) ) ; java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmTemplate > templates = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmTemplate > ) ( returnValue ) ) ; behavior.postInitTemplate ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.filterTemplatesByArchitecture ( templates , dataCenterWithCluster.getCluster ( ) . getArchitecture ( ) ) ) ; }

Target:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.NewVmModelBehavior behavior = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.NewVmModelBehavior ) ( target ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.VmTemplate > templates = ( ( java.util.List < org.ovirt.engine.core.common.businessentities.VmTemplate > ) ( returnValue ) ) ; behavior.postInitTemplate ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.filterTemplatesByArchitecture ( templates , dataCenterWithCluster.getCluster ( ) . getArchitecture ( ) ) ) ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { lvModel.stopProgress ( ) ; org.ovirt.engine.ui.uicommonweb.models.gluster.CreateBrickModel lvModel = ( ( org.ovirt.engine.ui.uicommonweb.models.gluster.CreateBrickModel ) ( model ) ) ; java.lang.String defaultMountPoint = ( ( java.lang.String ) ( returnValue ) ) ; lvModel.getDefaultMountFolder ( ) . setEntity ( defaultMountPoint ) ; }

Target:
public void onSuccess ( java.lang.String defaultMountPoint ) { lvModel.stopProgress ( ) ; lvModel.getDefaultMountFolder ( ) . setEntity ( defaultMountPoint ) ; }
Source:
public void testGetDataAndSetDataWithFullSession ( ) { org.ovirt.engine.core.utils.ThreadLocalParamsContainer.setHttpSessionId ( org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_SESSION_ID ) ; org.junit.Assert.assertTrue ( "Set should fail with an empty session" , container.SetData ( org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_KEY , org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_VALUE ) ) ; org.junit.Assert.assertEquals ( "Get should return null with an empty session" , org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_VALUE , container.GetData ( org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_KEY ) ) ; org.junit.Assert.assertEquals ( "Get should return the value with a given session" , org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_VALUE , container.GetData ( org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_SESSION_ID , org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_KEY ) ) ; }

Target:
public void testGetDataAndSetDataWithFullSession ( ) { org.ovirt.engine.core.utils.ThreadLocalParamsContainer.setHttpSessionId ( org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_SESSION_ID ) ; org.junit.Assert.assertTrue ( "Set should fail with an empty session" , container.SetData ( org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_KEY , org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_VALUE ) ) ; org.junit.Assert.assertEquals ( "Get should return null with an empty session" , org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_VALUE , container.GetData ( org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_KEY , false ) ) ; org.junit.Assert.assertEquals ( "Get should return the value with a given session" , org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_VALUE , container.GetData ( org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_SESSION_ID , org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_KEY , false ) ) ; }
Source:
public void fetch ( ) { org.ovirt.engine.core.common.vdscommands.VDSReturnValue getList = getResourceManager ( ) . runVdsCommand ( VDSCommandType.List , new org.ovirt.engine.core.common.vdscommands.VdsIdAndVdsVDSCommandParametersBase ( vdsManager.getCopyVds ( ) ) ) ; if ( getList.getSucceeded ( ) ) { vdsmVms = ( ( java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.vdsbroker.vdsbroker.entities.VmInternalData > ) ( getList.getReturnValue ( ) ) ) ; onFetchVms ( ) ; } else { onError ( ) ; } }

Target:
public boolean fetch ( ) { org.ovirt.engine.core.common.vdscommands.VDSReturnValue getList = getResourceManager ( ) . runVdsCommand ( VDSCommandType.List , new org.ovirt.engine.core.common.vdscommands.VdsIdAndVdsVDSCommandParametersBase ( vdsManager.getCopyVds ( ) ) ) ; if ( getList.getSucceeded ( ) ) { vdsmVms = ( ( java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.vdsbroker.vdsbroker.entities.VmInternalData > ) ( getList.getReturnValue ( ) ) ) ; onFetchVms ( ) ; return true ; } else { onError ( ) ; return false ; } }
Source:
public synchronized void updateDataCenter ( org.ovirt.vdsmfake.domain.DataCenter dataCenter ) { if ( ! ( dataCenterMap.containsKey ( dataCenter.getId ( ) ) ) ) { dataCenterMap.put ( dataCenter.getId ( ) , dataCenter ) ; } storeObject ( dataCenter ) ; org.ovirt.vdsmfake.domain.VdsmManager.log.info ( "Data center stored" , dataCenter.getId ( ) ) ; }

Target:
public void updateDataCenter ( org.ovirt.vdsmfake.domain.DataCenter dataCenter ) { if ( ! ( dataCenterMap.containsKey ( dataCenter.getId ( ) ) ) ) { dataCenterMap.put ( dataCenter.getId ( ) , dataCenter ) ; } storeObject ( dataCenter ) ; org.ovirt.vdsmfake.domain.VdsmManager.log.info ( "Data center stored" , dataCenter.getId ( ) ) ; }
Source:
public void setUp ( ) { org.ovirt.engine.core.common.action.RemoveImageParameters params = new org.ovirt.engine.core.common.action.RemoveImageParameters ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; cmd = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.RemoveImageCommand < org.ovirt.engine.core.common.action.RemoveImageParameters > ( params ) { @ java.lang.Override protected void initImage ( ) { } @ java.lang.Override protected void initStoragePoolId ( ) { } @ java.lang.Override protected void initStorageDomainId ( ) { } @ java.lang.Override protected void initContainerDetails ( org.ovirt.engine.core.common.action.ImagesContainterParametersBase parameters ) { } } ) ; org.mockito.Mockito.doReturn ( snapshotDAO ) . when ( cmd ) . getSnapshotDao ( ) ; org.ovirt.engine.core.common.utils.SimpleDependecyInjector.getInstance ( ) . bind ( org.ovirt.engine.core.common.osinfo.OsRepository.class , osRepository ) ; }

Target:
public void setUp ( ) { org.ovirt.engine.core.common.action.RemoveImageParameters params = new org.ovirt.engine.core.common.action.RemoveImageParameters ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; cmd = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.RemoveImageCommand < org.ovirt.engine.core.common.action.RemoveImageParameters > ( params , null ) { @ java.lang.Override protected void initImage ( ) { } @ java.lang.Override protected void initStoragePoolId ( ) { } @ java.lang.Override protected void initStorageDomainId ( ) { } @ java.lang.Override protected void initContainerDetails ( org.ovirt.engine.core.common.action.ImagesContainterParametersBase parameters ) { } } ) ; org.mockito.Mockito.doReturn ( snapshotDAO ) . when ( cmd ) . getSnapshotDao ( ) ; org.ovirt.engine.core.common.utils.SimpleDependecyInjector.getInstance ( ) . bind ( org.ovirt.engine.core.common.osinfo.OsRepository.class , osRepository ) ; }
Source:
private void mockCluster ( ) { cluster = org.mockito.Mockito.mock ( org.ovirt.engine.core.common.businessentities.Cluster.class ) ; org.mockito.Mockito.doReturn ( clusterId ) . when ( cluster ) . getId ( ) ; org.mockito.Mockito.doReturn ( storagePoolId ) . when ( cluster ) . getStoragePoolId ( ) ; org.mockito.Mockito.doReturn ( ArchitectureType.x86_64 ) . when ( cluster ) . getArchitecture ( ) ; org.mockito.Mockito.doReturn ( null ) . when ( cluster ) . getCompatibilityVersion ( ) ; }

Target:
private void mockCluster ( ) { cluster = org.mockito.Mockito.mock ( org.ovirt.engine.core.common.businessentities.Cluster.class ) ; org.mockito.Mockito.doReturn ( clusterId ) . when ( cluster ) . getId ( ) ; org.mockito.Mockito.doReturn ( storagePoolId ) . when ( cluster ) . getStoragePoolId ( ) ; org.mockito.Mockito.doReturn ( ArchitectureType.x86_64 ) . when ( cluster ) . getArchitecture ( ) ; }
Source:
public boolean shouldShowDataCenterAlert ( org.ovirt.engine.core.common.businessentities.StoragePool selectedDataCenter ) { return ( ( selectedDataCenter != null ) && ( ! ( getModel ( ) . UnassignedDataCenterId.equals ( selectedDataCenter.getId ( ) ) ) ) ) && ( ( selectedDataCenter.getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.StoragePoolStatus.Uninitialized ) ) ; }

Target:
public boolean shouldShowDataCenterAlert ( org.ovirt.engine.core.common.businessentities.StoragePool selectedDataCenter ) { return false ; }
Source:
public void testNoStorageQuotaAssigned ( ) { org.mockito.Mockito.when ( storageQosDao.getQosByDiskProfileId ( diskImage.getDiskProfileId ( ) ) ) . thenReturn ( null ) ; underTest.handleIoTune ( vmDevice , underTest.loadStorageQos ( diskImage ) ) ; org.junit.Assert.assertNull ( vmDevice.getSpecParams ( ) ) ; }

Target:
public void testNoStorageQuotaAssigned ( ) { underTest.handleIoTune ( vmDevice , underTest.loadStorageQos ( diskImage ) ) ; org.junit.Assert.assertNull ( vmDevice.getSpecParams ( ) ) ; }
Source:
public void testUpdateNotFound ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpEntityQueryExpectations ( VdcQueryType.GetVmInterfacesByVmId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendVmNicResourceTest.VM_ID } , new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ( ) ) ; control.replay ( ) ; try { resource.update ( getNic ( false ) ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }

Target:
public void testUpdateNotFound ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpEntityQueryExpectations ( VdcQueryType.GetVmInterfacesByVmId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendVmNicResourceTest.VM_ID } , new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ( ) ) ; try { resource.update ( getNic ( false ) ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }
Source:
protected void setUpCommand ( ) { org.mockito.Mockito.doNothing ( ) . when ( command ) . initTemplate ( ) ; org.mockito.Mockito.doReturn ( true ) . when ( command ) . areTemplateImagesInStorageReady ( org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ; org.mockito.Mockito.doReturn ( true ) . when ( command ) . verifyAddVm ( ) ; org.mockito.Mockito.doReturn ( true ) . when ( command ) . setAndValidateDiskProfiles ( ) ; org.mockito.Mockito.doReturn ( true ) . when ( command ) . setAndValidateCpuProfile ( ) ; }

Target:
protected void setUpCommand ( ) { org.mockito.Mockito.doNothing ( ) . when ( command ) . initTemplate ( ) ; org.mockito.Mockito.doReturn ( true ) . when ( command ) . areTemplateImagesInStorageReady ( org.mockito.ArgumentMatchers.any ( ) ) ; org.mockito.Mockito.doReturn ( true ) . when ( command ) . verifyAddVm ( ) ; org.mockito.Mockito.doReturn ( true ) . when ( command ) . setAndValidateDiskProfiles ( ) ; org.mockito.Mockito.doReturn ( true ) . when ( command ) . setAndValidateCpuProfile ( ) ; }
Source:
public static void getPermittedStorageDomainsByStoragePoolId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId , org.ovirt.engine.core.common.businessentities.ActionGroup actionGroup ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ( ) ; } return source ; } } ; org.ovirt.engine.core.common.queries.GetPermittedStorageDomainsByStoragePoolIdParameters params = new org.ovirt.engine.core.common.queries.GetPermittedStorageDomainsByStoragePoolIdParameters ( ) ; params.setStoragePoolId ( dataCenterId ) ; params.setActionGroup ( actionGroup ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetPermittedStorageDomainsByStoragePoolId , params , aQuery ) ; }

Target:
public static void getPermittedStorageDomainsByStoragePoolId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId , org.ovirt.engine.core.common.businessentities.ActionGroup actionGroup ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ( ) ; } return source ; } } ; org.ovirt.engine.core.common.queries.GetPermittedStorageDomainsByStoragePoolIdParameters params = new org.ovirt.engine.core.common.queries.GetPermittedStorageDomainsByStoragePoolIdParameters ( ) ; params.setStoragePoolId ( dataCenterId ) ; params.setActionGroup ( actionGroup ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetPermittedStorageDomainsByStoragePoolId , params , aQuery ) ; }
Source:
public org.ovirt.engine.core.searchbackend.IConditionValueAutoCompleter getFieldValueAutoCompleter ( java.lang.String fieldName ) { org.ovirt.engine.core.searchbackend.IConditionValueAutoCompleter retval = null ; if ( "INITIALIZED" . equals ( fieldName ) ) { retval = new org.ovirt.engine.core.searchbackend.BitValueAutoCompleter ( ) ; } else if ( "ARCHITECTURE" . equals ( fieldName ) ) { retval = new org.ovirt.engine.core.searchbackend.EnumValueAutoCompleter ( org.ovirt.engine.core.common.businessentities.ArchitectureType.class ) ; } return retval ; }

Target:
public org.ovirt.engine.core.searchbackend.IConditionValueAutoCompleter getFieldValueAutoCompleter ( java.lang.String fieldName ) { org.ovirt.engine.core.searchbackend.IConditionValueAutoCompleter retval = null ; if ( "ARCHITECTURE" . equals ( fieldName ) ) { retval = new org.ovirt.engine.core.searchbackend.EnumValueAutoCompleter ( org.ovirt.engine.core.common.businessentities.ArchitectureType.class ) ; } return retval ; }
Source:
private void extractBondIfModified ( org.ovirt.engine.core.common.businessentities.VdsNetworkInterface iface , java.lang.String bondName ) { if ( ! ( bonds.containsKey ( bondName ) ) ) { bonds.put ( bondName , new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VdsNetworkInterface > ( ) ) ; } if ( bondWasModified ( iface ) ) { modifiedBonds.put ( bondName , iface ) ; } }

Target:
private void extractBondIfModified ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface , java.lang.String bondName ) { if ( ! ( bonds.containsKey ( bondName ) ) ) { bonds.put ( bondName , new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > ( ) ) ; } if ( bondWasModified ( iface ) ) { modifiedBonds.put ( bondName , iface ) ; } }
Source:
public static void getUpHostListByCluster ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String clusterName , java.lang.Integer maxCount ) { org.ovirt.engine.core.common.queries.SearchParameters searchParameters = new org.ovirt.engine.core.common.queries.SearchParameters ( ( ( "Host: cluster = " + clusterName ) + " and status = up" ) , org.ovirt.engine.core.common.interfaces.SearchType.VDS ) ; if ( maxCount != null ) { searchParameters.setMaxCount ( maxCount ) ; } org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.Search , searchParameters , aQuery ) ; }

Target:
public static void getUpHostListByCluster ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String clusterName , java.lang.Integer maxCount ) { org.ovirt.engine.core.common.queries.SearchParameters searchParameters = new org.ovirt.engine.core.common.queries.SearchParameters ( ( ( "Host: cluster = " + clusterName ) + " and status = up" ) , org.ovirt.engine.core.common.interfaces.SearchType.VDS ) ; if ( maxCount != null ) { searchParameters.setMaxCount ( maxCount ) ; } org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , searchParameters , aQuery ) ; }
Source:
private void onSaveSanStorage ( ) { org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel confirmationModel = ( ( org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel ) ( getConfirmWindow ( ) ) ) ; if ( ( confirmationModel != null ) && ( ! ( confirmationModel.validate ( ) ) ) ) { return ; } cancelConfirm ( ) ; getWindow ( ) . startProgress ( null ) ; org.ovirt.engine.ui.uicompat.Task.create ( this , new java.util.ArrayList < java.lang.Object > ( java.util.Arrays.asList ( new java.lang.Object [ ] { "SaveSan" } ) ) ) . run ( ) ; }

Target:
private void onSaveSanStorage ( ) { org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel confirmationModel = ( ( org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel ) ( getConfirmWindow ( ) ) ) ; if ( ( confirmationModel != null ) && ( ! ( confirmationModel.validate ( ) ) ) ) { return ; } cancelConfirm ( ) ; getWindow ( ) . startProgress ( ) ; org.ovirt.engine.ui.uicompat.Task.create ( this , new java.util.ArrayList < java.lang.Object > ( java.util.Arrays.asList ( new java.lang.Object [ ] { "SaveSan" } ) ) ) . run ( ) ; }
Source:
void initEditors ( ) { volumeTypeListEditor = new org.ovirt.engine.ui.common.widget.editor.ListModelListBoxEditor ( new org.ovirt.engine.ui.common.widget.renderer.EnumRenderer < org.ovirt.engine.core.common.businessentities.storage.VolumeType > ( ) ) ; storageListEditor = new org.ovirt.engine.ui.common.widget.editor.ListModelListBoxEditor ( new org.ovirt.engine.ui.common.widget.renderer.StorageDomainFreeSpaceRenderer ( ) ) ; volumeFormatListEditor = new org.ovirt.engine.ui.common.widget.editor.ListModelListBoxEditor < org.ovirt.engine.core.common.businessentities.storage.VolumeFormat > ( new org.ovirt.engine.ui.common.widget.renderer.EnumRenderer < org.ovirt.engine.core.common.businessentities.storage.VolumeFormat > ( ) ) ; sourceStorageListEditor = new org.ovirt.engine.ui.common.widget.editor.ListModelListBoxEditor ( new org.ovirt.engine.ui.common.widget.renderer.StorageDomainFreeSpaceRenderer ( ) ) ; diskProfileListEditor = new org.ovirt.engine.ui.common.widget.editor.ListModelListBoxEditor ( new org.ovirt.engine.ui.common.widget.renderer.NameRenderer < org.ovirt.engine.core.common.businessentities.profiles.DiskProfile > ( ) ) ; quotaListEditor = new org.ovirt.engine.ui.common.widget.editor.ListModelListBoxEditor ( new org.ovirt.engine.ui.common.widget.renderer.NameRenderer < org.ovirt.engine.core.common.businessentities.Quota > ( ) ) ; }

Target:
void initEditors ( ) { volumeTypeListEditor = new org.ovirt.engine.ui.common.widget.editor.ListModelListBoxEditor ( new org.ovirt.engine.ui.common.widget.renderer.EnumRenderer < org.ovirt.engine.core.common.businessentities.storage.VolumeType > ( ) ) ; storageListEditor = new org.ovirt.engine.ui.common.widget.editor.ListModelListBoxEditor ( new org.ovirt.engine.ui.common.widget.renderer.StorageDomainFreeSpaceRenderer ( ) ) ; volumeFormatListEditor = new org.ovirt.engine.ui.common.widget.editor.ListModelListBoxEditor ( new org.ovirt.engine.ui.common.widget.renderer.EnumRenderer < org.ovirt.engine.core.common.businessentities.storage.VolumeFormat > ( ) ) ; sourceStorageListEditor = new org.ovirt.engine.ui.common.widget.editor.ListModelListBoxEditor ( new org.ovirt.engine.ui.common.widget.renderer.StorageDomainFreeSpaceRenderer ( ) ) ; diskProfileListEditor = new org.ovirt.engine.ui.common.widget.editor.ListModelListBoxEditor ( new org.ovirt.engine.ui.common.widget.renderer.NameRenderer < org.ovirt.engine.core.common.businessentities.profiles.DiskProfile > ( ) ) ; quotaListEditor = new org.ovirt.engine.ui.common.widget.editor.ListModelListBoxEditor ( new org.ovirt.engine.ui.common.widget.renderer.NameRenderer < org.ovirt.engine.core.common.businessentities.Quota > ( ) ) ; }