auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
protected void ReadOsSection ( org.ovirt.engine.core.compat.backendcompat.XmlNode section ) { _vmTemplate.setId ( new org.ovirt.engine.core.compat.Guid ( section.Attributes.get ( "ovf:id" ) . getValue ( ) ) ) ; org.ovirt.engine.core.compat.backendcompat.XmlNode node = section.SelectSingleNode ( "Description" ) ; if ( node != null ) { _vmTemplate.setos ( org.ovirt.engine.core.common.businessentities.VmOsType.valueOf ( node.InnerText ) ) ; } else { _vmTemplate.setos ( VmOsType.Unassigned ) ; } }

Target:
protected void readOsSection ( org.ovirt.engine.core.compat.backendcompat.XmlNode section ) { _vmTemplate.setId ( new org.ovirt.engine.core.compat.Guid ( section.Attributes.get ( "ovf:id" ) . getValue ( ) ) ) ; org.ovirt.engine.core.compat.backendcompat.XmlNode node = section.SelectSingleNode ( "Description" ) ; if ( node != null ) { _vmTemplate.setOs ( org.ovirt.engine.core.common.businessentities.VmOsType.valueOf ( node.InnerText ) ) ; } else { _vmTemplate.setOs ( VmOsType.Unassigned ) ; } }
Source:
protected void executeCommand ( ) { org.ovirt.engine.core.bll.UpdateNetworkOnClusterCommand.getNetworkClusterDAO ( ) . update ( org.ovirt.engine.core.bll.UpdateNetworkOnClusterCommand.getParameters ( ) . getNetworkCluster ( ) ) ; if ( org.ovirt.engine.core.bll.UpdateNetworkOnClusterCommand.getParameters ( ) . getNetworkCluster ( ) . getis_display ( ) ) { org.ovirt.engine.core.bll.UpdateNetworkOnClusterCommand.getNetworkClusterDAO ( ) . setNetworkExclusivelyAsDisplay ( org.ovirt.engine.core.bll.UpdateNetworkOnClusterCommand.getVdsGroupId ( ) , getNetwork ( ) . getId ( ) ) ; } org.ovirt.engine.core.bll.AttachNetworkToVdsGroupCommand.SetNetworkStatus ( org.ovirt.engine.core.bll.UpdateNetworkOnClusterCommand.getVdsGroupId ( ) , getNetwork ( ) ) ; org.ovirt.engine.core.bll.UpdateNetworkOnClusterCommand.setSucceeded ( true ) ; }

Target:
private org.ovirt.engine.core.common.businessentities.network_cluster getNetworkCluster ( ) { return org.ovirt.engine.core.bll.UpdateNetworkOnClusterCommand.getParameters ( ) . getNetworkCluster ( ) ; }
Source:
public void tearDown ( ) { org.ovirt.engine.core.bll.aaa.SessionDataContainer.getInstance ( ) . removeSessionOnLogout ( org.ovirt.engine.core.bll.aaa.GetUserBySessionIdQueryTest.sessionID ) ; }

Target:
public void setupEnvironment ( ) { org.ovirt.engine.core.utils.CorrelationIdTracker.clean ( ) ; org.ovirt.engine.core.common.businessentities.aaa.DbUser user = org.mockito.Mockito.mock ( org.ovirt.engine.core.common.businessentities.aaa.DbUser.class ) ; org.mockito.Mockito.when ( engineSessionDao.remove ( org.mockito.Matchers.any ( java.lang.Long.class ) ) ) . thenReturn ( 1 ) ; sessionDataContainer.setUser ( org.ovirt.engine.core.bll.aaa.GetUserBySessionIdQueryTest.sessionID , user ) ; }
Source:
public static void getExistingStorageDomainList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hostId , org.ovirt.engine.core.common.businessentities.StorageDomainType domainType , org.ovirt.engine.core.common.businessentities.StorageType storageType , java.lang.String path ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetExistingStorageDomainList , new org.ovirt.engine.core.common.queries.GetExistingStorageDomainListParameters ( hostId , storageType , domainType , path ) , aQuery ) ; }

Target:
public static void getStorageDomainsByConnection ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , java.lang.String connectionPath ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ) ( source ) ) : null ; } } ; org.ovirt.engine.core.common.queries.GetStorageDomainsByConnectionParameters param = new org.ovirt.engine.core.common.queries.GetStorageDomainsByConnectionParameters ( ) ; param.setConnection ( connectionPath ) ; if ( storagePoolId != null ) { param.setStoragePoolId ( storagePoolId ) ; } org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageDomainsByConnection , param , aQuery ) ; }
Source:
private java.util.List < org.ovirt.engine.core.common.businessentities.VDS > searchVDSsByDb ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VDS > data = genericSearch ( org.ovirt.engine.core.bll.SearchQuery.getDbFacade ( ) . getVdsDao ( ) , true ) ; for ( org.ovirt.engine.core.common.businessentities.VDS vds : data ) { vds.setCpuName ( getCpuFlagsManagerHandler ( ) . findMaxServerCpuByFlags ( vds.getCpuFlags ( ) , vds.getClusterCompatibilityVersion ( ) ) ) ; } return data ; }

Target:
private java.util.List < org.ovirt.engine.core.common.businessentities.VDS > searchVDSsByDb ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VDS > data = genericSearch ( vdsDao , true ) ; for ( org.ovirt.engine.core.common.businessentities.VDS vds : data ) { vds.setCpuName ( cpuFlagsManagerHandler.findMaxServerCpuByFlags ( vds.getCpuFlags ( ) , vds.getClusterCompatibilityVersion ( ) ) ) ; } return data ; }
Source:
private org.ovirt.engine.core.common.businessentities.VM mockVm ( ) { org.ovirt.engine.core.common.businessentities.VM vm = new org.ovirt.engine.core.common.businessentities.VM ( ) ; vm.setStatus ( VMStatus.Down ) ; vm.setStoragePoolId ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) ) ; org.mockito.Mockito.when ( vmDAO.get ( command.getParameters ( ) . getVmId ( ) ) ) . thenReturn ( vm ) ; return vm ; }

Target:
private org.ovirt.engine.core.common.businessentities.VM mockVm ( ) { org.ovirt.engine.core.common.businessentities.VM vm = new org.ovirt.engine.core.common.businessentities.VM ( ) ; vm.setStatus ( VMStatus.Down ) ; vm.setStoragePoolId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; org.mockito.Mockito.when ( vmDAO.get ( command.getParameters ( ) . getVmId ( ) ) ) . thenReturn ( vm ) ; return vm ; }
Source:
public void getMaxVmsInPool ( 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 ) ) : 1000 ; } } ; getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.MaxVmsInPool , getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public void getMaxVmsInPool ( org.ovirt.engine.ui.frontend.AsyncQuery < java.lang.Integer > aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.DefaultValueConverter < > ( 1000 ) ; getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.MaxVmsInPool , getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
private org.ovirt.engine.ui.common.widget.label.LabelWithCustomToolTip createInterfaceLabel ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface ) { boolean hasLabels = ( ( iface.getLabels ( ) ) != null ) && ( ! ( iface.getLabels ( ) . isEmpty ( ) ) ) ; org.ovirt.engine.ui.common.widget.label.LabelWithCustomToolTip interfaceNameWithLabel = new org.ovirt.engine.ui.common.widget.label.LabelWithCustomToolTip ( ( hasLabels ? org.ovirt.engine.ui.webadmin.widget.host.InterfaceLabelWithToolTip.templates.textImageLabels ( iface.getName ( ) , org.ovirt.engine.ui.webadmin.widget.host.InterfaceLabelWithToolTip.labelImage ) : com.google.gwt.safehtml.shared.SafeHtmlUtils.fromString ( iface.getName ( ) ) ) ) ; interfaceNameWithLabel.setTitle ( createLabelToolTip ( iface.getLabels ( ) ) ) ; return interfaceNameWithLabel ; }

Target:
private org.ovirt.engine.ui.common.widget.label.LabelWithCustomToolTip createInterfaceLabel ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface ) { boolean hasLabels = ( ( iface.getLabels ( ) ) != null ) && ( ! ( iface.getLabels ( ) . isEmpty ( ) ) ) ; org.ovirt.engine.ui.common.widget.label.LabelWithCustomToolTip interfaceNameWithLabel = new org.ovirt.engine.ui.common.widget.label.LabelWithCustomToolTip ( ( hasLabels ? org.ovirt.engine.ui.webadmin.widget.host.InterfaceLabel.templates.textImageLabels ( iface.getName ( ) , org.ovirt.engine.ui.webadmin.widget.host.InterfaceLabel.labelImage ) : com.google.gwt.safehtml.shared.SafeHtmlUtils.fromString ( iface.getName ( ) ) ) ) ; interfaceNameWithLabel.setTitle ( createLabelToolTip ( iface.getLabels ( ) ) ) ; return interfaceNameWithLabel ; }
Source:
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 ) ; }

Target:
public void getExternalProviderComputeResourceList ( 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.ExternalComputeResource > ( ) ; } 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.GetComputeResourceFromExternalProvider , params , aQuery ) ; }
Source:
public void guestLogoutTimeTreatmentAfterDestroy ( ) { if ( ( ( getGuestLastLoginTime ( ) ) != null ) && ( ( ( getGuestLastLogoutTime ( ) ) == null ) || ( ( getGuestLastLoginTime ( ) . compareTo ( getGuestLastLogoutTime ( ) ) ) > 0 ) ) ) { setGuestLastLogoutTime ( new java.util.Date ( ) ) ; } }

Target:
public boolean isQualifiedForLiveSnapshotMerge ( ) { return getStatus ( ) . isQualifiedForLiveSnapshotMerge ( ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeGeoRepStatusForXmlRpc glusterVolumeGeoRepStatus ( ) { try { java.util.Map < java.lang.String , java.lang.Object > response = vdsServer.glusterVolumeGeoRepStatus ( ) ; return new org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeGeoRepStatusForXmlRpc ( response ) ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }

Target:
public org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeGeoRepStatusDetailForXmlRpc glusterVolumeGeoRepSessionStatus ( java.lang.String volumeName , java.lang.String slaveHost , java.lang.String slaveVolumeName ) { try { java.util.Map < java.lang.String , java.lang.Object > response = vdsServer.glusterVolumeGeoRepSessionStatus ( volumeName , slaveHost , slaveVolumeName ) ; return new org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeGeoRepStatusDetailForXmlRpc ( response ) ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
Source:
protected void markDomainsWithOvfsForOvfUpdate ( java.util.Collection < org.ovirt.engine.core.compat.Guid > ovfIds ) { java.util.List < org.ovirt.engine.core.compat.Guid > relevantDomains = org.ovirt.engine.core.bll.storage.ovfstore.ProcessOvfUpdateForStoragePoolCommand.getStorageDomainOvfInfoDao ( ) . loadStorageDomainIdsForOvfIds ( ovfIds ) ; proccessedDomains.addAll ( relevantDomains ) ; org.ovirt.engine.core.bll.storage.ovfstore.ProcessOvfUpdateForStoragePoolCommand.getStorageDomainOvfInfoDao ( ) . updateOvfUpdatedInfo ( proccessedDomains , StorageDomainOvfInfoStatus.OUTDATED , StorageDomainOvfInfoStatus.DISABLED ) ; }

Target:
protected void markDomainsWithOvfsForOvfUpdate ( java.util.Collection < org.ovirt.engine.core.compat.Guid > ovfIds ) { java.util.List < org.ovirt.engine.core.compat.Guid > relevantDomains = storageDomainOvfInfoDao.loadStorageDomainIdsForOvfIds ( ovfIds ) ; proccessedDomains.addAll ( relevantDomains ) ; storageDomainOvfInfoDao.updateOvfUpdatedInfo ( proccessedDomains , StorageDomainOvfInfoStatus.OUTDATED , StorageDomainOvfInfoStatus.DISABLED ) ; }
Source:
public void getVmGuestAgentInterfacesByVmId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid vmId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmGuestAgentInterface > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmGuestAgentInterfacesByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) , aQuery ) ; }

Target:
public void isSupportBridgesReportByVDSM ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String version ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Boolean ) ( source ) ) . booleanValue ( ) : true ; } } ; org.ovirt.engine.core.common.queries.GetConfigurationValueParameters tempVar = new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.SupportBridgesReportByVDSM ) ; tempVar.setVersion ( version ) ; getConfigFromCache ( tempVar , aQuery ) ; }
Source:
public void moveDisk ( ) { command.getParameters ( ) . setParametersList ( createMoveDisksParameters ( ) ) ; initDiskImage ( diskImageId ) ; initVm ( VMStatus.Down , null , diskImageId ) ; org.junit.Assert.assertTrue ( command.canDoAction ( ) ) ; org.junit.Assert.assertFalse ( command.getMoveDisksParametersList ( ) . isEmpty ( ) ) ; }

Target:
public void liveMigrateDisk ( ) { command.getParameters ( ) . setParametersList ( createMoveDisksParameters ( ) ) ; initDiskImage ( diskImageId ) ; initVm ( VMStatus.Up , org.ovirt.engine.core.compat.Guid.newGuid ( ) , diskImageId ) ; command.updateParameters ( ) ; org.junit.Assert.assertTrue ( ( ( command.getLiveMigrateVmDisksParametersList ( ) . size ( ) ) == 1 ) ) ; }
Source:
public void testValidateModifiedBondSlavesWhenSlaveIsNotValid ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.Bond bond = new org.ovirt.engine.core.common.businessentities.network.Bond ( ) ; bond.setSlaves ( java.util.Arrays.asList ( "slaveA" , "slaveB" ) ) ; doTestValidateModifiedBondSlaves ( bond , java.util.Collections.< org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > emptyList ( ) , new org.ovirt.engine.core.common.businessentities.BusinessEntityMap ( java.util.Collections.< org.ovirt.engine.core.common.businessentities.network.Network > emptyList ( ) ) , ValidationResult.VALID , new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.NETWORK_INTERFACE_BOND_OR_VLAN_CANNOT_BE_SLAVE ) , false , VdcBllMessages.NETWORK_INTERFACE_BOND_OR_VLAN_CANNOT_BE_SLAVE ) ; }

Target:
private org.ovirt.engine.core.common.businessentities.network.NetworkAttachment createNetworkAttachment ( org.ovirt.engine.core.common.businessentities.network.Network networkA , org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nic ) { org.ovirt.engine.core.common.businessentities.network.NetworkAttachment attachment = createNetworkAttachment ( networkA , org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; attachment.setNicId ( nic.getId ( ) ) ; attachment.setNicName ( nic.getName ( ) ) ; return attachment ; }
Source:
private static org.ovirt.engine.core.common.businessentities.StoragePool createStoragePool ( org.ovirt.engine.core.compat.Version compatibilityVersion ) { org.ovirt.engine.core.common.businessentities.StoragePool pool = new org.ovirt.engine.core.common.businessentities.StoragePool ( ) ; pool.setName ( "DefaultStoragePool" ) ; pool.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; pool.setIsLocal ( false ) ; pool.setcompatibility_version ( compatibilityVersion ) ; return pool ; }

Target:
private static org.ovirt.engine.core.common.businessentities.StoragePool createStoragePool ( org.ovirt.engine.core.compat.Version compatibilityVersion ) { org.ovirt.engine.core.common.businessentities.StoragePool pool = new org.ovirt.engine.core.common.businessentities.StoragePool ( ) ; pool.setName ( "DefaultStoragePool" ) ; pool.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; pool.setIsLocal ( false ) ; pool.setCompatibilityVersion ( compatibilityVersion ) ; return pool ; }
Source:
public void testEnd ( ) throws java.lang.Exception { setUriInfo ( setUpActionExpectations ( VdcActionType.EndExternalJob , org.ovirt.engine.core.common.action.EndExternalJobParameters.class , new java.lang.String [ ] { "JobId" , "Status" , "Force" } , new java.lang.Object [ ] { GUIDS [ 0 ] , org.ovirt.engine.core.common.job.JobExecutionStatus.FINISHED , false } , true , true ) ) ; org.ovirt.engine.api.model.Action action = new org.ovirt.engine.api.model.Action ( ) ; org.ovirt.engine.api.model.Status status = new org.ovirt.engine.api.model.Status ( ) ; status.setState ( JobExecutionStatus.FINISHED.name ( ) . toLowerCase ( ) ) ; action.setStatus ( status ) ; verifyActionResponse ( resource.end ( action ) ) ; }

Target:
public void testEnd ( ) throws java.lang.Exception { setUriInfo ( setUpActionExpectations ( VdcActionType.EndExternalJob , org.ovirt.engine.core.common.action.EndExternalJobParameters.class , new java.lang.String [ ] { "JobId" , "Status" , "Force" } , new java.lang.Object [ ] { GUIDS [ 0 ] , org.ovirt.engine.core.common.job.JobExecutionStatus.FINISHED , false } , true , true ) ) ; org.ovirt.engine.api.model.Action action = new org.ovirt.engine.api.model.Action ( ) ; action.setStatus ( JobStatus.FINISHED.value ( ) ) ; verifyActionResponse ( resource.end ( action ) ) ; }
Source:
private static boolean IsAlreadySubscribed ( java.lang.Iterable < org.ovirt.engine.core.common.businessentities.event_subscriber > subscriptions , org.ovirt.engine.core.compat.Guid subscriberId , java.lang.String eventName , int methodId ) { boolean retval = false ; for ( org.ovirt.engine.core.common.businessentities.event_subscriber eventSubscriber : subscriptions ) { if ( ( ( subscriberId.equals ( eventSubscriber.getsubscriber_id ( ) ) ) && ( org.ovirt.engine.core.compat.StringHelper.EqOp ( eventSubscriber.getevent_up_name ( ) , eventName ) ) ) && ( ( eventSubscriber.getmethod_id ( ) ) == methodId ) ) { retval = true ; break ; } } return retval ; }

Target:
private static boolean IsAlreadySubscribed ( java.lang.Iterable < org.ovirt.engine.core.common.businessentities.event_subscriber > subscriptions , org.ovirt.engine.core.compat.Guid subscriberId , java.lang.String eventName , int methodId ) { boolean retval = false ; for ( org.ovirt.engine.core.common.businessentities.event_subscriber eventSubscriber : subscriptions ) { if ( ( ( subscriberId.equals ( eventSubscriber.getsubscriber_id ( ) ) ) && ( org.apache.commons.lang.StringUtils.equals ( eventSubscriber.getevent_up_name ( ) , eventName ) ) ) && ( ( eventSubscriber.getmethod_id ( ) ) == methodId ) ) { retval = true ; break ; } } return retval ; }
Source:
private java.util.Map < java.lang.String , java.util.List < org.ovirt.engine.core.bll.validator.NetworkAttachmentsValidator.NetworkType > > createNicNameToNetworkTypesMap ( ) { java.util.Map < java.lang.String , java.util.List < org.ovirt.engine.core.bll.validator.NetworkAttachmentsValidator.NetworkType > > nicNameToNetworkTypes = new java.util.HashMap < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.network.NetworkAttachment attachment : attachmentsToConfigure ) { org.ovirt.engine.core.common.businessentities.network.Network networkToConfigure = networkBusinessEntityMap.get ( attachment.getNetworkId ( ) ) ; org.ovirt.engine.core.bll.validator.NetworkAttachmentsValidator.NetworkType networkType = determineNetworkType ( networkToConfigure ) ; getNetworkTypesList ( nicNameToNetworkTypes , attachment.getNicName ( ) ) . add ( networkType ) ; } return nicNameToNetworkTypes ; }

Target:
private java.util.List < java.lang.String > findViolatedNics ( java.util.Map < java.lang.String , java.util.List < org.ovirt.engine.core.bll.validator.network.NetworkType > > nicNameToNetworkTypesMap ) { java.util.List < java.lang.String > violatedNics = new java.util.ArrayList < > ( ) ; for ( java.util.Map.Entry < java.lang.String , java.util.List < org.ovirt.engine.core.bll.validator.network.NetworkType > > nicNameToNetworkTypes : nicNameToNetworkTypesMap.entrySet ( ) ) { java.lang.String nicName = nicNameToNetworkTypes.getKey ( ) ; java.util.List < org.ovirt.engine.core.bll.validator.network.NetworkType > networkTypes = nicNameToNetworkTypes.getValue ( ) ; if ( ! ( networkExclusivenessValidator.isNetworkExclusive ( networkTypes ) ) ) { violatedNics.add ( nicName ) ; } } return violatedNics ; }
Source:
public void testGetAllNetworkSearch ( ) throws java.lang.Exception { org.ovirt.engine.core.common.queries.SearchParameters searchParam = new org.ovirt.engine.core.common.queries.SearchParameters ( ( "Network" + ( org.ovirt.engine.core.common.utils.CommonConstants.QUERY_RETURN_TYPE_SEPARATOR ) ) , org.ovirt.engine.core.common.interfaces.SearchType.Network ) ; org.ovirt.engine.core.bll.SearchQuery < org.ovirt.engine.core.common.queries.SearchParameters > searchQuery = spySearchQuery ( searchParam ) ; searchQuery.executeQueryCommand ( ) ; org.junit.Assert.assertEquals ( networkResultList , searchQuery.getQueryReturnValue ( ) . getReturnValue ( ) ) ; }

Target:
public void testGetAllNetworkSearch ( ) throws java.lang.Exception { org.mockito.Mockito.when ( getQueryParameters ( ) . getSearchPattern ( ) ) . thenReturn ( ( "Network" + ( org.ovirt.engine.core.common.utils.CommonConstants.QUERY_RETURN_TYPE_SEPARATOR ) ) ) ; org.mockito.Mockito.when ( getQueryParameters ( ) . getSearchTypeValue ( ) ) . thenReturn ( SearchType.Network ) ; getQuery ( ) . executeQueryCommand ( ) ; org.junit.Assert.assertEquals ( networkResultList , getQuery ( ) . getQueryReturnValue ( ) . getReturnValue ( ) ) ; }
Source:
public void isVirtioScsiEnabledForVm ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid vmId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { return ! ( ( ( java.util.List < ? > ) ( source ) ) . isEmpty ( ) ) ; } return false ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVirtioScsiControllers , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) , aQuery ) ; }

Target:
public 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.getInstance ( ) . runQuery ( VdcQueryType.GetAllVdsGroups , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }
Source:
public static void getAllVnicProfiles ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VnicProfileView > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllVnicProfiles , new org.ovirt.engine.core.common.queries.IdQueryParameters ( ) , aQuery ) ; }

Target:
public static void getAllVnicProfiles ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VnicProfileView > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllVnicProfiles , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }
Source:
private boolean noChangesDetected ( ) { return ( ( ( ( getNetworks ( ) . isEmpty ( ) ) && ( getRemovedNetworks ( ) . isEmpty ( ) ) ) && ( org.ovirt.engine.core.bll.network.host.HostSetupNetworksCommand.getParameters ( ) . getBonds ( ) . isEmpty ( ) ) ) && ( getRemovedBonds ( ) . isEmpty ( ) ) ) && ( getRemovedUnmanagedNetworks ( ) . isEmpty ( ) ) ; }

Target:
private java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > applyUserConfiguredNics ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > userConfiguredNics = new java.util.ArrayList < > ( ) ; userConfiguredNics.addAll ( org.ovirt.engine.core.bll.network.host.HostSetupNetworksCommand.getParameters ( ) . getBonds ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface existingBondToRemove : getRemovedBonds ( ) ) { existingBondToRemove.setLabels ( null ) ; userConfiguredNics.add ( existingBondToRemove ) ; } return userConfiguredNics ; }
Source:
public void moveFloatingDisk ( ) { command.getParameters ( ) . setParametersList ( createMoveDisksParameters ( ) ) ; initDiskImage ( diskImageId ) ; org.junit.Assert.assertTrue ( command.canDoAction ( ) ) ; org.junit.Assert.assertFalse ( command.getMoveDisksParametersList ( ) . isEmpty ( ) ) ; }

Target:
public void liveMigrateDiskBasedOnTemplate ( ) { command.getParameters ( ) . setParametersList ( createMoveDisksParameters ( ) ) ; initDiskImageBasedOnTemplate ( diskImageId ) ; initVm ( VMStatus.Up , org.ovirt.engine.core.compat.Guid.newGuid ( ) , diskImageId ) ; command.updateParameters ( ) ; org.junit.Assert.assertTrue ( ( ( command.getLiveMigrateVmDisksParametersList ( ) . size ( ) ) == 1 ) ) ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { final java.util.Map < java.lang.Integer , org.ovirt.engine.core.common.queries.VmIconIdSizePair > returnMap = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ; if ( ( returnMap.get ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.DEFAULT_OS_ID ) ) == null ) { throw new java.lang.RuntimeException ( "Engine did not provide icon IDs of default OS." ) ; } osIdToDefaultIconIdMap = java.util.Collections.unmodifiableMap ( returnMap ) ; initializeLargeToSmallIconMap ( ) ; }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { osNames = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ; initOsIds ( ) ; }
Source:
public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; }

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:
public static void GetRedirectServletReportsPage ( 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.String ) ( source ) ) : "" ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.RedirectServletReportsPage ) , aQuery ) ; }

Target:
public static void IsHotPlugAvailable ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String version ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Boolean ) ( source ) ) . booleanValue ( ) : true ; } } ; org.ovirt.engine.core.common.queries.GetConfigurationValueParameters tempVar = new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.HotPlugEnabled ) ; tempVar.setVersion ( version ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( tempVar , aQuery ) ; }
Source:
protected void setObjectName ( java.lang.Object object , java.lang.String name , boolean isSuffix ) { org.ovirt.engine.core.common.businessentities.VmTemplate template = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.ImportTemplateData ) ( object ) ) . getTemplate ( ) ; if ( isSuffix ) { template.setName ( ( ( template.getName ( ) ) + name ) ) ; } else { template.setName ( name ) ; } }

Target:
protected java.lang.String getObjectName ( java.lang.Object object ) { return ( ( org.ovirt.engine.ui.uicommonweb.models.vms.ImportTemplateData ) ( object ) ) . getTemplate ( ) . getName ( ) ; }
Source:
public void testMigratoinCanBeSetWhenVMUsesScsiReservation ( ) { prepareVmToPassCanDoAction ( ) ; vm.setMigrationSupport ( MigrationSupport.MIGRATABLE ) ; org.ovirt.engine.core.common.businessentities.VmDevice device = createVmDevice ( ) ; device.setUsingScsiReservation ( false ) ; mockVmDevice ( device ) ; mockVmValidator ( ) ; command.initEffectiveCompatibilityVersion ( ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionSuccess ( command ) ; }

Target:
public void testCanEditARunningVM ( ) { prepareVmToPassValidate ( ) ; vm.setStatus ( VMStatus.Up ) ; mockDiskDaoGetAllForVm ( java.util.Collections.< org.ovirt.engine.core.common.businessentities.storage.Disk > emptyList ( ) , true ) ; mockVmValidator ( ) ; org.mockito.Mockito.doReturn ( vmDeviceDao ) . when ( command ) . getVmDeviceDao ( ) ; org.mockito.Mockito.doReturn ( true ) . when ( command ) . areUpdatedFieldsLegal ( ) ; command.initEffectiveCompatibilityVersion ( ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateSuccess ( command ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity getGlusterVolume ( org.ovirt.engine.core.compat.Guid volumeId ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity volumeEntity = new org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity ( ) ; volumeEntity.setId ( volumeId ) ; volumeEntity.setName ( "test-vol" ) ; volumeEntity.addAccessProtocol ( AccessProtocol.GLUSTER ) ; volumeEntity.addTransportType ( TransportType.TCP ) ; volumeEntity.setVolumeType ( GlusterVolumeType.DISTRIBUTE ) ; volumeEntity.setStatus ( ( volumeId.equals ( startedVolumeId ) ? org.ovirt.engine.core.common.businessentities.gluster.GlusterStatus.UP : org.ovirt.engine.core.common.businessentities.gluster.GlusterStatus.DOWN ) ) ; volumeEntity.setClusterId ( CLUSTER_ID ) ; return volumeEntity ; }

Target:
private org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity getGlusterVolume ( org.ovirt.engine.core.compat.Guid volumeId ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity volumeEntity = new org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity ( ) ; volumeEntity.setId ( volumeId ) ; volumeEntity.setName ( "test-vol" ) ; volumeEntity.addAccessProtocol ( AccessProtocol.GLUSTER ) ; volumeEntity.addTransportType ( TransportType.TCP ) ; volumeEntity.setVolumeType ( GlusterVolumeType.DISTRIBUTE ) ; volumeEntity.setStatus ( ( volumeId.equals ( startedVolumeId ) ? org.ovirt.engine.core.common.businessentities.gluster.GlusterStatus.UP : org.ovirt.engine.core.common.businessentities.gluster.GlusterStatus.DOWN ) ) ; volumeEntity.setClusterId ( CLUSTER_ID ) ; volumeEntity.setSnapshotsCount ( 0 ) ; return volumeEntity ; }
Source:
public void testSaveRoleGroupMap ( ) { dao.save ( newRoleGroupMap ) ; java.util.List < org.ovirt.engine.core.common.businessentities.RoleGroupMap > result = dao.getAllForRole ( newRoleGroupMap.getRoleId ( ) ) ; boolean worked = false ; for ( org.ovirt.engine.core.common.businessentities.RoleGroupMap map : result ) { worked |= newRoleGroupMap.equals ( map ) ; } org.junit.Assert.assertTrue ( worked ) ; }

Target:
public void testSaveRoleGroupMap ( ) { dao.save ( newRoleGroupMap ) ; java.util.List < org.ovirt.engine.core.common.businessentities.RoleGroupMap > result = dao.getAllForRole ( newRoleGroupMap.getRoleId ( ) ) ; boolean worked = false ; for ( org.ovirt.engine.core.common.businessentities.RoleGroupMap map : result ) { worked |= newRoleGroupMap.equals ( map ) ; } org.junit.jupiter.api.Assertions.assertTrue ( worked ) ; }
Source:
public org.ovirt.engine.ui.common.presenter.AbstractModelBoundPopupPresenterWidget < ? extends org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel , ? > getConfirmModelPopup ( org.ovirt.engine.ui.uicommonweb.models.storage.StorageDiskListModel source , org.ovirt.engine.ui.uicommonweb.UICommand lastExecutedCommand ) { if ( lastExecutedCommand == ( getModel ( ) . getRemoveCommand ( ) ) ) { return removeConfirmPopupProvider.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.storage.StorageIsoListModel source , org.ovirt.engine.ui.uicommonweb.UICommand lastExecutedCommand , org.ovirt.engine.ui.uicommonweb.models.Model windowModel ) { if ( lastExecutedCommand == ( getModel ( ) . getImportImagesCommand ( ) ) ) { return importExportPopupProvider.get ( ) ; } else { return super . getModelPopup ( source , lastExecutedCommand , windowModel ) ; } }
Source:
protected void updateStatus ( org.ovirt.engine.core.common.businessentities.StoragePoolIsoMap map , org.ovirt.engine.core.common.businessentities.StorageDomainStatus status ) { map.setstatus ( status ) ; getStoragePoolIsoMapDao ( ) . updateStatus ( map.getId ( ) , map.getstatus ( ) ) ; }

Target:
protected void updateStatus ( org.ovirt.engine.core.common.businessentities.StoragePoolIsoMap map , org.ovirt.engine.core.common.businessentities.StorageDomainStatus status ) { log.infoFormat ( "Setting domain %s to status $s" , map.getId ( ) , status.name ( ) ) ; map.setstatus ( status ) ; getStoragePoolIsoMapDao ( ) . updateStatus ( map.getId ( ) , map.getstatus ( ) ) ; }
Source:
public org.ovirt.engine.core.bll.ValidationResult ipConfiguredForStaticBootProtocol ( ) { org.ovirt.engine.core.common.businessentities.network.IpConfiguration ipConfiguration = attachment.getIpConfiguration ( ) ; boolean failWhen = ( ( ipConfiguration != null ) && ( ( ipConfiguration.getBootProtocol ( ) ) == ( org.ovirt.engine.core.common.businessentities.network.NetworkBootProtocol.STATIC_IP ) ) ) && ( unsetAddress ( ipConfiguration ) ) ; return org.ovirt.engine.core.bll.ValidationResult.failWith ( EngineMessage.NETWORK_ADDR_MANDATORY_IN_STATIC_IP ) . when ( failWhen ) ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult ipConfiguredForStaticBootProtocol ( ) { org.ovirt.engine.core.common.businessentities.network.IpConfiguration ipConfiguration = attachment.getIpConfiguration ( ) ; boolean failWhen = ( ( ( ipConfiguration != null ) && ( ipConfiguration.hasPrimaryAddressSet ( ) ) ) && ( ( ipConfiguration.getPrimaryAddress ( ) . getBootProtocol ( ) ) == ( org.ovirt.engine.core.common.businessentities.network.NetworkBootProtocol.STATIC_IP ) ) ) && ( unsetAddress ( ipConfiguration ) ) ; return org.ovirt.engine.core.bll.ValidationResult.failWith ( EngineMessage.NETWORK_ADDR_MANDATORY_IN_STATIC_IP ) . when ( failWhen ) ; }
Source:
protected void endWithFailure ( ) { if ( isStatelessSnapshotExistsForVm ( ) ) { org.ovirt.engine.core.common.action.VdcReturnValueBase vdcReturnValue = org.ovirt.engine.core.bll.RunVmCommand.getBackend ( ) . endAction ( VdcActionType.CreateAllSnapshotsFromVm , buildCreateSnapshotParametersForEndAction ( ) , new org.ovirt.engine.core.bll.context.CommandContext ( org.ovirt.engine.core.bll.RunVmCommand.getCompensationContext ( ) ) ) ; setSucceeded ( vdcReturnValue.getSucceeded ( ) ) ; } else { super . endWithFailure ( ) ; } }

Target:
protected void endWithFailure ( ) { if ( isStatelessSnapshotExistsForVm ( ) ) { org.ovirt.engine.core.common.action.VdcReturnValueBase vdcReturnValue = org.ovirt.engine.core.bll.RunVmCommand.getBackend ( ) . endAction ( VdcActionType.CreateAllSnapshotsFromVm , buildCreateSnapshotParametersForEndAction ( ) , org.ovirt.engine.core.bll.RunVmCommand.cloneContext ( ) . withoutExecutionContext ( ) . withoutLock ( ) ) ; setSucceeded ( vdcReturnValue.getSucceeded ( ) ) ; } else { super . endWithFailure ( ) ; } }
Source:
public void testGetFileDataStoreNetwork ( ) throws java.io.IOException { vmInit.setNetworks ( java.util.Collections.singletonList ( createVmInitNetwork ( ) ) ) ; final java.util.Map < java.lang.String , byte [ ] > actual = underTest.getFileData ( ) ; final java.util.Map < java.lang.String , java.lang.Object > actualMetaData = parseResult ( actual ) ; assertNetworkConfig ( actualMetaData ) ; assertNetworkInterfaces ( actualMetaData ) ; }

Target:
public void testGetFileDataStoreNetwork ( ) throws java.io.IOException { vmInit.setNetworks ( java.util.Collections.singletonList ( createVmInitNetwork ( ) ) ) ; final java.util.Map < java.lang.String , byte [ ] > actual = underTest.getFileData ( ) ; final java.util.Map < java.lang.String , java.lang.Object > actualMetaData = parseResult ( actual ) ; assertNetworkConfig ( actualMetaData ) ; assertNetworkInterfaces ( actualMetaData ) ; assertOpenstackNetworkDataFileNotCreated ( actual ) ; }
Source:
protected void verify ( org.ovirt.engine.api.model.Cdrom model , org.ovirt.engine.api.model.Cdrom transform ) { org.junit.Assert.assertNotNull ( transform ) ; org.junit.Assert.assertNotNull ( transform.getFile ( ) ) ; org.junit.Assert.assertEquals ( model.getFile ( ) . getId ( ) , transform.getFile ( ) . getId ( ) ) ; }

Target:
protected void verify ( org.ovirt.engine.api.model.Cdrom model , org.ovirt.engine.api.model.Cdrom transform ) { org.junit.jupiter.api.Assertions.assertNotNull ( transform ) ; org.junit.jupiter.api.Assertions.assertNotNull ( transform.getFile ( ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( model.getFile ( ) . getId ( ) , transform.getFile ( ) . getId ( ) ) ; }
Source:
public void getDataCenterById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStoragePoolById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) . withoutRefresh ( ) , aQuery ) ; }

Target:
public void countAllTemplates ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmTemplateCount , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }
Source:
public void getHostNumaTopologyByHostId ( 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 ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VdsNumaNode > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVdsNumaNodesByVdsId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( hostId ) , asyncQuery ) ; }

Target:
public void getHostNumaTopologyByHostId ( org.ovirt.engine.ui.frontend.AsyncQuery < java.util.List < org.ovirt.engine.core.common.businessentities.VdsNumaNode > > asyncQuery , org.ovirt.engine.core.compat.Guid hostId ) { asyncQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.ListConverter < > ( ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVdsNumaNodesByVdsId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( hostId ) , asyncQuery ) ; }
Source:
public void saveGlusterServerHook ( org.ovirt.engine.core.compat.Guid hookId , org.ovirt.engine.core.compat.Guid hostId , java.lang.String checksum , org.ovirt.engine.core.common.businessentities.gluster.GlusterHookStatus status ) { getCallsHandler ( ) . executeModification ( "InsertGlusterServerHook" , getCustomMapSqlParameterSource ( ) . addValue ( "hook_id" , hookId ) . addValue ( "host_id" , hostId ) . addValue ( "checksum" , checksum ) . addValue ( "status" , org.ovirt.engine.core.common.utils.EnumUtils.nameOrNull ( status ) ) ) ; }

Target:
public void updateGlusterHookStatus ( org.ovirt.engine.core.compat.Guid id , org.ovirt.engine.core.common.businessentities.gluster.GlusterHookStatus status ) { getCallsHandler ( ) . executeModification ( "UpdateGlusterHookStatus" , createIdParameterMapper ( id ) . addValue ( "hook_status" , org.ovirt.engine.core.common.utils.EnumUtils.nameOrNull ( status ) ) ) ; }
Source:
public void setUp ( ) { domain = new org.ovirt.engine.core.common.businessentities.StorageDomain ( ) ; validator = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.validator.storage.StorageDomainValidator ( domain ) ) ; org.mockito.Mockito.doReturn ( vmDao ) . when ( validator ) . getVmDao ( ) ; }

Target:
public void setUp ( ) { domain = new org.ovirt.engine.core.common.businessentities.StorageDomain ( ) ; validator = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.validator.storage.StorageDomainValidator ( domain ) ) ; org.mockito.Mockito.doReturn ( vmDao ) . when ( validator ) . getVmDao ( ) ; org.mockito.Mockito.doReturn ( vmDynamicDao ) . when ( validator ) . getVmDynamicDao ( ) ; }
Source:
protected void populateTabMap ( ) { getTabNameMapping ( ) . put ( TabName.GENERAL_TAB , this . generalTab ) ; getTabNameMapping ( ) . put ( TabName.CONSOLE_TAB , this . consoleTab ) ; getTabNameMapping ( ) . put ( TabName.CLUSTER_POLICY_TAB , this . clusterPolicyTab ) ; getTabNameMapping ( ) . put ( TabName.OPTIMIZATION_TAB , this . optimizationTab ) ; getTabNameMapping ( ) . put ( TabName.RESILIENCE_POLICY_TAB , this . resiliencePolicyTab ) ; }

Target:
protected void populateTabMap ( ) { getTabNameMapping ( ) . put ( TabName.GENERAL_TAB , this . generalTab ) ; getTabNameMapping ( ) . put ( TabName.CONSOLE_TAB , this . consoleTab ) ; getTabNameMapping ( ) . put ( TabName.CLUSTER_POLICY_TAB , this . clusterPolicyTab ) ; getTabNameMapping ( ) . put ( TabName.OPTIMIZATION_TAB , this . optimizationTab ) ; getTabNameMapping ( ) . put ( TabName.MIGRATION_TAB , this . migrationTab ) ; }
Source:
public static 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 ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.StoragePoolNameSizeLimit , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public void getRoleActionGroupsByRoleId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid roleId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ActionGroup > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ActionGroup > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetRoleActionGroupsByRoleId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( roleId ) , aQuery ) ; }