auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void getHostById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVdsByVdsId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) . withoutRefresh ( ) , aQuery ) ; }

Target:
public void getHostById ( org.ovirt.engine.ui.frontend.AsyncQuery < org.ovirt.engine.core.common.businessentities.VDS > aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.CastingConverter < > ( ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVdsByVdsId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) . withoutRefresh ( ) , aQuery ) ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { osNames = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ; initOsIds ( ) ; }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { final java.util.Map < java.lang.Integer , org.ovirt.engine.core.common.queries.VmIconIdSizePair > returnMap = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ; if ( ( returnMap.get ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.DEFAULT_OS_ID ) ) == null ) { throw new java.lang.RuntimeException ( "Engine did not provide icon IDs of default OS." ) ; } osIdToDefaultIconIdMap = java.util.Collections.unmodifiableMap ( returnMap ) ; initializeLargeToSmallIconMap ( ) ; }
Source:
public void testGetAllInstanceTypesWithPermissionsForPriviligedUser ( ) { org.ovirt.engine.core.common.businessentities.VmTemplate existingInstanceType = dao.get ( FixturesTool.INSTANCE_TYPE ) ; java.util.List < org.ovirt.engine.core.common.businessentities.VmTemplate > result = dao.getAll ( org.ovirt.engine.core.dao.PRIVILEGED_USER_ID , true , VmEntityType.INSTANCE_TYPE ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.core.dao.VmTemplateDaoTest.NUMBER_OF_INSTANCE_TYPES_FOR_PRIVELEGED_USER , result.size ( ) ) ; org.junit.Assert.assertEquals ( result.iterator ( ) . next ( ) , existingInstanceType ) ; }

Target:
public void testGetAllInstanceTypesWithPermissionsForPriviligedUser ( ) { org.ovirt.engine.core.common.businessentities.VmTemplate existingInstanceType = dao.get ( FixturesTool.INSTANCE_TYPE ) ; java.util.List < org.ovirt.engine.core.common.businessentities.VmTemplate > result = dao.getAll ( org.ovirt.engine.core.dao.PRIVILEGED_USER_ID , true , VmEntityType.INSTANCE_TYPE ) ; org.junit.jupiter.api.Assertions.assertNotNull ( result ) ; org.junit.jupiter.api.Assertions.assertEquals ( org.ovirt.engine.core.dao.VmTemplateDaoTest.NUMBER_OF_INSTANCE_TYPES_FOR_PRIVELEGED_USER , result.size ( ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( result.iterator ( ) . next ( ) , existingInstanceType ) ; }
Source:
private void addAuthzColumn ( org.ovirt.engine.ui.common.CommonApplicationConstants constants ) { org.ovirt.engine.ui.common.widget.table.column.AbstractTextColumn < org.ovirt.engine.core.common.businessentities.Permission > authzColumn = new org.ovirt.engine.ui.common.widget.table.column.AbstractTextColumn < org.ovirt.engine.core.common.businessentities.Permission > ( ) { @ java.lang.Override public java.lang.String getValue ( org.ovirt.engine.core.common.businessentities.Permission object ) { return object.getAuthz ( ) ; } } ; authzColumn.makeSortable ( ) ; org.ovirt.engine.ui.common.widget.uicommon.permissions.PermissionListModelTable.getTable ( ) . addColumn ( authzColumn , constants.authz ( ) , "150px" ) ; }

Target:
private void addNameSpaceColumn ( ) { org.ovirt.engine.ui.common.widget.table.column.AbstractTextColumn < org.ovirt.engine.core.common.businessentities.Permission > namespaceColumn = new org.ovirt.engine.ui.common.widget.table.column.AbstractTextColumn < org.ovirt.engine.core.common.businessentities.Permission > ( ) { @ java.lang.Override public java.lang.String getValue ( org.ovirt.engine.core.common.businessentities.Permission object ) { return object.getNamespace ( ) ; } } ; namespaceColumn.makeSortable ( ) ; org.ovirt.engine.ui.common.widget.uicommon.permissions.PermissionListModelTable.getTable ( ) . addColumn ( namespaceColumn , org.ovirt.engine.ui.common.widget.uicommon.permissions.PermissionListModelTable.constants.namespace ( ) , "150px" ) ; }
Source:
protected void updateUserCdImage ( org.ovirt.engine.core.compat.Guid storagePoolId ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getIrsImageList ( new org.ovirt.engine.ui.frontend.AsyncQuery ( getModel ( ) , new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel ) ( target ) ) ; java.util.List < java.lang.String > images = ( ( java.util.List < java.lang.String > ) ( returnValue ) ) ; setImagesToModel ( model , images ) ; } } ) , storagePoolId ) ; }

Target:
protected void updateUserCdImage ( org.ovirt.engine.core.compat.Guid storagePoolId ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getIrsImageList ( new org.ovirt.engine.ui.frontend.AsyncQuery ( new org.ovirt.engine.ui.frontend.AsyncCallback < java.util.List < java.lang.String > > ( ) { @ java.lang.Override public void onSuccess ( java.util.List < java.lang.String > images ) { setImagesToModel ( getModel ( ) , images ) ; } } ) , storagePoolId ) ; }
Source:
public void edit ( final org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel object ) { org.ovirt.engine.ui.webadmin.section.main.view.popup.storage.StorageForceCreatePopupView.Driver.driver.edit ( object ) ; object.getLatch ( ) . setIsAvailable ( true ) ; object.getItemsChangedEvent ( ) . addListener ( new org.ovirt.engine.core.compat.IEventListener ( ) { @ java.lang.Override public void eventRaised ( org.ovirt.engine.core.compat.Event ev , java.lang.Object sender , org.ovirt.engine.core.compat.EventArgs args ) { updateDescription ( object ) ; } } ) ; }

Target:
public void edit ( final org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel object ) { org.ovirt.engine.ui.webadmin.section.main.view.popup.storage.StorageForceCreatePopupView.Driver.driver.edit ( object ) ; object.getLatch ( ) . setIsAvailable ( true ) ; object.getItemsChangedEvent ( ) . addListener ( new org.ovirt.engine.ui.uicompat.IEventListener ( ) { @ java.lang.Override public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { updateDescription ( object ) ; } } ) ; }
Source:
public void testDisksUsagesWithEmptyEntry ( ) { java.lang.Object [ ] disksUsages = org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectsBuilderTest.initDisksUsageData ( ) ; disksUsages [ 1 ] = new java.util.HashMap < > ( ) ; java.util.Map < java.lang.String , java.lang.Object > xml = org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectsBuilderTest.setDisksUsage ( disksUsages ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectsBuilderTest.validateDisksUsagesList ( org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectsBuilderTest.getVmStatistics ( ) , disksUsages , xml ) ; }

Target:
public void testDisksUsagesWithNullEntry ( ) { java.lang.Object [ ] disksUsages = org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectsBuilderTest.initDisksUsageData ( ) ; disksUsages [ 1 ] = null ; java.util.Map < java.lang.String , java.lang.Object > xml = org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectsBuilderTest.setDisksUsage ( disksUsages ) ; validateDisksUsagesList ( org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectsBuilderTest.getVmStatistics ( ) , disksUsages , xml ) ; }
Source:
protected void decreasePendingVms ( ) { decreasePendingVms ( getCurrentVdsId ( ) ) ; }

Target:
private void decreasePendingVms ( ) { org.ovirt.engine.core.compat.Guid vdsId = getCurrentVdsId ( ) ; org.ovirt.engine.core.common.businessentities.VM vm = org.ovirt.engine.core.bll.RunVmCommandBase.getVm ( ) ; if ( ( vdsId == null ) || ( vdsId.equals ( lastDecreasedVds ) ) ) { org.ovirt.engine.core.bll.RunVmCommandBase.log.debugFormat ( "PendingVms for the guest {0} running on host {1} was already released, not releasing again" , vm.getName ( ) , vdsId ) ; return ; } lastDecreasedVds = vdsId ; org.ovirt.engine.core.bll.VmHandler.decreasePendingVms ( vm , vdsId ) ; getBlockingQueue ( vdsId ) . offer ( java.lang.Boolean.TRUE ) ; }
Source:
public java.util.List < org.ovirt.engine.core.common.businessentities.storage_pool > getDataCentersByClusterService ( boolean supportsVirtService , boolean supportsGlusterService ) { final org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) ; parameterSource.addValue ( "supports_virt_service" , supportsVirtService ) . addValue ( "supports_gluster_service" , supportsGlusterService ) ; final org.ovirt.engine.core.dao.StoragePoolDAODbFacadeImpl.StoragePoolRawMapper mapper = new org.ovirt.engine.core.dao.StoragePoolDAODbFacadeImpl.StoragePoolRawMapper ( ) ; return getCallsHandler ( ) . executeReadList ( "GetStoragePoolsByClusterService" , mapper , parameterSource ) ; }

Target:
public java.util.List < org.ovirt.engine.core.common.businessentities.storage_pool > getDataCentersByClusterService ( boolean supportsVirtService , boolean supportsGlusterService ) { final org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) ; parameterSource.addValue ( "supports_virt_service" , supportsVirtService ) . addValue ( "supports_gluster_service" , supportsGlusterService ) ; return getCallsHandler ( ) . executeReadList ( "GetStoragePoolsByClusterService" , org.ovirt.engine.core.dao.StoragePoolDAODbFacadeImpl.mapper , parameterSource ) ; }
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.storage_domains > allStorageDomains = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage_domains > ) ( source ) ) ; java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage_domains > isoStorageDomains = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage_domains > ( ) ; for ( org.ovirt.engine.core.common.businessentities.storage_domains storageDomain : allStorageDomains ) { if ( ( storageDomain.getstorage_domain_type ( ) ) == ( org.ovirt.engine.core.common.businessentities.StorageDomainType.ISO ) ) { isoStorageDomains.add ( storageDomain ) ; } } return isoStorageDomains ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage_domains > ( ) ; }

Target:
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.StorageDomain > allStorageDomains = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ) ( source ) ) ; java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > isoStorageDomains = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ( ) ; for ( org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain : allStorageDomains ) { if ( ( storageDomain.getStorageDomainType ( ) ) == ( org.ovirt.engine.core.common.businessentities.StorageDomainType.ISO ) ) { isoStorageDomains.add ( storageDomain ) ; } } return isoStorageDomains ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ( ) ; }
Source:
public void testValidRemovedBondsWhenNotRemovingAnyBond ( ) throws java.lang.Exception { org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidator validator = new org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidatorTest.HostSetupNetworksValidatorBuilder ( ) . addExistingInterfaces ( ( ( java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > ) ( null ) ) ) . build ( ) ; org.junit.Assert.assertThat ( validator.validRemovedBonds ( java.util.Collections.emptyList ( ) ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }

Target:
public void testValidRemovedBondsWhenNotRemovingAnyBond ( ) { org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidator validator = new org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidatorTest.HostSetupNetworksValidatorBuilder ( ) . addExistingInterfaces ( ( ( java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > ) ( null ) ) ) . build ( ) ; org.hamcrest.MatcherAssert.assertThat ( validator.validRemovedBonds ( java.util.Collections.emptyList ( ) ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }
Source:
private void Undo ( ) { org.ovirt.engine.core.common.businessentities.VM vm = ( ( org.ovirt.engine.core.common.businessentities.VM ) ( getEntity ( ) ) ) ; if ( vm != null ) { org.ovirt.engine.core.common.businessentities.Snapshot snapshot = getPreview ( ) ; org.ovirt.engine.ui.frontend.Frontend.RunAction ( VdcActionType.RestoreAllSnapshots , new org.ovirt.engine.core.common.action.RestoreAllSnapshotsParameters ( vm.getId ( ) , snapshot.getId ( ) ) , null , null ) ; } }

Target:
private void undo ( ) { org.ovirt.engine.core.common.businessentities.VM vm = ( ( org.ovirt.engine.core.common.businessentities.VM ) ( getEntity ( ) ) ) ; if ( vm != null ) { org.ovirt.engine.core.common.businessentities.Snapshot snapshot = getPreview ( ) ; org.ovirt.engine.ui.frontend.Frontend.RunAction ( VdcActionType.RestoreAllSnapshots , new org.ovirt.engine.core.common.action.RestoreAllSnapshotsParameters ( vm.getId ( ) , snapshot.getId ( ) ) , null , null ) ; } }
Source:
private static java.lang.String decrypt ( java.lang.String source , java.security.Key key ) throws java.security.InvalidKeyException , java.security.NoSuchAlgorithmException , javax.crypto.BadPaddingException , javax.crypto.IllegalBlockSizeException , javax.crypto.NoSuchPaddingException { java.lang.String result = "" ; byte [ ] cipherbytes = Encoding.Base64.getBytes ( source ) ; javax.crypto.Cipher rsa = javax.crypto.Cipher.getInstance ( org.ovirt.engine.core.engineencryptutils.EncryptionUtils.algo ) ; rsa.init ( javax.crypto.Cipher.DECRYPT_MODE , key ) ; byte [ ] plainbytes = rsa.doFinal ( cipherbytes ) ; result = Encoding.UTF8.getString ( plainbytes ) ; return result ; }

Target:
private static java.lang.String decrypt ( java.lang.String source , java.security.Key key ) throws java.io.UnsupportedEncodingException , java.security.InvalidKeyException , java.security.NoSuchAlgorithmException , javax.crypto.BadPaddingException , javax.crypto.IllegalBlockSizeException , javax.crypto.NoSuchPaddingException { java.lang.String result = "" ; byte [ ] cipherbytes = org.apache.commons.codec.binary.Base64.decodeBase64 ( source ) ; javax.crypto.Cipher rsa = javax.crypto.Cipher.getInstance ( org.ovirt.engine.core.engineencryptutils.EncryptionUtils.algo ) ; rsa.init ( javax.crypto.Cipher.DECRYPT_MODE , key ) ; byte [ ] plainbytes = rsa.doFinal ( cipherbytes ) ; result = new java.lang.String ( plainbytes , "UTF-8" ) ; return result ; }
Source:
public void testBeanValidations ( ) { org.junit.Assert.assertTrue ( createCommand ( initializeMock ( 1 , 1 ) ) . validateInputs ( ) ) ; }

Target:
public void refuseSoundDeviceOnPPC ( ) { org.ovirt.engine.core.bll.AddVmCommand < org.ovirt.engine.core.common.action.AddVmParameters > cmd = setupCanAddPpcTest ( ) ; cmd.getParameters ( ) . setSoundDeviceEnabled ( true ) ; org.mockito.Mockito.when ( osRepository.isSoundDeviceEnabled ( cmd.getParameters ( ) . getVm ( ) . getVmOsId ( ) , cmd.getVdsGroup ( ) . getCompatibilityVersion ( ) ) ) . thenReturn ( false ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( cmd , EngineMessage.SOUND_DEVICE_REQUESTED_ON_NOT_SUPPORTED_ARCH ) ; }
Source:
private void updateDirectLunDiskEnabled ( org.ovirt.engine.core.common.businessentities.StoragePool datacenter ) { boolean isInternal = ( ( java.lang.Boolean ) ( getIsInternal ( ) . getEntity ( ) ) ) ; if ( isInternal ) { return ; } boolean isDirectLUNDiskkEnabled = ( ( java.lang.Boolean ) ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigValuePreConverted ( ConfigurationValues.DirectLUNDiskEnabled , datacenter.getcompatibility_version ( ) . getValue ( ) ) ) ) ; getIsDirectLunDiskAvaialable ( ) . setEntity ( isDirectLUNDiskkEnabled ) ; setMessage ( ( ! isDirectLUNDiskkEnabled ? org.ovirt.engine.ui.uicommonweb.models.vms.AbstractDiskModel.CONSTANTS.directLUNDiskNotSupported ( ) : "" ) ) ; }

Target:
private void updateDirectLunDiskEnabled ( org.ovirt.engine.core.common.businessentities.StoragePool datacenter ) { boolean isInternal = ( ( java.lang.Boolean ) ( getIsInternal ( ) . getEntity ( ) ) ) ; if ( isInternal ) { return ; } boolean isDirectLUNDiskkEnabled = ( ( java.lang.Boolean ) ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigValuePreConverted ( ConfigurationValues.DirectLUNDiskEnabled , datacenter.getcompatibility_version ( ) . getValue ( ) ) ) ) ; getIsDirectLunDiskAvaialable ( ) . setEntity ( isDirectLUNDiskkEnabled ) ; setMessage ( ( ! isDirectLUNDiskkEnabled ? org.ovirt.engine.ui.uicommonweb.models.vms.AbstractDiskModel.CONSTANTS.directLUNDiskNotSupported ( ) : "" ) ) ; }
Source:
public void testGetByQos ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.profiles.CpuProfile > allForQos = dao.getAllForQos ( FixturesTool.QOS_ID_4 ) ; org.junit.Assert.assertNotNull ( allForQos ) ; org.junit.Assert.assertEquals ( 2 , allForQos.size ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.profiles.CpuProfile cpuProfile : allForQos ) { org.junit.Assert.assertEquals ( FixturesTool.QOS_ID_4 , cpuProfile.getQosId ( ) ) ; } }

Target:
public void testGetByQos ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.profiles.CpuProfile > allForQos = dao.getAllForQos ( FixturesTool.QOS_ID_4 ) ; org.junit.jupiter.api.Assertions.assertNotNull ( allForQos ) ; org.junit.jupiter.api.Assertions.assertEquals ( 2 , allForQos.size ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.profiles.CpuProfile cpuProfile : allForQos ) { org.junit.jupiter.api.Assertions.assertEquals ( FixturesTool.QOS_ID_4 , cpuProfile.getQosId ( ) ) ; } }
Source:
public void isSupportBridgesReportByVDSM ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String version ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Boolean ) ( source ) ) . booleanValue ( ) : true ; } } ; org.ovirt.engine.core.common.queries.GetConfigurationValueParameters tempVar = new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.SupportBridgesReportByVDSM ) ; tempVar.setVersion ( version ) ; getConfigFromCache ( tempVar , aQuery ) ; }

Target:
public void isSupportBridgesReportByVDSM ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String version ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Boolean ) ( source ) ) . booleanValue ( ) : true ; } } ; org.ovirt.engine.core.common.queries.GetConfigurationValueParameters tempVar = new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.SupportBridgesReportByVDSM ) ; tempVar.setVersion ( version ) ; getConfigFromCache ( tempVar , aQuery ) ; }
Source:
protected boolean canDoAction ( ) { java.lang.String directory = org.ovirt.engine.core.bll.AddGroupCommand.getParameters ( ) . getDirectory ( ) ; org.ovirt.engine.core.common.utils.ExternalId id = org.ovirt.engine.core.bll.AddGroupCommand.getParameters ( ) . getId ( ) ; directoryGroup = ( ( org.ovirt.engine.core.common.businessentities.LdapGroup ) ( org.ovirt.engine.core.bll.adbroker.LdapFactory.getInstance ( directory ) . RunAdAction ( AdActionType.GetAdGroupByGroupId , new org.ovirt.engine.core.bll.adbroker.LdapSearchByIdParameters ( directory , id ) ) . getReturnValue ( ) ) ) ; if ( ( directoryGroup ) == null ) { addCanDoActionMessage ( VdcBllMessages.USER_MUST_EXIST_IN_DIRECTORY ) ; return false ; } addCustomValue ( "NewUserName" , directoryGroup.getname ( ) ) ; return true ; }

Target:
protected boolean canDoAction ( ) { java.lang.String directoryName = org.ovirt.engine.core.bll.AddGroupCommand.getParameters ( ) . getDirectory ( ) ; org.ovirt.engine.core.common.utils.ExternalId id = org.ovirt.engine.core.bll.AddGroupCommand.getParameters ( ) . getId ( ) ; org.ovirt.engine.core.authentication.Directory directory = org.ovirt.engine.core.authentication.DirectoryManager.getInstance ( ) . getDirectory ( directoryName ) ; directoryGroup = directory.findGroup ( id ) ; if ( ( directoryGroup ) == null ) { addCanDoActionMessage ( VdcBllMessages.USER_MUST_EXIST_IN_DIRECTORY ) ; return false ; } addCustomValue ( "NewUserName" , directoryGroup.getName ( ) ) ; return true ; }
Source:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; dao = prepareDAO ( dbFacade.getVdsSpmIdMapDAO ( ) ) ; vdsDao = prepareDAO ( dbFacade.getVdsDAO ( ) ) ; existingVds = vdsDao.get ( org.ovirt.engine.core.dao.VdsSpmIdMapDAOTest.EXISTING_VDS_ID ) ; existingVdsSpmIdMap = dao.get ( existingVds.getId ( ) ) ; newVdsSpmIdMap = new org.ovirt.engine.core.common.businessentities.vds_spm_id_map ( org.ovirt.engine.core.dao.VdsSpmIdMapDAOTest.FREE_STORAGE_POOL_ID , org.ovirt.engine.core.dao.VdsSpmIdMapDAOTest.FREE_VDS_ID , 1 ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; dao = prepareDAO ( dbFacade.getVdsSpmIdMapDao ( ) ) ; vdsDao = prepareDAO ( dbFacade.getVdsDao ( ) ) ; existingVds = vdsDao.get ( org.ovirt.engine.core.dao.VdsSpmIdMapDAOTest.EXISTING_VDS_ID ) ; existingVdsSpmIdMap = dao.get ( existingVds.getId ( ) ) ; newVdsSpmIdMap = new org.ovirt.engine.core.common.businessentities.vds_spm_id_map ( org.ovirt.engine.core.dao.VdsSpmIdMapDAOTest.FREE_STORAGE_POOL_ID , org.ovirt.engine.core.dao.VdsSpmIdMapDAOTest.FREE_VDS_ID , 1 ) ; }
Source:
public static void getStorageDomainById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storageDomainId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( org.ovirt.engine.core.common.businessentities.StorageDomain ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetStorageDomainById , new org.ovirt.engine.core.common.queries.StorageDomainQueryParametersBase ( storageDomainId ) , aQuery ) ; }

Target:
public static void getHostListByDataCenter ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid spId ) { 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 ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > list = org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.VDS > cast ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.IVdcQueryable > ) ( source ) ) ) ; return list ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllVdsByStoragePool , new org.ovirt.engine.core.common.queries.IdQueryParameters ( spId ) , aQuery ) ; }
Source:
public javax.ws.rs.core.Response remove ( ) { org.ovirt.engine.core.common.businessentities.IscsiBond bond = getBond ( ) ; if ( ! ( bond.getNetworkIds ( ) . contains ( guid ) ) ) { notFound ( ) ; } bond.getNetworkIds ( ) . remove ( guid ) ; return performAction ( VdcActionType.EditIscsiBond , new org.ovirt.engine.core.common.action.EditIscsiBondParameters ( bond ) ) ; }

Target:
public org.ovirt.engine.api.restapi.resource.BackendIscsiBondNetworksResource getParent ( ) { return parent ; }
Source:
public void testSave ( ) { staticDao.save ( newStaticVds ) ; newStatistics.setId ( newStaticVds.getId ( ) ) ; dao.save ( newStatistics ) ; org.ovirt.engine.core.common.businessentities.VdsStatic staticResult = staticDao.get ( newStaticVds.getId ( ) ) ; org.ovirt.engine.core.common.businessentities.VdsStatistics statisticsResult = dao.get ( newStatistics.getId ( ) ) ; assertNotNull ( staticResult ) ; assertEquals ( newStaticVds , staticResult ) ; assertNotNull ( statisticsResult ) ; assertEquals ( newStatistics , statisticsResult ) ; }

Target:
public void testSave ( ) { staticDao.save ( newStaticVds ) ; newStatistics.setId ( newStaticVds.getId ( ) ) ; dao.save ( newStatistics ) ; org.ovirt.engine.core.common.businessentities.VdsStatic staticResult = staticDao.get ( newStaticVds.getId ( ) ) ; org.ovirt.engine.core.common.businessentities.VdsStatistics statisticsResult = dao.get ( newStatistics.getId ( ) ) ; org.junit.Assert.assertNotNull ( staticResult ) ; org.junit.Assert.assertEquals ( newStaticVds , staticResult ) ; org.junit.Assert.assertNotNull ( statisticsResult ) ; org.junit.Assert.assertEquals ( newStatistics , statisticsResult ) ; }
Source:
public void testGetLunsToUpdateInDbDiffLunIdDiffPvId ( ) { org.ovirt.engine.core.compat.Guid lunFromVgLunId = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; java.util.List < org.ovirt.engine.core.common.businessentities.storage.LUNs > newLunsToSaveInDb = getLunsToUpdateInDb ( lunFromVgLunId , org.ovirt.engine.core.compat.Guid.newGuid ( ) , org.ovirt.engine.core.compat.Guid.newGuid ( ) , org.ovirt.engine.core.compat.Guid.newGuid ( ) ) . get ( command.saveLunsHandler ) ; assertLunIdInList ( newLunsToSaveInDb , lunFromVgLunId ) ; }

Target:
public void testGetLunsToUpdateInDbDiffLunIdDiffPvId ( ) { org.ovirt.engine.core.compat.Guid lunFromVgLunId = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; java.util.Map < org.ovirt.engine.core.bll.storage.domain.SyncLunsInfoForBlockStorageDomainCommand.LunHandler , java.util.List < org.ovirt.engine.core.common.businessentities.storage.LUNs > > lunsToUpdateInDb = getLunsToUpdateInDb ( lunFromVgLunId , org.ovirt.engine.core.compat.Guid.newGuid ( ) , org.ovirt.engine.core.compat.Guid.newGuid ( ) , org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.storage.LUNs > newLunsToSaveInDb = lunsToUpdateInDb.get ( command.saveLunsHandler ) ; org.junit.Assert.assertEquals ( java.util.stream.Stream.of ( command.saveLunsHandler , command.removeLunsHandler ) . collect ( java.util.stream.Collectors.toSet ( ) ) , lunsToUpdateInDb.keySet ( ) ) ; assertLunIdInList ( newLunsToSaveInDb , lunFromVgLunId ) ; }
Source:
public void setEntity ( org.ovirt.engine.core.common.businessentities.VmTemplate value ) { cluster = null ; super . setEntity ( value ) ; if ( ( getEntity ( ) ) != null ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getClusterById ( new org.ovirt.engine.ui.frontend.AsyncQuery ( this , new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object listModel , java.lang.Object returnValue ) { cluster = ( ( org.ovirt.engine.core.common.businessentities.Cluster ) ( returnValue ) ) ; updateActionAvailability ( ) ; } } ) , getEntity ( ) . getClusterId ( ) ) ; } }

Target:
public void setEntity ( org.ovirt.engine.core.common.businessentities.VmTemplate value ) { cluster = null ; super . setEntity ( value ) ; if ( ( getEntity ( ) ) != null ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getClusterById ( new org.ovirt.engine.ui.uicommonweb.models.templates.AsyncQuery ( new org.ovirt.engine.ui.frontend.AsyncCallback < org.ovirt.engine.core.common.businessentities.Cluster > ( ) { @ java.lang.Override public void onSuccess ( org.ovirt.engine.core.common.businessentities.Cluster returnValue ) { cluster = returnValue ; updateActionAvailability ( ) ; } } ) , getEntity ( ) . getClusterId ( ) ) ; } }
Source:
public static void getHostPublicKey ( 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.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetServerSSHPublicKey , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }

Target:
public static void getPermittedStorageDomainsByStoragePoolId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId , org.ovirt.engine.core.common.businessentities.ActionGroup actionGroup ) { 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.StorageDomain > ( ) ; } return source ; } } ; org.ovirt.engine.core.common.queries.GetPermittedStorageDomainsByStoragePoolIdParameters params = new org.ovirt.engine.core.common.queries.GetPermittedStorageDomainsByStoragePoolIdParameters ( ) ; params.setStoragePoolId ( dataCenterId ) ; params.setActionGroup ( actionGroup ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetPermittedStorageDomainsByStoragePoolId , params , aQuery ) ; }
Source:
private void initVmDiskImage ( ) { org.ovirt.engine.core.common.businessentities.DiskImage diskImage = new org.ovirt.engine.core.common.businessentities.DiskImage ( ) ; diskImage.setVmEntityType ( VmEntityType.VM ) ; org.mockito.Mockito.when ( diskImageDao.get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( diskImage ) ; }

Target:
private void initVmDiskImage ( boolean isShareable ) { org.ovirt.engine.core.common.businessentities.DiskImage diskImage = new org.ovirt.engine.core.common.businessentities.DiskImage ( ) ; diskImage.setVmEntityType ( VmEntityType.VM ) ; diskImage.setShareable ( isShareable ) ; org.mockito.Mockito.when ( diskImageDao.get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( diskImage ) ; }
Source:
protected org.ovirt.engine.core.vdsbroker.vdsbroker.entities.VmInternalData createVmInternalData ( java.util.Map < java.lang.String , java.lang.Object > xmlRpcStruct ) { org.ovirt.engine.core.common.businessentities.VmDynamic vmDynamic = new org.ovirt.engine.core.common.businessentities.VmDynamic ( ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectsBuilder.updateVMDynamicData ( vmDynamic , xmlRpcStruct ) ; adjustDisplayIp ( vmDynamic.getGraphicsInfos ( ) ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.entities.VmInternalData ( vmDynamic , org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectsBuilder.buildVMStatisticsData ( xmlRpcStruct ) , org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectsBuilder.buildVmGuestAgentInterfacesData ( vmDynamic.getId ( ) , xmlRpcStruct ) , org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectsBuilder.buildVmLunDisksData ( xmlRpcStruct ) ) ; }

Target:
protected org.ovirt.engine.core.vdsbroker.vdsbroker.entities.VmInternalData createVmInternalData ( java.util.Map < java.lang.String , java.lang.Object > xmlRpcStruct ) { org.ovirt.engine.core.common.businessentities.VmDynamic vmDynamic = new org.ovirt.engine.core.common.businessentities.VmDynamic ( ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectsBuilder.updateVMDynamicData ( vmDynamic , xmlRpcStruct ) ; adjustDisplayIp ( vmDynamic.getGraphicsInfos ( ) ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.entities.VmInternalData ( vmDynamic , org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectsBuilder.buildVMStatisticsData ( xmlRpcStruct ) , org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectsBuilder.buildVmGuestAgentInterfacesData ( vmDynamic.getId ( ) , xmlRpcStruct ) , org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectsBuilder.buildVmLunDisksData ( xmlRpcStruct ) , org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectsBuilder.getVdsmCallTimestamp ( xmlRpcStruct ) ) ; }
Source:
public com.google.gwt.resources.client.ImageResource getValue ( org.ovirt.engine.ui.uicommonweb.models.EntityModel object ) { org.ovirt.engine.core.common.businessentities.Disk disk = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.DiskModel ) ( object.getEntity ( ) ) ) . getDisk ( ) ; setTitle ( ( disk.isBoot ( ) ? constants.bootableDisk ( ) : null ) ) ; return disk.isBoot ( ) ? resources.bootableDiskIcon ( ) : null ; }

Target:
public com.google.gwt.resources.client.ImageResource getValue ( org.ovirt.engine.ui.uicommonweb.models.EntityModel object ) { org.ovirt.engine.core.common.businessentities.storage.Disk disk = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.DiskModel ) ( object.getEntity ( ) ) ) . getDisk ( ) ; setTitle ( ( disk.isBoot ( ) ? constants.bootableDisk ( ) : null ) ) ; return disk.isBoot ( ) ? resources.bootableDiskIcon ( ) : null ; }
Source:
public void addDialogModelListener ( final M source ) { source.getPropertyChangedEvent ( ) . addListener ( new org.ovirt.engine.core.compat.IEventListener ( ) { @ java.lang.Override public void eventRaised ( org.ovirt.engine.core.compat.Event ev , java.lang.Object sender , org.ovirt.engine.core.compat.EventArgs args ) { java.lang.String propName = ( ( org.ovirt.engine.core.compat.PropertyChangedEventArgs ) ( args ) ) . PropertyName ; if ( windowPropertyNames.contains ( propName ) ) { handleWindowModelChange ( source , windowPopup , false , propName ) ; } else if ( confirmWindowPropertyNames.contains ( propName ) ) { handleWindowModelChange ( source , confirmWindowPopup , true , propName ) ; } } } ) ; }

Target:
public void addDialogModelListener ( final M source ) { source.getPropertyChangedEvent ( ) . addListener ( new org.ovirt.engine.ui.uicompat.IEventListener ( ) { @ java.lang.Override public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { java.lang.String propName = ( ( org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ) ( args ) ) . PropertyName ; if ( windowPropertyNames.contains ( propName ) ) { handleWindowModelChange ( source , windowPopup , false , propName ) ; } else if ( confirmWindowPropertyNames.contains ( propName ) ) { handleWindowModelChange ( source , confirmWindowPopup , true , propName ) ; } } } ) ; }
Source:
public void onFailure ( java.lang.Throwable caught ) { org.ovirt.engine.ui.frontend.Frontend.logger.log ( java.util.logging.Level.SEVERE , ( "Failed to execute RunAction: " + caught ) , caught ) ; org.ovirt.engine.ui.frontend.Frontend.failureEventHandler ( caught ) ; if ( callback != null ) { callback.Executed ( new org.ovirt.engine.ui.uicompat.FrontendMultipleActionAsyncResult ( actionType , parameters , null , state ) ) ; } }

Target:
public void onFailure ( java.lang.Throwable caught ) { if ( org.ovirt.engine.ui.frontend.Frontend.ignoreFailure ( caught ) ) { return ; } org.ovirt.engine.ui.frontend.Frontend.logger.log ( java.util.logging.Level.SEVERE , ( "Failed to execute RunAction: " + caught ) , caught ) ; org.ovirt.engine.ui.frontend.Frontend.failureEventHandler ( caught ) ; if ( callback != null ) { callback.Executed ( new org.ovirt.engine.ui.uicompat.FrontendMultipleActionAsyncResult ( actionType , parameters , null , state ) ) ; } }
Source:
org.ovirt.engine.core.bll.validator.NetworkValidator createNetworkValidator ( ) { return new org.ovirt.engine.core.bll.validator.NetworkValidator ( getNetwork ( ) ) ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult bootProtocolSetForRoleNetwork ( ) { org.ovirt.engine.core.common.businessentities.network.IpConfiguration ipConfiguration = attachment.getIpConfiguration ( ) ; boolean failWhen = ( isRoleNetwork ( ) ) && ( ( ( ipConfiguration == null ) || ( ! ( ipConfiguration.hasPrimaryAddressSet ( ) ) ) ) || ( ( ipConfiguration.getPrimaryAddress ( ) . getBootProtocol ( ) ) == ( org.ovirt.engine.core.common.businessentities.network.NetworkBootProtocol.NONE ) ) ) ; return org.ovirt.engine.core.bll.ValidationResult.failWith ( EngineMessage.ACTION_TYPE_FAILED_ROLE_NETWORK_HAS_NO_BOOT_PROTOCOL , org.ovirt.engine.core.utils.ReplacementUtils.createSetVariableString ( org.ovirt.engine.core.bll.validator.NetworkAttachmentValidator.VAR_ACTION_TYPE_FAILED_ROLE_NETWORK_HAS_NO_BOOT_PROTOCOL_ENTITY , getNetwork ( ) . getName ( ) ) ) . when ( failWhen ) ; }
Source:
protected void performLogin ( T loginModel ) { org.ovirt.engine.core.common.businessentities.DbUser loggedUser = loginModel.getLoggedUser ( ) ; java.lang.String loginPassword = ( ( java.lang.String ) ( loginModel.getPassword ( ) . getEntity ( ) ) ) ; frontend.initLoggedInUser ( loggedUser , loginPassword ) ; beforeUiCommonInitEvent ( loginModel ) ; org.ovirt.engine.ui.common.uicommon.model.UiCommonInitEvent.fire ( eventBus ) ; user.onUserLogin ( loggedUser ) ; loginModel.getPassword ( ) . setEntity ( null ) ; }

Target:
public void onLogout ( ) { org.ovirt.engine.ui.frontend.AsyncQuery query = new org.ovirt.engine.ui.frontend.AsyncQuery ( ) ; query.setHandleFailure ( true ) ; query.asyncCallback = new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model , java.lang.Object ReturnValue ) { Window.Location.reload ( ) ; } } ; frontend.logoffAsync ( query ) ; }
Source:
private void handleDirectorySearcherException ( java.lang.Exception ex ) { org.ovirt.engine.extensions.aaa.builtin.kerberosldap.UserAuthenticationResult authResult = null ; org.ovirt.engine.api.extensionsold.AAAExtensionException aaaException = null ; if ( ex instanceof org.ovirt.engine.extensions.aaa.builtin.kerberosldap.AuthenticationResultException ) { org.ovirt.engine.extensions.aaa.builtin.kerberosldap.AuthenticationResultException authResultException = ( ( org.ovirt.engine.extensions.aaa.builtin.kerberosldap.AuthenticationResultException ) ( ex ) ) ; org.ovirt.engine.core.utils.kerberos.AuthenticationResult result = authResultException.getResult ( ) ; if ( result == null ) { result = org.ovirt.engine.core.utils.kerberos.AuthenticationResult.OTHER ; } org.ovirt.engine.extensions.aaa.builtin.kerberosldap.LdapAuthenticateUserCommand.log.error ( result.getDetailedMessage ( ) ) ; throw new org.ovirt.engine.api.extensionsold.AAAExtensionException ( authResultToExceptionMap.get ( result ) , "" ) ; } }

Target:
private void handleDirectorySearcherException ( java.lang.Exception ex ) { if ( ex instanceof org.ovirt.engine.extensions.aaa.builtin.kerberosldap.AuthenticationResultException ) { org.ovirt.engine.extensions.aaa.builtin.kerberosldap.AuthenticationResultException authResultException = ( ( org.ovirt.engine.extensions.aaa.builtin.kerberosldap.AuthenticationResultException ) ( ex ) ) ; org.ovirt.engine.core.utils.kerberos.AuthenticationResult result = authResultException.getResult ( ) ; if ( result == null ) { result = org.ovirt.engine.core.utils.kerberos.AuthenticationResult.OTHER ; } org.ovirt.engine.extensions.aaa.builtin.kerberosldap.LdapAuthenticateUserCommand.log.error ( result.getDetailedMessage ( ) ) ; getParameters ( ) . getOutputMap ( ) . put ( Authn.InvokeKeys.RESULT , resultsMap.get ( result ) ) ; } }
Source:
protected void ExecuteVdsBrokerCommand ( ) { status = org.ovirt.engine.core.vdsbroker.gluster.SetGlusterVolumeOptionVDSCommand.getBroker ( ) . glusterVolumeSet ( org.ovirt.engine.core.vdsbroker.gluster.SetGlusterVolumeOptionVDSCommand.getParameters ( ) . getVolumeName ( ) , org.ovirt.engine.core.vdsbroker.gluster.SetGlusterVolumeOptionVDSCommand.getParameters ( ) . getVolumeOption ( ) . getKey ( ) , org.ovirt.engine.core.vdsbroker.gluster.SetGlusterVolumeOptionVDSCommand.getParameters ( ) . getVolumeOption ( ) . getValue ( ) ) ; org.ovirt.engine.core.vdsbroker.gluster.SetGlusterVolumeOptionVDSCommand.ProceedProxyReturnValue ( ) ; }

Target:
protected void ExecuteVdsBrokerCommand ( ) { status = org.ovirt.engine.core.vdsbroker.gluster.SetGlusterVolumeOptionVDSCommand.getBroker ( ) . glusterVolumeSet ( org.ovirt.engine.core.vdsbroker.gluster.SetGlusterVolumeOptionVDSCommand.getParameters ( ) . getVolumeName ( ) , org.ovirt.engine.core.vdsbroker.gluster.SetGlusterVolumeOptionVDSCommand.getParameters ( ) . getVolumeOption ( ) . getKey ( ) , org.ovirt.engine.core.vdsbroker.gluster.SetGlusterVolumeOptionVDSCommand.getParameters ( ) . getVolumeOption ( ) . getValue ( ) ) ; org.ovirt.engine.core.vdsbroker.gluster.SetGlusterVolumeOptionVDSCommand.proceedProxyReturnValue ( ) ; }
Source:
public void testValidateModifiedBondSlaves_whenSlaveInterfaceDoesNotExist ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.Bond bond = new org.ovirt.engine.core.common.businessentities.network.Bond ( ) ; bond.setSlaves ( java.util.Arrays.asList ( "slaveA" , "slaveB" ) ) ; doTestValidateModifiedBondSlaves ( bond , null , new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.HOST_NETWORK_INTERFACE_NOT_EXIST ) , ValidationResult.VALID , false , VdcBllMessages.HOST_NETWORK_INTERFACE_NOT_EXIST ) ; }

Target:
public void testValidateModifiedBondSlavesWhenSlaveInterfaceDoesNotExist ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.Bond bond = createBond ( ) ; bond.setSlaves ( java.util.Arrays.asList ( "slaveA" , "slaveB" ) ) ; org.ovirt.engine.core.common.action.HostSetupNetworksParameters params = new org.ovirt.engine.core.common.action.HostSetupNetworksParameters ( host.getId ( ) ) ; params.setBonds ( java.util.Collections.singletonList ( bond ) ) ; doTestValidateModifiedBondSlaves ( params , null , java.util.Collections.< org.ovirt.engine.core.common.businessentities.network.NetworkAttachment > emptyList ( ) , java.util.Collections.< org.ovirt.engine.core.common.businessentities.network.Network > emptyList ( ) , new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.HOST_NETWORK_INTERFACE_NOT_EXIST ) , ValidationResult.VALID , new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.HOST_NETWORK_INTERFACE_NOT_EXIST ) ) ; }
Source:
public void testValidModifiedBondsFailsWhenSlavesValidationFails ( ) throws java.lang.Exception { org.ovirt.engine.core.bll.ValidationResult slavesValidationResult = new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.NETWORK_INTERFACE_ATTACHED_TO_NETWORK_CANNOT_BE_SLAVE , org.ovirt.engine.core.utils.ReplacementUtils.createSetVariableString ( HostSetupNetworksValidator.NETWORK_INTERFACE_ATTACHED_TO_NETWORK_CANNOT_BE_SLAVE_ENTITY , "slaveA" ) , org.ovirt.engine.core.utils.ReplacementUtils.createSetVariableString ( HostSetupNetworksValidator.VAR_NETWORK_NAME , "networkName" ) ) ; org.ovirt.engine.core.common.businessentities.network.Bond bond = createBond ( ) ; bond.setSlaves ( java.util.Arrays.asList ( "slaveA" , "slaveB" ) ) ; doTestValidModifiedBonds ( bond , ValidationResult.VALID , ValidationResult.VALID , slavesValidationResult , slavesValidationResult ) ; }

Target:
public void testValidModifiedBondsFailsWhenSlavesValidationFails ( ) throws java.lang.Exception { org.ovirt.engine.core.common.errors.EngineMessage engineMessage = org.ovirt.engine.core.common.errors.EngineMessage.NETWORK_INTERFACE_ATTACHED_TO_NETWORK_CANNOT_BE_SLAVE ; org.ovirt.engine.core.bll.ValidationResult slavesValidationResult = new org.ovirt.engine.core.bll.ValidationResult ( engineMessage , org.ovirt.engine.core.utils.ReplacementUtils.getVariableAssignmentString ( engineMessage , "slaveA" ) , org.ovirt.engine.core.utils.ReplacementUtils.createSetVariableString ( HostSetupNetworksValidator.VAR_NETWORK_NAME , "networkName" ) ) ; org.ovirt.engine.core.common.businessentities.network.Bond bond = createBond ( ) ; bond.setSlaves ( java.util.Arrays.asList ( "slaveA" , "slaveB" ) ) ; doTestValidModifiedBonds ( bond , ValidationResult.VALID , ValidationResult.VALID , slavesValidationResult , slavesValidationResult ) ; }
Source:
public void getStorageDomainList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ( ) ; } } ; org.ovirt.engine.core.common.queries.SearchParameters searchParams = new org.ovirt.engine.core.common.queries.SearchParameters ( "Storage:" , org.ovirt.engine.core.common.interfaces.SearchType.StorageDomain ) ; searchParams.setMaxCount ( 9999 ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , searchParams , aQuery ) ; }

Target:
public void getExistingStorageDomainList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hostId , org.ovirt.engine.core.common.businessentities.StorageDomainType domainType , org.ovirt.engine.core.common.businessentities.storage.StorageType storageType , java.lang.String path ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetExistingStorageDomainList , new org.ovirt.engine.core.common.queries.GetExistingStorageDomainListParameters ( hostId , storageType , domainType , path ) , aQuery ) ; }
Source:
public void testListCrashClientLocale ( ) throws java.lang.Exception { javax.ws.rs.core.UriInfo uriInfo = setUpUriExpectations ( null ) ; locales.add ( org.ovirt.engine.api.restapi.resource.CLIENT_LOCALE ) ; java.lang.Throwable t = new java.lang.RuntimeException ( FAILURE ) ; setUpEntityQueryExpectations ( 1 , t ) ; collection.setUriInfo ( uriInfo ) ; try { getCollection ( ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , org.ovirt.engine.api.restapi.resource.BACKEND_FAILED_CLIENT_LOCALE , t ) ; } finally { locales.clear ( ) ; } }

Target:
public void testListCrashClientLocale ( ) throws java.lang.Exception { javax.ws.rs.core.UriInfo uriInfo = setUpUriExpectations ( null ) ; locales.add ( org.ovirt.engine.api.restapi.resource.CLIENT_LOCALE ) ; java.lang.Throwable t = new java.lang.RuntimeException ( FAILURE ) ; setUpEntityQueryExpectations ( 1 , t ) ; collection.setUriInfo ( uriInfo ) ; try { getCollection ( ) ; org.junit.Assert.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , org.ovirt.engine.api.restapi.resource.BACKEND_FAILED_CLIENT_LOCALE , t ) ; } finally { locales.clear ( ) ; } }