auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
protected org.ovirt.engine.core.common.queries.VdcQueryParametersBase getQueryParameters ( ) { return new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) ; }

Target:
public org.ovirt.engine.api.model.Networks list ( ) { java.util.List < org.ovirt.engine.api.model.Network > entities = getBackendCollection ( VdcQueryType.GetNetworksByDataCenterId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) ) ; org.ovirt.engine.api.model.Networks networks = mapCollection ( entities ) ; for ( org.ovirt.engine.api.model.Network network : networks.getNetworks ( ) ) { network.setDisplay ( null ) ; } return networks ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc migrate ( java.util.Map < java.lang.String , java.lang.Object > migrationInfo ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "VM.migrate" ) . withParameter ( "vmID" , getVmId ( migrationInfo ) ) . withParameter ( "params" , migrationInfo ) . 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.vdsbroker.StatusOnlyReturnForXmlRpc ( response ) ; }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturn migrate ( java.util.Map < java.lang.String , java.lang.Object > migrationInfo ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "VM.migrate" ) . withParameter ( "vmID" , getVmId ( migrationInfo ) ) . withParameter ( "params" , migrationInfo ) . 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.vdsbroker.StatusOnlyReturn ( response ) ; }
Source:
public org.ovirt.engine.core.common.businessentities.Erratum getErratumForHost ( java.lang.String hostName , java.lang.String erratumId ) { org.ovirt.engine.core.bll.host.provider.foreman.ContentHost contentHost = findContentHost ( hostName ) ; if ( contentHost == null ) { log.error ( "Failed to find host on provider '{}' by host name '{}' " , getProvider ( ) . getName ( ) , hostName ) ; return null ; } return runErratumMethod ( java.lang.String.format ( org.ovirt.engine.core.bll.host.provider.foreman.ForemanHostProviderProxy.CONTENT_HOST_ERRATUM_ENTRY_POINT , contentHost.getUuid ( ) , erratumId ) ) ; }

Target:
public org.ovirt.engine.core.common.businessentities.Erratum getErratumForHost ( java.lang.String hostName , java.lang.String erratumId ) { return getContentHostProvider ( ) . getErratumForHost ( hostName , erratumId ) ; }
Source:
private < T extends org.ovirt.engine.core.common.businessentities.BusinessEntity < org.ovirt.engine.core.compat.Guid > & org.ovirt.engine.core.common.businessentities.Nameable > org.ovirt.engine.core.bll.ValidationResult validateCoherentIdentification ( java.lang.String violatingEntityId , org.ovirt.engine.core.compat.Guid referringId , java.lang.String referringName , org.ovirt.engine.core.common.errors.EngineMessage message , org.ovirt.engine.core.common.businessentities.BusinessEntityMap < T > map ) { boolean bothIdentificationSet = ( referringId != null ) && ( referringName != null ) ; java.lang.String [ ] replacements = createIncoherentIdentificationErrorReplacements ( violatingEntityId , referringId , referringName ) ; return org.ovirt.engine.core.bll.ValidationResult.failWith ( message , replacements ) . when ( ( bothIdentificationSet && ( isNameAndIdIncoherent ( referringId , referringName , map ) ) ) ) ; }

Target:
private org.ovirt.engine.core.bll.ValidationResult validateCoherentNetworkIdentification ( org.ovirt.engine.core.common.businessentities.network.NetworkAttachment attachment ) { org.ovirt.engine.core.compat.Guid networkId = attachment.getNetworkId ( ) ; java.lang.String networkName = attachment.getNetworkName ( ) ; org.ovirt.engine.core.compat.Guid violatingEntityId = attachment.getId ( ) ; return hostSetupNetworksValidatorHelper.validateCoherentIdentification ( java.lang.String.valueOf ( violatingEntityId ) , networkId , networkName , EngineMessage.NETWORK_ATTACHMENT_REFERENCES_NETWORK_INCOHERENTLY , networkBusinessEntityMap ) ; }
Source:
public void isUSBEnabledByDefault ( 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 ( ) : false ; } } ; getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.EnableUSBAsDefault , getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public void getClustersHavingHosts ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > list = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ) ( source ) ) ; java.util.Collections.sort ( list , new org.ovirt.engine.core.common.businessentities.comparators.NameableComparator ( ) ) ; return list ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllClustersHavingHosts , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }
Source:
protected java.util.List < java.lang.String > listFiles ( ) { org.ovirt.engine.core.common.queries.GetImagesListParameters queryParams = new org.ovirt.engine.core.common.queries.GetImagesListParameters ( asGuid ( storageDomainId ) , org.ovirt.engine.core.common.businessentities.storage.ImageFileType.All ) ; queryParams.setForceRefresh ( true ) ; java.util.List < org.ovirt.engine.core.common.businessentities.storage.RepoImage > files = getBackendCollection ( org.ovirt.engine.core.common.businessentities.storage.RepoImage.class , VdcQueryType.GetImagesList , queryParams ) ; return files.stream ( ) . map ( RepoImage :: getRepoImageId ) . collect ( java.util.stream.Collectors.toList ( ) ) ; }

Target:
protected java.util.List < java.lang.String > listFiles ( ) { org.ovirt.engine.core.common.queries.GetImagesListParameters queryParams = new org.ovirt.engine.core.common.queries.GetImagesListParameters ( asGuid ( storageDomainId ) , org.ovirt.engine.core.common.businessentities.storage.ImageFileType.All ) ; queryParams.setForceRefresh ( true ) ; java.util.List < org.ovirt.engine.core.common.businessentities.storage.RepoImage > files = getBackendCollection ( org.ovirt.engine.core.common.businessentities.storage.RepoImage.class , QueryType.GetImagesList , queryParams ) ; return files.stream ( ) . map ( RepoImage :: getRepoImageId ) . collect ( java.util.stream.Collectors.toList ( ) ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeSnapshotEntity prepareSnapshtoDetail ( java.util.Map < java.lang.String , java.lang.Object > map ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeSnapshotEntity snapshot = new org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeSnapshotEntity ( ) ; snapshot.setSnapshotId ( org.ovirt.engine.core.compat.Guid.createGuidFromString ( ( ( java.lang.String ) ( map.get ( org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeSnapshotCreateReturnForXmlRpc.UUID ) ) ) ) ) ; snapshot.setSnapshotName ( ( ( java.lang.String ) ( map.get ( org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeSnapshotCreateReturnForXmlRpc.NAME ) ) ) ) ; snapshot.setCreatedAt ( new java.util.Date ( ) ) ; return snapshot ; }

Target:
private org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeSnapshotEntity prepareSnapshtoDetail ( java.util.Map < java.lang.String , java.lang.Object > map ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeSnapshotEntity snapshot = new org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeSnapshotEntity ( ) ; snapshot.setSnapshotId ( org.ovirt.engine.core.compat.Guid.createGuidFromString ( ( ( java.lang.String ) ( map.get ( org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeSnapshotCreateReturn.UUID ) ) ) ) ) ; snapshot.setSnapshotName ( ( ( java.lang.String ) ( map.get ( org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeSnapshotCreateReturn.NAME ) ) ) ) ; snapshot.setCreatedAt ( new java.util.Date ( ) ) ; return snapshot ; }
Source:
public static org.ovirt.engine.api.model.StorageDomainStatus map ( org.ovirt.engine.api.model.StorageDomainStatus status , org.ovirt.engine.api.model.StorageDomainStatus template ) { switch ( status ) { case Unattached : return org.ovirt.engine.api.model.StorageDomainStatus.UNATTACHED ; case Active : return org.ovirt.engine.api.model.StorageDomainStatus.ACTIVE ; case InActive : return org.ovirt.engine.api.model.StorageDomainStatus.INACTIVE ; case Locked : return org.ovirt.engine.api.model.StorageDomainStatus.LOCKED ; case Maintenance : return org.ovirt.engine.api.model.StorageDomainStatus.MAINTENANCE ; case Unknown : return org.ovirt.engine.api.model.StorageDomainStatus.UNKNOWN ; case Uninitialized : return null ; default : return null ; } }

Target:
public static org.ovirt.engine.api.model.StorageDomainStatus map ( org.ovirt.engine.api.model.StorageDomainStatus status , org.ovirt.engine.api.model.StorageDomainStatus template ) { switch ( status ) { case Unattached : return org.ovirt.engine.api.model.StorageDomainStatus.UNATTACHED ; case Active : return org.ovirt.engine.api.model.StorageDomainStatus.ACTIVE ; case InActive : return org.ovirt.engine.api.model.StorageDomainStatus.INACTIVE ; case Locked : return org.ovirt.engine.api.model.StorageDomainStatus.LOCKED ; case PreparingForMaintenance : return org.ovirt.engine.api.model.StorageDomainStatus.PREPARING_FOR_MAINTENANCE ; case Maintenance : return org.ovirt.engine.api.model.StorageDomainStatus.MAINTENANCE ; case Unknown : return org.ovirt.engine.api.model.StorageDomainStatus.UNKNOWN ; case Uninitialized : return null ; default : return null ; } }
Source:
public void postOnCreateVolume ( org.ovirt.engine.core.common.action.VdcReturnValueBase returnValue ) { org.ovirt.engine.ui.uicommonweb.models.gluster.VolumeModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.gluster.VolumeModel ) ( getWindow ( ) ) ) ; model.StopProgress ( ) ; if ( ( returnValue != null ) && ( returnValue.getSucceeded ( ) ) ) { cancel ( ) ; org.ovirt.engine.core.compat.Guid volumeId = ( ( org.ovirt.engine.core.compat.Guid ) ( returnValue.getActionReturnValue ( ) ) ) ; if ( ( ( java.lang.Boolean ) ( model.getOptimizeForVirtStore ( ) . getEntity ( ) ) ) ) { optimizeVolumesForVirtStore ( java.util.Arrays.asList ( volumeId ) ) ; } } }

Target:
public void postOnCreateVolume ( org.ovirt.engine.core.common.action.VdcReturnValueBase returnValue ) { org.ovirt.engine.ui.uicommonweb.models.gluster.VolumeModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.gluster.VolumeModel ) ( getWindow ( ) ) ) ; model.stopProgress ( ) ; if ( ( returnValue != null ) && ( returnValue.getSucceeded ( ) ) ) { cancel ( ) ; org.ovirt.engine.core.compat.Guid volumeId = ( ( org.ovirt.engine.core.compat.Guid ) ( returnValue.getActionReturnValue ( ) ) ) ; if ( ( ( java.lang.Boolean ) ( model.getOptimizeForVirtStore ( ) . getEntity ( ) ) ) ) { optimizeVolumesForVirtStore ( java.util.Arrays.asList ( volumeId ) ) ; } } }
Source:
public void testDiskStats ( ) { java.util.Map < java.lang.String , java.lang.Object > disksStats = new java.util.HashMap < java.lang.String , java.lang.Object > ( ) ; java.util.Map < java.lang.String , java.lang.Object > disk = new java.util.HashMap < java.lang.String , java.lang.Object > ( ) ; disk.put ( VdsProperties.DISK_STATS_FREE , org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectBuilderTest.SIZE_FOR_DISK_STATS ) ; disksStats.put ( "a" , disk ) ; disksStats.put ( "b" , disk ) ; org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcStruct xml = setDisksStatsInXmlRpc ( disksStats ) ; validateDisksStatsList ( getVds ( ) , xml , false ) ; }

Target:
public void testDiskStats ( ) { java.util.Map < java.lang.String , java.lang.Object > disksStats = new java.util.HashMap < java.lang.String , java.lang.Object > ( ) ; java.util.Map < java.lang.String , java.lang.Object > disk = new java.util.HashMap < java.lang.String , java.lang.Object > ( ) ; disk.put ( VdsProperties.DISK_STATS_FREE , org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectBuilderTest.SIZE_FOR_DISK_STATS ) ; disksStats.put ( "a" , disk ) ; disksStats.put ( "b" , disk ) ; org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcStruct xml = org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectBuilderTest.setDisksStatsInXmlRpc ( disksStats ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectBuilderTest.validateDisksStatsList ( org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectBuilderTest.getVds ( ) , xml , false ) ; }
Source:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel ) ( target ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.VDSGroup > clusters = ( ( java.util.List < org.ovirt.engine.core.common.businessentities.VDSGroup > ) ( returnValue ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.VDSGroup > filteredClusters = org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.filterByArchitecture ( clusters , vm.getClusterArch ( ) ) ; model.setDataCentersAndClusters ( model , dataCenters , filteredClusters , vm.getVdsGroupId ( ) ) ; initTemplate ( ) ; initCdImage ( ) ; initSoundCard ( vm.getId ( ) ) ; }

Target:
public void oSType_SelectedItemChanged ( ) { java.lang.Integer osType = getModel ( ) . getOSType ( ) . getSelectedItem ( ) ; if ( osType != null ) { org.ovirt.engine.core.compat.Guid id = ( basedOnCustomInstanceType ( ) ) ? vm.getId ( ) : getModel ( ) . getInstanceTypes ( ) . getSelectedItem ( ) . getId ( ) ; updateVirtioScsiEnabledWithoutDetach ( id , osType ) ; } }
Source:
private void DomainRecoveredFromProblem ( org.ovirt.engine.core.compat.Guid domainId , org.ovirt.engine.core.compat.Guid vdsId , java.lang.String vdsName ) { org.ovirt.engine.core.vdsbroker.irsbroker.IrsBrokerCommand.log.infoFormat ( "Domain {0} recovered from problem. vds: {1}" , domainId , vdsName ) ; ClearVds ( vdsId , domainId ) ; _domainsInProblem.get ( domainId ) . remove ( vdsId ) ; if ( ( _domainsInProblem.get ( domainId ) . size ( ) ) == 0 ) { org.ovirt.engine.core.vdsbroker.irsbroker.IrsBrokerCommand.log.infoFormat ( ( "Domain {0} has recovered from problem. No active host in the DC is reporting it as" + " problematic, so clearing the domain recovery timer." ) , domainId ) ; _domainsInProblem.remove ( domainId ) ; ClearTimer ( domainId ) ; } }

Target:
private void DomainRecoveredFromProblem ( org.ovirt.engine.core.compat.Guid domainId , org.ovirt.engine.core.compat.Guid vdsId , java.lang.String vdsName ) { java.lang.String domainIdTuple = org.ovirt.engine.core.vdsbroker.irsbroker.IrsBrokerCommand.IrsProxyData.getDomainIdTuple ( domainId ) ; org.ovirt.engine.core.vdsbroker.irsbroker.IrsBrokerCommand.log.infoFormat ( "Domain {0} recovered from problem. vds: {1}" , domainIdTuple , vdsName ) ; ClearVds ( vdsId , domainId ) ; _domainsInProblem.get ( domainId ) . remove ( vdsId ) ; if ( ( _domainsInProblem.get ( domainId ) . size ( ) ) == 0 ) { org.ovirt.engine.core.vdsbroker.irsbroker.IrsBrokerCommand.log.infoFormat ( ( "Domain {0} has recovered from problem. No active host in the DC is reporting it as" + " problematic, so clearing the domain recovery timer." ) , domainIdTuple ) ; _domainsInProblem.remove ( domainId ) ; ClearTimer ( domainId ) ; } }
Source:
private void initVncKeyboardLayout ( ) { final java.util.List < java.lang.String > layouts = ( ( java.util.List < java.lang.String > ) ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getConfigValuePreConverted ( ConfigurationValues.VncKeyboardLayoutValidValues ) ) ) ; final java.util.ArrayList < java.lang.String > vncKeyboardLayoutItems = new java.util.ArrayList < java.lang.String > ( ) ; vncKeyboardLayoutItems.add ( null ) ; vncKeyboardLayoutItems.addAll ( layouts ) ; getVncKeyboardLayout ( ) . setItems ( vncKeyboardLayoutItems ) ; getVncKeyboardLayout ( ) . setIsAvailable ( isVncSelected ( ) ) ; }

Target:
private void updateDisplayAndGraphics ( ) { org.ovirt.engine.core.common.businessentities.VDSGroup cluster = getSelectedCluster ( ) ; java.lang.Integer osType = getOSType ( ) . getSelectedItem ( ) ; if ( ( cluster == null ) || ( osType == null ) ) { return ; } java.util.List < org.ovirt.engine.core.common.utils.Pair < org.ovirt.engine.core.common.businessentities.GraphicsType , org.ovirt.engine.core.common.businessentities.DisplayType > > graphicsAndDisplays = org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getGraphicsAndDisplays ( osType , cluster.getCompatibilityVersion ( ) ) ; initDisplayModels ( graphicsAndDisplays ) ; }
Source:
public boolean test ( org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain ) { updateDisksStorage ( storageDomain , memoryDisks ) ; org.ovirt.engine.core.bll.validator.storage.StorageDomainValidator storageDomainValidator = getStorageDomainValidator ( storageDomain ) ; return ( storageDomainValidator.isDomainWithinThresholds ( ) . isValid ( ) ) && ( storageDomainValidator.hasSpaceForClonedDisks ( memoryDisks ) . isValid ( ) ) ; }

Target:
public boolean test ( org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain ) { memoryStorageHandler.updateDisksStorage ( storageDomain , memoryDisks ) ; org.ovirt.engine.core.bll.validator.storage.StorageDomainValidator storageDomainValidator = getStorageDomainValidator ( storageDomain ) ; return ( storageDomainValidator.isDomainWithinThresholds ( ) . isValid ( ) ) && ( storageDomainValidator.hasSpaceForClonedDisks ( memoryDisks ) . isValid ( ) ) ; }
Source:
private void validateMimeType ( ) { if ( ! ( imageType.getMimeType ( ) . equals ( mimeType ) ) ) { validationResult = new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.VM_ICON_MIME_TYPE_DOESNT_MATCH_IMAGE_DATA , ( "$mimeType " + ( mimeType ) ) , ( "$imageType " + ( imageType.getMimeType ( ) ) ) ) ; } }

Target:
private void validateMimeType ( ) { if ( ! ( imageType.getMimeType ( ) . equals ( mimeType ) ) ) { validationResult = new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.VM_ICON_MIME_TYPE_DOESNT_MATCH_IMAGE_DATA , ( "$mimeType " + ( mimeType ) ) , ( "$imageType " + ( imageType.getMimeType ( ) ) ) ) ; } }
Source:
public static java.util.Locale getLocaleFromString ( java.lang.String localeString , boolean returnDefaultLocale ) { java.util.Locale result = ( returnDefaultLocale ) ? null : java.util.Locale.US ; try { result = org.apache.commons.lang.LocaleUtils.toLocale ( localeString ) ; if ( ( result == null ) && returnDefaultLocale ) { result = java.util.Locale.US ; } } catch ( java.lang.IllegalArgumentException e ) { result = ( returnDefaultLocale ) ? java.util.Locale.US : null ; } return result ; }

Target:
public static java.util.Locale getLocaleFromString ( java.lang.String localeString , boolean returnDefaultLocale ) { java.util.Locale result = ( returnDefaultLocale ) ? null : java.util.Locale.US ; try { result = org.apache.commons.lang.LocaleUtils.toLocale ( ( localeString != null ? localeString.replaceAll ( "\\-" , "_" ) : localeString ) ) ; if ( ( result == null ) && returnDefaultLocale ) { result = java.util.Locale.US ; } } catch ( java.lang.IllegalArgumentException e ) { result = ( returnDefaultLocale ) ? java.util.Locale.US : null ; } return result ; }
Source:
void localize ( org.ovirt.engine.ui.webadmin.ApplicationConstants constants ) { pathLabel.setText ( constants.storagePopupNfsPathLabel ( ) ) ; pathHintLabel.setText ( constants.storagePopupNfsPathHintLabel ( ) ) ; warningLabel.setText ( constants.advancedOptionsLabel ( ) ) ; overrideEditor.setLabel ( constants.storagePopupNfsOverrideLabel ( ) ) ; versionLabel.setText ( constants.storagePopupNfsVersionLabel ( ) ) ; retransmissionsLabel.setText ( constants.storagePopupNfsRetransmissionsLabel ( ) ) ; timeoutLabel.setText ( constants.storagePopupNfsTimeoutLabel ( ) ) ; }

Target:
void localize ( org.ovirt.engine.ui.webadmin.ApplicationConstants constants ) { pathLabel.setText ( constants.storagePopupNfsPathLabel ( ) ) ; pathHintLabel.setText ( constants.storagePopupNfsPathHintLabel ( ) ) ; warningLabel.setText ( constants.advancedOptionsLabel ( ) ) ; overrideEditor.setLabel ( constants.storagePopupNfsOverrideLabel ( ) ) ; versionLabel.setText ( constants.storagePopupNfsVersionLabel ( ) ) ; retransmissionsLabel.setText ( constants.storagePopupNfsRetransmissionsLabel ( ) ) ; timeoutLabel.setText ( constants.storagePopupNfsTimeoutLabel ( ) ) ; mountOptionsLabel.setText ( constants.storagePopupAdditionalMountOptionsLabel ( ) ) ; }
Source:
private org.ovirt.engine.core.common.vdscommands.HostSetupNetworksVdsCommandParameters createSetupNetworksParameters ( int timeout ) { final org.ovirt.engine.core.common.vdscommands.HostSetupNetworksVdsCommandParameters hostCmdParams = new org.ovirt.engine.core.common.vdscommands.HostSetupNetworksVdsCommandParameters ( org.ovirt.engine.core.bll.network.host.HostSetupNetworksCommand.getVds ( ) , getNetworks ( ) , getRemovedNetworks ( ) , org.ovirt.engine.core.bll.network.host.HostSetupNetworksCommand.getParameters ( ) . getBonds ( ) , getRemovedBonds ( ) ) ; hostCmdParams.setRollbackOnFailure ( org.ovirt.engine.core.bll.network.host.HostSetupNetworksCommand.getParameters ( ) . rollbackOnFailure ( ) ) ; hostCmdParams.setConectivityTimeout ( timeout ) ; boolean hostNetworkQosSupported = org.ovirt.engine.core.common.FeatureSupported.hostNetworkQos ( org.ovirt.engine.core.bll.network.host.HostSetupNetworksCommand.getVds ( ) . getVdsGroupCompatibilityVersion ( ) ) ; hostCmdParams.setHostNetworkQosSupported ( hostNetworkQosSupported ) ; return hostCmdParams ; }

Target:
private java.util.Set < java.lang.String > getAllNetworksToRemove ( ) { java.util.Set < java.lang.String > result = new java.util.HashSet < > ( ( ( getRemovedNetworks ( ) . size ( ) ) + ( getRemovedUnmanagedNetworks ( ) . size ( ) ) ) ) ; result.addAll ( getRemovedNetworks ( ) ) ; result.addAll ( getRemovedUnmanagedNetworks ( ) ) ; return result ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc validateStorageDomain ( java.lang.String sdUUID ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.validateStorageDomain ( sdUUID ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc snapshot ( java.lang.String vmId , java.util.Map < java.lang.String , java.lang.String > [ ] disks ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.snapshot ( vmId , disks ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
Source:
public void shouldValidateSingleNodePinning ( ) { vm.setvNumaNodeList ( java.util.Arrays.asList ( org.ovirt.engine.core.bll.utils.NumaTestUtils.createVmNumaNode ( 0 , java.util.Arrays.asList ( org.ovirt.engine.core.bll.utils.NumaTestUtils.createVdsNumaNode ( 1 ) ) ) ) ) ; vm.setNumaTuneMode ( NumaTuneMode.PREFERRED ) ; org.junit.Assert.assertTrue ( org.ovirt.engine.core.bll.numa.vm.NumaValidator.checkVmNumaNodesIntegrity ( vm , vm.getvNumaNodeList ( ) ) . isValid ( ) ) ; }

Target:
public void shouldValidateSingleNodePinning ( ) { vm.setvNumaNodeList ( java.util.Collections.singletonList ( org.ovirt.engine.core.bll.utils.NumaTestUtils.createVmNumaNode ( 0 , java.util.Collections.singletonList ( org.ovirt.engine.core.bll.utils.NumaTestUtils.createVdsNumaNode ( 1 ) ) ) ) ) ; vm.setNumaTuneMode ( NumaTuneMode.PREFERRED ) ; org.junit.Assert.assertTrue ( underTest.checkVmNumaNodesIntegrity ( vm , vm.getvNumaNodeList ( ) ) . isValid ( ) ) ; }
Source:
public void sufficientDiskSpace ( ) { org.ovirt.engine.core.bll.validator.ImportValidator validator = setupDiskSpaceTest ( createParameters ( ) ) ; org.junit.Assert.assertTrue ( validator.validateSpaceRequirements ( mockCreateDiskDummiesForSpaceValidations ( ) ) . isValid ( ) ) ; org.mockito.Mockito.verify ( multipleSdValidator ) . allDomainsHaveSpaceForClonedDisks ( org.mockito.ArgumentMatchers.any ( ) ) ; org.mockito.Mockito.verify ( multipleSdValidator , org.mockito.Mockito.never ( ) ) . allDomainsHaveSpaceForDisksWithSnapshots ( org.mockito.ArgumentMatchers.any ( ) ) ; org.mockito.Mockito.verify ( multipleSdValidator , org.mockito.Mockito.never ( ) ) . allDomainsHaveSpaceForNewDisks ( org.mockito.ArgumentMatchers.any ( ) ) ; }

Target:
public void sufficientDiskSpace ( ) { org.ovirt.engine.core.bll.validator.ImportValidator validator = setupDiskSpaceTest ( createParameters ( ) ) ; org.junit.jupiter.api.Assertions.assertTrue ( validator.validateSpaceRequirements ( mockCreateDiskDummiesForSpaceValidations ( ) ) . isValid ( ) ) ; org.mockito.Mockito.verify ( multipleSdValidator ) . allDomainsHaveSpaceForClonedDisks ( org.mockito.ArgumentMatchers.any ( ) ) ; org.mockito.Mockito.verify ( multipleSdValidator , org.mockito.Mockito.never ( ) ) . allDomainsHaveSpaceForDisksWithSnapshots ( org.mockito.ArgumentMatchers.any ( ) ) ; org.mockito.Mockito.verify ( multipleSdValidator , org.mockito.Mockito.never ( ) ) . allDomainsHaveSpaceForNewDisks ( org.mockito.ArgumentMatchers.any ( ) ) ; }
Source:
public java.util.List < org.ovirt.api.metamodel.concepts.Link > getDeclaredLinks ( ) { return new java.util.ArrayList ( links ) ; }

Target:
public java.util.stream.Stream < org.ovirt.api.metamodel.concepts.Link > links ( ) { java.util.stream.Stream < org.ovirt.api.metamodel.concepts.Link > result = declaredLinks ( ) ; if ( ( ( base ) != null ) && ( ( base ) instanceof org.ovirt.api.metamodel.concepts.StructType ) ) { result = java.util.stream.Stream.concat ( ( ( org.ovirt.api.metamodel.concepts.StructType ) ( base ) ) . links ( ) , result ) ; } return result ; }
Source:
public void testGetWithInvalidStorageId ( ) { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpEntityQueryExpectations ( 1 , getIscsiBondWithNoMatchingStorages ( ) ) ; try { resource.get ( ) ; org.junit.jupiter.api.Assertions.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }

Target:
public void testGetWithInvalidStorageId ( ) { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpEntityQueryExpectations ( 1 , getIscsiBondWithNoMatchingStorages ( ) ) ; verifyNotFoundException ( org.junit.jupiter.api.Assertions.assertThrows ( javax.ws.rs.WebApplicationException.class , resource :: get ) ) ; }
Source:
public void testBootProtocolSetForDisplayNetworkWhenNullValuedIpConfigurationAndWhenNetworkClusterDisplayIsFalse ( ) { doTestBootProtocolSetForDisplayNetworkWhenNullValuedIpConfigurationAndWhenNetworkClusterDisplayIsFalse ( false , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }

Target:
public void testBootProtocolSetForDisplayNetworkWhenBootProtocolIsDhcp ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.Network network = new org.ovirt.engine.core.common.businessentities.network.Network ( ) ; network.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; org.ovirt.engine.core.common.businessentities.network.NetworkAttachment attachment = createNetworkAttachmentWithIpConfiguration ( NetworkBootProtocol.DHCP , null , null ) ; attachment.setNetworkId ( network.getId ( ) ) ; doTestBootProtocolSetForDisplayNetworkWhenNullValuedIpConfigurationAndWhenNetworkClusterDisplay ( true , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) , network , attachment ) ; }
Source:
public void edit ( final org.ovirt.engine.ui.uicommonweb.models.vms.SnapshotModel model ) { org.ovirt.engine.ui.common.widget.uicommon.popup.vm.VmSnapshotCreatePopupWidget.Driver.driver.edit ( model ) ; model.getPropertyChangedEvent ( ) . addListener ( new org.ovirt.engine.ui.uicompat.IEventListener ( ) { @ java.lang.Override public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { java.lang.String propName = ( ( org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ) ( args ) ) . PropertyName ; if ( "Message" . equals ( propName ) ) { appendMessage ( model.getMessage ( ) ) ; } } } ) ; }

Target:
public void edit ( final org.ovirt.engine.ui.uicommonweb.models.vms.SnapshotModel model ) { driver.edit ( model ) ; model.getPropertyChangedEvent ( ) . addListener ( new org.ovirt.engine.ui.uicompat.IEventListener ( ) { @ java.lang.Override public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { java.lang.String propName = ( ( org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ) ( args ) ) . PropertyName ; if ( "Message" . equals ( propName ) ) { appendMessage ( model.getMessage ( ) ) ; } } } ) ; }
Source:
public boolean validateStoragePoolConnectionsInHost ( org.ovirt.engine.core.common.businessentities.VDS vds , java.util.List < org.ovirt.engine.core.common.businessentities.storage_server_connections > connections , org.ovirt.engine.core.compat.Guid storagePoolId ) { @ java.lang.SuppressWarnings ( value = "unchecked" ) java.util.HashMap < java.lang.String , java.lang.String > validateConnections = ( ( java.util.HashMap < java.lang.String , java.lang.String > ) ( org.ovirt.engine.core.bll.Backend.getInstance ( ) . getResourceManager ( ) . RunVdsCommand ( VDSCommandType.ValidateStorageServerConnection , new org.ovirt.engine.core.common.vdscommands.ConnectStorageServerVDSCommandParameters ( vds.getId ( ) , storagePoolId , getType ( ) , connections ) ) . getReturnValue ( ) ) ) ; return IsConnectSucceeded ( validateConnections , connections ) ; }

Target:
public boolean validateStoragePoolConnectionsInHost ( org.ovirt.engine.core.common.businessentities.VDS vds , java.util.List < org.ovirt.engine.core.common.businessentities.StorageServerConnections > connections , org.ovirt.engine.core.compat.Guid storagePoolId ) { @ java.lang.SuppressWarnings ( value = "unchecked" ) java.util.HashMap < java.lang.String , java.lang.String > validateConnections = ( ( java.util.HashMap < java.lang.String , java.lang.String > ) ( org.ovirt.engine.core.bll.Backend.getInstance ( ) . getResourceManager ( ) . RunVdsCommand ( VDSCommandType.ValidateStorageServerConnection , new org.ovirt.engine.core.common.vdscommands.ConnectStorageServerVDSCommandParameters ( vds.getId ( ) , storagePoolId , getType ( ) , connections ) ) . getReturnValue ( ) ) ) ; return isConnectSucceeded ( validateConnections , connections ) ; }
Source:
protected boolean validateIsImagesOnDomains ( ) { for ( org.ovirt.engine.core.common.businessentities.storage.DiskImage image : getImagesToCheckDestinationStorageDomains ( ) ) { if ( ! ( image.getStorageIds ( ) . containsAll ( diskInfoDestinationMap.get ( image.getId ( ) ) . getStorageIds ( ) ) ) ) { addCanDoActionMessage ( VdcBllMessages.ACTION_TYPE_FAILED_TEMPLATE_NOT_FOUND_ON_DESTINATION_DOMAIN ) ; return false ; } } return true ; }

Target:
protected boolean validateIsImagesOnDomains ( ) { for ( org.ovirt.engine.core.common.businessentities.storage.DiskImage image : getImagesToCheckDestinationStorageDomains ( ) ) { if ( ! ( image.getStorageIds ( ) . containsAll ( diskInfoDestinationMap.get ( image.getId ( ) ) . getStorageIds ( ) ) ) ) { addCanDoActionMessage ( EngineMessage.ACTION_TYPE_FAILED_TEMPLATE_NOT_FOUND_ON_DESTINATION_DOMAIN ) ; return false ; } } return true ; }
Source:
public void getAllProviders ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { getAllProviders ( aQuery , true ) ; }

Target:
public void getExternalProviderDiscoveredHostList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.common.businessentities.Provider provider ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ExternalDiscoveredHost > ( ) ; } return source ; } } ; org.ovirt.engine.core.common.queries.ProviderQueryParameters params = new org.ovirt.engine.core.common.queries.ProviderQueryParameters ( ) ; params.setProvider ( provider ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetDiscoveredHostListFromExternalProvider , params , aQuery ) ; }
Source:
protected void updateCpuProfile ( org.ovirt.engine.core.compat.Guid clusterId , org.ovirt.engine.core.compat.Version vdsGroupCompatibilityVersion , org.ovirt.engine.core.compat.Guid cpuProfileId ) { if ( java.lang.Boolean.TRUE.equals ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getConfigValuePreConverted ( ConfigurationValues.CpuQosSupported , vdsGroupCompatibilityVersion.getValue ( ) ) ) ) { getModel ( ) . getCpuProfiles ( ) . setIsAvailable ( true ) ; fetchCpuProfiles ( clusterId , cpuProfileId ) ; } else { getModel ( ) . getCpuProfiles ( ) . setIsAvailable ( false ) ; } }

Target:
protected void updateCpuProfile ( org.ovirt.engine.core.compat.Guid clusterId , org.ovirt.engine.core.compat.Version clusterCompatibilityVersion , org.ovirt.engine.core.compat.Guid cpuProfileId ) { if ( java.lang.Boolean.TRUE.equals ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getConfigValuePreConverted ( ConfigurationValues.CpuQosSupported , clusterCompatibilityVersion.getValue ( ) ) ) ) { getModel ( ) . getCpuProfiles ( ) . setIsAvailable ( true ) ; fetchCpuProfiles ( clusterId , cpuProfileId ) ; } else { getModel ( ) . getCpuProfiles ( ) . setIsAvailable ( false ) ; } }
Source:
private void localize ( org.ovirt.engine.ui.webadmin.ApplicationConstants constants ) { networkEditor.setLabel ( constants.networkProfilePopup ( ) ) ; nameEditor.setLabel ( constants.nameProfilePopup ( ) ) ; descriptionEditor.setLabel ( constants.descriptionProfilePopup ( ) ) ; portMirroringEditor.setLabel ( constants.portMirroringProfilePopup ( ) ) ; publicUseEditor.setLabel ( constants.publicUseProfilePopup ( ) ) ; }

Target:
private void localize ( org.ovirt.engine.ui.webadmin.ApplicationConstants constants ) { networkEditor.setLabel ( constants.networkVnicProfile ( ) ) ; nameEditor.setLabel ( constants.nameVnicProfile ( ) ) ; descriptionEditor.setLabel ( constants.descriptionVnicProfile ( ) ) ; portMirroringEditor.setLabel ( constants.portMirroringVnicProfile ( ) ) ; publicUseEditor.setLabel ( constants.publicUseVnicProfile ( ) ) ; }
Source:
protected void executeCommand ( ) { final org.ovirt.engine.core.compat.Guid providerId = org.ovirt.engine.core.bll.provider.RemoveProviderCommand.getParameters ( ) . getProvider ( ) . getId ( ) ; org.ovirt.engine.core.bll.provider.ProviderProxy providerProxy = org.ovirt.engine.core.bll.provider.ProviderProxyFactory.getInstance ( ) . create ( org.ovirt.engine.core.bll.provider.RemoveProviderCommand.getParameters ( ) . getProvider ( ) ) ; if ( providerProxy != null ) { providerProxy.onRemoval ( ) ; } org.ovirt.engine.core.bll.provider.RemoveProviderCommand.getProviderDao ( ) . remove ( providerId ) ; org.ovirt.engine.core.bll.provider.RemoveProviderCommand.setSucceeded ( true ) ; }

Target:
protected boolean validateRemoveProvider ( ) { if ( ( getProviderProxy ( ) ) != null ) { org.ovirt.engine.core.bll.provider.ProviderValidator providerValidator = getProviderProxy ( ) . getProviderValidator ( ) ; return validate ( providerValidator.validateRemoveProvider ( ) ) ; } return true ; }
Source:
private java.util.List < org.ovirt.engine.core.common.action.VdcReturnValueBase > runMultipleActionsImpl ( org.ovirt.engine.core.common.action.VdcActionType actionType , java.util.List < org.ovirt.engine.core.common.action.VdcActionParametersBase > parameters , boolean isInternal , boolean isRunOnlyIfAllValidationPass , boolean isWaitForResult , org.ovirt.engine.core.bll.context.CommandContext commandContext ) { org.ovirt.engine.core.bll.MultipleActionsRunner runner = multipleActionsRunnersFactory.createMultipleActionsRunner ( actionType , parameters , isInternal , commandContext ) ; runner.setIsRunOnlyIfAllValidatePass ( isRunOnlyIfAllValidationPass ) ; runner.setIsWaitForResult ( isWaitForResult ) ; return runner.execute ( ) ; }

Target:
private java.util.List < org.ovirt.engine.core.common.action.VdcReturnValueBase > runMultipleActionsImpl ( org.ovirt.engine.core.common.action.ActionType actionType , java.util.List < org.ovirt.engine.core.common.action.VdcActionParametersBase > parameters , boolean isInternal , boolean isRunOnlyIfAllValidationPass , boolean isWaitForResult , org.ovirt.engine.core.bll.context.CommandContext commandContext ) { org.ovirt.engine.core.bll.MultipleActionsRunner runner = multipleActionsRunnersFactory.createMultipleActionsRunner ( actionType , parameters , isInternal , commandContext ) ; runner.setIsRunOnlyIfAllValidatePass ( isRunOnlyIfAllValidationPass ) ; runner.setIsWaitForResult ( isWaitForResult ) ; return runner.execute ( ) ; }
Source:
public void canDoActionThinProvisioningSpaceCheckSucceeds ( ) throws java.lang.Exception { final int availableSize = 6 ; final int usedSize = 4 ; org.ovirt.engine.core.compat.Guid sdid = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; initializeCommand ( sdid , VolumeType.Sparse ) ; mockVm ( ) ; mockStorageDomain ( sdid , availableSize , usedSize ) ; mockStoragePoolIsoMap ( ) ; org.junit.Assert.assertTrue ( command.canDoAction ( ) ) ; }

Target:
public void canDoActionSucceedsOnDiskDomainCheckWhenStorageGuidInParamsMatches ( ) throws java.lang.Exception { org.ovirt.engine.core.compat.Guid storageId = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; initializeCommand ( storageId ) ; mockVmWithDisk ( storageId ) ; mockStorageDomain ( storageId ) ; mockStoragePoolIsoMap ( ) ; mockInterfaceList ( ) ; runAndAssertCanDoActionSuccess ( ) ; }
Source:
public static void initUniqueOsNames ( ) { org.ovirt.engine.ui.frontend.AsyncQuery callback = new org.ovirt.engine.ui.frontend.AsyncQuery ( ) ; callback.asyncCallback = new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.uniqueOsNames = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ; org.ovirt.engine.core.common.utils.SimpleDependecyInjector.getInstance ( ) . bind ( new org.ovirt.engine.core.searchbackend.OsValueAutoCompleter ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.uniqueOsNames ) ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.OsRepository , new org.ovirt.engine.core.common.queries.OsQueryParameters ( org.ovirt.engine.core.common.queries.OsQueryParameters.OsRepositoryVerb.GetUniqueOsNames ) , callback ) ; }

Target:
public void initUniqueOsNames ( ) { org.ovirt.engine.ui.frontend.AsyncQuery callback = new org.ovirt.engine.ui.frontend.AsyncQuery ( ) ; callback.asyncCallback = new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { uniqueOsNames = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ; org.ovirt.engine.core.common.utils.SimpleDependecyInjector.getInstance ( ) . bind ( new org.ovirt.engine.core.searchbackend.OsValueAutoCompleter ( uniqueOsNames ) ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.OsRepository , new org.ovirt.engine.core.common.queries.OsQueryParameters ( org.ovirt.engine.core.common.queries.OsQueryParameters.OsRepositoryVerb.GetUniqueOsNames ) , callback ) ; }
Source:
protected void executeQueryCommand ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VM > vms = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmDao ( ) . getAllForVdsGroup ( org.ovirt.engine.core.bll.GetNumberOfActiveVmsInVdsGroupByVdsGroupIdQuery.getParameters ( ) . getId ( ) ) ; int activeVms = 0 ; for ( org.ovirt.engine.core.common.businessentities.VM vm : vms ) { if ( ( ( vm.getStatus ( ) ) != ( org.ovirt.engine.core.common.businessentities.VMStatus.Down ) ) && ( ( vm.getStatus ( ) ) != ( org.ovirt.engine.core.common.businessentities.VMStatus.ImageLocked ) ) ) { ++ activeVms ; } } org.ovirt.engine.core.bll.GetNumberOfActiveVmsInVdsGroupByVdsGroupIdQuery.getQueryReturnValue ( ) . setReturnValue ( activeVms ) ; }

Target:
protected void executeQueryCommand ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VM > vms = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmDao ( ) . getAllForCluster ( org.ovirt.engine.core.bll.GetNumberOfActiveVmsInClusterByClusterIdQuery.getParameters ( ) . getId ( ) ) ; int activeVms = 0 ; for ( org.ovirt.engine.core.common.businessentities.VM vm : vms ) { if ( ( ( vm.getStatus ( ) ) != ( org.ovirt.engine.core.common.businessentities.VMStatus.Down ) ) && ( ( vm.getStatus ( ) ) != ( org.ovirt.engine.core.common.businessentities.VMStatus.ImageLocked ) ) ) { ++ activeVms ; } } org.ovirt.engine.core.bll.GetNumberOfActiveVmsInClusterByClusterIdQuery.getQueryReturnValue ( ) . setReturnValue ( activeVms ) ; }
Source:
public java.util.List < org.ovirt.engine.core.common.businessentities.storage_pool > getDataCentersWithPermittedActionOnClusters ( org.ovirt.engine.core.compat.Guid userId , org.ovirt.engine.core.common.businessentities.ActionGroup actionGroup , boolean supportsVirtService , boolean supportsGlusterService ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) . addValue ( "user_id" , userId ) . addValue ( "action_group_id" , actionGroup.getId ( ) ) . addValue ( "supports_virt_service" , supportsVirtService ) . addValue ( "supports_gluster_service" , supportsGlusterService ) ; org.ovirt.engine.core.dao.StoragePoolDAODbFacadeImpl.StoragePoolRawMapper mapper = new org.ovirt.engine.core.dao.StoragePoolDAODbFacadeImpl.StoragePoolRawMapper ( ) ; return getCallsHandler ( ) . executeReadList ( "fn_perms_get_storage_pools_with_permitted_action_on_vds_groups" , mapper , parameterSource ) ; }

Target:
public java.util.List < org.ovirt.engine.core.common.businessentities.storage_pool > getDataCentersWithPermittedActionOnClusters ( org.ovirt.engine.core.compat.Guid userId , org.ovirt.engine.core.common.businessentities.ActionGroup actionGroup , boolean supportsVirtService , boolean supportsGlusterService ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) . addValue ( "user_id" , userId ) . addValue ( "action_group_id" , actionGroup.getId ( ) ) . addValue ( "supports_virt_service" , supportsVirtService ) . addValue ( "supports_gluster_service" , supportsGlusterService ) ; return getCallsHandler ( ) . executeReadList ( "fn_perms_get_storage_pools_with_permitted_action_on_vds_groups" , org.ovirt.engine.core.dao.StoragePoolDAODbFacadeImpl.mapper , parameterSource ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc startSpice ( java.lang.String vdsIp , int port , java.lang.String ticket ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.startSpice ( vdsIp , port , ticket ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc copyData ( java.util.Map src , java.util.Map dst , boolean collapse ) { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.copyData ( src , dst , collapse ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; }
Source:
public void getUserMessageOfTheDayViaPublic ( 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.frontend.Frontend.getInstance ( ) . runPublicQuery ( VdcQueryType.GetConfigurationValue , new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.UserMessageOfTheDay , getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public void getRpmVersion ( 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.core.common.queries.GetConfigurationValueParameters tempVar = new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.ProductRPMVersion ) ; tempVar.setVersion ( getDefaultConfigurationVersion ( ) ) ; getConfigFromCache ( tempVar , aQuery ) ; }
Source:
public void testMissingListSubFields ( ) { org.ovirt.engine.api.model.HostNic bond = new org.ovirt.engine.api.model.HostNic ( ) ; try { org.ovirt.engine.api.common.util.CompletenessAssertor.validateParameters ( bond , "name" , "network.id|name" , "bonding.slaves.id|name" ) ; org.junit.Assert.fail ( "expected WebApplicationException on incomplete model" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyIncompleteException ( wae , "HostNic" , "name, network.id|name, bonding.slaves.id|name" ) ; } }

Target:
public void testMissingListSubFields ( ) { org.ovirt.engine.api.model.HostNic bond = new org.ovirt.engine.api.model.HostNic ( ) ; try { org.ovirt.engine.api.common.util.CompletenessAssertor.validateParameters ( bond , "name" , "network.id|name" , "bonding.slaves.id|name" ) ; org.junit.jupiter.api.Assertions.fail ( "expected WebApplicationException on incomplete model" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyIncompleteException ( wae , "HostNic" , "name, network.id|name, bonding.slaves.id|name" ) ; } }