auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private org.ovirt.engine.core.common.businessentities.VDS makeTestVds ( org.ovirt.engine.core.compat.Guid vdsId ) { org.ovirt.engine.core.common.businessentities.VDS newVdsData = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; newVdsData.setHostName ( "BUZZ" ) ; newVdsData.setSshPort ( 22 ) ; newVdsData.setSshUsername ( "root" ) ; newVdsData.setSshKeyFingerprint ( "1234" ) ; newVdsData.setVdsName ( "BAR" ) ; newVdsData.setVdsGroupCompatibilityVersion ( new org.ovirt.engine.core.compat.Version ( "1.2.3" ) ) ; newVdsData.setVdsGroupId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; newVdsData.setId ( vdsId ) ; return newVdsData ; }

Target:
private org.ovirt.engine.core.common.businessentities.VDS makeTestVds ( org.ovirt.engine.core.compat.Guid vdsId ) { org.ovirt.engine.core.common.businessentities.VDS newVdsData = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; newVdsData.setHostName ( "BUZZ" ) ; newVdsData.setSshPort ( 22 ) ; newVdsData.setSshUsername ( "root" ) ; newVdsData.setSshKeyFingerprint ( "1234" ) ; newVdsData.setVdsName ( "BAR" ) ; newVdsData.setClusterCompatibilityVersion ( new org.ovirt.engine.core.compat.Version ( "1.2.3" ) ) ; newVdsData.setClusterId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; newVdsData.setId ( vdsId ) ; return newVdsData ; }
Source:
public void testCanDoFailOnAddFloatingDiskWithPlugSet ( ) { org.ovirt.engine.core.common.businessentities.DiskImage disk = org.ovirt.engine.core.bll.AddDiskCommandTest.createDiskImage ( 1 ) ; org.ovirt.engine.core.common.action.AddDiskParameters parameters = org.ovirt.engine.core.bll.AddDiskCommandTest.createParameters ( ) ; parameters.setDiskInfo ( disk ) ; parameters.setVmId ( Guid.Empty ) ; parameters.setPlugDiskToVm ( true ) ; initializeCommand ( null , parameters ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( command , VdcBllMessages.CANNOT_ADD_FLOATING_DISK_WITH_PLUG_VM_SET ) ; }

Target:
public void testCanDoSuccessOnAddFloatingDiskWithPlugUnset ( ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage disk = org.ovirt.engine.core.bll.AddDiskCommandTest.createDiskImage ( 1 ) ; org.ovirt.engine.core.common.action.AddDiskParameters parameters = org.ovirt.engine.core.bll.AddDiskCommandTest.createParameters ( ) ; parameters.setDiskInfo ( disk ) ; parameters.setVmId ( Guid.Empty ) ; parameters.setPlugDiskToVm ( false ) ; org.ovirt.engine.core.compat.Guid storageId = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; initializeCommand ( storageId , parameters ) ; mockStorageDomain ( storageId ) ; mockStoragePoolIsoMap ( ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionSuccess ( command ) ; }
Source:
protected java.lang.String disableEffectsAsString ( ) { java.lang.StringBuffer disableEffectsBuffer = new java.lang.StringBuffer ( "" ) ; int countdown = getWANDisableEffects ( ) . size ( ) ; for ( org.ovirt.engine.ui.uicommonweb.models.vms.WANDisableEffects disabledEffect : getWANDisableEffects ( ) ) { disableEffectsBuffer.append ( disabledEffect.asString ( ) ) ; if ( countdown != 1 ) { disableEffectsBuffer.append ( ", " ) ; } countdown -- ; } return disableEffectsBuffer.toString ( ) ; }

Target:
protected java.lang.String disableEffectsAsString ( ) { java.lang.StringBuffer disableEffectsBuffer = new java.lang.StringBuffer ( "" ) ; int countdown = getWANDisableEffects ( ) . size ( ) ; for ( org.ovirt.engine.core.common.console.ConsoleOptions.WanDisableEffects disabledEffect : getWANDisableEffects ( ) ) { disableEffectsBuffer.append ( disabledEffect.asString ( ) ) ; if ( countdown != 1 ) { disableEffectsBuffer.append ( ", " ) ; } countdown -- ; } return disableEffectsBuffer.toString ( ) ; }
Source:
public void testVmDuringMigration ( ) { org.mockito.Mockito.doReturn ( new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_MIGRATION_IN_PROGRESS ) ) . when ( vmValidator ) . vmNotDuringMigration ( ) ; org.mockito.Mockito.doReturn ( org.ovirt.engine.core.bll.snapshots.CreateSnapshotsForVmCommandTest.getEmptyDiskList ( ) ) . when ( cmd ) . getDisksList ( ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( cmd , EngineMessage.ACTION_TYPE_FAILED_MIGRATION_IN_PROGRESS ) ; }

Target:
public void testVmDuringMigration ( ) { org.mockito.Mockito.doReturn ( new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_MIGRATION_IN_PROGRESS ) ) . when ( vmValidator ) . vmNotDuringMigration ( ) ; org.mockito.Mockito.doReturn ( org.ovirt.engine.core.bll.snapshots.CreateSnapshotForVmCommandTest.getEmptyDiskList ( ) ) . when ( cmd ) . getDisksList ( ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( cmd , EngineMessage.ACTION_TYPE_FAILED_MIGRATION_IN_PROGRESS ) ; }
Source:
private void commitLabelChanges ( java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > srcIfaces , org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface dstIface ) { org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkOperation.moveLabels ( srcIfaces , dstIface , hostSetupNetworksParametersData ) ; }

Target:
private java.util.List < org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkInterfaceModel > createSlaveModels ( java.util.Map < java.lang.String , java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > > bondNameToSlaves , final java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > nicsById , java.lang.String bondName ) { java.util.List < org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkInterfaceModel > slavesModels = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface slave : bondNameToSlaves.get ( bondName ) ) { org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkInterfaceModel slaveModel = createSlaveModel ( nicsById , slave ) ; slavesModels.add ( slaveModel ) ; } return slavesModels ; }
Source:
public void doTestRemove ( org.ovirt.engine.core.common.businessentities.StorageDomainType type , org.ovirt.engine.core.common.businessentities.StorageType storageType , boolean shouldFormat , boolean shouldFormatFail ) { command.getParameters ( ) . setDoFormat ( shouldFormat ) ; storageDomain.setStorageDomainType ( type ) ; storageDomain.setStorageType ( storageType ) ; setUpStorageHelper ( ) ; if ( shouldFormat || ( type.isDataDomain ( ) ) ) { setUpFormatDomain ( shouldFormatFail ) ; } command.executeCommand ( ) ; org.ovirt.engine.core.bll.CommandAssertUtils.checkSucceeded ( command , ( ! shouldFormatFail ) ) ; }

Target:
public void doTestRemove ( org.ovirt.engine.core.common.businessentities.StorageDomainType type , org.ovirt.engine.core.common.businessentities.storage.StorageType storageType , boolean shouldFormat , boolean shouldFormatFail ) { command.getParameters ( ) . setDoFormat ( shouldFormat ) ; storageDomain.setStorageDomainType ( type ) ; storageDomain.setStorageType ( storageType ) ; setUpStorageHelper ( ) ; if ( shouldFormat || ( type.isDataDomain ( ) ) ) { setUpFormatDomain ( shouldFormatFail ) ; } command.executeCommand ( ) ; org.ovirt.engine.core.bll.CommandAssertUtils.checkSucceeded ( command , ( ! shouldFormatFail ) ) ; }
Source:
public int hashCode ( ) { final int prime = 31 ; int result = 1 ; result = ( prime * result ) + ( fencingEnabled ? 1231 : 1237 ) ; result = ( prime * result ) + ( skipFencingIfSDActive ? 1231 : 1237 ) ; result = ( prime * result ) + ( skipFencingIfConnectivityBroken ? 1231 : 1237 ) ; result = ( prime * result ) + ( hostsWithBrokenConnectivityThreshold ) ; return result ; }

Target:
public int hashCode ( ) { return java.util.Objects.hash ( fencingEnabled , skipFencingIfSDActive , skipFencingIfConnectivityBroken , hostsWithBrokenConnectivityThreshold ) ; }
Source:
protected boolean processEvent ( org.ovirt.otopi.dialog.Event.Base bevent ) throws java.io.IOException { boolean unknown = true ; if ( bevent instanceof org.ovirt.otopi.dialog.Event.Confirm ) { org.ovirt.otopi.dialog.Event.Confirm event = ( ( org.ovirt.otopi.dialog.Event.Confirm ) ( bevent ) ) ; if ( Confirms.GPG_KEY.equals ( event.what ) ) { _messages.post ( InstallerMessages.Severity.WARNING , event.description ) ; event.reply = true ; unknown = false ; } } return unknown ; }

Target:
protected boolean processEvent ( org.ovirt.otopi.dialog.Event.Base bevent ) throws java.io.IOException { boolean unknown = true ; if ( bevent instanceof org.ovirt.otopi.dialog.Event.Confirm ) { org.ovirt.otopi.dialog.Event.Confirm event = ( ( org.ovirt.otopi.dialog.Event.Confirm ) ( bevent ) ) ; if ( Confirms.GPG_KEY.equals ( event.what ) ) { org.ovirt.engine.core.bll.hostdeploy.VdsMgmtPackages.log.warn ( event.description ) ; event.reply = true ; unknown = false ; } } return unknown ; }
Source:
public org.ovirt.engine.core.bll.ValidationResult isAnyDomainInProcess ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.StoragePoolIsoMap > poolIsoMaps = getStoragePoolIsoMapDao ( ) . getAllForStoragePool ( storagePool.getId ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.StoragePoolIsoMap domainIsoMap : poolIsoMaps ) { if ( ( ( domainIsoMap.getStatus ( ) ) != null ) && ( domainIsoMap.getStatus ( ) . isStorageDomainInProcess ( ) ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_DOMAIN_STATUS_ILLEGAL2 , java.lang.String.format ( "$status %1$s" , domainIsoMap.getStatus ( ) ) ) ; } } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult isAnyDomainInProcess ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.StoragePoolIsoMap > poolIsoMaps = getStoragePoolIsoMapDao ( ) . getAllForStoragePool ( storagePool.getId ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.StoragePoolIsoMap domainIsoMap : poolIsoMaps ) { if ( ( ( domainIsoMap.getStatus ( ) ) != null ) && ( domainIsoMap.getStatus ( ) . isStorageDomainInProcess ( ) ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_STORAGE_DOMAIN_STATUS_ILLEGAL2 , java.lang.String.format ( "$status %1$s" , domainIsoMap.getStatus ( ) ) ) ; } } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }
Source:
void initialize ( ) { org.ovirt.engine.core.bll.AutoRecoveryManager.log.info ( ( "Start initializing " + ( getClass ( ) . getSimpleName ( ) ) ) ) ; org.ovirt.engine.core.utils.timer.SchedulerUtilQuartzImpl.getInstance ( ) . scheduleACronJob ( this , "onTimer" , new java.lang.Class < ? > [ ] { } , new java.lang.Object [ ] { } , org.ovirt.engine.core.common.config.Config.< java.lang.String > getValue ( ConfigValues.AutoRecoverySchedule ) ) ; org.ovirt.engine.core.bll.AutoRecoveryManager.log.info ( ( "Finished initializing " + ( getClass ( ) . getSimpleName ( ) ) ) ) ; }

Target:
void initialize ( ) { org.ovirt.engine.core.bll.AutoRecoveryManager.log.info ( "Start initializing {}" , getClass ( ) . getSimpleName ( ) ) ; org.ovirt.engine.core.utils.timer.SchedulerUtilQuartzImpl.getInstance ( ) . scheduleACronJob ( this , "onTimer" , new java.lang.Class < ? > [ ] { } , new java.lang.Object [ ] { } , org.ovirt.engine.core.common.config.Config.< java.lang.String > getValue ( ConfigValues.AutoRecoverySchedule ) ) ; org.ovirt.engine.core.bll.AutoRecoveryManager.log.info ( "Finished initializing {}" , getClass ( ) . getSimpleName ( ) ) ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { this . stopProgress ( ) ; java.util.Set < org.ovirt.engine.core.common.businessentities.SupportedAdditionalClusterFeature > clusterFeatures = ( ( java.util.Set < org.ovirt.engine.core.common.businessentities.SupportedAdditionalClusterFeature > ) ( returnValue ) ) ; java.util.Set < org.ovirt.engine.core.common.businessentities.AdditionalFeature > featuresEnabled = new java.util.HashSet < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.SupportedAdditionalClusterFeature feature : clusterFeatures ) { if ( feature.isEnabled ( ) ) { featuresEnabled.add ( feature.getFeature ( ) ) ; } } updateAddtionClusterFeatureList ( features , featuresEnabled ) ; }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { final org.ovirt.engine.core.common.businessentities.network.Network defaultManagementNetwork = ( ( org.ovirt.engine.core.common.businessentities.network.Network ) ( returnValue ) ) ; defaultManagementNetworkCache.put ( dataCenterId , defaultManagementNetwork ) ; setSelectedDefaultManagementNetwork ( clusterModel , defaultManagementNetwork ) ; }
Source:
public void testAllDomainsExistAndActiveOneInactive ( ) { domain1.setStatus ( StorageDomainStatus.Active ) ; domain2.setStatus ( StorageDomainStatus.InActive ) ; org.ovirt.engine.core.bll.ValidationResult result = validator.allDomainsExistAndActive ( ) ; org.junit.Assert.assertFalse ( "One domain should not be active" , result.isValid ( ) ) ; org.junit.Assert.assertEquals ( "Wrong validation error" , VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_DOMAIN_STATUS_ILLEGAL , result.getMessage ( ) ) ; }

Target:
public void testAllDomainsExistAndActiveOneInactive ( ) { domain1.setStatus ( StorageDomainStatus.Active ) ; domain2.setStatus ( StorageDomainStatus.InActive ) ; org.ovirt.engine.core.bll.ValidationResult result = validator.allDomainsExistAndActive ( ) ; org.junit.Assert.assertFalse ( "One domain should not be active" , result.isValid ( ) ) ; org.junit.Assert.assertEquals ( "Wrong validation error" , VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_DOMAIN_STATUS_ILLEGAL2 , result.getMessage ( ) ) ; }
Source:
private void processHeartbeat ( ) { if ( ( ( ! ( this . isInInit ( ) ) ) && ( this . policy.isIncomingHeartbeat ( ) ) ) && ( this . isIncomingHeartbeatExeeded ( ) ) ) { org.ovirt.vdsm.jsonrpc.client.reactors.ReactorClient.log.debug ( "Heartbeat exceeded. Closing channel" ) ; this . disconnect ( "Heartbeat exceeded" ) ; } }

Target:
private void processHeartbeat ( ) { if ( ( ( ! ( this . isInInit ( ) ) ) && ( this . policy.isIncomingHeartbeat ( ) ) ) && ( this . isIncomingHeartbeatExeeded ( ) ) ) { org.ovirt.vdsm.jsonrpc.client.reactors.ReactorClient.log.error ( "Heartbeat exceeded for host '{}', last response arrived ms ago." , getHostname ( ) , getHeartbeatTime ( ) ) ; this . disconnect ( "Heartbeat exceeded" ) ; } }
Source:
public static boolean supportedInConfig ( org.ovirt.engine.core.common.config.ConfigValues feature , org.ovirt.engine.core.compat.Version version , org.ovirt.engine.core.common.businessentities.ArchitectureType arch ) { return java.lang.Boolean.parseBoolean ( ( ( java.util.Map < java.lang.String , java.lang.String > ) ( org.ovirt.engine.core.common.config.Config.< java.util.Map > getValue ( feature , version.getValue ( ) ) ) ) . get ( arch.name ( ) ) ) ; }

Target:
public static boolean supportedInConfig ( org.ovirt.engine.core.common.config.ConfigValues feature , org.ovirt.engine.core.compat.Version version , org.ovirt.engine.core.common.businessentities.ArchitectureType arch ) { java.util.Map < java.lang.String , java.lang.String > archOptions = org.ovirt.engine.core.common.config.Config.< java.util.Map > getValue ( feature , version.getValue ( ) ) ; java.lang.String value = archOptions.get ( arch.name ( ) ) ; if ( value == null ) { value = archOptions.get ( arch.getFamily ( ) . name ( ) ) ; } return java.lang.Boolean.parseBoolean ( value ) ; }
Source:
private org.ovirt.engine.core.common.action.ProcessOvfUpdateForStorageDomainCommandParameters createProcessOvfUpdateForDomainParams ( ) { org.ovirt.engine.core.common.action.ProcessOvfUpdateForStorageDomainCommandParameters params = new org.ovirt.engine.core.common.action.ProcessOvfUpdateForStorageDomainCommandParameters ( org.ovirt.engine.core.bll.storage.domain.DeactivateStorageDomainWithOvfUpdateCommand.getStoragePoolId ( ) , org.ovirt.engine.core.bll.storage.domain.DeactivateStorageDomainWithOvfUpdateCommand.getStorageDomainId ( ) ) ; params.setParentCommand ( org.ovirt.engine.core.bll.storage.domain.DeactivateStorageDomainWithOvfUpdateCommand.getActionType ( ) ) ; params.setParentParameters ( org.ovirt.engine.core.bll.storage.domain.DeactivateStorageDomainWithOvfUpdateCommand.getParameters ( ) ) ; params.setSkipDomainChecks ( true ) ; params.setShouldBeEndedByParent ( false ) ; return params ; }

Target:
private org.ovirt.engine.core.common.action.ProcessOvfUpdateForStorageDomainCommandParameters createProcessOvfUpdateForDomainParams ( ) { org.ovirt.engine.core.common.action.ProcessOvfUpdateForStorageDomainCommandParameters params = new org.ovirt.engine.core.common.action.ProcessOvfUpdateForStorageDomainCommandParameters ( org.ovirt.engine.core.bll.storage.domain.DeactivateStorageDomainWithOvfUpdateCommand.getStoragePoolId ( ) , org.ovirt.engine.core.bll.storage.domain.DeactivateStorageDomainWithOvfUpdateCommand.getStorageDomainId ( ) ) ; params.setParentCommand ( org.ovirt.engine.core.bll.storage.domain.DeactivateStorageDomainWithOvfUpdateCommand.getActionType ( ) ) ; params.setParentParameters ( org.ovirt.engine.core.bll.storage.domain.DeactivateStorageDomainWithOvfUpdateCommand.getParameters ( ) ) ; params.setSkipDomainChecks ( true ) ; params.setEndProcedure ( EndProcedure.COMMAND_MANAGED ) ; return params ; }
Source:
private void handleCinderSnapshotDisks ( java.util.List < org.ovirt.engine.core.common.businessentities.storage.CinderDisk > cinderDisks ) { org.ovirt.engine.core.common.action.RemoveAllVmCinderDisksParameters params = buildCinderChildCommandParameters ( cinderDisks ) ; java.util.concurrent.Future < org.ovirt.engine.core.common.action.VdcReturnValueBase > future = org.ovirt.engine.core.bll.tasks.CommandCoordinatorUtil.executeAsyncCommand ( VdcActionType.RemoveAllCinderSnapshotDisks , params , org.ovirt.engine.core.bll.RemoveSnapshotCommand.cloneContextAndDetachFromParent ( ) , org.ovirt.engine.core.bll.storage.CINDERStorageHelper.getStorageEntities ( cinderDisks ) ) ; try { org.ovirt.engine.core.common.action.VdcReturnValueBase vdcReturnValueBase = future.get ( ) ; if ( ! ( vdcReturnValueBase.getSucceeded ( ) ) ) { log.error ( "Error removing snapshots for Cinder disks" ) ; } } catch ( java.lang.InterruptedException | java.util.concurrent.ExecutionException e ) { log.error ( "Error removing snapshots for Cinder disks" ) ; } }

Target:
private void handleCinderSnapshotDisks ( java.util.List < org.ovirt.engine.core.common.businessentities.storage.CinderDisk > cinderDisks ) { org.ovirt.engine.core.common.action.RemoveAllVmCinderDisksParameters params = buildCinderChildCommandParameters ( cinderDisks ) ; java.util.concurrent.Future < org.ovirt.engine.core.common.action.VdcReturnValueBase > future = org.ovirt.engine.core.bll.tasks.CommandCoordinatorUtil.executeAsyncCommand ( VdcActionType.RemoveAllCinderSnapshotDisks , params , org.ovirt.engine.core.bll.RemoveSnapshotCommand.cloneContextAndDetachFromParent ( ) , org.ovirt.engine.core.bll.storage.connection.CINDERStorageHelper.getStorageEntities ( cinderDisks ) ) ; try { org.ovirt.engine.core.common.action.VdcReturnValueBase vdcReturnValueBase = future.get ( ) ; if ( ! ( vdcReturnValueBase.getSucceeded ( ) ) ) { log.error ( "Error removing snapshots for Cinder disks" ) ; } } catch ( java.lang.InterruptedException | java.util.concurrent.ExecutionException e ) { log.error ( "Error removing snapshots for Cinder disks" ) ; } }
Source:
public void getAAANamespaces ( 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.util.HashMap < java.lang.String , java.util.List < java.lang.String > > ) ( source ) ) : new java.util.HashMap < java.lang.String , java.util.List < java.lang.String > > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAvailableNamespaces , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }

Target:
public 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 static void GetStorageDomainMaxNameLength ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Integer ) ( source ) ) . intValue ( ) : 1 ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.StorageDomainNameSizeLimit ) , aQuery ) ; }

Target:
public static void GetLowUtilizationForPowerSave ( 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 ( ) : 0 ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.LowUtilizationForPowerSave ) , aQuery ) ; }
Source:
private static void putMajorVersion ( java.util.Map < java.lang.String , java.util.Set < java.lang.Integer > > majorVersions , org.ovirt.engine.core.bll.scheduling.OS hostOs ) { if ( ! ( majorVersions.containsKey ( hostOs.getOsFamily ( ) ) ) ) { majorVersions.put ( hostOs.getOsFamily ( ) , new java.util.HashSet < java.lang.Integer > ( ) ) ; } majorVersions.get ( hostOs.getOsFamily ( ) ) . add ( hostOs.getVersion ( ) . getMajor ( ) ) ; }

Target:
private static void putMajorVersion ( java.util.Map < java.lang.String , java.util.Set < java.lang.Integer > > majorVersions , org.ovirt.engine.core.utils.OS hostOs ) { if ( ! ( majorVersions.containsKey ( hostOs.getOsFamily ( ) ) ) ) { majorVersions.put ( hostOs.getOsFamily ( ) , new java.util.HashSet < java.lang.Integer > ( ) ) ; } majorVersions.get ( hostOs.getOsFamily ( ) ) . add ( hostOs.getVersion ( ) . getMajor ( ) ) ; }
Source:
public void hostProviderTypeMatches ( ) { org.mockito.Mockito.when ( host.getHostProviderId ( ) ) . thenReturn ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; org.ovirt.engine.core.common.businessentities.Provider provider = org.mockito.Mockito.mock ( org.ovirt.engine.core.common.businessentities.Provider.class ) ; org.mockito.Mockito.when ( provider.getType ( ) ) . thenReturn ( ProviderType.FOREMAN ) ; org.mockito.Mockito.when ( providerDao.get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( provider ) ; org.junit.Assert.assertThat ( validator.hostProviderTypeMatches ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }

Target:
public void hostProviderTypeMatches ( ) { org.mockito.Mockito.when ( host.getHostProviderId ( ) ) . thenReturn ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; org.ovirt.engine.core.common.businessentities.Provider provider = org.mockito.Mockito.mock ( org.ovirt.engine.core.common.businessentities.Provider.class ) ; org.mockito.Mockito.when ( provider.getType ( ) ) . thenReturn ( ProviderType.FOREMAN ) ; org.mockito.Mockito.when ( providerDao.get ( org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( provider ) ; org.junit.Assert.assertThat ( validator.hostProviderTypeMatches ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }
Source:
protected void verifyModel ( org.ovirt.engine.api.model.Group model , int index ) { org.ovirt.engine.core.common.businessentities.aaa.DbGroup entity = getEntity ( index ) ; assertEquals ( entity.getId ( ) . toString ( ) , model.getId ( ) ) ; assertEquals ( entity.getName ( ) , model.getName ( ) ) ; assertNotNull ( model.getDomain ( ) ) ; assertEquals ( org.ovirt.engine.api.restapi.utils.DirectoryEntryIdUtils.encode ( entity.getDomain ( ) ) , model.getDomain ( ) . getId ( ) ) ; verifyLinks ( model ) ; }

Target:
protected void verifyModel ( org.ovirt.engine.api.model.Group model , int index ) { org.ovirt.engine.core.common.businessentities.aaa.DbGroup entity = getEntity ( index ) ; org.junit.Assert.assertEquals ( entity.getId ( ) . toString ( ) , model.getId ( ) ) ; org.junit.Assert.assertEquals ( entity.getName ( ) , model.getName ( ) ) ; org.junit.Assert.assertNotNull ( model.getDomain ( ) ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.api.restapi.utils.DirectoryEntryIdUtils.encode ( entity.getDomain ( ) ) , model.getDomain ( ) . getId ( ) ) ; verifyLinks ( model ) ; }
Source:
private java.lang.String getUrl ( ) { return ( ( ( ( ( ( ( "vpx://" + ( getUsername ( ) . getEntity ( ) ) ) + "@" ) + ( getvCenter ( ) . getEntity ( ) ) ) + "/" ) + ( getVmwareDatacenter ( ) . getEntity ( ) ) ) + "/" ) + ( getEsx ( ) . getEntity ( ) ) ) + ( getVerify ( ) . getEntity ( ) ? "" : "?no_verify=1" ) ; }

Target:
private java.lang.String getUrl ( ) { return org.ovirt.engine.ui.uicommonweb.models.vms.ImportVmsModel.getVmwareUrl ( getUsername ( ) . getEntity ( ) , getvCenter ( ) . getEntity ( ) , getVmwareDatacenter ( ) . getEntity ( ) , getEsx ( ) . getEntity ( ) , getVerify ( ) . getEntity ( ) ) ; }
Source:
public 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 ) ; }

Target:
public void getClusterList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Cluster > list = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Cluster > ) ( 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.Cluster > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetClustersByStoragePoolId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) , aQuery ) ; }
Source:
private static int getNumOfMonitors ( org.ovirt.engine.core.common.businessentities.VM vm ) { int maxMonitorsSpice = ( vm.getSingleQxlPci ( ) ) ? 1 : vm.getNumOfMonitors ( ) ; int maxMonitorsVnc = java.lang.Math.max ( 1 , vm.getNumOfMonitors ( ) ) ; return java.lang.Math.min ( maxMonitorsSpice , maxMonitorsVnc ) ; }

Target:
private static int getNumOfMonitors ( org.ovirt.engine.core.common.businessentities.VM vm ) { int maxMonitorsSpice = ( vm.getSingleQxlPci ( ) ) ? org.ovirt.engine.core.bll.utils.VmDeviceUtils.SINGLE_QXL_MONITORS : vm.getNumOfMonitors ( ) ; int maxMonitorsVnc = java.lang.Math.max ( org.ovirt.engine.core.bll.utils.VmDeviceUtils.VNC_MIN_MONITORS , vm.getNumOfMonitors ( ) ) ; return java.lang.Math.min ( maxMonitorsSpice , maxMonitorsVnc ) ; }
Source:
public void Connect ( ) { org.ovirt.engine.ui.common.uicommon.SpicePluginImpl.logger.warning ( "Connecting via spice..." ) ; if ( ( cat.os.equalsIgnoreCase ( "Linux" ) ) && ( cat.browser.equalsIgnoreCase ( "Firefox" ) ) ) { connectNativelyViaXPI ( ) ; } else if ( ( cat.os.equalsIgnoreCase ( "Windows" ) ) && ( cat.browser.equalsIgnoreCase ( "Explorer" ) ) ) { connectNativelyViaActiveX ( ) ; } }

Target:
public void Connect ( ) { org.ovirt.engine.ui.common.uicommon.SpicePluginImpl.logger.warning ( "Connecting via spice..." ) ; if ( configurator.isClientLinuxFirefox ( ) ) { connectNativelyViaXPI ( ) ; } else if ( configurator.isClientWindownsExplorer ( ) ) { connectNativelyViaActiveX ( ) ; } }
Source:
public void getAllDataCenterNetworks ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId ) { 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.network.Network > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.Network > ( ) ; } } ; org.ovirt.engine.core.common.queries.IdQueryParameters params = new org.ovirt.engine.core.common.queries.IdQueryParameters ( storagePoolId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetNetworksByDataCenterId , params , aQuery ) ; }

Target:
public void getDiskList ( 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.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > ( ) ; } } ; org.ovirt.engine.core.common.queries.SearchParameters searchParams = new org.ovirt.engine.core.common.queries.SearchParameters ( "Disks:" , org.ovirt.engine.core.common.interfaces.SearchType.Disk ) ; searchParams.setMaxCount ( 9999 ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , searchParams , aQuery ) ; }
Source:
public static void getGlusterHooks ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? source : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterHooks , new org.ovirt.engine.core.common.queries.gluster.GlusterParameters ( clusterId ) , aQuery ) ; }

Target:
public static void getGlusterSwiftServerServices ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? source : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterServerService > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterServerServicesByClusterId , new org.ovirt.engine.core.common.queries.gluster.GlusterServiceQueryParameters ( clusterId , org.ovirt.engine.core.common.businessentities.gluster.ServiceType.GLUSTER_SWIFT ) , aQuery ) ; }
Source:
public void setSearchString ( java.lang.String value , boolean checkIfNewValue ) { if ( ( ! checkIfNewValue ) || ( ! ( org.ovirt.engine.core.common.utils.ObjectUtils.objectsEqual ( searchString , value ) ) ) ) { searchString = value ; searchStringChanged ( ) ; onPropertyChanged ( new org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ( "SearchString" ) ) ; } }

Target:
private void setSearchStringImpl ( java.lang.String value , boolean checkIfNewValue ) { if ( ( ! checkIfNewValue ) || ( ! ( org.ovirt.engine.core.common.utils.ObjectUtils.objectsEqual ( searchString , value ) ) ) ) { searchString = value ; searchStringChanged ( ) ; onPropertyChanged ( new org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ( "SearchString" ) ) ; } }
Source:
private static org.ovirt.engine.core.common.businessentities.VM createVM ( ) { org.ovirt.engine.core.common.businessentities.VM vm = new org.ovirt.engine.core.common.businessentities.VM ( ) ; vm.setName ( "test-vm" ) ; vm.setOrigin ( OriginType.OVIRT ) ; vm.setId ( new org.ovirt.engine.core.compat.Guid ( ) ) ; vm.setVmDescription ( "test-description" ) ; vm.getStaticData ( ) . setDomain ( "domain_name" ) ; vm.setTimeZone ( "Israel Standard Time" ) ; vm.setDbGeneration ( 2L ) ; org.ovirt.engine.core.utils.ovf.OvfManagerTest.initInterfaces ( vm ) ; return vm ; }

Target:
private static org.ovirt.engine.core.common.businessentities.VM createVM ( ) { org.ovirt.engine.core.common.businessentities.VM vm = new org.ovirt.engine.core.common.businessentities.VM ( ) ; vm.setName ( "test-vm" ) ; vm.setOrigin ( OriginType.OVIRT ) ; vm.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; vm.setVmDescription ( "test-description" ) ; vm.getStaticData ( ) . setDomain ( "domain_name" ) ; vm.setTimeZone ( "Israel Standard Time" ) ; vm.setDbGeneration ( 2L ) ; org.ovirt.engine.core.utils.ovf.OvfManagerTest.initInterfaces ( vm ) ; return vm ; }
Source:
protected org.springframework.jdbc.core.namedparam.MapSqlParameterSource createFullParametersMapper ( org.ovirt.engine.core.common.scheduling.PolicyUnit entity ) { return createIdParameterMapper ( entity.getId ( ) ) . addValue ( "name" , entity.getName ( ) ) . addValue ( "is_internal" , entity.isInternal ( ) ) . addValue ( "has_filter" , entity.isFilterImplemeted ( ) ) . addValue ( "has_function" , entity.isFunctionImplemeted ( ) ) . addValue ( "has_balance" , entity.isBalanceImplemeted ( ) ) . addValue ( "custom_properties_regex" , org.ovirt.engine.core.utils.SerializationFactory.getSerializer ( ) . serialize ( entity.getParameterRegExMap ( ) ) ) ; }

Target:
protected org.springframework.jdbc.core.namedparam.MapSqlParameterSource createFullParametersMapper ( org.ovirt.engine.core.common.scheduling.PolicyUnit entity ) { return createIdParameterMapper ( entity.getId ( ) ) . addValue ( "name" , entity.getName ( ) ) . addValue ( "is_internal" , entity.isInternal ( ) ) . addValue ( "type" , entity.getPolicyUnitType ( ) . getValue ( ) ) . addValue ( "custom_properties_regex" , org.ovirt.engine.core.utils.SerializationFactory.getSerializer ( ) . serialize ( entity.getParameterRegExMap ( ) ) ) ; }
Source:
protected void service ( javax.servlet.http.HttpServletRequest req , javax.servlet.http.HttpServletResponse resp ) throws java.io.IOException , javax.servlet.ServletException { extractTokenFromRequest ( req ) ; super . service ( req , resp ) ; }

Target:
private com.google.gwt.user.client.rpc.XsrfToken extractTokenFromRequest ( ) { java.util.List < java.lang.String > header = java.util.Collections.list ( getThreadLocalRequest ( ) . getHeaders ( XsrfRpcRequestBuilder.XSRF_TOKEN_HEADER ) ) ; com.google.gwt.user.client.rpc.XsrfToken result = null ; if ( ( header != null ) && ( ( header.size ( ) ) == 1 ) ) { result = new com.google.gwt.user.client.rpc.XsrfToken ( header.get ( 0 ) ) ; } return result ; }
Source:
protected void setUpGetEntityExpectations ( int times , boolean notFound ) throws java.lang.Exception { while ( ( times -- ) > 0 ) { setUpGetEntityExpectations ( VdcQueryType.GetGlusterBrickById , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.gluster.BackendGlusterBrickResourceTest.brickId } , ( notFound ? null : getEntity ( 0 ) ) ) ; } }

Target:
protected void setUpGetEntityExpectations ( int times , boolean notFound ) throws java.lang.Exception { while ( ( times -- ) > 0 ) { setUpGetEntityExpectations ( VdcQueryType.GetGlusterBrickById , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.gluster.GlusterTestHelper.brickId } , ( notFound ? null : getEntity ( 0 ) ) ) ; } }
Source:
public boolean isDone ( ) { return callable.isDone ( ) ; }

Target:
public java.util.concurrent.FutureTask < java.util.Map < java.lang.String , java.lang.Object > > poll ( ) { final org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "Host.ping" ) . build ( ) ; java.util.concurrent.FutureTask < java.util.Map < java.lang.String , java.lang.Object > > future = new java.util.concurrent.FutureTask < java.util.Map < java.lang.String , java.lang.Object > > ( new java.util.concurrent.Callable < java.util.Map < java.lang.String , java.lang.Object > > ( ) { @ java.lang.Override public java.util.Map < java.lang.String , java.lang.Object > call ( ) throws java.lang.Exception { return new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( client , request ) ; } } ) ; org.ovirt.engine.core.utils.threadpool.ThreadPoolUtil.execute ( future ) ; return future ; }
Source:
public void checkEqualSubnetIntegerAndStringRepresentation ( ) { org.mockito.Mockito.when ( mockedMaskValidator.isValidNetmaskFormat ( org.ovirt.engine.core.common.utils.SubnetUtilsTest.VALID_NETMASK_FORMAT ) ) . thenReturn ( true ) ; org.mockito.Mockito.when ( mockedMaskValidator.isPrefixValid ( org.ovirt.engine.core.common.utils.SubnetUtilsTest.VALID_PREFIX ) ) . thenReturn ( true ) ; org.mockito.Mockito.when ( mockIpAddressConverter.convertPrefixToNetmask ( org.ovirt.engine.core.common.utils.SubnetUtilsTest.VALID_PREFIX ) ) . thenReturn ( org.ovirt.engine.core.common.utils.SubnetUtilsTest.VALID_NETMASK_FORMAT ) ; org.junit.Assert.assertTrue ( underTest.equalSubnet ( org.ovirt.engine.core.common.utils.SubnetUtilsTest.VALID_PREFIX , org.ovirt.engine.core.common.utils.SubnetUtilsTest.VALID_NETMASK_FORMAT ) ) ; }

Target:
public void checkEqualSubnetIntegerAndStringRepresentation ( ) { org.mockito.Mockito.when ( mockedMaskValidator.isValidNetmaskFormat ( org.ovirt.engine.core.common.utils.SubnetUtilsTest.VALID_NETMASK_FORMAT ) ) . thenReturn ( true ) ; org.mockito.Mockito.when ( mockedMaskValidator.isPrefixValid ( org.ovirt.engine.core.common.utils.SubnetUtilsTest.VALID_PREFIX ) ) . thenReturn ( true ) ; org.mockito.Mockito.when ( mockIpAddressConverter.convertPrefixToNetmask ( org.ovirt.engine.core.common.utils.SubnetUtilsTest.VALID_PREFIX ) ) . thenReturn ( org.ovirt.engine.core.common.utils.SubnetUtilsTest.VALID_NETMASK_FORMAT ) ; org.junit.jupiter.api.Assertions.assertTrue ( underTest.equalSubnet ( org.ovirt.engine.core.common.utils.SubnetUtilsTest.VALID_PREFIX , org.ovirt.engine.core.common.utils.SubnetUtilsTest.VALID_NETMASK_FORMAT ) ) ; }
Source:
public static void getAllVnicProfiles ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VnicProfileView > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllVnicProfiles , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }

Target:
public static void getVnicProfilesByNetworkId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid networkId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VnicProfileView > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVnicProfilesByNetworkId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( networkId ) , aQuery ) ; }
Source:
private org.ovirt.engine.api.model.Vm createModel ( org.ovirt.engine.api.model.Disks disks ) { org.ovirt.engine.api.model.Vm model = org.ovirt.engine.api.restapi.resource.BackendVmsResourceTest.getModel ( 2 ) ; model.setTemplate ( new org.ovirt.engine.api.model.Template ( ) ) ; model.getTemplate ( ) . setId ( GUIDS [ 1 ] . toString ( ) ) ; model.setCluster ( new org.ovirt.engine.core.common.businessentities.Cluster ( ) ) ; model.getCluster ( ) . setId ( GUIDS [ 2 ] . toString ( ) ) ; if ( disks != null ) { model.setDisks ( disks ) ; } return model ; }

Target:
private org.ovirt.engine.api.model.Vm createModel ( org.ovirt.engine.api.model.DiskAttachments diskAttachments ) { org.ovirt.engine.api.model.Vm model = org.ovirt.engine.api.restapi.resource.BackendVmsResourceTest.getModel ( 2 ) ; model.setTemplate ( new org.ovirt.engine.api.model.Template ( ) ) ; model.getTemplate ( ) . setId ( GUIDS [ 1 ] . toString ( ) ) ; model.setCluster ( new org.ovirt.engine.core.common.businessentities.Cluster ( ) ) ; model.getCluster ( ) . setId ( GUIDS [ 2 ] . toString ( ) ) ; if ( diskAttachments != null ) { model.setDiskAttachments ( diskAttachments ) ; } return model ; }
Source:
public void onResize ( com.google.gwt.event.logical.shared.ResizeEvent resizeEvent ) { vcpuExpanderContent.setHeight ( ( ( ( infoBoxCpu.getOffsetHeight ( ) ) - ( org.ovirt.engine.ui.userportal.section.main.view.tab.extended.SideTabExtendedResourceView.INFO_BOX_UPPER_PART_HEIGHT ) ) + "px" ) ) ; memoryExpanderContent.setHeight ( ( ( ( infoBoxMemory.getOffsetHeight ( ) ) - ( org.ovirt.engine.ui.userportal.section.main.view.tab.extended.SideTabExtendedResourceView.INFO_BOX_UPPER_PART_HEIGHT ) ) + "px" ) ) ; vmTable.setHeight ( ( ( ( bottomLayoutPanel.getOffsetHeight ( ) ) - ( org.ovirt.engine.ui.userportal.section.main.view.tab.extended.SideTabExtendedResourceView.STORAGE_BOX_UPPER_PART_HEIGHT ) ) + "px" ) ) ; }

Target:
public void onResize ( com.google.gwt.event.logical.shared.ResizeEvent resizeEvent ) { vcpuExpanderContent.setHeight ( ( ( numOrZero ( ( ( infoBoxCpu.getOffsetHeight ( ) ) - ( org.ovirt.engine.ui.userportal.section.main.view.tab.extended.SideTabExtendedResourceView.INFO_BOX_UPPER_PART_HEIGHT ) ) ) ) + "px" ) ) ; memoryExpanderContent.setHeight ( ( ( numOrZero ( ( ( infoBoxMemory.getOffsetHeight ( ) ) - ( org.ovirt.engine.ui.userportal.section.main.view.tab.extended.SideTabExtendedResourceView.INFO_BOX_UPPER_PART_HEIGHT ) ) ) ) + "px" ) ) ; vmTable.setHeight ( ( ( numOrZero ( ( ( bottomLayoutPanel.getOffsetHeight ( ) ) - ( org.ovirt.engine.ui.userportal.section.main.view.tab.extended.SideTabExtendedResourceView.STORAGE_BOX_UPPER_PART_HEIGHT ) ) ) ) + "px" ) ) ; }
Source:
public static void getNetworkList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.Network > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.Network > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllNetworks , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) , aQuery ) ; }

Target:
public static void getClusterServerMemoryOverCommit ( 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 ( ) : 0 ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.MaxVdsMemOverCommitForServers , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
private void updateDcLabels ( ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getNetworkLabelsByDataCenterId ( getSelectedDc ( ) . getId ( ) , new org.ovirt.engine.ui.frontend.AsyncQuery ( this , new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { java.lang.String label = getNetworkLabel ( ) . getSelectedItem ( ) ; getNetworkLabel ( ) . setItems ( ( ( java.util.Collection < java.lang.String > ) ( returnValue ) ) ) ; getNetworkLabel ( ) . setSelectedItem ( label ) ; onExportChanged ( ) ; } } ) ) ; }

Target:
private void updateDcLabels ( ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getNetworkLabelsByDataCenterId ( getSelectedDc ( ) . getId ( ) , new org.ovirt.engine.ui.uicommonweb.models.datacenters.AsyncQuery ( new org.ovirt.engine.ui.frontend.AsyncCallback < java.util.SortedSet < java.lang.String > > ( ) { @ java.lang.Override public void onSuccess ( java.util.SortedSet < java.lang.String > returnValue ) { java.lang.String label = getNetworkLabel ( ) . getSelectedItem ( ) ; getNetworkLabel ( ) . setItems ( returnValue ) ; getNetworkLabel ( ) . setSelectedItem ( label ) ; onExportChanged ( ) ; } } ) ) ; }
Source:
protected static boolean CanAttachPrestartedVmToUser ( org.ovirt.engine.core.compat.Guid vmId ) { boolean returnValue = true ; java.util.ArrayList < java.lang.String > messages = new java.util.ArrayList < java.lang.String > ( ) ; if ( org.ovirt.engine.core.bll.VmPoolCommandBase.vmAssignedToUser ( vmId , messages ) ) { returnValue = false ; } if ( returnValue ) { if ( ! ( org.ovirt.engine.core.bll.VmPoolCommandBase.vmIsRunningStateless ( vmId ) ) ) { returnValue = false ; } } return returnValue ; }

Target:
protected static boolean canAttachPrestartedVmToUser ( org.ovirt.engine.core.compat.Guid vmId ) { boolean returnValue = true ; java.util.ArrayList < java.lang.String > messages = new java.util.ArrayList < java.lang.String > ( ) ; if ( org.ovirt.engine.core.bll.VmPoolCommandBase.vmAssignedToUser ( vmId , messages ) ) { returnValue = false ; } if ( returnValue ) { if ( ! ( org.ovirt.engine.core.bll.VmPoolCommandBase.vmIsRunningStateless ( vmId ) ) ) { returnValue = false ; } } return returnValue ; }