auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private void removeEntityLeftOver ( org.ovirt.engine.core.compat.Guid entityId , java.lang.String entityName , org.ovirt.engine.core.compat.Guid storageDomainId ) { org.ovirt.engine.core.common.businessentities.OvfEntityData ovfEntityData = getUnregisteredOVFDataDao ( ) . getByEntityIdAndStorageDomain ( entityId , storageDomainId ) ; if ( ovfEntityData != null ) { log.infoFormat ( "Entity {0} with id {1}, already exists as unregistered entity. override it with the new entity from the engine" , entityName , entityId ) ; getUnregisteredOVFDataDao ( ) . removeEntity ( entityId , storageDomainId ) ; } }

Target:
private void removeEntityLeftOver ( org.ovirt.engine.core.compat.Guid entityId , java.lang.String entityName , org.ovirt.engine.core.compat.Guid storageDomainId ) { java.util.List < org.ovirt.engine.core.common.businessentities.OvfEntityData > ovfEntityList = getUnregisteredOVFDataDao ( ) . getByEntityIdAndStorageDomain ( entityId , storageDomainId ) ; if ( ! ( ovfEntityList.isEmpty ( ) ) ) { log.infoFormat ( "Entity {0} with id {1}, already exists as unregistered entity. override it with the new entity from the engine" , entityName , entityId ) ; getUnregisteredOVFDataDao ( ) . removeEntity ( entityId , storageDomainId ) ; } }
Source:
public void validateWrongDiskImageTypeTemplate ( ) throws java.lang.Exception { initializeCommand ( ImageOperation.Move , new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ) ; initTemplateDiskImage ( ) ; org.junit.Assert.assertFalse ( command.validate ( ) ) ; org.junit.Assert.assertTrue ( command.getReturnValue ( ) . getValidationMessages ( ) . contains ( EngineMessage.ACTION_TYPE_FAILED_DISK_IS_NOT_VM_DISK.toString ( ) ) ) ; }

Target:
public void validateImageNotFound ( ) throws java.lang.Exception { initializeCommand ( new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ) ; org.junit.Assert.assertFalse ( command.validate ( ) ) ; org.junit.Assert.assertTrue ( command.getReturnValue ( ) . getValidationMessages ( ) . contains ( EngineMessage.ACTION_TYPE_FAILED_DISK_NOT_EXIST.toString ( ) ) ) ; }
Source:
public void testSaveOrUpdateNew ( ) { int sizeBeforeSave = dao.getAll ( ) . size ( ) ; dao.saveOrUpdate ( newUser ) ; org.ovirt.engine.core.common.businessentities.DbUser result = dao.getByUsernameAndDomain ( newUser.getLoginName ( ) , newUser.getDomain ( ) ) ; int sizeAfterSave = dao.getAll ( ) . size ( ) ; org.junit.Assert.assertEquals ( newUser , result ) ; org.junit.Assert.assertEquals ( 1 , ( sizeAfterSave - sizeBeforeSave ) ) ; }

Target:
public void testSaveOrUpdateNew ( ) { int sizeBeforeSave = dao.getAll ( ) . size ( ) ; dao.saveOrUpdate ( newUser ) ; org.ovirt.engine.core.common.businessentities.aaa.DbUser result = dao.getByUsernameAndDomain ( newUser.getLoginName ( ) , newUser.getDomain ( ) ) ; int sizeAfterSave = dao.getAll ( ) . size ( ) ; org.junit.Assert.assertEquals ( newUser , result ) ; org.junit.Assert.assertEquals ( 1 , ( sizeAfterSave - sizeBeforeSave ) ) ; }
Source:
public org.ovirt.vdsm.jsonrpc.client.reactors.ReactorClient call ( ) throws java.lang.Exception { org.ovirt.vdsm.jsonrpc.client.reactors.ReactorClient client = reactorForClient.createClient ( org.ovirt.vdsm.jsonrpc.client.reactors.TestReactor.HOSTNAME , 6668 ) ; client.addEventListener ( new org.ovirt.vdsm.jsonrpc.client.reactors.ReactorClient.MessageListener ( ) { @ java.lang.Override public void onMessageReceived ( byte [ ] message ) { queue.add ( message ) ; } } ) ; client.setRetryPolicy ( new org.ovirt.vdsm.jsonrpc.client.utils.retry.RetryPolicy ( 2000 , 10 , 10000 , java.io.IOException.class ) ) ; client.connect ( ) ; return client ; }

Target:
public org.ovirt.vdsm.jsonrpc.client.reactors.ReactorClient call ( ) throws java.lang.Exception { org.ovirt.vdsm.jsonrpc.client.reactors.ReactorClient client = reactorForClient.createClient ( org.ovirt.vdsm.jsonrpc.client.reactors.TestReactor.HOSTNAME , 6668 ) ; client.addEventListener ( new org.ovirt.vdsm.jsonrpc.client.reactors.ReactorClient.MessageListener ( ) { @ java.lang.Override public void onMessageReceived ( byte [ ] message ) { queue.add ( message ) ; } } ) ; client.setClientPolicy ( new org.ovirt.vdsm.jsonrpc.client.internal.ClientPolicy ( 2000 , 10 , 10000 , java.io.IOException.class ) ) ; client.connect ( ) ; return client ; }
Source:
public void checkCidrCidrIsNotANetworkAddress ( ) { org.mockito.Mockito.doReturn ( true ) . when ( mockedCidrValidator ) . isCidrFormatValid ( org.ovirt.engine.ui.uicommonweb.validation.CidrValidationTest.CIDR ) ; org.mockito.Mockito.doReturn ( false ) . when ( mockedCidrValidator ) . isCidrNetworkAddressValid ( org.ovirt.engine.ui.uicommonweb.validation.CidrValidationTest.CIDR ) ; org.ovirt.engine.ui.uicommonweb.validation.ValidationResult actualResult = underTest.validate ( org.ovirt.engine.ui.uicommonweb.validation.CidrValidationTest.CIDR ) ; org.ovirt.engine.ui.uicommonweb.validation.ValidationResult expectedResult = new org.ovirt.engine.ui.uicommonweb.validation.ValidationResult ( false , java.util.Arrays.asList ( org.ovirt.engine.ui.uicommonweb.validation.CidrValidationTest.CIDR_IS_NOT_A_NETWORK_ADDRESS ) ) ; org.junit.Assert.assertEquals ( expectedResult , actualResult ) ; }

Target:
public void checkCidrCidrIsNotANetworkAddress ( ) { org.mockito.Mockito.doReturn ( true ) . when ( mockedCidrValidator ) . isCidrFormatValid ( org.ovirt.engine.ui.uicommonweb.validation.CidrValidationTest.CIDR ) ; org.mockito.Mockito.doReturn ( false ) . when ( mockedCidrValidator ) . isCidrNetworkAddressValid ( org.ovirt.engine.ui.uicommonweb.validation.CidrValidationTest.CIDR ) ; org.ovirt.engine.ui.uicommonweb.validation.ValidationResult actualResult = underTest.validate ( org.ovirt.engine.ui.uicommonweb.validation.CidrValidationTest.CIDR ) ; org.ovirt.engine.ui.uicommonweb.validation.ValidationResult expectedResult = new org.ovirt.engine.ui.uicommonweb.validation.ValidationResult ( false , java.util.Collections.singletonList ( org.ovirt.engine.ui.uicommonweb.validation.CidrValidationTest.CIDR_IS_NOT_A_NETWORK_ADDRESS ) ) ; org.junit.Assert.assertEquals ( expectedResult , actualResult ) ; }
Source:
public static java.lang.String cdPathWindowsToLinux ( java.lang.String windowsPath , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.compat.Guid vdsId ) { if ( org.apache.commons.lang.StringUtils.isEmpty ( windowsPath ) ) { return windowsPath ; } return org.ovirt.engine.core.bll.ImagesHandler.cdPathWindowsToLinux ( windowsPath , ( ( java.lang.String ) ( org.ovirt.engine.core.bll.Backend.getInstance ( ) . getResourceManager ( ) . RunVdsCommand ( VDSCommandType.IsoPrefix , new org.ovirt.engine.core.common.vdscommands.VdsAndPoolIDVDSParametersBase ( vdsId , storagePoolId ) ) . getReturnValue ( ) ) ) ) ; }

Target:
public static java.lang.String cdPathWindowsToLinux ( java.lang.String windowsPath , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.compat.Guid vdsId ) { if ( org.apache.commons.lang.StringUtils.isEmpty ( windowsPath ) ) { return "" ; } return org.ovirt.engine.core.bll.ImagesHandler.cdPathWindowsToLinux ( windowsPath , ( ( java.lang.String ) ( org.ovirt.engine.core.bll.Backend.getInstance ( ) . getResourceManager ( ) . RunVdsCommand ( VDSCommandType.IsoPrefix , new org.ovirt.engine.core.common.vdscommands.VdsAndPoolIDVDSParametersBase ( vdsId , storagePoolId ) ) . getReturnValue ( ) ) ) ) ; }
Source:
public void testValidNetworkFilterIdUseDefaultWithFilterId ( ) { initVnicProfileNetworkFilterId ( org.ovirt.engine.core.bll.validator.VnicProfileValidatorTest.VALID_NETWORK_FILTER_ID , org.ovirt.engine.core.bll.validator.VnicProfileValidatorTest.DEFAULT_VNIC_PROFILE_NAME ) ; org.junit.Assert.assertThat ( validator.validUseDefaultNetworkFilterFlag ( true ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.ACTION_TYPE_FAILED_INVALID_VNIC_PROFILE_NETWORK_ID_CONFIGURATION , org.ovirt.engine.core.utils.ReplacementUtils.createSetVariableString ( VnicProfileValidator.VAR_VNIC_PROFILE_NAME , org.ovirt.engine.core.bll.validator.VnicProfileValidatorTest.DEFAULT_VNIC_PROFILE_NAME ) , org.ovirt.engine.core.utils.ReplacementUtils.createSetVariableString ( VnicProfileValidator.VAR_NETWORK_FILTER_ID , org.ovirt.engine.core.bll.validator.VnicProfileValidatorTest.VALID_NETWORK_FILTER_ID ) ) ) ; }

Target:
public void testValidNetworkFilterIdUseDefaultWithFilterId ( ) { initVnicProfileNetworkFilterId ( org.ovirt.engine.core.bll.validator.VnicProfileValidatorTest.VALID_NETWORK_FILTER_ID , org.ovirt.engine.core.bll.validator.VnicProfileValidatorTest.DEFAULT_VNIC_PROFILE_NAME ) ; org.hamcrest.MatcherAssert.assertThat ( validator.validUseDefaultNetworkFilterFlag ( true ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.ACTION_TYPE_FAILED_INVALID_VNIC_PROFILE_NETWORK_ID_CONFIGURATION , org.ovirt.engine.core.utils.ReplacementUtils.createSetVariableString ( VnicProfileValidator.VAR_VNIC_PROFILE_NAME , org.ovirt.engine.core.bll.validator.VnicProfileValidatorTest.DEFAULT_VNIC_PROFILE_NAME ) , org.ovirt.engine.core.utils.ReplacementUtils.createSetVariableString ( VnicProfileValidator.VAR_NETWORK_FILTER_ID , org.ovirt.engine.core.bll.validator.VnicProfileValidatorTest.VALID_NETWORK_FILTER_ID ) ) ) ; }
Source:
private java.util.List < org.ovirt.engine.core.common.businessentities.VmGuestAgentInterface > getDevicesCollection ( org.ovirt.engine.core.compat.Guid vmId ) { return getBackendCollection ( org.ovirt.engine.core.common.businessentities.VmGuestAgentInterface.class , VdcQueryType.GetVmGuestAgentInterfacesByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) ) ; }

Target:
public javax.ws.rs.core.Response add ( org.ovirt.engine.api.model.Nic nic ) { validateEnums ( org.ovirt.engine.api.model.Nic.class , nic ) ; validateParameters ( nic , "name" ) ; return performCreate ( VdcActionType.AddVmInterface , new org.ovirt.engine.core.common.action.AddVmInterfaceParameters ( vmId , map ( nic ) ) , new org.ovirt.engine.api.restapi.resource.NicResolver ( nic.getName ( ) ) ) ; }
Source:
protected boolean formatStorage ( org.ovirt.engine.core.common.businessentities.StorageDomain dom , org.ovirt.engine.core.common.businessentities.VDS vds ) { try { return getVdsBroker ( ) . RunVdsCommand ( VDSCommandType.FormatStorageDomain , new org.ovirt.engine.core.common.vdscommands.FormatStorageDomainVDSCommandParameters ( vds.getId ( ) , dom.getId ( ) ) ) . getSucceeded ( ) ; } catch ( org.ovirt.engine.core.common.errors.VdcBLLException e ) { if ( ( e.getErrorCode ( ) ) != ( org.ovirt.engine.core.common.errors.VdcBllErrors.StorageDomainDoesNotExist ) ) { throw e ; } log.warnFormat ( "Storage Domain {0} which was about to be formatted does not exist in VDS {1}" , dom.getName ( ) , vds.getName ( ) ) ; return true ; } }

Target:
protected boolean formatStorage ( org.ovirt.engine.core.common.businessentities.StorageDomain dom , org.ovirt.engine.core.common.businessentities.VDS vds ) { try { return runVdsCommand ( VDSCommandType.FormatStorageDomain , new org.ovirt.engine.core.common.vdscommands.FormatStorageDomainVDSCommandParameters ( vds.getId ( ) , dom.getId ( ) ) ) . getSucceeded ( ) ; } catch ( org.ovirt.engine.core.common.errors.VdcBLLException e ) { if ( ( e.getErrorCode ( ) ) != ( org.ovirt.engine.core.common.errors.VdcBllErrors.StorageDomainDoesNotExist ) ) { throw e ; } log.warnFormat ( "Storage Domain {0} which was about to be formatted does not exist in VDS {1}" , dom.getName ( ) , vds.getName ( ) ) ; return true ; } }
Source:
public java.lang.Boolean call ( ) throws java.lang.Exception { boolean enabled = ( ( _vds.isPmEnabled ( ) ) && ( _vds.isPmKdumpDetection ( ) ) ) && ( fenceKdumpSupported ) ; if ( ! enabled ) { _messages.post ( InstallerMessages.Severity.INFO , "Disabling Kdump integration" ) ; } _parser.cliEnvironmentSet ( KdumpEnv.ENABLE , enabled ) ; return true ; }

Target:
public java.lang.Boolean call ( ) throws java.lang.Exception { boolean enabled = ( ( _vds.isPmEnabled ( ) ) && ( _vds.isPmKdumpDetection ( ) ) ) && ( fenceKdumpSupported ) ; if ( ! enabled ) { userVisibleLog ( java.util.logging.Level.INFO , "Disabling Kdump integration" ) ; } _parser.cliEnvironmentSet ( KdumpEnv.ENABLE , enabled ) ; return true ; }
Source:
protected void initProfiles ( ) { java.util.List < org.ovirt.engine.ui.uicommonweb.models.profiles.VnicProfileModel > profiles = new java.util.LinkedList < org.ovirt.engine.ui.uicommonweb.models.profiles.VnicProfileModel > ( ) ; org.ovirt.engine.ui.uicommonweb.models.profiles.NewVnicProfileModel newModel = new org.ovirt.engine.ui.uicommonweb.models.profiles.NewVnicProfileModel ( getSourceListModel ( ) , getSelectedDc ( ) . getcompatibility_version ( ) , false , getSelectedDc ( ) . getId ( ) ) ; profiles.add ( newModel ) ; getProfiles ( ) . setItems ( profiles ) ; }

Target:
protected void selectExternalProvider ( ) { getExternalProviders ( ) . setSelectedItem ( org.ovirt.engine.ui.uicommonweb.Linq.firstOrDefault ( getExternalProviders ( ) . getItems ( ) ) ) ; }
Source:
public void EnsureAsyncSearchStopped ( ) { getTimer ( ) . stop ( ) ; if ( ( ( getAsyncResult ( ) ) != null ) && ( ! ( getAsyncResult ( ) . getId ( ) . equals ( NGuid.Empty ) ) ) ) { org.ovirt.engine.ui.frontend.Frontend.UnregisterQuery ( getAsyncResult ( ) . getId ( ) ) ; setAsyncResult ( null ) ; } }

Target:
public org.ovirt.engine.ui.uicommonweb.UICommand getDefaultCommand ( ) { return getEditCommand ( ) ; }
Source:
private void prepare3 ( ) { org.ovirt.engine.ui.uicompat.PreparingEnlistment enlistment = ( ( org.ovirt.engine.ui.uicompat.PreparingEnlistment ) ( context.enlistment ) ) ; org.ovirt.engine.ui.uicommonweb.models.hosts.EnlistmentContext enlistmentContext = ( ( org.ovirt.engine.ui.uicommonweb.models.hosts.EnlistmentContext ) ( enlistment.getContext ( ) ) ) ; org.ovirt.engine.core.common.action.VdcReturnValueBase returnValue = context.addVDSGroupReturnValue ; context.enlistment = null ; if ( ( returnValue != null ) && ( returnValue.getSucceeded ( ) ) ) { enlistmentContext.setClusterId ( ( ( org.ovirt.engine.core.compat.Guid ) ( returnValue.getActionReturnValue ( ) ) ) ) ; context.enlistment = null ; enlistment.Prepared ( ) ; } else { enlistment.ForceRollback ( ) ; } }

Target:
private void prepare3 ( ) { org.ovirt.engine.ui.uicompat.PreparingEnlistment enlistment = ( ( org.ovirt.engine.ui.uicompat.PreparingEnlistment ) ( context.enlistment ) ) ; org.ovirt.engine.ui.uicommonweb.models.hosts.EnlistmentContext enlistmentContext = ( ( org.ovirt.engine.ui.uicommonweb.models.hosts.EnlistmentContext ) ( enlistment.getContext ( ) ) ) ; org.ovirt.engine.core.common.action.VdcReturnValueBase returnValue = context.addVDSGroupReturnValue ; context.enlistment = null ; if ( ( returnValue != null ) && ( returnValue.getSucceeded ( ) ) ) { enlistmentContext.setClusterId ( ( ( org.ovirt.engine.core.compat.Guid ) ( returnValue.getActionReturnValue ( ) ) ) ) ; context.enlistment = null ; enlistment.prepared ( ) ; } else { enlistment.forceRollback ( ) ; } }
Source:
public org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeProfileInfoReturnForXmlRpc glusterVolumeProfileInfo ( org.ovirt.engine.core.compat.Guid clusterId , java.lang.String volumeName ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.glusterVolumeProfileInfo ( volumeName ) ; org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeProfileInfoReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeProfileInfoReturnForXmlRpc ( clusterId , xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc glusterVolumeGeoRepSessionPause ( java.lang.String masterVolumeName , java.lang.String slaveHost , java.lang.String slaveVolumeName , boolean force ) { try { return new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( vdsServer.glusterVolumeGeoRepSessionPause ( masterVolumeName , slaveHost , slaveVolumeName , force ) ) ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
Source:
private void OnSaveSanStorage ( ) { org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel confirmationModel = ( ( org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel ) ( getConfirmWindow ( ) ) ) ; if ( ( confirmationModel != null ) && ( ! ( confirmationModel.Validate ( ) ) ) ) { return ; } CancelConfirm ( ) ; getWindow ( ) . StartProgress ( null ) ; org.ovirt.engine.ui.uicompat.Task.Create ( this , new java.util.ArrayList < java.lang.Object > ( java.util.Arrays.asList ( new java.lang.Object [ ] { "SaveSan" } ) ) ) . Run ( ) ; }

Target:
private void saveSanStorage ( ) { org.ovirt.engine.ui.uicommonweb.models.storage.StorageModel storageModel = ( ( org.ovirt.engine.ui.uicommonweb.models.storage.StorageModel ) ( getWindow ( ) ) ) ; org.ovirt.engine.ui.uicommonweb.models.storage.SanStorageModel sanStorageModel = ( ( org.ovirt.engine.ui.uicommonweb.models.storage.SanStorageModel ) ( storageModel.getSelectedItem ( ) ) ) ; java.util.ArrayList < java.lang.String > usedLunsMessages = sanStorageModel.getUsedLunsMessages ( ) ; if ( usedLunsMessages.isEmpty ( ) ) { onSaveSanStorage ( ) ; } else { forceCreationWarning ( usedLunsMessages ) ; } }
Source:
public java.util.List < org.ovirt.engine.core.bll.utils.PermissionSubject > getPermissionCheckSubjects ( ) { java.util.List < org.ovirt.engine.core.bll.utils.PermissionSubject > permissionList = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.core.common.action.MoveOrCopyImageGroupParameters parameters : org.ovirt.engine.core.bll.storage.disk.MoveDisksCommand.getParameters ( ) . getParametersList ( ) ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage diskImage = org.ovirt.engine.core.bll.storage.disk.MoveDisksCommand.getDiskImageDao ( ) . get ( parameters.getImageId ( ) ) ; org.ovirt.engine.core.compat.Guid diskId = ( diskImage == null ) ? org.ovirt.engine.core.compat.Guid.Empty : diskImage.getId ( ) ; permissionList.add ( new org.ovirt.engine.core.bll.utils.PermissionSubject ( diskId , org.ovirt.engine.core.common.VdcObjectType.Disk , org.ovirt.engine.core.common.businessentities.ActionGroup.CONFIGURE_DISK_STORAGE ) ) ; } return permissionList ; }

Target:
public java.util.List < org.ovirt.engine.core.bll.utils.PermissionSubject > getPermissionCheckSubjects ( ) { java.util.List < org.ovirt.engine.core.bll.utils.PermissionSubject > permissionList = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.core.common.action.MoveOrCopyImageGroupParameters parameters : org.ovirt.engine.core.bll.storage.disk.MoveDisksCommand.getParameters ( ) . getParametersList ( ) ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage diskImage = diskImageDao.get ( parameters.getImageId ( ) ) ; org.ovirt.engine.core.compat.Guid diskId = ( diskImage == null ) ? org.ovirt.engine.core.compat.Guid.Empty : diskImage.getId ( ) ; permissionList.add ( new org.ovirt.engine.core.bll.utils.PermissionSubject ( diskId , org.ovirt.engine.core.common.VdcObjectType.Disk , org.ovirt.engine.core.common.businessentities.ActionGroup.CONFIGURE_DISK_STORAGE ) ) ; } return permissionList ; }
Source:
public static void getVmList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String poolName ) { 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 ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VM > vms = org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.VM > cast ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.IVdcQueryable > ) ( source ) ) ) ; return vms ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( ( "Vms: pool=" + poolName ) , org.ovirt.engine.core.common.interfaces.SearchType.VM ) , aQuery ) ; }

Target:
public static void getDocumentationBaseURL ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.String ) ( source ) ) : "" ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.DocsURL , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
protected void executeCommand ( ) { getQuotaDao ( ) . remove ( getParameters ( ) . getQuotaId ( ) ) ; getQuotaManager ( ) . removeQuotaFromCache ( getQuota ( ) . getStoragePoolId ( ) , getParameters ( ) . getQuotaId ( ) ) ; getReturnValue ( ) . setSucceeded ( true ) ; }

Target:
public java.util.List < org.ovirt.engine.core.bll.utils.PermissionSubject > getPermissionCheckSubjects ( ) { return java.util.Collections.singletonList ( new org.ovirt.engine.core.bll.utils.PermissionSubject ( getParameters ( ) . getId ( ) , org.ovirt.engine.core.common.VdcObjectType.Quota , getActionType ( ) . getActionGroup ( ) ) ) ; }
Source:
public void testScoreForMemoryLoad ( ) throws java.lang.Exception { org.ovirt.engine.core.bll.scheduling.policyunits.PowerSavingMemoryWeightPolicyUnit unit = mockPolicyUnit ( org.ovirt.engine.core.bll.scheduling.policyunits.PowerSavingMemoryWeightPolicyUnit.class ) ; java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.BusinessEntity < org.ovirt.engine.core.compat.Guid > > cache = newCache ( ) ; final java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.VDS > hosts = loadHosts ( "basic_power_saving_hosts_mem_load.csv" , cache ) ; final java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.VM > vms = loadVMs ( "basic_power_saving_vms.csv" , cache ) ; testScore ( unit , hosts , vms , org.ovirt.engine.core.bll.scheduling.policyunits.PowerSavingWeightPolicyUnitTest.DESTINATION_HOST ) ; }

Target:
public void testScoreForCpuLoad ( ) throws java.lang.Exception { java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.BusinessEntity < org.ovirt.engine.core.compat.Guid > > cache = newCache ( ) ; final java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.VDS > hosts = loadHosts ( "basic_power_saving_hosts_cpu_load.csv" , cache ) ; final java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.VM > vms = loadVMs ( "basic_power_saving_vms.csv" , cache ) ; testScore ( powerSavingCPUWeightPolicyUnit , hosts , vms , org.ovirt.engine.core.bll.scheduling.policyunits.PowerSavingWeightPolicyUnitTest.DESTINATION_HOST ) ; }
Source:
private java.util.List < org.ovirt.engine.core.common.businessentities.LUN_storage_server_connection_map > getAllLUNStorageServerConnection ( ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) ; org.springframework.jdbc.core.simple.ParameterizedRowMapper < org.ovirt.engine.core.common.businessentities.LUN_storage_server_connection_map > mapper = new org.springframework.jdbc.core.simple.ParameterizedRowMapper < org.ovirt.engine.core.common.businessentities.LUN_storage_server_connection_map > ( ) { @ java.lang.Override public org.ovirt.engine.core.common.businessentities.LUN_storage_server_connection_map mapRow ( java.sql.ResultSet rs , int rowNum ) throws java.sql.SQLException { org.ovirt.engine.core.common.businessentities.LUN_storage_server_connection_map entity = new org.ovirt.engine.core.common.businessentities.LUN_storage_server_connection_map ( ) ; entity.setLunId ( rs.getString ( "LUN_id" ) ) ; entity.setstorage_server_connection ( rs.getString ( "storage_server_connection" ) ) ; return entity ; } } ; return getCallsHandler ( ) . executeReadList ( "GetAllFromLUN_storage_server_connection_map" , mapper , parameterSource ) ; }

Target:
private java.util.List < org.ovirt.engine.core.common.businessentities.LUN_storage_server_connection_map > getAllLUNStorageServerConnection ( ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) ; return getCallsHandler ( ) . executeReadList ( "GetAllFromLUN_storage_server_connection_map" , org.ovirt.engine.core.dao.StorageServerConnectionLunMapDAODbFacadeImpl.StorageServerConnectionLunMapRowMapper.instance , parameterSource ) ; }
Source:
private java.lang.String getActualActionName ( ) { java.lang.String actualActionName ; switch ( org.ovirt.engine.core.vdsbroker.vdsbroker.FenceVdsVDSCommand.getParameters ( ) . getAction ( ) ) { case Restart : actualActionName = "reboot" ; break ; case Start : actualActionName = "on" ; break ; case Stop : actualActionName = "off" ; break ; default : actualActionName = "status" ; break ; } return actualActionName ; }

Target:
private java.util.Map < java.lang.String , java.lang.Object > convertFencingPolicy ( ) { java.util.Map < java.lang.String , java.lang.Object > map = null ; if ( ( ( org.ovirt.engine.core.vdsbroker.vdsbroker.FenceVdsVDSCommand.getParameters ( ) . getFencingPolicy ( ) ) != null ) && ( org.ovirt.engine.core.common.utils.FencingPolicyHelper.isFencingPolicySupported ( getProxyVds ( ) . getSupportedClusterVersionsSet ( ) ) ) ) { map = new java.util.HashMap < > ( ) ; if ( org.ovirt.engine.core.vdsbroker.vdsbroker.FenceVdsVDSCommand.getParameters ( ) . getFencingPolicy ( ) . isSkipFencingIfSDActive ( ) ) { map.put ( VdsProperties.STORAGE_DOMAIN_HOST_ID_MAP , createStorageDomainHostIdMap ( ) ) ; } } return map ; }
Source:
protected java.lang.String [ ] getSubCollections ( ) { java.lang.Class < ? > [ ] interfaces = getClass ( ) . getInterfaces ( ) ; java.util.List < java.lang.String > subCollections = new java.util.ArrayList < > ( ) ; for ( java.lang.Class < ? > clazz : interfaces ) { org.ovirt.engine.api.rsdl.ServiceTreeNode node = getRequiredNode ( clazz ) ; if ( node != null ) { org.ovirt.engine.api.restapi.resource.AbstractBackendResource.addSubCollections ( node , subCollections ) ; } } return ( ( java.lang.String [ ] ) ( subCollections.toArray ( new java.lang.String [ 0 ] ) ) ) ; }

Target:
private java.util.Set < java.lang.Class < ? > > getInterfaces ( ) { java.util.Set < java.lang.Class < ? > > result = new java.util.HashSet < > ( ) ; for ( java.lang.Class < ? > clazz = getClass ( ) ; clazz != null ; clazz = clazz.getSuperclass ( ) ) { for ( java.lang.Class < ? > iface : clazz.getInterfaces ( ) ) { if ( iface.getName ( ) . endsWith ( "Resource" ) ) { result.add ( iface ) ; } } } return result ; }
Source:
protected org.ovirt.engine.core.common.utils.ToStringBuilder appendAttributes ( org.ovirt.engine.core.common.utils.ToStringBuilder tsb ) { return super . appendAttributes ( tsb ) . append ( "imageSizeInBytes" , getImageSizeInBytes ( ) ) . append ( "volumeFormat" , getVolumeFormat ( ) ) . append ( "newImageId" , getNewImageID ( ) ) . append ( "newImageDescription" , getNewImageDescription ( ) ) . append ( "imageInitialSizeInBytes" , getImageInitialSizeInBytes ( ) ) ; }

Target:
protected org.ovirt.engine.core.common.utils.ToStringBuilder appendAttributes ( org.ovirt.engine.core.common.utils.ToStringBuilder tsb ) { return super . appendAttributes ( tsb ) . append ( "imageSizeInBytes" , getImageSizeInBytes ( ) ) . append ( "volumeFormat" , getVolumeFormat ( ) ) . append ( "newImageId" , getNewImageID ( ) ) . append ( "imageType" , getImageType ( ) ) . append ( "newImageDescription" , getNewImageDescription ( ) ) . append ( "imageInitialSizeInBytes" , getImageInitialSizeInBytes ( ) ) ; }
Source:
public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.RepoImage > repoList = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.RepoImage > ) ( source ) ) ; java.util.ArrayList < java.lang.String > fileNameList = new java.util.ArrayList < java.lang.String > ( ) ; for ( org.ovirt.engine.core.common.businessentities.RepoImage repoImage : repoList ) { fileNameList.add ( repoImage.getRepoImageId ( ) ) ; } java.util.Collections.sort ( fileNameList , java.lang.String.CASE_INSENSITIVE_ORDER ) ; return fileNameList ; } return new java.util.ArrayList < java.lang.String > ( ) ; }

Target:
public void getManagementNetwork ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { runQueryByIdParameter ( VdcQueryType.GetManagementNetwork , aQuery , clusterId ) ; }
Source:
public void canDoActionVmRunningStateless ( ) { createParameters ( ) ; initDiskImage ( diskImageGroupId , diskImageId ) ; initVm ( VMStatus.Up , org.ovirt.engine.core.compat.Guid.newGuid ( ) , diskImageGroupId ) ; org.mockito.Mockito.doReturn ( new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.ACTION_TYPE_FAILED_VM_RUNNING_STATELESS ) ) . when ( vmValidator ) . vmNotRunningStateless ( ) ; org.junit.Assert.assertFalse ( command.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( command.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( VdcBllMessages.ACTION_TYPE_FAILED_VM_RUNNING_STATELESS.name ( ) ) ) ; }

Target:
public void canDoActionVmRunningStateless ( ) { createParameters ( ) ; initDiskImage ( diskImageGroupId , diskImageId ) ; initVm ( VMStatus.Up , org.ovirt.engine.core.compat.Guid.newGuid ( ) , diskImageGroupId ) ; org.mockito.Mockito.doReturn ( new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_VM_RUNNING_STATELESS ) ) . when ( vmValidator ) . vmNotRunningStateless ( ) ; org.junit.Assert.assertFalse ( command.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( command.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( EngineMessage.ACTION_TYPE_FAILED_VM_RUNNING_STATELESS.name ( ) ) ) ; }
Source:
private java.util.List < org.ovirt.engine.core.common.businessentities.network.NameServer > getNameServers ( org.ovirt.engine.core.common.businessentities.network.DnsResolverConfiguration dnsResolverConfiguration ) { if ( dnsResolverConfiguration == null ) { return null ; } java.util.List < org.ovirt.engine.core.common.businessentities.network.NameServer > nameServers = dnsResolverConfiguration.getNameServers ( ) ; if ( ( nameServers == null ) || ( nameServers.isEmpty ( ) ) ) { return null ; } return nameServers ; }

Target:
private java.util.List < org.ovirt.engine.core.common.businessentities.network.NameServer > getNameServers ( org.ovirt.engine.core.common.businessentities.network.DnsResolverConfiguration dnsResolverConfiguration ) { if ( dnsResolverConfiguration == null ) { return java.util.Collections.emptyList ( ) ; } java.util.List < org.ovirt.engine.core.common.businessentities.network.NameServer > nameServers = dnsResolverConfiguration.getNameServers ( ) ; if ( ( nameServers == null ) || ( nameServers.isEmpty ( ) ) ) { return java.util.Collections.emptyList ( ) ; } return nameServers ; }
Source:
public void hostNNotUsed ( ) { org.mockito.Mockito.when ( oldHost.getHostName ( ) ) . thenReturn ( generateRandomName ( ) ) ; org.mockito.Mockito.when ( host.getHostName ( ) ) . thenReturn ( generateRandomName ( ) ) ; org.mockito.Mockito.when ( hostDao.getAllForHostname ( org.mockito.ArgumentMatchers.any ( java.lang.String.class ) ) ) . thenReturn ( java.util.Collections.emptyList ( ) ) ; org.junit.Assert.assertThat ( validator.hostNameNotUsed ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }

Target:
public void hostNNotUsed ( ) { org.mockito.Mockito.when ( oldHost.getHostName ( ) ) . thenReturn ( generateRandomName ( ) ) ; org.mockito.Mockito.when ( host.getHostName ( ) ) . thenReturn ( generateRandomName ( ) ) ; org.mockito.Mockito.when ( hostDao.getAllForHostname ( org.mockito.ArgumentMatchers.anyString ( ) ) ) . thenReturn ( java.util.Collections.emptyList ( ) ) ; org.junit.Assert.assertThat ( validator.hostNameNotUsed ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }
Source:
public void testIt ( ) { org.ovirt.engine.core.compat.backendcompat.PropertyCompat pc = org.ovirt.engine.core.compat.backendcompat.TypeCompat.GetProperty ( this . getClass ( ) , "someValue" ) ; java.lang.String result = ( ( java.lang.String ) ( pc.GetValue ( this , "JarJar" ) ) ) ; assertEquals ( "Standard" , "Anakin" , result ) ; this . someValue = null ; result = ( ( java.lang.String ) ( pc.GetValue ( this , "JarJar" ) ) ) ; assertEquals ( "Null Value" , "JarJar" , result ) ; }

Target:
public void testIt ( ) { org.ovirt.engine.core.compat.backendcompat.PropertyCompat pc = org.ovirt.engine.core.compat.backendcompat.TypeCompat.GetProperty ( this . getClass ( ) , "someValue" ) ; java.lang.String result = ( ( java.lang.String ) ( pc.GetValue ( this , "JarJar" ) ) ) ; org.junit.Assert.assertEquals ( "Standard" , "Anakin" , result ) ; this . someValue = null ; result = ( ( java.lang.String ) ( pc.GetValue ( this , "JarJar" ) ) ) ; org.junit.Assert.assertEquals ( "Null Value" , "JarJar" , result ) ; }
Source:
protected org.ovirt.engine.core.common.businessentities.VDSGroup setUpVDSGroupExpectations ( org.ovirt.engine.core.compat.Guid id ) { org.ovirt.engine.core.common.businessentities.VDSGroup group = control.createMock ( org.ovirt.engine.core.common.businessentities.VDSGroup.class ) ; org.easymock.EasyMock.expect ( group.getId ( ) ) . andReturn ( id ) . anyTimes ( ) ; setUpEntityQueryExpectations ( VdcQueryType.GetVdsGroupByVdsGroupId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { id } , group ) ; return group ; }

Target:
protected org.ovirt.engine.core.common.businessentities.Cluster setUpClusterExpectations ( org.ovirt.engine.core.compat.Guid id ) { org.ovirt.engine.core.common.businessentities.Cluster group = control.createMock ( org.ovirt.engine.core.common.businessentities.Cluster.class ) ; org.easymock.EasyMock.expect ( group.getId ( ) ) . andReturn ( id ) . anyTimes ( ) ; setUpEntityQueryExpectations ( VdcQueryType.GetClusterByClusterId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { id } , group ) ; return group ; }
Source:
private void VdsExistWithHigherVersion ( ) { org.ovirt.engine.core.common.businessentities.VDS vds = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; vds.setStatus ( VDSStatus.Up ) ; vds.setVdsGroupCompatibilityVersion ( org.ovirt.engine.core.bll.UpdateVdsGroupCommandTest.VERSION_1_2 ) ; java.util.List < org.ovirt.engine.core.common.businessentities.VDS > vdsList = new java.util.ArrayList < > ( ) ; vdsList.add ( vds ) ; org.mockito.Mockito.when ( vdsDao.getAllForVdsGroup ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( vdsList ) ; }

Target:
private void vdsExistWithHigherVersion ( ) { org.ovirt.engine.core.common.businessentities.VDS vds = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; vds.setStatus ( VDSStatus.Up ) ; vds.setVdsGroupCompatibilityVersion ( org.ovirt.engine.core.bll.UpdateVdsGroupCommandTest.VERSION_1_2 ) ; java.util.List < org.ovirt.engine.core.common.businessentities.VDS > vdsList = new java.util.ArrayList < > ( ) ; vdsList.add ( vds ) ; org.mockito.Mockito.when ( vdsDao.getAllForVdsGroup ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( vdsList ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc extendImageTransferSession ( java.lang.String ticketId , long expiration ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "Host.extendImageTransferSession" ) . withParameter ( "ticketUUID" , ticketId ) . withParameter ( "expiration" , expiration ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( response ) ; }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.VolumeInfoReturnForXmlRpc getVolumeInfo ( java.lang.String sdUUID , java.lang.String spUUID , java.lang.String imgUUID , java.lang.String volUUID ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "Volume.getInfo" ) . withParameter ( "storagepoolID" , spUUID ) . withParameter ( "storagedomainID" , sdUUID ) . withParameter ( "imageID" , imgUUID ) . withParameter ( "volumeID" , volUUID ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.VolumeInfoReturnForXmlRpc ( response ) ; }
Source:
public static org.ovirt.engine.core.common.businessentities.UserProfile map ( org.ovirt.engine.api.model.SSHPublicKey model , org.ovirt.engine.core.common.businessentities.UserProfile template ) { org.ovirt.engine.core.common.businessentities.UserProfile entity = ( template != null ) ? template : new org.ovirt.engine.core.common.businessentities.UserProfile ( ) ; if ( model.isSetContent ( ) ) { entity.setSshPublicKey ( model.getContent ( ) ) ; } if ( model.isSetId ( ) ) { entity.setSshPublicKeyId ( org.ovirt.engine.api.restapi.utils.GuidUtils.asGuid ( model.getId ( ) ) ) ; } return entity ; }

Target:
public static org.ovirt.engine.core.common.businessentities.UserProfile map ( org.ovirt.engine.api.model.SshPublicKey model , org.ovirt.engine.core.common.businessentities.UserProfile template ) { org.ovirt.engine.core.common.businessentities.UserProfile entity = ( template != null ) ? template : new org.ovirt.engine.core.common.businessentities.UserProfile ( ) ; if ( model.isSetContent ( ) ) { entity.setSshPublicKey ( model.getContent ( ) ) ; } if ( model.isSetId ( ) ) { entity.setSshPublicKeyId ( org.ovirt.engine.api.restapi.utils.GuidUtils.asGuid ( model.getId ( ) ) ) ; } return entity ; }
Source:
public void testQueryDefaultWindowsTimeZone ( ) { mcr.mockConfigValue ( ConfigValues.DefaultWindowsTimeZone , org.ovirt.engine.core.bll.GetDefualtTimeZoneQueryTest.DEFAULT_WINDOWS_TIME_ZONE ) ; org.mockito.Mockito.when ( getQueryParameters ( ) . getTimeZoneType ( ) ) . thenReturn ( TimeZoneType.WINDOWS_TIMEZONE ) ; getQuery ( ) . executeQueryCommand ( ) ; @ java.lang.SuppressWarnings ( value = "unchecked" ) java.lang.String result = ( ( java.lang.String ) ( getQuery ( ) . getQueryReturnValue ( ) . getReturnValue ( ) ) ) ; org.junit.Assert.assertTrue ( ( "Wrong default time zone: " + result ) , result.equals ( org.ovirt.engine.core.bll.GetDefualtTimeZoneQueryTest.DEFAULT_WINDOWS_TIME_ZONE ) ) ; }

Target:
public void testQueryDefaultWindowsTimeZone ( ) { mcr.mockConfigValue ( ConfigValues.DefaultWindowsTimeZone , org.ovirt.engine.core.bll.GetDefaultTimeZoneQueryTest.DEFAULT_WINDOWS_TIME_ZONE ) ; org.mockito.Mockito.when ( getQueryParameters ( ) . getTimeZoneType ( ) ) . thenReturn ( TimeZoneType.WINDOWS_TIMEZONE ) ; getQuery ( ) . executeQueryCommand ( ) ; @ java.lang.SuppressWarnings ( value = "unchecked" ) java.lang.String result = ( ( java.lang.String ) ( getQuery ( ) . getQueryReturnValue ( ) . getReturnValue ( ) ) ) ; org.junit.Assert.assertTrue ( ( "Wrong default time zone: " + result ) , result.equals ( org.ovirt.engine.core.bll.GetDefaultTimeZoneQueryTest.DEFAULT_WINDOWS_TIME_ZONE ) ) ; }
Source:
private void executeDeactivateCommand ( ) { final org.ovirt.engine.core.common.action.StorageDomainPoolParametersBase params = new org.ovirt.engine.core.common.action.StorageDomainPoolParametersBase ( org.ovirt.engine.core.bll.storage.domain.DeactivateStorageDomainWithOvfUpdateCommand.getStorageDomainId ( ) , org.ovirt.engine.core.bll.storage.domain.DeactivateStorageDomainWithOvfUpdateCommand.getStoragePoolId ( ) ) ; params.setSkipChecks ( true ) ; params.setSkipLock ( true ) ; params.setShouldBeLogged ( true ) ; runInternalActionWithTasksContext ( VdcActionType.DeactivateStorageDomain , params ) ; }

Target:
private void executeDeactivateCommand ( ) { final org.ovirt.engine.core.common.action.StorageDomainPoolParametersBase params = new org.ovirt.engine.core.common.action.StorageDomainPoolParametersBase ( org.ovirt.engine.core.bll.storage.domain.DeactivateStorageDomainWithOvfUpdateCommand.getStorageDomainId ( ) , org.ovirt.engine.core.bll.storage.domain.DeactivateStorageDomainWithOvfUpdateCommand.getStoragePoolId ( ) ) ; params.setSkipChecks ( true ) ; params.setSkipLock ( true ) ; params.setShouldBeLogged ( true ) ; runInternalActionWithTasksContext ( ActionType.DeactivateStorageDomain , params ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.OneVGReturnForXmlRpc getVGInfo ( java.lang.String vgUUID ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "LVMVolumeGroup.getInfo" ) . withParameter ( "lvmvolumegroupID" , vgUUID ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) . withResponseKey ( "info" ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.OneVGReturnForXmlRpc ( response ) ; }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.OneVGReturn getVGInfo ( java.lang.String vgUUID ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "LVMVolumeGroup.getInfo" ) . withParameter ( "lvmvolumegroupID" , vgUUID ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) . withResponseKey ( "info" ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.OneVGReturn ( response ) ; }
Source:
private void setUpGetBallooningExpectations ( int times ) throws java.lang.Exception { for ( int i = 0 ; i < times ; i ++ ) { setUpGetEntityExpectations ( VdcQueryType.IsBalloonEnabled , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ i ] } , true ) ; } }

Target:
private void setUpGetSoundcardExpectations ( int ... idxs ) throws java.lang.Exception { for ( int i = 0 ; i < ( idxs.length ) ; i ++ ) { setUpGetEntityExpectations ( VdcQueryType.GetSoundDevices , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ idxs [ i ] ] } , new java.util.ArrayList < > ( ) ) ; } }
Source:
private org.ovirt.engine.core.bll.ValidationResult modifiedAttachmentExists ( org.ovirt.engine.core.compat.Guid networkAttachmentId ) { if ( isNewAttachment ( networkAttachmentId ) ) { return org.ovirt.engine.core.bll.ValidationResult.VALID ; } for ( org.ovirt.engine.core.common.businessentities.network.NetworkAttachment existingAttachment : existingAttachments ) { if ( existingAttachment.getId ( ) . equals ( networkAttachmentId ) ) { return org.ovirt.engine.core.bll.ValidationResult.VALID ; } } return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.NETWORK_ATTACHMENT_NOT_EXISTS , org.ovirt.engine.core.utils.ReplacementUtils.createSetVariableString ( org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidator.VAR_NETWORK_ATTACHMENT_NOT_EXISTS_ENTITY , networkAttachmentId.toString ( ) ) ) ; }

Target:
private org.ovirt.engine.core.bll.ValidationResult modifiedAttachmentExists ( org.ovirt.engine.core.compat.Guid networkAttachmentId ) { if ( isNewAttachment ( networkAttachmentId ) ) { return org.ovirt.engine.core.bll.ValidationResult.VALID ; } for ( org.ovirt.engine.core.common.businessentities.network.NetworkAttachment existingAttachment : existingAttachments ) { if ( existingAttachment.getId ( ) . equals ( networkAttachmentId ) ) { return org.ovirt.engine.core.bll.ValidationResult.VALID ; } } return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.NETWORK_ATTACHMENT_NOT_EXISTS , org.ovirt.engine.core.utils.ReplacementUtils.getVariableAssignmentString ( EngineMessage.NETWORK_ATTACHMENT_NOT_EXISTS , networkAttachmentId.toString ( ) ) ) ; }
Source:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; dao = dbFacade.getEngineBackupLogDao ( ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; dao = dbFacade.getEngineBackupLogDao ( ) ; existingEngineBackupLog = dao.getLastSuccessfulEngineBackup ( org.ovirt.engine.core.dao.EngineBackupLogDaoTest.DB_NAME ) ; newEntity = new org.ovirt.engine.core.common.businessentities.EngineBackupLog ( ) ; newEntity.setDbName ( org.ovirt.engine.core.utils.RandomUtils.instance ( ) . nextString ( 20 ) ) ; newEntity.setOutputMessage ( org.ovirt.engine.core.utils.RandomUtils.instance ( ) . nextString ( 20 ) ) ; newEntity.setDoneAt ( new java.util.Date ( ) ) ; newEntity.setPassed ( true ) ; }
Source:
private void handleError ( java.lang.Exception ex , org.ovirt.engine.core.compat.CommandStatus status , org.ovirt.engine.core.compat.Guid cmdId ) { org.ovirt.engine.core.bll.tasks.CommandExecutor.log.errorFormat ( "Error invoking callback method {0} for {1} command {2}" , getCallBackMethod ( status ) , status.toString ( ) , cmdId.toString ( ) ) ; org.ovirt.engine.core.bll.tasks.CommandExecutor.log.error ( ex ) ; if ( ! ( CommandStatus.FAILED.equals ( status ) ) ) { coco.updateCommandStatus ( cmdId , CommandStatus.FAILED ) ; } }

Target:
private void handleError ( java.lang.Exception ex , org.ovirt.engine.core.compat.CommandStatus status , org.ovirt.engine.core.compat.Guid cmdId ) { org.ovirt.engine.core.bll.tasks.CommandExecutor.log.error ( "Error invoking callback method '{}' for '{}' command '{}'" , getCallBackMethod ( status ) , status , cmdId ) ; org.ovirt.engine.core.bll.tasks.CommandExecutor.log.error ( "Exception" , ex ) ; if ( ! ( CommandStatus.FAILED.equals ( status ) ) ) { coco.updateCommandStatus ( cmdId , CommandStatus.FAILED ) ; } }
Source:
private void getVlanParentInterface ( org.ovirt.engine.core.compat.Guid vdsID , org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface , 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.GetVlanParent , new org.ovirt.engine.core.common.queries.InterfaceAndIdQueryParameters ( vdsID , iface ) , aQuery ) ; }

Target:
public void getProviderCertificateChain ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.common.businessentities.Provider provider ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetProviderCertificateChainText , new org.ovirt.engine.core.common.queries.ProviderQueryParameters ( provider ) , aQuery ) ; }
Source:
public int hashCode ( ) { final int prime = 31 ; int result = super . hashCode ( ) ; result = ( prime * result ) + ( ( getEntity ( ) ) == null ? 0 : getEntity ( ) . hashCode ( ) ) ; result = ( prime * result ) + ( ( getTitle ( ) ) == null ? 0 : getTitle ( ) . hashCode ( ) ) ; return result ; }

Target:
public int hashCode ( ) { final int prime = 31 ; int result = super . hashCode ( ) ; result = ( prime * result ) + ( ( getType ( ) ) == null ? 0 : getType ( ) . hashCode ( ) ) ; result = ( prime * result ) + ( ( getEntity ( ) ) == null ? 0 : getEntity ( ) . hashCode ( ) ) ; return result ; }