auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
void defineAndLoadPlugins ( ) { org.ovirt.engine.ui.webadmin.plugin.PluginDefinitions definitions = org.ovirt.engine.ui.webadmin.plugin.PluginDefinitions.instance ( ) ; if ( definitions != null ) { com.google.gwt.core.client.JsArray < org.ovirt.engine.ui.webadmin.plugin.PluginMetaData > metaDataArray = definitions.getMetaDataArray ( ) ; for ( int i = 0 ; i < ( metaDataArray.length ( ) ) ; i ++ ) { org.ovirt.engine.ui.webadmin.plugin.PluginMetaData pluginMetaData = metaDataArray.get ( i ) ; if ( pluginMetaData != null ) { defineAndLoadPlugin ( pluginMetaData ) ; } } } }

Target:
public void execute ( ) { maybeInvokePluginsReadyCallback ( ) ; }
Source:
public java.util.List < org.ovirt.engine.core.common.businessentities.Quota > getQuotaByAdElementId ( org.ovirt.engine.core.compat.Guid adElementId , org.ovirt.engine.core.compat.Guid storagePoolId ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource quotaParameterSource = getCustomMapSqlParameterSource ( ) ; quotaParameterSource.addValue ( "ad_element_id" , adElementId ) ; quotaParameterSource.addValue ( "storage_pool_id" , storagePoolId ) ; java.util.List < org.ovirt.engine.core.common.businessentities.Quota > quotaEntityList = getCallsHandler ( ) . executeReadList ( "GetQuotaByAdElementId" , getQuotaMetaDataFromResultSet ( ) , quotaParameterSource ) ; return quotaEntityList ; }

Target:
public java.util.List < org.ovirt.engine.core.common.businessentities.Quota > getQuotaByAdElementId ( org.ovirt.engine.core.compat.Guid adElementId , org.ovirt.engine.core.compat.Guid storagePoolId , boolean recursive ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource quotaParameterSource = getCustomMapSqlParameterSource ( ) ; quotaParameterSource.addValue ( "ad_element_id" , adElementId ) ; quotaParameterSource.addValue ( "storage_pool_id" , storagePoolId ) ; quotaParameterSource.addValue ( "recursive" , recursive ) ; java.util.List < org.ovirt.engine.core.common.businessentities.Quota > quotaEntityList = getCallsHandler ( ) . executeReadList ( "GetQuotaByAdElementId" , getQuotaMetaDataFromResultSet ( ) , quotaParameterSource ) ; return quotaEntityList ; }
Source:
public java.lang.String render ( T size ) { if ( isUnavailable ( size ) ) { return org.ovirt.engine.ui.common.widget.renderer.DiskSizeRenderer.CONSTANTS.unAvailablePropertyLabel ( ) ; } long sizeInGB = - 1 ; switch ( unit ) { case BYTE : sizeInGB = ( ( long ) ( ( size.longValue ( ) ) / ( java.lang.Math.pow ( 1024 , 3 ) ) ) ) ; break ; case GIGABYTE : sizeInGB = size.longValue ( ) ; break ; } return sizeInGB >= 1 ? sizeInGB + " GB" : "< 1 GB" ; }

Target:
private java.lang.String renderGigabyteSize ( long sizeInBytes ) { long sizeInGB = org.ovirt.engine.ui.uicommonweb.models.SizeConverter.convert ( sizeInBytes , SizeConverter.SizeUnit.BYTES , SizeUnit.GB ) . longValue ( ) ; return sizeInGB >= 1 ? sizeInGB + " GB" : "< 1 GB" ; }
Source:
protected void executeCommand ( ) { for ( org.ovirt.engine.core.common.businessentities.permissions permission : org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getPermissionDAO ( ) . getAllDirectPermissionsForAdElement ( org.ovirt.engine.core.bll.RemoveUserCommand.getAdUserId ( ) ) ) { org.ovirt.engine.core.common.action.PermissionsOperationsParametes tempVar = new org.ovirt.engine.core.common.action.PermissionsOperationsParametes ( permission ) ; tempVar.setShouldBeLogged ( false ) ; org.ovirt.engine.core.bll.Backend.getInstance ( ) . runInternalAction ( VdcActionType.RemovePermission , tempVar , org.ovirt.engine.core.bll.job.ExecutionHandler.createDefaultContexForTasks ( org.ovirt.engine.core.bll.RemoveUserCommand.getExecutionContext ( ) ) ) ; } org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getDbUserDAO ( ) . remove ( org.ovirt.engine.core.bll.RemoveUserCommand.getAdUserId ( ) ) ; org.ovirt.engine.core.bll.RemoveUserCommand.setSucceeded ( true ) ; }

Target:
protected void executeCommand ( ) { for ( org.ovirt.engine.core.common.businessentities.permissions permission : org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getPermissionDao ( ) . getAllDirectPermissionsForAdElement ( org.ovirt.engine.core.bll.RemoveUserCommand.getAdUserId ( ) ) ) { org.ovirt.engine.core.common.action.PermissionsOperationsParametes tempVar = new org.ovirt.engine.core.common.action.PermissionsOperationsParametes ( permission ) ; tempVar.setShouldBeLogged ( false ) ; org.ovirt.engine.core.bll.Backend.getInstance ( ) . runInternalAction ( VdcActionType.RemovePermission , tempVar , org.ovirt.engine.core.bll.job.ExecutionHandler.createDefaultContexForTasks ( org.ovirt.engine.core.bll.RemoveUserCommand.getExecutionContext ( ) ) ) ; } org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getDbUserDao ( ) . remove ( org.ovirt.engine.core.bll.RemoveUserCommand.getAdUserId ( ) ) ; org.ovirt.engine.core.bll.RemoveUserCommand.setSucceeded ( true ) ; }
Source:
public void setup ( ) { urlValidation = org.mockito.Mockito.spy ( new org.ovirt.engine.ui.uicommonweb.validation.UrlValidation ( new java.lang.String [ ] { org.ovirt.engine.ui.uicommonweb.Uri.SCHEME_HTTP } ) ) ; hostValidation = new org.ovirt.engine.ui.uicommonweb.validation.UriHostAddressValidation ( null ) ; org.mockito.Mockito.doReturn ( null ) . when ( urlValidation ) . getUriMessage ( ) ; org.mockito.Mockito.doReturn ( null ) . when ( urlValidation ) . getSchemeMessage ( org.mockito.ArgumentMatchers.any ( java.lang.String.class ) ) ; org.mockito.Mockito.doReturn ( hostValidation ) . when ( urlValidation ) . getHostValidation ( ) ; }

Target:
public void setup ( ) { urlValidation = org.mockito.Mockito.spy ( new org.ovirt.engine.ui.uicommonweb.validation.UrlValidation ( new java.lang.String [ ] { org.ovirt.engine.ui.uicommonweb.Uri.SCHEME_HTTP } ) ) ; hostValidation = new org.ovirt.engine.ui.uicommonweb.validation.UriHostAddressValidation ( null ) ; org.mockito.Mockito.doReturn ( null ) . when ( urlValidation ) . getUriMessage ( ) ; org.mockito.Mockito.doReturn ( null ) . when ( urlValidation ) . getSchemeMessage ( org.mockito.ArgumentMatchers.anyString ( ) ) ; org.mockito.Mockito.doReturn ( hostValidation ) . when ( urlValidation ) . getHostValidation ( ) ; }
Source:
public void testIsNetworkInSyncWhenStaticBootProtocolAddressDifferent ( ) throws java.lang.Exception { initIpConfigurationBootProtocolAddress ( org.ovirt.engine.core.utils.NetworkInSyncWithVdsNetworkInterfaceTest.BOOT_PROTOCOL , false ) ; iface.setIpv4BootProtocol ( org.ovirt.engine.core.common.businessentities.network.NetworkBootProtocol.forValue ( ( ( ( org.ovirt.engine.core.utils.NetworkInSyncWithVdsNetworkInterfaceTest.BOOT_PROTOCOL.getValue ( ) ) + 1 ) % ( org.ovirt.engine.core.common.businessentities.network.NetworkBootProtocol.values ( ) . length ) ) ) ) ; org.junit.Assert.assertThat ( createTestedInstance ( ) . isNetworkInSync ( ) , org.hamcrest.CoreMatchers.is ( false ) ) ; }

Target:
public void testIsNetworkInSyncWhenIpv4BootProtocolDifferent ( ) throws java.lang.Exception { initIpv4ConfigurationBootProtocol ( false ) ; iface.setIpv4BootProtocol ( org.ovirt.engine.core.common.businessentities.network.Ipv4BootProtocol.forValue ( ( ( ( org.ovirt.engine.core.utils.NetworkInSyncWithVdsNetworkInterfaceTest.IPV4_BOOT_PROTOCOL.getValue ( ) ) + 1 ) % ( org.ovirt.engine.core.common.businessentities.network.Ipv4BootProtocol.values ( ) . length ) ) ) ) ; org.junit.Assert.assertThat ( createTestedInstance ( ) . isNetworkInSync ( ) , org.hamcrest.CoreMatchers.is ( false ) ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeSnapshotConfigReturnForXmlRpc glusterVolumeSnapshotConfigGet ( org.ovirt.engine.core.compat.Guid clusterId , java.lang.String volumeName ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue ; if ( volumeName == null ) { xmlRpcReturnValue = vdsServer.glusterSnapshotConfigGet ( "" ) ; } else { xmlRpcReturnValue = vdsServer.glusterSnapshotConfigGet ( volumeName ) ; } org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeSnapshotConfigReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeSnapshotConfigReturnForXmlRpc ( clusterId , 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.vdsbroker.StatusOnlyReturnForXmlRpc glusterVolumeGeoRepConfigSet ( java.lang.String volumeName , java.lang.String slaveHost , java.lang.String slaveVolumeName , java.lang.String configKey , java.lang.String configValue ) { try { return new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( vdsServer.glusterVolumeGeoRepConfigSet ( volumeName , slaveHost , slaveVolumeName , configKey , configValue ) ) ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
Source:
private org.ovirt.engine.core.common.action.VdcReturnValueBase addVmFromScratch ( org.ovirt.engine.core.common.businessentities.VmStatic vmStatic ) { org.ovirt.engine.core.common.action.AddVmFromScratchParameters parameters = new org.ovirt.engine.core.common.action.AddVmFromScratchParameters ( vmStatic , org.ovirt.engine.core.bll.AddVmAndAttachToPoolCommand.getParameters ( ) . getDiskInfoList ( ) , org.ovirt.engine.core.bll.AddVmAndAttachToPoolCommand.getParameters ( ) . getStorageDomainId ( ) ) ; parameters.setSessionId ( org.ovirt.engine.core.bll.AddVmAndAttachToPoolCommand.getParameters ( ) . getSessionId ( ) ) ; parameters.setDontAttachToDefaultTag ( true ) ; parameters.setDiskOperatorAuthzPrincipalDbId ( org.ovirt.engine.core.bll.AddVmAndAttachToPoolCommand.getParameters ( ) . getDiskOperatorAuthzPrincipalDbId ( ) ) ; return runInternalActionWithTasksContext ( VdcActionType.AddVmFromScratch , parameters ) ; }

Target:
private org.ovirt.engine.core.common.action.VdcReturnValueBase addVmFromScratch ( org.ovirt.engine.core.common.businessentities.VmStatic vmStatic ) { org.ovirt.engine.core.common.action.AddVmFromScratchParameters parameters = new org.ovirt.engine.core.common.action.AddVmFromScratchParameters ( vmStatic , org.ovirt.engine.core.bll.AddVmAndAttachToPoolCommand.getParameters ( ) . getDiskInfoList ( ) , org.ovirt.engine.core.bll.AddVmAndAttachToPoolCommand.getParameters ( ) . getStorageDomainId ( ) ) ; parameters.setSessionId ( org.ovirt.engine.core.bll.AddVmAndAttachToPoolCommand.getParameters ( ) . getSessionId ( ) ) ; parameters.setPoolId ( org.ovirt.engine.core.bll.AddVmAndAttachToPoolCommand.getParameters ( ) . getPoolId ( ) ) ; parameters.setDontAttachToDefaultTag ( true ) ; parameters.setDiskOperatorAuthzPrincipalDbId ( org.ovirt.engine.core.bll.AddVmAndAttachToPoolCommand.getParameters ( ) . getDiskOperatorAuthzPrincipalDbId ( ) ) ; return runInternalActionWithTasksContext ( VdcActionType.AddVmFromScratch , parameters ) ; }
Source:
public org.ovirt.engine.sdk.entities.Action iscsidiscover ( org.ovirt.engine.sdk.entities.Action action ) throws java.io.IOException , org.apache.http.client.ClientProtocolException , org.ovirt.engine.sdk.exceptions.ServerException { java.lang.String url = ( this . getHref ( ) ) + "/iscsidiscover" ; return getProxy ( ) . action ( url , action , org.ovirt.engine.sdk.entities.Action.class , org.ovirt.engine.sdk.entities.Action.class ) ; }

Target:
public org.ovirt.engine.sdk.entities.Action iscsidiscover ( org.ovirt.engine.sdk.entities.Action action , java.lang.String correlationId ) throws java.io.IOException , org.apache.http.client.ClientProtocolException , org.ovirt.engine.sdk.exceptions.ServerException { java.lang.String url = ( this . getHref ( ) ) + "/iscsidiscover" ; java.util.List < org.apache.http.Header > headers = new org.ovirt.engine.sdk.utils.HttpHeaderBuilder ( ) . add ( "Correlation-Id" , correlationId ) . build ( ) ; url = new org.ovirt.engine.sdk.utils.UrlBuilder ( url ) . build ( ) ; return getProxy ( ) . action ( url , action , org.ovirt.engine.sdk.entities.Action.class , org.ovirt.engine.sdk.entities.Action.class , headers ) ; }
Source:
private java.util.List < org.ovirt.engine.core.compat.Guid > generateGuidList ( int size ) { java.util.List < org.ovirt.engine.core.compat.Guid > toReturn = new java.util.LinkedList < org.ovirt.engine.core.compat.Guid > ( ) ; for ( int i = 0 ; i < size ; i ++ ) { toReturn.add ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) ) ; } return toReturn ; }

Target:
private java.util.List < org.ovirt.engine.core.compat.Guid > generateGuidList ( int size ) { java.util.List < org.ovirt.engine.core.compat.Guid > toReturn = new java.util.LinkedList < org.ovirt.engine.core.compat.Guid > ( ) ; for ( int i = 0 ; i < size ; i ++ ) { toReturn.add ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; } return toReturn ; }
Source:
public static void getMaxNumOfVmSockets ( 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.Integer ) ( source ) ) . intValue ( ) : 1 ; } } ; org.ovirt.engine.core.common.queries.GetConfigurationValueParameters tempVar = new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.MaxNumOfVmSockets ) ; tempVar.setVersion ( version ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigFromCache ( tempVar , aQuery ) ; }

Target:
public void getClusterListByName ( 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.VDSGroup > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( ( ( "Cluster: name=" + name ) + " sortby name" ) , org.ovirt.engine.core.common.interfaces.SearchType.Cluster ) , aQuery ) ; }
Source:
void localize ( ) { applyNowCpuMessage.setHTML ( bulletedItem ( org.ovirt.engine.ui.common.widget.uicommon.popup.vm.VmNextRunConfigurationWidget.messages.nextRunConfigurationCpuValue ( ) ) ) ; applyNowMemoryMessage.setHTML ( bulletedItem ( org.ovirt.engine.ui.common.widget.uicommon.popup.vm.VmNextRunConfigurationWidget.messages.nextRunConfigurationMemoryValue ( ) ) ) ; applyNowVmLeaseMessage.setHTML ( bulletedItem ( org.ovirt.engine.ui.common.widget.uicommon.popup.vm.VmNextRunConfigurationWidget.messages.nextRunConfigurationVmLeaseValue ( ) ) ) ; vmUnpinnedMessage1.setHTML ( bulletedItem ( org.ovirt.engine.ui.common.widget.uicommon.popup.vm.VmNextRunConfigurationWidget.messages.unpinnedRunningVmWarningIncompatability ( ) ) ) ; vmUnpinnedMessage2.setHTML ( bulletedItem ( org.ovirt.engine.ui.common.widget.uicommon.popup.vm.VmNextRunConfigurationWidget.messages.unpinnedRunningVmWarningSecurity ( ) ) ) ; }

Target:
void localize ( ) { applyNowCpuMessage.setHTML ( bulletedItem ( org.ovirt.engine.ui.common.widget.uicommon.popup.vm.VmNextRunConfigurationWidget.messages.nextRunConfigurationCpuValue ( ) ) ) ; applyNowMemoryMessage.setHTML ( bulletedItem ( org.ovirt.engine.ui.common.widget.uicommon.popup.vm.VmNextRunConfigurationWidget.messages.nextRunConfigurationMemoryValue ( ) ) ) ; applyNowMinAllocatedMemoryMessage.setHTML ( bulletedItem ( org.ovirt.engine.ui.common.widget.uicommon.popup.vm.VmNextRunConfigurationWidget.messages.nextRunConfigurationMinAllocatedMemoryValue ( ) ) ) ; applyNowVmLeaseMessage.setHTML ( bulletedItem ( org.ovirt.engine.ui.common.widget.uicommon.popup.vm.VmNextRunConfigurationWidget.messages.nextRunConfigurationVmLeaseValue ( ) ) ) ; vmUnpinnedMessage1.setHTML ( bulletedItem ( org.ovirt.engine.ui.common.widget.uicommon.popup.vm.VmNextRunConfigurationWidget.messages.unpinnedRunningVmWarningIncompatability ( ) ) ) ; vmUnpinnedMessage2.setHTML ( bulletedItem ( org.ovirt.engine.ui.common.widget.uicommon.popup.vm.VmNextRunConfigurationWidget.messages.unpinnedRunningVmWarningSecurity ( ) ) ) ; }
Source:
protected org.ovirt.engine.core.common.errors.VdcBllErrors GetReturnValueFromStatus ( org.ovirt.engine.core.vdsbroker.vdsbroker.StatusForXmlRpc xmlRpcStatus ) { try { org.ovirt.engine.core.common.errors.VdcBllErrors bllErrors = org.ovirt.engine.core.common.errors.VdcBllErrors.forValue ( xmlRpcStatus.mCode ) ; if ( bllErrors == null ) { log.warn ( ( "Weird return value: " + xmlRpcStatus ) ) ; bllErrors = org.ovirt.engine.core.common.errors.VdcBllErrors.unexpected ; } return bllErrors ; } catch ( java.lang.Exception e ) { return org.ovirt.engine.core.common.errors.VdcBllErrors.unexpected ; } }

Target:
protected org.ovirt.engine.core.common.errors.VdcBllErrors GetReturnValueFromStatus ( org.ovirt.engine.core.vdsbroker.vdsbroker.StatusForXmlRpc xmlRpcStatus ) { try { org.ovirt.engine.core.common.errors.VdcBllErrors bllErrors = org.ovirt.engine.core.common.errors.VdcBllErrors.forValue ( xmlRpcStatus.mCode ) ; if ( bllErrors == null ) { log.warn ( ( "Unexpected return value: " + xmlRpcStatus ) ) ; bllErrors = org.ovirt.engine.core.common.errors.VdcBllErrors.unexpected ; } return bllErrors ; } catch ( java.lang.Exception e ) { return org.ovirt.engine.core.common.errors.VdcBllErrors.unexpected ; } }
Source:
protected boolean validateQuota ( org.ovirt.engine.core.compat.Guid quotaId ) { if ( ( quotaId == null ) || ( Guid.Empty.equals ( quotaId ) ) ) { return true ; } org.ovirt.engine.core.common.businessentities.Quota quota = quotaDao.getById ( quotaId ) ; if ( quota == null ) { return failValidation ( EngineMessage.ACTION_TYPE_FAILED_QUOTA_NOT_EXIST ) ; } if ( ! ( java.util.Objects.equals ( quota.getStoragePoolId ( ) , getStoragePoolId ( ) ) ) ) { return failValidation ( EngineMessage.ACTION_TYPE_FAILED_QUOTA_IS_NOT_VALID ) ; } return true ; }

Target:
public org.ovirt.engine.core.bll.validator.QuotaValidator createQuotaValidator ( org.ovirt.engine.core.compat.Guid quotaId ) { return org.ovirt.engine.core.bll.validator.QuotaValidator.createInstance ( quotaId , true ) ; }
Source:
private void IsTemplatePrivate_EntityChanged ( java.lang.Object sender , org.ovirt.engine.core.compat.EventArgs args ) { getIsTemplatePublic ( ) . setEntity ( ( ! ( ( java.lang.Boolean ) ( getIsTemplatePrivate ( ) . getEntity ( ) ) ) ) ) ; }

Target:
private void TotalCPUCores_EntityChanged ( java.lang.Object sender , org.ovirt.engine.core.compat.EventArgs args ) { getNumOfSockets ( ) . getSelectedItemChangedEvent ( ) . removeListener ( this ) ; getTotalCPUCores ( ) . getEntityChangedEvent ( ) . removeListener ( this ) ; getCoresPerSocket ( ) . getSelectedItemChangedEvent ( ) . removeListener ( this ) ; behavior.totalCpuCoresChanged ( ) ; getTotalCPUCores ( ) . getEntityChangedEvent ( ) . addListener ( this ) ; getNumOfSockets ( ) . getSelectedItemChangedEvent ( ) . addListener ( this ) ; getCoresPerSocket ( ) . getSelectedItemChangedEvent ( ) . addListener ( this ) ; }
Source:
public 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 getStorageDomainByName ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String storageDomainName ) { 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.GetStorageDomainByName , new org.ovirt.engine.core.common.queries.NameQueryParameters ( storageDomainName ) , aQuery ) ; }
Source:
protected com.google.gwt.safehtml.shared.SafeHtml templateWithLabels ( java.lang.String quota , int totalUsagePercentage , java.lang.String totalUsage , int usedByYouPercentage , java.lang.String usedByYou , int usedByOthersPercentage , java.lang.String usedByOthers , int freePercentage , java.lang.String free ) { return templates.quotaForUserBarToolTip ( org.ovirt.engine.ui.userportal.widget.QuotaProgressBar.constants.tooltipQuotaLabel ( ) , quota , org.ovirt.engine.ui.userportal.widget.QuotaProgressBar.constants.tooltipTotalUsageLabel ( ) , totalUsagePercentage , totalUsage , org.ovirt.engine.ui.userportal.widget.QuotaProgressBar.constants.youUseQuota ( ) , usedByYouPercentage , usedByYou , org.ovirt.engine.ui.userportal.widget.QuotaProgressBar.constants.othersUseQuota ( ) , usedByOthersPercentage , usedByOthers , org.ovirt.engine.ui.userportal.widget.QuotaProgressBar.constants.freeQuota ( ) , freePercentage , free ) ; }

Target:
protected com.google.gwt.safehtml.shared.SafeHtml templateWithLabels ( java.lang.String quota , int totalUsagePercentage , java.lang.String totalUsage , int usedByYouPercentage , java.lang.String usedByYou , int usedByOthersPercentage , java.lang.String usedByOthers , int freePercentage , java.lang.String free ) { return org.ovirt.engine.ui.userportal.widget.QuotaProgressBar.templates.quotaForUserBarToolTip ( org.ovirt.engine.ui.userportal.widget.QuotaProgressBar.constants.tooltipQuotaLabel ( ) , quota , org.ovirt.engine.ui.userportal.widget.QuotaProgressBar.constants.tooltipTotalUsageLabel ( ) , totalUsagePercentage , totalUsage , org.ovirt.engine.ui.userportal.widget.QuotaProgressBar.constants.youUseQuota ( ) , usedByYouPercentage , usedByYou , org.ovirt.engine.ui.userportal.widget.QuotaProgressBar.constants.othersUseQuota ( ) , usedByOthersPercentage , usedByOthers , org.ovirt.engine.ui.userportal.widget.QuotaProgressBar.constants.freeQuota ( ) , freePercentage , free ) ; }
Source:
public void testCanAttachSingleISOOrExport ( ) { for ( org.ovirt.engine.core.common.businessentities.StorageDomainType type : java.util.Arrays.< org.ovirt.engine.core.common.businessentities.StorageDomainType > asList ( StorageDomainType.ISO , StorageDomainType.ImportExport ) ) { storageDomain.setStorageDomainType ( type ) ; spyValidator ( ) ; org.junit.Assert.assertTrue ( ( ( "Attaching domain of type " + type ) + " failed while it should have succeed" ) , validator.validateDomainCanBeAttachedToPool ( ) . isValid ( ) ) ; } }

Target:
public void testCanAttachSingleISOOrExport ( ) { for ( org.ovirt.engine.core.common.businessentities.StorageDomainType type : java.util.Arrays.< org.ovirt.engine.core.common.businessentities.StorageDomainType > asList ( StorageDomainType.ISO , StorageDomainType.ImportExport ) ) { storageDomain.setStorageDomainType ( type ) ; spyValidator ( ) ; org.junit.Assert.assertThat ( validator.validateDomainCanBeAttachedToPool ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; } }
Source:
public org.ovirt.engine.core.common.businessentities.VDS activate ( ) { org.ovirt.engine.core.common.businessentities.VDS vds = null ; try { refreshHost ( vds ) ; } catch ( java.lang.Exception e ) { org.ovirt.engine.core.vdsbroker.VdsManager.log.infoFormat ( "Failed to activate VDS = {0} with error: {1}." , getVdsId ( ) , e.getMessage ( ) ) ; } return vds ; }

Target:
public org.ovirt.engine.core.common.businessentities.VDS activate ( ) { org.ovirt.engine.core.common.businessentities.VDS vds = null ; try { vds = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVdsDao ( ) . get ( getVdsId ( ) ) ; refreshHost ( vds ) ; } catch ( java.lang.Exception e ) { org.ovirt.engine.core.vdsbroker.VdsManager.log.infoFormat ( "Failed to activate VDS = {0} with error: {1}." , getVdsId ( ) , e.getMessage ( ) ) ; } return vds ; }
Source:
protected java.util.Set < java.lang.String > extractServers ( java.lang.String serversXml ) { if ( org.apache.commons.lang.StringUtils.isEmpty ( serversXml ) ) { throw new java.lang.RuntimeException ( "Could not get the peer list!" ) ; } try { return getServers ( org.ovirt.engine.core.utils.XmlUtils.loadXmlDoc ( serversXml ) . getElementsByTagName ( org.ovirt.engine.core.bll.utils.GlusterUtil.PEER ) ) ; } catch ( java.lang.Exception e ) { log.errorFormat ( "Error while parsing peer list xml [{0}]!" , serversXml , e ) ; throw new java.lang.RuntimeException ( e ) ; } }

Target:
protected java.util.Set < java.lang.String > extractServers ( java.lang.String serversXml ) { if ( org.apache.commons.lang.StringUtils.isEmpty ( serversXml ) ) { throw new java.lang.RuntimeException ( "Could not get the peer list!" ) ; } try { return getServers ( org.ovirt.engine.core.utils.XmlUtils.loadXmlDoc ( serversXml ) . getElementsByTagName ( org.ovirt.engine.core.bll.utils.GlusterUtil.PEER ) ) ; } catch ( java.lang.Exception e ) { log.error ( "Error while parsing peer list xml [{}]: {}" , serversXml , e.getMessage ( ) ) ; log.debug ( "Exception" , e ) ; throw new java.lang.RuntimeException ( e ) ; } }
Source:
protected void localize ( org.ovirt.engine.ui.webadmin.ApplicationConstants constants , org.ovirt.engine.ui.webadmin.ApplicationTemplates templates ) { latch.setLabel ( constants.checkConnectivityManageConfirmPopup ( ) ) ; messageLabel.setHTML ( templates.blackRedBold ( constants.youAreAboutManageConfirmPopup ( ) , constants.thisMightCauseManageConfirmPopup ( ) ) ) ; noteLabel.setHTML ( templates.middleBold ( constants.itIsManageConfirmPopup ( ) , constants.highlyRecommendedManageConfirmPopup ( ) , constants.toProceeedWithConnectivityCheckManageConfirmPopup ( ) ) ) ; }

Target:
protected void localize ( ) { latch.setLabel ( org.ovirt.engine.ui.webadmin.section.main.view.popup.host.HostManagementConfirmationPopupView.constants.checkConnectivityManageConfirmPopup ( ) ) ; messageLabel.setHTML ( org.ovirt.engine.ui.webadmin.section.main.view.popup.host.HostManagementConfirmationPopupView.templates.blackRedBold ( org.ovirt.engine.ui.webadmin.section.main.view.popup.host.HostManagementConfirmationPopupView.constants.youAreAboutManageConfirmPopup ( ) , org.ovirt.engine.ui.webadmin.section.main.view.popup.host.HostManagementConfirmationPopupView.constants.thisMightCauseManageConfirmPopup ( ) ) ) ; noteLabel.setHTML ( org.ovirt.engine.ui.webadmin.section.main.view.popup.host.HostManagementConfirmationPopupView.templates.middleBold ( org.ovirt.engine.ui.webadmin.section.main.view.popup.host.HostManagementConfirmationPopupView.constants.itIsManageConfirmPopup ( ) , org.ovirt.engine.ui.webadmin.section.main.view.popup.host.HostManagementConfirmationPopupView.constants.highlyRecommendedManageConfirmPopup ( ) , org.ovirt.engine.ui.webadmin.section.main.view.popup.host.HostManagementConfirmationPopupView.constants.toProceeedWithConnectivityCheckManageConfirmPopup ( ) ) ) ; }
Source:
public static org.ovirt.engine.core.bll.adbroker.RootDSE get ( org.ovirt.engine.core.ldap.LdapProviderType ldapProviderType , javax.naming.directory.Attributes rootDseRecords ) throws java.lang.NumberFormatException , javax.naming.NamingException { switch ( ldapProviderType ) { case activeDirectory : return new org.ovirt.engine.core.bll.adbroker.ADRootDSE ( rootDseRecords ) ; case ipa : return new org.ovirt.engine.core.bll.adbroker.IPARootDSE ( rootDseRecords ) ; case rhds : return new org.ovirt.engine.core.bll.adbroker.RHDSRootDSE ( rootDseRecords ) ; case itds : return new org.ovirt.engine.core.bll.adbroker.ITDSRootDSE ( rootDseRecords ) ; case openLdap : return new org.ovirt.engine.core.bll.adbroker.DefaultRootDSE ( rootDseRecords ) ; case general : default : return new org.ovirt.engine.core.bll.adbroker.GeneralRootDSE ( rootDseRecords ) ; } }

Target:
public static org.ovirt.engine.core.bll.adbroker.RootDSE get ( org.ovirt.engine.core.ldap.LdapProviderType ldapProviderType , javax.naming.directory.Attributes rootDseRecords ) throws java.lang.NumberFormatException , javax.naming.NamingException { switch ( ldapProviderType ) { case activeDirectory : return new org.ovirt.engine.core.bll.adbroker.ADRootDSE ( rootDseRecords ) ; case ipa : return new org.ovirt.engine.core.bll.adbroker.IPARootDSE ( rootDseRecords ) ; case rhds : return new org.ovirt.engine.core.bll.adbroker.RHDSRootDSE ( rootDseRecords ) ; case itds : return new org.ovirt.engine.core.bll.adbroker.ITDSRootDSE ( rootDseRecords ) ; case openLdap : return new org.ovirt.engine.core.bll.adbroker.DefaultRootDSE ( rootDseRecords ) ; default : throw new java.lang.IllegalArgumentException ( "Invalid LDAP provider type." ) ; } }
Source:
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 ) ; }

Target:
private void getVlanParentInterface ( org.ovirt.engine.core.compat.Guid vdsID , org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface , 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.GetVlanParent , new org.ovirt.engine.core.common.queries.InterfaceAndIdQueryParameters ( vdsID , iface ) , aQuery ) ; }
Source:
public void testTimeout ( ) throws java.lang.Throwable { org.ovirt.engine.core.uutils.ssh.SSHDialogTest.Sink sink = new org.ovirt.engine.core.uutils.ssh.SSHDialogTest.Sink ( new java.lang.String [ ] { "start" } , new java.lang.String [ ] { } ) ; sshDialog.setSoftTimeout ( ( 1 * 1000 ) ) ; sshDialog.connect ( ) ; sshDialog.authenticate ( ) ; sshDialog.executeCommand ( sink , "cat" , null ) ; sink.exception ( ) ; }

Target:
public void testTimeout ( ) throws java.lang.Throwable { org.ovirt.engine.core.uutils.ssh.SSHDialogTest.Sink sink = new org.ovirt.engine.core.uutils.ssh.SSHDialogTest.Sink ( new java.lang.String [ ] { "start" } , new java.lang.String [ ] { } ) ; sshDialog.setSoftTimeout ( ( 1 * 1000 ) ) ; sshDialog.connect ( ) ; sshDialog.authenticate ( ) ; org.junit.jupiter.api.Assertions.assertThrows ( javax.naming.TimeLimitExceededException.class , ( ) -> { sshDialog.executeCommand ( sink , "cat" , null ) ; sink.exception ( ) ; } ) ; }
Source:
public void testBlockingHostedEngineEditing ( ) { org.ovirt.engine.core.bll.UpdateVmCommandTest.mcr.mockConfigValue ( ConfigValues.AllowEditingHostedEngine , false ) ; vmStatic.setOrigin ( OriginType.MANAGED_HOSTED_ENGINE ) ; boolean validInput = command.validateInputs ( ) ; org.junit.Assert.assertThat ( validInput , org.hamcrest.core.Is.is ( false ) ) ; org.junit.Assert.assertTrue ( command.getReturnValue ( ) . getValidationMessages ( ) . contains ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_EDITING_HOSTED_ENGINE_IS_DISABLED.name ( ) ) ) ; }

Target:
public void testAllowedHostedEngineEditing ( ) { org.ovirt.engine.core.bll.UpdateVmCommandTest.mcr.mockConfigValue ( ConfigValues.AllowEditingHostedEngine , true ) ; vmStatic.setOrigin ( OriginType.MANAGED_HOSTED_ENGINE ) ; boolean validInput = command.validateInputs ( ) ; org.junit.Assert.assertThat ( validInput , org.hamcrest.core.Is.is ( true ) ) ; }
Source:
private static void handleErrorLog ( org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.compat.Guid storageDomainId , org.ovirt.engine.core.common.businessentities.ImageFileType imageType ) { java.util.List < org.ovirt.engine.core.common.businessentities.RepoImage > tempProblematicRepoFileList = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.RepoImage > ( ) ; org.ovirt.engine.core.common.businessentities.RepoImage repoImage = new org.ovirt.engine.core.common.businessentities.RepoImage ( ) ; repoImage.setStoragePoolId ( storagePoolId ) ; repoImage.setRepoDomainId ( storageDomainId ) ; repoImage.setFileType ( imageType ) ; tempProblematicRepoFileList.add ( repoImage ) ; org.ovirt.engine.core.bll.IsoDomainListSyncronizer.handleErrorLog ( tempProblematicRepoFileList ) ; }

Target:
private static void handleErrorLog ( org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.compat.Guid storageDomainId , org.ovirt.engine.core.common.businessentities.storage.ImageFileType imageType ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.RepoImage > tempProblematicRepoFileList = new java.util.ArrayList < > ( ) ; org.ovirt.engine.core.common.businessentities.storage.RepoImage repoImage = new org.ovirt.engine.core.common.businessentities.storage.RepoImage ( ) ; repoImage.setStoragePoolId ( storagePoolId ) ; repoImage.setRepoDomainId ( storageDomainId ) ; repoImage.setFileType ( imageType ) ; tempProblematicRepoFileList.add ( repoImage ) ; org.ovirt.engine.core.bll.IsoDomainListSyncronizer.handleErrorLog ( tempProblematicRepoFileList ) ; }
Source:
public void separateCustomPropertiesToUserAndPredefined ( org.ovirt.engine.core.compat.Version version , org.ovirt.engine.core.common.businessentities.VmStatic vmStatic ) { java.lang.String customProperties = vmStatic.getCustomProperties ( ) ; org.ovirt.engine.core.common.utils.customprop.VmPropertiesUtils.VMCustomProperties properties = parseProperties ( version , customProperties ) ; vmStatic.setPredefinedProperties ( properties.getPredefinedProperties ( ) ) ; vmStatic.setUserDefinedProperties ( properties.getUseDefinedProperties ( ) ) ; }

Target:
public void separateCustomPropertiesToUserAndPredefined ( org.ovirt.engine.core.compat.Version version , org.ovirt.engine.core.common.businessentities.VmBase vmBase ) { java.lang.String customProperties = vmBase.getCustomProperties ( ) ; org.ovirt.engine.core.common.utils.customprop.VmPropertiesUtils.VMCustomProperties properties = parseProperties ( version , customProperties ) ; vmBase.setPredefinedProperties ( properties.getPredefinedProperties ( ) ) ; vmBase.setUserDefinedProperties ( properties.getUseDefinedProperties ( ) ) ; }
Source:
public void testIsNetworkInSyncWhenStaticBootProtocolNetmaskDifferent ( ) throws java.lang.Exception { initIpConfigurationBootProtocolNetmask ( org.ovirt.engine.core.utils.NetworkInSyncWithVdsNetworkInterfaceTest.BOOT_PROTOCOL , false ) ; iface.setIpv4BootProtocol ( org.ovirt.engine.core.common.businessentities.network.NetworkBootProtocol.forValue ( ( ( ( org.ovirt.engine.core.utils.NetworkInSyncWithVdsNetworkInterfaceTest.BOOT_PROTOCOL.getValue ( ) ) + 1 ) % ( org.ovirt.engine.core.common.businessentities.network.NetworkBootProtocol.values ( ) . length ) ) ) ) ; org.junit.Assert.assertThat ( createTestedInstance ( ) . isNetworkInSync ( ) , org.hamcrest.CoreMatchers.is ( false ) ) ; }

Target:
private void initIpv6ConfigurationBootProtocol ( boolean sameBootProtocol ) { initIpv6Configuration ( ) ; ipv6Address.setBootProtocol ( org.ovirt.engine.core.utils.NetworkInSyncWithVdsNetworkInterfaceTest.IPV6_BOOT_PROTOCOL ) ; org.ovirt.engine.core.common.businessentities.network.Ipv6BootProtocol ifaceBootProtocol = ( sameBootProtocol ) ? org.ovirt.engine.core.utils.NetworkInSyncWithVdsNetworkInterfaceTest.IPV6_BOOT_PROTOCOL : org.ovirt.engine.core.common.businessentities.network.Ipv6BootProtocol.forValue ( ( ( ( org.ovirt.engine.core.utils.NetworkInSyncWithVdsNetworkInterfaceTest.IPV4_BOOT_PROTOCOL.getValue ( ) ) + 1 ) % ( org.ovirt.engine.core.common.businessentities.network.Ipv4BootProtocol.values ( ) . length ) ) ) ; iface.setIpv6BootProtocol ( ifaceBootProtocol ) ; }
Source:
protected void executeQueryCommand ( ) { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nic = org.ovirt.engine.core.bll.network.dc.GetNetworkLabelsByHostNicIdQuery.getDbFacade ( ) . getInterfaceDao ( ) . get ( org.ovirt.engine.core.bll.network.dc.GetNetworkLabelsByHostNicIdQuery.getParameters ( ) . getId ( ) ) ; org.ovirt.engine.core.bll.network.dc.GetNetworkLabelsByHostNicIdQuery.getQueryReturnValue ( ) . setReturnValue ( ( ( nic == null ) || ( ( nic.getLabels ( ) ) == null ) ? java.util.Collections.< org.ovirt.engine.core.common.businessentities.network.pseudo.NetworkLabel > emptyList ( ) : convertToNetworkLabels ( nic.getLabels ( ) ) ) ) ; }

Target:
protected void executeQueryCommand ( ) { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nic = org.ovirt.engine.core.bll.network.dc.GetNetworkLabelsByHostNicIdQuery.getDbFacade ( ) . getInterfaceDao ( ) . get ( org.ovirt.engine.core.bll.network.dc.GetNetworkLabelsByHostNicIdQuery.getParameters ( ) . getId ( ) ) ; org.ovirt.engine.core.bll.network.dc.GetNetworkLabelsByHostNicIdQuery.getQueryReturnValue ( ) . setReturnValue ( ( ( nic == null ) || ( ! ( org.ovirt.engine.core.utils.NetworkUtils.isLabeled ( nic ) ) ) ? java.util.Collections.< org.ovirt.engine.core.common.businessentities.network.pseudo.NetworkLabel > emptyList ( ) : convertToNetworkLabels ( nic.getLabels ( ) ) ) ) ; }
Source:
private void setUpGetBallooningExpectations ( ) throws java.lang.Exception { setUpGetEntityExpectations ( VdcQueryType.IsBalloonEnabled , org.ovirt.engine.core.common.queries.GetVmByVmIdParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , true ) ; }

Target:
private void setUpGetBallooningExpectations ( int times ) throws java.lang.Exception { for ( int i = 0 ; i < times ; i ++ ) { setUpGetEntityExpectations ( VdcQueryType.IsBalloonEnabled , org.ovirt.engine.core.common.queries.GetVmByVmIdParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ i ] } , true ) ; } }
Source:
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 ) ; }

Target:
public void getStorageDomainMaxNameLength ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Integer ) ( source ) ) . intValue ( ) : 1 ; } } ; getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.StorageDomainNameSizeLimit , getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
public void getStorageDomainByName ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String storageDomainName ) { 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.GetStorageDomainByName , new org.ovirt.engine.core.common.queries.NameQueryParameters ( storageDomainName ) , aQuery ) ; }

Target:
public void getHostById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { 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.GetVdsByVdsId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) . withoutRefresh ( ) , aQuery ) ; }
Source:
public static void getHostById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { 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.GetVdsByVdsId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }

Target:
public static void getStorageDomainList ( 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 ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageDomainsByStoragePoolId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) , aQuery ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeGeoRepStatusForXmlRpc glusterVolumeGeoRepStatus ( java.lang.String volumeName ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "GlusterVolume.geoRepStatus" ) . withParameter ( "volName" , volumeName ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) . withIgnoreResponseKey ( ) ; return new org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeGeoRepStatusForXmlRpc ( response ) ; }

Target:
public org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeGeoRepConfigListXmlRpc glusterVolumeGeoRepConfigList ( java.lang.String volumeName , java.lang.String slaveHost , java.lang.String slaveVolumeName , java.lang.String userName ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "GlusterVolume.geoRepConfigList" ) . withParameter ( "volumeName" , volumeName ) . withParameter ( "remoteHost" , slaveHost ) . withParameter ( "remoteVolumeName" , slaveVolumeName ) . withOptionalParameter ( "remoteUserName" , userName ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) ; return new org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeGeoRepConfigListXmlRpc ( response ) ; }
Source:
protected void SyncSearch ( ) { if ( ( getEntity ( ) ) == null ) { return ; } org.ovirt.engine.core.common.businessentities.VM vm = ( ( org.ovirt.engine.core.common.businessentities.VM ) ( getEntity ( ) ) ) ; super . SyncSearch ( VdcQueryType.GetVmInterfacesByVmId , new org.ovirt.engine.core.common.queries.GetVmByVmIdParameters ( vm.getId ( ) ) ) ; }

Target:
public void OnSuccess ( java.lang.Object model , java.lang.Object result ) { setGuestAgentData ( ( ( java.util.List < org.ovirt.engine.core.common.businessentities.VmGuestAgentInterface > ) ( result ) ) ) ; org.ovirt.engine.ui.uicommonweb.models.vms.VmInterfaceListModel.super . SyncSearch ( VdcQueryType.GetVmInterfacesByVmId , new org.ovirt.engine.core.common.queries.GetVmByVmIdParameters ( vm.getId ( ) ) ) ; }
Source:
org.ovirt.engine.core.bll.ValidationResult validateNotRemovingUsedNetworkByVms ( ) { java.util.Collection < java.lang.String > removedNetworks = new java.util.HashSet < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.network.NetworkAttachment removedAttachment : removedNetworkAttachments ) { removedNetworks.add ( existingNetworkRelatedToAttachment ( removedAttachment ) . getName ( ) ) ; } java.util.List < java.lang.String > vmNames = getVmInterfaceManager ( ) . findActiveVmsUsingNetworks ( host.getId ( ) , removedNetworks ) ; if ( vmNames.isEmpty ( ) ) { return org.ovirt.engine.core.bll.ValidationResult.VALID ; } else { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.NETWORK_CANNOT_DETACH_NETWORK_USED_BY_VMS , commaSeparated ( vmNames ) ) ; } }

Target:
org.ovirt.engine.core.bll.ValidationResult validateNotRemovingUsedNetworkByVms ( ) { java.util.Collection < java.lang.String > removedNetworks = new java.util.HashSet < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.network.NetworkAttachment removedAttachment : removedNetworkAttachments ) { removedNetworks.add ( existingNetworkRelatedToAttachment ( removedAttachment ) . getName ( ) ) ; } java.util.List < java.lang.String > vmNames = getVmInterfaceManager ( ) . findActiveVmsUsingNetworks ( host.getId ( ) , removedNetworks ) ; if ( vmNames.isEmpty ( ) ) { return org.ovirt.engine.core.bll.ValidationResult.VALID ; } else { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.NETWORK_CANNOT_DETACH_NETWORK_USED_BY_VMS , org.ovirt.engine.core.utils.ReplacementUtils.replaceWith ( org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidator.VAR_NETWORK_CANNOT_DETACH_NETWORK_USED_BY_VMS_LIST , vmNames ) ) ; } }
Source:
public static void GetDomainList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , boolean filterInternalDomain ) { 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 ? new java.util.ArrayList < java.lang.String > ( ( ( java.util.ArrayList < java.lang.String > ) ( source ) ) ) : new java.util.ArrayList < java.lang.String > ( ) ; } } ; org.ovirt.engine.core.common.queries.GetDomainListParameters tempVar = new org.ovirt.engine.core.common.queries.GetDomainListParameters ( ) ; tempVar.setFilterInternalDomain ( filterInternalDomain ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetDomainList , tempVar , aQuery ) ; }

Target:
public static void getDomainList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , boolean filterInternalDomain ) { 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 ? new java.util.ArrayList < java.lang.String > ( ( ( java.util.ArrayList < java.lang.String > ) ( source ) ) ) : new java.util.ArrayList < java.lang.String > ( ) ; } } ; org.ovirt.engine.core.common.queries.GetDomainListParameters tempVar = new org.ovirt.engine.core.common.queries.GetDomainListParameters ( ) ; tempVar.setFilterInternalDomain ( filterInternalDomain ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetDomainList , tempVar , aQuery ) ; }