auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void canDoActionSucceedsOnDiskDomainCheckWhenStorageGuidInParamsMismatches ( ) throws java.lang.Exception { org.ovirt.engine.core.compat.Guid storageId = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; initializeCommand ( storageId ) ; mockVmWithDisk ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; mockStorageDomain ( storageId ) ; mockStoragePoolIsoMap ( ) ; org.junit.Assert.assertTrue ( command.canDoAction ( ) ) ; }

Target:
public void canDoActionSucceedsOnDiskDomainCheckWhenStorageGuidInParamsMismatches ( ) throws java.lang.Exception { org.ovirt.engine.core.compat.Guid storageId = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; initializeCommand ( storageId ) ; mockVmWithDisk ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; mockStorageDomain ( storageId ) ; mockStoragePoolIsoMap ( ) ; mockInterfaceList ( ) ; mockMaxPciSlots ( ) ; org.junit.Assert.assertTrue ( command.canDoAction ( ) ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc startSpice ( java.lang.String vdsIp , int port , java.lang.String ticket ) { return null ; }

Target:
public java.util.List < java.security.cert.Certificate > getPeerCertificates ( ) { try { return client.getClient ( ) . getPeerCertificates ( ) ; } catch ( org.ovirt.vdsm.jsonrpc.client.ClientConnectionException | java.lang.IllegalStateException e ) { org.ovirt.engine.core.vdsbroker.jsonrpc.JsonRpcVdsServer.logger.error ( "Failed to get peer certification for host '{}': {}" , client.getHostname ( ) , e.getMessage ( ) ) ; org.ovirt.engine.core.vdsbroker.jsonrpc.JsonRpcVdsServer.logger.debug ( "Exception" , e ) ; return null ; } }
Source:
private org.ovirt.engine.api.model.Features getFeatures ( org.ovirt.engine.api.model.Version version ) { org.ovirt.engine.api.model.Features ret = new org.ovirt.engine.api.model.Features ( ) ; if ( org.ovirt.engine.api.restapi.utils.VersionUtils.greaterOrEqual ( version , org.ovirt.engine.api.restapi.resource.BackendCapabilitiesResource.VERSION_3_0 ) ) { ret.setTransparentHugepages ( new org.ovirt.engine.api.model.TransparentHugePages ( ) ) ; } return ret ; }

Target:
private void addNetworkUsages ( org.ovirt.engine.api.model.VersionCaps version , org.ovirt.engine.api.restapi.types.NetworkUsage [ ] values ) { if ( org.ovirt.engine.api.restapi.utils.VersionUtils.greaterOrEqual ( version , org.ovirt.engine.api.restapi.resource.BackendCapabilitiesResource.VERSION_3_1 ) ) { version.setUsages ( new org.ovirt.engine.api.model.Usages ( ) ) ; for ( org.ovirt.engine.api.restapi.types.NetworkUsage usage : values ) { version.getUsages ( ) . getUsages ( ) . add ( usage.value ( ) ) ; } } }
Source:
private boolean isHostContainLabel ( java.lang.String label ) { for ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nic : org.ovirt.engine.core.bll.ChangeVDSClusterCommand.ChangeClusterParametersBuilder.getNics ( ) ) { if ( ( org.ovirt.engine.core.utils.NetworkUtils.isLabeled ( nic ) ) && ( nic.getLabels ( ) . contains ( label ) ) ) { return true ; } } return false ; }

Target:
private boolean isHostContainLabel ( org.ovirt.engine.core.compat.Guid hostId , java.lang.String label ) { for ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nic : getNics ( hostId ) ) { if ( ( org.ovirt.engine.core.utils.NetworkUtils.isLabeled ( nic ) ) && ( nic.getLabels ( ) . contains ( label ) ) ) { return true ; } } return false ; }
Source:
protected void executeQueryCommand ( ) { final java.lang.String directoryName = org.ovirt.engine.core.bll.GetDirectoryGroupByIdQuery.getParameters ( ) . getDomain ( ) ; final org.ovirt.engine.core.common.utils.ExternalId id = org.ovirt.engine.core.bll.GetDirectoryGroupByIdQuery.getParameters ( ) . getId ( ) ; final org.ovirt.engine.core.aaa.Directory directory = org.ovirt.engine.core.aaa.AuthenticationProfileRepository.getInstance ( ) . getDirectory ( directoryName ) ; if ( directory == null ) { org.ovirt.engine.core.bll.GetDirectoryGroupByIdQuery.getQueryReturnValue ( ) . setSucceeded ( false ) ; } else { final org.ovirt.engine.core.aaa.DirectoryGroup group = directory.findGroup ( id ) ; org.ovirt.engine.core.bll.GetDirectoryGroupByIdQuery.getQueryReturnValue ( ) . setReturnValue ( group ) ; } }

Target:
protected void executeQueryCommand ( ) { final java.lang.String directoryName = org.ovirt.engine.core.bll.GetDirectoryGroupByIdQuery.getParameters ( ) . getDomain ( ) ; final java.lang.String id = org.ovirt.engine.core.bll.GetDirectoryGroupByIdQuery.getParameters ( ) . getId ( ) ; final org.ovirt.engine.core.aaa.Directory directory = org.ovirt.engine.core.aaa.AuthenticationProfileRepository.getInstance ( ) . getDirectory ( directoryName ) ; if ( directory == null ) { org.ovirt.engine.core.bll.GetDirectoryGroupByIdQuery.getQueryReturnValue ( ) . setSucceeded ( false ) ; } else { final org.ovirt.engine.core.aaa.DirectoryGroup group = directory.findGroupById ( id ) ; org.ovirt.engine.core.bll.GetDirectoryGroupByIdQuery.getQueryReturnValue ( ) . setReturnValue ( group ) ; } }
Source:
public static 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 ) ; }

Target:
public static void getHostFingerprint ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String hostAddress ) { 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.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetServerSSHKeyFingerprint , new org.ovirt.engine.core.common.queries.ServerParameters ( hostAddress ) , aQuery ) ; }
Source:
private void updateBricks ( org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity existingVolume , org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity fetchedVolume ) { java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity > fetchedBricks = fetchedVolume.getBricks ( ) ; if ( fetchedBricks == null ) { log.warnFormat ( ( "Bricks of volume {0} were not fetched. " + "Hence will not try to update them in engine at this point." ) , fetchedVolume.getName ( ) ) ; return ; } removeDeletedBricks ( existingVolume , fetchedBricks ) ; updateExistingAndNewBricks ( existingVolume , fetchedBricks ) ; }

Target:
private void updateBricks ( org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity existingVolume , org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity fetchedVolume ) { java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity > fetchedBricks = fetchedVolume.getBricks ( ) ; if ( fetchedBricks == null ) { log.warn ( ( "Bricks of volume '{}' were not fetched. " + "Hence will not try to update them in engine at this point." ) , fetchedVolume.getName ( ) ) ; return ; } removeDeletedBricks ( existingVolume , fetchedBricks ) ; updateExistingAndNewBricks ( existingVolume , fetchedBricks ) ; }
Source:
public static void GetMaxVmMemSize ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , boolean is64 ) { 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 source ; } return 262144 ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( ( is64 ? org.ovirt.engine.core.common.queries.ConfigurationValues.VM64BitMaxMemorySizeInMB : org.ovirt.engine.core.common.queries.ConfigurationValues.VM32BitMaxMemorySizeInMB ) , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public static void getMaxVmMemSize ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , boolean is64 ) { 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 source ; } return 262144 ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( ( is64 ? org.ovirt.engine.core.common.queries.ConfigurationValues.VM64BitMaxMemorySizeInMB : org.ovirt.engine.core.common.queries.ConfigurationValues.VM32BitMaxMemorySizeInMB ) , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
private java.util.Collection < org.ovirt.engine.core.common.businessentities.HostDevice > getDeviceAtomicGroup ( org.ovirt.engine.core.common.businessentities.HostDevice hostDevice ) { if ( ( ! ( org.ovirt.engine.core.bll.hostdev.AbstractVmHostDevicesCommand.CAPABILITY_PCI.equals ( hostDevice.getCapability ( ) ) ) ) || ( ( hostDevice.getIommuGroup ( ) ) == null ) ) { return java.util.Collections.singleton ( hostDevice ) ; } return hostDeviceDao.getHostDevicesByHostIdAndIommuGroup ( org.ovirt.engine.core.bll.hostdev.AbstractVmHostDevicesCommand.getVm ( ) . getDedicatedVmForVds ( ) , hostDevice.getIommuGroup ( ) ) ; }

Target:
protected boolean hasIommu ( org.ovirt.engine.core.common.businessentities.HostDevice hostDevice ) { return ( org.ovirt.engine.core.bll.hostdev.AbstractVmHostDevicesCommand.CAPABILITY_PCI.equals ( hostDevice.getCapability ( ) ) ) && ( ( hostDevice.getIommuGroup ( ) ) != null ) ; }
Source:
public void getWANColorDepth ( 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 ? org.ovirt.engine.core.common.console.ConsoleOptions.WanColorDepth.fromInt ( ( ( java.lang.Integer ) ( source ) ) ) : org.ovirt.engine.core.common.console.ConsoleOptions.WanColorDepth.depth16 ; } } ; getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.WANColorDepth , getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public void getWANColorDepth ( org.ovirt.engine.ui.frontend.AsyncQuery < org.ovirt.engine.core.common.console.ConsoleOptions.WanColorDepth > aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.Converter < org.ovirt.engine.core.common.console.ConsoleOptions.WanColorDepth > ( ) { @ java.lang.Override public org.ovirt.engine.core.common.console.ConsoleOptions.WanColorDepth convert ( java.lang.Object source ) { return source != null ? org.ovirt.engine.core.common.console.ConsoleOptions.WanColorDepth.fromInt ( ( ( java.lang.Integer ) ( source ) ) ) : org.ovirt.engine.core.common.console.ConsoleOptions.WanColorDepth.depth16 ; } } ; getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.WANColorDepth , getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
public void getSpiceUsbAutoShare ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Boolean ) ( source ) ) . booleanValue ( ) : true ; } } ; getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.SpiceUsbAutoShare , getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public void getDataCenterListByName ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String name ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StoragePool > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( ( ( "DataCenter: name=" + name ) + " sortby name" ) , org.ovirt.engine.core.common.interfaces.SearchType.StoragePool ) , aQuery ) ; }
Source:
public static java.util.List < org.ovirt.engine.core.common.businessentities.GraphicsDevice > getGraphicsDevicesForEntity ( org.ovirt.engine.api.restapi.resource.BackendResource backendResource , org.ovirt.engine.core.compat.Guid id , boolean nextRun ) { java.util.List < org.ovirt.engine.core.common.businessentities.GraphicsDevice > graphicsDevices = backendResource.getEntity ( java.util.List.class , ( nextRun ? org.ovirt.engine.core.common.queries.VdcQueryType.GetNextRunGraphicsDevices : org.ovirt.engine.core.common.queries.VdcQueryType.GetGraphicsDevices ) , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , id.toString ( ) , true ) ; return graphicsDevices ; }

Target:
public static java.util.List < org.ovirt.engine.core.common.businessentities.GraphicsDevice > getGraphicsDevicesForEntity ( org.ovirt.engine.api.restapi.resource.BackendResource backendResource , org.ovirt.engine.core.compat.Guid id , boolean nextRun ) { java.util.List < org.ovirt.engine.core.common.businessentities.GraphicsDevice > graphicsDevices = backendResource.getEntity ( java.util.List.class , ( nextRun ? org.ovirt.engine.core.common.queries.QueryType.GetNextRunGraphicsDevices : org.ovirt.engine.core.common.queries.QueryType.GetGraphicsDevices ) , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , id.toString ( ) , true ) ; return graphicsDevices ; }
Source:
public void getVdsGroupWithVm ( ) { final org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase b = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.TestAuditLogableBase ( ) ; final org.ovirt.engine.core.common.businessentities.VM v = new org.ovirt.engine.core.common.businessentities.VM ( ) ; v.setvds_group_id ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.GUID ) ; b.setVm ( v ) ; final org.ovirt.engine.core.common.businessentities.VDSGroup g = b.getVdsGroup ( ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.GUID , g.getId ( ) ) ; }

Target:
public void getVdsGroupWithVm ( ) { final org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase b = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.TestAuditLogableBase ( ) ; final org.ovirt.engine.core.common.businessentities.VM v = new org.ovirt.engine.core.common.businessentities.VM ( ) ; v.setVdsGroupId ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.GUID ) ; b.setVm ( v ) ; final org.ovirt.engine.core.common.businessentities.VDSGroup g = b.getVdsGroup ( ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.GUID , g.getId ( ) ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.OneVmReturnForXmlRpc powerDown ( java.lang.String vmId ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.shutdown ( vmId ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.OneVmReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.OneVmReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }

Target:
public org.ovirt.engine.core.vdsbroker.irsbroker.OneUuidReturnForXmlRpc glusterHostUUIDGet ( ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.glusterHostUUIDGet ( ) ; org.ovirt.engine.core.vdsbroker.irsbroker.OneUuidReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.irsbroker.OneUuidReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
Source:
public static boolean verifyAddVm ( java.util.List < java.lang.String > reasons , int nicsCount , int vmPriority ) { boolean returnValue = true ; if ( ( org.ovirt.engine.core.bll.network.MacPoolManager.getInstance ( ) . getAvailableMacsCount ( ) ) < nicsCount ) { if ( reasons != null ) { reasons.add ( VdcBllMessages.MAC_POOL_NOT_ENOUGH_MAC_ADDRESSES.toString ( ) ) ; } returnValue = false ; } else if ( ! ( org.ovirt.engine.core.bll.VmTemplateCommand.isVmPriorityValueLegal ( vmPriority , reasons ) ) ) { returnValue = false ; } return returnValue ; }

Target:
public static boolean verifyAddVm ( java.util.List < java.lang.String > reasons , int nicsCount , int vmPriority , org.ovirt.engine.core.bll.network.macpoolmanager.MacPoolManagerStrategy macPool ) { boolean returnValue = true ; if ( ( macPool.getAvailableMacsCount ( ) ) < nicsCount ) { if ( reasons != null ) { reasons.add ( VdcBllMessages.MAC_POOL_NOT_ENOUGH_MAC_ADDRESSES.toString ( ) ) ; } returnValue = false ; } else if ( ! ( org.ovirt.engine.core.bll.VmTemplateCommand.isVmPriorityValueLegal ( vmPriority , reasons ) ) ) { returnValue = false ; } return returnValue ; }
Source:
public void appendCustomValueDoesntHandleNullKeys ( ) { final org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase b = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.TestAuditLogableBase ( ) ; final java.lang.String key = null ; final java.lang.String value = org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.NAME ; final java.lang.String sep = "_" ; b.AppendCustomValue ( key , value , sep ) ; final java.lang.String s = b.GetCustomValue ( key ) ; org.junit.Assert.assertEquals ( value , s ) ; }

Target:
public void appendCustomValueDoesntHandleNullKeys ( ) { final org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase b = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.TestAuditLogableBase ( ) ; final java.lang.String key = null ; final java.lang.String value = org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.NAME ; final java.lang.String sep = "_" ; b.appendCustomValue ( key , value , sep ) ; final java.lang.String s = b.getCustomValue ( key ) ; org.junit.Assert.assertEquals ( value , s ) ; }
Source:
private org.ovirt.engine.core.bll.context.CompensationContext createCompensationContext ( org.ovirt.engine.core.compat.TransactionScopeOption transactionScopeOption , boolean forceCompensation ) { if ( ( transactionScopeOption == ( org.ovirt.engine.core.compat.TransactionScopeOption.Suppress ) ) && ( ! forceCompensation ) ) { return org.ovirt.engine.core.bll.context.NoOpCompensationContext.getInstance ( ) ; } org.ovirt.engine.core.bll.context.DefaultCompensationContext context = new org.ovirt.engine.core.bll.context.DefaultCompensationContext ( ) ; context.setCommandId ( commandId ) ; context.setCommandType ( getClass ( ) . getName ( ) ) ; context.setBusinessEntitySnapshotDAO ( getBusinessEntitySnapshotDAO ( ) ) ; context.setSnapshotSerializer ( org.ovirt.engine.core.utils.SerializationFactory.getFactory ( ) . createSerializer ( ) ) ; return context ; }

Target:
private org.ovirt.engine.core.bll.context.CompensationContext createCompensationContext ( org.ovirt.engine.core.compat.TransactionScopeOption transactionScopeOption , boolean forceCompensation ) { if ( ( transactionScopeOption == ( org.ovirt.engine.core.compat.TransactionScopeOption.Suppress ) ) && ( ! forceCompensation ) ) { return org.ovirt.engine.core.bll.context.NoOpCompensationContext.getInstance ( ) ; } org.ovirt.engine.core.bll.context.DefaultCompensationContext defaultContext = new org.ovirt.engine.core.bll.context.DefaultCompensationContext ( ) ; defaultContext.setCommandId ( commandId ) ; defaultContext.setCommandType ( getClass ( ) . getName ( ) ) ; defaultContext.setBusinessEntitySnapshotDAO ( getBusinessEntitySnapshotDAO ( ) ) ; defaultContext.setSnapshotSerializer ( org.ovirt.engine.core.utils.SerializationFactory.getFactory ( ) . createSerializer ( ) ) ; return defaultContext ; }
Source:
public static void getClusterNetworkList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { if ( ( aQuery.converterCallback ) == null ) { 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.Network > ( ) ; } return source ; } } ; } org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllNetworksByClusterId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( clusterId ) , aQuery ) ; }

Target:
public void getHostListByDataCenter ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid spId ) { 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 org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.VDS > cast ( ( ( java.util.List < ? > ) ( source ) ) ) ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllVdsByStoragePool , new org.ovirt.engine.core.common.queries.IdQueryParameters ( spId ) , aQuery ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.BusinessEntityMap < org.ovirt.engine.core.common.businessentities.network.Network > getNetworkBusinessEntityMap ( ) { if ( ( networkBusinessEntityMap ) == null ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.Network > networks = org.ovirt.engine.core.bll.network.host.HostSetupNetworksCommand.getNetworkDao ( ) . getAllForCluster ( org.ovirt.engine.core.bll.network.host.HostSetupNetworksCommand.getVdsGroupId ( ) ) ; networkBusinessEntityMap = new org.ovirt.engine.core.common.businessentities.BusinessEntityMap ( networks ) ; } return networkBusinessEntityMap ; }

Target:
private org.ovirt.engine.core.common.businessentities.BusinessEntityMap < org.ovirt.engine.core.common.businessentities.network.Network > getNetworkBusinessEntityMap ( ) { if ( ( networkBusinessEntityMap ) == null ) { networkBusinessEntityMap = new org.ovirt.engine.core.common.businessentities.BusinessEntityMap ( getClusterNetworks ( ) ) ; } return networkBusinessEntityMap ; }
Source:
public org.ovirt.engine.sdk.decorators.Template add ( org.ovirt.engine.sdk.decorators.Template template ) throws java.io.IOException , org.apache.http.client.ClientProtocolException , org.ovirt.engine.sdk.exceptions.ServerException { java.lang.String url = ( SLASH ) + ( getName ( ) ) ; return getProxy ( ) . add ( url , template , org.ovirt.engine.sdk.entities.Template.class , org.ovirt.engine.sdk.decorators.Template.class ) ; }

Target:
public org.ovirt.engine.sdk.decorators.Template add ( org.ovirt.engine.sdk.decorators.Template template ) throws java.io.IOException , org.apache.http.client.ClientProtocolException , org.ovirt.engine.sdk.exceptions.ServerException { java.lang.String url = ( SLASH ) + ( getName ( ) ) ; java.util.List < org.apache.http.Header > headers = new org.ovirt.engine.sdk.utils.HttpHeaderBuilder ( ) . build ( ) ; url = new org.ovirt.engine.sdk.utils.UrlBuilder ( url ) . build ( ) ; return getProxy ( ) . add ( url , template , org.ovirt.engine.sdk.entities.Template.class , org.ovirt.engine.sdk.decorators.Template.class , headers ) ; }
Source:
public void update ( org.ovirt.engine.core.common.businessentities.storage_domain_dynamic domain ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) . addValue ( "available_disk_size" , domain.getavailable_disk_size ( ) ) . addValue ( "id" , domain.getId ( ) ) . addValue ( "used_disk_size" , domain.getused_disk_size ( ) ) ; getCallsHandler ( ) . executeModification ( "Updatestorage_domain_dynamic" , parameterSource ) ; }

Target:
public void update ( org.ovirt.engine.core.common.businessentities.StorageDomainDynamic domain ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) . addValue ( "available_disk_size" , domain.getavailable_disk_size ( ) ) . addValue ( "id" , domain.getId ( ) ) . addValue ( "used_disk_size" , domain.getused_disk_size ( ) ) ; getCallsHandler ( ) . executeModification ( "Updatestorage_domain_dynamic" , parameterSource ) ; }
Source:
private void activeDetailModelChanging ( org.ovirt.engine.ui.uicommonweb.models.HasEntity < D > newValue , org.ovirt.engine.ui.uicommonweb.models.HasEntity < D > oldValue ) { if ( oldValue != null ) { oldValue.setEntity ( null ) ; if ( oldValue instanceof org.ovirt.engine.ui.uicommonweb.models.SearchableListModel ) { ( ( org.ovirt.engine.ui.uicommonweb.models.SearchableListModel ) ( oldValue ) ) . stopRefresh ( ) ; } } if ( newValue != null ) { newValue.setEntity ( provideDetailModelEntity ( org.ovirt.engine.ui.uicommonweb.models.ListWithDetailsModel.getSelectedItem ( ) ) ) ; } }

Target:
private void activeDetailModelChanging ( org.ovirt.engine.ui.uicommonweb.models.HasEntity < D > newValue , boolean stopRefresh ) { if ( stopRefresh ) { for ( org.ovirt.engine.ui.uicommonweb.models.HasEntity < D > oldValue : activeDetailModels ) { if ( oldValue != null ) { oldValue.setEntity ( null ) ; if ( oldValue instanceof org.ovirt.engine.ui.uicommonweb.models.SearchableListModel ) { ( ( org.ovirt.engine.ui.uicommonweb.models.SearchableListModel ) ( oldValue ) ) . stopRefresh ( ) ; } } } } if ( newValue != null ) { newValue.setEntity ( provideDetailModelEntity ( org.ovirt.engine.ui.uicommonweb.models.ListWithDetailsModel.getSelectedItem ( ) ) ) ; } }
Source:
private void prepareCommand ( ) { parameters = new org.ovirt.engine.core.common.action.StorageServerConnectionParametersBase ( ) ; parameters.setVdsId ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) ) ; parameters.setStoragePoolId ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) ) ; command = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.storage.RemoveStorageServerConnectionCommand ( parameters ) ) ; org.mockito.Mockito.doReturn ( lunDAO ) . when ( command ) . getLunDao ( ) ; org.mockito.Mockito.doReturn ( storageServerConnectionDAO ) . when ( command ) . getStorageServerConnectionDao ( ) ; }

Target:
private void prepareCommand ( ) { parameters = new org.ovirt.engine.core.common.action.StorageServerConnectionParametersBase ( ) ; parameters.setVdsId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; parameters.setStoragePoolId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; command = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.storage.RemoveStorageServerConnectionCommand ( parameters ) ) ; org.mockito.Mockito.doReturn ( lunDAO ) . when ( command ) . getLunDao ( ) ; org.mockito.Mockito.doReturn ( storageServerConnectionDAO ) . when ( command ) . getStorageServerConnectionDao ( ) ; }
Source:
protected void ExecuteVdsBrokerCommand ( ) { int storageType = org.ovirt.engine.core.vdsbroker.vdsbroker.GetDeviceListVDSCommand.getParameters ( ) . getStorageType ( ) . getValue ( ) ; _result = org.ovirt.engine.core.vdsbroker.vdsbroker.GetDeviceListVDSCommand.getBroker ( ) . getDeviceList ( storageType ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.GetDeviceListVDSCommand.proceedProxyReturnValue ( ) ; setReturnValue ( org.ovirt.engine.core.vdsbroker.vdsbroker.GetDeviceListVDSCommand.ParseLUNList ( _result.lunList ) ) ; }

Target:
protected void executeVdsBrokerCommand ( ) { int storageType = org.ovirt.engine.core.vdsbroker.vdsbroker.GetDeviceListVDSCommand.getParameters ( ) . getStorageType ( ) . getValue ( ) ; _result = org.ovirt.engine.core.vdsbroker.vdsbroker.GetDeviceListVDSCommand.getBroker ( ) . getDeviceList ( storageType ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.GetDeviceListVDSCommand.proceedProxyReturnValue ( ) ; setReturnValue ( org.ovirt.engine.core.vdsbroker.vdsbroker.GetDeviceListVDSCommand.ParseLUNList ( _result.lunList ) ) ; }
Source:
public void testAddStoragePoolIsoMap ( ) { dao.save ( newStoragePoolIsoMap ) ; org.ovirt.engine.core.common.businessentities.storage_pool_iso_map result = dao.get ( new org.ovirt.engine.core.common.businessentities.StoragePoolIsoMapId ( newStoragePoolIsoMap.getstorage_id ( ) , new org.ovirt.engine.core.compat.Guid ( newStoragePoolIsoMap.getstorage_pool_id ( ) . toString ( ) ) ) ) ; assertNotNull ( result ) ; assertEquals ( newStoragePoolIsoMap , result ) ; }

Target:
public void testAddStoragePoolIsoMap ( ) { dao.save ( newStoragePoolIsoMap ) ; org.ovirt.engine.core.common.businessentities.StoragePoolIsoMap result = dao.get ( new org.ovirt.engine.core.common.businessentities.StoragePoolIsoMapId ( newStoragePoolIsoMap.getstorage_id ( ) , new org.ovirt.engine.core.compat.Guid ( newStoragePoolIsoMap.getstorage_pool_id ( ) . toString ( ) ) ) ) ; assertNotNull ( result ) ; assertEquals ( newStoragePoolIsoMap , result ) ; }
Source:
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 ) ; }

Target:
public static void getNetworkLabelsByDataCenterId ( org.ovirt.engine.core.compat.Guid dataCenterId , org.ovirt.engine.ui.frontend.AsyncQuery query ) { query.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter < java.util.SortedSet < java.lang.String > > ( ) { @ java.lang.Override public java.util.SortedSet < java.lang.String > Convert ( java.lang.Object returnValue , org.ovirt.engine.ui.frontend.AsyncQuery asyncQuery ) { java.util.SortedSet < java.lang.String > sortedSet = new java.util.TreeSet < java.lang.String > ( new org.ovirt.engine.core.common.businessentities.comparators.LexoNumericComparator ( ) ) ; sortedSet.addAll ( ( ( java.util.Collection < java.lang.String > ) ( returnValue ) ) ) ; return sortedSet ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetNetworkLabelsByDataCenterId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) , query ) ; }
Source:
protected void setUpGetPayloadExpectations ( int times ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.VmPayload payload = new org.ovirt.engine.core.common.businessentities.VmPayload ( ) ; for ( int i = 0 ; i < times ; i ++ ) { setUpGetEntityExpectations ( VdcQueryType.GetVmPayload , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ i ] } , payload ) ; } }

Target:
protected void setUpGetPayloadExpectations ( int times ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.VmPayload payload = new org.ovirt.engine.core.common.businessentities.VmPayload ( ) ; for ( int i = 0 ; i < times ; i ++ ) { setUpGetEntityExpectations ( QueryType.GetVmPayload , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ i ] } , payload ) ; } }
Source:
public org.ovirt.engine.core.vdsbroker.VMStatsRefresher create ( final org.ovirt.engine.core.vdsbroker.VdsManager manager , final org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector auditLogDirector , final org.ovirt.engine.core.utils.timer.SchedulerUtil scheduler ) { org.ovirt.engine.core.compat.Version version = manager.getCompatibilityVersion ( ) ; if ( ( ( org.ovirt.engine.core.common.FeatureSupported.jsonProtocol ( version ) ) && ( ( org.ovirt.engine.core.common.businessentities.VdsProtocol.STOMP ) == ( manager.getCopyVds ( ) . getProtocol ( ) ) ) ) && ( org.ovirt.engine.core.common.FeatureSupported.vmStatsEvents ( version ) ) ) { return new org.ovirt.engine.core.vdsbroker.jsonrpc.EventVMStatsRefresher ( manager , auditLogDirector , scheduler ) ; } return new org.ovirt.engine.core.vdsbroker.PollListAndAllVmStatsRefresher ( manager , auditLogDirector , scheduler ) ; }

Target:
private org.ovirt.engine.core.vdsbroker.VMStatsRefresher getRefresherForVds ( org.ovirt.engine.core.vdsbroker.VdsManager vdsManager ) { org.ovirt.engine.core.compat.Version version = vdsManager.getCompatibilityVersion ( ) ; org.ovirt.engine.core.common.businessentities.VDS vds = vdsManager.getCopyVds ( ) ; if ( ( ( org.ovirt.engine.core.common.FeatureSupported.jsonProtocol ( version ) ) && ( ( org.ovirt.engine.core.common.businessentities.VdsProtocol.STOMP ) == ( vds.getProtocol ( ) ) ) ) && ( org.ovirt.engine.core.common.FeatureSupported.vmStatsEvents ( version ) ) ) { return new org.ovirt.engine.core.vdsbroker.jsonrpc.EventVMStatsRefresher ( vdsManager ) ; } return new org.ovirt.engine.core.vdsbroker.PollListAndAllVmStatsRefresher ( vdsManager ) ; }
Source:
public java.util.List < org.ovirt.engine.core.bll.utils.PermissionSubject > getPermissionCheckSubjects ( ) { java.util.List < org.ovirt.engine.core.bll.utils.PermissionSubject > permissionList = new java.util.ArrayList < org.ovirt.engine.core.bll.utils.PermissionSubject > ( ) ; for ( org.ovirt.engine.core.common.action.MoveOrCopyImageGroupParameters parameters : org.ovirt.engine.core.bll.MoveDisksCommand.getParameters ( ) . getParametersList ( ) ) { permissionList.add ( new org.ovirt.engine.core.bll.utils.PermissionSubject ( parameters.getImageId ( ) , org.ovirt.engine.core.common.VdcObjectType.Disk , org.ovirt.engine.core.common.businessentities.ActionGroup.CONFIGURE_DISK_STORAGE ) ) ; } return permissionList ; }

Target:
public java.util.List < org.ovirt.engine.core.bll.utils.PermissionSubject > getPermissionCheckSubjects ( ) { java.util.List < org.ovirt.engine.core.bll.utils.PermissionSubject > permissionList = new java.util.ArrayList < org.ovirt.engine.core.bll.utils.PermissionSubject > ( ) ; for ( org.ovirt.engine.core.common.action.MoveOrCopyImageGroupParameters parameters : org.ovirt.engine.core.bll.MoveDisksCommand.getParameters ( ) . getParametersList ( ) ) { org.ovirt.engine.core.common.businessentities.DiskImage diskImage = getDiskImageDao ( ) . get ( parameters.getImageId ( ) ) ; if ( diskImage != null ) { permissionList.add ( new org.ovirt.engine.core.bll.utils.PermissionSubject ( diskImage.getId ( ) , org.ovirt.engine.core.common.VdcObjectType.Disk , org.ovirt.engine.core.common.businessentities.ActionGroup.CONFIGURE_DISK_STORAGE ) ) ; } } return permissionList ; }
Source:
public static void GetSpiceUsbAutoShare ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Boolean ) ( source ) ) . booleanValue ( ) : true ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.SpiceUsbAutoShare ) , aQuery ) ; }

Target:
public static void GetSpiceUsbAutoShare ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Boolean ) ( source ) ) . booleanValue ( ) : true ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.SpiceUsbAutoShare , org.ovirt.engine.core.common.config.Config.DefaultConfigurationVersion ) , aQuery ) ; }
Source:
private java.lang.String getOptionsSQLClause ( ) { java.lang.StringBuilder sb = new java.lang.StringBuilder ( ) ; org.ovirt.engine.core.utils.kerberos.KerberosUpgrade.OptionNames [ ] enumValues = org.ovirt.engine.core.utils.kerberos.KerberosUpgrade.OptionNames.values ( ) ; sb.append ( " in ('" ) ; sb.append ( org.ovirt.engine.core.compat.StringHelper.join ( "','" , enumValues ) ) ; sb.append ( "')" ) ; java.lang.System.out.println ( sb.toString ( ) ) ; return sb.toString ( ) ; }

Target:
private java.lang.String getOptionsSQLClause ( ) { java.lang.StringBuilder sb = new java.lang.StringBuilder ( ) ; org.ovirt.engine.core.utils.kerberos.KerberosUpgrade.OptionNames [ ] enumValues = org.ovirt.engine.core.utils.kerberos.KerberosUpgrade.OptionNames.values ( ) ; sb.append ( " in ('" ) ; sb.append ( org.apache.commons.lang.StringUtils.join ( enumValues , "','" ) ) ; sb.append ( "')" ) ; java.lang.System.out.println ( sb.toString ( ) ) ; return sb.toString ( ) ; }
Source:
private void initHostKdumpDetectionStatus ( ) { getDbFacade ( ) . getVdsKdumpStatusDao ( ) . remove ( getVdsId ( ) ) ; if ( ( ( getVds ( ) . getpm_enabled ( ) ) && ( getVds ( ) . isPmKdumpDetection ( ) ) ) && ( ( getVds ( ) . getKdumpStatus ( ) ) != ( org.ovirt.engine.core.common.businessentities.KdumpStatus.ENABLED ) ) ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase base = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; base.setVds ( getVds ( ) ) ; org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.log ( base , AuditLogType.KDUMP_DETECTION_NOT_CONFIGURED_ON_VDS ) ; } }

Target:
private void initHostKdumpDetectionStatus ( ) { getDbFacade ( ) . getVdsKdumpStatusDao ( ) . remove ( getVdsId ( ) ) ; if ( ( ( getVds ( ) . isPmEnabled ( ) ) && ( getVds ( ) . isPmKdumpDetection ( ) ) ) && ( ( getVds ( ) . getKdumpStatus ( ) ) != ( org.ovirt.engine.core.common.businessentities.KdumpStatus.ENABLED ) ) ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase base = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; base.setVds ( getVds ( ) ) ; org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.log ( base , AuditLogType.KDUMP_DETECTION_NOT_CONFIGURED_ON_VDS ) ; } }
Source:
public void isTemplateNameUnique ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String templateName , 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 != null ? ! ( ( ( java.lang.Boolean ) ( source ) ) . booleanValue ( ) ) : false ; } } ; org.ovirt.engine.core.common.queries.NameQueryParameters params = new org.ovirt.engine.core.common.queries.NameQueryParameters ( templateName ) ; params.setDatacenterId ( datacenterId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.IsVmTemlateWithSameNameExist , params , aQuery ) ; }

Target:
public void getSearchResultsLimit ( 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 ) ) : 100 ; } } ; getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.SearchResultsLimit , getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
public void massRemoveNumaNodeByNumaNodeId ( java.util.List < org.ovirt.engine.core.compat.Guid > numaNodeIds ) { for ( org.ovirt.engine.core.compat.Guid id : numaNodeIds ) { remove ( id ) ; } }

Target:
public void massRemoveNumaNodeByNumaNodeId ( java.util.List < org.ovirt.engine.core.compat.Guid > numaNodeIds ) { java.util.List < org.springframework.jdbc.core.namedparam.MapSqlParameterSource > executions = new java.util.ArrayList ( numaNodeIds.size ( ) ) ; for ( org.ovirt.engine.core.compat.Guid id : numaNodeIds ) { executions.add ( getCustomMapSqlParameterSource ( ) . addValue ( "numa_node_id" , id ) ) ; } getCallsHandler ( ) . executeStoredProcAsBatch ( "DeleteNumaNode" , executions ) ; }
Source:
protected void onReset ( ) { super . onReset ( ) ; if ( ! ( hasReportsModelRefreshEvent ( ) ) ) { org.ovirt.engine.ui.webadmin.section.main.presenter.tab.MainTabReportsPresenter.reportsWebappDeployed = false ; getModel ( ) . getReportModelRefreshEvent ( ) . addListener ( new org.ovirt.engine.ui.webadmin.section.main.presenter.tab.MainTabReportsPresenter.ReportsModelRefreshEvent ( ) ) ; } setSubTabPanelVisible ( false ) ; getModel ( ) . refreshReportModel ( ) ; }

Target:
protected void onReset ( ) { super . onReset ( ) ; if ( ! ( hasReportsModelRefreshEvent ( ) ) ) { getModel ( ) . getReportsAvailabilityEvent ( ) . addListener ( new org.ovirt.engine.ui.webadmin.section.main.presenter.tab.MainTabReportsPresenter.ReportsModelRefreshEvent ( ) ) ; } setSubTabPanelVisible ( false ) ; getModel ( ) . refreshReportModel ( ) ; }
Source:
public org.ovirt.engine.core.bll.ValidationResult iscsiBondWithTheSameNameExistInDataCenter ( org.ovirt.engine.core.common.businessentities.IscsiBond iscsiBond ) { java.util.List < org.ovirt.engine.core.common.businessentities.IscsiBond > iscsiBonds = getDBFacade ( ) . getIscsiBondDao ( ) . getAllByStoragePoolId ( iscsiBond.getStoragePoolId ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.IscsiBond bond : iscsiBonds ) { if ( ( bond.getName ( ) . equals ( iscsiBond.getName ( ) ) ) && ( ! ( bond.getId ( ) . equals ( iscsiBond.getId ( ) ) ) ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.ISCSI_BOND_WITH_SAME_NAME_EXIST_IN_DATA_CENTER ) ; } } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult iscsiBondWithTheSameNameExistInDataCenter ( org.ovirt.engine.core.common.businessentities.IscsiBond iscsiBond ) { java.util.List < org.ovirt.engine.core.common.businessentities.IscsiBond > iscsiBonds = getDBFacade ( ) . getIscsiBondDao ( ) . getAllByStoragePoolId ( iscsiBond.getStoragePoolId ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.IscsiBond bond : iscsiBonds ) { if ( ( bond.getName ( ) . equals ( iscsiBond.getName ( ) ) ) && ( ! ( bond.getId ( ) . equals ( iscsiBond.getId ( ) ) ) ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ISCSI_BOND_WITH_SAME_NAME_EXIST_IN_DATA_CENTER ) ; } } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }
Source:
public void testFailInterfaceCanUpdateReadOnly ( ) { initializeCommand ( new org.ovirt.engine.core.common.action.UpdateVmDiskParameters ( vmId , diskImageGuid , createDiskImage ( ) ) ) ; org.mockito.Mockito.doReturn ( true ) . when ( command ) . updateReadOnlyRequested ( ) ; org.mockito.Mockito.doReturn ( new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.ACTION_TYPE_FAILED_INTERFACE_DOES_NOT_SUPPORT_READ_ONLY_ATTR ) ) . when ( diskValidator ) . isReadOnlyPropertyCompatibleWithInterface ( ) ; org.junit.Assert.assertFalse ( command.validateCanUpdateReadOnly ( diskValidator ) ) ; }

Target:
public void testSucceedInterfaceCanUpdateReadOnly ( ) { initializeCommand ( new org.ovirt.engine.core.common.action.UpdateVmDiskParameters ( vmId , diskImageGuid , createDiskImage ( ) ) ) ; org.mockito.Mockito.doReturn ( true ) . when ( command ) . updateReadOnlyRequested ( ) ; org.mockito.Mockito.doReturn ( ValidationResult.VALID ) . when ( diskValidator ) . isReadOnlyPropertyCompatibleWithInterface ( ) ; org.junit.Assert.assertTrue ( command.validateCanUpdateReadOnly ( diskValidator ) ) ; }
Source:
public static void addUsbSlots ( org.ovirt.engine.core.compat.Guid vmId , int numberOfSlots ) { for ( int index = 1 ; index <= numberOfSlots ; index ++ ) { org.ovirt.engine.core.bll.utils.VmDeviceUtils.addManagedDevice ( new org.ovirt.engine.core.common.businessentities.VmDeviceId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , vmId ) , VmDeviceGeneralType.REDIR , VmDeviceType.SPICEVMC , org.ovirt.engine.core.bll.utils.VmDeviceUtils.EMPTY_SPEC_PARAMS , true , false ) ; } }

Target:
public org.ovirt.engine.core.common.businessentities.VmDevice addMemoryBalloon ( org.ovirt.engine.core.compat.Guid vmId ) { return addManagedDevice ( new org.ovirt.engine.core.common.businessentities.VmDeviceId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , vmId ) , VmDeviceGeneralType.BALLOON , VmDeviceType.MEMBALLOON , getMemoryBalloonSpecParams ( ) , true , true ) ; }
Source:
public static void GetDocumentationBaseURL ( 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.DocsURL , org.ovirt.engine.core.common.config.Config.DefaultConfigurationVersion ) , aQuery ) ; }

Target:
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 , org.ovirt.engine.core.common.config.Config.DefaultConfigurationVersion ) , aQuery ) ; }