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

Target:
public java.util.List < org.ovirt.engine.core.common.businessentities.Quota > convert ( java.lang.Object returnValue , org.ovirt.engine.ui.frontend.AsyncQuery asyncQuery ) { java.util.List < org.ovirt.engine.core.common.businessentities.Quota > quotaList = ( ( java.util.List < org.ovirt.engine.core.common.businessentities.Quota > ) ( returnValue ) ) ; if ( ( quotaList != null ) && ( ! ( quotaList.isEmpty ( ) ) ) ) { java.util.Comparator < org.ovirt.engine.core.common.businessentities.Quota > comparator = ( ( topId ) == null ) ? org.ovirt.engine.ui.uicommonweb.comparators.QuotaComparator.NAME : org.ovirt.engine.ui.uicommonweb.comparators.QuotaComparator.withTopId ( topId , QuotaComparator.NAME ) ; java.util.Collections.sort ( quotaList , comparator ) ; } return quotaList ; }
Source:
protected void setUpGetClusterExpectations ( ) { org.ovirt.engine.core.common.businessentities.VDSGroup cluster = new org.ovirt.engine.core.common.businessentities.VDSGroup ( ) ; cluster.setstorage_pool_id ( GUIDS [ 2 ] ) ; setUpEntityQueryExpectations ( VdcQueryType.GetVdsGroupById , org.ovirt.engine.core.common.queries.GetVdsGroupByIdParameters.class , new java.lang.String [ ] { "VdsId" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendClusterNetworksResourceTest.CLUSTER_ID } , cluster , null ) ; }

Target:
protected void setUpGetClusterExpectations ( ) { org.ovirt.engine.core.common.businessentities.VDSGroup cluster = new org.ovirt.engine.core.common.businessentities.VDSGroup ( ) ; cluster.setStoragePoolId ( GUIDS [ 2 ] ) ; setUpEntityQueryExpectations ( VdcQueryType.GetVdsGroupById , org.ovirt.engine.core.common.queries.GetVdsGroupByIdParameters.class , new java.lang.String [ ] { "VdsId" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendClusterNetworksResourceTest.CLUSTER_ID } , cluster , null ) ; }
Source:
protected void ItemsChanging ( java.lang.Iterable newValue , java.lang.Iterable oldValue ) { org.ovirt.engine.core.compat.IProvideCollectionChangedEvent notifier = ( ( org.ovirt.engine.core.compat.IProvideCollectionChangedEvent ) ( ( oldValue instanceof org.ovirt.engine.core.compat.IProvideCollectionChangedEvent ) ? oldValue : null ) ) ; if ( notifier != null ) { notifier.getCollectionChangedEvent ( ) . removeListener ( this ) ; } notifier = ( ( org.ovirt.engine.core.compat.IProvideCollectionChangedEvent ) ( ( newValue instanceof org.ovirt.engine.core.compat.IProvideCollectionChangedEvent ) ? newValue : null ) ) ; if ( notifier != null ) { notifier.getCollectionChangedEvent ( ) . addListener ( this ) ; } UnsubscribeList ( oldValue ) ; SubscribeList ( newValue ) ; }

Target:
protected void ItemsChanging ( java.lang.Iterable newValue , java.lang.Iterable oldValue ) { org.ovirt.engine.ui.uicompat.IProvideCollectionChangedEvent notifier = ( ( org.ovirt.engine.ui.uicompat.IProvideCollectionChangedEvent ) ( ( oldValue instanceof org.ovirt.engine.ui.uicompat.IProvideCollectionChangedEvent ) ? oldValue : null ) ) ; if ( notifier != null ) { notifier.getCollectionChangedEvent ( ) . removeListener ( this ) ; } notifier = ( ( org.ovirt.engine.ui.uicompat.IProvideCollectionChangedEvent ) ( ( newValue instanceof org.ovirt.engine.ui.uicompat.IProvideCollectionChangedEvent ) ? newValue : null ) ) ; if ( notifier != null ) { notifier.getCollectionChangedEvent ( ) . addListener ( this ) ; } UnsubscribeList ( oldValue ) ; SubscribeList ( newValue ) ; }
Source:
public static java.lang.String startPasswordDialog ( java.lang.String user , java.lang.String msg ) throws java.io.IOException { org.ovirt.engine.core.config.EngineConfigLogic.log.debug ( "starting password dialog." ) ; if ( user == null ) { java.lang.System.out.printf ( msg ) ; } else { java.lang.System.out.printf ( "%s for %s: " , msg , user ) ; } return new java.lang.String ( java.lang.System.console ( ) . readPassword ( ) ) ; }

Target:
public static java.lang.String startPasswordDialog ( java.lang.String user , java.lang.String msg ) throws java.io.IOException { org.ovirt.engine.core.config.EngineConfigLogic.log.debug ( "starting password dialog." ) ; java.lang.String prompt = null ; if ( user != null ) { prompt = ( ( msg + " for " ) + user ) + ": " ; } else { prompt = msg + ": " ; } return new java.lang.String ( org.ovirt.engine.core.config.EngineConfigLogic.console.readPassword ( prompt ) ) ; }
Source:
public java.util.ArrayList < org.ovirt.engine.core.common.action.VdcReturnValueBase > execute ( ) { for ( org.ovirt.engine.core.common.action.VdcActionParametersBase parameter : parameters ) { if ( ! ( isInternal ) ) { logExecution ( org.ovirt.engine.core.bll.SequentialMultipleActionsRunner.log , sessionDataContainer , parameter.getSessionId ( ) , java.lang.String.format ( "command %s" , actionType ) ) ; } org.ovirt.engine.core.bll.CommandBase < ? > command = commandFactory.createWrappedCommand ( commandContext , actionType , parameter , isInternal ) ; commandFactory.prepareCommandForMonitoring ( commandContext , command ) ; returnValues.add ( command.executeAction ( ) ) ; } return returnValues ; }

Target:
public java.util.ArrayList < org.ovirt.engine.core.common.action.VdcReturnValueBase > execute ( ) { for ( org.ovirt.engine.core.common.action.ActionParametersBase parameter : parameters ) { if ( ! ( isInternal ) ) { logExecution ( org.ovirt.engine.core.bll.SequentialMultipleActionsRunner.log , sessionDataContainer , parameter.getSessionId ( ) , java.lang.String.format ( "command %s" , actionType ) ) ; } org.ovirt.engine.core.bll.CommandBase < ? > command = commandFactory.createWrappedCommand ( commandContext , actionType , parameter , isInternal ) ; commandFactory.prepareCommandForMonitoring ( commandContext , command ) ; returnValues.add ( command.executeAction ( ) ) ; } return returnValues ; }
Source:
public org.ovirt.engine.core.bll.ValidationResult validateVmStatusUsingMatrix ( org.ovirt.engine.core.common.businessentities.VM vm ) { if ( ! ( org.ovirt.engine.core.common.VdcActionUtils.canExecute ( java.util.Arrays.asList ( vm ) , org.ovirt.engine.core.common.businessentities.VM.class , VdcActionType.RunVm ) ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.ACTION_TYPE_FAILED_VM_STATUS_ILLEGAL ) ; } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult validateVmStatusUsingMatrix ( org.ovirt.engine.core.common.businessentities.VM vm ) { if ( ! ( org.ovirt.engine.core.common.VdcActionUtils.canExecute ( java.util.Arrays.asList ( vm ) , org.ovirt.engine.core.common.businessentities.VM.class , VdcActionType.RunVm ) ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.ACTION_TYPE_FAILED_VM_STATUS_ILLEGAL , org.ovirt.engine.core.bll.validator.LocalizedVmStatus.from ( vm.getStatus ( ) ) ) ; } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }
Source:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { final java.util.List < org.ovirt.engine.core.common.businessentities.StoragePool > dataCenters = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StoragePool > ( ) ; for ( org.ovirt.engine.core.common.businessentities.StoragePool a : ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StoragePool > ) ( returnValue ) ) ) { if ( ( a.getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.StoragePoolStatus.Up ) ) { dataCenters.add ( a ) ; } } postDataCentersLoaded ( dataCenters ) ; }

Target:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { final java.util.List < org.ovirt.engine.core.common.businessentities.StoragePool > dataCenters = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StoragePool > ( ) ; for ( org.ovirt.engine.core.common.businessentities.StoragePool a : ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StoragePool > ) ( returnValue ) ) ) { if ( ( a.getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.StoragePoolStatus.Up ) ) { dataCenters.add ( a ) ; } } if ( ! ( dataCenters.isEmpty ( ) ) ) { postDataCentersLoaded ( dataCenters ) ; } else { getModel ( ) . disableEditing ( ) ; } }
Source:
public void postUpdateItemsAvailability ( org.ovirt.engine.ui.uicommonweb.models.storage.IStorageModel item , boolean isNoExportOrIsoStorageAttached ) { org.ovirt.engine.core.common.businessentities.StoragePool dataCenter = getModel ( ) . getDataCenter ( ) . getSelectedItem ( ) ; org.ovirt.engine.ui.uicommonweb.models.Model model = ( ( org.ovirt.engine.ui.uicommonweb.models.Model ) ( item ) ) ; boolean isItemSelectable = isItemSelectable ( item , dataCenter , isNoExportOrIsoStorageAttached ) ; model.setIsSelectable ( isItemSelectable ) ; onStorageModelUpdated ( item ) ; }

Target:
public void postUpdateItemsAvailability ( org.ovirt.engine.ui.uicommonweb.models.storage.IStorageModel item , boolean isNoExportOrIsoStorageAttached ) { org.ovirt.engine.core.common.businessentities.StoragePool dataCenter = getModel ( ) . getDataCenter ( ) . getSelectedItem ( ) ; checkCanItemBeSelected ( item , dataCenter , isNoExportOrIsoStorageAttached ) ; }
Source:
public boolean storageDomainRemoved ( org.ovirt.engine.core.common.businessentities.StorageDomainStatic storageDomain ) { java.util.List < org.ovirt.engine.core.common.businessentities.StorageServerConnections > list = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStorageServerConnectionDao ( ) . getAllForVolumeGroup ( storageDomain.getStorage ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.StorageServerConnections connection : filterConnectionsUsedByOthers ( list , storageDomain.getStorage ( ) , "" ) ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStorageServerConnectionDao ( ) . remove ( connection.getId ( ) ) ; } removeStorageDomainLuns ( storageDomain ) ; return true ; }

Target:
public boolean storageDomainRemoved ( org.ovirt.engine.core.common.businessentities.StorageDomainStatic storageDomain ) { java.util.List < org.ovirt.engine.core.common.businessentities.StorageServerConnections > list = storageServerConnectionDao.getAllForVolumeGroup ( storageDomain.getStorage ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.StorageServerConnections connection : filterConnectionsUsedByOthers ( list , storageDomain.getStorage ( ) , "" ) ) { storageServerConnectionDao.remove ( connection.getId ( ) ) ; } removeStorageDomainLuns ( storageDomain ) ; return true ; }
Source:
public void validateVmRunningStateless ( ) { createParameters ( ) ; initDiskImage ( diskImageGroupId , diskImageId ) ; initVm ( VMStatus.Up , org.ovirt.engine.core.compat.Guid.newGuid ( ) , diskImageGroupId ) ; org.mockito.Mockito.doReturn ( new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_VM_RUNNING_STATELESS ) ) . when ( vmValidator ) . vmNotRunningStateless ( ) ; org.junit.Assert.assertFalse ( command.validate ( ) ) ; org.junit.Assert.assertTrue ( command.getReturnValue ( ) . getValidationMessages ( ) . contains ( EngineMessage.ACTION_TYPE_FAILED_VM_RUNNING_STATELESS.name ( ) ) ) ; }

Target:
public void validateFailsOnPassDiscardSupport ( ) { createParameters ( ) ; initDiskImage ( diskImageGroupId , diskImageId ) ; initVm ( VMStatus.Up , org.ovirt.engine.core.compat.Guid.newGuid ( ) , diskImageGroupId ) ; org.ovirt.engine.core.common.businessentities.StorageDomain srcSd = initStorageDomain ( srcStorageId ) ; srcSd.setStatus ( StorageDomainStatus.Active ) ; org.ovirt.engine.core.common.businessentities.StorageDomain dstSd = initStorageDomain ( dstStorageId ) ; dstSd.setStatus ( StorageDomainStatus.Active ) ; org.mockito.Mockito.when ( diskVmElementValidator.isPassDiscardSupported ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_PASS_DISCARD_NOT_SUPPORTED_BY_DISK_INTERFACE ) ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( command , EngineMessage.ACTION_TYPE_FAILED_PASS_DISCARD_NOT_SUPPORTED_BY_DISK_INTERFACE ) ; }
Source:
private void validateListItems ( org.ovirt.engine.ui.uicommonweb.models.ListModel < ? > listModel ) { org.ovirt.engine.ui.uicommonweb.validation.ValidationResult result = new org.ovirt.engine.ui.uicommonweb.validation.NotEmptyValidation ( ) . validate ( listModel.getSelectedItem ( ) ) ; if ( ! ( result.getSuccess ( ) ) ) { listModel.setIsValid ( false ) ; for ( java.lang.String reason : result.getReasons ( ) ) { listModel.getInvalidityReasons ( ) . add ( reason ) ; } } else { listModel.setIsValid ( true ) ; } }

Target:
private void validateListItems ( org.ovirt.engine.ui.uicommonweb.models.ListModel < ? > listModel ) { org.ovirt.engine.ui.uicommonweb.validation.ValidationResult result = new org.ovirt.engine.ui.uicommonweb.validation.NotEmptyValidation ( ) . validate ( listModel.getSelectedItem ( ) ) ; listModel.setIsValid ( result.getSuccess ( ) ) ; listModel.getInvalidityReasons ( ) . addAll ( result.getReasons ( ) ) ; }
Source:
private static java.util.Set < org.ovirt.engine.core.compat.Version > createVersionSet ( ) { java.util.Set < org.ovirt.engine.core.compat.Version > versions = new java.util.HashSet < org.ovirt.engine.core.compat.Version > ( ) ; versions.add ( org.ovirt.engine.core.bll.UpdateVdsGroupCommandTest.VERSION_1_0 ) ; versions.add ( org.ovirt.engine.core.bll.UpdateVdsGroupCommandTest.VERSION_1_1 ) ; versions.add ( org.ovirt.engine.core.bll.UpdateVdsGroupCommandTest.VERSION_1_2 ) ; return versions ; }

Target:
private void setValidCpuVersionMap ( ) { mcr.mockConfigValue ( ConfigValues.SupportedClusterLevels , org.ovirt.engine.core.bll.UpdateVdsGroupCommandTest.versions ) ; }
Source:
public org.ovirt.engine.sdk.entities.Action iscsidiscover ( org.ovirt.engine.sdk.entities.Action action ) throws java.io.IOException , org.apache.http.client.ClientProtocolException , org.ovirt.engine.sdk.exceptions.ServerException { java.lang.String url = ( this . getHref ( ) ) + "/iscsidiscover" ; java.util.List < org.apache.http.Header > headers = new org.ovirt.engine.sdk.utils.HttpHeaderBuilder ( ) . build ( ) ; url = new org.ovirt.engine.sdk.utils.UrlBuilder ( url ) . build ( ) ; return getProxy ( ) . action ( url , action , org.ovirt.engine.sdk.entities.Action.class , org.ovirt.engine.sdk.entities.Action.class , headers ) ; }

Target:
public org.ovirt.engine.sdk.entities.Action fence ( org.ovirt.engine.sdk.entities.Action action ) throws java.io.IOException , org.apache.http.client.ClientProtocolException , org.ovirt.engine.sdk.exceptions.ServerException { java.lang.String url = ( this . getHref ( ) ) + "/fence" ; org.ovirt.engine.sdk.utils.HttpHeaderBuilder headersBuilder = new org.ovirt.engine.sdk.utils.HttpHeaderBuilder ( ) ; java.util.List < org.apache.http.Header > headers = headersBuilder.build ( ) ; org.ovirt.engine.sdk.utils.UrlBuilder urlBuilder = new org.ovirt.engine.sdk.utils.UrlBuilder ( url ) ; url = urlBuilder.build ( ) ; return getProxy ( ) . action ( url , action , org.ovirt.engine.sdk.entities.Action.class , org.ovirt.engine.sdk.entities.Action.class , headers ) ; }
Source:
public void testValidateWithAttachedStorageDomainAndNoFormat ( ) { storageDomain.setStorageType ( StorageType.NFS ) ; storageDomain.setStorageDomainType ( StorageDomainType.Data ) ; org.mockito.Mockito.doReturn ( java.lang.Boolean.TRUE ) . when ( command ) . isStorageDomainAttached ( storageDomain ) ; command.getParameters ( ) . setDoFormat ( false ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateSuccess ( command ) ; }

Target:
public void testValidateWithAttachedStorageDomainAndNoFormat ( ) { storageDomain.setStorageType ( StorageType.NFS ) ; storageDomain.setStorageDomainType ( StorageDomainType.Data ) ; org.mockito.Mockito.doReturn ( java.lang.Boolean.TRUE ) . when ( command ) . isStorageDomainAttached ( storageDomain ) ; command.getParameters ( ) . setDoFormat ( false ) ; setVdsStatus ( VDSStatus.Up ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateSuccess ( command ) ; }
Source:
public static void GetCPUList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Version 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.util.ArrayList < org.ovirt.engine.core.common.businessentities.ServerCpu > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ServerCpu > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllServerCpuList , new org.ovirt.engine.core.common.queries.GetAllServerCpuListParameters ( version ) , aQuery ) ; }

Target:
public static void GetDataCenterMaxNameLength ( 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.Integer ) ( source ) ) . intValue ( ) : 1 ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.StoragePoolNameSizeLimit , org.ovirt.engine.core.common.config.Config.DefaultConfigurationVersion ) , aQuery ) ; }
Source:
public java.util.List < org.ovirt.engine.core.common.businessentities.EventMap > getAllEventMaps ( ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) ; org.springframework.jdbc.core.simple.ParameterizedRowMapper < org.ovirt.engine.core.common.businessentities.EventMap > mapper = new org.springframework.jdbc.core.simple.ParameterizedRowMapper < org.ovirt.engine.core.common.businessentities.EventMap > ( ) { @ java.lang.Override public org.ovirt.engine.core.common.businessentities.EventMap mapRow ( java.sql.ResultSet rs , int rowNum ) throws java.sql.SQLException { org.ovirt.engine.core.common.businessentities.EventMap entity = new org.ovirt.engine.core.common.businessentities.EventMap ( ) ; entity.setEventUpName ( rs.getString ( "event_up_name" ) ) ; entity.setEventDownName ( rs.getString ( "event_down_name" ) ) ; return entity ; } } ; return getCallsHandler ( ) . executeReadList ( "GetAllFromevent_map" , mapper , parameterSource ) ; }

Target:
public java.util.List < org.ovirt.engine.core.common.businessentities.EventMap > getAllEventMaps ( ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) ; return getCallsHandler ( ) . executeReadList ( "GetAllFromevent_map" , org.ovirt.engine.core.dao.EventDAODbFacadeImpl.EventMapRowMapper.instance , parameterSource ) ; }
Source:
public void executeSave ( ) { org.ovirt.engine.core.common.action.NetworkQoSParametersBase parameters = new org.ovirt.engine.core.common.action.NetworkQoSParametersBase ( ) ; parameters.setNetworkQoS ( networkQoS ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runAction ( VdcActionType.UpdateNetworkQoS , parameters , new org.ovirt.engine.ui.uicompat.IFrontendActionAsyncCallback ( ) { @ java.lang.Override public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result1 ) { org.ovirt.engine.core.common.action.VdcReturnValueBase retVal = result1.getReturnValue ( ) ; boolean succeeded = false ; if ( ( retVal != null ) && ( retVal.getSucceeded ( ) ) ) { succeeded = true ; } postSaveAction ( succeeded ) ; } } ) ; }

Target:
public void executeSave ( ) { org.ovirt.engine.core.common.action.QosParametersBase < org.ovirt.engine.core.common.businessentities.network.NetworkQoS > parameters = new org.ovirt.engine.core.common.action.QosParametersBase < org.ovirt.engine.core.common.businessentities.network.NetworkQoS > ( ) ; parameters.setQos ( networkQoS ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runAction ( VdcActionType.UpdateNetworkQoS , parameters , new org.ovirt.engine.ui.uicompat.IFrontendActionAsyncCallback ( ) { @ java.lang.Override public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result1 ) { org.ovirt.engine.core.common.action.VdcReturnValueBase retVal = result1.getReturnValue ( ) ; boolean succeeded = false ; if ( ( retVal != null ) && ( retVal.getSucceeded ( ) ) ) { succeeded = true ; } postSaveAction ( succeeded ) ; } } ) ; }
Source:
public static void getClusterGlusterServices ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.core.common.queries.gluster.GlusterVolumeAdvancedDetailsParameters parameters = new org.ovirt.engine.core.common.queries.gluster.GlusterVolumeAdvancedDetailsParameters ( clusterId , null , null , false ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterVolumeAdvancedDetails , parameters , aQuery ) ; }

Target:
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.getInstance ( ) . runQuery ( VdcQueryType.GetStorageDomainById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( storageDomainId ) , aQuery ) ; }
Source:
public static java.util.List < org.ovirt.engine.core.aaa.DirectoryGroup > mapGroupRecords ( final java.lang.String authzName , final java.util.List < org.ovirt.engine.api.extensions.ExtMap > groups ) { java.util.List < org.ovirt.engine.core.aaa.DirectoryGroup > results = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.api.extensions.ExtMap group : groups ) { results.add ( org.ovirt.engine.core.aaa.DirectoryUtils.mapGroupRecord ( authzName , group ) ) ; } return results ; }

Target:
public static java.util.List < org.ovirt.engine.core.aaa.DirectoryGroup > mapGroupRecordsToDirectoryGroups ( final java.lang.String authzName , final java.util.List < org.ovirt.engine.api.extensions.ExtMap > groups ) { java.util.List < org.ovirt.engine.core.aaa.DirectoryGroup > results = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.api.extensions.ExtMap group : groups ) { results.add ( org.ovirt.engine.core.aaa.DirectoryUtils.mapGroupRecordToDirectoryGroup ( authzName , group ) ) ; } return results ; }
Source:
protected void expectGetConnections ( org.ovirt.engine.core.dao.StorageServerConnectionDao dao ) { for ( int i = 0 ; i < ( org.ovirt.engine.core.bll.GetLunsByVgIdQueryTest.GUIDS.length ) ; i ++ ) { org.mockito.Mockito.when ( dao.get ( org.ovirt.engine.core.bll.GetLunsByVgIdQueryTest.GUIDS [ i ] . toString ( ) ) ) . thenReturn ( setUpConnection ( i ) ) ; } }

Target:
protected void expectGetConnections ( ) { for ( int i = 0 ; i < ( org.ovirt.engine.core.bll.GetLunsByVgIdQueryTest.GUIDS.length ) ; i ++ ) { org.mockito.Mockito.when ( storageServerConnectionDao.get ( org.ovirt.engine.core.bll.GetLunsByVgIdQueryTest.GUIDS [ i ] . toString ( ) ) ) . thenReturn ( setUpConnection ( i ) ) ; } }
Source:
public org.ovirt.engine.core.bll.ValidationResult diskProfileNameNotUsed ( ) { for ( org.ovirt.engine.core.common.businessentities.profiles.DiskProfile profile : getDiskProfiles ( ) ) { if ( ( profile.getName ( ) . equals ( diskProfile.getName ( ) ) ) && ( ! ( profile.getId ( ) . equals ( diskProfile.getId ( ) ) ) ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.ACTION_TYPE_FAILED_PROFILE_NAME_IN_USE ) ; } } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult diskProfileNameNotUsed ( ) { for ( org.ovirt.engine.core.common.businessentities.profiles.DiskProfile profile : getDiskProfiles ( ) ) { if ( ( profile.getName ( ) . equals ( getDiskProfile ( ) . getName ( ) ) ) && ( ! ( profile.getId ( ) . equals ( getDiskProfile ( ) . getId ( ) ) ) ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.ACTION_TYPE_FAILED_PROFILE_NAME_IN_USE ) ; } } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }
Source:
public java.lang.Void runInTransaction ( ) { org.ovirt.engine.core.common.businessentities.VdsDynamic vdsDynamic = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVdsDynamicDao ( ) . get ( getVds ( ) . getId ( ) ) ; vdsDynamic.setnet_config_dirty ( getVds ( ) . getNetConfigDirty ( ) ) ; org.ovirt.engine.core.vdsbroker.ResourceManager.getInstance ( ) . runVdsCommand ( VDSCommandType.UpdateVdsDynamicData , new org.ovirt.engine.core.common.vdscommands.UpdateVdsDynamicDataVDSCommandParameters ( vdsDynamic ) ) ; return null ; }

Target:
public java.lang.Void runInTransaction ( ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVdsDynamicDao ( ) . updateNetConfigDirty ( getVds ( ) . getId ( ) , getVds ( ) . getNetConfigDirty ( ) ) ; return null ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc heartBeat ( ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "Host.ping" ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( response ) ; }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.BooleanReturnForXmlRpc glusterVolumeEmptyCheck ( java.lang.String volumeName ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "GlusterVolume.volumeEmptyCheck" ) . withParameter ( "volumeName" , volumeName ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.BooleanReturnForXmlRpc ( response , "volumeEmptyCheck" ) ; }
Source:
public void updateGridSize ( ) { int rowCount = org.ovirt.engine.ui.common.widget.table.ActionCellTable.getRowCount ( ) ; int height = ( ( org.ovirt.engine.ui.common.widget.table.ActionCellTable.getLoadingIndicator ( ) ) != null ) ? org.ovirt.engine.ui.common.widget.table.ActionCellTable.LOADING_HEIGHT : org.ovirt.engine.ui.common.widget.table.ActionCellTable.NO_ITEMS_HEIGHT ; if ( rowCount > 0 ) { height = rowCount * ( org.ovirt.engine.ui.common.widget.table.ActionCellTable.ROW_HEIGHT ) ; } updateGridSize ( height ) ; }

Target:
public void updateGridSize ( ) { int rowCount = org.ovirt.engine.ui.common.widget.table.ActionCellTable.getRowCount ( ) ; int height = ( ( org.ovirt.engine.ui.common.widget.table.ActionCellTable.getLoadingIndicator ( ) ) != null ) ? LOADING_HEIGHT : ROW_HEIGHT ; if ( rowCount > 0 ) { height = rowCount * ( ROW_HEIGHT ) ; } updateGridSize ( height ) ; }
Source:
private void assertDiskDescriptionMap ( org.ovirt.engine.core.common.businessentities.storage.Disk disk , java.lang.String expectedDiskAlias , java.lang.String expectedDiskDescription ) throws java.io.IOException { org.jgroups.util.Util.assertEquals ( "Should be map of disk alias and disk description" , java.lang.String.format ( ( "{\"DiskAlias\":\"%s\"," + "\"DiskDescription\":\"%s\"}" ) , expectedDiskAlias , org.apache.commons.lang.StringUtils.defaultString ( expectedDiskDescription ) ) , org.ovirt.engine.core.bll.MetadataDiskDescriptionHandler.generateJsonDiskDescription ( disk ) ) ; }

Target:
private void assertDiskDescriptionMap ( org.ovirt.engine.core.common.businessentities.storage.Disk disk , java.lang.String ... jsonEntries ) throws java.io.IOException { org.junit.Assert.assertEquals ( java.lang.String.format ( "{%s}" , org.apache.commons.lang.StringUtils.join ( jsonEntries , "," , 0 , jsonEntries.length ) ) , metadataDiskDescriptionHandler.generateJsonDiskDescription ( disk ) ) ; }
Source:
public void getStorageDomainDefaultWipeAfterDelete ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.common.businessentities.StorageType storageType ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter < java.lang.Boolean > ( ) { @ java.lang.Override public java.lang.Boolean Convert ( java.lang.Object returnValue , org.ovirt.engine.ui.frontend.AsyncQuery asyncQuery ) { return ( ( java.lang.Boolean ) ( returnValue ) ) ; } } ; org.ovirt.engine.core.common.queries.GetStorageDomainDefaultWipeAfterDeleteParameters params = new org.ovirt.engine.core.common.queries.GetStorageDomainDefaultWipeAfterDeleteParameters ( storageType ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageDomainDefaultWipeAfterDelete , params , aQuery ) ; }

Target:
public void getStorageDomainDefaultWipeAfterDelete ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.common.businessentities.storage.StorageType storageType ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter < java.lang.Boolean > ( ) { @ java.lang.Override public java.lang.Boolean Convert ( java.lang.Object returnValue , org.ovirt.engine.ui.frontend.AsyncQuery asyncQuery ) { return ( ( java.lang.Boolean ) ( returnValue ) ) ; } } ; org.ovirt.engine.core.common.queries.GetStorageDomainDefaultWipeAfterDeleteParameters params = new org.ovirt.engine.core.common.queries.GetStorageDomainDefaultWipeAfterDeleteParameters ( storageType ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageDomainDefaultWipeAfterDelete , params , aQuery ) ; }
Source:
protected void setStatus ( org.ovirt.engine.core.common.businessentities.VDSStatus status ) { if ( ( org.ovirt.engine.core.bll.FenceVdsBaseCommand.getVds ( ) . getStatus ( ) ) != status ) { org.ovirt.engine.core.bll.FenceVdsBaseCommand.getBackend ( ) . getResourceManager ( ) . RunVdsCommand ( VDSCommandType.SetVdsStatus , new org.ovirt.engine.core.common.vdscommands.SetVdsStatusVDSCommandParameters ( org.ovirt.engine.core.bll.FenceVdsBaseCommand.getVds ( ) . getId ( ) , status ) ) ; } }

Target:
protected void setStatus ( org.ovirt.engine.core.common.businessentities.VDSStatus status ) { org.ovirt.engine.core.common.businessentities.VdsDynamic currentHost = org.ovirt.engine.core.bll.FenceVdsBaseCommand.getDbFacade ( ) . getVdsDynamicDao ( ) . get ( org.ovirt.engine.core.bll.FenceVdsBaseCommand.getVds ( ) . getId ( ) ) ; if ( ( currentHost != null ) && ( ( currentHost.getStatus ( ) ) != status ) ) { org.ovirt.engine.core.bll.FenceVdsBaseCommand.getBackend ( ) . getResourceManager ( ) . RunVdsCommand ( VDSCommandType.SetVdsStatus , new org.ovirt.engine.core.common.vdscommands.SetVdsStatusVDSCommandParameters ( org.ovirt.engine.core.bll.FenceVdsBaseCommand.getVds ( ) . getId ( ) , status ) ) ; } }
Source:
public void testListCrashClientLocale ( ) throws java.lang.Exception { collection.setUriInfo ( setUpUriExpectations ( null ) ) ; locales.add ( org.ovirt.engine.api.restapi.resource.gluster.CLIENT_LOCALE ) ; java.lang.Throwable t = new java.lang.RuntimeException ( FAILURE ) ; setUpQueryExpectations ( org.ovirt.engine.api.restapi.resource.gluster.BackendGlusterVolumesResourceTest.defaultQuery , t ) ; collection.setParent ( org.ovirt.engine.api.restapi.resource.gluster.BackendGlusterVolumesResourceTest.parentMock ) ; try { getCollection ( ) ; org.junit.jupiter.api.Assertions.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , org.ovirt.engine.api.restapi.resource.gluster.BACKEND_FAILED_CLIENT_LOCALE , t ) ; } }

Target:
public void testListCrashClientLocale ( ) throws java.lang.Exception { collection.setUriInfo ( setUpUriExpectations ( null ) ) ; locales.add ( org.ovirt.engine.api.restapi.resource.gluster.CLIENT_LOCALE ) ; java.lang.Throwable t = new java.lang.RuntimeException ( FAILURE ) ; setUpQueryExpectations ( org.ovirt.engine.api.restapi.resource.gluster.BackendGlusterVolumesResourceTest.defaultQuery , t ) ; collection.setParent ( org.ovirt.engine.api.restapi.resource.gluster.BackendGlusterVolumesResourceTest.parentMock ) ; verifyFault ( org.junit.jupiter.api.Assertions.assertThrows ( javax.ws.rs.WebApplicationException.class , this :: getCollection ) , org.ovirt.engine.api.restapi.resource.gluster.BACKEND_FAILED_CLIENT_LOCALE , t ) ; }
Source:
private void newPoolNameIsAlreadyTaken ( ) { org.mockito.Mockito.when ( spDao.get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( new org.ovirt.engine.core.common.businessentities.StoragePool ( "foo" , org.ovirt.engine.core.compat.Guid.Empty , "foo" , StorageType.NFS.getValue ( ) , StoragePoolStatus.Up.getValue ( ) ) ) ; org.mockito.Mockito.when ( spDao.getByName ( org.mockito.Matchers.anyString ( ) ) ) . thenReturn ( org.ovirt.engine.core.bll.storage.UpdateStoragePoolCommandTest.createDefaultStoragePool ( ) ) ; }

Target:
private void newPoolNameIsAlreadyTaken ( ) { org.mockito.Mockito.when ( spDao.get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( new org.ovirt.engine.core.common.businessentities.StoragePool ( "foo" , "" , org.ovirt.engine.core.compat.Guid.Empty , "foo" , StorageType.NFS.getValue ( ) , StoragePoolStatus.Up.getValue ( ) ) ) ; org.mockito.Mockito.when ( spDao.getByName ( org.mockito.Matchers.anyString ( ) ) ) . thenReturn ( org.ovirt.engine.core.bll.storage.UpdateStoragePoolCommandTest.createDefaultStoragePool ( ) ) ; }
Source:
public org.ovirt.engine.core.bll.ValidationResult validateAddProvider ( ) { P properties = provider.getAdditionalProperties ( ) ; org.ovirt.engine.core.compat.Guid proxyHostId = properties.getProxyHostId ( ) ; if ( proxyHostId != null ) { org.ovirt.engine.core.common.businessentities.VDS proxyHost = getVdsDao ( ) . get ( proxyHostId ) ; if ( proxyHost == null ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.VDS_DOES_NOT_EXIST ) ; } if ( ! ( proxyHost.getStoragePoolId ( ) . equals ( properties.getStoragePoolId ( ) ) ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_VDS_NOT_IN_DEST_STORAGE_POOL ) ; } } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult validateAddProvider ( ) { P properties = provider.getAdditionalProperties ( ) ; org.ovirt.engine.core.compat.Guid proxyHostId = properties.getProxyHostId ( ) ; if ( proxyHostId != null ) { org.ovirt.engine.core.common.businessentities.VDS proxyHost = vdsDao.get ( proxyHostId ) ; if ( proxyHost == null ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.VDS_DOES_NOT_EXIST ) ; } if ( ! ( proxyHost.getStoragePoolId ( ) . equals ( properties.getStoragePoolId ( ) ) ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_VDS_NOT_IN_DEST_STORAGE_POOL ) ; } } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }
Source:
protected void executeCommand ( ) { try { addVmToDb ( ) ; org.ovirt.engine.core.common.businessentities.VM vm = getVm ( ) ; if ( vm.getImages ( ) . isEmpty ( ) ) { endVmRelatedOps ( ) ; } else { processImages ( ) ; } } catch ( java.lang.RuntimeException e ) { org.ovirt.engine.core.bll.network.MacPoolManager.getInstance ( ) . freeMacs ( macsAdded ) ; throw e ; } setSucceeded ( true ) ; }

Target:
protected void executeCommand ( ) { try { addVmToDb ( ) ; processImages ( ) ; if ( getReturnValue ( ) . getVdsmTaskIdList ( ) . isEmpty ( ) ) { endVmRelatedOps ( ) ; } } catch ( java.lang.RuntimeException e ) { org.ovirt.engine.core.bll.network.MacPoolManager.getInstance ( ) . freeMacs ( macsAdded ) ; throw e ; } org.ovirt.engine.core.bll.ImportVmCommand.setSucceeded ( true ) ; }
Source:
protected boolean canAddDomain ( ) { if ( ( ( ( org.ovirt.engine.core.bll.storage.AddSANStorageDomainCommand.getParameters ( ) . getLunIds ( ) ) == null ) || ( org.ovirt.engine.core.bll.storage.AddSANStorageDomainCommand.getParameters ( ) . getLunIds ( ) . isEmpty ( ) ) ) && ( org.apache.commons.lang.StringUtils.isEmpty ( org.ovirt.engine.core.bll.storage.AddSANStorageDomainCommand.getStorageDomain ( ) . getStorage ( ) ) ) ) { return failCanDoAction ( VdcBllMessages.ERROR_CANNOT_CREATE_STORAGE_DOMAIN_WITHOUT_VG_LV ) ; } if ( isLunsAlreadyInUse ( org.ovirt.engine.core.bll.storage.AddSANStorageDomainCommand.getParameters ( ) . getLunIds ( ) ) ) { return false ; } return true ; }

Target:
protected boolean canAddDomain ( ) { if ( ( ( ( org.ovirt.engine.core.bll.storage.AddSANStorageDomainCommand.getParameters ( ) . getLunIds ( ) ) == null ) || ( org.ovirt.engine.core.bll.storage.AddSANStorageDomainCommand.getParameters ( ) . getLunIds ( ) . isEmpty ( ) ) ) && ( org.apache.commons.lang.StringUtils.isEmpty ( org.ovirt.engine.core.bll.storage.AddSANStorageDomainCommand.getStorageDomain ( ) . getStorage ( ) ) ) ) { return failCanDoAction ( EngineMessage.ERROR_CANNOT_CREATE_STORAGE_DOMAIN_WITHOUT_VG_LV ) ; } if ( isLunsAlreadyInUse ( org.ovirt.engine.core.bll.storage.AddSANStorageDomainCommand.getParameters ( ) . getLunIds ( ) ) ) { return false ; } return true ; }
Source:
public static void initCache ( org.ovirt.engine.ui.uicommonweb.models.LoginModel loginModel ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.cacheConfigValues ( new org.ovirt.engine.ui.frontend.AsyncQuery ( loginModel , 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.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( target ) ; } } ) ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.initOsNames ( ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.initUniqueOsNames ( ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.initLinuxOsTypes ( ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.initWindowsOsTypes ( ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.initHasSpiceSupport ( ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.initNicHotplugSupportMap ( ) ; }

Target:
public static void initCache ( org.ovirt.engine.ui.uicommonweb.models.LoginModel loginModel ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.cacheConfigValues ( new org.ovirt.engine.ui.frontend.AsyncQuery ( loginModel , 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.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( target ) ; } } ) ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.initOsNames ( ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.initUniqueOsNames ( ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.initLinuxOsTypes ( ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.initWindowsOsTypes ( ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.initHasSpiceSupport ( ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.initNicHotplugSupportMap ( ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.initDiskHotpluggableInterfacesMap ( ) ; }
Source:
private void toggleVisibleWestPanel ( ) { org.ovirt.engine.ui.webadmin.widget.main.LayoutData layout = ( ( org.ovirt.engine.ui.webadmin.widget.main.LayoutData ) ( westPanel.getLayoutData ( ) ) ) ; if ( ( layout.size ) == 0 ) { double size = layout.oldSize ; if ( size == 0 ) { size = org.ovirt.engine.ui.webadmin.widget.main.TabbedSplitLayoutPanel.DEFAULT_STACK_PANEL_WIDTH ; } setWestPanelSize ( size ) ; } else { layout.oldSize = layout.size ; setWestPanelSize ( 0 ) ; } }

Target:
private void toggleVisibleWestPanel ( ) { org.ovirt.engine.ui.webadmin.widget.main.LayoutData layout = ( ( org.ovirt.engine.ui.webadmin.widget.main.LayoutData ) ( westPanel.getLayoutData ( ) ) ) ; if ( ( layout.size ) == 0 ) { double size = layout.oldSize ; if ( size == 0 ) { size = getStoredStackPanelWidth ( org.ovirt.engine.ui.webadmin.widget.main.TabbedSplitLayoutPanel.WEST_SPLITTER_OLD_KEY ) ; } setWestPanelSize ( size ) ; } else { layout.oldSize = layout.size ; setStoredSplitterWidth ( org.ovirt.engine.ui.webadmin.widget.main.TabbedSplitLayoutPanel.WEST_SPLITTER_OLD_KEY , layout.oldSize ) ; setWestPanelSize ( 0 ) ; } }
Source:
public static void getRpmVersionViaPublic ( 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.RunPublicQuery ( VdcQueryType.GetConfigurationValue , new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.ProductRPMVersion , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public static void getClusterGlusterServices ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.core.common.queries.gluster.GlusterVolumeAdvancedDetailsParameters parameters = new org.ovirt.engine.core.common.queries.gluster.GlusterVolumeAdvancedDetailsParameters ( clusterId , null , null , false ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterVolumeAdvancedDetails , parameters , aQuery ) ; }
Source:
public org.ovirt.engine.core.common.businessentities.VDS getUpServer ( org.ovirt.engine.core.compat.Guid clusterId ) { java.util.List < org.ovirt.engine.core.common.businessentities.VDS > servers = getAllUpServers ( clusterId ) ; if ( ( servers == null ) || ( servers.isEmpty ( ) ) ) { return null ; } return org.ovirt.engine.core.utils.RandomUtils.instance ( ) . pickRandom ( servers ) ; }

Target:
public org.ovirt.engine.core.common.businessentities.VDS getRandomUpServer ( org.ovirt.engine.core.compat.Guid clusterId ) { java.util.List < org.ovirt.engine.core.common.businessentities.VDS > servers = getAllUpServers ( clusterId ) ; if ( ( servers == null ) || ( servers.isEmpty ( ) ) ) { return null ; } return org.ovirt.engine.core.utils.RandomUtils.instance ( ) . pickRandom ( servers ) ; }
Source:
public static void getClusterGlusterServices ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.core.common.queries.gluster.GlusterVolumeAdvancedDetailsParameters parameters = new org.ovirt.engine.core.common.queries.gluster.GlusterVolumeAdvancedDetailsParameters ( clusterId , null , null , false ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterVolumeAdvancedDetails , parameters , aQuery ) ; }

Target:
public static void getHostFingerprint ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String hostAddress ) { 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.GetServerSSHKeyFingerprint , new org.ovirt.engine.core.common.queries.ServerParameters ( hostAddress ) , aQuery ) ; }
Source:
public void testUpdate ( ) throws java.lang.Exception { setUpGetEntityExpectations ( 2 ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.UpdateQuota , org.ovirt.engine.core.common.action.QuotaCRUDParameters.class , new java.lang.String [ ] { "QuotaId" , "Quota.Description" , "Quota.GraceVdsGroupPercentage" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendQuotaResourceTest.QUOTA_ID , DESCRIPTIONS [ 1 ] , 30 } , true , true ) ) ; verifyModel ( resource.update ( getModel ( ) ) , 0 ) ; }

Target:
public void testUpdate ( ) throws java.lang.Exception { setUpGetEntityExpectations ( 2 ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.UpdateQuota , org.ovirt.engine.core.common.action.QuotaCRUDParameters.class , new java.lang.String [ ] { "QuotaId" , "Quota.Description" , "Quota.GraceClusterPercentage" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendQuotaResourceTest.QUOTA_ID , DESCRIPTIONS [ 1 ] , 30 } , true , true ) ) ; verifyModel ( resource.update ( getModel ( ) ) , 0 ) ; }
Source:
public org.ovirt.engine.ui.common.presenter.AbstractModelBoundPopupPresenterWidget < ? extends org.ovirt.engine.ui.uicommonweb.models.Model , ? > getModelPopup ( org.ovirt.engine.ui.uicommonweb.models.configure.PermissionListModel source , org.ovirt.engine.ui.uicommonweb.UICommand lastExecutedCommand , org.ovirt.engine.ui.uicommonweb.models.Model windowModel ) { if ( lastExecutedCommand == ( getModel ( ) . getAddCommand ( ) ) ) { return popupProvider.get ( ) ; } else { return super . getModelPopup ( source , lastExecutedCommand , windowModel ) ; } }

Target:
public org.ovirt.engine.ui.common.uicommon.model.SearchableDetailModelProvider < org.ovirt.engine.core.common.businessentities.Permissions , org.ovirt.engine.ui.uicommonweb.models.profiles.VnicProfileListModel , org.ovirt.engine.ui.uicommonweb.models.configure.PermissionListModel > getVnicProfilePermissionListProvider ( com.google.gwt.event.shared.EventBus eventBus , com.google.inject.Provider < org.ovirt.engine.ui.common.presenter.popup.DefaultConfirmationPopupPresenterWidget > defaultConfirmPopupProvider , final com.google.inject.Provider < org.ovirt.engine.ui.webadmin.section.main.presenter.popup.PermissionsPopupPresenterWidget > popupProvider , final com.google.inject.Provider < org.ovirt.engine.ui.common.presenter.popup.RolePermissionsRemoveConfirmationPopupPresenterWidget > removeConfirmPopupProvider ) { return new org.ovirt.engine.ui.webadmin.uicommon.model.PermissionModelProvider < org.ovirt.engine.ui.uicommonweb.models.profiles.VnicProfileListModel > ( eventBus , defaultConfirmPopupProvider , removeConfirmPopupProvider , popupProvider , org.ovirt.engine.ui.uicommonweb.models.profiles.VnicProfileListModel.class ) ; }