auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
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 ) ; }

Target:
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 ) ; }
Source:
private boolean isAlreadyInRequestedStatus ( ) { org.ovirt.engine.core.vdsbroker.vdsbroker.FenceStatusReturnForXmlRpc result = fenceNode ( FenceActionType.STATUS ) ; org.ovirt.engine.core.common.businessentities.pm.FenceOperationResult actionResult = new org.ovirt.engine.core.common.businessentities.pm.FenceOperationResult ( org.ovirt.engine.core.common.businessentities.pm.FenceActionType.STATUS , result.getXmlRpcStatus ( ) . mCode , result.getXmlRpcStatus ( ) . mMessage , result.power , result.operationStatus ) ; return ( ( actionResult.getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.pm.FenceOperationResult.Status.SUCCESS ) ) && ( ( actionResult.getPowerStatus ( ) ) == ( getRequestedPowerStatus ( org.ovirt.engine.core.vdsbroker.vdsbroker.FenceVdsVDSCommand.getParameters ( ) . getAction ( ) ) ) ) ; }

Target:
private boolean isAlreadyInRequestedStatus ( ) { org.ovirt.engine.core.vdsbroker.vdsbroker.FenceStatusReturnForXmlRpc result = fenceNode ( FenceActionType.STATUS ) ; org.ovirt.engine.core.common.businessentities.pm.FenceOperationResult actionResult = new org.ovirt.engine.core.common.businessentities.pm.FenceOperationResult ( org.ovirt.engine.core.common.businessentities.pm.FenceActionType.STATUS , result.getXmlRpcStatus ( ) . code , result.getXmlRpcStatus ( ) . message , result.power , result.operationStatus ) ; return ( ( actionResult.getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.pm.FenceOperationResult.Status.SUCCESS ) ) && ( ( actionResult.getPowerStatus ( ) ) == ( getRequestedPowerStatus ( org.ovirt.engine.core.vdsbroker.vdsbroker.FenceVdsVDSCommand.getParameters ( ) . getAction ( ) ) ) ) ; }
Source:
protected void executeCommand ( ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getNetworkDao ( ) . update ( org.ovirt.engine.core.bll.storage.UpdateNetworkCommand.getParameters ( ) . getNetwork ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.VDSGroup cluster : _clusters ) { org.ovirt.engine.core.bll.AttachNetworkToVdsGroupCommand.SetNetworkStatus ( cluster.getId ( ) , org.ovirt.engine.core.bll.storage.UpdateNetworkCommand.getParameters ( ) . getNetwork ( ) ) ; } org.ovirt.engine.core.bll.storage.UpdateNetworkCommand.setSucceeded ( true ) ; }

Target:
protected void executeCommand ( ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getNetworkDao ( ) . update ( org.ovirt.engine.core.bll.network.dc.UpdateNetworkCommand.getParameters ( ) . getNetwork ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.VDSGroup cluster : _clusters ) { org.ovirt.engine.core.bll.AttachNetworkToVdsGroupCommand.SetNetworkStatus ( cluster.getId ( ) , org.ovirt.engine.core.bll.network.dc.UpdateNetworkCommand.getParameters ( ) . getNetwork ( ) ) ; } org.ovirt.engine.core.bll.network.dc.UpdateNetworkCommand.setSucceeded ( true ) ; }
Source:
public java.lang.Object getValue ( java.lang.Object obj , java.lang.Object defaultValue ) { java.lang.Object returnValue = null ; try { returnValue = pd.getReadMethod ( ) . invoke ( obj ) ; } catch ( java.lang.Exception e ) { org.ovirt.engine.core.compat.backendcompat.PropertyInfo.log.warn ( ( ( ( "Unable to get value of property: " + ( pd.getDisplayName ( ) ) ) + " for class " ) + ( obj.getClass ( ) . getName ( ) ) ) ) ; } return returnValue == null ? defaultValue : returnValue ; }

Target:
public java.lang.Object getValue ( java.lang.Object obj , java.lang.Object defaultValue ) { java.lang.Object returnValue = null ; try { returnValue = pd.getReadMethod ( ) . invoke ( obj ) ; } catch ( java.lang.Exception e ) { org.ovirt.engine.core.compat.backendcompat.PropertyInfo.log.warn ( "Unable to get value of property: '{}' for class {}: {}" , pd.getDisplayName ( ) , obj.getClass ( ) . getName ( ) , e.getMessage ( ) ) ; org.ovirt.engine.core.compat.backendcompat.PropertyInfo.log.debug ( "Exception" , e ) ; } return returnValue == null ? defaultValue : returnValue ; }
Source:
private void assertBondModified ( org.ovirt.engine.core.bll.SetupNetworksHelper helper , org.ovirt.engine.core.common.businessentities.VdsNetworkInterface expectedBond ) { org.junit.Assert.assertEquals ( 1 , helper.getBonds ( ) . size ( ) ) ; org.junit.Assert.assertEquals ( java.text.MessageFormat.format ( "Expected bond '{0}' to be modified but it wasn't. Modified bonds: {1}" , expectedBond , helper.getBonds ( ) ) , expectedBond , helper.getBonds ( ) . get ( 0 ) ) ; }

Target:
private void assertBondModified ( org.ovirt.engine.core.bll.SetupNetworksHelper helper , org.ovirt.engine.core.common.businessentities.VdsNetworkInterface expectedBond ) { org.junit.Assert.assertEquals ( 1 , helper.getBonds ( ) . size ( ) ) ; org.junit.Assert.assertEquals ( java.text.MessageFormat.format ( "Expected bond ''{0}'' to be modified but it wasn''t. Modified bonds: {1}" , expectedBond , helper.getBonds ( ) ) , expectedBond , helper.getBonds ( ) . get ( 0 ) ) ; }
Source:
public org.ovirt.engine.api.model.Files list ( ) { if ( org.ovirt.engine.api.restapi.resource.BackendStorageDomainResource.isIsoDomain ( getEntity ( org.ovirt.engine.api.model.StorageDomain.class , VdcQueryType.GetStorageDomainById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( asGuid ( storageDomainId ) ) , "storage_domain" ) ) ) { return mapCollection ( listFiles ( ) ) ; } else { return notFound ( org.ovirt.engine.api.model.Files.class ) ; } }

Target:
public org.ovirt.engine.api.model.Files list ( ) { if ( org.ovirt.engine.api.restapi.resource.BackendStorageDomainResource.isIsoDomain ( getEntity ( org.ovirt.engine.api.model.StorageDomain.class , QueryType.GetStorageDomainById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( asGuid ( storageDomainId ) ) , "storage_domain" ) ) ) { return mapCollection ( listFiles ( ) ) ; } else { return notFound ( org.ovirt.engine.api.model.Files.class ) ; } }
Source:
protected java.lang.Object runQuery ( org.ovirt.engine.core.common.queries.QueryType queryType , org.ovirt.engine.core.common.queries.VdcQueryParametersBase queryParams , java.lang.String sessionId ) { initQueryParams ( queryParams , sessionId ) ; org.ovirt.engine.core.common.queries.VdcQueryReturnValue result = backend.runQuery ( queryType , queryParams ) ; return ( result != null ) && ( result.getSucceeded ( ) ) ? result.getReturnValue ( ) : null ; }

Target:
protected java.lang.Object runQuery ( org.ovirt.engine.core.common.queries.QueryType queryType , org.ovirt.engine.core.common.queries.QueryParametersBase queryParams , java.lang.String sessionId ) { initQueryParams ( queryParams , sessionId ) ; org.ovirt.engine.core.common.queries.VdcQueryReturnValue result = backend.runQuery ( queryType , queryParams ) ; return ( result != null ) && ( result.getSucceeded ( ) ) ? result.getReturnValue ( ) : null ; }
Source:
public void ExecuteCommand ( org.ovirt.engine.ui.uicommonweb.UICommand command ) { super . ExecuteCommand ( command ) ; if ( command == ( getEditPolicyCommand ( ) ) ) { EditPolicy ( ) ; } else if ( org.ovirt.engine.core.compat.StringHelper.stringsEqual ( command.getName ( ) , "OnSavePolicy" ) ) { OnSavePolicy ( ) ; } else if ( org.ovirt.engine.core.compat.StringHelper.stringsEqual ( command.getName ( ) , "Cancel" ) ) { Cancel ( ) ; } }

Target:
protected void OnEntityChanged ( ) { super . OnEntityChanged ( ) ; if ( ( getEntity ( ) ) != null ) { UpdateVolumeDetails ( ) ; updateAlerts ( ) ; updateConsoleAddressPartiallyOverridden ( getEntity ( ) ) ; } UpdateActionAvailability ( ) ; }
Source:
public void canDoActionInvalidSourceDomain ( ) { createParameters ( ) ; org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain = initStorageDomain ( srcStorageId ) ; storageDomain.setstatus ( StorageDomainStatus.Locked ) ; initDiskImage ( diskImageId ) ; initVm ( VMStatus.Up , org.ovirt.engine.core.compat.Guid.NewGuid ( ) , diskImageId ) ; org.junit.Assert.assertFalse ( command.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( command.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_DOMAIN_STATUS_ILLEGAL.toString ( ) ) ) ; }

Target:
public void canDoActionInvalidSourceDomain ( ) { createParameters ( ) ; org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain = initStorageDomain ( srcStorageId ) ; storageDomain.setStatus ( StorageDomainStatus.Locked ) ; initDiskImage ( diskImageId ) ; initVm ( VMStatus.Up , org.ovirt.engine.core.compat.Guid.NewGuid ( ) , diskImageId ) ; org.junit.Assert.assertFalse ( command.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( command.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_DOMAIN_STATUS_ILLEGAL.toString ( ) ) ) ; }
Source:
private void setupMock ( ) throws java.lang.Exception { commandMock = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.EndExternalJobCommand ( parameters , null ) ) ; org.mockito.Mockito.when ( commandMock.getParameters ( ) ) . thenReturn ( parameters ) ; org.mockito.Mockito.doReturn ( jobDaoMock ) . when ( commandMock ) . getJobDao ( ) ; org.mockito.Mockito.when ( jobDaoMock.get ( org.ovirt.engine.core.bll.EndExternalJobCommandTest.jobId ) ) . thenReturn ( makeExternalTestJob ( org.ovirt.engine.core.bll.EndExternalJobCommandTest.jobId ) ) ; org.mockito.Mockito.when ( jobDaoMock.get ( org.ovirt.engine.core.bll.EndExternalJobCommandTest.nonExternalJobId ) ) . thenReturn ( makeNonExternalTestJob ( org.ovirt.engine.core.bll.EndExternalJobCommandTest.nonExternalJobId ) ) ; }

Target:
public void validateOkSucceeds ( ) throws java.lang.Exception { setupMock ( ) ; org.mockito.Mockito.when ( jobDaoMock.get ( org.ovirt.engine.core.bll.EndExternalJobCommandTest.jobId ) ) . thenReturn ( makeExternalTestJob ( ) ) ; org.junit.Assert.assertTrue ( commandMock.validate ( ) ) ; }
Source:
private void templateValidate ( ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . countAllTemplates ( new org.ovirt.engine.ui.frontend.AsyncQuery ( getModel ( ) , new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { int count = ( ( java.lang.Integer ) ( returnValue ) ) ; if ( count <= 1 ) { getModel ( ) . disableEditing ( org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getConstants ( ) . notAvailableWithNoTemplates ( ) ) ; } } } ) ) ; }

Target:
public void initialize ( org.ovirt.engine.ui.uicommonweb.models.SystemTreeItemModel systemTreeSelectedItem ) { super . initialize ( systemTreeSelectedItem ) ; getModel ( ) . getVmType ( ) . setIsChangeable ( true ) ; getModel ( ) . getPoolStateful ( ) . setIsChangeable ( true ) ; templateValidate ( ) ; instanceTypeManager = new org.ovirt.engine.ui.uicommonweb.models.vms.instancetypes.NewPoolInstanceTypeManager ( getModel ( ) ) ; getModel ( ) . getVmInitModel ( ) . init ( null ) ; getModel ( ) . getDisksAllocationModel ( ) . initializeAutoSelectTarget ( true , false ) ; }
Source:
public static void getAllDataCenterNetworks ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId ) { 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.network.Network > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.Network > ( ) ; } } ; org.ovirt.engine.core.common.queries.IdQueryParameters params = new org.ovirt.engine.core.common.queries.IdQueryParameters ( storagePoolId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetNetworksByDataCenterId , params , aQuery ) ; }

Target:
public void getDiskList ( 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.storage.DiskImage > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.DiskImage > ( ) ; } } ; org.ovirt.engine.core.common.queries.SearchParameters searchParams = new org.ovirt.engine.core.common.queries.SearchParameters ( "Disks:" , org.ovirt.engine.core.common.interfaces.SearchType.Disk ) ; searchParams.setMaxCount ( 9999 ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , searchParams , aQuery ) ; }
Source:
public static void GetLocalFSPath ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.String ) ( source ) ) : "" ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.RhevhLocalFSPath , org.ovirt.engine.core.common.config.Config.DefaultConfigurationVersion ) , aQuery ) ; }

Target:
public static void GetLocalFSPath ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.String ) ( source ) ) : "" ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.RhevhLocalFSPath , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
private java.util.Set < java.lang.String > createDiskAliasesList ( ) { java.util.Set < java.lang.String > res = new java.util.HashSet < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.Disk disk : parentModel.getAllCurrentDisks ( ) ) { res.add ( disk.getDiskAlias ( ) ) ; } return res ; }

Target:
private java.util.Set < java.lang.String > createDiskAliasesList ( ) { java.util.Set < java.lang.String > res = new java.util.HashSet < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.storage.Disk disk : parentModel.getAllCurrentDisks ( ) ) { res.add ( disk.getDiskAlias ( ) ) ; } return res ; }
Source:
public boolean StorageDomainRemoved ( org.ovirt.engine.core.common.businessentities.storage_domain_static storageDomain ) { int numOfRemovedLuns = removeStorageDomainLuns ( storageDomain ) ; if ( numOfRemovedLuns > 0 ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage_server_connections > list = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStorageServerConnectionDao ( ) . getAllForVolumeGroup ( storageDomain.getstorage ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.storage_server_connections connection : FilterConnectionsUsedByOthers ( list , storageDomain.getstorage ( ) ) ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStorageServerConnectionDao ( ) . remove ( connection.getid ( ) ) ; } } return true ; }

Target:
public boolean StorageDomainRemoved ( org.ovirt.engine.core.common.businessentities.StorageDomainStatic storageDomain ) { int numOfRemovedLuns = removeStorageDomainLuns ( storageDomain ) ; if ( numOfRemovedLuns > 0 ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage_server_connections > list = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStorageServerConnectionDao ( ) . getAllForVolumeGroup ( storageDomain.getstorage ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.storage_server_connections connection : FilterConnectionsUsedByOthers ( list , storageDomain.getstorage ( ) ) ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStorageServerConnectionDao ( ) . remove ( connection.getid ( ) ) ; } } return true ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { java.util.List < org.ovirt.engine.core.common.businessentities.GraphicsDevice > graphicsDevices = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ; java.util.Collection < org.ovirt.engine.core.common.businessentities.GraphicsType > graphicsTypesCollection = new java.util.HashSet < org.ovirt.engine.core.common.businessentities.GraphicsType > ( ) ; for ( org.ovirt.engine.core.common.businessentities.GraphicsDevice graphicsDevice : graphicsDevices ) { graphicsTypesCollection.add ( graphicsDevice.getGraphicsType ( ) ) ; } org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel.GraphicsTypes graphicsTypes = UnitVmModel.GraphicsTypes.fromGraphicsTypes ( graphicsTypesCollection ) ; org.ovirt.engine.ui.uicompat.Translator translator = org.ovirt.engine.ui.uicompat.EnumTranslator.getInstance ( ) ; setGraphicsType ( translator.get ( graphicsTypes ) ) ; }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { java.util.List < org.ovirt.engine.core.common.businessentities.GraphicsDevice > graphicsDevices = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ; java.util.Collection < org.ovirt.engine.core.common.businessentities.GraphicsType > graphicsTypesCollection = new java.util.HashSet < org.ovirt.engine.core.common.businessentities.GraphicsType > ( ) ; for ( org.ovirt.engine.core.common.businessentities.GraphicsDevice graphicsDevice : graphicsDevices ) { graphicsTypesCollection.add ( graphicsDevice.getGraphicsType ( ) ) ; } org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel.GraphicsTypes graphicsTypes = UnitVmModel.GraphicsTypes.fromGraphicsTypes ( graphicsTypesCollection ) ; org.ovirt.engine.ui.uicompat.Translator translator = org.ovirt.engine.ui.uicompat.EnumTranslator.getInstance ( ) ; setGraphicsType ( translator.translate ( graphicsTypes ) ) ; }
Source:
public void confFileNotExistInTar ( ) { givenListOfImagesAndVolumes ( ) ; givenTheWantedDiskImage ( ) ; mockVdcCommand ( ActionType.RetrieveImageData , successfulActionReturnValue ( new byte [ 10 ] ) ) ; java.util.Map < java.lang.String , java.lang.String > config = fetchConfig ( ) ; org.junit.Assert.assertThat ( config , org.hamcrest.core.Is.is ( java.util.Collections.emptyMap ( ) ) ) ; }

Target:
public void confFileNotExistInTar ( ) { givenListOfImagesAndVolumes ( ) ; givenTheWantedDiskImage ( ) ; mockVdcCommand ( ActionType.RetrieveImageData , successfulActionReturnValue ( new byte [ 10 ] ) ) ; java.util.Map < java.lang.String , java.lang.String > config = fetchConfig ( ) ; org.hamcrest.MatcherAssert.assertThat ( config , org.hamcrest.core.Is.is ( java.util.Collections.emptyMap ( ) ) ) ; }
Source:
protected void setUpQueryExpectations ( java.lang.String query , java.lang.Object failure ) throws java.lang.Exception { setUpEntityQueryExpectations ( VdcQueryType.GetErrataForVm , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , getErrata ( ) , failure ) ; control.replay ( ) ; }

Target:
protected void setUpQueryExpectations ( java.lang.String query , java.lang.Object failure ) throws java.lang.Exception { setUpEntityQueryExpectations ( VdcQueryType.GetErrataForVm , org.ovirt.engine.core.common.queries.GetErrataCountsParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , getErrataData ( ) , failure ) ; control.replay ( ) ; }
Source:
protected boolean setAndValidateCpuProfile ( ) { if ( ( org.ovirt.engine.core.bll.AddVmTemplateCommand.getParameters ( ) . getTemplateType ( ) ) == ( org.ovirt.engine.core.common.businessentities.VmEntityType.INSTANCE_TYPE ) ) { return true ; } return validate ( org.ovirt.engine.core.bll.profiles.CpuProfileHelper.setAndValidateCpuProfile ( org.ovirt.engine.core.bll.AddVmTemplateCommand.getParameters ( ) . getMasterVm ( ) , org.ovirt.engine.core.bll.AddVmTemplateCommand.getVdsGroup ( ) . getcompatibility_version ( ) ) ) ; }

Target:
protected boolean setAndValidateCpuProfile ( ) { if ( ( org.ovirt.engine.core.bll.AddVmTemplateCommand.getParameters ( ) . getTemplateType ( ) ) == ( org.ovirt.engine.core.common.businessentities.VmEntityType.INSTANCE_TYPE ) ) { return true ; } return validate ( org.ovirt.engine.core.bll.profiles.CpuProfileHelper.setAndValidateCpuProfile ( org.ovirt.engine.core.bll.AddVmTemplateCommand.getParameters ( ) . getMasterVm ( ) , org.ovirt.engine.core.bll.AddVmTemplateCommand.getVdsGroup ( ) . getCompatibilityVersion ( ) ) ) ; }
Source:
private org.ovirt.engine.core.bll.ValidationResult networkNotUsedByVms ( java.lang.String networkName ) { java.util.List < java.lang.String > vmNames = vmInterfaceManager.findActiveVmsUsingNetworks ( host.getId ( ) , java.util.Collections.singleton ( networkName ) ) ; return new org.ovirt.engine.core.common.utils.PluralMessages ( ) . getNetworkInUse ( vmNames , EngineMessage.VAR__ENTITIES__VM , EngineMessage.VAR__ENTITIES__VMS ) ; }

Target:
private org.ovirt.engine.core.bll.ValidationResult networkNotUsedByVms ( java.lang.String networkName ) { if ( org.ovirt.engine.core.common.FeatureSupported.changeNetworkUsedByVmSupported ( host.getVdsGroupCompatibilityVersion ( ) ) ) { return org.ovirt.engine.core.bll.ValidationResult.VALID ; } java.util.List < java.lang.String > vmNames = vmInterfaceManager.findActiveVmsUsingNetworks ( host.getId ( ) , java.util.Collections.singleton ( networkName ) ) ; return new org.ovirt.engine.core.common.utils.PluralMessages ( ) . getNetworkInUse ( vmNames , EngineMessage.VAR__ENTITIES__VM , EngineMessage.VAR__ENTITIES__VMS ) ; }
Source:
private void initTableColumns ( org.ovirt.engine.ui.webadmin.ApplicationConstants constants ) { contentSourcesTable.addEntityModelColumn ( new org.ovirt.engine.ui.common.widget.table.column.EntityModelTextColumn < org.ovirt.engine.core.common.businessentities.gluster.GlusterServerHook > ( ) { @ java.lang.Override public java.lang.String getText ( org.ovirt.engine.core.common.businessentities.gluster.GlusterServerHook entity ) { return entity.getServerName ( ) ; } } , constants.sourceGlusterHook ( ) ) ; contentSourcesTable.addEntityModelColumn ( new org.ovirt.engine.ui.common.widget.table.column.EntityModelEnumColumn < org.ovirt.engine.core.common.businessentities.gluster.GlusterServerHook , org.ovirt.engine.core.common.businessentities.gluster.GlusterHookStatus > ( ) { @ java.lang.Override protected org.ovirt.engine.core.common.businessentities.gluster.GlusterHookStatus getEnum ( org.ovirt.engine.core.common.businessentities.gluster.GlusterServerHook entity ) { return entity.getStatus ( ) ; } } , constants.statusGlusterHook ( ) ) ; }

Target:
private void initTableColumns ( org.ovirt.engine.ui.webadmin.ApplicationConstants constants ) { contentSourcesTable.addEntityModelColumn ( new org.ovirt.engine.ui.common.widget.table.column.AbstractEntityModelTextColumn < org.ovirt.engine.core.common.businessentities.gluster.GlusterServerHook > ( ) { @ java.lang.Override public java.lang.String getText ( org.ovirt.engine.core.common.businessentities.gluster.GlusterServerHook entity ) { return entity.getServerName ( ) ; } } , constants.sourceGlusterHook ( ) ) ; contentSourcesTable.addEntityModelColumn ( new org.ovirt.engine.ui.common.widget.table.column.AbstractEntityModelEnumColumn < org.ovirt.engine.core.common.businessentities.gluster.GlusterServerHook , org.ovirt.engine.core.common.businessentities.gluster.GlusterHookStatus > ( ) { @ java.lang.Override protected org.ovirt.engine.core.common.businessentities.gluster.GlusterHookStatus getEnum ( org.ovirt.engine.core.common.businessentities.gluster.GlusterServerHook entity ) { return entity.getStatus ( ) ; } } , constants.statusGlusterHook ( ) ) ; }
Source:
public java.lang.String getText ( java.lang.Object image ) { if ( image instanceof org.ovirt.engine.core.common.businessentities.RepoImage ) { return ( ( org.ovirt.engine.core.common.businessentities.RepoImage ) ( image ) ) . getFileType ( ) . toString ( ) ; } else if ( image instanceof org.ovirt.engine.core.common.businessentities.DiskImage ) { return ImageFileType.Disk.toString ( ) ; } return constants.unknown ( ) ; }

Target:
public java.lang.String getText ( java.lang.Object image ) { if ( image instanceof org.ovirt.engine.core.common.businessentities.storage.RepoImage ) { return ( ( org.ovirt.engine.core.common.businessentities.storage.RepoImage ) ( image ) ) . getFileType ( ) . toString ( ) ; } else if ( image instanceof org.ovirt.engine.core.common.businessentities.storage.DiskImage ) { return ImageFileType.Disk.toString ( ) ; } return constants.unknown ( ) ; }
Source:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; newImage = new org.ovirt.engine.core.common.businessentities.Image ( ) ; newImage.setActive ( true ) ; newImage.setTemplateImageId ( org.ovirt.engine.core.dao.ImageDaoTest.EXISTING_IMAGE_DISK_TEMPLATE_ID ) ; newImage.setSnapshotId ( org.ovirt.engine.core.dao.ImageDaoTest.EXISTING_SNAPSHOT_ID ) ; newImage.setId ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) ) ; newImage.setVolumeFormat ( VolumeFormat.COW ) ; newImage.setVolumeType ( VolumeType.Sparse ) ; newImage.setDiskId ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) ) ; newImage.setQuotaId ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; newImage = new org.ovirt.engine.core.common.businessentities.Image ( ) ; newImage.setActive ( true ) ; newImage.setTemplateImageId ( org.ovirt.engine.core.dao.ImageDaoTest.EXISTING_IMAGE_DISK_TEMPLATE_ID ) ; newImage.setSnapshotId ( org.ovirt.engine.core.dao.ImageDaoTest.EXISTING_SNAPSHOT_ID ) ; newImage.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; newImage.setVolumeFormat ( VolumeFormat.COW ) ; newImage.setVolumeType ( VolumeType.Sparse ) ; newImage.setDiskId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; newImage.setQuotaId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; }
Source:
private org.ovirt.engine.core.compat.Guid getStorageDomainIdByName ( java.lang.String storageDomainName ) { java.util.List < org.ovirt.engine.api.model.StorageDomain > storageDomains = getBackendCollection ( org.ovirt.engine.api.model.StorageDomain.class , VdcQueryType.GetAllStorageDomains , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) ) ; for ( org.ovirt.engine.api.model.StorageDomain storageDomain : storageDomains ) { if ( storageDomain.getStorageName ( ) . equals ( storageDomainName ) ) { return storageDomain.getId ( ) ; } } return null ; }

Target:
private org.ovirt.engine.core.compat.Guid getStorageDomainIdByName ( java.lang.String storageDomainName ) { java.util.List < org.ovirt.engine.api.model.StorageDomain > storageDomains = getBackendCollection ( org.ovirt.engine.api.model.StorageDomain.class , QueryType.GetAllStorageDomains , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) ) ; for ( org.ovirt.engine.api.model.StorageDomain storageDomain : storageDomains ) { if ( storageDomain.getStorageName ( ) . equals ( storageDomainName ) ) { return storageDomain.getId ( ) ; } } return null ; }
Source:
public void customPropertiesModified ( ) { org.ovirt.engine.core.common.businessentities.network.Network network = createManagementNetwork ( ) ; mockExistingNetworks ( network ) ; org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface = createNicSyncedWithNetwork ( "eth0" , network ) ; mockExistingIfaces ( iface ) ; iface.setCustomProperties ( createCustomProperties ( ) ) ; org.ovirt.engine.core.bll.network.host.SetupNetworksHelper helper = createHelper ( createParametersForNics ( iface ) , Version.v3_5 ) ; validateAndExpectNoViolations ( helper ) ; assertNoBondsModified ( helper ) ; assertNetworkModified ( helper , network ) ; assertNoNetworksRemoved ( helper ) ; assertNoBondsRemoved ( helper ) ; assertInterfaceModified ( helper , iface ) ; }

Target:
public void customPropertiesModified ( ) { org.ovirt.engine.core.common.businessentities.network.Network network = createManagementNetwork ( ) ; mockExistingNetworks ( network ) ; org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface = createNicSyncedWithNetwork ( "eth0" , network ) ; mockExistingIfaces ( iface ) ; customProperties.add ( iface , createCustomProperties ( ) ) ; org.ovirt.engine.core.bll.network.host.SetupNetworksHelper helper = createHelper ( createParametersForNics ( iface ) , Version.v3_5 ) ; validateAndExpectNoViolations ( helper ) ; assertNoBondsModified ( helper ) ; assertNetworkModified ( helper , network ) ; assertNoNetworksRemoved ( helper ) ; assertNoBondsRemoved ( helper ) ; assertNoInterfacesModified ( helper ) ; }
Source:
public synchronized void CancelTask ( org.ovirt.engine.core.compat.Guid vdsmTaskId ) { if ( _tasks.containsKey ( vdsmTaskId ) ) { org.ovirt.engine.core.bll.AsyncTaskManager.log.infoFormat ( "Attempting to cancel task '{0}'." , vdsmTaskId ) ; _tasks.get ( vdsmTaskId ) . stopTask ( ) ; _tasks.get ( vdsmTaskId ) . ConcreteStartPollingTask ( ) ; } }

Target:
public synchronized void cancelTask ( org.ovirt.engine.core.compat.Guid vdsmTaskId ) { if ( _tasks.containsKey ( vdsmTaskId ) ) { org.ovirt.engine.core.bll.AsyncTaskManager.log.infoFormat ( "Attempting to cancel task '{0}'." , vdsmTaskId ) ; _tasks.get ( vdsmTaskId ) . stopTask ( ) ; _tasks.get ( vdsmTaskId ) . ConcreteStartPollingTask ( ) ; } }
Source:
public void addExternallyManagedVms ( java.util.List < org.ovirt.engine.core.common.businessentities.VmStatic > externalVmList ) { for ( org.ovirt.engine.core.common.businessentities.VmStatic currVm : externalVmList ) { org.ovirt.engine.core.common.action.AddVmFromScratchParameters params = new org.ovirt.engine.core.common.action.AddVmFromScratchParameters ( currVm , null , null ) ; org.ovirt.engine.core.common.action.VdcReturnValueBase returnValue = org.ovirt.engine.core.bll.Backend.getInstance ( ) . runInternalAction ( VdcActionType.AddVmFromScratch , params , org.ovirt.engine.core.bll.job.ExecutionHandler.createInternalJobContext ( ) ) ; if ( ! ( returnValue.getSucceeded ( ) ) ) { org.ovirt.engine.core.bll.VdsEventListener.log.debugFormat ( "Failed adding Externally managed VM {0}" , currVm.getName ( ) ) ; } } }

Target:
public void handleVdsMaintenanceTimeout ( org.ovirt.engine.core.compat.Guid vdsId ) { org.ovirt.engine.core.bll.Backend.getInstance ( ) . runInternalAction ( VdcActionType.MaintenanceNumberOfVdss , new org.ovirt.engine.core.common.action.MaintenanceNumberOfVdssParameters ( java.util.Arrays.asList ( vdsId ) , true ) ) ; }
Source:
public java.lang.String getValue ( org.ovirt.engine.core.common.businessentities.DbUser object ) { java.lang.StringBuilder builder = new java.lang.StringBuilder ( ) ; for ( java.lang.String name : object.getGroupNames ( ) ) { if ( ( builder.length ( ) ) > 0 ) { builder.append ( "," ) ; } builder.append ( name ) ; } return builder.toString ( ) ; }

Target:
public java.lang.String getValue ( org.ovirt.engine.core.common.businessentities.aaa.DbUser object ) { java.lang.StringBuilder builder = new java.lang.StringBuilder ( ) ; for ( java.lang.String name : object.getGroupNames ( ) ) { if ( ( builder.length ( ) ) > 0 ) { builder.append ( "," ) ; } builder.append ( name ) ; } return builder.toString ( ) ; }
Source:
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 ) ; }

Target:
public static void getStorageConnectionsByDataCenterIdAndStorageType ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.common.businessentities.StorageType storageType ) { 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.GetConnectionsByDataCenterAndStorageTypeParameters params = new org.ovirt.engine.core.common.queries.GetConnectionsByDataCenterAndStorageTypeParameters ( storagePoolId , storageType ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetConnectionsByDataCenterAndStorageType , params , aQuery ) ; }
Source:
protected void executeCommand ( ) { org.ovirt.engine.core.bll.job.ExecutionContext context = new org.ovirt.engine.core.bll.job.ExecutionContext ( ) ; context.setJob ( job ) ; context.setStep ( step ) ; context.setMonitored ( true ) ; context.setExecutionMethod ( ExecutionMethod.AsStep ) ; org.ovirt.engine.core.bll.job.ExecutionHandler.endStep ( context , step , org.ovirt.engine.core.bll.EndExternalStepCommand.getParameters ( ) . getStatus ( ) ) ; org.ovirt.engine.core.bll.EndExternalStepCommand.setSucceeded ( true ) ; }

Target:
protected void executeCommand ( ) { org.ovirt.engine.core.bll.job.ExecutionContext context = new org.ovirt.engine.core.bll.job.ExecutionContext ( ) ; context.setJob ( job ) ; context.setStep ( step ) ; context.setMonitored ( true ) ; context.setExecutionMethod ( ExecutionMethod.AsStep ) ; executionHandler.endStep ( context , step , org.ovirt.engine.core.bll.EndExternalStepCommand.getParameters ( ) . getStatus ( ) ) ; org.ovirt.engine.core.bll.EndExternalStepCommand.setSucceeded ( true ) ; }
Source:
private void addDefaultClusterToPool ( ) { org.ovirt.engine.core.common.businessentities.VDSGroup defaultCluster = new org.ovirt.engine.core.common.businessentities.VDSGroup ( ) ; defaultCluster.setcompatibility_version ( org.ovirt.engine.core.bll.storage.UpdateStoragePoolCommandTest.VERSION_1_1 ) ; defaultCluster.setId ( org.ovirt.engine.core.bll.storage.UpdateStoragePoolCommandTest.DEFAULT_VDS_GROUP_ID ) ; java.util.List < org.ovirt.engine.core.common.businessentities.VDSGroup > clusters = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ( ) ; clusters.add ( defaultCluster ) ; org.mockito.Mockito.when ( vdsDao.getAllForStoragePool ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( clusters ) ; }

Target:
private void addHostsToCluster ( ) { org.ovirt.engine.core.common.businessentities.VDS host = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; java.util.List < org.ovirt.engine.core.common.businessentities.VDS > hosts = new java.util.ArrayList < > ( ) ; hosts.add ( host ) ; org.mockito.Mockito.when ( vdsDao.getAllForStoragePool ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( hosts ) ; }
Source:
public void testAddLunDisk_MissingType ( ) { org.ovirt.engine.api.model.Disk model = createIscsiLunDisk ( ) ; model.getLunStorage ( ) . setType ( null ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; control.replay ( ) ; try { collection.add ( model ) ; fail ( "expected WebApplicationException on incomplete parameters" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyIncompleteException ( wae , "Storage" , "validateDiskForCreation" , "type" ) ; } }

Target:
public void testAddLunDisk_MissingType ( ) { org.ovirt.engine.api.model.Disk model = createIscsiLunDisk ( ) ; model.getLunStorage ( ) . setType ( null ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; control.replay ( ) ; try { collection.add ( model ) ; fail ( "expected WebApplicationException on incomplete parameters" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyIncompleteException ( wae , "Storage" , "testAddLunDisk_MissingType" , "type" ) ; } }
Source:
private void addNonDefaultClusterToPool ( ) { org.ovirt.engine.core.common.businessentities.Cluster defaultCluster = new org.ovirt.engine.core.common.businessentities.Cluster ( ) ; defaultCluster.setCompatibilityVersion ( org.ovirt.engine.core.bll.storage.pool.UpdateStoragePoolCommandTest.VERSION_1_1 ) ; defaultCluster.setId ( org.ovirt.engine.core.bll.storage.pool.UpdateStoragePoolCommandTest.NON_DEFAULT_CLUSTER_ID ) ; java.util.List < org.ovirt.engine.core.common.businessentities.Cluster > clusters = new java.util.ArrayList < > ( ) ; clusters.add ( defaultCluster ) ; org.mockito.Mockito.when ( clusterDao.getAllForStoragePool ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( clusters ) ; }

Target:
private void addDefaultClusterToPool ( ) { org.ovirt.engine.core.common.businessentities.Cluster defaultCluster = new org.ovirt.engine.core.common.businessentities.Cluster ( ) ; defaultCluster.setCompatibilityVersion ( org.ovirt.engine.core.bll.storage.pool.UpdateStoragePoolCommandTest.VERSION_1_1 ) ; defaultCluster.setId ( org.ovirt.engine.core.bll.storage.pool.UpdateStoragePoolCommandTest.DEFAULT_CLUSTER_ID ) ; java.util.List < org.ovirt.engine.core.common.businessentities.Cluster > clusters = new java.util.ArrayList < > ( ) ; clusters.add ( defaultCluster ) ; org.mockito.Mockito.when ( clusterDao.getAllForStoragePool ( org.mockito.ArgumentMatchers.any ( ) ) ) . thenReturn ( clusters ) ; }
Source:
public static org.ovirt.engine.api.model.QosType mapQosType ( org.ovirt.engine.api.model.QosType qosType , org.ovirt.engine.api.model.QosType template ) { switch ( qosType ) { case STORAGE : return org.ovirt.engine.api.model.QosType.STORAGE ; case CPU : return org.ovirt.engine.api.model.QosType.CPU ; case NETWORK : return org.ovirt.engine.api.model.QosType.NETWORK ; default : throw new java.lang.IllegalArgumentException ( java.lang.String.format ( "QosType %s cannot be mapped to %s: " , qosType , org.ovirt.engine.api.model.QosType.class ) ) ; } }

Target:
public static org.ovirt.engine.api.model.QosType map ( org.ovirt.engine.api.model.QosType qosType , org.ovirt.engine.api.model.QosType template ) { switch ( qosType ) { case STORAGE : return org.ovirt.engine.api.model.QosType.STORAGE ; case CPU : return org.ovirt.engine.api.model.QosType.CPU ; case NETWORK : return org.ovirt.engine.api.model.QosType.NETWORK ; case HOSTNETWORK : return org.ovirt.engine.api.model.QosType.HOSTNETWORK ; default : throw new java.lang.IllegalArgumentException ( java.lang.String.format ( "QosType %s cannot be mapped to %s: " , qosType , org.ovirt.engine.api.model.QosType.class ) ) ; } }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc glusterVolumeGeoRepSessionStop ( java.lang.String volumeName , java.lang.String remoteHost , java.lang.String remoteVolumeName , java.lang.Boolean force ) { try { return new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( vdsServer.glusterVolumeGeoRepSessionStop ( volumeName , remoteHost , remoteVolumeName , force ) ) ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }

Target:
public org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeGeoRepStatusForXmlRpc glusterVolumeGeoRepSessionList ( java.lang.String volumeName ) { try { java.util.Map < java.lang.String , java.lang.Object > response ; response = vdsServer.glusterVolumeGeoRepSessionList ( volumeName ) ; return new org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeGeoRepStatusForXmlRpc ( response ) ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
Source:
protected void syncSearch ( ) { if ( ( getEntity ( ) ) == null ) { return ; } org.ovirt.engine.ui.frontend.AsyncQuery asyncQuery = new org.ovirt.engine.ui.frontend.AsyncQuery ( ) ; asyncQuery.setModel ( this ) ; asyncQuery.asyncCallback = new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override @ java.lang.SuppressWarnings ( value = "unchecked" ) public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.networks.NetworkExternalSubnetListModel.this . setItems ( ( ( java.util.List < org.ovirt.engine.core.common.businessentities.network.ExternalSubnet > ) ( returnValue ) ) ) ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getExternalSubnetsByNetworkId ( asyncQuery , getEntity ( ) . getId ( ) ) ; }

Target:
public void remove ( ) { if ( ( getWindow ( ) ) != null ) { return ; } org.ovirt.engine.ui.uicommonweb.models.vms.RemoveExternalSubnetModel model = new org.ovirt.engine.ui.uicommonweb.models.vms.RemoveExternalSubnetModel ( this , getSelectedItems ( ) ) ; setWindow ( model ) ; }
Source:
public static org.ovirt.engine.core.common.businessentities.StorageDomain findStorageDomainForMemory ( org.ovirt.engine.core.compat.Guid storagePoolId , java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > disksList ) { java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > domainsInPool = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStorageDomainDao ( ) . getAllForStoragePool ( storagePoolId ) ; return org.ovirt.engine.core.bll.VmHandler.findStorageDomainForMemory ( domainsInPool , disksList ) ; }

Target:
public static void updateOperationProgress ( final org.ovirt.engine.core.common.businessentities.VM vm ) { vm.setBackgroundOperationDescription ( org.ovirt.engine.core.vdsbroker.ResourceManager.getInstance ( ) . getVmManager ( vm.getId ( ) ) . getConvertOperationDescription ( ) ) ; vm.setBackgroundOperationProgress ( org.ovirt.engine.core.vdsbroker.ResourceManager.getInstance ( ) . getVmManager ( vm.getId ( ) ) . getConvertOperationProgress ( ) ) ; }
Source:
private org.ovirt.engine.core.bll.ValidationResult validateEligibleProxyHostExists ( ) { for ( org.ovirt.engine.core.common.businessentities.VDS host : org.ovirt.engine.core.bll.ImportVmFromExternalProviderCommand.getVdsDao ( ) . getAllForStoragePoolAndStatus ( org.ovirt.engine.core.bll.ImportVmFromExternalProviderCommand.getStoragePoolId ( ) , VDSStatus.Up ) ) { if ( isHostInSupportedClusterForProxyHost ( host ) ) { return ValidationResult.VALID ; } } return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_NO_HOST_CAN_BE_PROXY_FOR_IMPORT_VM , java.lang.String.format ( "$StoragePoolName %s" , org.ovirt.engine.core.bll.ImportVmFromExternalProviderCommand.getStoragePoolName ( ) ) ) ; }

Target:
private org.ovirt.engine.core.bll.ValidationResult validateEligibleProxyHostExists ( ) { for ( org.ovirt.engine.core.common.businessentities.VDS host : org.ovirt.engine.core.bll.ImportVmFromExternalProviderCommand.getVdsDao ( ) . getAllForStoragePoolAndStatus ( org.ovirt.engine.core.bll.ImportVmFromExternalProviderCommand.getStoragePoolId ( ) , VDSStatus.Up ) ) { if ( isHostInSupportedClusterForProxyHost ( host ) ) { return ValidationResult.VALID ; } } return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_NO_HOST_CAN_BE_PROXY_FOR_IMPORT_VM , java.lang.String.format ( "$storagePoolName %s" , org.ovirt.engine.core.bll.ImportVmFromExternalProviderCommand.getStoragePoolName ( ) ) ) ; }
Source:
public java.util.List < org.ovirt.engine.core.common.businessentities.RepoFileMetaData > getCachedIsoListByStoragePoolAndDomainId ( org.ovirt.engine.core.compat.Guid isoStoragePoolId , org.ovirt.engine.core.compat.Guid isoStorageDomainId , org.ovirt.engine.core.common.businessentities.ImageType imageType ) { java.util.List < org.ovirt.engine.core.common.businessentities.RepoFileMetaData > fileListMD = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.RepoFileMetaData > ( ) ; if ( ( ( isoStorageDomainId != null ) && ( isoStoragePoolId != null ) ) && ( ( org.ovirt.engine.core.bll.VmRunHandler.getInstance ( ) . findActiveISODomain ( isoStoragePoolId ) ) != null ) ) { fileListMD = repoStorageDom.getRepoListForStorageDomainAndStoragePool ( isoStoragePoolId , isoStorageDomainId , imageType ) ; } return fileListMD ; }

Target:
public java.util.List < org.ovirt.engine.core.common.businessentities.RepoFileMetaData > getCachedIsoListByDomainId ( org.ovirt.engine.core.compat.Guid isoStorageDomainId , org.ovirt.engine.core.common.businessentities.ImageFileType imageType ) { java.util.List < org.ovirt.engine.core.common.businessentities.RepoFileMetaData > fileListMD = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.RepoFileMetaData > ( ) ; if ( isoStorageDomainId != null ) { fileListMD = repoStorageDom.getRepoListForStorageDomain ( isoStorageDomainId , imageType ) ; } return fileListMD ; }
Source:
protected void setCommandStatus ( org.ovirt.engine.core.compat.CommandStatus status ) { this . commandStatus = status ; org.ovirt.engine.core.bll.tasks.TaskManagerUtil.updateCommandStatus ( getCommandId ( ) , getTaskType ( ) , commandStatus ) ; }

Target:
public void setCommandStatus ( org.ovirt.engine.core.compat.CommandStatus status , boolean updateDB ) { this . commandStatus = status ; if ( updateDB ) { javax.transaction.Transaction transaction = org.ovirt.engine.core.utils.transaction.TransactionSupport.suspend ( ) ; try { org.ovirt.engine.core.bll.tasks.TaskManagerUtil.updateCommandStatus ( getCommandId ( ) , getTaskType ( ) , commandStatus ) ; } finally { org.ovirt.engine.core.utils.transaction.TransactionSupport.resume ( transaction ) ; } } }