auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
protected boolean isVirtioScsiEnabled ( ) { java.lang.Boolean virtioScsiEnabled = org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . isVirtioScsiEnabled ( ) ; boolean isOsSupportedForVirtIoScsi = org.ovirt.engine.core.bll.validator.VmValidationUtils.isDiskInterfaceSupportedByOs ( org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . getVm ( ) . getOs ( ) , org.ovirt.engine.core.bll.AddVmCommand.getEffectiveCompatibilityVersion ( ) , DiskInterface.VirtIO_SCSI ) ; return virtioScsiEnabled != null ? virtioScsiEnabled : ( org.ovirt.engine.core.common.FeatureSupported.virtIoScsi ( org.ovirt.engine.core.bll.AddVmCommand.getEffectiveCompatibilityVersion ( ) ) ) && isOsSupportedForVirtIoScsi ; }

Target:
protected boolean isVirtioScsiEnabled ( ) { java.lang.Boolean virtioScsiEnabled = org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . isVirtioScsiEnabled ( ) ; boolean isOsSupportedForVirtIoScsi = org.ovirt.engine.core.bll.validator.VmValidationUtils.isDiskInterfaceSupportedByOs ( org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . getVm ( ) . getOs ( ) , org.ovirt.engine.core.bll.AddVmCommand.getVdsGroup ( ) . getCompatibilityVersion ( ) , DiskInterface.VirtIO_SCSI ) ; return virtioScsiEnabled != null ? virtioScsiEnabled : ( org.ovirt.engine.core.common.FeatureSupported.virtIoScsi ( org.ovirt.engine.core.bll.AddVmCommand.getVdsGroup ( ) . getCompatibilityVersion ( ) ) ) && isOsSupportedForVirtIoScsi ; }
Source:
protected boolean canDoAction ( ) { java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.StorageDomain > domainsMap = new java.util.HashMap < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.StorageDomain > ( ) ; if ( ! ( canDoActionBeforeCloneVm ( domainsMap ) ) ) { return false ; } if ( getParameters ( ) . isImportAsNewEntity ( ) ) { initImportClonedVm ( ) ; } return canDoActionAfterCloneVm ( domainsMap ) ; }

Target:
public org.ovirt.engine.core.compat.Guid getVmId ( ) { if ( getParameters ( ) . isImportAsNewEntity ( ) ) { return getParameters ( ) . getVm ( ) . getId ( ) ; } return super . getVmId ( ) ; }
Source:
private boolean isShareableDiskOnGlusterDomain ( ) { if ( ( org.ovirt.engine.core.bll.AddDiskCommand.getParameters ( ) . getDiskInfo ( ) . isShareable ( ) ) && ( ( org.ovirt.engine.core.bll.AddDiskCommand.getStorageDomain ( ) . getStorageType ( ) ) == ( org.ovirt.engine.core.common.businessentities.storage.StorageType.GLUSTERFS ) ) ) { addCanDoActionMessage ( VdcBllMessages.ACTION_TYPE_FAILED_SHAREABLE_DISKS_NOT_SUPPORTED_ON_GLUSTER_DOMAIN ) ; return true ; } return false ; }

Target:
private boolean isShareableDiskOnGlusterDomain ( ) { if ( ( org.ovirt.engine.core.bll.AddDiskCommand.getParameters ( ) . getDiskInfo ( ) . isShareable ( ) ) && ( ( org.ovirt.engine.core.bll.AddDiskCommand.getStorageDomain ( ) . getStorageType ( ) ) == ( org.ovirt.engine.core.common.businessentities.storage.StorageType.GLUSTERFS ) ) ) { addCanDoActionMessage ( EngineMessage.ACTION_TYPE_FAILED_SHAREABLE_DISKS_NOT_SUPPORTED_ON_GLUSTER_DOMAIN ) ; return true ; } return false ; }
Source:
public java.lang.Void call ( ) { proxy.deleteVolume ( cinderDisk.getImageId ( ) . toString ( ) ) ; return null ; }

Target:
public java.lang.Boolean call ( ) { try { proxy.deleteVolume ( cinderDisk.getImageId ( ) . toString ( ) ) ; return true ; } catch ( com.woorea.openstack.base.client.OpenStackResponseException ex ) { if ( ( ex.getStatus ( ) ) == ( org.apache.commons.httpclient.HttpStatus.SC_NOT_FOUND ) ) { return false ; } throw ex ; } }
Source:
public void setActionMessageParameters ( ) { cmd.setActionMessageParameters ( ) ; java.util.List < java.lang.String > messages = cmd.getReturnValue ( ) . getValidationMessages ( ) ; org.junit.Assert.assertTrue ( "action name not in messages" , messages.remove ( EngineMessage.VAR__ACTION__UPDATE.name ( ) ) ) ; org.junit.Assert.assertTrue ( "type not in messages" , messages.remove ( EngineMessage.VAR__TYPE__STORAGE__DOMAIN.name ( ) ) ) ; org.junit.Assert.assertTrue ( ( "redundant messages " + messages ) , messages.isEmpty ( ) ) ; }

Target:
public void setActionMessageParameters ( ) { cmd.setActionMessageParameters ( ) ; java.util.List < java.lang.String > messages = cmd.getReturnValue ( ) . getValidationMessages ( ) ; org.junit.jupiter.api.Assertions.assertTrue ( messages.remove ( EngineMessage.VAR__ACTION__UPDATE.name ( ) ) , "action name not in messages" ) ; org.junit.jupiter.api.Assertions.assertTrue ( messages.remove ( EngineMessage.VAR__TYPE__STORAGE__DOMAIN.name ( ) ) , "type not in messages" ) ; org.junit.jupiter.api.Assertions.assertTrue ( messages.isEmpty ( ) , ( "redundant messages " + messages ) ) ; }
Source:
private java.util.Map < java.lang.String , java.lang.String > getFingerprints ( java.util.Set < java.lang.String > servers ) { java.util.Map < java.lang.String , java.lang.String > fingerprints = new java.util.HashMap < java.lang.String , java.lang.String > ( ) ; for ( java.lang.String server : servers ) { fingerprints.put ( server , getFingerprint ( server ) ) ; } return fingerprints ; }

Target:
public org.ovirt.engine.core.bll.interfaces.BackendInternal getBackendInstance ( ) { return org.ovirt.engine.core.bll.Backend.getInstance ( ) ; }
Source:
private static void assertGetAllForStoragePoolResult ( java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > result ) { org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertFalse ( result.isEmpty ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.StorageDomain domain : result ) { org.junit.Assert.assertEquals ( org.ovirt.engine.core.dao.StorageDomainDAOTest.EXISTING_STORAGE_POOL_ID , domain.getStoragePoolId ( ) ) ; } }

Target:
private static void assertGetAllForStoragePoolResult ( java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > result , org.ovirt.engine.core.compat.Guid expectedStoragePoolId ) { org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertFalse ( result.isEmpty ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.StorageDomain domain : result ) { org.junit.Assert.assertEquals ( expectedStoragePoolId , domain.getStoragePoolId ( ) ) ; } }
Source:
protected void mockVds ( ) { org.ovirt.engine.core.common.businessentities.VDS vds = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; vds.setClusterCompatibilityVersion ( new org.ovirt.engine.core.compat.Version ( "3.1" ) ) ; org.mockito.Mockito.doReturn ( vdsDao ) . when ( command ) . getVdsDao ( ) ; org.mockito.Mockito.when ( vdsDao.get ( org.mockito.Mockito.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( vds ) ; }

Target:
protected void mockVds ( ) { org.ovirt.engine.core.common.businessentities.VDS vds = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; vds.setClusterCompatibilityVersion ( org.ovirt.engine.core.compat.Version.getLast ( ) ) ; org.mockito.Mockito.doReturn ( vdsDao ) . when ( command ) . getVdsDao ( ) ; org.mockito.Mockito.when ( vdsDao.get ( org.mockito.Mockito.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( vds ) ; }
Source:
protected org.ovirt.engine.core.common.businessentities.storage_domains getInverse ( org.ovirt.engine.core.common.businessentities.storage_domain_static to ) { org.ovirt.engine.core.common.businessentities.storage_domains inverse = new org.ovirt.engine.core.common.businessentities.storage_domains ( ) ; inverse.setId ( to.getId ( ) ) ; inverse.setstorage_name ( to.getstorage_name ( ) ) ; inverse.setstorage_domain_type ( to.getstorage_domain_type ( ) ) ; inverse.setstorage_type ( to.getstorage_type ( ) ) ; inverse.setStorageFormat ( to.getStorageFormat ( ) ) ; return inverse ; }

Target:
protected org.ovirt.engine.core.common.businessentities.storage_domains getInverse ( org.ovirt.engine.core.common.businessentities.StorageDomainStatic to ) { org.ovirt.engine.core.common.businessentities.storage_domains inverse = new org.ovirt.engine.core.common.businessentities.storage_domains ( ) ; inverse.setId ( to.getId ( ) ) ; inverse.setstorage_name ( to.getstorage_name ( ) ) ; inverse.setstorage_domain_type ( to.getstorage_domain_type ( ) ) ; inverse.setstorage_type ( to.getstorage_type ( ) ) ; inverse.setStorageFormat ( to.getStorageFormat ( ) ) ; return inverse ; }
Source:
public void getExternalNetworkMap ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid providerId ) { 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.HashMap < org.ovirt.engine.core.common.businessentities.network.Network , java.util.Set < org.ovirt.engine.core.compat.Guid > > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllExternalNetworksOnProvider , new org.ovirt.engine.core.common.queries.IdQueryParameters ( providerId ) , aQuery ) ; }

Target:
public void getExternalNetworkMap ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid providerId ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.MapConverter < > ( ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllExternalNetworksOnProvider , new org.ovirt.engine.core.common.queries.IdQueryParameters ( providerId ) , aQuery ) ; }
Source:
protected boolean canDoAction ( ) { if ( ( hostedEngineHelper.getStorageDomain ( ) ) != null ) { return failCanDoAction ( EngineMessage.ACTION_TYPE_FAILED_STORAGE_DOMAIN_ALREADY_EXIST ) ; } if ( ! ( fetchStorageDomainInfo ( ) ) ) { return failCanDoAction ( EngineMessage.ACTION_TYPE_FAILED_STORAGE_DOMAIN_NOT_EXIST ) ; } if ( ! ( java.util.Arrays.asList ( org.ovirt.engine.core.bll.ImportHostedEngineStorageDomainCommand.SUPPORTED_DOMAIN_TYPES ) . contains ( heStorageDomain.getStorageType ( ) ) ) ) { return failCanDoAction ( EngineMessage.ACTION_TYPE_FAILED_STORAGE_DOMAIN_TYPE_UNSUPPORTED ) ; } return true ; }

Target:
protected void init ( ) { fetchStorageDomainInfo ( ) ; }
Source:
public void testUpdateWithExistingNetwork ( ) throws java.lang.Exception { setUpGetEntityExpectations ( 2 ) ; setGetVmQueryExpectations ( 2 ) ; setGetNetworksQueryExpectations ( 2 ) ; setGetGuestAgentQueryExpectations ( 1 ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.UpdateVmInterface , org.ovirt.engine.core.common.action.AddVmInterfaceParameters.class , new java.lang.String [ ] { "VmId" , "Interface.Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.AbstractBackendNicsResourceTest.PARENT_ID , GUIDS [ 1 ] } , true , true ) ) ; org.ovirt.engine.api.model.NIC nic = resource.update ( getNic ( true ) ) ; assertNotNull ( nic ) ; }

Target:
public void testUpdateWithExistingNetwork ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setAllContentHeaderExpectation ( ) ; setUpEntityQueryExpectations ( 2 ) ; setGetVmQueryExpectations ( 2 ) ; setGetNetworksQueryExpectations ( 2 ) ; setGetGuestAgentQueryExpectations ( 1 ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.UpdateVmInterface , org.ovirt.engine.core.common.action.AddVmInterfaceParameters.class , new java.lang.String [ ] { "VmId" , "Interface.Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.AbstractBackendNicsResourceTest.PARENT_ID , GUIDS [ 1 ] } , true , true ) ) ; org.ovirt.engine.api.model.NIC nic = resource.update ( getNic ( true ) ) ; assertNotNull ( nic ) ; }
Source:
public static void GetProviderCertificateChain ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.common.businessentities.Provider provider ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetProviderCertificateChain , new org.ovirt.engine.core.common.queries.ProviderQueryParameters ( provider ) , aQuery ) ; }

Target:
public static void getExternalProviderDiscoveredHostList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.common.businessentities.Provider provider ) { 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.ExternalDiscoveredHost > ( ) ; } return source ; } } ; org.ovirt.engine.core.common.queries.ProviderQueryParameters params = new org.ovirt.engine.core.common.queries.ProviderQueryParameters ( ) ; params.setProvider ( provider ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetDiscoveredHostListFromExternalProvider , params , aQuery ) ; }
Source:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event < ? extends org.ovirt.engine.ui.uicompat.EventArgs > ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { revealStorageView ( disk ) ; }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event < ? extends org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs > ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs args ) { java.lang.String propName = args.propertyName ; if ( "Message" . equals ( propName ) ) { if ( ! ( org.ovirt.engine.core.compat.StringHelper.isNullOrEmpty ( disk.getMessage ( ) ) ) ) { disableWidget ( getWidget ( ) ) ; disk.getDefaultCommand ( ) . setIsExecutionAllowed ( false ) ; } } }
Source:
public void canDoActionWrongDiskImageTypeTemplate ( ) throws java.lang.Exception { initializeCommand ( ImageOperation.Move ) ; initTemplateDiskImage ( ) ; org.junit.Assert.assertFalse ( command.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( command.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( VdcBllMessages.ACTION_TYPE_FAILED_DISK_IS_NOT_VM_DISK.toString ( ) ) ) ; }

Target:
public void canDoActionWrongDiskImageTypeTemplate ( ) throws java.lang.Exception { initializeCommand ( ImageOperation.Move ) ; initTemplateDiskImage ( ) ; org.junit.Assert.assertFalse ( command.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( command.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( EngineMessage.ACTION_TYPE_FAILED_DISK_IS_NOT_VM_DISK.toString ( ) ) ) ; }
Source:
public org.ovirt.engine.api.model.Network lookupEntity ( org.ovirt.engine.core.compat.Guid ignore ) throws org.ovirt.engine.api.restapi.resource.BackendFailureException { return getEntity ( org.ovirt.engine.api.model.Network.class , VdcQueryType.GetNetworkById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( guid ) , id ) ; }

Target:
public org.ovirt.engine.api.model.Network update ( org.ovirt.engine.api.model.Network incoming ) { org.ovirt.engine.api.model.Network network = map ( incoming , map ( get ( ) ) ) ; network.getCluster ( ) . setNetworkId ( network.getId ( ) ) ; network.getCluster ( ) . setClusterId ( cluster.getCluster ( ) . getId ( ) ) ; performAction ( VdcActionType.UpdateNetworkOnCluster , new org.ovirt.engine.core.common.action.NetworkClusterParameters ( network.getCluster ( ) ) ) ; return get ( ) ; }
Source:
private static void testKeyString ( final java.lang.String keyEncoding , final java.lang.String goodKeyString ) throws java.lang.Exception { final java.security.PublicKey key = org.ovirt.engine.core.uutils.ssh.OpenSSHUtilsTest.decodeKey ( keyEncoding ) ; final java.lang.String keyString = org.ovirt.engine.core.uutils.ssh.OpenSSHUtils.getKeyString ( key , null ) ; org.junit.Assert.assertEquals ( goodKeyString , keyString ) ; org.junit.Assert.assertEquals ( key , org.ovirt.engine.core.uutils.ssh.OpenSSHUtils.decodeKeyString ( keyString ) ) ; }

Target:
private static void testKeyString ( final java.lang.String keyEncoding , final java.lang.String goodKeyString ) throws java.lang.Exception { final java.security.PublicKey key = org.ovirt.engine.core.uutils.ssh.OpenSSHUtilsTest.decodeKey ( keyEncoding ) ; final java.lang.String keyString = org.ovirt.engine.core.uutils.ssh.OpenSSHUtils.getKeyString ( key , null ) ; org.junit.jupiter.api.Assertions.assertEquals ( goodKeyString , keyString ) ; org.junit.jupiter.api.Assertions.assertEquals ( key , org.ovirt.engine.core.uutils.ssh.OpenSSHUtils.decodeKeyString ( keyString ) ) ; }
Source:
protected java.util.Map < java.lang.String , org.ovirt.engine.core.common.utils.Pair < java.lang.String , java.lang.String > > getExclusiveLocks ( ) { java.util.Map < java.lang.String , org.ovirt.engine.core.common.utils.Pair < java.lang.String , java.lang.String > > locks = new java.util.HashMap < java.lang.String , org.ovirt.engine.core.common.utils.Pair < java.lang.String , java.lang.String > > ( ) ; java.util.Map < java.lang.String , org.ovirt.engine.core.common.utils.Pair < java.lang.String , java.lang.String > > parentLocks = super . getExclusiveLocks ( ) ; if ( parentLocks != null ) { locks.putAll ( parentLocks ) ; } locks.put ( org.ovirt.engine.core.bll.AddVmFromTemplateCommand.getVmTemplateId ( ) . toString ( ) , LockMessagesMatchUtil.TEMPLATE ) ; return locks ; }

Target:
protected java.util.Map < java.lang.String , org.ovirt.engine.core.common.utils.Pair < java.lang.String , java.lang.String > > getSharedLocks ( ) { java.util.Map < java.lang.String , org.ovirt.engine.core.common.utils.Pair < java.lang.String , java.lang.String > > locks = new java.util.HashMap < java.lang.String , org.ovirt.engine.core.common.utils.Pair < java.lang.String , java.lang.String > > ( ) ; java.util.Map < java.lang.String , org.ovirt.engine.core.common.utils.Pair < java.lang.String , java.lang.String > > parentLocks = super . getSharedLocks ( ) ; if ( parentLocks != null ) { locks.putAll ( parentLocks ) ; } locks.put ( org.ovirt.engine.core.bll.AddVmFromTemplateCommand.getVmTemplateId ( ) . toString ( ) , LockMessagesMatchUtil.TEMPLATE ) ; return locks ; }
Source:
public void testConnection ( ) { chooseDcForCheckingIfGetNamesFromExternalProviderSupported ( ) ; org.ovirt.engine.core.common.queries.QueryReturnValue retVal = org.ovirt.engine.core.bll.Backend.getInstance ( ) . runInternalQuery ( QueryType.GetVmsFromExternalProvider , buildGetVmsFromExternalProviderQueryParameters ( ) ) ; if ( ! ( retVal.getSucceeded ( ) ) ) { throw new org.ovirt.engine.core.common.errors.EngineException ( org.ovirt.engine.core.common.errors.EngineError.PROVIDER_FAILURE , retVal.getExceptionString ( ) ) ; } }

Target:
public void testConnection ( ) { chooseDcForCheckingIfGetNamesFromExternalProviderSupported ( ) ; org.ovirt.engine.core.common.queries.QueryReturnValue retVal = backend.runInternalQuery ( QueryType.GetVmsFromExternalProvider , buildGetVmsFromExternalProviderQueryParameters ( ) ) ; if ( ! ( retVal.getSucceeded ( ) ) ) { throw new org.ovirt.engine.core.common.errors.EngineException ( org.ovirt.engine.core.common.errors.EngineError.PROVIDER_FAILURE , retVal.getExceptionString ( ) ) ; } }
Source:
private void mockJobDao ( org.ovirt.engine.core.common.job.Job job ) { job.setJobSubjectEntities ( org.ovirt.engine.core.bll.job.JobRepositoryTest.JOB_SUBJECT_ENTITIES_MAP ) ; org.mockito.Mockito.when ( jobDao.get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( job ) ; }

Target:
public void getJobWithSteps ( ) { org.ovirt.engine.core.common.job.Job jobWithSteps = jobRepository.getJobWithSteps ( job.getId ( ) ) ; org.junit.Assert.assertNotNull ( jobWithSteps ) ; org.junit.Assert.assertNotNull ( jobWithSteps.getSteps ( ) ) ; org.junit.Assert.assertTrue ( ( ! ( jobWithSteps.getSteps ( ) . isEmpty ( ) ) ) ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.core.bll.job.JobRepositoryTest.JOB_SUBJECT_ENTITIES_MAP , jobWithSteps.getJobSubjectEntities ( ) ) ; }
Source:
public void calculateNetworkImplementationDetailsNetworkQosOutOfSync ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface = createNetworkDevice ( ) ; calculateNetworkImplementationDetailsAndAssertSync ( iface , false , iface.getNetworkName ( ) , iface.isBridged ( ) , iface.getMtu ( ) , iface.getVlanId ( ) , new org.ovirt.engine.core.common.businessentities.network.NetworkQoS ( ) ) ; }

Target:
public void calculateNetworkImplementationDetailsNetworkVmNetworkOutOfSync ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface = createNetworkDevice ( ) ; calculateNetworkImplementationDetailsAndAssertSync ( iface , false , iface.getNetworkName ( ) , ( ! ( iface.isBridged ( ) ) ) , iface.getMtu ( ) , iface.getVlanId ( ) , createQos ( ) ) ; }
Source:
public static void getClusterList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > list = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ) ( source ) ) ; java.util.Collections.sort ( list , new org.ovirt.engine.core.common.businessentities.comparators.NameableComparator ( ) ) ; return list ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllVdsGroups , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }

Target:
public static void getClusterList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > list = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ) ( source ) ) ; java.util.Collections.sort ( list , new org.ovirt.engine.core.common.businessentities.comparators.NameableComparator ( ) ) ; return list ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVdsGroupsByStoragePoolId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) , aQuery ) ; }
Source:
private void mockBackendQuery ( org.ovirt.engine.core.common.queries.QueryType queryType , java.lang.Object returnValue ) { org.ovirt.engine.core.common.queries.VdcQueryReturnValue queryReturnValue = new org.ovirt.engine.core.common.queries.VdcQueryReturnValue ( ) ; queryReturnValue.setReturnValue ( returnValue ) ; org.mockito.Mockito.when ( mockBackend.runPublicQuery ( org.mockito.ArgumentMatchers.eq ( queryType ) , org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.common.queries.QueryParametersBase.class ) ) ) . thenReturn ( queryReturnValue ) ; }

Target:
private void mockBackendQuery ( org.ovirt.engine.core.common.queries.QueryType queryType , java.lang.Object returnValue ) { org.ovirt.engine.core.common.queries.QueryReturnValue queryReturnValue = new org.ovirt.engine.core.common.queries.QueryReturnValue ( ) ; queryReturnValue.setReturnValue ( returnValue ) ; org.mockito.Mockito.when ( mockBackend.runPublicQuery ( org.mockito.ArgumentMatchers.eq ( queryType ) , org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.common.queries.QueryParametersBase.class ) ) ) . thenReturn ( queryReturnValue ) ; }
Source:
public java.lang.String toString ( ) { return org.ovirt.engine.core.common.utils.ToStringBuilder.forInstance ( this ) . append ( "address" , getAddress ( ) ) . append ( "netmask" , getPrefix ( ) ) . append ( "gateway" , getGateway ( ) ) . append ( "bootProtocol" , getBootProtocol ( ) ) . build ( ) ; }

Target:
public java.lang.String toString ( ) { return org.ovirt.engine.core.common.utils.ToStringBuilder.forInstance ( this ) . append ( "address" , getAddress ( ) ) . append ( "prefix" , getPrefix ( ) ) . append ( "gateway" , getGateway ( ) ) . append ( "bootProtocol" , getBootProtocol ( ) ) . build ( ) ; }
Source:
private void initImportClonedTemplateDisks ( ) { for ( org.ovirt.engine.core.common.businessentities.DiskImage image : getParameters ( ) . getImages ( ) ) { newDiskIdForDisk.put ( image.getId ( ) , image ) ; if ( getParameters ( ) . isImportAsNewEntity ( ) ) { image.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; image.setImageId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; } } }

Target:
private void initImportClonedTemplateDisks ( ) { for ( org.ovirt.engine.core.common.businessentities.DiskImage image : getParameters ( ) . getImages ( ) ) { if ( getParameters ( ) . isImportAsNewEntity ( ) ) { generateNewDiskId ( image ) ; updateManagedDeviceMap ( image , getVmTemplate ( ) . getManagedDeviceMap ( ) ) ; } else { newDiskIdForDisk.put ( image.getId ( ) , image ) ; } } }
Source:
public java.util.Set < org.ovirt.engine.core.common.businessentities.GraphicsType > graphicsTypesToBeSet ( ) { java.util.HashSet < org.ovirt.engine.core.common.businessentities.GraphicsType > result = new java.util.HashSet < org.ovirt.engine.core.common.businessentities.GraphicsType > ( ) ; for ( org.ovirt.engine.core.common.businessentities.GraphicsType graphicsType : org.ovirt.engine.core.common.businessentities.GraphicsType.values ( ) ) { if ( ( graphicsDevices.get ( graphicsType ) ) != null ) { result.add ( graphicsType ) ; } } return result ; }

Target:
public boolean isUpdateNuma ( ) { return updateNuma ; }
Source:
public org.ovirt.engine.ui.common.uicommon.model.SearchableDetailModelProvider < org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity , org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterListModel , org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterGlusterHookListModel > getClusterGlusterHookListProvider ( org.ovirt.engine.ui.webadmin.gin.ClientGinjector ginjector , final com.google.inject.Provider < org.ovirt.engine.ui.common.presenter.popup.DefaultConfirmationPopupPresenterWidget > confirmPopupProvider ) { return new org.ovirt.engine.ui.common.uicommon.model.SearchableDetailTabModelProvider < org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity , org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterListModel , org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterGlusterHookListModel > ( ginjector , org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterListModel.class , org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterGlusterHookListModel.class ) { @ java.lang.Override public org.ovirt.engine.ui.common.presenter.AbstractModelBoundPopupPresenterWidget < ? extends org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel , ? > getConfirmModelPopup ( org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterGlusterHookListModel source , org.ovirt.engine.ui.uicommonweb.UICommand lastExecutedCommand ) { if ( lastExecutedCommand == ( getModel ( ) . getDisableHookCommand ( ) ) ) { return confirmPopupProvider.get ( ) ; } else { return super . getConfirmModelPopup ( source , lastExecutedCommand ) ; } } } ; }

Target:
public org.ovirt.engine.ui.common.presenter.AbstractModelBoundPopupPresenterWidget < ? extends org.ovirt.engine.ui.uicommonweb.models.Model , ? > getModelPopup ( org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterGlusterHookListModel source , org.ovirt.engine.ui.uicommonweb.UICommand lastExecutedCommand , org.ovirt.engine.ui.uicommonweb.models.Model windowModel ) { if ( lastExecutedCommand == ( getModel ( ) . getViewHookCommand ( ) ) ) { return contentPopupProvider.get ( ) ; } else { return super . getModelPopup ( source , lastExecutedCommand , windowModel ) ; } }
Source:
public static boolean isPersistentAuth ( javax.servlet.http.HttpServletRequest req ) { return java.util.Collections.list ( req.getHeaders ( org.ovirt.engine.core.aaa.filters.FiltersHelper.Constants.HEADER_PREFER ) ) . contains ( "persistent-auth" ) ; }

Target:
public static boolean isPersistentAuth ( javax.servlet.http.HttpServletRequest req ) { java.util.Enumeration < java.lang.String > headerValues = req.getHeaders ( org.ovirt.engine.core.aaa.filters.FiltersHelper.Constants.HEADER_PREFER ) ; while ( headerValues.hasMoreElements ( ) ) { java.lang.String headerValue = headerValues.nextElement ( ) ; org.apache.http.HeaderElement [ ] headerElements = org.apache.http.message.BasicHeaderValueParser.parseElements ( headerValue , null ) ; if ( headerElements != null ) { for ( org.apache.http.HeaderElement headerElement : headerElements ) { java.lang.String elementName = headerElement.getName ( ) ; if ( "persistent-auth" . equalsIgnoreCase ( elementName ) ) { return true ; } } } } return false ; }
Source:
public void OnRemove ( ) { for ( java.lang.Object item : getSelectedItems ( ) ) { org.ovirt.engine.core.common.businessentities.roles role = ( ( org.ovirt.engine.core.common.businessentities.roles ) ( item ) ) ; org.ovirt.engine.ui.frontend.Frontend.RunAction ( VdcActionType.RemoveRole , new org.ovirt.engine.core.common.action.RolesParameterBase ( role.getId ( ) ) ) ; } Cancel ( ) ; getSearchCommand ( ) . Execute ( ) ; }

Target:
public void OnRemove ( ) { for ( java.lang.Object item : getSelectedItems ( ) ) { org.ovirt.engine.core.common.businessentities.Role role = ( ( org.ovirt.engine.core.common.businessentities.Role ) ( item ) ) ; org.ovirt.engine.ui.frontend.Frontend.RunAction ( VdcActionType.RemoveRole , new org.ovirt.engine.core.common.action.RolesParameterBase ( role.getId ( ) ) ) ; } Cancel ( ) ; getSearchCommand ( ) . Execute ( ) ; }
Source:
public java.lang.String getValue ( org.ovirt.engine.core.common.businessentities.DiskImage disk ) { org.ovirt.engine.ui.uicommonweb.models.vms.ImportDiskData importData = importModel.getDiskImportData ( disk.getId ( ) ) ; if ( importData == null ) { return "" ; } return new org.ovirt.engine.ui.common.widget.renderer.EnumRenderer < org.ovirt.engine.core.common.businessentities.VolumeType > ( ) . render ( org.ovirt.engine.core.common.businessentities.VolumeType.forValue ( importData.getSelectedVolumeType ( ) . getValue ( ) ) ) ; }

Target:
public void update ( int index , org.ovirt.engine.core.common.businessentities.storage.DiskImage disk , java.lang.String value ) { org.ovirt.engine.core.common.businessentities.storage.VolumeType tempVolumeType = org.ovirt.engine.core.common.businessentities.storage.VolumeType.Sparse ; if ( value.equals ( org.ovirt.engine.ui.webadmin.section.main.view.popup.storage.backup.ImportVmFromExportDomainPopupView.constants.thinAllocation ( ) ) ) { tempVolumeType = org.ovirt.engine.core.common.businessentities.storage.VolumeType.Sparse ; } else if ( value.equals ( org.ovirt.engine.ui.webadmin.section.main.view.popup.storage.backup.ImportVmFromExportDomainPopupView.constants.preallocatedAllocation ( ) ) ) { tempVolumeType = org.ovirt.engine.core.common.businessentities.storage.VolumeType.Preallocated ; } org.ovirt.engine.ui.uicommonweb.models.vms.ImportDiskData importData = importModel.getDiskImportData ( disk.getId ( ) ) ; if ( importData != null ) { importData.setSelectedVolumeType ( tempVolumeType ) ; } }
Source:
private void copyDiskDevicesFromTemplate ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > disks = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmDeviceDao ( ) . getVmDeviceByVmIdAndType ( vmDisksSource.getId ( ) , VmDeviceGeneralType.DISK ) ; org.ovirt.engine.core.bll.utils.VmDeviceUtils.copyVmDevices ( vmDisksSource.getId ( ) , org.ovirt.engine.core.bll.AddVmCommand.getVmId ( ) , org.ovirt.engine.core.bll.AddVmCommand.getVm ( ) , org.ovirt.engine.core.bll.AddVmCommand.getVm ( ) . getStaticData ( ) , true , disks , getSrcDeviceIdToTargetDeviceIdMapping ( ) , false , false , false , false , false ) ; }

Target:
private void addGraphicsDevice ( ) { for ( org.ovirt.engine.core.common.businessentities.GraphicsDevice graphicsDevice : org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . getGraphicsDevices ( ) . values ( ) ) { if ( graphicsDevice == null ) { continue ; } graphicsDevice.setVmId ( org.ovirt.engine.core.bll.AddVmCommand.getVmId ( ) ) ; org.ovirt.engine.core.bll.AddVmCommand.getBackend ( ) . runInternalAction ( VdcActionType.AddGraphicsDevice , new org.ovirt.engine.core.bll.GraphicsParameters ( graphicsDevice ) ) ; } }
Source:
protected void executeQueryCommand ( ) { org.ovirt.engine.core.bll.GetVdsGroupByIdQuery.getQueryReturnValue ( ) . setReturnValue ( org.ovirt.engine.core.bll.GetVdsGroupByIdQuery.getDbFacade ( ) . getVdsGroupDao ( ) . get ( org.ovirt.engine.core.bll.GetVdsGroupByIdQuery.getParameters ( ) . getId ( ) , org.ovirt.engine.core.bll.GetVdsGroupByIdQuery.getUserID ( ) , org.ovirt.engine.core.bll.GetVdsGroupByIdQuery.getParameters ( ) . isFiltered ( ) ) ) ; }

Target:
protected void executeQueryCommand ( ) { org.ovirt.engine.core.bll.GetClusterByIdQuery.getQueryReturnValue ( ) . setReturnValue ( org.ovirt.engine.core.bll.GetClusterByIdQuery.getDbFacade ( ) . getClusterDao ( ) . get ( org.ovirt.engine.core.bll.GetClusterByIdQuery.getParameters ( ) . getId ( ) , org.ovirt.engine.core.bll.GetClusterByIdQuery.getUserID ( ) , org.ovirt.engine.core.bll.GetClusterByIdQuery.getParameters ( ) . isFiltered ( ) ) ) ; }
Source:
public java.lang.String getTemplate ( java.lang.String methodName , java.lang.String responseType , java.lang.String responseTypePackage , java.lang.String simpleMethodName ) { org.ovirt.engine.sdk.codegen.utils.StringTemplateWrapper templateWrapper = new org.ovirt.engine.sdk.codegen.utils.StringTemplateWrapper ( getTemplate ( ) ) ; templateWrapper.set ( "methodName" , methodName ) ; templateWrapper.set ( "responseType" , responseType ) ; templateWrapper.set ( "responseTypePackage" , responseTypePackage ) ; templateWrapper.set ( "simpleMethodName" , simpleMethodName ) ; return templateWrapper.toString ( ) ; }

Target:
public java.lang.String evaluate ( java.lang.reflect.Method method ) { set ( "methodName" , method.getName ( ) ) ; set ( "responseType" , method.getReturnType ( ) . getName ( ) ) ; set ( "simpleMethodName" , method.getName ( ) . replaceAll ( "^get" , "" ) ) ; return evaluate ( ) ; }
Source:
public void auditInvalidInterfaces ( java.lang.String entityName ) { if ( ! ( invalidNetworkNames.isEmpty ( ) ) ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase logable = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; logable.addCustomValue ( "EntityName" , entityName ) ; logable.addCustomValue ( "Networks" , org.apache.commons.lang.StringUtils.join ( invalidNetworkNames , ',' ) ) ; logable.addCustomValue ( "Interfaces" , org.apache.commons.lang.StringUtils.join ( invalidIfaceNames , ',' ) ) ; createAuditLogDirector ( ) . log ( logable , logType ) ; } }

Target:
public void auditInvalidInterfaces ( java.lang.String entityName ) { if ( ! ( invalidNetworkNames.isEmpty ( ) ) ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogable logable = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableImpl ( ) ; logable.addCustomValue ( "EntityName" , entityName ) ; logable.addCustomValue ( "Networks" , org.apache.commons.lang.StringUtils.join ( invalidNetworkNames , ',' ) ) ; logable.addCustomValue ( "Interfaces" , org.apache.commons.lang.StringUtils.join ( invalidIfaceNames , ',' ) ) ; createAuditLogDirector ( ) . log ( logable , logType ) ; } }
Source:
private static int setNetworkBootOrder ( org.ovirt.engine.core.common.businessentities.VM vm , java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > devices , int bootOrder ) { for ( org.ovirt.engine.core.common.businessentities.VmDevice pluggedInterface : org.ovirt.engine.core.common.utils.VmDeviceCommonUtils.sortInterfacesByName ( vm , org.ovirt.engine.core.common.utils.VmDeviceCommonUtils.getPluggedInterfaces ( devices ) ) ) { pluggedInterface.setBootOrder ( ( ++ bootOrder ) ) ; } return bootOrder ; }

Target:
private static int setNetworkBootOrder ( org.ovirt.engine.core.common.businessentities.VM vm , java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > devices , int bootOrder ) { for ( org.ovirt.engine.core.common.businessentities.VmDevice pluggedInterface : org.ovirt.engine.core.common.utils.VmDeviceCommonUtils.sortInterfacesByName ( vm , org.ovirt.engine.core.common.utils.VmDeviceCommonUtils.getPluggedManagedInterfaces ( devices ) ) ) { pluggedInterface.setBootOrder ( ( ++ bootOrder ) ) ; } return bootOrder ; }
Source:
public void executeCommand ( ) { cmd = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.gluster.EnableGlusterHookCommand ( new org.ovirt.engine.core.common.action.gluster.GlusterHookParameters ( org.ovirt.engine.core.bll.gluster.EnableGlusterHookCommandTest.CLUSTER_ID , org.ovirt.engine.core.bll.gluster.EnableGlusterHookCommandTest.HOOK_ID ) ) ) ; setupMocks ( ) ; mockConfig ( ) ; mockBackend ( true ) ; cmd.executeCommand ( ) ; org.junit.Assert.assertEquals ( cmd.getAuditLogTypeValue ( ) , AuditLogType.GLUSTER_HOOK_ENABLE ) ; }

Target:
public void canDoActionFailsOnNoHook ( ) { cmd = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.gluster.EnableGlusterHookCommand ( new org.ovirt.engine.core.common.action.gluster.GlusterHookParameters ( CLUSTER_ID , HOOK_ID ) ) ) ; setupMocks ( cmd , false ) ; org.junit.Assert.assertFalse ( cmd.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( cmd.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( VdcBllMessages.ACTION_TYPE_FAILED_GLUSTER_HOOK_DOES_NOT_EXIST.toString ( ) ) ) ; }
Source:
public boolean isPosixDcAndMatchingCompatiblityVersion ( ) { if ( ( ( storagePool.getstorage_pool_type ( ) ) == ( org.ovirt.engine.core.common.businessentities.StorageType.POSIXFS ) ) && ( ! ( this . < java.lang.Boolean > getConfigValue ( ConfigValues.PosixStorageEnabled , storagePool.getcompatibility_version ( ) . toString ( ) ) ) ) ) { canDoActionMessages.add ( VdcBllMessages.DATA_CENTER_POSIX_STORAGE_NOT_SUPPORTED_IN_CURRENT_VERSION.toString ( ) ) ; return false ; } return true ; }

Target:
public boolean isPosixDcAndMatchingCompatiblityVersion ( ) { if ( ( ( storagePool.getstorage_pool_type ( ) ) == ( org.ovirt.engine.core.common.businessentities.StorageType.POSIXFS ) ) && ( ! ( org.ovirt.engine.core.common.config.Config.< java.lang.Boolean > GetValue ( ConfigValues.PosixStorageEnabled , storagePool.getcompatibility_version ( ) . toString ( ) ) ) ) ) { canDoActionMessages.add ( VdcBllMessages.DATA_CENTER_POSIX_STORAGE_NOT_SUPPORTED_IN_CURRENT_VERSION.toString ( ) ) ; return false ; } return true ; }
Source:
public void canDoActionSucceedsWhenGlusterServerHasPeersThatExistInDB ( ) throws java.lang.Exception { setupGlusterMock ( true , new org.ovirt.engine.core.common.businessentities.VDS ( ) , true ) ; org.mockito.Mockito.when ( glusterDBUtils.serverExists ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) , org.mockito.Matchers.eq ( org.ovirt.engine.core.bll.hostdeploy.AddVdsCommandTest.PEER_1 ) ) ) . thenReturn ( true ) ; org.junit.Assert.assertTrue ( commandMock.canDoAction ( ) ) ; }

Target:
public void validateFailsWhenGlusterServerHasPeers ( ) throws java.lang.Exception { setupGlusterMock ( true , new org.ovirt.engine.core.common.businessentities.VDS ( ) , true ) ; org.mockito.Mockito.when ( glusterDBUtils.serverExists ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) , org.mockito.Matchers.eq ( org.ovirt.engine.core.bll.hostdeploy.AddVdsCommandTest.PEER_1 ) ) ) . thenReturn ( false ) ; org.junit.Assert.assertFalse ( commandMock.validate ( ) ) ; org.junit.Assert.assertTrue ( commandMock.getReturnValue ( ) . getValidationMessages ( ) . contains ( EngineMessage.SERVER_ALREADY_PART_OF_ANOTHER_CLUSTER.toString ( ) ) ) ; }
Source:
public static void getStorageDomainMaxNameLength ( 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.Integer ) ( source ) ) . intValue ( ) : 1 ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.StorageDomainNameSizeLimit , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public void getDataCenterMaxNameLength ( 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.Integer ) ( source ) ) . intValue ( ) : 1 ; } } ; getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.StoragePoolNameSizeLimit , getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
public void shouldDetectSuspendedVM ( ) { invalidVM.setStatus ( VMStatus.Suspended ) ; org.hamcrest.MatcherAssert.assertThat ( validator.isVmReadyForUpgrade ( invalidVM ) , org.hamcrest.CoreMatchers.hasItem ( UPGRADE_ERROR.VM_SUSPENDED ) ) ; }

Target:
public void shouldDetectNumaPinning ( ) { invalidVM.setvNumaNodeList ( java.util.Arrays.asList ( org.ovirt.engine.core.bll.utils.NumaTestUtils.createVmNumaNode ( 1 , java.util.Arrays.asList ( org.ovirt.engine.core.bll.utils.NumaTestUtils.createVdsNumaNode ( 1 ) ) ) ) ) ; org.hamcrest.MatcherAssert.assertThat ( validator.checkVmReadyForUpgrade ( invalidVM ) , org.hamcrest.CoreMatchers.hasItem ( UPGRADE_ERROR.VM_NUMA_PINNED ) ) ; }
Source:
public static void getClusterGlusterServices ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.core.common.queries.gluster.GlusterVolumeAdvancedDetailsParameters parameters = new org.ovirt.engine.core.common.queries.gluster.GlusterVolumeAdvancedDetailsParameters ( clusterId , null , null , false ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterVolumeAdvancedDetails , parameters , aQuery ) ; }

Target:
public static void getGlusterHostsNewlyAdded ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId , boolean isFingerprintRequired ) { 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.GetAddedGlusterServers , new org.ovirt.engine.core.common.queries.gluster.AddedGlusterServersParameters ( clusterId , isFingerprintRequired ) , aQuery ) ; }
Source:
public void testGetAllInterfacesForVmFilteredWithoutPermissionsAndWithoutFiltering ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > result = dao.getAllForVm ( org.ovirt.engine.core.dao.network.VmNetworkInterfaceDaoTest.VM_ID , org.ovirt.engine.core.dao.network.VmNetworkInterfaceDaoTest.UNPRIVILEGED_USER_ID , false ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertFalse ( result.isEmpty ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface iface : result ) { org.junit.Assert.assertEquals ( org.ovirt.engine.core.dao.network.VmNetworkInterfaceDaoTest.VM_ID , iface.getVmId ( ) ) ; } }

Target:
public void testGetAllInterfacesForVmFilteredWithoutPermissionsAndWithoutFiltering ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > result = dao.getAllForVm ( org.ovirt.engine.core.dao.network.VmNetworkInterfaceDaoTest.VM_ID , org.ovirt.engine.core.dao.network.VmNetworkInterfaceDaoTest.UNPRIVILEGED_USER_ID , false ) ; org.junit.jupiter.api.Assertions.assertNotNull ( result ) ; org.junit.jupiter.api.Assertions.assertFalse ( result.isEmpty ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface iface : result ) { org.junit.jupiter.api.Assertions.assertEquals ( org.ovirt.engine.core.dao.network.VmNetworkInterfaceDaoTest.VM_ID , iface.getVmId ( ) ) ; } }
Source:
public static void RunMultipleAction ( final org.ovirt.engine.core.common.action.VdcActionType actionType , final java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > parameters , final boolean isRunOnlyIfAllCanDoPass , final org.ovirt.engine.ui.uicompat.IFrontendMultipleActionAsyncCallback callback , final java.lang.Object state ) { org.ovirt.engine.ui.frontend.gwtservices.GenericApiGWTServiceAsync service = GenericApiGWTServiceAsync.Util.getInstance ( ) ; org.ovirt.engine.ui.frontend.Frontend.RunMultipleAction ( actionType , parameters , isRunOnlyIfAllCanDoPass , callback , state , service ) ; }

Target:
public static void RunMultipleAction ( final org.ovirt.engine.core.common.action.VdcActionType actionType , final java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > parameters , final boolean isRunOnlyIfAllCanDoPass , final org.ovirt.engine.ui.uicompat.IFrontendMultipleActionAsyncCallback callback , final java.lang.Object state ) { org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runMultipleAction ( actionType , parameters , isRunOnlyIfAllCanDoPass , callback , state ) ; }
Source:
public void testExistingPassDiscardFunctionalityIsPreservedAllLunsHaveDiscardFunctionality ( ) { setSdFullDiscardSupport ( ) ; storageDomainDisks.add ( new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ) ; org.junit.Assert.assertTrue ( discardHelper.isExistingPassDiscardFunctionalityPreserved ( java.util.Arrays.asList ( createLunWithDiscardFunctionality ( 1024L , true ) , createLunWithDiscardFunctionality ( 2048L , true ) ) , storageDomain ) ) ; }

Target:
public void testExistingDiscardAfterDeleteFunctionalityPreservedDiscardAfterDeleteFunctionalityBreaks ( ) { storageDomain.setDiscardAfterDelete ( true ) ; org.junit.Assert.assertFalse ( discardHelper.isExistingDiscardAfterDeleteFunctionalityPreserved ( java.util.Arrays.asList ( createLunWithDiscardSupport ( 1024L ) , createLunWithDiscardSupport ( 0L ) ) , storageDomain ) ) ; }
Source:
public org.ovirt.engine.api.model.Disk get ( ) { java.util.List < org.ovirt.engine.api.model.Disk > entities = getBackendCollection ( org.ovirt.engine.api.model.Disk.class , VdcQueryType.GetVmTemplatesDisks , new org.ovirt.engine.core.common.queries.IdQueryParameters ( templateId ) ) ; for ( org.ovirt.engine.api.model.Disk entity : entities ) { if ( java.util.Objects.equals ( entity.getId ( ) , guid ) ) { return addLinks ( populate ( map ( entity ) , entity ) ) ; } } return notFound ( ) ; }

Target:
public org.ovirt.engine.api.model.Disk get ( ) { java.util.List < org.ovirt.engine.api.model.Disk > entities = getBackendCollection ( org.ovirt.engine.api.model.Disk.class , QueryType.GetVmTemplatesDisks , new org.ovirt.engine.core.common.queries.IdQueryParameters ( templateId ) ) ; for ( org.ovirt.engine.api.model.Disk entity : entities ) { if ( java.util.Objects.equals ( entity.getId ( ) , guid ) ) { return addLinks ( populate ( map ( entity ) , entity ) ) ; } } return notFound ( ) ; }