auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
protected void executeQueryCommand ( ) { java.lang.String timezone = org.ovirt.engine.core.common.config.Config.< java.lang.String > GetValue ( ConfigValues.DefaultTimeZone ) ; org.ovirt.engine.core.bll.GetDefualtTimeZoneQuery.getQueryReturnValue ( ) . setReturnValue ( new org.ovirt.engine.core.compat.KeyValuePairCompat < java.lang.String , java.lang.String > ( org.ovirt.engine.core.vdsbroker.vdsbroker.SysprepHandler.getTimezoneKey ( timezone ) , timezone ) ) ; }

Target:
protected void executeQueryCommand ( ) { org.ovirt.engine.core.common.config.ConfigValues defaultTimeZoneConfigKey ; switch ( org.ovirt.engine.core.bll.GetDefualtTimeZoneQuery.getParameters ( ) . getTimeZoneType ( ) ) { default : case GENERAL_TIMEZONE : defaultTimeZoneConfigKey = org.ovirt.engine.core.common.config.ConfigValues.DefaultGeneralTimeZone ; break ; case WINDOWS_TIMEZONE : defaultTimeZoneConfigKey = org.ovirt.engine.core.common.config.ConfigValues.DefaultWindowsTimeZone ; break ; } java.lang.String timeZone = org.ovirt.engine.core.common.config.Config.< java.lang.String > GetValue ( defaultTimeZoneConfigKey ) ; org.ovirt.engine.core.bll.GetDefualtTimeZoneQuery.getQueryReturnValue ( ) . setReturnValue ( timeZone ) ; }
Source:
public void execute ( ) { com.google.gwt.event.logical.shared.ValueChangeEvent.fire ( stringEditor.asValueBox ( ) , stringEditor.asValueBox ( ) . getValue ( ) ) ; }

Target:
public void edit ( final org.ovirt.engine.ui.uicommonweb.models.EntityModel < java.lang.String > model ) { driver.edit ( model ) ; stringEditor.fireValueChangeOnKeyDown ( ) ; stringEditor.asValueBox ( ) . addValueChangeHandler ( new com.google.gwt.event.logical.shared.ValueChangeHandler < java.lang.String > ( ) { @ java.lang.Override public void onValueChange ( com.google.gwt.event.logical.shared.ValueChangeEvent < java.lang.String > event ) { com.google.gwt.event.logical.shared.ValueChangeEvent.fire ( org.ovirt.engine.ui.webadmin.widget.provider.DnsServerEditor.this , model ) ; } } ) ; }
Source:
public void getRoleActionGroupsByRoleId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid roleId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ActionGroup > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ActionGroup > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetRoleActionGroupsByRoleId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( roleId ) , aQuery ) ; }

Target:
public void getGlusterSnapshotConfig ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId , org.ovirt.engine.core.compat.Guid volumeId ) { aQuery.setHandleFailure ( true ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterVolumeSnapshotConfig , new org.ovirt.engine.core.common.queries.gluster.GlusterVolumeQueriesParameters ( clusterId , volumeId ) , aQuery ) ; }
Source:
public void isVirtioScsiEnabledForVm ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid vmId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { return ! ( ( ( java.util.List < ? > ) ( source ) ) . isEmpty ( ) ) ; } return false ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVirtioScsiControllers , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) , aQuery ) ; }

Target:
public void isVirtioScsiEnabledForVm ( org.ovirt.engine.ui.frontend.AsyncQuery < java.lang.Boolean > aQuery , org.ovirt.engine.core.compat.Guid vmId ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.IsNonEmptyCollectionConverter ( ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVirtioScsiControllers , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) , aQuery ) ; }
Source:
public void migrationSupported ( ) { org.mockito.Mockito.doReturn ( true ) . when ( validator ) . migrationSupportedForArch ( org.mockito.ArgumentMatchers.any ( ) ) ; org.junit.Assert.assertThat ( validator.migrationSupported ( org.ovirt.engine.core.utils.RandomUtils.instance ( ) . nextEnum ( org.ovirt.engine.core.common.businessentities.ArchitectureType.class ) ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }

Target:
public void migrationSupported ( ) { org.mockito.Mockito.doReturn ( true ) . when ( validator ) . migrationSupportedForArch ( org.mockito.ArgumentMatchers.any ( ) ) ; org.hamcrest.MatcherAssert.assertThat ( validator.migrationSupported ( org.ovirt.engine.core.utils.RandomUtils.instance ( ) . nextEnum ( org.ovirt.engine.core.common.businessentities.ArchitectureType.class ) ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }
Source:
private void setErrorMessageAtReturn ( org.ovirt.engine.core.common.utils.Pair < java.lang.Boolean , java.lang.Integer > result ) { org.ovirt.engine.core.common.errors.VdcFault fault = new org.ovirt.engine.core.common.errors.VdcFault ( ) ; fault.setError ( result.getSecond ( ) ) ; if ( ( fault.getError ( ) ) != null ) { fault.setMessage ( org.ovirt.engine.core.bll.Backend.getInstance ( ) . getVdsErrorsTranslator ( ) . TranslateErrorTextSingle ( fault.getError ( ) . toString ( ) ) ) ; } org.ovirt.engine.core.bll.storage.ConnectStorageToVdsCommand.getReturnValue ( ) . setFault ( fault ) ; }

Target:
private void setErrorMessageAtReturn ( org.ovirt.engine.core.common.utils.Pair < java.lang.Boolean , java.lang.Integer > result ) { org.ovirt.engine.core.common.errors.EngineFault fault = new org.ovirt.engine.core.common.errors.EngineFault ( ) ; fault.setError ( result.getSecond ( ) ) ; if ( ( fault.getError ( ) ) != null ) { fault.setMessage ( org.ovirt.engine.core.bll.Backend.getInstance ( ) . getVdsErrorsTranslator ( ) . TranslateErrorTextSingle ( fault.getError ( ) . toString ( ) ) ) ; } org.ovirt.engine.core.bll.storage.ConnectStorageToVdsCommand.getReturnValue ( ) . setFault ( fault ) ; }
Source:
public org.ovirt.engine.core.common.businessentities.Quota getById ( org.ovirt.engine.core.compat.Guid quotaId ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = createQuotaIdParameterMapper ( quotaId ) ; org.ovirt.engine.core.common.businessentities.Quota quotaEntity = getCallsHandler ( ) . executeRead ( "GetQuotaByQuotaGuid" , getQuotaFromResultSet ( ) , parameterSource ) ; if ( quotaEntity != null ) { quotaEntity.setQuotaVdsGroups ( getQuotaVdsGroupByQuotaGuid ( quotaId ) ) ; quotaEntity.setQuotaStorages ( getQuotaStorageByQuotaGuid ( quotaId ) ) ; } return quotaEntity ; }

Target:
public org.ovirt.engine.core.common.businessentities.Quota getById ( org.ovirt.engine.core.compat.Guid quotaId ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = createQuotaIdParameterMapper ( quotaId ) ; org.ovirt.engine.core.common.businessentities.Quota quotaEntity = getCallsHandler ( ) . executeRead ( "GetQuotaByQuotaGuid" , getQuotaFromResultSet ( ) , parameterSource ) ; if ( quotaEntity != null ) { quotaEntity.setQuotaClusters ( getQuotaClusterByQuotaGuid ( quotaId ) ) ; quotaEntity.setQuotaStorages ( getQuotaStorageByQuotaGuid ( quotaId ) ) ; } return quotaEntity ; }
Source:
public void runMultipleActions ( final java.util.List < org.ovirt.engine.core.common.action.VdcActionType > actionTypes , final java.util.List < org.ovirt.engine.core.common.action.VdcActionParametersBase > parameters , final java.util.List < org.ovirt.engine.ui.uicompat.IFrontendActionAsyncCallback > callbacks , final org.ovirt.engine.ui.uicompat.IFrontendActionAsyncCallback failureCallback , final java.lang.Object state , boolean aggregateErrors ) { runMultipleActions ( actionTypes , parameters , callbacks , failureCallback , state , aggregateErrors , ( aggregateErrors ? new java.util.ArrayList < java.lang.String > ( ) : null ) ) ; }

Target:
public void runMultipleActions ( final java.util.List < org.ovirt.engine.core.common.action.VdcActionType > actionTypes , final java.util.List < org.ovirt.engine.core.common.action.VdcActionParametersBase > parameters , final java.util.List < org.ovirt.engine.ui.uicompat.IFrontendActionAsyncCallback > callbacks , final org.ovirt.engine.ui.uicompat.IFrontendActionAsyncCallback failureCallback , final java.lang.Object state , boolean aggregateErrors ) { runMultipleActions ( actionTypes , parameters , callbacks , failureCallback , state , aggregateErrors , ( aggregateErrors ? new java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionType > ( ) : null ) , ( aggregateErrors ? new java.util.ArrayList < org.ovirt.engine.core.common.action.VdcReturnValueBase > ( ) : null ) ) ; }
Source:
private org.ovirt.engine.core.bll.ValidationResult hostStatusValid ( ) { org.ovirt.engine.core.common.businessentities.VDSStatus hostStatus = org.ovirt.engine.core.bll.RefreshHostInfoCommandBase.getVds ( ) . getStatus ( ) ; if ( ( ( hostStatus != ( org.ovirt.engine.core.common.businessentities.VDSStatus.Maintenance ) ) && ( hostStatus != ( org.ovirt.engine.core.common.businessentities.VDSStatus.Up ) ) ) && ( hostStatus != ( org.ovirt.engine.core.common.businessentities.VDSStatus.NonOperational ) ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.ACTION_TYPE_FAILED_VDS_STATUS_ILLEGAL , VdcBllMessages.VAR__HOST_STATUS__UP_MAINTENANCE_OR_NON_OPERATIONAL.name ( ) ) ; } return ValidationResult.VALID ; }

Target:
private org.ovirt.engine.core.bll.ValidationResult hostStatusValid ( ) { org.ovirt.engine.core.common.businessentities.VDSStatus hostStatus = org.ovirt.engine.core.bll.RefreshHostInfoCommandBase.getVds ( ) . getStatus ( ) ; if ( ( ( hostStatus != ( org.ovirt.engine.core.common.businessentities.VDSStatus.Maintenance ) ) && ( hostStatus != ( org.ovirt.engine.core.common.businessentities.VDSStatus.Up ) ) ) && ( hostStatus != ( org.ovirt.engine.core.common.businessentities.VDSStatus.NonOperational ) ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_VDS_STATUS_ILLEGAL , EngineMessage.VAR__HOST_STATUS__UP_MAINTENANCE_OR_NON_OPERATIONAL.name ( ) ) ; } return ValidationResult.VALID ; }
Source:
public void setUsePatternFly ( final boolean use ) { super . setUsePatternFly ( use ) ; if ( use ) { getCheckboxWidgetLabel ( ) . getStyle ( ) . setPaddingLeft ( 10 , Unit.PX ) ; getCheckboxWidgetLabel ( ) . getStyle ( ) . setPosition ( Position.RELATIVE ) ; getContentWidgetElement ( ) . removeClassName ( Styles.FORM_CONTROL ) ; removeContentWidgetStyleName ( Styles.FORM_CONTROL ) ; } }

Target:
protected void noPaddingNoFixes ( ) { org.ovirt.engine.ui.common.widget.editor.BaseEntityModelCheckboxEditor.getValidatedWidgetStyle ( ) . clearPadding ( ) ; getCheckboxWidgetLabel ( ) . removeClassName ( org.ovirt.engine.ui.common.widget.editor.BaseEntityModelCheckboxEditor.CBE_LABEL_PFLY_FIX ) ; getContentWidgetElement ( ) . removeClassName ( org.ovirt.engine.ui.common.widget.editor.BaseEntityModelCheckboxEditor.CBE_CHECKBOX_PFLY_FIX ) ; getContentWidgetElement ( ) . removeClassName ( Styles.FORM_CONTROL ) ; removeContentWidgetStyleName ( Styles.FORM_CONTROL ) ; }
Source:
private boolean isVmInterfacesConfigured ( ) { for ( org.ovirt.engine.core.common.businessentities.VmNetworkInterface nic : org.ovirt.engine.core.bll.RunVmCommand.getVm ( ) . getInterfaces ( ) ) { if ( ( nic.getNetworkName ( ) ) == null ) { if ( ! ( org.ovirt.engine.core.bll.validator.FeatureSupported.networkLinking ( org.ovirt.engine.core.bll.RunVmCommand.getVm ( ) . getVdsGroupCompatibilityVersion ( ) ) ) ) { addCanDoActionMessage ( VdcBllMessages.ACTION_TYPE_FAILED_INTERFACE_NETWORK_NOT_CONFIGURED ) ; return false ; } else { return true ; } } } return true ; }

Target:
private boolean isVmInterfacesConfigured ( ) { for ( org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface nic : org.ovirt.engine.core.bll.RunVmCommand.getVm ( ) . getInterfaces ( ) ) { if ( ( nic.getNetworkName ( ) ) == null ) { if ( ! ( org.ovirt.engine.core.common.FeatureSupported.networkLinking ( org.ovirt.engine.core.bll.RunVmCommand.getVm ( ) . getVdsGroupCompatibilityVersion ( ) ) ) ) { addCanDoActionMessage ( VdcBllMessages.ACTION_TYPE_FAILED_INTERFACE_NETWORK_NOT_CONFIGURED ) ; return false ; } else { return true ; } } } return true ; }
Source:
public void testExecuteQueryCommnad ( ) throws java.lang.Exception { org.mockito.Mockito.when ( getQueryParameters ( ) . getServer ( ) ) . thenReturn ( serverName ) ; org.mockito.Mockito.doReturn ( fingerPrint ) . when ( mockEngineSSHClient ) . getHostFingerprint ( ) ; getQuery ( ) . executeQueryCommand ( ) ; java.lang.String serverFingerprint = getQuery ( ) . getQueryReturnValue ( ) . getReturnValue ( ) ; org.junit.Assert.assertNotNull ( serverFingerprint ) ; org.junit.Assert.assertEquals ( fingerPrint , serverFingerprint ) ; }

Target:
public void testExecuteQueryCommnad ( ) throws java.lang.Exception { org.mockito.Mockito.when ( getQueryParameters ( ) . getServer ( ) ) . thenReturn ( serverName ) ; org.mockito.Mockito.doReturn ( fingerPrint ) . when ( mockEngineSSHClient ) . getHostFingerprint ( ) ; getQuery ( ) . executeQueryCommand ( ) ; java.lang.String serverFingerprint = getQuery ( ) . getQueryReturnValue ( ) . getReturnValue ( ) ; org.junit.jupiter.api.Assertions.assertNotNull ( serverFingerprint ) ; org.junit.jupiter.api.Assertions.assertEquals ( fingerPrint , serverFingerprint ) ; }
Source:
public void getVmGuestAgentInterfacesByVmId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid vmId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmGuestAgentInterface > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmGuestAgentInterfacesByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) . withoutRefresh ( ) , aQuery ) ; }

Target:
public void getVnicProfilesByDcId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dcId ) { if ( ( aQuery.converterCallback ) == null ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VnicProfileView > ( ) ; } return source ; } } ; } org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVnicProfilesByDataCenterId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dcId ) , aQuery ) ; }
Source:
public void testBuildVmNumatuneSetting ( ) throws java.lang.Exception { java.util.Map < java.lang.String , java.lang.Object > numaTune = org.ovirt.engine.core.vdsbroker.vdsbroker.NumaSettingFactory.buildVmNumatuneSetting ( org.ovirt.engine.core.vdsbroker.vdsbroker.NumaSettingFactoryTest.numaTuneMode , org.ovirt.engine.core.vdsbroker.vdsbroker.NumaSettingFactoryTest.vmNumaNodes , org.ovirt.engine.core.vdsbroker.vdsbroker.NumaSettingFactoryTest.vdsNumaNodes ) ; org.junit.Assert.assertEquals ( 2 , numaTune.size ( ) ) ; org.junit.Assert.assertTrue ( numaTune.containsKey ( VdsProperties.NUMA_TUNE_MODE ) ) ; org.junit.Assert.assertEquals ( NumaTuneMode.INTERLEAVE.getValue ( ) , numaTune.get ( VdsProperties.NUMA_TUNE_MODE ) ) ; org.junit.Assert.assertTrue ( numaTune.containsKey ( VdsProperties.NUMA_TUNE_NODESET ) ) ; org.junit.Assert.assertEquals ( "0,1" , numaTune.get ( VdsProperties.NUMA_TUNE_NODESET ) ) ; }

Target:
public void shouldNotCreateCpuPinningForVirtualNumaNodes ( ) { for ( org.ovirt.engine.core.common.businessentities.VmNumaNode numaNode : org.ovirt.engine.core.vdsbroker.vdsbroker.NumaSettingFactoryTest.vmNumaNodes ) { numaNode.getVdsNumaNodeList ( ) . clear ( ) ; } java.util.Map < java.lang.String , java.lang.Object > cpuPinning = org.ovirt.engine.core.vdsbroker.vdsbroker.NumaSettingFactory.buildCpuPinningWithNumaSetting ( org.ovirt.engine.core.vdsbroker.vdsbroker.NumaSettingFactoryTest.vmNumaNodes , org.ovirt.engine.core.vdsbroker.vdsbroker.NumaSettingFactoryTest.vdsNumaNodes ) ; org.junit.Assert.assertTrue ( cpuPinning.isEmpty ( ) ) ; java.util.Map < java.lang.String , java.lang.Object > mapping = org.ovirt.engine.core.vdsbroker.vdsbroker.NumaSettingFactory.buildVmNumatuneSetting ( NumaTuneMode.INTERLEAVE , org.ovirt.engine.core.vdsbroker.vdsbroker.NumaSettingFactoryTest.vmNumaNodes ) ; org.junit.Assert.assertFalse ( mapping.containsKey ( VdsProperties.NUMA_TUNE_MODE ) ) ; org.junit.Assert.assertFalse ( mapping.containsKey ( VdsProperties.NUMA_TUNE_NODESET ) ) ; }
Source:
protected void onEntityChanged ( ) { super . onEntityChanged ( ) ; if ( ( getEntity ( ) ) != null ) { java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.users.UserGroup > items = new java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.users.UserGroup > ( ) ; for ( java.lang.String groupFullName : getEntity ( ) . getGroupNames ( ) ) { items.add ( createUserGroup ( groupFullName , getEntity ( ) . getNamespace ( ) , getEntity ( ) . getDomain ( ) ) ) ; } setItems ( items ) ; } else { setItems ( null ) ; } }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { for ( org.ovirt.engine.core.common.businessentities.aaa.DbGroup grp : ( ( java.util.Collection < org.ovirt.engine.core.common.businessentities.aaa.DbGroup > ) ( returnValue ) ) ) { items.add ( createUserGroup ( grp.getName ( ) , grp.getNamespace ( ) , grp.getDomain ( ) ) ) ; } setItems ( items ) ; }
Source:
protected boolean validate ( ) { if ( isImageSupplied ( ) ) { return validateImageTransfer ( org.ovirt.engine.core.bll.storage.disk.image.TransferImageCommand.getParameters ( ) . getImageId ( ) ) ; } else { if ( ( org.ovirt.engine.core.bll.storage.disk.image.TransferImageCommand.getParameters ( ) . getTransferType ( ) ) != ( org.ovirt.engine.core.common.businessentities.storage.TransferType.Download ) ) { return validateCreateImage ( ) ; } else { return failValidation ( EngineMessage.ACTION_TYPE_FAILED_IMAGE_NOT_SPECIFIED_FOR_DOWNLOAD ) ; } } }

Target:
protected boolean validate ( ) { org.ovirt.engine.core.compat.Guid imageId = org.ovirt.engine.core.bll.storage.disk.image.TransferImageCommand.getParameters ( ) . getImageId ( ) ; if ( ! ( org.ovirt.engine.core.compat.Guid.isNullOrEmpty ( imageId ) ) ) { return validateImageTransfer ( imageId ) ; } else if ( ( org.ovirt.engine.core.bll.storage.disk.image.TransferImageCommand.getParameters ( ) . getTransferType ( ) ) == ( org.ovirt.engine.core.common.businessentities.storage.TransferType.Download ) ) { return failValidation ( EngineMessage.ACTION_TYPE_FAILED_IMAGE_NOT_SPECIFIED_FOR_DOWNLOAD ) ; } return validateCreateImage ( ) ; }
Source:
public void testNotRemovingUsedPoolRecordIsUsed ( ) throws java.lang.Exception { macPool.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; org.mockito.Mockito.when ( macPoolDaoMock.getDcUsageCount ( org.mockito.Matchers.eq ( macPool.getId ( ) ) ) ) . thenReturn ( 1 ) ; org.junit.Assert.assertThat ( new org.ovirt.engine.core.bll.MacPoolValidator ( macPool ) . notRemovingUsedPool ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( VdcBllMessages.ACTION_TYPE_FAILED_CANNOT_REMOVE_STILL_USED_MAC_POOL ) ) ; }

Target:
public void testNotRemovingUsedPoolRecordIsUsed ( ) throws java.lang.Exception { macPool.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; final org.ovirt.engine.core.common.businessentities.StoragePool storagePool = new org.ovirt.engine.core.common.businessentities.StoragePool ( ) ; storagePool.setName ( "storagePool" ) ; org.mockito.Mockito.when ( storagePoolDao.getAllDataCentersByMacPoolId ( macPool.getId ( ) ) ) . thenReturn ( java.util.Collections.singletonList ( storagePool ) ) ; org.junit.Assert.assertThat ( macPoolValidator.notRemovingUsedPool ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( VdcBllMessages.ACTION_TYPE_FAILED_CANNOT_REMOVE_STILL_USED_MAC_POOL ) ) ; }
Source:
private java.util.Set < java.lang.String > getNetworkAttachmentInterfaceNames ( java.util.Collection < org.ovirt.engine.core.common.businessentities.network.NetworkAttachment > networkAttachments ) { java.util.Set < java.lang.String > networkAttachmentNicNames = new java.util.HashSet < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.network.NetworkAttachment attachment : networkAttachments ) { networkAttachmentNicNames.add ( attachment.getNicName ( ) ) ; } return networkAttachmentNicNames ; }

Target:
private java.util.Map < java.lang.String , java.util.List < org.ovirt.engine.core.compat.Guid > > getIdsOfNetworkAttachmentsRelatedToInterfaceNames ( java.util.Collection < org.ovirt.engine.core.common.businessentities.network.NetworkAttachment > networkAttachments ) { java.util.Map < java.lang.String , java.util.List < org.ovirt.engine.core.compat.Guid > > map = new java.util.HashMap < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.network.NetworkAttachment attachment : networkAttachments ) { org.ovirt.engine.core.utils.collections.MultiValueMapUtils.addToMap ( attachment.getNicName ( ) , attachment.getId ( ) , map , new org.ovirt.engine.core.utils.collections.MultiValueMapUtils.ListCreator < org.ovirt.engine.core.compat.Guid > ( ) ) ; } return map ; }
Source:
private org.ovirt.engine.core.compat.Guid getDisksStorageDomainId ( ) { return ( ( org.ovirt.engine.core.common.businessentities.DiskImage ) ( org.ovirt.engine.core.bll.AddDiskCommand.getVm ( ) . getDiskMap ( ) . values ( ) . iterator ( ) . next ( ) ) ) . getstorage_ids ( ) . get ( 0 ) ; }

Target:
private org.ovirt.engine.core.compat.Guid getDisksStorageDomainId ( ) { for ( org.ovirt.engine.core.common.businessentities.Disk disk : org.ovirt.engine.core.bll.AddDiskCommand.getVm ( ) . getDiskMap ( ) . values ( ) ) { if ( ( disk.getDiskStorageType ( ) ) == ( org.ovirt.engine.core.common.businessentities.Disk.DiskStorageType.IMAGE ) ) { return ( ( org.ovirt.engine.core.common.businessentities.DiskImage ) ( disk ) ) . getstorage_ids ( ) . get ( 0 ) ; } } return org.ovirt.engine.core.compat.Guid.Empty ; }
Source:
public com.google.gwt.resources.client.ImageResource getValue ( T item ) { java.lang.String osTypeName = extractor.extractOsType ( item ) . name ( ) ; com.google.gwt.resources.client.ResourcePrototype resource = org.ovirt.engine.ui.userportal.widget.table.column.VmImageColumn.getApplicationResourcesWithLookup ( ) . getResource ( ( osTypeName + "SmallImage" ) ) ; if ( ( resource == null ) || ( ! ( resource instanceof com.google.gwt.resources.client.ImageResource ) ) ) { resource = org.ovirt.engine.ui.userportal.widget.table.column.VmImageColumn.getApplicationResourcesWithLookup ( ) . UnassignedSmallImage ( ) ; } return ( ( com.google.gwt.resources.client.ImageResource ) ( resource ) ) ; }

Target:
public com.google.gwt.resources.client.ImageResource getValue ( T item ) { java.lang.String osTypeName = org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getOsUniqueOsNames ( ) . get ( extractor.extractOsType ( item ) ) ; com.google.gwt.resources.client.ResourcePrototype resource = org.ovirt.engine.ui.userportal.widget.table.column.VmImageColumn.getApplicationResourcesWithLookup ( ) . getResource ( ( osTypeName + "SmallImage" ) ) ; if ( ( resource == null ) || ( ! ( resource instanceof com.google.gwt.resources.client.ImageResource ) ) ) { resource = org.ovirt.engine.ui.userportal.widget.table.column.VmImageColumn.getApplicationResourcesWithLookup ( ) . UnassignedSmallImage ( ) ; } return ( ( com.google.gwt.resources.client.ImageResource ) ( resource ) ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.ServerConnectionListReturnForXmlRpc getStorageConnectionsList ( java.lang.String spUUID ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.getStorageConnectionsList ( spUUID ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.ServerConnectionListReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.ServerConnectionListReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc snapshot ( java.lang.String vmId , java.util.Map < java.lang.String , java.lang.String > [ ] disks , java.lang.String memory , boolean frozen ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.snapshot ( vmId , disks , memory , frozen ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
Source:
public void onTimeout ( ) { if ( org.ovirt.engine.core.bll.storage.StoragePoolStatusHandler._nonOperationalPools.containsKey ( poolId ) ) { try { org.ovirt.engine.core.common.businessentities.StoragePool pool = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStoragePoolDao ( ) . get ( poolId ) ; if ( ( pool != null ) && ( ( pool.getstatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.StoragePoolStatus.NotOperational ) ) ) { org.ovirt.engine.core.bll.storage.StoragePoolStatusHandler.NonOperationalPoolTreatment ( pool ) ; } } catch ( java.lang.Exception e ) { } } }

Target:
public void onTimeout ( ) { if ( org.ovirt.engine.core.bll.storage.StoragePoolStatusHandler._nonOperationalPools.containsKey ( poolId ) ) { try { org.ovirt.engine.core.common.businessentities.StoragePool pool = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStoragePoolDao ( ) . get ( poolId ) ; if ( ( pool != null ) && ( ( pool.getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.StoragePoolStatus.NotOperational ) ) ) { org.ovirt.engine.core.bll.storage.StoragePoolStatusHandler.nonOperationalPoolTreatment ( pool ) ; } } catch ( java.lang.Exception e ) { } } }
Source:
protected boolean canDoAction ( ) { return validate ( org.ovirt.engine.core.bll.validator.storage.StorageServerConnectionExtensionValidator.isConnectionExtensionExists ( org.ovirt.engine.core.bll.storage.UpdateStorageServerConnectionExtensionCommand.getParameters ( ) . getStorageServerConnectionExtension ( ) . getId ( ) ) ) ; }

Target:
protected boolean canDoAction ( ) { org.ovirt.engine.core.common.businessentities.storage.StorageServerConnectionExtension conn = org.ovirt.engine.core.bll.storage.UpdateStorageServerConnectionExtensionCommand.getParameters ( ) . getStorageServerConnectionExtension ( ) ; return ( validate ( org.ovirt.engine.core.bll.storage.UpdateStorageServerConnectionExtensionCommand.getConnectionExtensionValidator ( ) . isConnectionExtensionExists ( conn.getId ( ) ) ) ) && ( validate ( org.ovirt.engine.core.bll.storage.UpdateStorageServerConnectionExtensionCommand.getConnectionExtensionValidator ( ) . isConnectionDoesNotExistForHostAndTarget ( conn ) ) ) ; }
Source:
public void testVmPayloadMapToPaylod ( ) { org.ovirt.engine.core.common.businessentities.VmPayload vmPayload = new org.ovirt.engine.core.common.businessentities.VmPayload ( ) ; vmPayload.setType ( org.ovirt.engine.core.common.utils.VmDeviceType.CDROM ) ; vmPayload.setVolumeId ( "CD-VOL" ) ; org.ovirt.engine.api.model.Payload payload = org.ovirt.engine.api.restapi.types.VmMapper.map ( vmPayload , null ) ; assertEquals ( vmPayload.getType ( ) . name ( ) . toLowerCase ( ) , payload.getType ( ) ) ; assertEquals ( vmPayload.getVolumeId ( ) , payload.getVolumeId ( ) ) ; }

Target:
public void testVmPayloadMapToPaylod ( ) { org.ovirt.engine.core.common.businessentities.VmPayload vmPayload = new org.ovirt.engine.core.common.businessentities.VmPayload ( ) ; vmPayload.setDeviceType ( org.ovirt.engine.core.common.utils.VmDeviceType.CDROM ) ; vmPayload.setVolumeId ( "CD-VOL" ) ; org.ovirt.engine.api.model.Payload payload = org.ovirt.engine.api.restapi.types.VmMapper.map ( vmPayload , null ) ; assertEquals ( vmPayload.getDeviceType ( ) . name ( ) . toLowerCase ( ) , payload.getType ( ) ) ; assertEquals ( vmPayload.getVolumeId ( ) , payload.getVolumeId ( ) ) ; }
Source:
public org.ovirt.engine.ui.common.presenter.AbstractModelBoundPopupPresenterWidget < ? extends org.ovirt.engine.ui.uicommonweb.models.Model , ? > getModelPopup ( org.ovirt.engine.ui.uicommonweb.models.datacenters.DataCenterNetworkListModel source , org.ovirt.engine.ui.uicommonweb.UICommand lastExecutedCommand , org.ovirt.engine.ui.uicommonweb.models.Model windowModel ) { if ( ( lastExecutedCommand == ( getModel ( ) . getEditCommand ( ) ) ) || ( lastExecutedCommand == ( getModel ( ) . getNewCommand ( ) ) ) ) { return networkPopupProvider.get ( ) ; } else { return super . getModelPopup ( source , lastExecutedCommand , windowModel ) ; } }

Target:
public org.ovirt.engine.ui.common.presenter.AbstractModelBoundPopupPresenterWidget < ? extends org.ovirt.engine.ui.uicommonweb.models.Model , ? > getModelPopup ( org.ovirt.engine.ui.uicommonweb.models.datacenters.DataCenterNetworkListModel source , org.ovirt.engine.ui.uicommonweb.UICommand lastExecutedCommand , org.ovirt.engine.ui.uicommonweb.models.Model windowModel ) { if ( lastExecutedCommand == ( getModel ( ) . getNewCommand ( ) ) ) { return newNetworkPopupProvider.get ( ) ; } else if ( lastExecutedCommand == ( getModel ( ) . getEditCommand ( ) ) ) { return editNetworkPopupProvider.get ( ) ; } else { return super . getModelPopup ( source , lastExecutedCommand , windowModel ) ; } }
Source:
public static void getClusterGlusterServices ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.core.common.queries.gluster.GlusterVolumeAdvancedDetailsParameters parameters = new org.ovirt.engine.core.common.queries.gluster.GlusterVolumeAdvancedDetailsParameters ( clusterId , null , null , false ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetGlusterVolumeAdvancedDetails , parameters , aQuery ) ; }

Target:
public static void getGlusterSwiftServerServices ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? source : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterServerService > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetGlusterServerServicesByClusterId , new org.ovirt.engine.core.common.queries.gluster.GlusterServiceQueryParameters ( clusterId , org.ovirt.engine.core.common.businessentities.gluster.ServiceType.GLUSTER_SWIFT ) , aQuery ) ; }
Source:
void initRadioButtonEditors ( ) { displayConsoleVncEditor = new org.ovirt.engine.ui.common.widget.editor.generic.EntityModelRadioButtonEditor ( "1" ) ; displayConsoleSpiceEditor = new org.ovirt.engine.ui.common.widget.editor.generic.EntityModelRadioButtonEditor ( "1" ) ; specificHost = new com.google.gwt.user.client.ui.RadioButton ( "runVmOnHostGroup" ) ; isAutoAssignEditor = new org.ovirt.engine.ui.common.widget.editor.generic.EntityModelRadioButtonEditor ( "runVmOnHostGroup" ) ; }

Target:
void initRadioButtonEditors ( ) { runOnceHeadlessModeEditor = new org.ovirt.engine.ui.common.widget.editor.generic.EntityModelRadioButtonEditor ( "1" ) ; displayConsoleVncEditor = new org.ovirt.engine.ui.common.widget.editor.generic.EntityModelRadioButtonEditor ( "1" ) ; displayConsoleSpiceEditor = new org.ovirt.engine.ui.common.widget.editor.generic.EntityModelRadioButtonEditor ( "1" ) ; runOnceHeadlessModeEnabledInfoIcon = new org.ovirt.engine.ui.common.widget.dialog.InfoIcon ( com.google.gwt.safehtml.shared.SafeHtmlUtils.fromTrustedString ( org.ovirt.engine.ui.common.widget.uicommon.popup.vm.VmRunOncePopupWidget.constants.runOnceHeadlessModeExplanation ( ) ) ) ; specificHost = new com.google.gwt.user.client.ui.RadioButton ( "runVmOnHostGroup" ) ; isAutoAssignEditor = new org.ovirt.engine.ui.common.widget.editor.generic.EntityModelRadioButtonEditor ( "runVmOnHostGroup" ) ; }
Source:
private java.lang.String getOptions ( org.ovirt.engine.core.common.businessentities.FenceAgent agent ) { org.ovirt.engine.core.common.businessentities.ArchitectureType architectureType = architectureHelper.getArchitecture ( _vds.getStaticData ( ) ) ; java.lang.String managementOptions = org.ovirt.engine.core.utils.pm.VdsFenceOptions.getDefaultAgentOptions ( agent.getType ( ) , ( ( agent.getOptions ( ) ) == null ? "" : agent.getOptions ( ) ) , architectureType ) ; return managementOptions ; }

Target:
protected java.lang.String getOptions ( org.ovirt.engine.core.common.businessentities.FenceAgent agent , org.ovirt.engine.core.common.businessentities.VDS proxyHost ) { org.ovirt.engine.core.common.businessentities.ArchitectureType architectureType = architectureHelper.getArchitecture ( _vds.getStaticData ( ) ) ; java.lang.String managementOptions = new org.ovirt.engine.core.utils.pm.VdsFenceOptions ( agent.getType ( ) , org.ovirt.engine.core.utils.pm.VdsFenceOptions.getDefaultAgentOptions ( agent.getType ( ) , ( ( agent.getOptions ( ) ) == null ? "" : agent.getOptions ( ) ) , architectureType ) , proxyHost.getVdsGroupCompatibilityVersion ( ) . toString ( ) ) . ToInternalString ( ) ; return managementOptions ; }
Source:
public static java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > imagesSubtract ( java.lang.Iterable < org.ovirt.engine.core.common.businessentities.DiskImage > images , java.lang.Iterable < org.ovirt.engine.core.common.businessentities.DiskImage > imagesToSubtract ) { java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > subtract = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.DiskImage image : images ) { if ( ( org.ovirt.engine.core.bll.ImagesHandler.getDiskImageById ( image.getId ( ) , imagesToSubtract ) ) == null ) { subtract.add ( image ) ; } } return subtract ; }

Target:
public static java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > imagesSubtract ( java.lang.Iterable < org.ovirt.engine.core.common.businessentities.storage.DiskImage > images , java.lang.Iterable < org.ovirt.engine.core.common.businessentities.storage.DiskImage > imagesToSubtract ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > subtract = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.storage.DiskImage image : images ) { if ( ( org.ovirt.engine.core.bll.ImagesHandler.getDiskImageById ( image.getId ( ) , imagesToSubtract ) ) == null ) { subtract.add ( image ) ; } } return subtract ; }
Source:
public void canDoActionThinProvisioningSpaceCheckFailsSize ( ) { final int availableSize = 4 ; final int usedSize = 6 ; org.ovirt.engine.core.compat.Guid sdid = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; initializeCommand ( sdid , VolumeType.Sparse ) ; mockVm ( ) ; mockStorageDomain ( sdid , availableSize , usedSize ) ; mockStoragePoolIsoMap ( ) ; org.junit.Assert.assertFalse ( command.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( command.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( VdcBllMessages.ACTION_TYPE_FAILED_DISK_SPACE_LOW_ON_TARGET_STORAGE_DOMAIN.toString ( ) ) ) ; }

Target:
public void canDoActionSpaceValidationFails ( ) { org.ovirt.engine.core.compat.Guid storageId = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; initializeCommand ( storageId , VolumeType.Sparse ) ; mockVm ( ) ; mockStorageDomain ( storageId ) ; mockStoragePoolIsoMap ( ) ; mockMaxPciSlots ( ) ; org.mockito.Mockito.doReturn ( org.ovirt.engine.core.bll.AddDiskToVmCommandTest.mockStorageDomainValidatorWithoutSpace ( ) ) . when ( command ) . createStorageDomainValidator ( ) ; org.junit.Assert.assertFalse ( command.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( command.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( VdcBllMessages.ACTION_TYPE_FAILED_DISK_SPACE_LOW_ON_TARGET_STORAGE_DOMAIN.toString ( ) ) ) ; }
Source:
public void postUpdateItemsAvailability ( org.ovirt.engine.ui.uicommonweb.models.storage.IStorageModel item , boolean isNoExportOrIsoStorageAttached ) { org.ovirt.engine.core.common.businessentities.StoragePool dataCenter = getModel ( ) . getDataCenter ( ) . getSelectedItem ( ) ; org.ovirt.engine.ui.uicommonweb.models.Model model = ( ( org.ovirt.engine.ui.uicommonweb.models.Model ) ( item ) ) ; boolean isItemSelectable = isItemSelectable ( item , dataCenter , isNoExportOrIsoStorageAttached ) ; model.setIsSelectable ( isItemSelectable ) ; onStorageModelUpdated ( item ) ; }

Target:
private void updateItemSelectability ( org.ovirt.engine.ui.uicommonweb.models.storage.IStorageModel item , boolean isSelectable ) { org.ovirt.engine.ui.uicommonweb.models.Model model = ( ( org.ovirt.engine.ui.uicommonweb.models.Model ) ( item ) ) ; model.setIsSelectable ( isSelectable ) ; onStorageModelUpdated ( item ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc vmUpdateDevice ( java.lang.String vmId , org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcStruct device ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.vmUpdateDevice ( vmId , device.getInnerMap ( ) ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc glusterHookUpdate ( java.lang.String glusterCommand , java.lang.String stage , java.lang.String hookName , java.lang.String content , java.lang.String checksum ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.glusterHookUpdate ( glusterCommand , stage , hookName , content , checksum ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
Source:
public boolean equals ( java.lang.Object obj ) { if ( obj == null ) { return false ; } if ( ! ( super . equals ( obj ) ) ) { return false ; } org.ovirt.engine.core.common.businessentities.gluster.BrickProfileDetails brickDetails = ( ( org.ovirt.engine.core.common.businessentities.gluster.BrickProfileDetails ) ( obj ) ) ; if ( ( brickDetails.getBrickId ( ) ) == null ) { return false ; } if ( ! ( java.util.Objects.equals ( getBrickId ( ) , brickDetails.getBrickId ( ) ) ) ) { return false ; } return true ; }

Target:
public boolean equals ( java.lang.Object obj ) { if ( ( this ) == obj ) { return true ; } if ( ! ( obj instanceof org.ovirt.engine.core.common.businessentities.gluster.BrickProfileDetails ) ) { return false ; } org.ovirt.engine.core.common.businessentities.gluster.BrickProfileDetails other = ( ( org.ovirt.engine.core.common.businessentities.gluster.BrickProfileDetails ) ( obj ) ) ; return ( super . equals ( obj ) ) && ( java.util.Objects.equals ( brickId , other.brickId ) ) ; }
Source:
public void testRemove ( ) { dao.save ( dummyPolicy ) ; dao.remove ( dummyPolicy.getId ( ) ) ; org.ovirt.engine.core.common.scheduling.ClusterPolicy result = dao.get ( dummyPolicy.getId ( ) ) ; org.junit.Assert.assertNull ( result ) ; }

Target:
public void testRemove ( ) { dao.save ( dummyPolicy ) ; dao.remove ( dummyPolicy.getId ( ) ) ; org.ovirt.engine.core.common.scheduling.ClusterPolicy result = dao.get ( dummyPolicy.getId ( ) , java.util.Collections.emptyMap ( ) ) ; org.junit.Assert.assertNull ( result ) ; }
Source:
public void initialize ( org.ovirt.engine.core.common.validation.annotation.ConfiguredRange constraintAnnotation ) { if ( ( constraintAnnotation.minConfigValue ( ) ) != ( org.ovirt.engine.core.common.config.ConfigValues.Invalid ) ) { min = org.ovirt.engine.core.common.config.Config.< java.lang.Integer > getValue ( constraintAnnotation.minConfigValue ( ) , ConfigCommon.defaultConfigurationVersion ) ; } else { min = constraintAnnotation.min ( ) ; } max = org.ovirt.engine.core.common.config.Config.< java.lang.Integer > getValue ( constraintAnnotation.maxConfigValue ( ) , ConfigCommon.defaultConfigurationVersion ) ; }

Target:
public void initialize ( org.ovirt.engine.core.common.validation.annotation.ConfiguredRange constraintAnnotation ) { if ( ( constraintAnnotation.minConfigValue ( ) ) != ( org.ovirt.engine.core.common.config.ConfigValues.Invalid ) ) { min = org.ovirt.engine.core.common.config.Config.< java.lang.Integer > getValue ( constraintAnnotation.minConfigValue ( ) , ConfigCommon.defaultConfigurationVersion ) ; } else { min = constraintAnnotation.min ( ) ; } max = org.ovirt.engine.core.common.config.Config.< java.lang.Integer > getValue ( constraintAnnotation.maxConfigValue ( ) , ConfigCommon.defaultConfigurationVersion ) ; rangeMessage = ( ( "$range " + ( min ) ) + "-" ) + ( max ) ; }
Source:
public void cancelRecoveryJob ( ) { java.lang.String jobId = org.ovirt.engine.core.vdsbroker.VdsManager.recoveringJobIdMap.remove ( vdsId ) ; if ( jobId != null ) { org.ovirt.engine.core.vdsbroker.VdsManager.log.info ( "Cancelling the recovery from crash timer for VDS '{}' because vds started initializing" , vdsId ) ; try { org.ovirt.engine.core.utils.timer.SchedulerUtilQuartzImpl.getInstance ( ) . deleteJob ( jobId ) ; } catch ( java.lang.Exception e ) { org.ovirt.engine.core.vdsbroker.VdsManager.log.warn ( "Failed deleting job '{}' at cancelRecoveryJob: {}" , jobId , e.getMessage ( ) ) ; org.ovirt.engine.core.vdsbroker.VdsManager.log.debug ( "Exception" , e ) ; } } }

Target:
public void cancelRecoveryJob ( ) { java.lang.String jobId = org.ovirt.engine.core.vdsbroker.VdsManager.recoveringJobIdMap.remove ( vdsId ) ; if ( jobId != null ) { org.ovirt.engine.core.vdsbroker.VdsManager.log.info ( "Cancelling the recovery from crash timer for VDS '{}' because vds started initializing" , vdsId ) ; try { org.ovirt.engine.core.di.Injector.get ( org.ovirt.engine.core.utils.timer.SchedulerUtilQuartzImpl.class ) . deleteJob ( jobId ) ; } catch ( java.lang.Exception e ) { org.ovirt.engine.core.vdsbroker.VdsManager.log.warn ( "Failed deleting job '{}' at cancelRecoveryJob: {}" , jobId , e.getMessage ( ) ) ; org.ovirt.engine.core.vdsbroker.VdsManager.log.debug ( "Exception" , e ) ; } } }
Source:
protected void ExecuteIrsBrokerCommand ( ) { org.ovirt.engine.core.common.businessentities.VDS vds = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVdsDao ( ) . get ( this . getCurrentIrsProxyData ( ) . getCurrentVdsId ( ) ) ; status = org.ovirt.engine.core.vdsbroker.irsbroker.DestroyStoragePoolVDSCommand.getIrsProxy ( ) . destroyStoragePool ( org.ovirt.engine.core.vdsbroker.irsbroker.DestroyStoragePoolVDSCommand.getParameters ( ) . getStoragePoolId ( ) . toString ( ) , vds.getVdsSpmId ( ) , org.ovirt.engine.core.vdsbroker.irsbroker.DestroyStoragePoolVDSCommand.getParameters ( ) . getStoragePoolId ( ) . toString ( ) ) ; org.ovirt.engine.core.vdsbroker.irsbroker.DestroyStoragePoolVDSCommand.ProceedProxyReturnValue ( ) ; org.ovirt.engine.core.vdsbroker.irsbroker.DestroyStoragePoolVDSCommand.RemoveIrsProxy ( ) ; }

Target:
protected void ExecuteIrsBrokerCommand ( ) { org.ovirt.engine.core.common.businessentities.VDS vds = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVdsDao ( ) . get ( this . getCurrentIrsProxyData ( ) . getCurrentVdsId ( ) ) ; status = org.ovirt.engine.core.vdsbroker.irsbroker.DestroyStoragePoolVDSCommand.getIrsProxy ( ) . destroyStoragePool ( org.ovirt.engine.core.vdsbroker.irsbroker.DestroyStoragePoolVDSCommand.getParameters ( ) . getStoragePoolId ( ) . toString ( ) , vds.getVdsSpmId ( ) , org.ovirt.engine.core.vdsbroker.irsbroker.DestroyStoragePoolVDSCommand.getParameters ( ) . getStoragePoolId ( ) . toString ( ) ) ; org.ovirt.engine.core.vdsbroker.irsbroker.DestroyStoragePoolVDSCommand.proceedProxyReturnValue ( ) ; org.ovirt.engine.core.vdsbroker.irsbroker.DestroyStoragePoolVDSCommand.RemoveIrsProxy ( ) ; }
Source:
private void initializeOsRepository ( org.ovirt.engine.core.common.businessentities.storage.DiskInterface diskInterface ) { java.util.ArrayList < java.lang.String > supportedDiskInterfaces = new java.util.ArrayList < > ( ) ; supportedDiskInterfaces.add ( diskInterface.name ( ) ) ; org.mockito.Mockito.when ( osRepository.getDiskInterfaces ( org.ovirt.engine.core.bll.validator.storage.DiskVmElementValidatorTest.OS_WITH_SUPPORTED_INTERFACES , null ) ) . thenReturn ( supportedDiskInterfaces ) ; org.ovirt.engine.core.common.utils.SimpleDependencyInjector.getInstance ( ) . bind ( org.ovirt.engine.core.common.osinfo.OsRepository.class , osRepository ) ; }

Target:
public void setUp ( ) { org.ovirt.engine.core.common.utils.SimpleDependencyInjector.getInstance ( ) . bind ( org.ovirt.engine.core.common.osinfo.OsRepository.class , osRepository ) ; initializeInterfaceValidation ( DiskInterface.VirtIO ) ; disk = new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ; dve = new org.ovirt.engine.core.common.businessentities.storage.DiskVmElement ( ) ; validator = new org.ovirt.engine.core.bll.validator.storage.DiskVmElementValidator ( disk , dve ) ; }
Source:
protected org.ovirt.engine.core.common.errors.VdcBllErrors GetReturnValueFromStatus ( org.ovirt.engine.core.vdsbroker.vdsbroker.StatusForXmlRpc status ) { try { org.ovirt.engine.core.common.errors.VdcBllErrors bllErrors = org.ovirt.engine.core.common.errors.VdcBllErrors.forValue ( status.mCode ) ; if ( bllErrors == null ) { org.ovirt.engine.core.vdsbroker.vdsbroker.BrokerCommandBase.log.warn ( ( "Weird return value: " + status ) ) ; bllErrors = org.ovirt.engine.core.common.errors.VdcBllErrors.unexpected ; } return bllErrors ; } catch ( java.lang.Exception e ) { return org.ovirt.engine.core.common.errors.VdcBllErrors.unexpected ; } }

Target:
protected org.ovirt.engine.core.common.errors.VdcBllErrors GetReturnValueFromStatus ( org.ovirt.engine.core.vdsbroker.vdsbroker.StatusForXmlRpc xmlRpcStatus ) { try { org.ovirt.engine.core.common.errors.VdcBllErrors bllErrors = org.ovirt.engine.core.common.errors.VdcBllErrors.forValue ( xmlRpcStatus.mCode ) ; if ( bllErrors == null ) { org.ovirt.engine.core.vdsbroker.vdsbroker.BrokerCommandBase.log.warn ( ( "Weird return value: " + xmlRpcStatus ) ) ; bllErrors = org.ovirt.engine.core.common.errors.VdcBllErrors.unexpected ; } return bllErrors ; } catch ( java.lang.Exception e ) { return org.ovirt.engine.core.common.errors.VdcBllErrors.unexpected ; } }