auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public static void GetRedirectServletReportsPage ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.String ) ( source ) ) : "" ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.RedirectServletReportsPage , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public static void GetAllAttachableDisks ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.compat.Guid vmId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ( ) ; } } ; org.ovirt.engine.core.common.queries.GetAllAttachableDisks params = new org.ovirt.engine.core.common.queries.GetAllAttachableDisks ( storagePoolId ) ; params.setVmId ( vmId ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllAttachableDisks , params , aQuery ) ; }
Source:
private void setSelectedVncImpl ( ) { java.lang.Object defConsoleModel = model.getModel ( ) . getDefaultConsoleModel ( ) ; org.ovirt.engine.ui.uicommonweb.models.vms.VncConsoleModel vncConsoleModel = ( defConsoleModel instanceof org.ovirt.engine.ui.uicommonweb.models.vms.VncConsoleModel ) ? ( ( org.ovirt.engine.ui.uicommonweb.models.vms.VncConsoleModel ) ( defConsoleModel ) ) : null ; if ( vncConsoleModel == null ) { return ; } if ( noVncImplRadioButton.asRadioButton ( ) . getValue ( ) ) { vncConsoleModel.setVncImplementation ( VncConsoleModel.ClientConsoleMode.NoVnc ) ; } else { vncConsoleModel.setVncImplementation ( VncConsoleModel.ClientConsoleMode.Native ) ; } }

Target:
private void setSelectedVncImpl ( ) { org.ovirt.engine.ui.uicommonweb.models.vms.VncConsoleModel vncConsoleModel = model.getVmConsoles ( ) . getConsoleModel ( org.ovirt.engine.ui.uicommonweb.models.vms.VncConsoleModel.class ) ; if ( vncConsoleModel == null ) { return ; } if ( noVncImplRadioButton.asRadioButton ( ) . getValue ( ) ) { vncConsoleModel.setVncImplementation ( VncConsoleModel.ClientConsoleMode.NoVnc ) ; } else { vncConsoleModel.setVncImplementation ( VncConsoleModel.ClientConsoleMode.Native ) ; } }
Source:
public void onClick ( com.google.gwt.event.dom.client.ClickEvent event ) { proxyUp ( widget.getModel ( ) ) ; updateButtonState ( ) ; }

Target:
public void onClick ( com.google.gwt.event.dom.client.ClickEvent event ) { if ( ! ( items.isEmpty ( ) ) ) { org.ovirt.engine.core.common.utils.Pair < org.ovirt.engine.ui.uicommonweb.models.hosts.FenceProxyModel , org.ovirt.engine.ui.webadmin.widget.host.HostProxySourceWidget > modelWidgetPair = items.get ( ( ( items.size ( ) ) - 1 ) ) ; getEntry ( modelWidgetPair.getSecond ( ) ) . removeLastButton ( ) ; } org.ovirt.engine.core.common.utils.Pair < org.ovirt.engine.ui.uicommonweb.models.hosts.FenceProxyModel , org.ovirt.engine.ui.webadmin.widget.host.HostProxySourceWidget > item = addGhostEntry ( ) ; onAdd ( item.getFirst ( ) , item.getSecond ( ) ) ; item.getFirst ( ) . edit ( listModel ) ; }
Source:
private static void setRngSupportedSourcesToVds ( org.ovirt.engine.core.common.businessentities.VDS vds , java.util.Map < java.lang.String , java.lang.Object > xmlRpcStruct ) { vds.getSupportedRngSources ( ) . clear ( ) ; java.lang.String rngSourcesFromStruct = org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectsBuilder.AssignStringValueFromArray ( xmlRpcStruct , VdsProperties.rngSources ) ; if ( rngSourcesFromStruct != null ) { vds.getSupportedRngSources ( ) . addAll ( org.ovirt.engine.core.common.businessentities.VmRngDevice.csvToSourcesSet ( rngSourcesFromStruct.toUpperCase ( ) ) ) ; } }

Target:
private static void setRngSupportedSourcesToVds ( org.ovirt.engine.core.common.businessentities.VDS vds , java.util.Map < java.lang.String , java.lang.Object > xmlRpcStruct ) { vds.getSupportedRngSources ( ) . clear ( ) ; java.lang.String rngSourcesFromStruct = org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectsBuilder.assignStringValueFromArray ( xmlRpcStruct , VdsProperties.rngSources ) ; if ( rngSourcesFromStruct != null ) { vds.getSupportedRngSources ( ) . addAll ( org.ovirt.engine.core.common.businessentities.VmRngDevice.csvToSourcesSet ( rngSourcesFromStruct.toUpperCase ( ) ) ) ; } }
Source:
public void appendCustomValue ( ) { final org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase b = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.TestAuditLogableBase ( ) ; final java.lang.String key = "foo" ; final java.lang.String value = org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.NAME ; final java.lang.String sep = "_" ; b.appendCustomValue ( key , value , sep ) ; final java.lang.String s = b.getCustomValue ( key ) ; org.junit.Assert.assertEquals ( value , s ) ; }

Target:
public void setCustomValuesOverridesExistingValues ( ) { final java.lang.String key = "foo" ; b.appendCustomValue ( key , "test value" , null ) ; doSetCustomValuesTest ( b , key ) ; }
Source:
public void Template_SelectedItemChanged ( ) { super . Template_SelectedItemChanged ( ) ; org.ovirt.engine.core.common.businessentities.VmTemplate template = ( ( org.ovirt.engine.core.common.businessentities.VmTemplate ) ( getModel ( ) . getTemplate ( ) . getSelectedItem ( ) ) ) ; if ( template == null ) { return ; } setupWindowModelFrom ( template ) ; updateHostPinning ( template.getMigrationSupport ( ) ) ; doChangeDefautlHost ( template.getdedicated_vm_for_vds ( ) ) ; }

Target:
public void Template_SelectedItemChanged ( ) { super . Template_SelectedItemChanged ( ) ; org.ovirt.engine.core.common.businessentities.VmTemplate template = ( ( org.ovirt.engine.core.common.businessentities.VmTemplate ) ( getModel ( ) . getTemplate ( ) . getSelectedItem ( ) ) ) ; if ( template == null ) { return ; } setupWindowModelFrom ( template ) ; updateHostPinning ( template.getMigrationSupport ( ) ) ; doChangeDefautlHost ( template.getDedicatedVmForVds ( ) ) ; }
Source:
private void updateRemoveDisksCheckBox ( org.ovirt.engine.ui.uicommonweb.models.EntityModel model , boolean deleteDisks , boolean isChangable , java.lang.String changeProhibitionReason ) { model.setEntity ( deleteDisks ) ; if ( ( ! isChangable ) && ( changeProhibitionReason != null ) ) { model.setChangeProhibitionReason ( changeProhibitionReason ) ; } model.setIsChangable ( isChangable ) ; }

Target:
private void updateRemoveDisksCheckBox ( org.ovirt.engine.ui.uicommonweb.models.EntityModel model , boolean deleteDisks , boolean isChangable , java.lang.String changeProhibitionReason ) { model.setEntity ( deleteDisks ) ; if ( ( ! isChangable ) && ( changeProhibitionReason != null ) ) { model.setChangeProhibitionReason ( changeProhibitionReason ) ; } model.setIsChangeable ( isChangable ) ; }
Source:
public void testCombine ( ) throws java.lang.Exception { assertEquals ( "/foo/bar" , org.ovirt.engine.api.utils.LinkCreator.combine ( "/foo" , "bar" ) ) ; assertEquals ( "/foo/bar" , org.ovirt.engine.api.utils.LinkCreator.combine ( "/foo/" , "bar" ) ) ; assertEquals ( "/foo/bar" , org.ovirt.engine.api.utils.LinkCreator.combine ( "/foo/" , "/bar" ) ) ; assertEquals ( "/foo/bar" , org.ovirt.engine.api.utils.LinkCreator.combine ( "/foo" , "/bar" ) ) ; }

Target:
public void testCombine ( ) throws java.lang.Exception { org.junit.Assert.assertEquals ( "/foo/bar" , org.ovirt.engine.api.utils.LinkCreator.combine ( "/foo" , "bar" ) ) ; org.junit.Assert.assertEquals ( "/foo/bar" , org.ovirt.engine.api.utils.LinkCreator.combine ( "/foo/" , "bar" ) ) ; org.junit.Assert.assertEquals ( "/foo/bar" , org.ovirt.engine.api.utils.LinkCreator.combine ( "/foo/" , "/bar" ) ) ; org.junit.Assert.assertEquals ( "/foo/bar" , org.ovirt.engine.api.utils.LinkCreator.combine ( "/foo" , "/bar" ) ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc setVmTicket ( java.lang.String vmId , java.lang.String otp64 , java.lang.String sec , java.lang.String connectionAction , java.util.Map < java.lang.String , java.lang.String > params ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.setVmTicket ( vmId , otp64 , sec , connectionAction , params ) ; 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 , java.lang.String memory , boolean frozen ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.snapshot ( vmId , disks , memory , frozen ) ; 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 org.ovirt.engine.core.common.businessentities.network.NetworkQoS flush ( ) { super . flush ( ) ; networkQoS.setName ( getName ( ) . getEntity ( ) ) ; networkQoS.setStoragePoolId ( getDataCenters ( ) . getSelectedItem ( ) . getId ( ) ) ; return networkQoS ; }

Target:
public org.ovirt.engine.core.common.businessentities.network.NetworkQoS flush ( ) { super . flush ( ) ; networkQoS.setName ( getName ( ) . getEntity ( ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.StoragePool > selectedDataCenters = getDataCenters ( ) . getSelectedObjects ( ) ; if ( ! ( selectedDataCenters.isEmpty ( ) ) ) { networkQoS.setStoragePoolId ( selectedDataCenters.get ( 0 ) . getId ( ) ) ; } return networkQoS ; }
Source:
private void handleFinalizingSuccess ( final org.ovirt.engine.core.bll.storage.disk.image.UploadImageCommand < T > . StateContext context ) { log.info ( "Finalizing successful upload to {}" , getUploadDescription ( ) ) ; org.ovirt.engine.core.bll.storage.disk.image.UploadImageCommand.unLockImage ( ) ; stopImageTransferSession ( context.entity ) ; updateEntityPhase ( ImageTransferPhase.FINISHED_SUCCESS ) ; }

Target:
private void handleFinalizingSuccess ( final org.ovirt.engine.core.bll.storage.disk.image.UploadImageCommand < T > . StateContext context ) { log.info ( "Finalizing successful upload to {}" , getUploadDescription ( ) ) ; if ( stopImageTransferSession ( context.entity ) ) { org.ovirt.engine.core.compat.Guid transferingVdsId = context.entity.getVdsId ( ) ; if ( verifyImage ( transferingVdsId ) ) { setVolumeLegalityInStorage ( org.ovirt.engine.core.bll.storage.disk.image.UploadImageCommand.LEGAL_IMAGE ) ; org.ovirt.engine.core.bll.storage.disk.image.UploadImageCommand.unLockImage ( ) ; updateEntityPhase ( ImageTransferPhase.FINISHED_SUCCESS ) ; } else { setImageStatus ( ImageStatus.ILLEGAL ) ; updateEntityPhase ( ImageTransferPhase.FINALIZING_FAILURE ) ; } } }
Source:
public void testNetworkExists ( ) throws java.lang.Exception { org.ovirt.engine.core.bll.validator.NetworkAttachmentValidator networkAttachmentValidatorSpy = org.mockito.Mockito.spy ( createNetworkAttachmentValidator ( new org.ovirt.engine.core.common.businessentities.network.NetworkAttachment ( ) ) ) ; org.mockito.Mockito.doReturn ( networkValidatorMock ) . when ( networkAttachmentValidatorSpy ) . getNetworkValidator ( ) ; org.mockito.Mockito.when ( networkValidatorMock.networkIsSet ( ) ) . thenReturn ( ValidationResult.VALID ) ; org.junit.Assert.assertThat ( "ValidationResult is not correctly propagated" , networkAttachmentValidatorSpy.networkExists ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }

Target:
public void testNetworkExistWhenOnlyNetworkIdIsSet ( ) { org.ovirt.engine.core.compat.Guid networkId = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; org.ovirt.engine.core.common.businessentities.network.NetworkAttachment networkAttachment = new org.ovirt.engine.core.common.businessentities.network.NetworkAttachment ( ) ; networkAttachment.setNetworkId ( networkId ) ; org.ovirt.engine.core.bll.validator.NetworkAttachmentValidator validator = createNetworkAttachmentValidator ( networkAttachment ) ; org.ovirt.engine.core.common.errors.EngineMessage engineMessage = org.ovirt.engine.core.common.errors.EngineMessage.NETWORK_HAVING_ID_NOT_EXISTS ; org.junit.Assert.assertThat ( validator.networkExists ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( engineMessage , org.ovirt.engine.core.utils.ReplacementUtils.getVariableAssignmentString ( engineMessage , networkId.toString ( ) ) ) ) ; }
Source:
private void ApplySearchPageSize ( int value ) { model.setSearchPageSize ( value ) ; if ( ( searchRequested ) && ( model.getIsTimerDisabled ( ) ) ) { model.getSearchCommand ( ) . Execute ( ) ; } model.UpdatePagingAvailability ( ) ; }

Target:
private void ApplySearchPageSize ( int value ) { model.setSearchPageSize ( value ) ; if ( ( searchRequested ) && ( ! ( model.getTimer ( ) . isActive ( ) ) ) ) { model.getSearchCommand ( ) . Execute ( ) ; } model.UpdatePagingAvailability ( ) ; }
Source:
public void getAAAProfilesEntriesList ( 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.Collection < org.ovirt.engine.core.aaa.ProfileEntry > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.aaa.ProfileEntry > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAAAProfileList , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }

Target:
public void getVmDiskList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid vmId , boolean isRefresh ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { return source ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.DiskImage > ( ) ; } } ; org.ovirt.engine.core.common.queries.IdQueryParameters params = new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) ; params.setRefresh ( isRefresh ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllDisksByVmId , params , aQuery ) ; }
Source:
protected void removeVmUsers ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.TagsVmMap > all = getTagDao ( ) . getTagVmMapByVmIdAndDefaultTag ( org.ovirt.engine.core.bll.VmCommand.getVmId ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.TagsVmMap tagVm : all ) { getTagDao ( ) . detachVmFromTag ( tagVm.gettag_id ( ) , org.ovirt.engine.core.bll.VmCommand.getVmId ( ) ) ; } }

Target:
protected org.ovirt.engine.core.bll.network.macpoolmanager.MacPoolManagerStrategy getMacPool ( ) { return poolPerDc.poolForDataCenter ( getStoragePoolId ( ) ) ; }
Source:
public void validateIsoPrefixNameForKernelAndNullForInitrd ( ) throws java.lang.Exception { java.lang.String kernel = "kernel" ; org.ovirt.engine.core.common.businessentities.VM vm = createVmForTesting ( null , ( ( org.ovirt.engine.core.bll.RunVmCommandTest.ISO_PREFIX ) + kernel ) ) ; org.junit.Assert.assertEquals ( vm.getInitrdUrl ( ) , null ) ; org.junit.Assert.assertEquals ( vm.getKernelUrl ( ) , ( ( ( org.ovirt.engine.core.bll.RunVmCommandTest.ACTIVE_ISO_PREFIX ) + "/" ) + kernel ) ) ; }

Target:
public void validateIsoPrefixNameForKernelAndNullForInitrd ( ) throws java.lang.Exception { java.lang.String kernel = "kernel" ; org.ovirt.engine.core.common.businessentities.VM vm = createVmForTesting ( null , ( ( RunVmCommand.ISO_PREFIX ) + kernel ) ) ; org.junit.Assert.assertEquals ( vm.getInitrdUrl ( ) , null ) ; org.junit.Assert.assertEquals ( vm.getKernelUrl ( ) , ( ( ( org.ovirt.engine.core.bll.RunVmCommandTest.ACTIVE_ISO_PREFIX ) + "/" ) + kernel ) ) ; }
Source:
public void validateSlaveHasNoLabelsHasNoOldNorNewLabelsValid ( ) { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface slave = createNic ( "slave" ) ; org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidator validator = new org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidatorTest.HostSetupNetworksValidatorBuilder ( ) . addExistingInterfaces ( slave ) . build ( ) ; org.junit.Assert.assertThat ( validator.validateSlaveHasNoLabels ( slave.getName ( ) ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }

Target:
public void validateSlaveHasNoLabelsHasNoOldNorNewLabelsValid ( ) { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface slave = createNic ( "slave" ) ; org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidator validator = new org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidatorTest.HostSetupNetworksValidatorBuilder ( ) . addExistingInterfaces ( slave ) . build ( ) ; org.hamcrest.MatcherAssert.assertThat ( validator.validateSlaveHasNoLabels ( slave.getName ( ) ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }
Source:
private void testBusyDomainInList ( org.ovirt.engine.core.common.businessentities.StorageDomainStatus status ) { org.ovirt.engine.core.common.action.StoragePoolParametersBase param = new org.ovirt.engine.core.common.action.StoragePoolParametersBase ( ) ; org.ovirt.engine.core.bll.storage.pool.RemoveStoragePoolCommand < org.ovirt.engine.core.common.action.StoragePoolParametersBase > cmd = org.ovirt.engine.core.bll.storage.pool.RemoveStoragePoolCommandTest.createCommand ( param ) ; java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > domainsList = new java.util.ArrayList < > ( ) ; org.ovirt.engine.core.common.businessentities.StorageDomain tempStorageDomains = new org.ovirt.engine.core.common.businessentities.StorageDomain ( ) ; tempStorageDomains.setStatus ( status ) ; domainsList.add ( tempStorageDomains ) ; java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > listReturned = cmd.getActiveOrLockedDomainList ( domainsList ) ; org.junit.Assert.assertTrue ( ( ! ( listReturned.isEmpty ( ) ) ) ) ; }

Target:
private void testBusyDomainInList ( org.ovirt.engine.core.common.businessentities.StorageDomainStatus status ) { org.ovirt.engine.core.common.action.StoragePoolParametersBase param = new org.ovirt.engine.core.common.action.StoragePoolParametersBase ( ) ; org.ovirt.engine.core.bll.storage.pool.RemoveStoragePoolCommand < org.ovirt.engine.core.common.action.StoragePoolParametersBase > cmd = org.ovirt.engine.core.bll.storage.pool.RemoveStoragePoolCommandTest.createCommand ( param ) ; java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > domainsList = new java.util.ArrayList < > ( ) ; org.ovirt.engine.core.common.businessentities.StorageDomain tempStorageDomains = new org.ovirt.engine.core.common.businessentities.StorageDomain ( ) ; tempStorageDomains.setStatus ( status ) ; domainsList.add ( tempStorageDomains ) ; org.junit.Assert.assertFalse ( cmd.validateDomainsInMaintenance ( domainsList ) ) ; }
Source:
public void testListGlobalLimit ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.Quota quota = getQuota ( ) ; quota.setGlobalQuotaVdsGroup ( getClusterGlobalCpuLimit ( ) ) ; setUpGetEntityExpectations ( quota ) ; control.replay ( ) ; org.ovirt.engine.api.model.QuotaClusterLimits clusterLimits = collection.list ( ) ; assertClusterLimitsFound ( clusterLimits , 1 ) ; org.ovirt.engine.api.model.QuotaClusterLimit clusterLimit = clusterLimits.getQuotaClusterLimits ( ) . get ( 0 ) ; assertEquals ( clusterLimit.getVcpuLimit ( ) . intValue ( ) , 20 ) ; }

Target:
public void testListGlobalLimit ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.Quota quota = getQuota ( ) ; quota.setGlobalQuotaCluster ( getClusterGlobalCpuLimit ( ) ) ; setUpGetEntityExpectations ( quota ) ; control.replay ( ) ; org.ovirt.engine.api.model.QuotaClusterLimits clusterLimits = collection.list ( ) ; assertClusterLimitsFound ( clusterLimits , 1 ) ; org.ovirt.engine.api.model.QuotaClusterLimit clusterLimit = clusterLimits.getQuotaClusterLimits ( ) . get ( 0 ) ; assertEquals ( clusterLimit.getVcpuLimit ( ) . intValue ( ) , 20 ) ; }
Source:
private java.util.List < org.ovirt.engine.api.model.Agent > getPowerManagementAgents ( org.ovirt.engine.api.model.Version version ) { return org.ovirt.engine.api.restapi.util.FenceOptionsParser.parse ( getFenceConfigurationValue ( java.lang.String.class , ConfigurationValues.VdsFenceOptionMapping , version ) , getConfigurationValueDefault ( java.lang.String.class , ConfigurationValues.VdsFenceOptionTypes ) , true ) ; }

Target:
private java.util.List < org.ovirt.engine.api.model.Agent > getPowerManagementAgents ( org.ovirt.engine.api.model.Version version ) { java.lang.String fenceMapping = getConfigurationValue ( ConfigurationValues.VdsFenceOptionMapping , version ) ; java.lang.String fenceTypes = getConfigurationValueDefault ( ConfigurationValues.VdsFenceOptionTypes ) ; if ( ( fenceMapping != null ) && ( fenceTypes != null ) ) { return org.ovirt.engine.api.restapi.util.FenceOptionsParser.parse ( fenceMapping , fenceTypes ) ; } return java.util.Collections.emptyList ( ) ; }
Source:
protected void executeQueryCommand ( ) { org.ovirt.engine.core.common.config.ConfigValues defaultTimeZoneConfigKey ; switch ( org.ovirt.engine.core.bll.GetDefualtTimeZoneQuery.getParameters ( ) . getTimeZoneType ( ) ) { default : case GENERAL_TIMEZONE : defaultTimeZoneConfigKey = org.ovirt.engine.core.common.config.ConfigValues.DefaultGeneralTimeZone ; break ; case WINDOWS_TIMEZONE : defaultTimeZoneConfigKey = org.ovirt.engine.core.common.config.ConfigValues.DefaultWindowsTimeZone ; break ; } java.lang.String timeZone = org.ovirt.engine.core.common.config.Config.< java.lang.String > GetValue ( defaultTimeZoneConfigKey ) ; org.ovirt.engine.core.bll.GetDefualtTimeZoneQuery.getQueryReturnValue ( ) . setReturnValue ( timeZone ) ; }

Target:
protected void executeQueryCommand ( ) { org.ovirt.engine.core.common.config.ConfigValues defaultTimeZoneConfigKey ; switch ( org.ovirt.engine.core.bll.GetDefaultTimeZoneQuery.getParameters ( ) . getTimeZoneType ( ) ) { default : case GENERAL_TIMEZONE : defaultTimeZoneConfigKey = org.ovirt.engine.core.common.config.ConfigValues.DefaultGeneralTimeZone ; break ; case WINDOWS_TIMEZONE : defaultTimeZoneConfigKey = org.ovirt.engine.core.common.config.ConfigValues.DefaultWindowsTimeZone ; break ; } java.lang.String timeZone = org.ovirt.engine.core.common.config.Config.< java.lang.String > GetValue ( defaultTimeZoneConfigKey ) ; org.ovirt.engine.core.bll.GetDefaultTimeZoneQuery.getQueryReturnValue ( ) . setReturnValue ( timeZone ) ; }
Source:
public void testSave ( ) { org.ovirt.engine.core.common.businessentities.network.HostNicVfsConfig newConfig = new org.ovirt.engine.core.common.businessentities.network.HostNicVfsConfig ( ) ; newConfig.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; newConfig.setNicId ( FixturesTool.VDS_NETWORK_INTERFACE2 ) ; newConfig.setAllNetworksAllowed ( true ) ; dao.save ( newConfig ) ; org.ovirt.engine.core.common.businessentities.network.HostNicVfsConfig result = dao.get ( newConfig.getId ( ) ) ; org.junit.Assert.assertNotNull ( result ) ; assertHostNicVfsConfigEquals ( newConfig , result ) ; }

Target:
private void commonSave ( boolean allNetworksAllowed ) { org.ovirt.engine.core.common.businessentities.network.HostNicVfsConfig newConfig = new org.ovirt.engine.core.common.businessentities.network.HostNicVfsConfig ( ) ; newConfig.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; newConfig.setNicId ( FixturesTool.VDS_NETWORK_INTERFACE_WITHOUT_QOS ) ; newConfig.setAllNetworksAllowed ( allNetworksAllowed ) ; if ( ! allNetworksAllowed ) { addNetworks ( newConfig ) ; addLabels ( newConfig ) ; } dao.save ( newConfig ) ; org.ovirt.engine.core.common.businessentities.network.HostNicVfsConfig result = dao.get ( newConfig.getId ( ) ) ; org.junit.Assert.assertNotNull ( result ) ; assertHostNicVfsConfigEquals ( newConfig , result ) ; }
Source:
public void testNetworkIpAddressWasSameAsHostnameAndChangedWhenIpConfigurationIsNotStatic ( ) throws java.lang.Exception { for ( org.ovirt.engine.core.common.businessentities.network.NetworkBootProtocol networkBootProtocol : org.ovirt.engine.core.common.businessentities.network.NetworkBootProtocol.values ( ) ) { if ( networkBootProtocol == ( org.ovirt.engine.core.common.businessentities.network.NetworkBootProtocol.STATIC_IP ) ) { continue ; } org.ovirt.engine.core.common.businessentities.network.NetworkAttachment attachment = createNetworkAttachmentWithIpConfiguration ( networkBootProtocol , null , null ) ; org.junit.Assert.assertThat ( new org.ovirt.engine.core.bll.validator.NetworkAttachmentValidator ( attachment , null ) . networkIpAddressWasSameAsHostnameAndChanged ( null ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; } }

Target:
private void doTestNetworkIpAddressWasSameAsHostnameAndChangedForBootProtocol ( org.ovirt.engine.core.common.businessentities.network.NetworkBootProtocol bootProtocol ) { org.ovirt.engine.core.common.businessentities.network.NetworkAttachment attachment = createNetworkAttachmentWithIpConfiguration ( bootProtocol , null , null ) ; org.ovirt.engine.core.bll.validator.NetworkAttachmentValidator validator = createNetworkAttachmentValidator ( attachment ) ; org.ovirt.engine.core.bll.ValidationResult actual = validator.networkIpAddressWasSameAsHostnameAndChanged ( null ) ; org.junit.Assert.assertThat ( actual , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }
Source:
private void setUpEntityQueryExpectations ( int index , boolean notFound ) throws java.lang.Exception { setUpGetEntityExpectations ( VdcQueryType.GetDirectoryGroupById , org.ovirt.engine.core.common.queries.DirectoryIdQueryParameters.class , new java.lang.String [ ] { "Domain" , "Id" } , new java.lang.Object [ ] { DOMAIN , EXTERNAL_IDS [ index ] } , ( notFound ? null : getEntity ( index ) ) ) ; }

Target:
private void setUpEntityQueryExpectations ( int index , boolean notFound ) throws java.lang.Exception { setUpGetEntityExpectations ( VdcQueryType.GetDirectoryGroupById , org.ovirt.engine.core.common.queries.DirectoryIdQueryParameters.class , new java.lang.String [ ] { "Domain" , "Id" } , new java.lang.Object [ ] { DOMAIN , new java.lang.String ( javax.xml.bind.DatatypeConverter.parseHexBinary ( EXTERNAL_IDS [ index ] ) , java.nio.charset.Charset.forName ( "UTF-8" ) ) } , ( notFound ? null : getEntity ( index ) ) ) ; }
Source:
public void getMaxSpmPriority ( 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 ) ) : 0 ; } } ; aQuery.asyncCallback.onSuccess ( aQuery.getModel ( ) , 10 ) ; }

Target:
public void getStorageDomainsByConnection ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , java.lang.String connectionPath ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ) ( source ) ) : null ; } } ; org.ovirt.engine.core.common.queries.GetStorageDomainsByConnectionParameters param = new org.ovirt.engine.core.common.queries.GetStorageDomainsByConnectionParameters ( ) ; param.setConnection ( connectionPath ) ; if ( storagePoolId != null ) { param.setStoragePoolId ( storagePoolId ) ; } org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageDomainsByConnection , param , aQuery ) ; }
Source:
public java.lang.String toString ( ) { java.lang.StringBuilder builder = new java.lang.StringBuilder ( ) ; builder.append ( "\n" ) ; builder.append ( super . toString ( ) ) ; builder.append ( "\n" ) ; org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcObjectDescriptor.ToStringBuilder ( mStoragePoolInfo , builder ) ; org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcObjectDescriptor.ToStringBuilder ( mDomainsList , builder ) ; return builder.toString ( ) ; }

Target:
public java.lang.String toString ( ) { java.lang.StringBuilder builder = new java.lang.StringBuilder ( ) ; builder.append ( "\n" ) ; builder.append ( super . toString ( ) ) ; builder.append ( "\n" ) ; org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcObjectDescriptor.toStringBuilder ( mStoragePoolInfo , builder ) ; org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcObjectDescriptor.toStringBuilder ( mDomainsList , builder ) ; return builder.toString ( ) ; }
Source:
public javax.ws.rs.core.Response add ( final org.ovirt.engine.api.model.HostDevice hostDevice ) { validateParameters ( hostDevice , "id|name" ) ; java.lang.String deviceName = hostDevice.getName ( ) ; if ( hostDevice.isSetId ( ) ) { deviceName = org.ovirt.engine.api.restapi.utils.HexUtils.hex2string ( hostDevice.getId ( ) ) ; } return performCreate ( VdcActionType.AddVmHostDevices , new org.ovirt.engine.core.common.action.VmHostDevicesParameters ( vmId , deviceName ) , new org.ovirt.engine.api.restapi.resource.BackendVmHostDevicesResource.DeviceNameResolver ( deviceName ) ) ; }

Target:
public javax.ws.rs.core.Response add ( final org.ovirt.engine.api.model.HostDevice hostDevice ) { validateParameters ( hostDevice , "id|name" ) ; java.lang.String deviceName = hostDevice.getName ( ) ; if ( hostDevice.isSetId ( ) ) { deviceName = org.ovirt.engine.api.restapi.utils.HexUtils.hex2string ( hostDevice.getId ( ) ) ; } return performCreate ( ActionType.AddVmHostDevices , new org.ovirt.engine.core.common.action.VmHostDevicesParameters ( vmId , deviceName ) , new org.ovirt.engine.api.restapi.resource.BackendVmHostDevicesResource.DeviceNameResolver ( deviceName ) ) ; }
Source:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event < ? extends org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs > ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs args ) { org.ovirt.engine.ui.uicommonweb.models.hosts.NetworkAttachmentModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.hosts.NetworkAttachmentModel ) ( sender ) ) ; java.lang.String propertyName = args.propertyName ; if ( ( "BootProtocolsAvailable" . equals ( propertyName ) ) || ( "NoneBootProtocolAvailable" . equals ( propertyName ) ) ) { enableDisableByBootProtocol ( model ) ; } }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event < ? extends org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs > ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs args ) { org.ovirt.engine.ui.uicommonweb.models.hosts.NetworkAttachmentModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.hosts.NetworkAttachmentModel ) ( sender ) ) ; java.lang.String propertyName = args.propertyName ; if ( "BootProtocolsAvailable" . equals ( propertyName ) ) { enableDisableByBootProtocol ( model ) ; } }
Source:
public void restoreFixtures ( ) { java.util.Iterator < org.ovirt.engine.core.common.businessentities.VmStatic > vmStaticIterator = vmStatics.iterator ( ) ; while ( vmStaticIterator.hasNext ( ) ) { dbFacade.getVmStaticDao ( ) . update ( ( ( org.ovirt.engine.core.common.businessentities.VmStatic ) ( vmStaticIterator.next ( ) ) ) ) ; } }

Target:
public void restoreFixtures ( ) { java.util.Iterator < org.ovirt.engine.core.common.businessentities.VmStatic > vmStaticIterator = vmStatics.iterator ( ) ; while ( vmStaticIterator.hasNext ( ) ) { dbFacade.getVmStaticDao ( ) . update ( vmStaticIterator.next ( ) ) ; } }
Source:
< T extends org.ovirt.engine.core.common.businessentities.BusinessEntity < ? extends org.ovirt.engine.core.compat.NGuid > > void updateActionButtonCommand ( org.ovirt.engine.ui.uicommonweb.UICommand command , org.ovirt.engine.ui.webadmin.plugin.api.ActionButtonInterface actionButtonInterface , java.util.List < T > selectedItems ) { boolean isEnabled = true ; isEnabled = org.ovirt.engine.ui.webadmin.plugin.jsni.JsFunctionResultHelper.invokeAndGetResultAsBoolean ( actionButtonInterface.isEnabled ( ) , org.ovirt.engine.ui.webadmin.plugin.entity.EntityObject.arrayFrom ( selectedItems ) , null , isEnabled ) ; command.setIsExecutionAllowed ( isEnabled ) ; boolean isAccessible = true ; isAccessible = org.ovirt.engine.ui.webadmin.plugin.jsni.JsFunctionResultHelper.invokeAndGetResultAsBoolean ( actionButtonInterface.isAccessible ( ) , org.ovirt.engine.ui.webadmin.plugin.entity.EntityObject.arrayFrom ( selectedItems ) , null , isAccessible ) ; command.setIsAvailable ( isAccessible ) ; }

Target:
public boolean isEnabled ( java.util.List < T > selectedItems ) { return org.ovirt.engine.ui.webadmin.plugin.jsni.JsFunctionResultHelper.invokeAndGetResultAsBoolean ( actionButtonInterface.isEnabled ( ) , org.ovirt.engine.ui.webadmin.plugin.entity.EntityObject.arrayFrom ( selectedItems ) , null , true ) ; }
Source:
public void testGet ( ) throws java.lang.Exception { org.ovirt.engine.api.resource.StorageResource subresource = collection.getStorageResource ( GUIDS [ org.ovirt.engine.api.restapi.resource.BackendHostStorageResourceTest.SINGLE_STORAGE_IDX ] . toString ( ) ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpQueryExpectations ( "" , null , false ) ; verifyModel ( subresource.get ( ) , org.ovirt.engine.api.restapi.resource.BackendHostStorageResourceTest.SINGLE_STORAGE_IDX ) ; }

Target:
public void testGet ( ) throws java.lang.Exception { org.ovirt.engine.api.resource.StorageResource subresource = collection.getStorageResource ( GUIDS [ org.ovirt.engine.api.restapi.resource.BackendHostStorageResourceTest.SINGLE_STORAGE_IDX ] . toString ( ) ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpQueryExpectations ( "" , null ) ; verifyModel ( subresource.get ( ) , org.ovirt.engine.api.restapi.resource.BackendHostStorageResourceTest.SINGLE_STORAGE_IDX ) ; }
Source:
private void buildSmartcardDevice ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > vmDevices = vmDeviceDao.getVmDeviceByVmIdTypeAndDevice ( vm.getId ( ) , VmDeviceGeneralType.SMARTCARD , VmDeviceType.SMARTCARD.getName ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.VmDevice vmDevice : vmDevices ) { java.util.Map struct = new java.util.HashMap ( ) ; struct.put ( VdsProperties.Type , vmDevice.getType ( ) . getValue ( ) ) ; struct.put ( VdsProperties.Device , vmDevice.getDevice ( ) ) ; addDevice ( struct , vmDevice , null ) ; } }

Target:
private void buildSmartcardDevice ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > vmDevices = vmDeviceDao.getVmDeviceByVmIdTypeAndDevice ( vm.getId ( ) , VmDeviceGeneralType.SMARTCARD , VmDeviceType.SMARTCARD.getName ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.VmDevice vmDevice : vmDevices ) { java.util.Map < java.lang.String , java.lang.Object > struct = new java.util.HashMap < > ( ) ; struct.put ( VdsProperties.Type , vmDevice.getType ( ) . getValue ( ) ) ; struct.put ( VdsProperties.Device , vmDevice.getDevice ( ) ) ; addDevice ( struct , vmDevice , null ) ; } }
Source:
public void addNotEmptyIdConnection ( ) { org.ovirt.engine.core.common.businessentities.StorageServerConnections newPosixConnection = createPosixConnection ( "multipass.my.domain.tlv.company.com:/export/allstorage/data1" , StorageType.POSIXFS , "nfs" , "timeo=30" ) ; newPosixConnection.setid ( org.ovirt.engine.core.compat.Guid.newGuid ( ) . toString ( ) ) ; parameters.setStorageServerConnection ( newPosixConnection ) ; parameters.setVdsId ( Guid.Empty ) ; org.mockito.Mockito.doReturn ( true ) . when ( command ) . initializeVds ( ) ; org.mockito.Mockito.doReturn ( true ) . when ( command ) . isConnWithSameDetailsExists ( newPosixConnection ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( command , VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_CONNECTION_ID_NOT_EMPTY ) ; }

Target:
public void addNotEmptyIdConnection ( ) { org.ovirt.engine.core.common.businessentities.StorageServerConnections newPosixConnection = createPosixConnection ( "multipass.my.domain.tlv.company.com:/export/allstorage/data1" , StorageType.POSIXFS , "nfs" , "timeo=30" ) ; newPosixConnection.setid ( org.ovirt.engine.core.compat.Guid.newGuid ( ) . toString ( ) ) ; parameters.setStorageServerConnection ( newPosixConnection ) ; parameters.setVdsId ( Guid.Empty ) ; org.mockito.Mockito.doReturn ( true ) . when ( command ) . isConnWithSameDetailsExists ( newPosixConnection ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( command , VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_CONNECTION_ID_NOT_EMPTY ) ; }
Source:
public void testUpdateVdsGroupsProps ( ) { existingVdsGroup.setEmulatedMachine ( "pc-1.2.3" ) ; org.junit.Assert.assertNotSame ( "pc-1.2.3" , existingVdsGroup.getEmulatedMachine ( ) ) ; dao.update ( existingVdsGroup ) ; org.junit.Assert.assertEquals ( "pc-1.2.3" , existingVdsGroup.getEmulatedMachine ( ) ) ; existingVdsGroup.setDetectEmulatedMachine ( true ) ; dao.update ( existingVdsGroup ) ; org.junit.Assert.assertEquals ( true , existingVdsGroup.isDetectEmulatedMachine ( ) ) ; }

Target:
public void testUpdateVdsGroupsProps ( ) { org.junit.Assert.assertNotSame ( "pc-1.2.3" , existingVdsGroup.getEmulatedMachine ( ) ) ; existingVdsGroup.setEmulatedMachine ( "pc-1.2.3" ) ; dao.update ( existingVdsGroup ) ; org.junit.Assert.assertEquals ( "pc-1.2.3" , existingVdsGroup.getEmulatedMachine ( ) ) ; existingVdsGroup.setDetectEmulatedMachine ( true ) ; dao.update ( existingVdsGroup ) ; org.junit.Assert.assertEquals ( true , existingVdsGroup.isDetectEmulatedMachine ( ) ) ; }
Source:
public void testGet ( ) { newVdsInterface.setVdsId ( org.ovirt.engine.core.dao.InterfaceDAOTest.VDS_ID ) ; dao.saveInterfaceForVds ( newVdsInterface ) ; dao.saveStatisticsForVds ( newVdsInterface.getStatistics ( ) ) ; org.ovirt.engine.core.common.businessentities.VdsNetworkInterface result = dao.get ( newVdsInterface.getId ( ) ) ; org.junit.Assert.assertEquals ( newVdsInterface , result ) ; }

Target:
public void testGet ( ) { newVdsInterface.setVdsId ( org.ovirt.engine.core.dao.InterfaceDAOTest.VDS_ID ) ; dao.saveInterfaceForVds ( newVdsInterface ) ; dao.saveStatisticsForVds ( newVdsInterface.getStatistics ( ) ) ; org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface result = dao.get ( newVdsInterface.getId ( ) ) ; org.junit.Assert.assertEquals ( newVdsInterface , result ) ; }
Source:
protected void executeQueryCommand ( ) { java.util.Map < java.lang.Boolean , org.ovirt.engine.core.common.businessentities.VmTemplate > templateMap = org.ovirt.engine.core.bll.GetVmTemplatesByImageGuidQuery.getDbFacade ( ) . getVmTemplateDao ( ) . getAllForImage ( org.ovirt.engine.core.bll.GetVmTemplatesByImageGuidQuery.getParameters ( ) . getImageGuid ( ) ) ; if ( ! ( templateMap.values ( ) . isEmpty ( ) ) ) { updateDisksFromDb ( templateMap.values ( ) . iterator ( ) . next ( ) ) ; } org.ovirt.engine.core.bll.GetVmTemplatesByImageGuidQuery.getQueryReturnValue ( ) . setReturnValue ( templateMap ) ; }

Target:
protected void executeQueryCommand ( ) { java.util.Map < java.lang.Boolean , org.ovirt.engine.core.common.businessentities.VmTemplate > templateMap = org.ovirt.engine.core.bll.GetVmTemplatesByImageGuidQuery.getDbFacade ( ) . getVmTemplateDao ( ) . getAllForImage ( org.ovirt.engine.core.bll.GetVmTemplatesByImageGuidQuery.getParameters ( ) . getId ( ) ) ; if ( ! ( templateMap.values ( ) . isEmpty ( ) ) ) { updateDisksFromDb ( templateMap.values ( ) . iterator ( ) . next ( ) ) ; } org.ovirt.engine.core.bll.GetVmTemplatesByImageGuidQuery.getQueryReturnValue ( ) . setReturnValue ( templateMap ) ; }
Source:
private void UpdateCanSpecify ( ) { org.ovirt.engine.core.common.businessentities.network network = ( ( org.ovirt.engine.core.common.businessentities.network ) ( getNetwork ( ) . getSelectedItem ( ) ) ) ; boolean isChangable = ( ( getIsStaticAddress ( ) ) && ( network != null ) ) && ( ! ( network.getId ( ) . equals ( NGuid.Empty ) ) ) ; getAddress ( ) . setIsChangable ( isChangable ) ; getSubnet ( ) . setIsChangable ( isChangable ) ; }

Target:
private void UpdateCanSpecify ( ) { org.ovirt.engine.core.common.businessentities.network network = ( ( org.ovirt.engine.core.common.businessentities.network ) ( getNetwork ( ) . getSelectedItem ( ) ) ) ; boolean isChangable = getIsStaticAddress ( ) ; getAddress ( ) . setIsChangable ( isChangable ) ; getSubnet ( ) . setIsChangable ( isChangable ) ; }
Source:
public void testAddExistingSuccessfully ( ) { org.ovirt.engine.core.common.businessentities.StorageDomainStatic sdStatic = command.getStorageDomain ( ) . getStorageStaticData ( ) ; org.mockito.Mockito.doReturn ( new org.ovirt.engine.core.common.utils.Pair ( sdStatic , sdStatic.getId ( ) ) ) . when ( command ) . executeHSMGetStorageDomainInfo ( org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.common.vdscommands.HSMGetStorageDomainInfoVDSCommandParameters.class ) ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateSuccess ( command ) ; command.executeCommand ( ) ; org.junit.Assert.assertTrue ( command.getReturnValue ( ) . getSucceeded ( ) ) ; }

Target:
public void testAddExistingSuccessfully ( ) { org.ovirt.engine.core.common.businessentities.StorageDomainStatic sdStatic = command.getStorageDomain ( ) . getStorageStaticData ( ) ; org.mockito.Mockito.doReturn ( new org.ovirt.engine.core.common.utils.Pair ( sdStatic , sdStatic.getId ( ) ) ) . when ( command ) . executeHSMGetStorageDomainInfo ( org.mockito.ArgumentMatchers.any ( ) ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateSuccess ( command ) ; command.executeCommand ( ) ; org.junit.Assert.assertTrue ( command.getReturnValue ( ) . getSucceeded ( ) ) ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValueObj ) { org.ovirt.engine.core.common.queries.VdcQueryReturnValue returnValue = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValueObj ) ) ; java.lang.Object returnValue2 = returnValue.getReturnValue ( ) ; this . allNics = ( ( java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > ) ( returnValue2 ) ) ; queryNetworkAttachments ( ) ; }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValueObj ) { org.ovirt.engine.core.common.queries.VdcQueryReturnValue returnValue = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValueObj ) ) ; allNics = returnValue.getReturnValue ( ) ; queryNetworkAttachments ( ) ; }
Source:
public java.lang.String toString ( ) { final java.lang.String MSG = "Host Status is: " ; final java.lang.String TEST_SUCCEEDED = "Test Succeeded, " ; final java.lang.String TEST_FAILED = "Test Failed, " ; final java.lang.String SEP = ". " ; final java.lang.String FAILED_MESSAGE_HEADER = "The fence-agent script reported the following error: " ; return getIsSucceeded ( ) ? ( TEST_SUCCEEDED + MSG ) + ( getStatus ( ) ) : ( ( ( ( TEST_FAILED + MSG ) + ( getStatus ( ) ) ) + SEP ) + FAILED_MESSAGE_HEADER ) + ( getMessage ( ) ) ; }

Target:
public java.lang.String toString ( ) { final java.lang.String TEST_SUCCEEDED = "Test Succeeded, " ; final java.lang.String TEST_FAILED = "Test Failed, " ; return getIsSucceeded ( ) ? TEST_SUCCEEDED + ( getStatus ( ) ) : TEST_FAILED + ( getMessage ( ) ) ; }
Source:
public static void getDataCentersByStorageDomain ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storageDomainId ) { 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.StoragePool > ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStoragePoolsByStorageDomainId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( storageDomainId ) , aQuery ) ; }

Target:
public void getDataCentersByStorageDomain ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storageDomainId ) { 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.StoragePool > ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStoragePoolsByStorageDomainId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( storageDomainId ) , aQuery ) ; }
Source:
public static void execute ( java.lang.Runnable command ) { try { org.ovirt.engine.core.utils.threadpool.ThreadPoolUtil.es.submit ( new org.ovirt.engine.core.utils.threadpool.ThreadPoolUtil.InternalWrapperRunnable ( command , org.ovirt.engine.core.utils.ThreadLocalParamsContainer.getUser ( ) , org.ovirt.engine.core.utils.ThreadLocalParamsContainer.getHttpSessionId ( ) , org.ovirt.engine.core.utils.ThreadLocalParamsContainer.getCorrelationId ( ) ) ) ; } catch ( java.util.concurrent.RejectedExecutionException e ) { org.ovirt.engine.core.utils.threadpool.ThreadPoolUtil.log.warn ( "The thread pool is out of limit. A submitted task was rejected" ) ; throw e ; } }

Target:
public static void execute ( java.lang.Runnable command ) { try { org.ovirt.engine.core.utils.threadpool.ThreadPoolUtil.es.submit ( new org.ovirt.engine.core.utils.threadpool.ThreadPoolUtil.InternalWrapperRunnable ( command , org.ovirt.engine.core.utils.ThreadLocalParamsContainer.getCorrelationId ( ) ) ) ; } catch ( java.util.concurrent.RejectedExecutionException e ) { org.ovirt.engine.core.utils.threadpool.ThreadPoolUtil.log.warn ( "The thread pool is out of limit. A submitted task was rejected" ) ; throw e ; } }