auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
protected void updateSgIoUnfilteredChangeability ( ) { if ( ! ( getIsScsiPassthrough ( ) . getEntity ( ) ) ) { getIsSgIoUnfiltered ( ) . setChangeProhibitionReason ( org.ovirt.engine.ui.uicommonweb.models.vms.AbstractDiskModel.constants.cannotEnableSgioWhenScsiPassthroughDisabled ( ) ) ; getIsSgIoUnfiltered ( ) . setIsChangeable ( false ) ; getIsSgIoUnfiltered ( ) . setEntity ( false ) ; return ; } getIsSgIoUnfiltered ( ) . setIsChangeable ( isEditEnabled ( ) ) ; }

Target:
protected void updateSgIoUnfilteredChangeability ( ) { if ( ! ( getIsScsiPassthrough ( ) . getEntity ( ) ) ) { getIsSgIoUnfiltered ( ) . setChangeProhibitionReason ( org.ovirt.engine.ui.uicommonweb.models.vms.AbstractDiskModel.constants.cannotEnableSgioWhenScsiPassthroughDisabled ( ) ) ; getIsSgIoUnfiltered ( ) . setIsChangeable ( false ) ; getIsSgIoUnfiltered ( ) . setEntity ( false ) ; return ; } if ( isEditEnabled ( ) ) { getIsSgIoUnfiltered ( ) . setChangeProhibitionReason ( null ) ; } getIsSgIoUnfiltered ( ) . setIsChangeable ( isEditEnabled ( ) ) ; }
Source:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.NewVmModelBehavior behavior = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.NewVmModelBehavior ) ( target ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.VmTemplate > templates = ( ( java.util.List < org.ovirt.engine.core.common.businessentities.VmTemplate > ) ( returnValue ) ) ; behavior.postInitTemplate ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.filterTemplatesByArchitecture ( templates , dataCenterWithCluster.getCluster ( ) . getArchitecture ( ) ) ) ; }

Target:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.NewVmModelBehavior behavior = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.NewVmModelBehavior ) ( target ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.VmTemplate > templates = ( ( java.util.List < org.ovirt.engine.core.common.businessentities.VmTemplate > ) ( returnValue ) ) ; behavior.postInitTemplate ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . filterTemplatesByArchitecture ( templates , dataCenterWithCluster.getCluster ( ) . getArchitecture ( ) ) ) ; }
Source:
public static org.ovirt.engine.core.common.businessentities.ActionGroup map ( org.ovirt.engine.api.model.Permit model , org.ovirt.engine.core.common.businessentities.ActionGroup template ) { assert ( model.isSetId ( ) ) || ( model.isSetName ( ) ) ; return template != null ? template : ( model.getId ( ) ) != null ? org.ovirt.engine.core.common.businessentities.ActionGroup.forValue ( java.lang.Integer.parseInt ( model.getId ( ) ) ) : org.ovirt.engine.core.common.businessentities.ActionGroup.valueOf ( model.getName ( ) . toUpperCase ( ) ) ; }

Target:
public static org.ovirt.engine.core.common.businessentities.ActionGroup map ( org.ovirt.engine.api.model.Permit model , org.ovirt.engine.core.common.businessentities.ActionGroup template ) { org.ovirt.engine.core.common.businessentities.ActionGroup entity = template ; if ( model.isSetId ( ) ) { entity = org.ovirt.engine.core.common.businessentities.ActionGroup.forValue ( java.lang.Integer.parseInt ( model.getId ( ) ) ) ; } if ( model.isSetName ( ) ) { entity = org.ovirt.engine.core.common.businessentities.ActionGroup.valueOf ( model.getName ( ) . toUpperCase ( ) ) ; } return entity ; }
Source:
public void OnSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.VmGuideModel vmGuideModel = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.VmGuideModel ) ( target ) ) ; java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > nics = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ) ( returnValue ) ) ; vmGuideModel.nics = nics ; vmGuideModel.AddNetworkPostData ( ) ; }

Target:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.VmGuideModel vmGuideModel = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.VmGuideModel ) ( target ) ) ; java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > nics = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ) ( returnValue ) ) ; vmGuideModel.nics = nics ; vmGuideModel.AddNetworkPostData ( ) ; }
Source:
public void initOvfDataUpdater ( ) { org.ovirt.engine.core.utils.timer.SchedulerUtil scheduler = org.ovirt.engine.core.di.Injector.get ( org.ovirt.engine.core.utils.timer.SchedulerUtilQuartzImpl.class ) ; updateTimerJobId = scheduler.scheduleAFixedDelayJob ( this , "ovfUpdateTimer" , new java.lang.Class [ ] { } , new java.lang.Object [ ] { } , org.ovirt.engine.core.common.config.Config.< java.lang.Integer > getValue ( ConfigValues.OvfUpdateIntervalInMinutes ) , org.ovirt.engine.core.common.config.Config.< java.lang.Integer > getValue ( ConfigValues.OvfUpdateIntervalInMinutes ) , java.util.concurrent.TimeUnit.MINUTES ) ; org.ovirt.engine.core.bll.storage.ovfstore.OvfDataUpdater.log.info ( "Initialization of OvfDataUpdater completed successfully." ) ; }

Target:
public void initOvfDataUpdater ( ) { updateTimerJobId = scheduler.scheduleAFixedDelayJob ( this , "ovfUpdateTimer" , new java.lang.Class [ ] { } , new java.lang.Object [ ] { } , org.ovirt.engine.core.common.config.Config.< java.lang.Integer > getValue ( ConfigValues.OvfUpdateIntervalInMinutes ) , org.ovirt.engine.core.common.config.Config.< java.lang.Integer > getValue ( ConfigValues.OvfUpdateIntervalInMinutes ) , java.util.concurrent.TimeUnit.MINUTES ) ; org.ovirt.engine.core.bll.storage.ovfstore.OvfDataUpdater.log.info ( "Initialization of OvfDataUpdater completed successfully." ) ; }
Source:
public static void getHostsForStorageOperation ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , boolean localFsOnly ) { 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 source ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetHostsForStorageOperation , new org.ovirt.engine.core.common.queries.GetHostsForStorageOperationParameters ( storagePoolId , localFsOnly ) , aQuery ) ; }

Target:
public void getHostsForStorageOperation ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , boolean localFsOnly ) { 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 source ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetHostsForStorageOperation , new org.ovirt.engine.core.common.queries.GetHostsForStorageOperationParameters ( storagePoolId , localFsOnly ) , aQuery ) ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object result ) { boolean returnValue = ( ( java.lang.Boolean ) ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( result ) ) . getReturnValue ( ) ) ) ; if ( returnValue ) { command.execute ( ) ; } else { displayConsoleConnectConfirmPopup ( command ) ; } }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object result ) { boolean returnValue = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( result ) ) . getReturnValue ( ) ; if ( returnValue ) { displayConsoleConnectConfirmPopup ( command ) ; } else { command.execute ( ) ; } }
Source:
public void onGetClusterList ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > clusterList ) { java.util.List < org.ovirt.engine.ui.uicommonweb.models.datacenters.NetworkClusterModel > items = new java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.datacenters.NetworkClusterModel > ( ) ; for ( org.ovirt.engine.core.common.businessentities.VDSGroup cluster : clusterList ) { items.add ( createNetworkClusterModel ( cluster ) ) ; } getNetworkClusterList ( ) . setItems ( items ) ; if ( firstInit ) { firstInit = false ; addCommands ( ) ; } }

Target:
protected void onGetClusterList ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > clusterList ) { java.util.List < org.ovirt.engine.ui.uicommonweb.models.datacenters.NetworkClusterModel > items = new java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.datacenters.NetworkClusterModel > ( ) ; for ( org.ovirt.engine.core.common.businessentities.VDSGroup cluster : clusterList ) { items.add ( createNetworkClusterModel ( cluster ) ) ; } getNetworkClusterList ( ) . setItems ( items ) ; if ( firstInit ) { firstInit = false ; addCommands ( ) ; } }
Source:
private void addGlusterTypesAndStates ( org.ovirt.engine.api.model.VersionCaps version ) { if ( org.ovirt.engine.api.restapi.utils.VersionUtils.greaterOrEqual ( version , org.ovirt.engine.api.restapi.resource.BackendCapabilitiesResource.VERSION_3_1 ) ) { addGlusterVolumeTypes ( version , org.ovirt.engine.api.model.GlusterVolumeType.values ( ) ) ; addTransportTypes ( version , org.ovirt.engine.api.model.TransportType.values ( ) ) ; addAccessProtocols ( version , org.ovirt.engine.api.model.AccessProtocol.values ( ) ) ; addGlusterVolumeStates ( version , org.ovirt.engine.api.model.GlusterState.values ( ) ) ; addGlusterBrickStates ( version , org.ovirt.engine.api.model.GlusterState.values ( ) ) ; } }

Target:
private void addGlusterTypesAndStates ( org.ovirt.engine.api.model.VersionCaps version ) { if ( org.ovirt.engine.api.restapi.utils.VersionUtils.greaterOrEqual ( version , org.ovirt.engine.api.restapi.resource.BackendCapabilitiesResource.VERSION_3_1 ) ) { addGlusterVolumeTypes ( version , org.ovirt.engine.api.model.GlusterVolumeType.values ( ) ) ; addTransportTypes ( version , org.ovirt.engine.api.model.TransportType.values ( ) ) ; addGlusterVolumeStates ( version , org.ovirt.engine.api.model.GlusterState.values ( ) ) ; addGlusterBrickStates ( version , org.ovirt.engine.api.model.GlusterState.values ( ) ) ; } }
Source:
public void testRemoveNotFound ( ) throws java.lang.Exception { setUpEntityQueryExpectations ( 1 , 0 , true ) ; control.replay ( ) ; try { resource.remove ( ) ; org.ovirt.engine.api.restapi.resource.AbstractBackendVnicProfileResourceTest.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }

Target:
public void testRemoveNotFound ( ) throws java.lang.Exception { setUpEntityQueryExpectations ( 1 , 0 , true ) ; try { resource.remove ( ) ; org.ovirt.engine.api.restapi.resource.AbstractBackendVnicProfileResourceTest.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }
Source:
private void addDiskAllocation ( org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel model ) { if ( ! ( model.getIsDisksAvailable ( ) ) ) { return ; } disksAllocationView.edit ( model.getDisksAllocationModel ( ) ) ; model.getDisksAllocationModel ( ) . getStorageDomain ( ) . setItems ( model.getStorageDomain ( ) . getItems ( ) ) ; model.getDisksAllocationModel ( ) . setDisks ( model.getDisks ( ) ) ; }

Target:
private void addDiskAllocation ( org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel model ) { if ( ! ( model.getIsDisksAvailable ( ) ) ) { return ; } disksAllocationView.edit ( model.getDisksAllocationModel ( ) ) ; model.getDisksAllocationModel ( ) . setDisks ( model.getDisks ( ) ) ; }
Source:
private java.lang.String getTokenFromHeader ( javax.servlet.http.HttpServletRequest request ) { java.lang.String token = null ; java.lang.String headerValue = request.getHeader ( SsoConstants.HEADER_AUTHORIZATION ) ; if ( ( headerValue != null ) && ( headerValue.startsWith ( org.ovirt.engine.core.sso.servlets.OpenIdUserInfoServlet.BEARER ) ) ) { token = headerValue.substring ( "Bearer" . length ( ) ) . trim ( ) ; } return token ; }

Target:
private java.lang.String getTokenFromHeader ( javax.servlet.http.HttpServletRequest request ) { java.lang.String token = null ; java.lang.String headerValue = request.getHeader ( SsoConstants.HEADER_AUTHORIZATION ) ; if ( ( headerValue != null ) && ( headerValue.startsWith ( org.ovirt.engine.core.sso.servlets.OpenIdUserInfoServlet.BEARER ) ) ) { token = headerValue.substring ( org.ovirt.engine.core.sso.servlets.OpenIdUserInfoServlet.BEARER.length ( ) ) . trim ( ) ; } return token ; }
Source:
public void setUp ( ) { org.mockito.Mockito.when ( iconDefaultsProvider.getVmIconDefaults ( ) ) . thenReturn ( new java.util.HashMap < java.lang.Integer , org.ovirt.engine.core.common.queries.VmIconIdSizePair > ( ) { { put ( 0 , new org.ovirt.engine.core.common.queries.VmIconIdSizePair ( org.ovirt.engine.core.compat.Guid.createGuidFromString ( "00000000-0000-0000-0000-00000000000a" ) , org.ovirt.engine.core.compat.Guid.createGuidFromString ( "00000000-0000-0000-0000-00000000000b" ) ) ) ; } } ) ; org.mockito.Mockito.doNothing ( ) . when ( ovfManager ) . updateBootOrderOnDevices ( org.mockito.ArgumentMatchers.any ( ) , org.mockito.ArgumentMatchers.anyBoolean ( ) ) ; ovfManager.setOsRepository ( osRepository ) ; }

Target:
public void setUp ( ) { org.mockito.Mockito.when ( iconDefaultsProvider.getVmIconDefaults ( ) ) . thenReturn ( new java.util.HashMap < java.lang.Integer , org.ovirt.engine.core.common.queries.VmIconIdSizePair > ( ) { { put ( 0 , new org.ovirt.engine.core.common.queries.VmIconIdSizePair ( org.ovirt.engine.core.compat.Guid.createGuidFromString ( "00000000-0000-0000-0000-00000000000a" ) , org.ovirt.engine.core.compat.Guid.createGuidFromString ( "00000000-0000-0000-0000-00000000000b" ) ) ) ; } } ) ; org.mockito.Mockito.doNothing ( ) . when ( ovfManager ) . updateBootOrderOnDevices ( org.mockito.ArgumentMatchers.any ( ) , org.mockito.ArgumentMatchers.anyBoolean ( ) ) ; }
Source:
void stubGetUserBySessionIdQuery ( ) { org.ovirt.engine.core.common.queries.VdcQueryReturnValue returnValue = new org.ovirt.engine.core.common.queries.VdcQueryReturnValue ( ) ; returnValue.setSucceeded ( true ) ; returnValue.setReturnValue ( mockUser ) ; org.mockito.Mockito.when ( mockBackend.RunQuery ( org.mockito.Matchers.eq ( VdcQueryType.GetUserBySessionId ) , org.ovirt.engine.ui.frontend.server.gwt.AbstractGwtDynamicHostPageServletTest.isA ( org.ovirt.engine.core.common.queries.VdcQueryParametersBase.class ) ) ) . thenReturn ( returnValue ) ; }

Target:
void stubGetUserBySessionIdQuery ( ) { org.ovirt.engine.core.common.queries.VdcQueryReturnValue returnValue = new org.ovirt.engine.core.common.queries.VdcQueryReturnValue ( ) ; returnValue.setSucceeded ( true ) ; returnValue.setReturnValue ( mockUser ) ; org.mockito.Mockito.when ( mockBackend.runQuery ( org.mockito.Matchers.eq ( VdcQueryType.GetUserBySessionId ) , org.ovirt.engine.ui.frontend.server.gwt.AbstractGwtDynamicHostPageServletTest.isA ( org.ovirt.engine.core.common.queries.VdcQueryParametersBase.class ) ) ) . thenReturn ( returnValue ) ; }
Source:
public void getHostListByDataCenter ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid spId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > list = org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.VDS > cast ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.IVdcQueryable > ) ( source ) ) ) ; return list ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllVdsByStoragePool , new org.ovirt.engine.core.common.queries.IdQueryParameters ( spId ) , aQuery ) ; }

Target:
public void getHostListByDataCenter ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid spId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { return org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.VDS > cast ( ( ( java.util.List < ? > ) ( source ) ) ) ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllVdsByStoragePool , new org.ovirt.engine.core.common.queries.IdQueryParameters ( spId ) , aQuery ) ; }
Source:
private void memSize_EntityChanged ( java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { behavior.updateMinAllocatedMemory ( ) ; if ( ( getMemSize ( ) . getEntity ( ) ) != null ) { setNumaChanged ( true ) ; maxMemorySize.setEntity ( org.ovirt.engine.core.common.utils.VmCommonUtils.getMaxMemorySizeDefault ( getMemSize ( ) . getEntity ( ) ) ) ; } }

Target:
private void memSize_EntityChanged ( java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { behavior.updateMinAllocatedMemory ( ) ; if ( ( getMemSize ( ) . getEntity ( ) ) != null ) { maxMemorySize.setEntity ( org.ovirt.engine.core.common.utils.VmCommonUtils.getMaxMemorySizeDefault ( getMemSize ( ) . getEntity ( ) ) ) ; } }
Source:
public void testGetDefaultSortbyPhrase ( ) { org.ovirt.engine.core.searchbackend.SearchObjectAutoCompleter comp = new org.ovirt.engine.core.searchbackend.SearchObjectAutoCompleter ( true ) ; org.junit.Assert.assertTrue ( "HOST" , comp.getDefaultSort ( "HOST" ) . contains ( "vds_name" ) ) ; org.junit.Assert.assertEquals ( "Garbage" , "" , comp.getDefaultSort ( "kjfhkjdshkjfs" ) ) ; org.junit.Assert.assertEquals ( "Null" , "" , comp.getDefaultSort ( null ) ) ; }

Target:
public void testGetDefaultSortbyPhrase ( ) { org.junit.Assert.assertTrue ( "HOST" , comp.getDefaultSort ( "HOST" ) . contains ( "vds_name" ) ) ; org.junit.Assert.assertEquals ( "Garbage" , "" , comp.getDefaultSort ( "kjfhkjdshkjfs" ) ) ; org.junit.Assert.assertEquals ( "Null" , "" , comp.getDefaultSort ( null ) ) ; }
Source:
public boolean getLegal ( ) { if ( getUseTimout ( ) ) { java.lang.String keyForCheck = getkeyForCheck ( ) ; if ( ( org.ovirt.engine.core.utils.cache.CacheManager.getTimeoutBaseCache ( ) . putIfAbsent ( keyForCheck , this , this . getEndTime ( ) , java.util.concurrent.TimeUnit.MILLISECONDS ) ) == null ) { return true ; } return false ; } return true ; }

Target:
public boolean getLegal ( ) { if ( getUseTimout ( ) ) { java.lang.String keyForCheck = getkeyForCheck ( ) ; if ( ( org.ovirt.engine.core.utils.cache.CacheManager.getTimeoutBaseCache ( ) . putIfAbsent ( keyForCheck , keyForCheck , getEndTime ( ) , java.util.concurrent.TimeUnit.MILLISECONDS ) ) == null ) { return true ; } return false ; } return true ; }
Source:
protected boolean canDoAction ( ) { if ( ( getExistingIscsiBond ( ) ) == null ) { return failCanDoAction ( VdcBllMessages.ISCSI_BOND_NOT_EXIST ) ; } if ( isNameChanged ( ) ) { org.ovirt.engine.core.bll.validator.IscsiBondValidator validator = new org.ovirt.engine.core.bll.validator.IscsiBondValidator ( ) ; return validate ( validator.iscsiBondWithTheSameNameExistInDataCenter ( getIscsiBond ( ) ) ) ; } return true ; }

Target:
public org.ovirt.engine.core.compat.Guid getStoragePoolId ( ) { return ( getExistingIscsiBond ( ) ) != null ? getExistingIscsiBond ( ) . getStoragePoolId ( ) : null ; }
Source:
public java.util.List < org.ovirt.engine.core.compat.Guid > getAsyncTaskIdsByEntity ( org.ovirt.engine.core.compat.Guid entityId ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) ; parameterSource.addValue ( "entity_id" , entityId ) ; org.springframework.jdbc.core.simple.ParameterizedRowMapper < org.ovirt.engine.core.compat.Guid > mapper = new org.ovirt.engine.core.dao.AsyncTaskDAODbFacadeImpl.IdRowMapper ( ) ; return getCallsHandler ( ) . executeReadList ( "GetAsyncTasksByEntityId" , mapper , parameterSource ) ; }

Target:
public java.util.List < org.ovirt.engine.core.compat.Guid > getAsyncTaskIdsByEntity ( org.ovirt.engine.core.compat.Guid entityId ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) ; parameterSource.addValue ( "entity_id" , entityId ) ; return getCallsHandler ( ) . executeReadList ( "GetAsyncTasksByEntityId" , org.ovirt.engine.core.dao.AsyncTaskDAODbFacadeImpl.IdRowMapper.instance , parameterSource ) ; }
Source:
public void onBootstrap ( ) { super . onBootstrap ( ) ; com.google.gwt.user.client.Window.setTitle ( dynamicMessages.applicationTitle ( ) ) ; org.ovirt.engine.ui.webadmin.uimode.UiModeData uiModeData = org.ovirt.engine.ui.webadmin.uimode.UiModeData.instance ( ) ; if ( uiModeData != null ) { handleUiMode ( uiModeData ) ; } org.ovirt.engine.ui.webadmin.plugin.restapi.EngineSessionTimeoutData engineSessionTimeoutData = org.ovirt.engine.ui.webadmin.plugin.restapi.EngineSessionTimeoutData.instance ( ) ; if ( engineSessionTimeoutData != null ) { restApiSessionManager.setSessionTimeout ( engineSessionTimeoutData.getSessionTimeout ( ) ) ; restApiSessionManager.setHardLimit ( engineSessionTimeoutData.getSessionHardLimit ( ) ) ; } placeManager.revealCurrentPlace ( ) ; }

Target:
public void onBootstrap ( ) { super . onBootstrap ( ) ; com.google.gwt.user.client.Window.setTitle ( dynamicMessages.applicationTitle ( ) ) ; org.ovirt.engine.ui.webadmin.uimode.UiModeData uiModeData = org.ovirt.engine.ui.webadmin.uimode.UiModeData.instance ( ) ; if ( uiModeData != null ) { handleUiMode ( uiModeData ) ; } org.ovirt.engine.ui.webadmin.plugin.restapi.EngineSessionTimeoutData engineSessionTimeoutData = org.ovirt.engine.ui.webadmin.plugin.restapi.EngineSessionTimeoutData.instance ( ) ; if ( engineSessionTimeoutData != null ) { restApiSessionManager.setSessionTimeout ( engineSessionTimeoutData.getValue ( ) ) ; } placeManager.revealCurrentPlace ( ) ; }
Source:
private void updateMomPolicy ( ) { java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > list = new java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > ( ) ; for ( java.lang.Object item : getSelectedItems ( ) ) { org.ovirt.engine.core.common.businessentities.VDS vds = ( ( org.ovirt.engine.core.common.businessentities.VDS ) ( item ) ) ; list.add ( new org.ovirt.engine.core.common.action.VdsActionParameters ( vds.getId ( ) ) ) ; } org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runMultipleAction ( VdcActionType.UpdateMomPolicy , list , new org.ovirt.engine.ui.uicompat.IFrontendMultipleActionAsyncCallback ( ) { @ java.lang.Override public void executed ( org.ovirt.engine.ui.uicompat.FrontendMultipleActionAsyncResult result ) { } } , null ) ; }

Target:
private void updateMomPolicy ( ) { java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > list = new java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > ( ) ; for ( org.ovirt.engine.core.common.businessentities.VDS vds : getSelectedItems ( ) ) { list.add ( new org.ovirt.engine.core.common.action.VdsActionParameters ( vds.getId ( ) ) ) ; } org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runMultipleAction ( VdcActionType.UpdateMomPolicy , list , new org.ovirt.engine.ui.uicompat.IFrontendMultipleActionAsyncCallback ( ) { @ java.lang.Override public void executed ( org.ovirt.engine.ui.uicompat.FrontendMultipleActionAsyncResult result ) { } } , null ) ; }
Source:
private void processSingleClusterChanges ( org.ovirt.engine.core.common.action.ManageNetworkClustersParameters param ) { final org.ovirt.engine.core.bll.network.cluster.transformer.NetworkClustersToSetupNetworksParametersTransformer networkClustersToSetupNetworksParametersTransformer = networkClustersToSetupNetworksParametersTransformerFactory.createNetworkClustersToSetupNetworksParametersTransformer ( getContext ( ) ) ; final java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > setupNetworksParams = new java.util.ArrayList < > ( ) ; setupNetworksParams.addAll ( networkClustersToSetupNetworksParametersTransformer.transform ( param.getAttachments ( ) , param.getDetachments ( ) ) ) ; org.ovirt.engine.core.bll.network.HostSetupNetworksParametersBuilder.updateParametersSequencing ( setupNetworksParams ) ; setParentCommandInfo ( setupNetworksParams ) ; runInternalMultipleActions ( VdcActionType.PersistentHostSetupNetworks , setupNetworksParams ) ; }

Target:
private void processSingleClusterChanges ( org.ovirt.engine.core.common.action.ManageNetworkClustersParameters param ) { final org.ovirt.engine.core.bll.network.cluster.transformer.NetworkClustersToSetupNetworksParametersTransformer networkClustersToSetupNetworksParametersTransformer = networkClustersToSetupNetworksParametersTransformerFactory.createNetworkClustersToSetupNetworksParametersTransformer ( getContext ( ) ) ; final java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > setupNetworksParams = new java.util.ArrayList < > ( ) ; setupNetworksParams.addAll ( networkClustersToSetupNetworksParametersTransformer.transform ( param.getAttachments ( ) , param.getDetachments ( ) ) ) ; org.ovirt.engine.core.bll.network.HostSetupNetworksParametersBuilder.updateParametersSequencing ( setupNetworksParams ) ; runInternalMultipleActions ( VdcActionType.PersistentHostSetupNetworks , setupNetworksParams ) ; }
Source:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { if ( ( ( getIsImportGlusterConfiguration ( ) . getEntity ( ) ) != null ) && ( ( java.lang.Boolean ) ( getIsImportGlusterConfiguration ( ) . getEntity ( ) ) ) ) { getGlusterHostAddress ( ) . setIsChangable ( true ) ; getGlusterHostPassword ( ) . setIsChangable ( true ) ; } else { getGlusterHostAddress ( ) . setIsChangable ( false ) ; getGlusterHostPassword ( ) . setIsChangable ( false ) ; } }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { if ( ( ( getIsImportGlusterConfiguration ( ) . getEntity ( ) ) != null ) && ( getIsImportGlusterConfiguration ( ) . getEntity ( ) ) ) { getGlusterHostAddress ( ) . setIsChangable ( true ) ; getGlusterHostPassword ( ) . setIsChangable ( true ) ; } else { getGlusterHostAddress ( ) . setIsChangable ( false ) ; getGlusterHostPassword ( ) . setIsChangable ( false ) ; } }
Source:
public boolean equals ( java.lang.Object o ) { if ( ( this ) == o ) { return true ; } if ( ( o == null ) || ( ( getClass ( ) ) != ( o.getClass ( ) ) ) ) { return false ; } org.ovirt.engine.core.common.businessentities.HostDeviceId other = ( ( org.ovirt.engine.core.common.businessentities.HostDeviceId ) ( o ) ) ; return ( java.util.Objects.equals ( hostId , other.hostId ) ) && ( java.util.Objects.equals ( deviceName , other.deviceName ) ) ; }

Target:
public boolean equals ( java.lang.Object o ) { if ( ( this ) == o ) { return true ; } if ( ! ( o instanceof org.ovirt.engine.core.common.businessentities.HostDeviceId ) ) { return false ; } org.ovirt.engine.core.common.businessentities.HostDeviceId other = ( ( org.ovirt.engine.core.common.businessentities.HostDeviceId ) ( o ) ) ; return ( java.util.Objects.equals ( hostId , other.hostId ) ) && ( java.util.Objects.equals ( deviceName , other.deviceName ) ) ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { if ( returnValue != null ) { java.util.Set < java.lang.String > emulatedSet = new java.util.TreeSet < > ( ( ( java.util.HashSet < java.lang.String > ) ( returnValue ) ) ) ; emulatedSet.add ( "" ) ; java.lang.String oldVal = getModel ( ) . getEmulatedMachine ( ) . getSelectedItem ( ) ; getModel ( ) . getEmulatedMachine ( ) . setItems ( emulatedSet ) ; getModel ( ) . getEmulatedMachine ( ) . setSelectedItem ( oldVal ) ; } }

Target:
public void onSuccess ( java.util.Set < java.lang.String > returnValue ) { if ( returnValue != null ) { java.util.Set < java.lang.String > emulatedSet = new java.util.TreeSet < > ( returnValue ) ; emulatedSet.add ( "" ) ; java.lang.String oldVal = getModel ( ) . getEmulatedMachine ( ) . getSelectedItem ( ) ; getModel ( ) . getEmulatedMachine ( ) . setItems ( emulatedSet ) ; getModel ( ) . getEmulatedMachine ( ) . setSelectedItem ( oldVal ) ; } }
Source:
void mockGetVdsCertificateSubjectByVmId ( ) { org.ovirt.engine.core.common.queries.QueryReturnValue hostSubjectReturnValue = new org.ovirt.engine.core.common.queries.QueryReturnValue ( ) ; hostSubjectReturnValue.setReturnValue ( org.ovirt.engine.core.bll.ConfigureConsoleOptionsQueryTest.HOST_SUBJECT ) ; org.mockito.Mockito.doReturn ( hostSubjectReturnValue ) . when ( backend ) . runInternalQuery ( org.mockito.ArgumentMatchers.eq ( QueryType.GetVdsCertificateSubjectByVmId ) , org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.common.queries.IdQueryParameters.class ) ) ; }

Target:
void mockGetVdsCertificateSubjectByVmId ( ) { org.ovirt.engine.core.common.queries.QueryReturnValue hostSubjectReturnValue = new org.ovirt.engine.core.common.queries.QueryReturnValue ( ) ; hostSubjectReturnValue.setReturnValue ( org.ovirt.engine.core.bll.ConfigureConsoleOptionsQueryTest.HOST_SUBJECT ) ; org.mockito.Mockito.doReturn ( hostSubjectReturnValue ) . when ( backend ) . runInternalQuery ( org.mockito.ArgumentMatchers.eq ( QueryType.GetVdsCertificateSubjectByVmId ) , org.mockito.ArgumentMatchers.any ( ) ) ; }
Source:
public javax.ws.rs.core.Response remove ( java.lang.String id , org.ovirt.engine.api.model.Action action ) { getEntity ( id ) ; if ( ( action.isSetDetach ( ) ) && ( action.isDetach ( ) ) ) { return performAction ( VdcActionType.DetachDiskFromVm , new org.ovirt.engine.core.common.action.AttachDettachVmDiskParameters ( parentId , org.ovirt.engine.core.compat.Guid.createGuidFromStringDefaultEmpty ( id ) , true ) ) ; } else { return remove ( id ) ; } }

Target:
public javax.ws.rs.core.Response remove ( java.lang.String id , org.ovirt.engine.api.model.Action action ) { getEntity ( id ) ; if ( ( action.isSetDetach ( ) ) && ( action.isDetach ( ) ) ) { return performAction ( VdcActionType.DetachDiskFromVm , new org.ovirt.engine.core.common.action.AttachDettachVmDiskParameters ( parentId , org.ovirt.engine.core.compat.Guid.createGuidFromStringDefaultEmpty ( id ) , true , false ) ) ; } else { return remove ( id ) ; } }
Source:
public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > list = org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.VDS > cast ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.IVdcQueryable > ) ( source ) ) ) ; return list ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ( ) ; }

Target:
public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { return ! ( ( ( java.util.List < ? > ) ( source ) ) . isEmpty ( ) ) ; } return false ; }
Source:
private void removeUnselectableHosts ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > hosts , org.ovirt.engine.core.compat.Guid run_on_vds , boolean allRunOnSameVds ) { if ( ( getVmsOnSameCluster ( ) ) && allRunOnSameVds ) { org.ovirt.engine.core.common.businessentities.VDS runOnSameVDS = null ; for ( org.ovirt.engine.core.common.businessentities.VDS host : hosts ) { if ( host.getId ( ) . equals ( run_on_vds ) ) { runOnSameVDS = host ; } } hosts.remove ( runOnSameVDS ) ; } }

Target:
private void removeUnselectableHosts ( java.util.List < org.ovirt.engine.core.common.businessentities.VDS > hosts , org.ovirt.engine.core.compat.Guid run_on_vds , boolean allRunOnSameVds ) { if ( ( getVmsOnSameCluster ( ) ) && allRunOnSameVds ) { org.ovirt.engine.core.common.businessentities.VDS runOnSameVDS = null ; for ( org.ovirt.engine.core.common.businessentities.VDS host : hosts ) { if ( host.getId ( ) . equals ( run_on_vds ) ) { runOnSameVDS = host ; } } hosts.remove ( runOnSameVDS ) ; } }
Source:
private void notifyAsyncTasks ( ) { final java.util.List < org.ovirt.engine.core.compat.Guid > asyncTasks = org.ovirt.engine.core.bll.storage.DeactivateStorageDomainCommand.getDbFacade ( ) . getAsyncTaskDao ( ) . getAsyncTaskIdsByEntity ( org.ovirt.engine.core.bll.storage.DeactivateStorageDomainCommand.getParameters ( ) . getStorageDomainId ( ) ) ; if ( ! ( asyncTasks.isEmpty ( ) ) ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase auditLogableBase = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; auditLogableBase.setStorageDomain ( org.ovirt.engine.core.bll.storage.DeactivateStorageDomainCommand.getStorageDomain ( ) ) ; auditLogDirector.log ( auditLogableBase , AuditLogType.STORAGE_DOMAIN_TASKS_ERROR ) ; } }

Target:
private void notifyAsyncTasks ( ) { final java.util.List < org.ovirt.engine.core.compat.Guid > asyncTasks = org.ovirt.engine.core.bll.storage.DeactivateStorageDomainCommand.getAsyncTaskDao ( ) . getAsyncTaskIdsByEntity ( org.ovirt.engine.core.bll.storage.DeactivateStorageDomainCommand.getParameters ( ) . getStorageDomainId ( ) ) ; if ( ! ( asyncTasks.isEmpty ( ) ) ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase auditLogableBase = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; auditLogableBase.setStorageDomain ( org.ovirt.engine.core.bll.storage.DeactivateStorageDomainCommand.getStorageDomain ( ) ) ; auditLogDirector.log ( auditLogableBase , AuditLogType.STORAGE_DOMAIN_TASKS_ERROR ) ; } }
Source:
public org.ovirt.engine.api.model.GlusterBricks list ( ) { boolean flag = org.ovirt.engine.api.common.util.QueryHelper.hasMatrixParam ( getUriInfo ( ) , "force" ) ; java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity > bricks = getBackendCollection ( VdcQueryType.GetGlusterVolumeBricks , new org.ovirt.engine.core.common.queries.IdQueryParameters ( asGuid ( getVolumeId ( ) ) ) ) ; org.ovirt.engine.api.model.GlusterBricks bricksModel = mapCollection ( bricks ) ; return addActions ( bricksModel ) ; }

Target:
public org.ovirt.engine.api.model.GlusterBricks list ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity > bricks = getBackendCollection ( VdcQueryType.GetGlusterVolumeBricks , new org.ovirt.engine.core.common.queries.IdQueryParameters ( asGuid ( getVolumeId ( ) ) ) ) ; org.ovirt.engine.api.model.GlusterBricks bricksModel = mapCollection ( bricks ) ; return addActions ( bricksModel ) ; }
Source:
protected java.util.Map < java.lang.String , org.ovirt.engine.core.common.utils.Pair < java.lang.String , java.lang.String > > getExclusiveLocks ( ) { java.util.Map < java.lang.String , org.ovirt.engine.core.common.utils.Pair < java.lang.String , java.lang.String > > locks = new java.util.HashMap < > ( ) ; locks.put ( org.ovirt.engine.core.bll.storage.connection.RemoveStorageServerConnectionCommand.getConnection ( ) . getConnection ( ) , org.ovirt.engine.core.bll.LockMessagesMatchUtil.makeLockingPair ( LockingGroup.STORAGE_CONNECTION , EngineMessage.ACTION_TYPE_FAILED_OBJECT_LOCKED ) ) ; locks.put ( org.ovirt.engine.core.bll.storage.connection.RemoveStorageServerConnectionCommand.getConnection ( ) . geIid ( ) , org.ovirt.engine.core.bll.LockMessagesMatchUtil.makeLockingPair ( LockingGroup.STORAGE_CONNECTION , EngineMessage.ACTION_TYPE_FAILED_OBJECT_LOCKED ) ) ; return locks ; }

Target:
protected java.util.Map < java.lang.String , org.ovirt.engine.core.common.utils.Pair < java.lang.String , java.lang.String > > getExclusiveLocks ( ) { java.util.Map < java.lang.String , org.ovirt.engine.core.common.utils.Pair < java.lang.String , java.lang.String > > locks = new java.util.HashMap < > ( ) ; locks.put ( org.ovirt.engine.core.bll.storage.connection.RemoveStorageServerConnectionCommand.getConnection ( ) . getConnection ( ) , org.ovirt.engine.core.bll.LockMessagesMatchUtil.makeLockingPair ( LockingGroup.STORAGE_CONNECTION , EngineMessage.ACTION_TYPE_FAILED_OBJECT_LOCKED ) ) ; locks.put ( org.ovirt.engine.core.bll.storage.connection.RemoveStorageServerConnectionCommand.getConnection ( ) . getId ( ) , org.ovirt.engine.core.bll.LockMessagesMatchUtil.makeLockingPair ( LockingGroup.STORAGE_CONNECTION , EngineMessage.ACTION_TYPE_FAILED_OBJECT_LOCKED ) ) ; return locks ; }
Source:
public void OnSuccess ( java.lang.Object model , java.lang.Object result ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeAdvancedDetails details = ( ( org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeAdvancedDetails ) ( result ) ) ; if ( ( details.getServiceInfo ( ) ) != null ) { setActualServiceList ( details.getServiceInfo ( ) ) ; } else { setActualServiceList ( new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.ServiceInfo > ( ) ) ; } filterServices ( ) ; }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object result ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeAdvancedDetails details = ( ( org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeAdvancedDetails ) ( result ) ) ; if ( ( details.getServiceInfo ( ) ) != null ) { setActualServiceList ( details.getServiceInfo ( ) ) ; } else { setActualServiceList ( new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.ServiceInfo > ( ) ) ; } filterServices ( ) ; }
Source:
protected boolean doDomainsUseConnection ( org.ovirt.engine.core.common.businessentities.StorageServerConnections connection ) { if ( ( ( domains ) == null ) || ( domains.isEmpty ( ) ) ) { domains = getStorageDomainsByConnId ( connection.getid ( ) ) ; } return ( ( domains ) != null ) && ( ! ( domains.isEmpty ( ) ) ) ; }

Target:
protected boolean doDomainsUseConnection ( org.ovirt.engine.core.common.businessentities.StorageServerConnections connection ) { if ( ( ( domains ) == null ) || ( domains.isEmpty ( ) ) ) { domains = getStorageDomainsByConnId ( connection.getId ( ) ) ; } return ( ( domains ) != null ) && ( ! ( domains.isEmpty ( ) ) ) ; }
Source:
public void refreshDetails ( org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity volumeEntity ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getGlusterRemoveBricksStatus ( new org.ovirt.engine.ui.frontend.AsyncQuery ( this , new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { org.ovirt.engine.core.common.queries.VdcQueryReturnValue vdcValue = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) ; org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeTaskStatusEntity statusEntity = vdcValue.getReturnValue ( ) ; if ( statusEntity != null ) { showStatus ( statusEntity ) ; } } } ) , volumeEntity.getClusterId ( ) , volumeEntity.getId ( ) , getBricks ( ) ) ; }

Target:
public void refreshDetails ( org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity volumeEntity ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getGlusterRemoveBricksStatus ( new org.ovirt.engine.ui.frontend.AsyncQuery ( this , new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { org.ovirt.engine.core.common.queries.VdcQueryReturnValue vdcValue = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) ; org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeTaskStatusEntity statusEntity = vdcValue.getReturnValue ( ) ; if ( statusEntity != null ) { showStatus ( statusEntity ) ; } } } ) , volumeEntity.getClusterId ( ) , volumeEntity.getId ( ) , getBricks ( ) ) ; }
Source:
public void tearDown ( ) { if ( ( client ) != null ) { try { client.executeCommand ( java.lang.String.format ( "rm -f '%1$s'" , remote ) , null , null , null ) ; } catch ( java.lang.Exception e ) { } try { client.disconnect ( ) ; } catch ( java.lang.Exception e ) { } client = null ; } if ( ( local2 ) != null ) { local2.delete ( ) ; local2 = null ; } }

Target:
public void tearDown ( ) { if ( ( client ) != null ) { try { client.executeCommand ( java.lang.String.format ( "rm -f '%1$s'" , remote ) , null , null , null ) ; } catch ( java.lang.Exception e ) { } try { client.disconnect ( ) ; } catch ( java.lang.Exception e ) { } client = null ; } if ( ( local2 ) != null ) { if ( ! ( local2.delete ( ) ) ) { } local2 = null ; } }
Source:
public void executeCommandWhenServerIdPresent ( ) { cmd = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.gluster.UpdateGlusterHookCommand ( new org.ovirt.engine.core.common.action.gluster.GlusterHookManageParameters ( HOOK_ID , org.ovirt.engine.core.bll.gluster.UpdateGlusterHookCommandTest.SERVER_ID ) , null ) ) ; setUpMocksForUpdate ( ) ; mockForReadContent ( true , null ) ; cmd.executeCommand ( ) ; org.mockito.Mockito.verify ( hooksDao , org.mockito.Mockito.times ( 1 ) ) . updateGlusterHook ( org.mockito.Matchers.any ( org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity.class ) ) ; org.junit.Assert.assertEquals ( cmd.getAuditLogTypeValue ( ) , AuditLogType.GLUSTER_HOOK_UPDATED ) ; }

Target:
public void executeCommandWhenServerIdPresent ( ) { cmd = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.gluster.UpdateGlusterHookCommand ( new org.ovirt.engine.core.common.action.gluster.GlusterHookManageParameters ( HOOK_ID , org.ovirt.engine.core.bll.gluster.UpdateGlusterHookCommandTest.SERVER_ID ) , null ) ) ; setUpMocksForUpdate ( ) ; mockForReadContent ( true , null ) ; cmd.executeCommand ( ) ; org.mockito.Mockito.verify ( hooksDao , org.mockito.Mockito.times ( 1 ) ) . updateGlusterHook ( org.mockito.Matchers.any ( org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity.class ) ) ; org.junit.Assert.assertEquals ( AuditLogType.GLUSTER_HOOK_UPDATED , cmd.getAuditLogTypeValue ( ) ) ; }
Source:
protected boolean performImagesChecks ( org.ovirt.engine.core.common.businessentities.VM vm ) { return org.ovirt.engine.core.bll.ImagesHandler.PerformImagesChecks ( vm , org.ovirt.engine.core.bll.AddDiskCommand.getReturnValue ( ) . getCanDoActionMessages ( ) , vm.getStoragePoolId ( ) , getStorageDomainId ( ) . getValue ( ) , false , true , false , false , false , false , true , java.util.Collections.< org.ovirt.engine.core.common.businessentities.Disk > emptyList ( ) ) ; }

Target:
protected boolean performImagesChecks ( org.ovirt.engine.core.common.businessentities.VM vm ) { return org.ovirt.engine.core.bll.ImagesHandler.PerformImagesChecks ( vm , org.ovirt.engine.core.bll.AddDiskCommand.getReturnValue ( ) . getCanDoActionMessages ( ) , vm.getStoragePoolId ( ) , getStorageDomainId ( ) . getValue ( ) , false , true , false , false , false , true , java.util.Collections.< org.ovirt.engine.core.common.businessentities.Disk > emptyList ( ) ) ; }
Source:
public static void getNetworkConnectivityCheckTimeoutInSeconds ( 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 ( ) : 120 ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.NetworkConnectivityCheckTimeoutInSeconds , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public void getNetworkConnectivityCheckTimeoutInSeconds ( 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 ( ) : 120 ; } } ; getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.NetworkConnectivityCheckTimeoutInSeconds , getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
private void reportNonOperationReason ( org.ovirt.engine.core.common.businessentities.NonOperationalReason reason , java.lang.String compatibleVersions , java.lang.String vdsSupportedVersions ) { java.util.Map < java.lang.String , java.lang.String > customLogValues = new java.util.HashMap < > ( ) ; customLogValues.put ( "CompatibilityVersion" , compatibleVersions ) ; customLogValues.put ( "VdsSupportedVersions" , vdsSupportedVersions ) ; org.ovirt.engine.core.common.action.SetNonOperationalVdsParameters tempVar = new org.ovirt.engine.core.common.action.SetNonOperationalVdsParameters ( org.ovirt.engine.core.bll.HandleVdsVersionCommand.getVdsId ( ) , reason , customLogValues ) ; org.ovirt.engine.core.bll.Backend.getInstance ( ) . runInternalAction ( VdcActionType.SetNonOperationalVds , tempVar , org.ovirt.engine.core.bll.job.ExecutionHandler.createInternalJobContext ( ) ) ; }

Target:
protected void reportNonOperationReason ( org.ovirt.engine.core.common.businessentities.NonOperationalReason reason , java.lang.String compatibleVersions , java.lang.String vdsSupportedVersions ) { java.util.Map < java.lang.String , java.lang.String > customLogValues = new java.util.HashMap < > ( ) ; customLogValues.put ( "CompatibilityVersion" , compatibleVersions ) ; customLogValues.put ( "VdsSupportedVersions" , vdsSupportedVersions ) ; org.ovirt.engine.core.common.action.SetNonOperationalVdsParameters tempVar = new org.ovirt.engine.core.common.action.SetNonOperationalVdsParameters ( org.ovirt.engine.core.bll.HandleVdsVersionCommand.getVdsId ( ) , reason , customLogValues ) ; org.ovirt.engine.core.bll.Backend.getInstance ( ) . runInternalAction ( VdcActionType.SetNonOperationalVds , tempVar , org.ovirt.engine.core.bll.job.ExecutionHandler.createInternalJobContext ( ) ) ; }
Source:
private void translateVolumeType ( org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity volumeEntity ) { org.ovirt.engine.ui.uicompat.Translator translator = org.ovirt.engine.ui.uicompat.EnumTranslator.create ( org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeType.class ) ; if ( translator.containsKey ( volumeEntity.getVolumeType ( ) ) ) { getDetailModel ( ) . setVolumeTypeSilently ( translator.get ( volumeEntity.getVolumeType ( ) ) ) ; } }

Target:
private void translateVolumeType ( org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity volumeEntity ) { org.ovirt.engine.ui.uicompat.Translator translator = org.ovirt.engine.ui.uicompat.EnumTranslator.getInstance ( ) ; if ( translator.containsKey ( volumeEntity.getVolumeType ( ) ) ) { getDetailModel ( ) . setVolumeTypeSilently ( translator.get ( volumeEntity.getVolumeType ( ) ) ) ; } }