auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void testUpdate ( ) { java.lang.String oldName = existingCluster.getName ( ) ; existingCluster.setName ( "This is the new name" ) ; existingCluster.setVirtService ( false ) ; existingCluster.setGlusterService ( true ) ; existingCluster.setMigrationBandwidthLimitType ( MigrationBandwidthLimitType.CUSTOM ) ; existingCluster.setCustomMigrationNetworkBandwidth ( 20 ) ; dao.update ( existingCluster ) ; org.ovirt.engine.core.common.businessentities.Cluster result = dao.get ( existingCluster.getId ( ) ) ; assertCorrectCluster ( result ) ; result = dao.getByName ( oldName ) ; org.junit.Assert.assertNull ( result ) ; }

Target:
public void testUpdate ( ) { java.lang.String oldName = existingCluster.getName ( ) ; existingCluster.setName ( "This is the new name" ) ; existingCluster.setVirtService ( false ) ; existingCluster.setGlusterService ( true ) ; existingCluster.setMigrationBandwidthLimitType ( MigrationBandwidthLimitType.CUSTOM ) ; existingCluster.setCustomMigrationNetworkBandwidth ( 20 ) ; dao.update ( existingCluster ) ; org.ovirt.engine.core.common.businessentities.Cluster result = dao.get ( existingCluster.getId ( ) ) ; assertCorrectCluster ( result ) ; result = dao.getByName ( oldName ) ; org.junit.jupiter.api.Assertions.assertNull ( result ) ; }
Source:
public 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 ) ) ; } } ; getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.SpiceUsbAutoShare , getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public void getMaxNumOfThreadsPerCpu ( org.ovirt.engine.ui.frontend.AsyncQuery < java.lang.Integer > aQuery , java.lang.String version ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.DefaultValueConverter < > ( 1 ) ; org.ovirt.engine.core.common.queries.GetConfigurationValueParameters tempVar = new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.MaxNumOfThreadsPerCpu ) ; tempVar.setVersion ( version ) ; getConfigFromCache ( tempVar , aQuery ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc setVmTicket ( java.lang.String vmId , java.lang.String otp64 , java.lang.String sec , java.lang.String connectionAction , java.util.Map < java.lang.String , java.lang.String > params ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.setVmTicket ( vmId , otp64 , sec , connectionAction , params ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }

Target:
public org.ovirt.engine.core.vdsbroker.irsbroker.StatusReturnForXmlRpc teardownImage ( java.lang.String sdID , java.lang.String spID , java.lang.String imageID , java.lang.String volumeID ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.teardownImage ( sdID , spID , imageID , volumeID ) ; org.ovirt.engine.core.vdsbroker.irsbroker.StatusReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.irsbroker.StatusReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
Source:
public void testRemove ( ) { dao.save ( networkAttachment ) ; org.ovirt.engine.core.common.businessentities.network.NetworkAttachment result = dao.get ( networkAttachment.getId ( ) ) ; org.junit.Assert.assertNotNull ( result ) ; dao.remove ( networkAttachment.getId ( ) ) ; org.junit.Assert.assertNull ( dao.get ( networkAttachment.getId ( ) ) ) ; org.junit.Assert.assertNull ( dnsResolverConfigurationDao.get ( networkAttachment.getDnsResolverConfiguration ( ) . getId ( ) ) ) ; }

Target:
public void testRemove ( ) { dao.save ( networkAttachment ) ; org.ovirt.engine.core.common.businessentities.network.NetworkAttachment result = dao.get ( networkAttachment.getId ( ) ) ; org.junit.jupiter.api.Assertions.assertNotNull ( result ) ; dao.remove ( networkAttachment.getId ( ) ) ; org.junit.jupiter.api.Assertions.assertNull ( dao.get ( networkAttachment.getId ( ) ) ) ; org.junit.jupiter.api.Assertions.assertNull ( dnsResolverConfigurationDao.get ( networkAttachment.getDnsResolverConfiguration ( ) . getId ( ) ) ) ; }
Source:
public boolean eval ( org.ovirt.engine.core.common.businessentities.StorageDomain a ) { return ( ( a.getStorageDomainType ( ) ) == ( org.ovirt.engine.core.common.businessentities.StorageDomainType.Master ) ) && ( ( a.getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.StorageDomainStatus.Active ) ) ; }

Target:
protected boolean checkMasterDomainIsUp ( ) { boolean returnValue = true ; boolean hasUpMaster = ! ( org.ovirt.engine.core.bll.storage.StorageDomainCommandBase.getStorageDomainDao ( ) . getStorageDomains ( org.ovirt.engine.core.bll.storage.StorageDomainCommandBase.getStoragePool ( ) . getId ( ) , StorageDomainType.Master , StorageDomainStatus.Active ) . isEmpty ( ) ) ; if ( ! hasUpMaster ) { addCanDoActionMessage ( EngineMessage.ACTION_TYPE_FAILED_MASTER_STORAGE_DOMAIN_NOT_ACTIVE ) ; returnValue = false ; } return returnValue ; }
Source:
private void setUpMockUpForStart ( ) { prepareMocks ( cmd ) ; org.mockito.Mockito.when ( serviceDao.getByServiceType ( org.mockito.Matchers.any ( org.ovirt.engine.core.common.businessentities.gluster.ServiceType.class ) ) ) . thenReturn ( getGlusterServiceListByServiceType ( ServiceType.GLUSTER_SWIFT , GlusterServiceStatus.STOPPED ) ) ; org.mockito.Mockito.doReturn ( getGlusterServerServicesByServerIdAndServiceType ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) , ServiceType.GLUSTER_SWIFT , GlusterServiceStatus.STOPPED ) ) . when ( serverServiceDao ) . getByServerIdAndServiceType ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) , org.mockito.Matchers.any ( org.ovirt.engine.core.common.businessentities.gluster.ServiceType.class ) ) ; }

Target:
private void setUpMockUpForStart ( ) { prepareMocks ( cmd ) ; org.mockito.Mockito.when ( serviceDao.getByServiceType ( org.mockito.Matchers.any ( org.ovirt.engine.core.common.businessentities.gluster.ServiceType.class ) ) ) . thenReturn ( getGlusterServiceListByServiceType ( ServiceType.GLUSTER_SWIFT , GlusterServiceStatus.STOPPED ) ) ; org.mockito.Mockito.doReturn ( getGlusterServerServicesByServerIdAndServiceType ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , ServiceType.GLUSTER_SWIFT , GlusterServiceStatus.STOPPED ) ) . when ( serverServiceDao ) . getByServerIdAndServiceType ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) , org.mockito.Matchers.any ( org.ovirt.engine.core.common.businessentities.gluster.ServiceType.class ) ) ; }
Source:
public static org.ovirt.engine.api.model.VmPool map ( org.ovirt.engine.core.common.businessentities.VM vm , org.ovirt.engine.api.model.VmPool template ) { org.ovirt.engine.api.model.VmPool model = ( template != null ) ? template : new org.ovirt.engine.api.model.VmPool ( ) ; org.ovirt.engine.core.common.businessentities.VM vmModel = org.ovirt.engine.api.restapi.types.VmMapper.map ( vm , ( ( org.ovirt.engine.core.common.businessentities.VM ) ( null ) ) ) ; vmModel.setCluster ( null ) ; vmModel.setTemplate ( null ) ; vmModel.setVmPool ( null ) ; model.setVm ( vmModel ) ; return model ; }

Target:
public static org.ovirt.engine.api.model.VmPool map ( org.ovirt.engine.core.common.businessentities.VM vm , org.ovirt.engine.api.model.VmPool template ) { org.ovirt.engine.api.model.VmPool model = ( template != null ) ? template : new org.ovirt.engine.api.model.VmPool ( ) ; org.ovirt.engine.core.common.businessentities.VM vmModel = org.ovirt.engine.api.restapi.types.VmMapper.map ( vm , ( ( org.ovirt.engine.core.common.businessentities.VM ) ( null ) ) ) ; vmModel.setCluster ( null ) ; vmModel.setTemplate ( null ) ; vmModel.setVmPool ( null ) ; model.setVm ( vmModel ) ; model.setUseLatestTemplateVersion ( vm.isUseLatestVersion ( ) ) ; return model ; }
Source:
protected void EndVmCommand ( ) { org.ovirt.engine.core.bll.StopVmCommandBase.setCommandShouldBeLogged ( false ) ; if ( ( org.ovirt.engine.core.bll.StopVmCommandBase.getVm ( ) ) != null ) { org.ovirt.engine.core.bll.StopVmCommandBase.getVm ( ) . setstatus ( VMStatus.Down ) ; org.ovirt.engine.core.bll.StopVmCommandBase.getVm ( ) . sethibernation_vol_handle ( null ) ; org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmDynamicDAO ( ) . update ( org.ovirt.engine.core.bll.StopVmCommandBase.getVm ( ) . getDynamicData ( ) ) ; } else { org.ovirt.engine.core.bll.StopVmCommandBase.log.warn ( "StopVmCommandBase::EndVmCommand: Vm is null - not performing full EndAction" ) ; } setSucceeded ( true ) ; }

Target:
protected void endVmCommand ( ) { org.ovirt.engine.core.bll.StopVmCommandBase.setCommandShouldBeLogged ( false ) ; if ( ( org.ovirt.engine.core.bll.StopVmCommandBase.getVm ( ) ) != null ) { org.ovirt.engine.core.bll.StopVmCommandBase.getVm ( ) . setstatus ( VMStatus.Down ) ; org.ovirt.engine.core.bll.StopVmCommandBase.getVm ( ) . sethibernation_vol_handle ( null ) ; org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmDynamicDAO ( ) . update ( org.ovirt.engine.core.bll.StopVmCommandBase.getVm ( ) . getDynamicData ( ) ) ; } else { org.ovirt.engine.core.bll.StopVmCommandBase.log.warn ( "StopVmCommandBase::EndVmCommand: Vm is null - not performing full EndAction" ) ; } setSucceeded ( true ) ; }
Source:
private void startRebalance ( ) { if ( ( getSelectedItems ( ) ) == null ) { return ; } java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > list = new java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > ( ) ; for ( java.lang.Object item : getSelectedItems ( ) ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity volume = ( ( org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity ) ( item ) ) ; list.add ( new org.ovirt.engine.core.common.action.gluster.GlusterVolumeRebalanceParameters ( volume.getId ( ) , false , false ) ) ; } org.ovirt.engine.ui.frontend.Frontend.RunMultipleAction ( VdcActionType.StartRebalanceGlusterVolume , list ) ; }

Target:
private void startRebalance ( ) { if ( ( getSelectedItems ( ) ) == null ) { return ; } java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > list = new java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > ( ) ; for ( java.lang.Object item : getSelectedItems ( ) ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity volume = ( ( org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity ) ( item ) ) ; list.add ( new org.ovirt.engine.core.common.action.gluster.GlusterVolumeRebalanceParameters ( volume.getId ( ) , false , false ) ) ; } org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runMultipleAction ( VdcActionType.StartRebalanceGlusterVolume , list ) ; }
Source:
public static void loadDbFacadeConfig ( ) { org.ovirt.engine.core.utils.EngineLocalConfig config = org.ovirt.engine.core.utils.EngineLocalConfig.getInstance ( ) ; try { org.ovirt.engine.core.dal.dbbroker.DbFacadeLocator.connectionTimeout = config.getInteger ( "ENGINE_DB_CONNECTION_TIMEOUT" ) ; org.ovirt.engine.core.dal.dbbroker.DbFacadeLocator.checkInterval = config.getInteger ( "ENGINE_DB_CHECK_INTERVAL" ) ; } catch ( java.lang.Exception exception ) { org.ovirt.engine.core.dal.dbbroker.DbFacadeLocator.log.warn ( ( "Can't load connection checking parameters of DB facade, " + "will continue using the default values. Error: {}" ) , exception.getMessage ( ) ) ; org.ovirt.engine.core.dal.dbbroker.DbFacadeLocator.log.debug ( "Exception" , exception ) ; } }

Target:
private void loadDbFacadeConfig ( ) { final org.ovirt.engine.core.utils.EngineLocalConfig config = org.ovirt.engine.core.utils.EngineLocalConfig.getInstance ( ) ; try { connectionTimeout = config.getInteger ( "ENGINE_DB_CONNECTION_TIMEOUT" ) ; checkInterval = config.getInteger ( "ENGINE_DB_CHECK_INTERVAL" ) ; } catch ( java.lang.Exception exception ) { org.ovirt.engine.core.dal.dbbroker.DbFacadeLocator.log.warn ( ( "Can't load connection checking parameters of DB facade, " + "will continue using the default values. Error: {}" ) , exception.getMessage ( ) ) ; org.ovirt.engine.core.dal.dbbroker.DbFacadeLocator.log.debug ( "Exception" , exception ) ; } }
Source:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > disks = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ) ( returnValue ) ) ; java.util.Collections.sort ( disks , new org.ovirt.engine.ui.uicommonweb.Linq.DiskByAliasComparer ( ) ) ; java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.vms.DiskModel > diskModels = org.ovirt.engine.ui.uicommonweb.Linq.disksToDiskModelList ( disks ) ; getAttachableDisksMap ( ) . get ( DiskStorageType.LUN ) . setItems ( org.ovirt.engine.ui.uicommonweb.Linq.toEntityModelList ( org.ovirt.engine.ui.uicommonweb.Linq.filterDisksByType ( diskModels , Disk.DiskStorageType.LUN ) ) ) ; }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { java.util.List < org.ovirt.engine.core.common.businessentities.Disk > disks = adjustReturnValue ( returnValue ) ; java.util.Collections.sort ( disks , new org.ovirt.engine.ui.uicommonweb.Linq.DiskByAliasComparer ( ) ) ; java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.vms.DiskModel > diskModels = org.ovirt.engine.ui.uicommonweb.Linq.disksToDiskModelList ( disks ) ; java.util.List < org.ovirt.engine.ui.uicommonweb.models.EntityModel < org.ovirt.engine.ui.uicommonweb.models.vms.DiskModel > > entities = org.ovirt.engine.ui.uicommonweb.Linq.toEntityModelList ( org.ovirt.engine.ui.uicommonweb.Linq.filterDisksByType ( diskModels , diskStorageType ) ) ; initAttachableDisks ( entities ) ; }
Source:
public void testExtraVariables ( ) { java.lang.String command = createCommand ( new org.ovirt.engine.core.common.utils.ansible.AnsibleCommandBuilder ( ) . variables ( new org.ovirt.engine.core.common.utils.Pair ( "a" , "1" ) , new org.ovirt.engine.core.common.utils.Pair ( "b" , "2" ) , new org.ovirt.engine.core.common.utils.Pair ( "c" , "3" ) ) . playbook ( org.ovirt.engine.core.common.utils.ansible.AnsibleCommandBuilderTest.ANSIBLE_PLAYBOOK ) ) ; org.junit.Assert.assertEquals ( join ( AnsibleCommandBuilder.ANSIBLE_COMMAND , org.ovirt.engine.core.common.utils.ansible.AnsibleCommandBuilderTest.ANSIBLE_LOG_LEVEL , org.ovirt.engine.core.common.utils.ansible.AnsibleCommandBuilderTest.PRIVATE_KEY , "--extra-vars=a=1" , "--extra-vars=b=2" , "--extra-vars=c=3" , org.ovirt.engine.core.common.utils.ansible.AnsibleCommandBuilderTest.ANSIBLE_PLAYBOOK_FULL_PATH ) , command ) ; }

Target:
public void testComplexCommand ( ) { java.lang.String command = createCommand ( new org.ovirt.engine.core.common.utils.ansible.AnsibleCommandBuilder ( ) . privateKey ( java.nio.file.Paths.get ( "/mykey" ) ) . inventoryFile ( java.nio.file.Paths.get ( "/myinventory" ) ) . limit ( "mylimit" ) . verboseLevel ( AnsibleVerbosity.LEVEL3 ) . variables ( new org.ovirt.engine.core.common.utils.Pair ( "a" , "1" ) , new org.ovirt.engine.core.common.utils.Pair ( "b" , "2" ) ) . playbook ( org.ovirt.engine.core.common.utils.ansible.AnsibleCommandBuilderTest.ANSIBLE_PLAYBOOK ) ) ; org.junit.Assert.assertEquals ( join ( AnsibleCommandBuilder.ANSIBLE_COMMAND , org.ovirt.engine.core.common.utils.ansible.AnsibleCommandBuilderTest.IGNORE_SSH_CONFIG , "-vvv" , "--private-key=/mykey" , "--inventory=/myinventory" , "--limit=mylimit" , "--extra-vars=a=1" , "--extra-vars=b=2" , org.ovirt.engine.core.common.utils.ansible.AnsibleCommandBuilderTest.ANSIBLE_PLAYBOOK_FULL_PATH ) , command ) ; }
Source:
public static java.util.List < org.ovirt.engine.core.common.businessentities.VmInit > getVmInitByIds ( java.util.List < org.ovirt.engine.core.compat.Guid > ids ) { org.ovirt.engine.core.dao.VmInitDAO db = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmInitDao ( ) ; return db.getVmInitByIds ( ids ) ; }

Target:
public static java.util.List < org.ovirt.engine.core.common.businessentities.VmInit > getVmInitByIds ( java.util.List < org.ovirt.engine.core.compat.Guid > ids , boolean secure ) { org.ovirt.engine.core.dao.VmInitDAO db = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmInitDao ( ) ; java.util.List < org.ovirt.engine.core.common.businessentities.VmInit > all = db.getVmInitByIds ( ids ) ; for ( org.ovirt.engine.core.common.businessentities.VmInit vmInit : all ) { if ( secure ) { vmInit.setPasswordAlreadyStored ( ( ! ( org.apache.commons.lang.StringUtils.isEmpty ( vmInit.getRootPassword ( ) ) ) ) ) ; vmInit.setRootPassword ( null ) ; } else { vmInit.setPasswordAlreadyStored ( false ) ; } } return all ; }
Source:
private org.ovirt.engine.core.compat.Guid getStorageDomainId ( java.lang.String storageDomainName ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage_domains > storageDomains = getBackendCollection ( org.ovirt.engine.core.common.businessentities.storage_domains.class , VdcQueryType.GetAllStorageDomains , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.storage_domains storageDomain : storageDomains ) { if ( storageDomain.getstorage_name ( ) . equals ( storageDomainName ) ) { return storageDomain.getId ( ) ; } } return null ; }

Target:
private org.ovirt.engine.core.compat.Guid getStorageDomainId ( java.lang.String storageDomainName ) { java.util.List < org.ovirt.engine.api.model.StorageDomain > storageDomains = getBackendCollection ( org.ovirt.engine.api.model.StorageDomain.class , VdcQueryType.GetAllStorageDomains , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) ) ; for ( org.ovirt.engine.api.model.StorageDomain storageDomain : storageDomains ) { if ( storageDomain.getstorage_name ( ) . equals ( storageDomainName ) ) { return storageDomain.getId ( ) ; } } return null ; }
Source:
public static java.util.Collection < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > findAllInterfaceVlanIdIsEmpty ( java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > items ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > ret = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface i : items ) { if ( ( i.getVlanId ( ) ) == null ) { ret.add ( i ) ; } } return ret ; }

Target:
public boolean match ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface i ) { return ( i.getVlanId ( ) ) == null ; }
Source:
public void prepareForEdit ( org.ovirt.engine.core.common.businessentities.StorageDomain storage ) { super . prepareForEdit ( storage ) ; getOverride ( ) . setIsChangeable ( isEditable ( storage ) ) ; }

Target:
public void prepareForEdit ( org.ovirt.engine.core.common.businessentities.StorageDomain storage ) { super . prepareForEdit ( storage ) ; boolean isStorageEditable = isEditable ( storage ) ; getVersion ( ) . setIsChangeable ( isStorageEditable ) ; getRetransmissions ( ) . setIsChangeable ( isStorageEditable ) ; getTimeout ( ) . setIsChangeable ( isStorageEditable ) ; getMountOptions ( ) . setIsChangeable ( isStorageEditable ) ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object result ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ExternalComputeResource > computeResources = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ExternalComputeResource > ) ( result ) ) ; org.ovirt.engine.ui.uicommonweb.models.ListModel externalComputeResourceListModel = getExternalComputeResource ( ) ; externalComputeResourceListModel.setItems ( computeResources ) ; externalComputeResourceListModel.setIsChangable ( true ) ; }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object result ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ExternalDiscoveredHost > hosts = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ExternalDiscoveredHost > ) ( result ) ) ; org.ovirt.engine.ui.uicommonweb.models.ListModel externalDiscoveredHostsListModel = getExternalDiscoveredHosts ( ) ; externalDiscoveredHostsListModel.setItems ( hosts ) ; externalDiscoveredHostsListModel.setIsChangable ( true ) ; }
Source:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; dao = dbFacade.getStorageServerConnectionDao ( ) ; existingConnection = dao.get ( "0cc146e8-e5ed-482c-8814-270bc48c297f" ) ; existingNfsAutoConnection = dao.get ( FixturesTool.EXISTING_STORAGE_CONNECTION_NFS_AUTO_ID.toString ( ) ) ; newServerConnection = new org.ovirt.engine.core.common.businessentities.StorageServerConnections ( ) ; newServerConnection.setid ( "0cc146e8-e5ed-482c-8814-270bc48c2980" ) ; newServerConnection.setconnection ( org.ovirt.engine.core.dao.StorageServerConnectionDaoTest.EXISTING_DOMAIN_STORAGE_NAME ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; dao = dbFacade.getStorageServerConnectionDao ( ) ; existingConnection = dao.get ( "0cc146e8-e5ed-482c-8814-270bc48c297f" ) ; existingNfsAutoConnection = dao.get ( FixturesTool.EXISTING_STORAGE_CONNECTION_NFS_AUTO_ID.toString ( ) ) ; newServerConnection = new org.ovirt.engine.core.common.businessentities.StorageServerConnections ( ) ; newServerConnection.setId ( "0cc146e8-e5ed-482c-8814-270bc48c2980" ) ; newServerConnection.setConnection ( org.ovirt.engine.core.dao.StorageServerConnectionDaoTest.EXISTING_DOMAIN_STORAGE_NAME ) ; }
Source:
public org.ovirt.engine.core.common.businessentities.VmDevice addSoundDevice ( org.ovirt.engine.core.compat.Guid vmId , int osId , org.ovirt.engine.core.compat.Version compatibilityVersion ) { java.lang.String soundDevice = osRepository.getSoundDevice ( osId , compatibilityVersion ) ; return addManagedDevice ( new org.ovirt.engine.core.common.businessentities.VmDeviceId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , vmId ) , VmDeviceGeneralType.SOUND , org.ovirt.engine.core.common.utils.VmDeviceType.getSoundDeviceType ( soundDevice ) , org.ovirt.engine.core.bll.utils.VmDeviceUtils.EMPTY_SPEC_PARAMS , true , true ) ; }

Target:
public org.ovirt.engine.core.common.businessentities.VmDevice addSoundDevice ( org.ovirt.engine.core.compat.Guid vmId , int osId , org.ovirt.engine.core.compat.Version compatibilityVersion ) { java.lang.String soundDevice = osRepository.getSoundDevice ( osId , compatibilityVersion ) ; return addManagedDevice ( new org.ovirt.engine.core.common.businessentities.VmDeviceId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , vmId ) , VmDeviceGeneralType.SOUND , org.ovirt.engine.core.common.utils.VmDeviceType.getSoundDeviceType ( soundDevice ) , java.util.Collections.emptyMap ( ) , true , true ) ; }
Source:
private void initSpmPriorities ( ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getMaxSpmPriority ( new org.ovirt.engine.ui.frontend.AsyncQuery ( this , new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.hosts.HostModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.hosts.HostModel ) ( target ) ) ; model.maxSpmPriority = ( ( java.lang.Integer ) ( returnValue ) ) ; initSpmPriorities1 ( ) ; } } ) ) ; }

Target:
private void initSpmPriorities ( ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getMaxSpmPriority ( new org.ovirt.engine.ui.uicommonweb.models.hosts.AsyncQuery ( new org.ovirt.engine.ui.frontend.AsyncCallback < java.lang.Integer > ( ) { @ java.lang.Override public void onSuccess ( java.lang.Integer returnValue ) { maxSpmPriority = returnValue ; initSpmPriorities1 ( ) ; } } ) ) ; }
Source:
public void getUnusedBricksFromServer ( org.ovirt.engine.ui.frontend.AsyncQuery asyncQuery , org.ovirt.engine.core.compat.Guid hostId ) { asyncQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.core.common.queries.IdQueryParameters parameters = new org.ovirt.engine.core.common.queries.IdQueryParameters ( hostId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetUnusedGlusterBricks , parameters , asyncQuery ) ; }

Target:
public void getStorageDevices ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hostId ) { 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.GetGlusterStorageDevices , new org.ovirt.engine.core.common.queries.IdQueryParameters ( hostId ) , aQuery ) ; }
Source:
private void setNonOperational ( org.ovirt.engine.core.common.businessentities.NonOperationalReason reason , java.util.Map < java.lang.String , java.lang.String > customLogValues ) { org.ovirt.engine.core.common.action.SetNonOperationalVdsParameters tempVar = new org.ovirt.engine.core.common.action.SetNonOperationalVdsParameters ( getVds ( ) . getId ( ) , reason , customLogValues ) ; runInternalAction ( VdcActionType.SetNonOperationalVds , tempVar , org.ovirt.engine.core.bll.job.ExecutionHandler.createInternalJobContext ( ) ) ; }

Target:
private void setNonOperational ( org.ovirt.engine.core.common.businessentities.NonOperationalReason reason , java.util.Map < java.lang.String , java.lang.String > customLogValues ) { org.ovirt.engine.core.common.action.SetNonOperationalVdsParameters tempVar = new org.ovirt.engine.core.common.action.SetNonOperationalVdsParameters ( getVds ( ) . getId ( ) , reason , customLogValues ) ; runInternalAction ( VdcActionType.SetNonOperationalVds , tempVar , org.ovirt.engine.core.bll.job.ExecutionHandler.createInternalJobContext ( getContext ( ) ) ) ; }
Source:
private void run ( ) { org.ovirt.engine.core.common.businessentities.VM entity = ( ( org.ovirt.engine.core.common.businessentities.VM ) ( getItem ( ) . getEntity ( ) ) ) ; boolean reinitialize = ( ! ( entity.isInitialized ( ) ) ) && ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.isWindowsOsType ( entity.getVmOs ( ) ) ) ; org.ovirt.engine.core.common.action.RunVmParams tempVar = new org.ovirt.engine.core.common.action.RunVmParams ( entity.getId ( ) ) ; tempVar.setReinitialize ( reinitialize ) ; org.ovirt.engine.ui.frontend.Frontend.RunAction ( VdcActionType.RunVm , tempVar ) ; }

Target:
private void run ( ) { org.ovirt.engine.core.common.businessentities.VM entity = ( ( org.ovirt.engine.core.common.businessentities.VM ) ( getItem ( ) . getEntity ( ) ) ) ; boolean reinitialize = ( ! ( entity.isInitialized ( ) ) ) && ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.isWindowsOsType ( entity.getVmOsId ( ) ) ) ; org.ovirt.engine.core.common.action.RunVmParams tempVar = new org.ovirt.engine.core.common.action.RunVmParams ( entity.getId ( ) ) ; tempVar.setReinitialize ( reinitialize ) ; org.ovirt.engine.ui.frontend.Frontend.RunAction ( VdcActionType.RunVm , tempVar ) ; }
Source:
private void applyNetworkChangesToHosts ( ) { java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > parameters = prepareSetupNetworksParameters ( ) ; if ( ! ( parameters.isEmpty ( ) ) ) { runInternalMultipleActions ( VdcActionType.PersistentHostSetupNetworks , parameters ) ; } }

Target:
private void applyNetworkChangesToHosts ( ) { java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > parameters = syncNetworkParametersBuilder.buildParameters ( org.ovirt.engine.core.bll.network.dc.UpdateNetworkCommand.getNetwork ( ) , getOldNetwork ( ) ) ; if ( ! ( parameters.isEmpty ( ) ) ) { org.ovirt.engine.core.bll.network.HostSetupNetworksParametersBuilder.updateParametersSequencing ( parameters ) ; runInternalMultipleActions ( VdcActionType.PersistentHostSetupNetworks , parameters ) ; } }
Source:
private boolean validateInputManagementNetwork ( ) { managementNetwork = getManagementNetworkById ( ) ; if ( ( managementNetwork ) == null ) { addCanDoActionMessage ( EngineMessage.NETWORK_NOT_EXISTS ) ; return false ; } final org.ovirt.engine.core.bll.network.cluster.NetworkClusterValidatorBase networkClusterValidator = createNetworkClusterValidator ( ) ; return ( ( validate ( networkClusterValidator.networkBelongsToClusterDataCenter ( org.ovirt.engine.core.bll.AddVdsGroupCommand.getVdsGroup ( ) , managementNetwork ) ) ) && ( validate ( networkClusterValidator.managementNetworkRequired ( managementNetwork ) ) ) ) && ( validate ( networkClusterValidator.managementNetworkNotExternal ( managementNetwork ) ) ) ; }

Target:
private boolean validateInputManagementNetwork ( ) { managementNetwork = getManagementNetworkById ( ) ; if ( ( managementNetwork ) == null ) { addValidationMessage ( EngineMessage.NETWORK_NOT_EXISTS ) ; return false ; } final org.ovirt.engine.core.bll.network.cluster.NetworkClusterValidatorBase networkClusterValidator = createNetworkClusterValidator ( ) ; return ( ( validate ( networkClusterValidator.networkBelongsToClusterDataCenter ( org.ovirt.engine.core.bll.AddVdsGroupCommand.getVdsGroup ( ) , managementNetwork ) ) ) && ( validate ( networkClusterValidator.managementNetworkRequired ( managementNetwork ) ) ) ) && ( validate ( networkClusterValidator.managementNetworkNotExternal ( managementNetwork ) ) ) ; }
Source:
public void canDoActionInvalidSourceDomain ( ) { createParameters ( ) ; org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain = initStorageDomain ( srcStorageId ) ; storageDomain.setStatus ( StorageDomainStatus.Locked ) ; initDiskImage ( diskImageGroupId , diskImageId ) ; initVm ( VMStatus.Up , org.ovirt.engine.core.compat.Guid.newGuid ( ) , diskImageGroupId ) ; org.junit.Assert.assertFalse ( command.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( command.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_DOMAIN_STATUS_ILLEGAL2.toString ( ) ) ) ; }

Target:
public void canDoActionInvalidSourceDomain ( ) { createParameters ( ) ; org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain = initStorageDomain ( srcStorageId ) ; storageDomain.setStatus ( StorageDomainStatus.Locked ) ; initDiskImage ( diskImageGroupId , diskImageId ) ; initVm ( VMStatus.Up , org.ovirt.engine.core.compat.Guid.newGuid ( ) , diskImageGroupId ) ; org.junit.Assert.assertFalse ( command.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( command.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( EngineMessage.ACTION_TYPE_FAILED_STORAGE_DOMAIN_STATUS_ILLEGAL2.toString ( ) ) ) ; }
Source:
private void updateStorageDomainsAvailability ( ) { if ( ( disks ) == null ) { return ; } for ( org.ovirt.engine.ui.uicommonweb.models.vms.DiskModel diskModel : disks ) { diskModel.getSourceStorageDomain ( ) . setIsAvailable ( isSourceStorageDomainAvailable ) ; diskModel.getSourceStorageDomainName ( ) . setIsAvailable ( isSourceStorageDomainNameAvailable ) ; diskModel.getVolumeType ( ) . setIsAvailable ( isVolumeFormatAvailable ) ; diskModel.getVolumeType ( ) . setIsChangable ( isVolumeFormatChangable ) ; diskModel.getAlias ( ) . setIsChangable ( isAliasChangable ) ; } }

Target:
private void updateStorageDomainsAvailability ( ) { if ( ( disks ) == null ) { return ; } for ( org.ovirt.engine.ui.uicommonweb.models.vms.DiskModel diskModel : disks ) { diskModel.getSourceStorageDomain ( ) . setIsAvailable ( isSourceStorageDomainAvailable ) ; diskModel.getSourceStorageDomainName ( ) . setIsAvailable ( isSourceStorageDomainNameAvailable ) ; diskModel.getVolumeType ( ) . setIsAvailable ( isVolumeFormatAvailable ) ; diskModel.getVolumeType ( ) . setIsChangeable ( isVolumeFormatChangable ) ; diskModel.getAlias ( ) . setIsChangeable ( isAliasChangable ) ; } }
Source:
public org.ovirt.engine.core.bll.ValidationResult canAddRngDevice ( org.ovirt.engine.core.common.businessentities.VDSGroup cluster , org.ovirt.engine.core.common.businessentities.VmRngDevice rngDevice ) { org.ovirt.engine.core.common.businessentities.VmRngDevice.Source source = rngDevice.getSource ( ) ; boolean supported = ( ( cluster != null ) && ( isFeatureSupported ( cluster.getCompatibilityVersion ( ) ) ) ) && ( cluster.getRequiredRngSources ( ) . contains ( source ) ) ; if ( ! supported ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.ACTION_NOT_SUPPORTED_FOR_CLUSTER_POOL_LEVEL ) ; } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult canAddRngDevice ( org.ovirt.engine.core.common.businessentities.VDSGroup cluster , org.ovirt.engine.core.common.businessentities.VmRngDevice rngDevice ) { org.ovirt.engine.core.common.businessentities.VmRngDevice.Source source = rngDevice.getSource ( ) ; boolean supported = ( ( cluster != null ) && ( isFeatureSupported ( cluster.getCompatibilityVersion ( ) ) ) ) && ( cluster.getRequiredRngSources ( ) . contains ( source ) ) ; if ( ! supported ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_NOT_SUPPORTED_FOR_CLUSTER_POOL_LEVEL ) ; } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }
Source:
public void validateSameSourceAndDest ( ) { destStorageId = srcStorageId ; initializeCommand ( new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ) ; command.getParameters ( ) . setStorageDomainId ( destStorageId ) ; command.setStorageDomainId ( destStorageId ) ; initVmDiskImage ( false ) ; initSrcStorageDomain ( ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( command , EngineMessage.ACTION_TYPE_FAILED_SOURCE_AND_TARGET_SAME ) ; }

Target:
public void validateSameSourceAndDest ( ) { destStorageId = srcStorageId ; initializeCommand ( new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) , VmEntityType.VM ) ; command.getParameters ( ) . setStorageDomainId ( destStorageId ) ; command.setStorageDomainId ( destStorageId ) ; initSrcStorageDomain ( ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( command , EngineMessage.ACTION_TYPE_FAILED_SOURCE_AND_TARGET_SAME ) ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { java.util.Map < java.lang.Integer , java.util.Map < org.ovirt.engine.core.compat.Version , java.util.List < org.ovirt.engine.core.common.businessentities.DisplayType > > > result = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.displayTypes = new org.ovirt.engine.ui.uicommonweb.MapWithDefaults < java.lang.Integer , java.util.Map < org.ovirt.engine.core.compat.Version , java.util.List < org.ovirt.engine.core.common.businessentities.DisplayType > > > ( result , result.get ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.DEFAULT_OS_ID ) ) ; }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { windowsOsIds = ( ( java.util.ArrayList < java.lang.Integer > ) ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ) ) ; }
Source:
private void assertValidationFailure ( org.ovirt.engine.core.bll.ValidationResult validationResult , org.ovirt.engine.core.common.errors.EngineMessage engineMessage ) { assertFalse ( validationResult.isValid ( ) ) ; assertTrue ( java.lang.String.format ( "Expected %s but got %s" , engineMessage.name ( ) , validationResult.getMessage ( ) . name ( ) ) , ( ( validationResult.getMessage ( ) ) == engineMessage ) ) ; }

Target:
public void shouldDetectIndicesNotStartingWithZero ( ) { vmNumaNodes.get ( 0 ) . setIndex ( 2 ) ; vmNumaNodes.get ( 1 ) . setIndex ( 3 ) ; assertValidationFailure ( org.ovirt.engine.core.bll.numa.vm.NumaValidator.checkVmNumaNodesIntegrity ( vm , vm.getvNumaNodeList ( ) ) , EngineMessage.VM_NUMA_NODE_NON_CONTINUOUS_INDEX ) ; }
Source:
public java.lang.Void runInTransaction ( ) { for ( org.ovirt.engine.core.common.job.Step step : job.getSteps ( ) ) { if ( ( step.getStatus ( ) ) == ( org.ovirt.engine.core.common.job.JobExecutionStatus.STARTED ) ) { step.setStatus ( job.getStatus ( ) ) ; step.setEndTime ( job.getEndTime ( ) ) ; } } jobDao.update ( job ) ; return null ; }

Target:
public void loadJobSteps ( final org.ovirt.engine.core.common.job.Job job ) { java.util.List < org.ovirt.engine.core.common.job.Step > steps = stepDao.getStepsByJobId ( job.getId ( ) ) ; if ( ! ( steps.isEmpty ( ) ) ) { job.setSteps ( buildStepsTree ( steps ) ) ; } }
Source:
public void logout ( final java.lang.Object userObject , final org.ovirt.engine.ui.frontend.communication.UserCallback callback ) { getService ( ) . logOff ( ( ( org.ovirt.engine.core.common.businessentities.DbUser ) ( userObject ) ) , new com.google.gwt.user.client.rpc.AsyncCallback < org.ovirt.engine.core.common.action.VdcReturnValueBase > ( ) { @ java.lang.Override public void onSuccess ( final org.ovirt.engine.core.common.action.VdcReturnValueBase result ) { callback.onSuccess ( result ) ; } @ java.lang.Override public void onFailure ( final java.lang.Throwable caught ) { callback.onFailure ( caught ) ; } } ) ; }

Target:
public void serviceFound ( org.ovirt.engine.ui.frontend.gwtservices.GenericApiGWTServiceAsync foundService ) { foundService.logOff ( ( ( org.ovirt.engine.core.common.businessentities.DbUser ) ( userObject ) ) , new com.google.gwt.user.client.rpc.AsyncCallback < org.ovirt.engine.core.common.action.VdcReturnValueBase > ( ) { @ java.lang.Override public void onSuccess ( final org.ovirt.engine.core.common.action.VdcReturnValueBase result ) { xsrfRequestBuilder.setXsrfToken ( null ) ; callback.onSuccess ( result ) ; } @ java.lang.Override public void onFailure ( final java.lang.Throwable caught ) { xsrfRequestBuilder.setXsrfToken ( null ) ; callback.onFailure ( caught ) ; } } ) ; }
Source:
public void verifyListOfRunningVmsIsSameWithSuccessFromVdsmResponse ( ) { prepareForRefreshVmStatsCall ( ) ; mockGetVmStatsCommand ( true ) ; updater.fetchRunningVms ( ) ; java.util.List < org.ovirt.engine.core.compat.Guid > staleRunningVms = updater.checkVmsStatusChanged ( ) ; junit.framework.Assert.assertTrue ( updater.getRunningVms ( ) . containsKey ( org.ovirt.engine.core.vdsbroker.VdsUpdateRunTimeInfoTest.VM_1 ) ) ; junit.framework.Assert.assertFalse ( staleRunningVms.contains ( org.ovirt.engine.core.vdsbroker.VdsUpdateRunTimeInfoTest.VM_1 ) ) ; }

Target:
public void verifyListOfRunningVmsIsSameWithSuccessFromVdsmResponse ( ) { prepareForRefreshVmStatsCall ( ) ; mockGetVmStatsCommand ( true ) ; updater.fetchRunningVms ( ) ; java.util.List < org.ovirt.engine.core.compat.Guid > staleRunningVms = updater.checkVmsStatusChanged ( ) ; org.junit.Assert.assertTrue ( updater.getRunningVms ( ) . containsKey ( org.ovirt.engine.core.vdsbroker.VdsUpdateRunTimeInfoTest.VM_1 ) ) ; org.junit.Assert.assertFalse ( staleRunningVms.contains ( org.ovirt.engine.core.vdsbroker.VdsUpdateRunTimeInfoTest.VM_1 ) ) ; }
Source:
protected boolean validate ( ) { if ( ( org.ovirt.engine.core.bll.numa.vm.AbstractVmNumaNodeCommand.getVm ( ) ) == null ) { return failValidation ( EngineMessage.ACTION_TYPE_FAILED_VM_NOT_FOUND ) ; } if ( ! ( validate ( org.ovirt.engine.core.bll.numa.vm.NumaValidator.checkVmNumaIndexDuplicates ( org.ovirt.engine.core.bll.numa.vm.AbstractVmNumaNodeCommand.getParameters ( ) . getVmNumaNodeList ( ) ) ) ) ) { return false ; } return validate ( org.ovirt.engine.core.bll.numa.vm.NumaValidator.checkVmNumaNodesIntegrity ( org.ovirt.engine.core.bll.numa.vm.AbstractVmNumaNodeCommand.getVm ( ) , getVmNumaNodesForValidation ( ) ) ) ; }

Target:
protected boolean validate ( ) { if ( ( org.ovirt.engine.core.bll.numa.vm.AbstractVmNumaNodeCommand.getVm ( ) ) == null ) { return failValidation ( EngineMessage.ACTION_TYPE_FAILED_VM_NOT_FOUND ) ; } if ( ! ( validate ( getNumaValidator ( ) . checkVmNumaIndexDuplicates ( org.ovirt.engine.core.bll.numa.vm.AbstractVmNumaNodeCommand.getParameters ( ) . getVmNumaNodeList ( ) ) ) ) ) { return false ; } return validate ( getNumaValidator ( ) . checkVmNumaNodesIntegrity ( org.ovirt.engine.core.bll.numa.vm.AbstractVmNumaNodeCommand.getVm ( ) , getVmNumaNodesForValidation ( ) ) ) ; }
Source:
public void vdsNonOperational ( org.ovirt.engine.core.compat.Guid vdsId , org.ovirt.engine.core.common.businessentities.NonOperationalReason reason , boolean logCommand , boolean saveToDb , org.ovirt.engine.core.compat.Guid domainId , java.util.Map < java.lang.String , java.lang.String > customLogValues ) { org.ovirt.engine.core.bll.job.ExecutionHandler.updateSpecificActionJobCompleted ( vdsId , VdcActionType.MaintananceVds , false ) ; org.ovirt.engine.core.common.action.SetNonOperationalVdsParameters tempVar = new org.ovirt.engine.core.common.action.SetNonOperationalVdsParameters ( vdsId , reason , customLogValues ) ; tempVar.setSaveToDb ( saveToDb ) ; tempVar.setStorageDomainId ( domainId ) ; tempVar.setShouldBeLogged ( logCommand ) ; org.ovirt.engine.core.bll.Backend.getInstance ( ) . runInternalAction ( VdcActionType.SetNonOperationalVds , tempVar ) ; }

Target:
public void vdsNonOperational ( org.ovirt.engine.core.compat.Guid vdsId , org.ovirt.engine.core.common.businessentities.NonOperationalReason reason , boolean logCommand , boolean saveToDb , org.ovirt.engine.core.compat.Guid domainId , java.util.Map < java.lang.String , java.lang.String > customLogValues ) { org.ovirt.engine.core.bll.job.ExecutionHandler.updateSpecificActionJobCompleted ( vdsId , VdcActionType.MaintananceVds , false ) ; org.ovirt.engine.core.common.action.SetNonOperationalVdsParameters tempVar = new org.ovirt.engine.core.common.action.SetNonOperationalVdsParameters ( vdsId , reason , customLogValues ) ; tempVar.setSaveToDb ( saveToDb ) ; tempVar.setStorageDomainId ( domainId ) ; tempVar.setShouldBeLogged ( logCommand ) ; org.ovirt.engine.core.bll.Backend.getInstance ( ) . runInternalAction ( VdcActionType.SetNonOperationalVds , tempVar , org.ovirt.engine.core.bll.job.ExecutionHandler.createInternalJobContext ( ) ) ; }
Source:
protected void ExecuteVdsBrokerCommand ( ) { status = org.ovirt.engine.core.vdsbroker.gluster.AddGlusterHookVDSCommand.getBroker ( ) . glusterHookAdd ( org.ovirt.engine.core.vdsbroker.gluster.AddGlusterHookVDSCommand.getParameters ( ) . getGlusterCommand ( ) , org.ovirt.engine.core.vdsbroker.gluster.AddGlusterHookVDSCommand.getParameters ( ) . getHookStage ( ) . toString ( ) , org.ovirt.engine.core.vdsbroker.gluster.AddGlusterHookVDSCommand.getParameters ( ) . getHookName ( ) , org.ovirt.engine.core.vdsbroker.gluster.AddGlusterHookVDSCommand.getParameters ( ) . getHookContent ( ) , org.ovirt.engine.core.vdsbroker.gluster.AddGlusterHookVDSCommand.getParameters ( ) . getChecksum ( ) , org.ovirt.engine.core.vdsbroker.gluster.AddGlusterHookVDSCommand.getParameters ( ) . getEnabled ( ) ) ; org.ovirt.engine.core.vdsbroker.gluster.AddGlusterHookVDSCommand.proceedProxyReturnValue ( ) ; }

Target:
protected void executeVdsBrokerCommand ( ) { status = org.ovirt.engine.core.vdsbroker.gluster.AddGlusterHookVDSCommand.getBroker ( ) . glusterHookAdd ( org.ovirt.engine.core.vdsbroker.gluster.AddGlusterHookVDSCommand.getParameters ( ) . getGlusterCommand ( ) , org.ovirt.engine.core.vdsbroker.gluster.AddGlusterHookVDSCommand.getParameters ( ) . getHookStage ( ) . toString ( ) , org.ovirt.engine.core.vdsbroker.gluster.AddGlusterHookVDSCommand.getParameters ( ) . getHookName ( ) , org.ovirt.engine.core.vdsbroker.gluster.AddGlusterHookVDSCommand.getParameters ( ) . getHookContent ( ) , org.ovirt.engine.core.vdsbroker.gluster.AddGlusterHookVDSCommand.getParameters ( ) . getChecksum ( ) , org.ovirt.engine.core.vdsbroker.gluster.AddGlusterHookVDSCommand.getParameters ( ) . getEnabled ( ) ) ; org.ovirt.engine.core.vdsbroker.gluster.AddGlusterHookVDSCommand.proceedProxyReturnValue ( ) ; }
Source:
public void sameBondNameSentTwice ( ) { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface bond = createBond ( org.ovirt.engine.core.bll.network.host.SetupNetworksHelperTest.BOND_NAME , null ) ; mockExistingIfaces ( bond ) ; org.ovirt.engine.core.bll.network.host.SetupNetworksHelper helper = createHelper ( createParametersForNics ( bond , bond ) ) ; validateAndExpectViolation ( helper , VdcBllMessages.NETWORK_INTERFACES_ALREADY_SPECIFIED , bond.getName ( ) ) ; }

Target:
public void vlanBondNameMismatch ( ) { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface bond = createBond ( org.ovirt.engine.core.bll.network.host.SetupNetworksHelperTest.BOND_NAME , null ) ; org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface anotherBond = createBond ( ( ( org.ovirt.engine.core.bll.network.host.SetupNetworksHelperTest.BOND_NAME ) + "1" ) , null ) ; java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > ifacesToBond = createNics ( null ) ; org.ovirt.engine.core.common.action.SetupNetworksParameters parameters = createParametersForBond ( bond , ifacesToBond ) ; parameters.getInterfaces ( ) . add ( createVlan ( anotherBond , 100 , "net" ) ) ; mockExistingIfacesWithBond ( bond , ifacesToBond ) ; org.ovirt.engine.core.bll.network.host.SetupNetworksHelper helper = createHelper ( parameters ) ; validateAndExpectViolation ( helper , EngineMessage.NETWORK_INTERFACES_DONT_EXIST , anotherBond.getName ( ) ) ; }
Source:
public void onSucceeded ( ) { updateEntityPhase ( ImageTransferPhase.FINISHED_SUCCESS ) ; log.debug ( "Removing ImageUpload id {}" , org.ovirt.engine.core.bll.storage.disk.image.UploadImageCommand.getCommandId ( ) ) ; imageTransferDao.remove ( org.ovirt.engine.core.bll.storage.disk.image.UploadImageCommand.getCommandId ( ) ) ; org.ovirt.engine.core.bll.storage.disk.image.UploadImageCommand.endSuccessfully ( ) ; log.info ( "Successfully uploaded (command id '{}')" , getUploadDescription ( ) , org.ovirt.engine.core.bll.storage.disk.image.UploadImageCommand.getCommandId ( ) ) ; }

Target:
public void onSucceeded ( ) { updateEntityPhase ( ImageTransferPhase.FINISHED_SUCCESS ) ; log.debug ( "Removing ImageTransfer id {}" , org.ovirt.engine.core.bll.storage.disk.image.TransferImageCommand.getCommandId ( ) ) ; imageTransferDao.remove ( org.ovirt.engine.core.bll.storage.disk.image.TransferImageCommand.getCommandId ( ) ) ; org.ovirt.engine.core.bll.storage.disk.image.TransferImageCommand.endSuccessfully ( ) ; log.info ( "Successfully transferred. (command id '{}')" , getTransferDescription ( ) , org.ovirt.engine.core.bll.storage.disk.image.TransferImageCommand.getCommandId ( ) ) ; }
Source:
public boolean validateQuotaNameIsUnique ( org.ovirt.engine.core.common.businessentities.Quota quota ) { org.ovirt.engine.core.common.businessentities.Quota quotaByName = getQuotaDao ( ) . getQuotaByQuotaName ( quota.getQuotaName ( ) , quota.getStoragePoolId ( ) ) ; if ( ( quotaByName != null ) && ( ! ( quotaByName.getId ( ) . equals ( quota.getId ( ) ) ) ) ) { addValidationMessage ( EngineMessage.ACTION_TYPE_FAILED_NAME_ALREADY_USED ) ; return false ; } return true ; }

Target:
public boolean validateQuotaNameIsUnique ( org.ovirt.engine.core.common.businessentities.Quota quota ) { org.ovirt.engine.core.common.businessentities.Quota quotaByName = quotaDao.getQuotaByQuotaName ( quota.getQuotaName ( ) , quota.getStoragePoolId ( ) ) ; if ( ( quotaByName != null ) && ( ! ( quotaByName.getId ( ) . equals ( quota.getId ( ) ) ) ) ) { addValidationMessage ( EngineMessage.ACTION_TYPE_FAILED_NAME_ALREADY_USED ) ; return false ; } return true ; }