auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public static void getDomainListViaPublic ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , boolean filterInternalDomain ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? new java.util.ArrayList < java.lang.String > ( ( ( java.util.ArrayList < java.lang.String > ) ( source ) ) ) : new java.util.ArrayList < java.lang.String > ( ) ; } } ; org.ovirt.engine.core.common.queries.GetDomainListParameters tempVar = new org.ovirt.engine.core.common.queries.GetDomainListParameters ( ) ; tempVar.setFilterInternalDomain ( filterInternalDomain ) ; org.ovirt.engine.ui.frontend.Frontend.RunPublicQuery ( VdcQueryType.GetDomainList , tempVar , aQuery ) ; }

Target:
public static void getHostArchitecture ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter < org.ovirt.engine.core.common.businessentities.ArchitectureType > ( ) { @ java.lang.Override public org.ovirt.engine.core.common.businessentities.ArchitectureType Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return ( ( org.ovirt.engine.core.common.businessentities.ArchitectureType ) ( source ) ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetHostArchitecture , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }
Source:
public java.lang.String translateVdcFault ( final org.ovirt.engine.core.common.errors.VdcFault fault ) { return getVdsmErrorsTranslator ( ) . translateErrorTextSingle ( ( ( fault.getError ( ) ) == null ? fault.getMessage ( ) : fault.getError ( ) . toString ( ) ) ) ; }

Target:
private void translateErrors ( final java.util.Collection < org.ovirt.engine.core.common.action.VdcReturnValueBase > errors ) { for ( org.ovirt.engine.core.common.action.VdcReturnValueBase retVal : errors ) { if ( ! ( retVal.getCanDoAction ( ) ) ) { retVal.setCanDoActionMessages ( ( ( java.util.ArrayList < java.lang.String > ) ( translateError ( retVal ) ) ) ) ; } else if ( ! ( retVal.getSucceeded ( ) ) ) { org.ovirt.engine.core.common.errors.EngineFault fault = retVal.getFault ( ) ; fault.setMessage ( translateEngineFault ( fault ) ) ; } } }
Source:
public org.ovirt.engine.core.bll.ValidationResult qosExistsInDc ( ) { org.ovirt.engine.core.bll.validator.NetworkQosValidator qosValidator = new org.ovirt.engine.core.bll.validator.NetworkQosValidator ( getDbFacade ( ) . getNetworkQosDao ( ) . get ( network.getQosId ( ) ) ) ; org.ovirt.engine.core.bll.ValidationResult res = qosValidator.qosExists ( ) ; return res == ( org.ovirt.engine.core.bll.ValidationResult.VALID ) ? qosValidator.consistentDataCenter ( ) : res ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult qosExistsInDc ( ) { org.ovirt.engine.core.bll.validator.HostNetworkQosValidator qosValidator = new org.ovirt.engine.core.bll.validator.HostNetworkQosValidator ( getDbFacade ( ) . getHostNetworkQosDao ( ) . get ( network.getQosId ( ) ) ) ; org.ovirt.engine.core.bll.ValidationResult res = qosValidator.qosExists ( ) ; return res == ( org.ovirt.engine.core.bll.ValidationResult.VALID ) ? qosValidator.consistentDataCenter ( ) : res ; }
Source:
public boolean validate ( ) { getBrickDirectory ( ) . validateEntity ( new org.ovirt.engine.ui.uicommonweb.validation.IValidation [ ] { new org.ovirt.engine.ui.uicommonweb.validation.NotEmptyValidation ( ) } ) ; return ( getServers ( ) . getIsValid ( ) ) && ( getBrickDirectory ( ) . getIsValid ( ) ) ; }

Target:
public boolean validate ( ) { if ( getShowBricksList ( ) . getEntity ( ) ) { getBrickDirectory ( ) . setEntity ( getBricksFromServer ( ) . getSelectedItem ( ) ) ; } getBrickDirectory ( ) . validateEntity ( new org.ovirt.engine.ui.uicommonweb.validation.IValidation [ ] { new org.ovirt.engine.ui.uicommonweb.validation.NotEmptyValidation ( ) } ) ; return ( getServers ( ) . getIsValid ( ) ) && ( getBrickDirectory ( ) . getIsValid ( ) ) ; }
Source:
private org.ovirt.engine.core.common.action.VdcReturnValueBase notAllowedInPrepForMaintMode ( org.ovirt.engine.core.common.action.VdcActionType action ) { java.lang.Class < org.ovirt.engine.core.bll.CommandBase < ? extends org.ovirt.engine.core.common.action.VdcActionParametersBase > > clazz = org.ovirt.engine.core.bll.CommandsFactory.getCommandClass ( action.name ( ) ) ; if ( clazz.isAnnotationPresent ( org.ovirt.engine.core.bll.DisableInPrepareMode.class ) ) { return getErrorCommandReturnValue ( VdcBllMessages.ENGINE_IS_RUNNING_IN_PREPARE_MODE ) ; } return null ; }

Target:
public org.ovirt.engine.core.common.action.VdcReturnValueBase Login ( org.ovirt.engine.core.common.action.LoginUserParameters parameters ) { switch ( parameters.getActionType ( ) ) { case LoginUser : case LoginAdminUser : org.ovirt.engine.core.bll.CommandBase < ? > command = org.ovirt.engine.core.bll.CommandsFactory.CreateCommand ( parameters.getActionType ( ) , parameters ) ; command.insertAsyncTaskPlaceHolders ( ) ; return command.executeAction ( ) ; default : return getErrorCommandReturnValue ( VdcBllMessages.USER_NOT_AUTHORIZED_TO_PERFORM_ACTION ) ; } }
Source:
private void hostName_SelectedItemChanged ( ) { org.ovirt.engine.core.common.businessentities.VDS vds = ( ( org.ovirt.engine.core.common.businessentities.VDS ) ( getExternalHostName ( ) . getSelectedItem ( ) ) ) ; if ( vds == null ) { vds = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; } updateModelFromVds ( vds , null , false , null ) ; }

Target:
private void hostName_SelectedItemChanged ( ) { if ( java.lang.Boolean.FALSE.equals ( getIsDiscoveredHosts ( ) . getEntity ( ) ) ) { org.ovirt.engine.core.common.businessentities.VDS vds = ( ( org.ovirt.engine.core.common.businessentities.VDS ) ( getExternalHostName ( ) . getSelectedItem ( ) ) ) ; if ( vds == null ) { vds = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; } updateModelFromVds ( vds , null , false , null ) ; } }
Source:
public void logNetworkException ( org.ovirt.engine.core.vdsbroker.vdsbroker.VDSNetworkException e ) { switch ( vds.getStatus ( ) ) { case Down : break ; case NonResponsive : org.ovirt.engine.core.vdsbroker.VdsManager.log.debugFormat ( "Failed to refresh VDS , vds = {0} : {1}, VDS Network Error, continuing.\n{2}" , vds.getId ( ) , vds.getName ( ) , e.getMessage ( ) ) ; break ; default : org.ovirt.engine.core.vdsbroker.VdsManager.log.warnFormat ( "Failed to refresh VDS , vds = {0} : {1}, VDS Network Error, continuing.\n{2}" , vds.getId ( ) , vds.getName ( ) , e.getMessage ( ) ) ; } }

Target:
public void dispose ( ) { org.ovirt.engine.core.vdsbroker.VdsManager.log.info ( "vdsManager::disposing" ) ; org.ovirt.engine.core.utils.timer.SchedulerUtilQuartzImpl.getInstance ( ) . deleteJob ( onTimerJobId ) ; vdsProxy.close ( ) ; }
Source:
public void testRemoveNonExistant ( ) { setUpEntityQueryExpectations ( QueryType.GetMacPoolById , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendMacPoolResourceTest.MAC_POOL_ID } , null ) ; try { resource.remove ( ) ; org.junit.Assert.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { org.junit.Assert.assertNotNull ( wae.getResponse ( ) ) ; org.junit.Assert.assertEquals ( 404 , wae.getResponse ( ) . getStatus ( ) ) ; } }

Target:
public void testRemoveNonExistant ( ) { setUpEntityQueryExpectations ( QueryType.GetMacPoolById , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendMacPoolResourceTest.MAC_POOL_ID } , null ) ; try { resource.remove ( ) ; org.junit.jupiter.api.Assertions.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { org.junit.jupiter.api.Assertions.assertNotNull ( wae.getResponse ( ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( 404 , wae.getResponse ( ) . getStatus ( ) ) ; } }
Source:
public void rollback ( ) { log.error ( "Transaction rolled-back for command '{}'." , this . getClass ( ) . getName ( ) ) ; try { if ( isQuotaDependant ( ) ) { rollbackQuota ( ) ; } } catch ( java.lang.NullPointerException e ) { log.error ( "RollbackQuota: failed (may be because quota is disabled)" , e ) ; } cancelTasks ( ) ; }

Target:
public org.ovirt.engine.core.common.interfaces.VDSBrokerFrontend getVdsBroker ( ) { return vdsBroker ; }
Source:
protected void freeLock ( ) { if ( ( context.getLock ( ) ) != null ) { getLockManager ( ) . releaseLock ( context.getLock ( ) ) ; log.info ( "Lock freed to object '{}'" , context.getLock ( ) ) ; context.withLock ( null ) ; } }

Target:
protected void freeLock ( ) { if ( ( context.getLock ( ) ) != null ) { getLockManager ( ) . releaseLock ( context.getLock ( ) ) ; log.info ( "Lock freed to object '{}'" , context.getLock ( ) ) ; context.withLock ( null ) ; freeCustomLocks ( ) ; } }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.VMListReturnForXmlRpc getOvaInfo ( java.lang.String ovaPath ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "Host.getOvaInfo" ) . withParameter ( "ova_path" , ovaPath ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) . withResponseKey ( "vmList" ) . withResponseType ( java.lang.Object [ ] . class ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.VMListReturnForXmlRpc ( response ) ; }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.OneVmReturnForXmlRpc getExternalVmFromOva ( java.lang.String ovaPath ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "Host.getExternalVmFromOva" ) . withParameter ( "ova_path" , ovaPath ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) . withResponseKey ( "vmList" ) . withResponseType ( java.lang.Object [ ] . class ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.OneVmReturnForXmlRpc ( response ) ; }
Source:
public void getGlusterVolumeGeoRepRecommendationViolations ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid masterVolumeId , org.ovirt.engine.core.compat.Guid slaveVolumeId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object returnValue , org.ovirt.engine.ui.frontend.AsyncQuery asyncQuery ) { return returnValue == null ? new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterGeoRepNonEligibilityReason > ( ) : ( ( java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterGeoRepNonEligibilityReason > ) ( returnValue ) ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetNonEligibilityReasonsOfVolumeForGeoRepSession , new org.ovirt.engine.core.common.queries.gluster.GlusterVolumeGeoRepEligibilityParameters ( masterVolumeId , slaveVolumeId ) , aQuery ) ; }

Target:
public void getGlusterVolumeGeoRepRecommendationViolations ( org.ovirt.engine.ui.frontend.AsyncQuery < java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterGeoRepNonEligibilityReason > > aQuery , org.ovirt.engine.core.compat.Guid masterVolumeId , org.ovirt.engine.core.compat.Guid slaveVolumeId ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.ListConverter < > ( ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetNonEligibilityReasonsOfVolumeForGeoRepSession , new org.ovirt.engine.core.common.queries.gluster.GlusterVolumeGeoRepEligibilityParameters ( masterVolumeId , slaveVolumeId ) , aQuery ) ; }
Source:
public void testUpdate ( ) throws java.lang.Exception { setUpGetEntityExpectations ( 3 ) ; setAllContentHeaderExpectation ( ) ; setGetVmQueryExpectations ( 2 ) ; setGetNetworksQueryExpectations ( 2 ) ; setGetGuestAgentQueryExpectations ( 2 ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.UpdateVmInterface , org.ovirt.engine.core.common.action.AddVmInterfaceParameters.class , new java.lang.String [ ] { "VmId" , "Interface.Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.AbstractBackendNicsResourceTest.PARENT_ID , GUIDS [ 1 ] } , true , true ) ) ; org.ovirt.engine.api.model.NIC nic = resource.update ( getNic ( false ) ) ; assertNotNull ( nic ) ; }

Target:
public void testActivateNic ( ) throws java.lang.Exception { org.ovirt.engine.api.restapi.resource.BackendVmNicResource backendVmNicResource = ( ( org.ovirt.engine.api.restapi.resource.BackendVmNicResource ) ( resource ) ) ; setUpGetEntityExpectations ( 3 ) ; setAllContentHeaderExpectation ( ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.UpdateVmInterface , org.ovirt.engine.core.common.action.AddVmInterfaceParameters.class , new java.lang.String [ ] { "VmId" , "Interface.Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.AbstractBackendNicsResourceTest.PARENT_ID , GUIDS [ 1 ] } ) ) ; verifyActionResponse ( backendVmNicResource.activate ( new org.ovirt.engine.api.model.Action ( ) ) ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.Erratum runErratumMethod ( java.lang.String relativeUrl ) { try { org.ovirt.engine.core.bll.host.provider.foreman.ExternalErratum erratum = objectMapper.readValue ( runHttpGetMethod ( relativeUrl ) , org.ovirt.engine.core.bll.host.provider.foreman.ExternalErratum.class ) ; return mapErratum ( erratum ) ; } catch ( java.io.IOException e ) { return null ; } }

Target:
private org.ovirt.engine.core.bll.host.provider.ContentHostProvider getContentHostProvider ( ) { org.ovirt.engine.core.compat.Version foremanVersion = getForemanVersion ( ) ; if ( ( foremanVersion != null ) && ( foremanVersion.greaterOrEquals ( org.ovirt.engine.core.bll.host.provider.foreman.ForemanHostProviderProxy.KATELLO_V3_VERSION ) ) ) { return new org.ovirt.engine.core.bll.host.provider.foreman.KatelloV30Provider ( this ) ; } else { return new org.ovirt.engine.core.bll.host.provider.foreman.KatelloV21Provider ( this ) ; } }
Source:
public void edit ( final org.ovirt.engine.ui.uicommonweb.models.hosts.HostBondInterfaceModel object ) { super . edit ( object ) ; bondSuggestEditor.setVisible ( true ) ; bondEditor.setVisible ( false ) ; info.setVisible ( false ) ; message.setVisible ( false ) ; layoutPanel.remove ( infoPanel ) ; layoutPanel.getElement ( ) . getStyle ( ) . setOverflow ( Overflow.HIDDEN ) ; asPopupPanel ( ) . setPixelSize ( 400 , 275 ) ; }

Target:
protected java.lang.String renderNullSafe ( java.util.Map.Entry < java.lang.String , org.ovirt.engine.ui.uicommonweb.models.EntityModel < java.lang.String > > pair ) { java.lang.String key = pair.getKey ( ) ; java.lang.String value = pair.getValue ( ) . getEntity ( ) ; if ( "custom" . equals ( key ) ) { return ( ( org.ovirt.engine.ui.webadmin.section.main.view.popup.host.SetupNetworksBondPopupView.constants.customHostPopup ( ) ) + ": " ) + value ; } return value ; }
Source:
public org.ovirt.engine.core.bll.ValidationResult assignFirstCpuProfile ( org.ovirt.engine.core.common.businessentities.VmBase vmBase , org.ovirt.engine.core.compat.Guid userId ) { java.util.List < org.ovirt.engine.core.common.businessentities.profiles.CpuProfile > cpuProfilesWithPermissions = cpuProfileDao.getAllForCluster ( vmBase.getVdsGroupId ( ) , userId , ( userId != null ) , ActionGroup.ASSIGN_CPU_PROFILE ) ; if ( cpuProfilesWithPermissions.isEmpty ( ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_CPU_PROFILE_EMPTY ) ; } else { vmBase.setCpuProfileId ( cpuProfilesWithPermissions.get ( 0 ) . getId ( ) ) ; return org.ovirt.engine.core.bll.ValidationResult.VALID ; } }

Target:
public org.ovirt.engine.core.bll.ValidationResult assignFirstCpuProfile ( org.ovirt.engine.core.common.businessentities.VmBase vmBase , org.ovirt.engine.core.compat.Guid userId ) { java.util.List < org.ovirt.engine.core.common.businessentities.profiles.CpuProfile > cpuProfilesWithPermissions = cpuProfileDao.getAllForCluster ( vmBase.getVdsGroupId ( ) , userId , ( ! ( org.ovirt.engine.core.compat.Guid.isNullOrEmpty ( userId ) ) ) , ActionGroup.ASSIGN_CPU_PROFILE ) ; if ( cpuProfilesWithPermissions.isEmpty ( ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_CPU_PROFILE_EMPTY ) ; } else { vmBase.setCpuProfileId ( cpuProfilesWithPermissions.get ( 0 ) . getId ( ) ) ; return org.ovirt.engine.core.bll.ValidationResult.VALID ; } }
Source:
public javax.ws.rs.core.Response add ( org.ovirt.engine.api.model.Network network ) { validateParameters ( network , "name" , "dataCenter.name|id" ) ; org.ovirt.engine.api.model.Network entity = map ( network ) ; if ( namedDataCenter ( network ) ) { entity.setDataCenterId ( getDataCenterId ( network ) ) ; } org.ovirt.engine.core.common.action.AddNetworkStoragePoolParameters parameters = new org.ovirt.engine.core.common.action.AddNetworkStoragePoolParameters ( entity.getDataCenterId ( ) , entity ) ; if ( network.isSetProfileRequired ( ) ) { parameters.setVnicProfileRequired ( network.isProfileRequired ( ) ) ; } return performCreate ( VdcActionType.AddNetwork , parameters , new org.ovirt.engine.api.restapi.resource.BackendNetworksResource.AddedNetworkResolver ( ) ) ; }

Target:
protected org.ovirt.engine.core.common.action.AddNetworkStoragePoolParameters getAddParameters ( org.ovirt.engine.api.model.Network network , org.ovirt.engine.api.model.Network entity ) { if ( namedDataCenter ( network ) ) { entity.setDataCenterId ( getDataCenterId ( network ) ) ; } org.ovirt.engine.core.common.action.AddNetworkStoragePoolParameters parameters = new org.ovirt.engine.core.common.action.AddNetworkStoragePoolParameters ( entity.getDataCenterId ( ) , entity ) ; if ( ( network != null ) && ( network.isSetProfileRequired ( ) ) ) { parameters.setVnicProfileRequired ( network.isProfileRequired ( ) ) ; } return parameters ; }
Source:
private org.ovirt.engine.core.common.action.VdcActionType updateActionTypeForQosType ( org.ovirt.engine.core.common.businessentities.qos.QosType qosType ) { switch ( qosType ) { case STORAGE : return org.ovirt.engine.core.common.action.VdcActionType.UpdateStorageQos ; case CPU : return org.ovirt.engine.core.common.action.VdcActionType.UpdateCpuQos ; case NETWORK : return org.ovirt.engine.core.common.action.VdcActionType.UpdateNetworkQoS ; default : throw new java.lang.IllegalArgumentException ( ( ( "Unsupported QoS type \"" + qosType ) + "\"" ) ) ; } }

Target:
private org.ovirt.engine.core.common.action.VdcActionType updateActionTypeForQosType ( org.ovirt.engine.core.common.businessentities.qos.QosType qosType ) { switch ( qosType ) { case STORAGE : return org.ovirt.engine.core.common.action.VdcActionType.UpdateStorageQos ; case CPU : return org.ovirt.engine.core.common.action.VdcActionType.UpdateCpuQos ; case NETWORK : return org.ovirt.engine.core.common.action.VdcActionType.UpdateNetworkQoS ; case HOSTNETWORK : return org.ovirt.engine.core.common.action.VdcActionType.UpdateHostNetworkQos ; default : throw new java.lang.IllegalArgumentException ( ( ( "Unsupported QoS type \"" + qosType ) + "\"" ) ) ; } }
Source:
public java.util.concurrent.Future < java.util.Map < java.lang.String , java.lang.Object > > setupNetworks ( org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcStruct networks , org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcStruct bonds , org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcStruct options ) { return vdsServer.futureSetupNetworks ( networks.getInnerMap ( ) , bonds.getInnerMap ( ) , options.getInnerMap ( ) ) ; }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc diskReplicateFinish ( java.lang.String vmUUID , java.util.Map srcDisk , java.util.Map dstDisk ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.diskReplicateFinish ( vmUUID , srcDisk , dstDisk ) ; 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 static void getExistingStorageDomainList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hostId , org.ovirt.engine.core.common.businessentities.StorageDomainType domainType , org.ovirt.engine.core.common.businessentities.StorageType storageType , java.lang.String path ) { 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.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetExistingStorageDomainList , new org.ovirt.engine.core.common.queries.GetExistingStorageDomainListParameters ( hostId , storageType , domainType , path ) , aQuery ) ; }

Target:
public void getStorageConnectionById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String id , 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 ) { return source != null ? ( ( org.ovirt.engine.core.common.businessentities.StorageServerConnections ) ( source ) ) : null ; } } ; org.ovirt.engine.core.common.queries.StorageServerConnectionQueryParametersBase params = new org.ovirt.engine.core.common.queries.StorageServerConnectionQueryParametersBase ( id ) ; params.setRefresh ( isRefresh ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageServerConnectionById , params , aQuery ) ; }
Source:
private void UpdateActionAvailability ( ) { org.ovirt.engine.core.common.businessentities.VmTemplate template = ( ( org.ovirt.engine.core.common.businessentities.VmTemplate ) ( getEntity ( ) ) ) ; java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.storage.StorageDomainModel > selectedItems = ( ( getSelectedItems ( ) ) != null ) ? org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.ui.uicommonweb.models.storage.StorageDomainModel > cast ( getSelectedItems ( ) ) : new java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.storage.StorageDomainModel > ( ) ; getRemoveCommand ( ) . setIsExecutionAllowed ( isRemoveCommandAvailable ( ) ) ; }

Target:
private void updateActionAvailability ( ) { getRemoveCommand ( ) . setIsExecutionAllowed ( isRemoveCommandAvailable ( ) ) ; }
Source:
private void setTestResultValue ( org.ovirt.engine.core.common.action.VdcReturnValueBase result ) { java.lang.String errorMessage = org.ovirt.engine.ui.uicommonweb.models.providers.ProviderModel.EMPTY_ERROR_MESSAGE ; if ( result == null ) { errorMessage = org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getConstants ( ) . testFailedUnknownErrorMsg ( ) ; } else if ( ! ( result.getSucceeded ( ) ) ) { errorMessage = ( result.isValid ( ) ) ? org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . translateEngineFault ( result.getFault ( ) ) : org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . translateExecuteFailedMessages ( result.getValidationMessages ( ) ) ; } getTestResult ( ) . setEntity ( errorMessage ) ; }

Target:
private void setTestResultValue ( org.ovirt.engine.core.common.action.VdcReturnValueBase result ) { java.lang.String errorMessage = org.ovirt.engine.ui.uicommonweb.models.providers.ProviderModel.EMPTY_ERROR_MESSAGE ; if ( result == null ) { errorMessage = org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getConstants ( ) . testFailedUnknownErrorMsg ( ) ; } else if ( ! ( result.getSucceeded ( ) ) ) { errorMessage = ( result.isValid ( ) ) ? result.getFault ( ) . getMessage ( ) : result.getValidationMessages ( ) . get ( 0 ) ; } getTestResult ( ) . setEntity ( errorMessage ) ; }
Source:
protected void clearVolumeTaskAndReleaseLock ( ) { org.ovirt.engine.core.utils.lock.EngineLock lock = new org.ovirt.engine.core.utils.lock.EngineLock ( getExclusiveLocks ( ) , org.ovirt.engine.core.bll.gluster.GlusterAsyncCommandBase.getSharedLocks ( ) ) ; setLock ( lock ) ; org.ovirt.engine.core.bll.gluster.GlusterAsyncCommandBase.freeLock ( ) ; org.ovirt.engine.core.bll.gluster.GlusterAsyncCommandBase.getGlusterVolumeDao ( ) . updateVolumeTask ( org.ovirt.engine.core.bll.gluster.GlusterAsyncCommandBase.getGlusterVolumeId ( ) , null ) ; }

Target:
protected void releaseVolumeLock ( ) { org.ovirt.engine.core.utils.lock.EngineLock lock = new org.ovirt.engine.core.utils.lock.EngineLock ( getExclusiveLocks ( ) , org.ovirt.engine.core.bll.gluster.GlusterAsyncCommandBase.getSharedLocks ( ) ) ; setLock ( lock ) ; org.ovirt.engine.core.bll.gluster.GlusterAsyncCommandBase.freeLock ( ) ; }
Source:
private java.util.Collection < org.ovirt.engine.core.common.businessentities.HostDevice > getDeviceAtomicGroup ( org.ovirt.engine.core.common.businessentities.HostDevice hostDevice ) { if ( ( ! ( org.ovirt.engine.core.bll.hostdev.AbstractVmHostDevicesCommand.CAPABILITY_PCI.equals ( hostDevice.getCapability ( ) ) ) ) || ( ( hostDevice.getIommuGroup ( ) ) == null ) ) { return java.util.Collections.singleton ( hostDevice ) ; } return hostDeviceDao.getHostDevicesByHostIdAndIommuGroup ( org.ovirt.engine.core.bll.hostdev.AbstractVmHostDevicesCommand.getVm ( ) . getDedicatedVmForVds ( ) , hostDevice.getIommuGroup ( ) ) ; }

Target:
private java.util.Collection < org.ovirt.engine.core.common.businessentities.HostDevice > getDeviceAtomicGroup ( org.ovirt.engine.core.common.businessentities.HostDevice hostDevice ) { if ( ! ( hasIommu ( hostDevice ) ) ) { return java.util.Collections.singleton ( hostDevice ) ; } return hostDeviceDao.getHostDevicesByHostIdAndIommuGroup ( org.ovirt.engine.core.bll.hostdev.AbstractVmHostDevicesCommand.getVm ( ) . getDedicatedVmForVdsList ( ) . get ( 0 ) , hostDevice.getIommuGroup ( ) ) ; }
Source:
private static void setGateway ( org.ovirt.engine.core.common.businessentities.network.NetworkBootProtocol bootProtocol , org.ovirt.engine.core.vdsbroker.vdsbroker.IpInfoFetcher ipInfoFetcher , java.util.function.Consumer < java.lang.String > gatewaySetter ) { if ( bootProtocol == ( org.ovirt.engine.core.common.businessentities.network.NetworkBootProtocol.STATIC_IP ) ) { java.lang.String gateway = ipInfoFetcher.fetchGateway ( ) ; if ( org.apache.commons.lang.StringUtils.isNotEmpty ( gateway ) ) { gatewaySetter.accept ( gateway ) ; } } }

Target:
private static void setGateway ( org.ovirt.engine.core.common.businessentities.network.Ipv4BootProtocol bootProtocol , org.ovirt.engine.core.vdsbroker.vdsbroker.IpInfoFetcher ipInfoFetcher , java.util.function.Consumer < java.lang.String > gatewaySetter ) { if ( bootProtocol == ( org.ovirt.engine.core.common.businessentities.network.Ipv4BootProtocol.STATIC_IP ) ) { java.lang.String gateway = ipInfoFetcher.fetchGateway ( ) ; if ( org.apache.commons.lang.StringUtils.isNotEmpty ( gateway ) ) { gatewaySetter.accept ( gateway ) ; } } }
Source:
public static void getClusterNetworkList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { if ( ( aQuery.converterCallback ) == null ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.Network > ( ) ; } return source ; } } ; } org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllNetworksByClusterId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( clusterId ) , aQuery ) ; }

Target:
public static void getTemplateById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid templateId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmTemplate , new org.ovirt.engine.core.common.queries.GetVmTemplateParameters ( templateId ) , aQuery ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.storage_domains createDomain ( org.ovirt.engine.core.common.businessentities.storage_domain_static staticPart ) { org.ovirt.engine.core.common.businessentities.storage_domains result = null ; if ( staticPart != null ) { org.ovirt.engine.core.common.businessentities.StorageDomainDynamic dynamicPart = dynamicDAO.get ( staticPart.getId ( ) ) ; if ( dynamicPart != null ) { result = new org.ovirt.engine.core.common.businessentities.storage_domains ( ) ; result.setStorageStaticData ( staticPart ) ; result.setStorageDynamicData ( dynamicPart ) ; fillInDetails ( result ) ; } } return result ; }

Target:
private org.ovirt.engine.core.common.businessentities.storage_domains createDomain ( org.ovirt.engine.core.common.businessentities.StorageDomainStatic staticPart ) { org.ovirt.engine.core.common.businessentities.storage_domains result = null ; if ( staticPart != null ) { org.ovirt.engine.core.common.businessentities.StorageDomainDynamic dynamicPart = dynamicDAO.get ( staticPart.getId ( ) ) ; if ( dynamicPart != null ) { result = new org.ovirt.engine.core.common.businessentities.storage_domains ( ) ; result.setStorageStaticData ( staticPart ) ; result.setStorageDynamicData ( dynamicPart ) ; fillInDetails ( result ) ; } } return result ; }
Source:
public void init ( javax.servlet.ServletConfig config ) throws javax.servlet.ServletException { super . init ( config ) ; url = org.ovirt.engine.core.utils.EngineLocalConfig.getInstance ( ) . expandString ( config.getInitParameter ( org.ovirt.engine.core.utils.servlet.RedirectServlet.URL ) . replaceAll ( "%\\{" , "\\${" ) ) ; }

Target:
public void init ( javax.servlet.ServletConfig config ) throws javax.servlet.ServletException { super . init ( config ) ; url = org.ovirt.engine.core.utils.EngineLocalConfig.getInstance ( ) . expandString ( config.getInitParameter ( org.ovirt.engine.core.utils.servlet.RedirectServlet.URL ) . replaceAll ( "%\\{" , "\\${" ) ) ; java.lang.String url404ConfigValue = config.getInitParameter ( org.ovirt.engine.core.utils.servlet.RedirectServlet.URL404 ) ; if ( org.apache.commons.lang.StringUtils.isNotEmpty ( url404ConfigValue ) ) { url404 = org.ovirt.engine.core.utils.EngineLocalConfig.getInstance ( ) . expandString ( url404ConfigValue.replaceAll ( "%\\{" , "\\${" ) ) ; } else { url404 = org.ovirt.engine.core.utils.servlet.RedirectServlet.url404Default ; } }
Source:
private void remove ( org.ovirt.vdsm.jsonrpc.client.utils.ResponseTracking tracking , org.codehaus.jackson.JsonNode id , org.ovirt.vdsm.jsonrpc.client.JsonRpcResponse response ) { this . runningCalls.remove ( id ) ; removeRequestFromTracking ( id ) ; tracking.getCall ( ) . addResponse ( response ) ; }

Target:
private void remove ( org.ovirt.vdsm.jsonrpc.client.utils.ResponseTracking tracking , org.codehaus.jackson.JsonNode id , org.ovirt.vdsm.jsonrpc.client.JsonRpcResponse response ) { this . runningCalls.remove ( id ) ; removeRequestFromTracking ( id ) ; if ( ( tracking != null ) && ( ( tracking.getClient ( ) ) != null ) ) { tracking.getCall ( ) . addResponse ( response ) ; } }
Source:
public void testCanDoActionWithEmptySnapshotGuid ( ) { org.ovirt.engine.core.common.action.TryBackToAllSnapshotsOfVmParameters params = new org.ovirt.engine.core.common.action.TryBackToAllSnapshotsOfVmParameters ( vmId , org.ovirt.engine.core.compat.Guid.Empty ) ; cmd = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.TryBackToAllSnapshotsOfVmCommand < org.ovirt.engine.core.common.action.TryBackToAllSnapshotsOfVmParameters > ( params ) ) ; org.mockito.Mockito.doNothing ( ) . when ( cmd ) . updateVmDisksFromDb ( ) ; org.mockito.Mockito.doReturn ( snapshotDao ) . when ( cmd ) . getSnapshotDao ( ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( cmd , VdcBllMessages.ACTION_TYPE_FAILED_CORRUPTED_VM_SNAPSHOT_ID ) ; }

Target:
public void testCanDoActionWithEmptySnapshotGuid ( ) { org.ovirt.engine.core.common.action.TryBackToAllSnapshotsOfVmParameters params = new org.ovirt.engine.core.common.action.TryBackToAllSnapshotsOfVmParameters ( vmId , org.ovirt.engine.core.compat.Guid.Empty ) ; cmd = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.TryBackToAllSnapshotsOfVmCommand < org.ovirt.engine.core.common.action.TryBackToAllSnapshotsOfVmParameters > ( params ) ) ; org.mockito.Mockito.doNothing ( ) . when ( cmd ) . updateVmDisksFromDb ( ) ; org.mockito.Mockito.doReturn ( snapshotDao ) . when ( cmd ) . getSnapshotDao ( ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( cmd , EngineMessage.ACTION_TYPE_FAILED_CORRUPTED_VM_SNAPSHOT_ID ) ; }
Source:
private java.lang.String getClusterId ( ) { return parent.getParent ( ) . getParent ( ) . get ( ) . getId ( ) ; }

Target:
private org.ovirt.engine.api.model.GlusterBrick populateAdvancedDetails ( org.ovirt.engine.api.model.GlusterBrick model , org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity entity ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity volumeEntity = getEntity ( org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity.class , VdcQueryType.GetGlusterVolumeById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( entity.getVolumeId ( ) ) , null , true ) ; org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeAdvancedDetails detailsEntity = getEntity ( org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeAdvancedDetails.class , VdcQueryType.GetGlusterVolumeAdvancedDetails , new org.ovirt.engine.core.common.queries.gluster.GlusterVolumeAdvancedDetailsParameters ( volumeEntity.getClusterId ( ) , volumeEntity.getName ( ) , entity.getQualifiedName ( ) , true ) , null , true ) ; model = getMapper ( org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeAdvancedDetails.class , org.ovirt.engine.api.model.GlusterBrick.class ) . map ( detailsEntity , model ) ; return model ; }
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.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.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 testGetStorageDomainWithCorrectStatus ( ) { org.ovirt.engine.core.common.businessentities.StorageDomain result = dao.getStorageDomain ( FixturesTool.STORAGE_POOL_NFS_INACTIVE_ISO , StorageDomainType.ISO , StorageDomainStatus.Inactive ) ; org.junit.Assert.assertEquals ( FixturesTool.STORAGE_DOMAIN_NFS_INACTIVE_ISO , result.getId ( ) ) ; }

Target:
public void testGetStorageDomainWithCorrectStatus ( ) { org.ovirt.engine.core.common.businessentities.StorageDomain result = dao.getStorageDomain ( FixturesTool.STORAGE_POOL_NFS_INACTIVE_ISO , StorageDomainType.ISO , StorageDomainStatus.Inactive ) ; org.junit.Assert.assertEquals ( FixturesTool.STORAGE_DOMAIN_NFS_INACTIVE_ISO , result.getId ( ) ) ; org.junit.Assert.assertEquals ( "Wrong committed disk size" , 0 , result.getCommittedDiskSize ( ) ) ; org.junit.Assert.assertEquals ( "Wrong actual disk size" , 0 , result.getActualImagesSize ( ) ) ; }
Source:
protected R performUpdate ( R incoming , org.ovirt.engine.api.restapi.resource.EntityIdResolver entityResolver , org.ovirt.engine.core.common.action.VdcActionType update , org.ovirt.engine.api.restapi.resource.AbstractBackendSubResource.ParametersProvider < R , Q > updateProvider ) { Q entity = getEntity ( entityResolver , true ) ; validateUpdate ( incoming , org.ovirt.engine.api.restapi.resource.AbstractBackendSubResource.map ( entity ) ) ; performAction ( update , updateProvider.getParameters ( incoming , entity ) ) ; return addLinks ( populate ( map ( getEntity ( entityResolver , false ) ) , entity ) ) ; }

Target:
protected < T > Q doUpdate ( R incoming , Q entity , R model , org.ovirt.engine.api.restapi.resource.EntityIdResolver < T > entityResolver , org.ovirt.engine.core.common.action.VdcActionType update , org.ovirt.engine.api.restapi.resource.AbstractBackendSubResource.ParametersProvider < R , Q > updateProvider ) { validateUpdate ( incoming , model ) ; performAction ( update , updateProvider.getParameters ( incoming , entity ) ) ; entity = getEntity ( entityResolver , false ) ; return entity ; }
Source:
com.google.gwt.http.client.RequestBuilder createRequest ( java.lang.String engineAuthToken ) { com.google.gwt.http.client.RequestBuilder builder = new com.google.gwt.http.client.RequestBuilder ( com.google.gwt.http.client.RequestBuilder.GET , restApiBaseUrl ) ; builder.setHeader ( "Session-TTL" , restApiSessionTimeout ) ; java.lang.String preferValue = "persistent-auth, csrf-protection" ; if ( engineAuthToken != null ) { preferValue += ", new-auth" ; builder.setHeader ( org.ovirt.engine.ui.webadmin.plugin.restapi.RestApiSessionManager.ENGINE_AUTH_TOKEN_HEADER , engineAuthToken ) ; } builder.setHeader ( "Prefer" , preferValue ) ; java.lang.String sessionId = getSessionId ( ) ; if ( sessionId != null ) { builder.setHeader ( org.ovirt.engine.ui.webadmin.plugin.restapi.RestApiSessionManager.SESSION_ID_HEADER , sessionId ) ; } return builder ; }

Target:
com.google.gwt.http.client.RequestBuilder createRequest ( ) { com.google.gwt.http.client.RequestBuilder builder = new com.google.gwt.http.client.RequestBuilder ( com.google.gwt.http.client.RequestBuilder.GET , restApiBaseUrl ) ; builder.setHeader ( "Session-TTL" , restApiSessionTimeout ) ; builder.setHeader ( org.ovirt.engine.ui.webadmin.plugin.restapi.RestApiSessionManager.PREFER_HEADER , "persistent-auth, csrf-protection" ) ; if ( ( restApiSessionId ) != null ) { builder.setHeader ( org.ovirt.engine.ui.webadmin.plugin.restapi.RestApiSessionManager.CSRF_HEADER , restApiSessionId ) ; } return builder ; }
Source:
public void onDataChange ( java.util.List < org.ovirt.engine.ui.uicommonweb.models.userportal.UserPortalItemModel > items ) { getView ( ) . clear ( ) ; for ( org.ovirt.engine.ui.uicommonweb.models.userportal.UserPortalItemModel item : items ) { org.ovirt.engine.ui.userportal.section.main.presenter.tab.basic.MainTabBasicListItemPresenterWidget basicVmPresenterWidget = basicVmPresenterWidgetProvider.get ( ) ; basicVmPresenterWidget.setModel ( item ) ; addToSlot ( org.ovirt.engine.ui.userportal.section.main.presenter.tab.basic.MainTabBasicListPresenterWidget.TYPE_VmListContent , basicVmPresenterWidget ) ; } selectDefaul ( modelProvider.getModel ( ) , items ) ; }

Target:
public void onDataChange ( java.util.List < org.ovirt.engine.ui.uicommonweb.models.userportal.UserPortalItemModel > items ) { getView ( ) . clear ( ) ; for ( org.ovirt.engine.ui.uicommonweb.models.userportal.UserPortalItemModel item : items ) { org.ovirt.engine.ui.userportal.section.main.presenter.tab.basic.MainTabBasicListItemPresenterWidget basicVmPresenterWidget = basicVmPresenterWidgetProvider.get ( ) ; basicVmPresenterWidget.setModel ( item ) ; addToSlot ( org.ovirt.engine.ui.userportal.section.main.presenter.tab.basic.MainTabBasicListPresenterWidget.TYPE_VmListContent , basicVmPresenterWidget ) ; } selectDefault ( modelProvider.getModel ( ) , items ) ; }
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.OneMapReturnForXmlRpc get_image_transfer_session_stats ( java.lang.String ticketId ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.get_image_transfer_session_stats ( ticketId ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.OneMapReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.OneMapReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
Source:
protected boolean performImagesChecks ( ) { return org.ovirt.engine.core.bll.ImagesHandler.PerformImagesChecks ( org.ovirt.engine.core.bll.RestoreAllSnapshotsCommand.getReturnValue ( ) . getCanDoActionMessages ( ) , org.ovirt.engine.core.bll.RestoreAllSnapshotsCommand.getVm ( ) . getStoragePoolId ( ) , true , false , false , true , getImagesList ( ) ) ; }

Target:
protected boolean performImagesChecks ( ) { return org.ovirt.engine.core.bll.ImagesHandler.PerformImagesChecks ( org.ovirt.engine.core.bll.RestoreAllSnapshotsCommand.getReturnValue ( ) . getCanDoActionMessages ( ) , org.ovirt.engine.core.bll.RestoreAllSnapshotsCommand.getVm ( ) . getStoragePoolId ( ) , true , false , false , true , org.ovirt.engine.core.bll.ImagesHandler.filterImageDisks ( getImagesList ( ) , true , false ) ) ; }
Source:
protected boolean CheckStoragePoolStatusNotEqual ( org.ovirt.engine.core.common.businessentities.StoragePoolStatus status , org.ovirt.engine.core.dal.VdcBllMessages onFailMessage ) { boolean returnValue = false ; org.ovirt.engine.core.common.businessentities.StoragePool storagePool = org.ovirt.engine.core.bll.storage.StorageHandlingCommandBase.getStoragePool ( ) ; if ( storagePool != null ) { returnValue = ( storagePool.getstatus ( ) ) != status ; if ( ( ! returnValue ) && ( ! ( org.ovirt.engine.core.bll.storage.StorageHandlingCommandBase.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( onFailMessage.name ( ) ) ) ) ) { addCanDoActionMessage ( onFailMessage ) ; } } return returnValue ; }

Target:
protected boolean CheckStoragePoolStatusNotEqual ( org.ovirt.engine.core.common.businessentities.StoragePoolStatus status , org.ovirt.engine.core.common.errors.VdcBllMessages onFailMessage ) { boolean returnValue = false ; org.ovirt.engine.core.common.businessentities.StoragePool storagePool = org.ovirt.engine.core.bll.storage.StorageHandlingCommandBase.getStoragePool ( ) ; if ( storagePool != null ) { returnValue = ( storagePool.getstatus ( ) ) != status ; if ( ( ! returnValue ) && ( ! ( org.ovirt.engine.core.bll.storage.StorageHandlingCommandBase.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( onFailMessage.name ( ) ) ) ) ) { addCanDoActionMessage ( onFailMessage ) ; } } return returnValue ; }
Source:
public void onFaliureAlertShown ( ) { mockVdsSingleAgent ( ) ; mockExecutor ( agent1 , false ) ; mockCheckStatus ( "on" ) ; try { command.executeCommand ( ) ; } catch ( org.ovirt.engine.core.common.errors.VdcBLLException exception ) { org.mockito.Mockito.verify ( auditLogDao , org.mockito.Mockito.times ( 2 ) ) . save ( org.mockito.Matchers.any ( org.ovirt.engine.core.common.businessentities.AuditLog.class ) ) ; return ; } org.junit.Assert.fail ( ) ; }

Target:
public void onFaliureAlertShown ( ) { mockVdsSingleAgent ( ) ; mockExecutor ( agent1 , false ) ; mockCheckStatus ( "on" ) ; try { command.executeCommand ( ) ; } catch ( org.ovirt.engine.core.common.errors.VdcBLLException exception ) { org.mockito.Mockito.verify ( auditLogDirector , org.mockito.Mockito.times ( 2 ) ) . log ( org.mockito.Matchers.any ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase.class ) , org.mockito.Matchers.any ( org.ovirt.engine.core.common.AuditLogType.class ) ) ; return ; } org.junit.Assert.fail ( ) ; }
Source:
public static 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 ) ) . intValue ( ) : 0 ; } } ; aQuery.asyncCallback.onSuccess ( aQuery.getModel ( ) , 10 ) ; }

Target:
public static void getLunsByVgId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String vgId , org.ovirt.engine.core.compat.Guid vdsId ) { 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.LUNs > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.LUNs > ( ) ; } } ; org.ovirt.engine.core.common.queries.GetLunsByVgIdParameters params = new org.ovirt.engine.core.common.queries.GetLunsByVgIdParameters ( vgId , vdsId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetLunsByVgId , params , aQuery ) ; }