auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private void setVmTicket ( ) { org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runAction ( VdcActionType.SetVmTicket , new org.ovirt.engine.core.common.action.SetVmTicketParameters ( getEntity ( ) . getId ( ) , null , TICKET_VALIDITY_SECONDS , org.ovirt.engine.core.common.businessentities.GraphicsType.SPICE ) , new org.ovirt.engine.ui.uicompat.IFrontendActionAsyncCallback ( ) { @ java.lang.Override public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { org.ovirt.engine.ui.uicommonweb.models.vms.SpiceConsoleModel spiceConsoleModel = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.SpiceConsoleModel ) ( result.getState ( ) ) ) ; spiceConsoleModel.postSendVmTicket ( result.getReturnValue ( ) ) ; } } , this ) ; }

Target:
private void setVmTicket ( ) { org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runAction ( VdcActionType.SetVmTicket , new org.ovirt.engine.core.common.action.SetVmTicketParameters ( getEntity ( ) . getId ( ) , null , org.ovirt.engine.core.common.console.ConsoleOptions.TICKET_VALIDITY_SECONDS , org.ovirt.engine.core.common.businessentities.GraphicsType.SPICE ) , new org.ovirt.engine.ui.uicompat.IFrontendActionAsyncCallback ( ) { @ java.lang.Override public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { org.ovirt.engine.ui.uicommonweb.models.vms.SpiceConsoleModel spiceConsoleModel = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.SpiceConsoleModel ) ( result.getState ( ) ) ) ; spiceConsoleModel.postSendVmTicket ( result.getReturnValue ( ) ) ; } } , this ) ; }
Source:
public void validateFailsDiscardFunctionalityBreaks ( ) { passAllValidations ( ) ; org.mockito.Mockito.doReturn ( false ) . when ( discardHelper ) . isExistingDiscardFunctionalityPreserved ( org.mockito.Matchers.anyListOf ( org.ovirt.engine.core.common.businessentities.storage.LUNs.class ) , org.mockito.Matchers.any ( org.ovirt.engine.core.common.businessentities.StorageDomain.class ) ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( command , EngineMessage.ACTION_TYPE_FAILED_LUN_BREAKS_STORAGE_DOMAIN_DISCARD_SUPPORT ) ; }

Target:
public void validateFailsDiscardFunctionalityBreaks ( ) { passAllValidations ( ) ; org.ovirt.engine.core.common.errors.EngineMessage lunsBreakStorageDomainDiscardSupportMessage = org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_LUN_BREAKS_STORAGE_DOMAIN_PASS_DISCARD_SUPPORT ; org.mockito.Mockito.doReturn ( new org.ovirt.engine.core.bll.ValidationResult ( lunsBreakStorageDomainDiscardSupportMessage ) ) . when ( discardHelper ) . isExistingDiscardFunctionalityPreserved ( org.mockito.Matchers.anyListOf ( org.ovirt.engine.core.common.businessentities.storage.LUNs.class ) , org.mockito.Matchers.any ( org.ovirt.engine.core.common.businessentities.StorageDomain.class ) ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( command , lunsBreakStorageDomainDiscardSupportMessage ) ; }
Source:
public static void isMTUOverrideSupported ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String version ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Boolean ) ( source ) ) . booleanValue ( ) : true ; } } ; org.ovirt.engine.core.common.queries.GetConfigurationValueParameters tempVar = new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.MTUOverrideSupported ) ; tempVar.setVersion ( version ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigFromCache ( tempVar , aQuery ) ; }

Target:
public boolean isSerialNumberPolicySupported ( java.lang.String version ) { return ( ( java.lang.Boolean ) ( getConfigValuePreConverted ( ConfigurationValues.SerialNumberPolicySupported , version ) ) ) ; }
Source:
public void Executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { if ( ! ( result.getReturnValue ( ) . getSucceeded ( ) ) ) { return ; } org.ovirt.engine.ui.uicommonweb.models.userportal.PoolItemBehavior behavior = ( ( org.ovirt.engine.ui.uicommonweb.models.userportal.PoolItemBehavior ) ( result.getState ( ) ) ) ; org.ovirt.engine.core.common.action.VdcReturnValueBase returnValueBase = result.getReturnValue ( ) ; org.ovirt.engine.core.compat.Guid Guid = ( ( org.ovirt.engine.core.compat.Guid ) ( returnValueBase.getActionReturnValue ( ) ) ) ; }

Target:
public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { if ( ! ( result.getReturnValue ( ) . getSucceeded ( ) ) ) { return ; } org.ovirt.engine.ui.uicommonweb.models.userportal.PoolItemBehavior behavior = ( ( org.ovirt.engine.ui.uicommonweb.models.userportal.PoolItemBehavior ) ( result.getState ( ) ) ) ; org.ovirt.engine.core.common.action.VdcReturnValueBase returnValueBase = result.getReturnValue ( ) ; org.ovirt.engine.core.compat.Guid Guid = ( ( org.ovirt.engine.core.compat.Guid ) ( returnValueBase.getActionReturnValue ( ) ) ) ; }
Source:
public void getAllErrata ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Erratum > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetErrataForSystem , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }

Target:
public void getAllErrata ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Erratum > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetErrataForEngine , new org.ovirt.engine.core.common.queries.GetErrataCountsParameters ( ) , aQuery ) ; }
Source:
public org.ovirt.engine.core.common.businessentities.AsyncTasks getAsyncTaskFromDb ( org.ovirt.engine.core.compat.Guid asyncTaskId ) { org.ovirt.engine.core.common.businessentities.AsyncTasks asyncTask = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getAsyncTaskDao ( ) . get ( asyncTaskId ) ; if ( asyncTask != null ) { copyFromCommandEntity ( asyncTask , commandsCache.get ( asyncTask.getCommandId ( ) ) ) ; } return asyncTask ; }

Target:
public void saveAsyncTaskToDb ( final org.ovirt.engine.core.common.businessentities.AsyncTasks asyncTask ) { coCoAsyncTaskHelper.saveAsyncTaskToDb ( asyncTask ) ; }
Source:
public com.google.gwt.resources.client.ImageResource getValue ( org.ovirt.engine.ui.uicommonweb.models.EntityModel object ) { org.ovirt.engine.core.common.businessentities.Disk disk = ( ( org.ovirt.engine.core.common.businessentities.Disk ) ( ( ( org.ovirt.engine.ui.uicommonweb.models.vms.DiskModel ) ( object.getEntity ( ) ) ) . getDisk ( ) ) ) ; setTitle ( ( disk.isShareable ( ) ? constants.shareable ( ) : null ) ) ; return disk.isShareable ( ) ? resources.shareableDiskIcon ( ) : null ; }

Target:
public void eventRaised ( org.ovirt.engine.core.compat.Event ev , java.lang.Object sender , org.ovirt.engine.core.compat.EventArgs args ) { boolean isAttach = ( ( java.lang.Boolean ) ( ( ( org.ovirt.engine.ui.uicommonweb.models.EntityModel ) ( sender ) ) . getEntity ( ) ) ) ; createDiskPanel.setVisible ( ( ! isAttach ) ) ; attachDiskPanel.setVisible ( isAttach ) ; if ( ( ! isAttach ) && ( ! ( isNewLunDiskEnabled ) ) ) { disk.getIsInternal ( ) . setEntity ( true ) ; } revealDiskPanel ( disk ) ; }
Source:
public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result1 ) { org.ovirt.engine.core.common.action.VdcReturnValueBase retVal = result1.getReturnValue ( ) ; boolean succeeded = false ; if ( ( retVal != null ) && ( retVal.getSucceeded ( ) ) ) { succeeded = true ; } postSaveAction ( ( succeeded ? ( ( org.ovirt.engine.core.compat.Guid ) ( retVal.getActionReturnValue ( ) ) ) : null ) , succeeded ) ; }

Target:
public void executed ( org.ovirt.engine.ui.uicompat.FrontendMultipleActionAsyncResult result ) { stopProgress ( ) ; cancel ( ) ; }
Source:
public org.ovirt.engine.core.bll.ValidationResult isDomainExistAndActive ( ) { if ( ( storageDomain ) == null ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_DOMAIN_NOT_EXIST ) ; } if ( ( ( storageDomain.getStatus ( ) ) == null ) || ( ( storageDomain.getStatus ( ) ) != ( org.ovirt.engine.core.common.businessentities.StorageDomainStatus.Active ) ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_DOMAIN_STATUS_ILLEGAL ) ; } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult isDomainExistAndActive ( ) { if ( ( storageDomain ) == null ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_DOMAIN_NOT_EXIST ) ; } if ( ( storageDomain.getStatus ( ) ) != ( org.ovirt.engine.core.common.businessentities.StorageDomainStatus.Active ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_DOMAIN_STATUS_ILLEGAL2 , java.lang.String.format ( "$%1$s %2$s" , "status" , storageDomain.getStatus ( ) . name ( ) ) ) ; } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }
Source:
private void assertCorrectSlaveCountInValidBondsWhenInsufficientBonds ( int numberOfSlaves ) { assertCorrectSlaveCountInValidBonds ( numberOfSlaves , java.lang.String.format ( "bonded interface with only %1$d slaves is not valid bond" , numberOfSlaves ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( VdcBllMessages.NETWORK_BONDS_INVALID_SLAVE_COUNT ) ) ; }

Target:
private void assertCorrectSlaveCountInValidBondsWhenInsufficientBonds ( int numberOfSlaves ) { java.lang.String bondName = "bondName" ; org.hamcrest.Matcher < org.ovirt.engine.core.bll.ValidationResult > matcher = org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.NETWORK_BONDS_INVALID_SLAVE_COUNT , org.ovirt.engine.core.utils.ReplacementUtils.createSetVariableString ( HostSetupNetworksValidator.VAR_NETWORK_BONDS_INVALID_SLAVE_COUNT_LIST , bondName ) ) ; assertCorrectSlaveCountInValidBonds ( numberOfSlaves , java.lang.String.format ( "bonded interface with only %1$d slaves is not valid bond" , numberOfSlaves ) , matcher , bondName ) ; }
Source:
public org.ovirt.engine.core.dao.VmDAODbFacadeImpl.VMWithPlugInfo mapRow ( java.sql.ResultSet rs , int rowNum ) throws java.sql.SQLException { @ java.lang.SuppressWarnings ( value = "synthetic-access" ) org.ovirt.engine.core.dao.VmDAODbFacadeImpl.VMWithPlugInfo entity = new org.ovirt.engine.core.dao.VmDAODbFacadeImpl.VMWithPlugInfo ( ) ; entity.setPlugged ( rs.getBoolean ( "is_plugged" ) ) ; entity.setVM ( org.ovirt.engine.core.dao.VmDAODbFacadeImpl.VMRowMapper.instance.mapRow ( rs , rowNum ) ) ; return entity ; }

Target:
public org.ovirt.engine.core.common.utils.Pair < org.ovirt.engine.core.common.businessentities.VM , org.ovirt.engine.core.common.businessentities.VmDevice > mapRow ( java.sql.ResultSet rs , int rowNum ) throws java.sql.SQLException { @ java.lang.SuppressWarnings ( value = "synthetic-access" ) org.ovirt.engine.core.common.utils.Pair < org.ovirt.engine.core.common.businessentities.VM , org.ovirt.engine.core.common.businessentities.VmDevice > entity = new org.ovirt.engine.core.common.utils.Pair ( ) ; entity.setFirst ( org.ovirt.engine.core.dao.VmDAODbFacadeImpl.VMRowMapper.instance.mapRow ( rs , rowNum ) ) ; entity.setSecond ( VmDeviceDAODbFacadeImpl.VmDeviceRowMapper.instance.mapRow ( rs , rowNum ) ) ; return entity ; }
Source:
private void addAddtionalParams ( org.ovirt.engine.core.common.action.VmNumaNodeOperationParameters params ) { params.setDedicatedHostList ( org.ovirt.engine.core.bll.UpdateVmCommand.getParameters ( ) . getVmStaticData ( ) . getDedicatedVmForVdsList ( ) ) ; params.setNumaTuneMode ( org.ovirt.engine.core.bll.UpdateVmCommand.getParameters ( ) . getVmStaticData ( ) . getNumaTuneMode ( ) ) ; params.setMigrationSupport ( org.ovirt.engine.core.bll.UpdateVmCommand.getParameters ( ) . getVmStaticData ( ) . getMigrationSupport ( ) ) ; }

Target:
public void init ( ) { if ( ! ( org.ovirt.engine.core.bll.UpdateVmCommand.getParameters ( ) . isUpdateNuma ( ) ) ) { org.ovirt.engine.core.bll.UpdateVmCommand.getParameters ( ) . getVm ( ) . setvNumaNodeList ( org.ovirt.engine.core.bll.UpdateVmCommand.getDbFacade ( ) . getVmNumaNodeDao ( ) . getAllVmNumaNodeByVmId ( org.ovirt.engine.core.bll.UpdateVmCommand.getParameters ( ) . getVmId ( ) ) ) ; } }
Source:
public void getoVirtISOsList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? new java.util.ArrayList < org.ovirt.engine.core.compat.RpmVersion > ( ( ( java.util.ArrayList < org.ovirt.engine.core.compat.RpmVersion > ) ( source ) ) ) : new java.util.ArrayList < org.ovirt.engine.core.compat.RpmVersion > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetoVirtISOs , new org.ovirt.engine.core.common.queries.VdsIdParametersBase ( id ) , aQuery ) ; }

Target:
public void getVmNicList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ) ( source ) ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmInterfacesByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }
Source:
private void RestoreVmFromBaseSnapshot ( org.ovirt.engine.core.common.businessentities.VM vm ) { if ( org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getSnapshotDao ( ) . exists ( vm.getId ( ) , SnapshotType.STATELESS ) ) { log.info ( "Deleting snapshots for stateless vm '{}'" , vm.getId ( ) ) ; org.ovirt.engine.core.common.action.VmOperationParameterBase restoreParams = new org.ovirt.engine.core.common.action.VmOperationParameterBase ( vm.getId ( ) ) ; restoreParams.setTransactionScopeOption ( TransactionScopeOption.RequiresNew ) ; runInternalAction ( VdcActionType.RestoreStatelessVm , restoreParams , org.ovirt.engine.core.bll.DetachUserFromVmFromPoolCommand.getContext ( ) . withCompensationContext ( null ) ) ; } }

Target:
private void restoreVmFromBaseSnapshot ( org.ovirt.engine.core.common.businessentities.VM vm ) { if ( org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getSnapshotDao ( ) . exists ( vm.getId ( ) , SnapshotType.STATELESS ) ) { log.info ( "Deleting snapshots for stateless vm '{}'" , vm.getId ( ) ) ; org.ovirt.engine.core.common.action.VmOperationParameterBase restoreParams = new org.ovirt.engine.core.common.action.VmOperationParameterBase ( vm.getId ( ) ) ; restoreParams.setTransactionScopeOption ( TransactionScopeOption.RequiresNew ) ; runInternalAction ( VdcActionType.RestoreStatelessVm , restoreParams , org.ovirt.engine.core.bll.DetachUserFromVmFromPoolCommand.getContext ( ) . withCompensationContext ( null ) ) ; } }
Source:
protected < T > T performAction ( org.ovirt.engine.core.common.action.VdcActionType task , org.ovirt.engine.core.common.action.VdcActionParametersBase params , java.lang.Class < T > resultType ) { try { return resultType.cast ( doAction ( task , params ) . getActionReturnValue ( ) ) ; } catch ( java.lang.Exception e ) { return handleError ( resultType , e , false ) ; } }

Target:
protected < T > T performAction ( org.ovirt.engine.core.common.action.ActionType task , org.ovirt.engine.core.common.action.ActionParametersBase params , java.lang.Class < T > resultType ) { try { return resultType.cast ( doAction ( task , params ) . getActionReturnValue ( ) ) ; } catch ( java.lang.Exception e ) { return handleError ( resultType , e , false ) ; } }
Source:
public void testValidateNetworkExclusiveOnNicAtMostOneNonVmNetwork ( ) throws java.lang.Exception { checkVmNetworkIsSoleAssignedInterface ( org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) , vlanNetwork , nonVmNetwork1 ) ; }

Target:
public void testValidateNetworkExclusiveOnNicsAllAttachmentsMustHaveNicNameSet ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.NetworkAttachment networkAttachment = new org.ovirt.engine.core.common.businessentities.network.NetworkAttachment ( ) ; networkAttachment.setNetworkId ( vmNetwork1.getId ( ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.network.NetworkAttachment > attachmentsToConfigure = java.util.Collections.singletonList ( networkAttachment ) ; new org.ovirt.engine.core.bll.validator.NetworkAttachmentsValidator ( attachmentsToConfigure , networkMap , networkExclusivenessValidator ) . validateNetworkExclusiveOnNics ( ) ; }
Source:
public 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 ) ; }

Target:
public static void isFloppySupported ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.Integer osId , org.ovirt.engine.core.compat.Version version ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter < java.lang.Boolean > ( ) { @ java.lang.Override public java.lang.Boolean Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Boolean ) ( source ) ) : java.lang.Boolean.FALSE ; } } ; org.ovirt.engine.core.common.queries.OsQueryParameters params = new org.ovirt.engine.core.common.queries.OsQueryParameters ( org.ovirt.engine.core.common.queries.OsQueryParameters.OsRepositoryVerb.GetFloppySupport , osId , version ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.OsRepository , params , aQuery ) ; }
Source:
private static java.util.List < org.ovirt.engine.core.common.businessentities.FenceAgent > cloneAgents ( java.util.List < org.ovirt.engine.core.common.businessentities.FenceAgent > agents ) { if ( ( agents == null ) || ( agents.isEmpty ( ) ) ) { return null ; } else { java.util.List < org.ovirt.engine.core.common.businessentities.FenceAgent > clonedAgents = new java.util.LinkedList < org.ovirt.engine.core.common.businessentities.FenceAgent > ( ) ; for ( org.ovirt.engine.core.common.businessentities.FenceAgent agent : agents ) { clonedAgents.add ( org.ovirt.engine.ui.uicommonweb.Cloner.cloneAgent ( agent ) ) ; } return clonedAgents ; } }

Target:
private static java.util.List < org.ovirt.engine.core.common.businessentities.pm.FenceAgent > cloneAgents ( java.util.List < org.ovirt.engine.core.common.businessentities.pm.FenceAgent > agents ) { if ( ( agents == null ) || ( agents.isEmpty ( ) ) ) { return null ; } else { java.util.List < org.ovirt.engine.core.common.businessentities.pm.FenceAgent > clonedAgents = new java.util.LinkedList < org.ovirt.engine.core.common.businessentities.pm.FenceAgent > ( ) ; for ( org.ovirt.engine.core.common.businessentities.pm.FenceAgent agent : agents ) { clonedAgents.add ( org.ovirt.engine.ui.uicommonweb.Cloner.cloneAgent ( agent ) ) ; } return clonedAgents ; } }
Source:
public org.ovirt.engine.core.common.action.VdcActionParametersBase getParameters ( org.ovirt.engine.api.model.Cluster incoming , org.ovirt.engine.core.common.businessentities.VDSGroup entity ) { return new org.ovirt.engine.core.common.action.ManagementNetworkOnClusterOperationParameters ( map ( incoming , entity ) ) ; }

Target:
public org.ovirt.engine.core.common.action.VdcActionParametersBase getParameters ( org.ovirt.engine.api.model.Cluster incoming , org.ovirt.engine.core.common.businessentities.VDSGroup entity ) { final org.ovirt.engine.core.common.businessentities.VDSGroup cluster = map ( incoming , entity ) ; final org.ovirt.engine.core.common.action.ManagementNetworkOnClusterOperationParameters managementNetworkOnClusterOperationParameters ; final org.ovirt.engine.core.compat.Guid dcId = getDataCenterId ( cluster ) ; if ( dcId == null ) { managementNetworkOnClusterOperationParameters = new org.ovirt.engine.core.common.action.ManagementNetworkOnClusterOperationParameters ( cluster ) ; } else { final org.ovirt.engine.core.compat.Guid managementNetworkId = managementNetworkFinder.getManagementNetworkId ( incoming , dcId ) ; managementNetworkOnClusterOperationParameters = new org.ovirt.engine.core.common.action.ManagementNetworkOnClusterOperationParameters ( cluster , managementNetworkId ) ; } return managementNetworkOnClusterOperationParameters ; }
Source:
private void updateCanSpecify ( ) { boolean isChangable = ( bootProtocolsAvailable ) && ( getIsStaticAddress ( ) ) ; getAddress ( ) . setIsChangable ( isChangable ) ; getSubnet ( ) . setIsChangable ( isChangable ) ; getGateway ( ) . setIsChangable ( isChangable ) ; }

Target:
private void updateCanSpecify ( ) { boolean isChangable = ( bootProtocolsAvailable ) && ( getIsStaticAddress ( ) ) ; getAddress ( ) . setChangeProhibitionReason ( ( isChangable && ( ! ( staticIpChangeAllowed ) ) ? org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getConstants ( ) . staticIpAddressSameAsHostname ( ) : null ) ) ; getAddress ( ) . setIsChangable ( ( isChangable && ( staticIpChangeAllowed ) ) ) ; getSubnet ( ) . setIsChangable ( isChangable ) ; getGateway ( ) . setIsChangable ( isChangable ) ; }
Source:
public void countAllTemplates ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmTemplateCount , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }

Target:
public void getStorageDomainById ( 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 ? ( ( org.ovirt.engine.core.common.businessentities.StorageDomain ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageDomainById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( storageDomainId ) , aQuery ) ; }
Source:
private void internalEndWithFailure ( ) { log.errorFormat ( "Ending command with failure: {0}" , getClass ( ) . getName ( ) ) ; if ( hasTaskHandlers ( ) ) { getCurrentTaskHandler ( ) . endWithFailure ( ) ; revertPreviousHandlers ( ) ; startPollingAsyncTasks ( ) ; } else { endWithFailure ( ) ; } rollbackQuota ( ) ; }

Target:
private void internalEndWithFailure ( ) { log.errorFormat ( "Ending command with failure: {0}" , getClass ( ) . getName ( ) ) ; if ( hasTaskHandlers ( ) ) { if ( hasStepsToRevert ( ) ) { getCurrentTaskHandler ( ) . endWithFailure ( ) ; revertPreviousHandlers ( ) ; } startPollingAsyncTasks ( ) ; } else { endWithFailure ( ) ; } rollbackQuota ( ) ; }
Source:
private org.ovirt.engine.core.common.queries.VdcQueryType initQueryType ( ) { try { java.lang.String name = getClass ( ) . getSimpleName ( ) ; name = name.substring ( 0 , ( ( name.length ( ) ) - ( org.ovirt.engine.core.bll.QueriesCommandBase.QuerySuffix.length ( ) ) ) ) ; return org.ovirt.engine.core.common.queries.VdcQueryType.valueOf ( name ) ; } catch ( java.lang.Exception e ) { return org.ovirt.engine.core.common.queries.VdcQueryType.Unknown ; } }

Target:
private org.ovirt.engine.core.common.queries.QueryType initQueryType ( ) { try { java.lang.String name = getClass ( ) . getSimpleName ( ) ; name = name.substring ( 0 , ( ( name.length ( ) ) - ( org.ovirt.engine.core.bll.QueriesCommandBase.QuerySuffix.length ( ) ) ) ) ; return org.ovirt.engine.core.common.queries.QueryType.valueOf ( name ) ; } catch ( java.lang.Exception e ) { return org.ovirt.engine.core.common.queries.QueryType.Unknown ; } }
Source:
protected final < T > javax.ws.rs.core.Response performCreate ( org.ovirt.engine.core.common.action.VdcActionType task , org.ovirt.engine.core.common.action.VdcActionParametersBase taskParams , org.ovirt.engine.api.restapi.resource.IResolver < T , Q > entityResolver , java.lang.Class < ? extends org.ovirt.engine.api.model.BaseResource > suggestedParentType ) { return performCreate ( task , taskParams , entityResolver , expectBlocking ( ) , suggestedParentType ) ; }

Target:
protected final < T > javax.ws.rs.core.Response performCreate ( org.ovirt.engine.core.common.action.ActionType task , org.ovirt.engine.core.common.action.VdcActionParametersBase taskParams , org.ovirt.engine.api.restapi.resource.IResolver < T , Q > entityResolver , java.lang.Class < ? extends org.ovirt.engine.api.model.BaseResource > suggestedParentType ) { return performCreate ( task , taskParams , entityResolver , expectBlocking ( ) , suggestedParentType ) ; }
Source:
public org.ovirt.engine.core.common.eventqueue.EventResult call ( ) { return org.ovirt.engine.core.vdsbroker.ResourceManager.getInstance ( ) . getEventListener ( ) . masterDomainNotOperational ( masterDomainId , getParameters ( ) . getStoragePoolId ( ) , true , ( ( ( getVDSReturnValue ( ) . getVdsError ( ) ) != null ) && ( ( getVDSReturnValue ( ) . getVdsError ( ) . getCode ( ) ) == ( org.ovirt.engine.core.common.errors.VdcBllErrors.StoragePoolWrongMaster ) ) ) ) ; }

Target:
public org.ovirt.engine.core.common.eventqueue.EventResult call ( ) { return org.ovirt.engine.core.vdsbroker.ResourceManager.getInstance ( ) . getEventListener ( ) . masterDomainNotOperational ( masterDomainId , getParameters ( ) . getStoragePoolId ( ) , true , ( ( ( getVDSReturnValue ( ) . getVdsError ( ) ) != null ) && ( ( getVDSReturnValue ( ) . getVdsError ( ) . getCode ( ) ) == ( org.ovirt.engine.core.common.errors.EngineError.StoragePoolWrongMaster ) ) ) ) ; }
Source:
protected void expectGetConnections ( org.ovirt.engine.core.dao.StorageServerConnectionDAO dao ) { for ( int i = 0 ; i < ( org.ovirt.engine.core.bll.GetLunsByVgIdTest.GUIDS.length ) ; i ++ ) { org.mockito.Mockito.when ( dao.get ( org.ovirt.engine.core.bll.GetLunsByVgIdTest.GUIDS [ i ] . toString ( ) ) ) . thenReturn ( setUpConnection ( i ) ) ; } }

Target:
protected void expectGetConnections ( org.ovirt.engine.core.dao.StorageServerConnectionDao dao ) { for ( int i = 0 ; i < ( org.ovirt.engine.core.bll.GetLunsByVgIdTest.GUIDS.length ) ; i ++ ) { org.mockito.Mockito.when ( dao.get ( org.ovirt.engine.core.bll.GetLunsByVgIdTest.GUIDS [ i ] . toString ( ) ) ) . thenReturn ( setUpConnection ( i ) ) ; } }
Source:
public void testGetAllForStoragePoolOfStorageType ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomainStatic > result = dao.getAllForStoragePoolOfStorageType ( StorageType.ISCSI , org.ovirt.engine.core.dao.StorageDomainStaticDAOTest.EXISTING_POOL_ID ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertFalse ( result.isEmpty ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.StorageDomainStatic domain : result ) { org.junit.Assert.assertEquals ( StorageType.ISCSI , domain.getstorage_type ( ) ) ; } }

Target:
public void testGetAllForStoragePoolOfStorageType ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomainStatic > result = dao.getAllForStoragePoolOfStorageType ( StorageType.ISCSI , org.ovirt.engine.core.dao.StorageDomainStaticDAOTest.EXISTING_POOL_ID ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertFalse ( result.isEmpty ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.StorageDomainStatic domain : result ) { org.junit.Assert.assertEquals ( StorageType.ISCSI , domain.getStorageType ( ) ) ; } }
Source:
private org.ovirt.engine.core.common.vdscommands.VDSReturnValue executeVerb ( org.ovirt.engine.core.common.businessentities.StorageDomainStatic storage ) { try { return runVdsCommand ( VDSCommandType.GetVmsInfo , buildGetVmsInfoParameters ( storage ) ) ; } catch ( java.lang.RuntimeException e ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogable logable = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableImpl ( ) ; logable.addCustomValue ( "StorageDomainName" , storage.getStorageName ( ) ) ; auditLogDirector.log ( logable , AuditLogType.IMPORTEXPORT_GET_VMS_INFO_FAILED ) ; throw e ; } }

Target:
private org.ovirt.engine.core.common.vdscommands.VDSReturnValue executeVerb ( org.ovirt.engine.core.common.businessentities.StorageDomainStatic storage ) { try { return runVdsCommand ( VDSCommandType.GetVmsInfo , buildGetVmsInfoParameters ( storage ) ) ; } catch ( java.lang.RuntimeException e ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogable logable = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableImpl ( ) ; logable.setStorageDomainId ( storage.getId ( ) ) ; logable.setStorageDomainName ( storage.getName ( ) ) ; auditLogDirector.log ( logable , AuditLogType.IMPORTEXPORT_GET_VMS_INFO_FAILED ) ; throw e ; } }
Source:
private void updateDeviceIsPluggedProperty ( ) { org.ovirt.engine.core.common.businessentities.VmDevice device = org.ovirt.engine.core.bll.HotPlugDiskToVmCommand.getVmDeviceDao ( ) . get ( oldVmDevice.getId ( ) ) ; device.setIsPlugged ( ( ! ( oldVmDevice.getIsPlugged ( ) ) ) ) ; org.ovirt.engine.core.bll.HotPlugDiskToVmCommand.getVmDeviceDao ( ) . updateHotPlugDisk ( device ) ; }

Target:
protected void updateDeviceProperties ( ) { org.ovirt.engine.core.common.businessentities.VmDevice device = org.ovirt.engine.core.bll.HotPlugDiskToVmCommand.getVmDeviceDao ( ) . get ( oldVmDevice.getId ( ) ) ; device.setIsPlugged ( true ) ; org.ovirt.engine.core.bll.HotPlugDiskToVmCommand.getVmDeviceDao ( ) . updateHotPlugDisk ( device ) ; }
Source:
private void handleError ( org.ovirt.engine.core.common.vdscommands.VDSFenceReturnValue result ) { if ( ! ( result.isProxyHostFound ( ) ) ) { org.ovirt.engine.core.bll.GetFenceAgentStatusQuery.getQueryReturnValue ( ) . setSucceeded ( false ) ; org.ovirt.engine.core.bll.GetFenceAgentStatusQuery.getQueryReturnValue ( ) . setReturnValue ( new org.ovirt.engine.core.common.businessentities.FenceStatusReturnValue ( org.ovirt.engine.core.bll.GetFenceAgentStatusQuery.UNKNOWN , org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.getMessage ( AuditLogType.VDS_ALERT_FENCE_NO_PROXY_HOST ) ) ) ; } else { org.ovirt.engine.core.bll.GetFenceAgentStatusQuery.getQueryReturnValue ( ) . setSucceeded ( false ) ; org.ovirt.engine.core.bll.GetFenceAgentStatusQuery.getQueryReturnValue ( ) . setReturnValue ( new org.ovirt.engine.core.common.businessentities.FenceStatusReturnValue ( org.ovirt.engine.core.bll.GetFenceAgentStatusQuery.UNKNOWN , org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.getMessage ( AuditLogType.VDS_ALERT_FENCE_STATUS_VERIFICATION_FAILED ) ) ) ; } }

Target:
protected void executeQueryCommand ( ) { org.ovirt.engine.core.bll.pm.HostFenceActionExecutor executor = new org.ovirt.engine.core.bll.pm.HostFenceActionExecutor ( getHost ( ) ) ; org.ovirt.engine.core.common.businessentities.pm.FenceOperationResult result = executor.getFenceAgentStatus ( org.ovirt.engine.core.bll.GetFenceAgentStatusQuery.getParameters ( ) . getAgent ( ) ) ; org.ovirt.engine.core.bll.GetFenceAgentStatusQuery.getQueryReturnValue ( ) . setSucceeded ( ( ( result.getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.pm.FenceOperationResult.Status.SUCCESS ) ) ) ; org.ovirt.engine.core.bll.GetFenceAgentStatusQuery.getQueryReturnValue ( ) . setReturnValue ( result ) ; }
Source:
private boolean isCreateSnapshotAvailable ( java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity > list ) { return ( ( list.size ( ) ) == 1 ) && ( ( list.get ( 0 ) . getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.gluster.GlusterStatus.UP ) ) ; }

Target:
private boolean isCreateSnapshotAvailable ( org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity volume ) { if ( ( volume.getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.gluster.GlusterStatus.UP ) ) { java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity > bricks = volume.getBricks ( ) ; for ( org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity brick : bricks ) { if ( ( brick.getStatus ( ) ) != ( org.ovirt.engine.core.common.businessentities.gluster.GlusterStatus.UP ) ) { return false ; } } return true ; } else { return false ; } }
Source:
public void processResponse ( org.ovirt.vdsm.jsonrpc.client.JsonRpcResponse response ) { org.ovirt.vdsm.jsonrpc.client.internal.JsonRpcCall call = this . tracker.removeCall ( response.getId ( ) ) ; if ( call == null ) { return ; } call.addResponse ( response ) ; }

Target:
public void processResponse ( org.ovirt.vdsm.jsonrpc.client.JsonRpcResponse response ) { org.codehaus.jackson.JsonNode id = response.getId ( ) ; if ( org.codehaus.jackson.node.NullNode.class . isInstance ( id ) ) { this . tracker.processIssue ( response ) ; } org.ovirt.vdsm.jsonrpc.client.internal.JsonRpcCall call = this . tracker.removeCall ( response.getId ( ) ) ; if ( call == null ) { return ; } call.addResponse ( response ) ; }
Source:
protected boolean validateUsbPolicy ( ) { org.ovirt.engine.core.common.businessentities.VM vm = org.ovirt.engine.core.bll.ImportVmCommandBase.getParameters ( ) . getVm ( ) ; org.ovirt.engine.core.bll.VmHandler.updateImportedVmUsbPolicy ( vm.getStaticData ( ) ) ; return org.ovirt.engine.core.bll.VmHandler.isUsbPolicyLegal ( vm.getUsbPolicy ( ) , vm.getOs ( ) , org.ovirt.engine.core.bll.ImportVmCommandBase.getVdsGroup ( ) , org.ovirt.engine.core.bll.ImportVmCommandBase.getReturnValue ( ) . getCanDoActionMessages ( ) ) ; }

Target:
protected boolean validateUsbPolicy ( ) { org.ovirt.engine.core.common.businessentities.VM vm = org.ovirt.engine.core.bll.ImportVmCommandBase.getParameters ( ) . getVm ( ) ; org.ovirt.engine.core.bll.VmHandler.updateImportedVmUsbPolicy ( vm.getStaticData ( ) ) ; return org.ovirt.engine.core.bll.VmHandler.isUsbPolicyLegal ( vm.getUsbPolicy ( ) , vm.getOs ( ) , getEffectiveCompatibilityVersion ( ) , org.ovirt.engine.core.bll.ImportVmCommandBase.getReturnValue ( ) . getCanDoActionMessages ( ) ) ; }
Source:
protected java.util.List < org.ovirt.engine.core.common.businessentities.VM > getPrivilegedQueryReturnValue ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VM > vmList = org.ovirt.engine.core.bll.GetUserVmsByUserIdAndGroupsQuery.getDbFacade ( ) . getVmDAO ( ) . getAllForUserWithGroupsAndUserRoles ( org.ovirt.engine.core.bll.GetUserVmsByUserIdAndGroupsQuery.getParameters ( ) . getUserId ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.VM vm : vmList ) { updateVmGuestAgentVersion ( vm ) ; if ( org.ovirt.engine.core.bll.GetUserVmsByUserIdAndGroupsQuery.getParameters ( ) . getIncludeDiskData ( ) ) { updateDisksFromDB ( vm ) ; java.util.Collections.sort ( vm.getDiskList ( ) , new org.ovirt.engine.core.common.businessentities.ImagesComparerByName ( ) ) ; fillImagesBySnapshots ( vm ) ; } } return vmList ; }

Target:
protected java.util.List < org.ovirt.engine.core.common.businessentities.VM > getPrivilegedQueryReturnValue ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VM > vmList = org.ovirt.engine.core.bll.GetUserVmsByUserIdAndGroupsQuery.getDbFacade ( ) . getVmDao ( ) . getAllForUserWithGroupsAndUserRoles ( org.ovirt.engine.core.bll.GetUserVmsByUserIdAndGroupsQuery.getParameters ( ) . getUserId ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.VM vm : vmList ) { updateVmGuestAgentVersion ( vm ) ; if ( org.ovirt.engine.core.bll.GetUserVmsByUserIdAndGroupsQuery.getParameters ( ) . getIncludeDiskData ( ) ) { updateDisksFromDB ( vm ) ; java.util.Collections.sort ( vm.getDiskList ( ) , new org.ovirt.engine.core.common.businessentities.ImagesComparerByName ( ) ) ; fillImagesBySnapshots ( vm ) ; } } return vmList ; }
Source:
private void doTestBadRemove ( boolean canDo , boolean success , java.lang.String detail ) throws java.lang.Exception { setUriInfo ( setUpActionExpectations ( VdcActionType.UnlabelNetwork , org.ovirt.engine.core.common.action.UnlabelNetworkParameters.class , new java.lang.String [ ] { "NetworkId" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendNetworkLabelResourceTest.NETWORK_ID } , canDo , success ) ) ; try { resource.remove ( ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , detail ) ; } }

Target:
private void doTestBadRemove ( boolean valid , boolean success , java.lang.String detail ) throws java.lang.Exception { setUriInfo ( setUpActionExpectations ( VdcActionType.UnlabelNetwork , org.ovirt.engine.core.common.action.UnlabelNetworkParameters.class , new java.lang.String [ ] { "NetworkId" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendNetworkLabelResourceTest.NETWORK_ID } , valid , success ) ) ; try { resource.remove ( ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , detail ) ; } }
Source:
protected void setGetVmQueryExpectations ( int times ) throws java.lang.Exception { while ( ( times -- ) > 0 ) { org.ovirt.engine.core.common.businessentities.VM vm = new org.ovirt.engine.core.common.businessentities.VM ( ) ; vm.setvds_group_id ( GUIDS [ 0 ] ) ; setUpEntityQueryExpectations ( VdcQueryType.GetVmByVmId , org.ovirt.engine.core.common.queries.GetVmByVmIdParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { PARENT_ID } , vm ) ; } }

Target:
protected void setGetVmQueryExpectations ( int times ) throws java.lang.Exception { while ( ( times -- ) > 0 ) { org.ovirt.engine.core.common.businessentities.VM vm = new org.ovirt.engine.core.common.businessentities.VM ( ) ; vm.setVdsGroupId ( GUIDS [ 0 ] ) ; setUpEntityQueryExpectations ( VdcQueryType.GetVmByVmId , org.ovirt.engine.core.common.queries.GetVmByVmIdParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { PARENT_ID } , vm ) ; } }
Source:
private java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > prepareSetupNetworksParameters ( ) { java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > parameters = syncNetworkParametersBuilder.buildParameters ( org.ovirt.engine.core.bll.network.dc.UpdateNetworkCommand.getNetwork ( ) , getOldNetwork ( ) ) ; setParentCommandInfo ( parameters ) ; org.ovirt.engine.core.bll.network.HostSetupNetworksParametersBuilder.updateParametersSequencing ( parameters ) ; return parameters ; }

Target:
private void applyNetworkChangesToHosts ( ) { java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > parameters = syncNetworkParametersBuilder.buildParameters ( org.ovirt.engine.core.bll.network.dc.UpdateNetworkCommand.getNetwork ( ) , getOldNetwork ( ) ) ; if ( ! ( parameters.isEmpty ( ) ) ) { org.ovirt.engine.core.bll.network.HostSetupNetworksParametersBuilder.updateParametersSequencing ( parameters ) ; runInternalMultipleActions ( VdcActionType.PersistentHostSetupNetworks , parameters ) ; } }
Source:
public void edit ( final org.ovirt.engine.ui.uicommonweb.models.vms.key_value.KeyValueLineModel object ) { updateKeyTitle ( object ) ; object.getKeys ( ) . getSelectedItemChangedEvent ( ) . addListener ( new org.ovirt.engine.ui.uicompat.IEventListener < org.ovirt.engine.ui.uicompat.EventArgs > ( ) { @ java.lang.Override public void eventRaised ( org.ovirt.engine.ui.uicompat.Event < ? extends org.ovirt.engine.ui.uicompat.EventArgs > ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { com.google.gwt.event.logical.shared.ValueChangeEvent.fire ( org.ovirt.engine.ui.common.widget.form.key_value.KeyValueLineWidget.this , object ) ; updateKeyTitle ( object ) ; } } ) ; driver.edit ( object ) ; }

Target:
protected void init ( ) { driver.initialize ( this ) ; hideLabels ( ) ; }
Source:
protected void executeCommand ( ) { if ( ( ( org.ovirt.engine.core.bll.RemoveVmPoolCommand.getVmPoolId ( ) ) != null ) && ( org.ovirt.engine.core.bll.RemoveVmPoolCommand.canRemoveVmPoolWithoutReasons ( org.ovirt.engine.core.bll.RemoveVmPoolCommand.getVmPoolId ( ) ) ) ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmPoolDao ( ) . remove ( org.ovirt.engine.core.bll.RemoveVmPoolCommand.getVmPoolId ( ) ) ; org.ovirt.engine.core.bll.RemoveVmPoolCommand.setSucceeded ( true ) ; } }

Target:
private boolean removeVmPool ( ) { if ( ( ( org.ovirt.engine.core.bll.RemoveVmPoolCommand.getVmPoolId ( ) ) != null ) && ( org.ovirt.engine.core.bll.RemoveVmPoolCommand.canRemoveVmPool ( org.ovirt.engine.core.bll.RemoveVmPoolCommand.getVmPoolId ( ) ) ) ) { org.ovirt.engine.core.bll.RemoveVmPoolCommand.getVmPoolDao ( ) . remove ( org.ovirt.engine.core.bll.RemoveVmPoolCommand.getVmPoolId ( ) ) ; return true ; } else { if ( ( org.ovirt.engine.core.bll.RemoveVmPoolCommand.getVmPoolId ( ) ) == null ) { org.ovirt.engine.core.bll.RemoveVmPoolCommand.log.error ( "Failed to remove VM Pool: VM Pool ID is null" ) ; } else { org.ovirt.engine.core.bll.RemoveVmPoolCommand.log.error ( "Failed to remove VM Pool '{}': there are still VMs in the Pool" , org.ovirt.engine.core.bll.RemoveVmPoolCommand.getVmPoolName ( ) ) ; } return false ; } }
Source:
protected org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel createModel ( org.ovirt.engine.ui.uicommonweb.models.vms.VmModelBehaviorBase behavior ) { final org.ovirt.engine.core.common.businessentities.VDSGroup cluster = new org.ovirt.engine.core.common.businessentities.VDSGroup ( ) ; cluster.setCompatibilityVersion ( org.ovirt.engine.ui.uicommonweb.models.vms.CLUSTER_VERSION ) ; org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel model = new org.ovirt.engine.ui.uicommonweb.models.pools.PoolModel ( behavior ) { @ java.lang.Override public org.ovirt.engine.core.common.businessentities.VDSGroup getSelectedCluster ( ) { return cluster ; } } ; mockAsyncDataProvider ( model ) ; return model ; }

Target:
protected org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel createModel ( org.ovirt.engine.ui.uicommonweb.models.vms.VmModelBehaviorBase behavior ) { final org.ovirt.engine.core.common.businessentities.Cluster cluster = new org.ovirt.engine.core.common.businessentities.Cluster ( ) ; cluster.setCompatibilityVersion ( org.ovirt.engine.ui.uicommonweb.models.vms.CLUSTER_VERSION ) ; org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel model = new org.ovirt.engine.ui.uicommonweb.models.pools.PoolModel ( behavior ) { @ java.lang.Override public org.ovirt.engine.core.common.businessentities.Cluster getSelectedCluster ( ) { return cluster ; } } ; mockAsyncDataProvider ( model ) ; return model ; }
Source:
private void mockGraphicsDevices ( org.ovirt.engine.core.compat.Guid vmId ) { org.ovirt.engine.core.common.businessentities.VmDevice graphicsDevice = new org.ovirt.engine.core.common.businessentities.GraphicsDevice ( org.ovirt.engine.core.common.utils.VmDeviceType.SPICE ) ; graphicsDevice.setDeviceId ( Guid.Empty ) ; graphicsDevice.setVmId ( vmId ) ; org.mockito.Mockito.when ( deviceDao.getVmDeviceByVmIdAndType ( vmId , VmDeviceGeneralType.GRAPHICS ) ) . thenReturn ( java.util.Arrays.asList ( graphicsDevice ) ) ; org.mockito.Mockito.doReturn ( deviceDao ) . when ( dbFacade ) . getVmDeviceDao ( ) ; }

Target:
private void mockGraphicsDevices ( org.ovirt.engine.core.compat.Guid vmId ) { org.ovirt.engine.core.common.businessentities.VmDevice graphicsDevice = new org.ovirt.engine.core.common.businessentities.GraphicsDevice ( org.ovirt.engine.core.common.utils.VmDeviceType.SPICE ) ; graphicsDevice.setDeviceId ( Guid.Empty ) ; graphicsDevice.setVmId ( vmId ) ; org.mockito.Mockito.when ( deviceDao.getVmDeviceByVmIdAndType ( vmId , VmDeviceGeneralType.GRAPHICS ) ) . thenReturn ( java.util.Collections.singletonList ( graphicsDevice ) ) ; org.mockito.Mockito.doReturn ( deviceDao ) . when ( dbFacade ) . getVmDeviceDao ( ) ; }
Source:
public java.util.Map shutdown ( java.lang.String vmId , java.lang.String timeout , java.lang.String message ) { final java.util.Map resultMap = getStatusMap ( "Machine shut down" , 0 ) ; final org.ovirt.vdsmfake.domain.VM vm = getActiveHost ( ) . getRunningVMs ( ) . get ( vmId ) ; if ( vm != null ) { vm.setStatus ( VM.VMStatus.PoweringDown ) ; } org.ovirt.vdsmfake.task.TaskProcessor.getInstance ( ) . addTask ( new org.ovirt.vdsmfake.task.TaskRequest ( org.ovirt.vdsmfake.task.TaskType.SHUTDOWN_VM , 5000L , vm ) ) ; return resultMap ; }

Target:
public java.util.Map shutdown ( java.lang.String vmId , java.lang.String timeout , java.lang.String message ) { final java.util.Map resultMap = getStatusMap ( "Machine shut down" , 0 ) ; final org.ovirt.vdsmfake.domain.VM vm = getActiveHost ( ) . getRunningVMs ( ) . get ( vmId ) ; if ( vm != null ) { vm.setStatus ( VM.VMStatus.PoweringDown ) ; } addTask ( TaskType.SHUTDOWN_VM , 5000L , vm ) ; return resultMap ; }
Source:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event < ? extends org.ovirt.engine.ui.uicompat.EventArgs > ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { super . eventRaised ( ev , sender , args ) ; if ( ev.matchesDefinition ( RegistrationResult.RetrievedEventDefinition ) ) { asyncResult_Retrieved ( ) ; } if ( ev.matchesDefinition ( ProvideTickEvent.definition ) ) { syncSearch ( ) ; } }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event < ? extends org.ovirt.engine.ui.uicompat.EventArgs > ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { super . eventRaised ( ev , sender , args ) ; entityModel.eventRaised ( ev , sender , args ) ; if ( ev.matchesDefinition ( RegistrationResult.RetrievedEventDefinition ) ) { asyncResult_Retrieved ( ) ; } if ( ev.matchesDefinition ( ProvideTickEvent.definition ) ) { syncSearch ( ) ; } }