auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private static java.lang.Double AssignDoubleValue ( java.util.Map < java.lang.String , java.lang.Object > input , java.lang.String name ) { java.lang.Double returnValue = null ; if ( input.containsKey ( name ) ) { java.lang.String stringValue = ( ( java.lang.String ) ( ( ( input.get ( name ) ) instanceof java.lang.String ) ? input.get ( name ) : null ) ) ; returnValue = ( stringValue == null ) ? null : java.lang.Double.parseDouble ( stringValue ) ; } return returnValue ; }

Target:
private static org.ovirt.engine.core.bll.network.cluster.ManagementNetworkUtil getManagementNetworkUtil ( ) { final org.ovirt.engine.core.bll.network.cluster.ManagementNetworkUtil managementNetworkUtil = org.ovirt.engine.core.di.Injector.get ( org.ovirt.engine.core.bll.network.cluster.ManagementNetworkUtil.class ) ; return managementNetworkUtil ; }
Source:
public void testRemoveQuota ( ) { org.ovirt.engine.core.common.businessentities.Quota quota = dao.getById ( FixturesTool.QUOTA_SPECIFIC_AND_GENERAL ) ; org.junit.Assert.assertNotNull ( quota ) ; dao.remove ( FixturesTool.QUOTA_SPECIFIC_AND_GENERAL ) ; org.junit.Assert.assertNull ( dao.getById ( FixturesTool.QUOTA_SPECIFIC_AND_GENERAL ) ) ; org.junit.Assert.assertEquals ( 0 , dao.getQuotaClusterByQuotaGuid ( FixturesTool.QUOTA_SPECIFIC_AND_GENERAL ) . size ( ) ) ; org.junit.Assert.assertEquals ( 0 , dao.getQuotaStorageByQuotaGuid ( FixturesTool.QUOTA_SPECIFIC_AND_GENERAL ) . size ( ) ) ; }

Target:
public void testRemoveQuota ( ) { org.ovirt.engine.core.common.businessentities.Quota quota = dao.getById ( FixturesTool.QUOTA_SPECIFIC_AND_GENERAL ) ; org.junit.jupiter.api.Assertions.assertNotNull ( quota ) ; dao.remove ( FixturesTool.QUOTA_SPECIFIC_AND_GENERAL ) ; org.junit.jupiter.api.Assertions.assertNull ( dao.getById ( FixturesTool.QUOTA_SPECIFIC_AND_GENERAL ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( 0 , dao.getQuotaClusterByQuotaGuid ( FixturesTool.QUOTA_SPECIFIC_AND_GENERAL ) . size ( ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( 0 , dao.getQuotaStorageByQuotaGuid ( FixturesTool.QUOTA_SPECIFIC_AND_GENERAL ) . size ( ) ) ; }
Source:
protected java.util.List < org.ovirt.engine.core.common.businessentities.storage_domains > getStorageDomains ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage_domains > storageDomains = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage_domains > ( ) ; org.ovirt.engine.core.common.businessentities.storage_domains storageDomain = new org.ovirt.engine.core.common.businessentities.storage_domains ( ) ; storageDomain.setId ( GUIDS [ 2 ] ) ; storageDomains.add ( storageDomain ) ; storageDomain = new org.ovirt.engine.core.common.businessentities.storage_domains ( ) ; storageDomain.setId ( GUIDS [ 3 ] ) ; storageDomains.add ( storageDomain ) ; return storageDomains ; }

Target:
protected java.util.List < org.ovirt.engine.api.model.StorageDomain > getStorageDomains ( ) { java.util.List < org.ovirt.engine.api.model.StorageDomain > storageDomains = new java.util.ArrayList < org.ovirt.engine.api.model.StorageDomain > ( ) ; org.ovirt.engine.api.model.StorageDomain storageDomain = new org.ovirt.engine.api.model.StorageDomain ( ) ; storageDomain.setId ( GUIDS [ 2 ] ) ; storageDomains.add ( storageDomain ) ; storageDomain = new org.ovirt.engine.api.model.StorageDomain ( ) ; storageDomain.setId ( GUIDS [ 3 ] ) ; storageDomains.add ( storageDomain ) ; return storageDomains ; }
Source:
public void updatePortNotAllowed ( ) { org.mockito.Mockito.when ( oldHost.getPort ( ) ) . thenReturn ( org.ovirt.engine.core.utils.RandomUtils.instance ( ) . nextInt ( ) ) ; org.mockito.Mockito.when ( host.getPort ( ) ) . thenReturn ( org.ovirt.engine.core.utils.RandomUtils.instance ( ) . nextInt ( ) ) ; org.junit.Assert.assertThat ( validator.updatePortAllowed ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.VDS_PORT_CHANGE_REQUIRE_INSTALL ) ) ; }

Target:
public void updatePortNotAllowed ( ) { org.mockito.Mockito.when ( oldHost.getPort ( ) ) . thenReturn ( org.ovirt.engine.core.utils.RandomUtils.instance ( ) . nextInt ( ) ) ; org.mockito.Mockito.when ( host.getPort ( ) ) . thenReturn ( org.ovirt.engine.core.utils.RandomUtils.instance ( ) . nextInt ( ) ) ; org.hamcrest.MatcherAssert.assertThat ( validator.updatePortAllowed ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.VDS_PORT_CHANGE_REQUIRE_INSTALL ) ) ; }
Source:
private void mockSnapshotFromDb ( ) { mockSnapshot = new org.ovirt.engine.core.common.businessentities.Snapshot ( ) ; mockSnapshot.setType ( SnapshotType.STATELESS ) ; org.mockito.Mockito.when ( snapshotDao.get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( mockSnapshot ) ; }

Target:
private void mockSnapshotFromDb ( ) { mockSnapshot = new org.ovirt.engine.core.common.businessentities.Snapshot ( ) ; mockSnapshot.setType ( SnapshotType.STATELESS ) ; org.mockito.Mockito.when ( snapshotDao.get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) , org.mockito.Matchers.any ( org.ovirt.engine.core.common.businessentities.Snapshot.SnapshotType.class ) , org.mockito.Matchers.any ( org.ovirt.engine.core.common.businessentities.Snapshot.SnapshotStatus.class ) ) ) . thenReturn ( mockSnapshot ) ; org.mockito.Mockito.when ( snapshotDao.get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) , org.mockito.Matchers.any ( org.ovirt.engine.core.common.businessentities.Snapshot.SnapshotType.class ) ) ) . thenReturn ( mockSnapshot ) ; }
Source:
protected void setUpGetEntityExpectations ( int times , boolean notFound ) throws java.lang.Exception { while ( ( times -- ) > 0 ) { setUpGetEntityExpectations ( VdcQueryType.GetLibvirtSecretById , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ 1 ] } , ( notFound ? null : getEntity ( 1 ) ) ) ; } }

Target:
protected void setUpGetEntityExpectations ( int times , boolean notFound ) throws java.lang.Exception { while ( ( times -- ) > 0 ) { setUpGetEntityExpectations ( QueryType.GetLibvirtSecretById , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ 1 ] } , ( notFound ? null : getEntity ( 1 ) ) ) ; } }
Source:
private void setNonOperational ( org.ovirt.engine.core.common.businessentities.NonOperationalReason reason ) { org.ovirt.engine.core.common.action.SetNonOperationalVdsParameters tempVar = new org.ovirt.engine.core.common.action.SetNonOperationalVdsParameters ( org.ovirt.engine.core.bll.InitVdsOnUpCommand.getVds ( ) . getId ( ) , reason ) ; tempVar.setSaveToDb ( true ) ; org.ovirt.engine.core.bll.Backend.getInstance ( ) . runInternalAction ( VdcActionType.SetNonOperationalVds , tempVar ) ; }

Target:
private void setNonOperational ( org.ovirt.engine.core.common.businessentities.NonOperationalReason reason ) { org.ovirt.engine.core.common.action.SetNonOperationalVdsParameters tempVar = new org.ovirt.engine.core.common.action.SetNonOperationalVdsParameters ( org.ovirt.engine.core.bll.InitVdsOnUpCommand.getVds ( ) . getId ( ) , reason ) ; tempVar.setSaveToDb ( true ) ; org.ovirt.engine.core.bll.Backend.getInstance ( ) . runInternalAction ( VdcActionType.SetNonOperationalVds , tempVar , org.ovirt.engine.core.bll.job.ExecutionHandler.createInternalJobContext ( ) ) ; }
Source:
public void getAAAProfilesEntriesList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.Collection < org.ovirt.engine.core.aaa.ProfileEntry > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.aaa.ProfileEntry > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAAAProfileList , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }

Target:
public void getAAAProfilesList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.convertAAAProfilesResult ( aQuery , false ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAAAProfileList , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }
Source:
protected boolean canDoAction ( ) { if ( ( ( org.ovirt.engine.core.bll.AddVmFromScratchCommand.getVdsGroup ( ) ) == null ) && ( Guid.Empty.equals ( super . getStorageDomainId ( ) ) ) ) { return failCanDoAction ( VdcBllMessages.VM_CLUSTER_IS_NOT_VALID ) ; } if ( ! ( org.ovirt.engine.core.bll.ImagesHandler.checkImagesConfiguration ( getStorageDomainId ( ) , org.ovirt.engine.core.bll.AddVmFromScratchCommand.getParameters ( ) . getDiskInfoList ( ) , org.ovirt.engine.core.bll.AddVmFromScratchCommand.getReturnValue ( ) . getCanDoActionMessages ( ) ) ) ) { return false ; } return super . canDoAction ( ) ; }

Target:
protected boolean canDoAction ( ) { if ( ( ( org.ovirt.engine.core.bll.AddVmFromScratchCommand.getVdsGroup ( ) ) == null ) && ( Guid.Empty.equals ( super . getStorageDomainId ( ) ) ) ) { return failCanDoAction ( EngineMessage.VM_CLUSTER_IS_NOT_VALID ) ; } if ( ! ( org.ovirt.engine.core.bll.ImagesHandler.checkImagesConfiguration ( getStorageDomainId ( ) , org.ovirt.engine.core.bll.AddVmFromScratchCommand.getParameters ( ) . getDiskInfoList ( ) , org.ovirt.engine.core.bll.AddVmFromScratchCommand.getReturnValue ( ) . getCanDoActionMessages ( ) ) ) ) { return false ; } return super . canDoAction ( ) ; }
Source:
public void labeledNetworkRemovedFromNic ( ) { java.lang.String networkName = "net" ; java.lang.String label = "lbl1" ; org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nic = createLabeledNic ( "nic0" , networkName , label ) ; mockExistingIfaces ( nic ) ; nic.setNetworkName ( null ) ; mockExistingNetworks ( createLabeledNetwork ( networkName , label ) ) ; org.ovirt.engine.core.bll.network.host.SetupNetworksHelper helper = createHelper ( createParametersForNics ( nic ) ) ; validateAndExpectViolation ( helper , VdcBllMessages.ACTION_TYPE_FAILED_CANNOT_REMOVE_LABELED_NETWORK_FROM_NIC , networkName ) ; }

Target:
public void labeledNetworkRemovedFromNic ( ) { java.lang.String networkName = "net" ; java.lang.String label = "lbl1" ; org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nic = createLabeledNic ( "nic0" , networkName , label ) ; mockExistingIfaces ( nic ) ; nic.setNetworkName ( null ) ; mockExistingNetworks ( createLabeledNetwork ( networkName , label ) ) ; org.ovirt.engine.core.bll.network.host.SetupNetworksHelper helper = createHelper ( createParametersForNics ( nic ) ) ; validateAndExpectViolation ( helper , EngineMessage.ACTION_TYPE_FAILED_CANNOT_REMOVE_LABELED_NETWORK_FROM_NIC , networkName ) ; }
Source:
public void calculateNetworkImplementationDetailsNetworkQosOutOfSync ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface = createNetworkDevice ( ) ; org.ovirt.engine.core.common.businessentities.network.NetworkQoS qos = createQos ( ) ; qos.setOutboundAverage ( 30 ) ; qos.setOutboundPeak ( 30 ) ; qos.setOutboundBurst ( 30 ) ; calculateNetworkImplementationDetailsAndAssertSync ( iface , false , iface.getNetworkName ( ) , iface.isBridged ( ) , iface.getMtu ( ) , iface.getVlanId ( ) , qos ) ; }

Target:
public void calculateNetworkImplementationDetailsNetworkQosOutOfSync ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface = createNetworkDevice ( ) ; org.ovirt.engine.core.common.businessentities.network.HostNetworkQos qos = new org.ovirt.engine.core.common.businessentities.network.HostNetworkQos ( ) ; qos.setOutAverageLinkshare ( 60 ) ; qos.setOutAverageUpperlimit ( 60 ) ; qos.setOutAverageRealtime ( 60 ) ; calculateNetworkImplementationDetailsAndAssertSync ( iface , false , iface.getNetworkName ( ) , iface.isBridged ( ) , iface.getMtu ( ) , iface.getVlanId ( ) , qos ) ; }
Source:
public void run ( ) { log.infoFormat ( "Rollback for command: {0}." , this . getClass ( ) . getName ( ) ) ; try { getAsyncTaskManager ( ) . cancelTasks ( getReturnValue ( ) . getVdsmTaskIdList ( ) ) ; } catch ( java.lang.Exception e ) { log.errorFormat ( "Failed to cancel tasks for command: {0}." , this . getClass ( ) . getName ( ) ) ; } }

Target:
protected void addCanDoActionMessageVariable ( java.lang.String varName , java.lang.Object varValue ) { getReturnValue ( ) . getCanDoActionMessages ( ) . add ( java.lang.String.format ( "$%s %s" , varName , varValue ) ) ; }
Source:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.SnapshotModel snapshotModel = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.SnapshotModel ) ( target ) ) ; java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > disks = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ) ( returnValue ) ) ; org.ovirt.engine.ui.uicommonweb.models.vms.VmModelHelper.sendWarningForNonExportableDisks ( snapshotModel , disks , VmModelHelper.WarningType.VM_SNAPSHOT ) ; snapshotModel.getCommands ( ) . add ( getOnSaveCommand ( ) ) ; snapshotModel.getCommands ( ) . add ( getCancelCommand ( ) ) ; snapshotModel.stopProgress ( ) ; }

Target:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.SnapshotModel snapshotModel = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.SnapshotModel ) ( target ) ) ; java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > disks = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ) ( returnValue ) ) ; updateSnapshotDisks ( disks ) ; org.ovirt.engine.ui.uicommonweb.models.vms.VmModelHelper.sendWarningForNonExportableDisks ( snapshotModel , disks , VmModelHelper.WarningType.VM_SNAPSHOT ) ; snapshotModel.getCommands ( ) . add ( getOnSaveCommand ( ) ) ; snapshotModel.getCommands ( ) . add ( getCancelCommand ( ) ) ; snapshotModel.stopProgress ( ) ; }
Source:
public void testRemoveForced ( ) throws java.lang.Exception { setUpGetEntityExpectations ( 1 ) ; setUpVersionExpectations ( ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.RemoveStoragePool , org.ovirt.engine.core.common.action.StoragePoolParametersBase.class , new java.lang.String [ ] { "StoragePoolId" , "ForceDelete" } , new java.lang.Object [ ] { GUIDS [ 0 ] , java.lang.Boolean.TRUE } , true , true ) ) ; org.ovirt.engine.api.model.Action action = new org.ovirt.engine.api.model.Action ( ) ; action.setForce ( true ) ; verifyRemove ( resource.remove ( action ) ) ; }

Target:
public void testRemoveForced ( ) throws java.lang.Exception { setUpGetEntityExpectations ( 1 ) ; setUpVersionExpectations ( ) ; javax.ws.rs.core.UriInfo uriInfo = setUpActionExpectations ( VdcActionType.RemoveStoragePool , org.ovirt.engine.core.common.action.StoragePoolParametersBase.class , new java.lang.String [ ] { "StoragePoolId" , "ForceDelete" } , new java.lang.Object [ ] { GUIDS [ 0 ] , java.lang.Boolean.TRUE } , true , true , false ) ; uriInfo = addMatrixParameterExpectations ( uriInfo , BackendDataCenterResource.FORCE , java.lang.Boolean.TRUE.toString ( ) ) ; setUriInfo ( uriInfo ) ; control.replay ( ) ; verifyRemove ( resource.remove ( ) ) ; }
Source:
public static void getDataCenterList ( 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 ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StoragePool > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( "DataCenter: sortby name" , org.ovirt.engine.core.common.interfaces.SearchType.StoragePool ) , aQuery ) ; }

Target:
public static void isFloppySupported ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.Integer osId , org.ovirt.engine.core.compat.Version version ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter < java.lang.Boolean > ( ) { @ java.lang.Override public java.lang.Boolean Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Boolean ) ( source ) ) : java.lang.Boolean.FALSE ; } } ; org.ovirt.engine.core.common.queries.OsQueryParameters params = new org.ovirt.engine.core.common.queries.OsQueryParameters ( org.ovirt.engine.core.common.queries.OsQueryParameters.OsRepositoryVerb.GetFloppySupport , osId , version ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.OsRepository , params , aQuery ) ; }
Source:
public void getVmsFromExternalServer ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId , org.ovirt.engine.core.compat.Guid vdsId , java.lang.String url , java.lang.String username , java.lang.String password , org.ovirt.engine.core.common.businessentities.OriginType originType ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VM > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmsFromExternalProvider , new org.ovirt.engine.core.common.queries.GetVmsFromExternalProviderQueryParameters ( url , username , password , originType , vdsId , dataCenterId ) , aQuery ) ; }

Target:
public void getVmsFromExternalServer ( org.ovirt.engine.ui.frontend.AsyncQuery < java.util.List < org.ovirt.engine.core.common.businessentities.VM > > aQuery , org.ovirt.engine.core.compat.Guid dataCenterId , org.ovirt.engine.core.compat.Guid vdsId , java.lang.String url , java.lang.String username , java.lang.String password , org.ovirt.engine.core.common.businessentities.OriginType originType ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.ListConverter < > ( ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmsFromExternalProvider , new org.ovirt.engine.core.common.queries.GetVmsFromExternalProviderQueryParameters ( url , username , password , originType , vdsId , dataCenterId ) , aQuery ) ; }
Source:
public java.lang.String getSessionIdBySSOAccessToken ( java.lang.String ssoToken ) { java.lang.String sessionId = null ; for ( org.ovirt.engine.core.bll.aaa.SessionDataContainer.SessionInfo sessionInfo : sessionInfoMap.values ( ) ) { if ( sessionInfo.contentOfSession.get ( org.ovirt.engine.core.bll.aaa.SessionDataContainer.SSO_ACCESS_TOKEN_PARAMETER_NAME ) . equals ( ssoToken ) ) { sessionId = ( ( java.lang.String ) ( sessionInfo.contentOfSession.get ( org.ovirt.engine.core.bll.aaa.SessionDataContainer.ENGINE_SESSION_ID ) ) ) ; break ; } } return sessionId ; }

Target:
public java.lang.String getSessionIdBySsoAccessToken ( java.lang.String ssoToken ) { java.lang.String sessionId = null ; for ( org.ovirt.engine.core.bll.aaa.SessionDataContainer.SessionInfo sessionInfo : sessionInfoMap.values ( ) ) { if ( sessionInfo.contentOfSession.get ( org.ovirt.engine.core.bll.aaa.SessionDataContainer.SSO_ACCESS_TOKEN_PARAMETER_NAME ) . equals ( ssoToken ) ) { sessionId = ( ( java.lang.String ) ( sessionInfo.contentOfSession.get ( org.ovirt.engine.core.bll.aaa.SessionDataContainer.ENGINE_SESSION_ID ) ) ) ; break ; } } return sessionId ; }
Source:
public static java.lang.String getParameter ( javax.servlet.http.HttpServletRequest request , java.lang.String paramName ) { java.lang.String value = null ; java.util.Map < java.lang.String , java.lang.String [ ] > map = ( ( java.util.Map < java.lang.String , java.lang.String [ ] > ) ( request.getSession ( true ) . getAttribute ( org.ovirt.engine.core.sso.utils.SSOUtils.PARAMS_MAP ) ) ) ; if ( ( map != null ) && ( map.containsKey ( paramName ) ) ) { value = map.get ( paramName ) [ 0 ] ; } return value ; }

Target:
public static java.lang.String getRequestParameter ( javax.servlet.http.HttpServletRequest request , java.lang.String paramName , java.lang.String defaultValue ) { java.lang.String value ; try { value = org.ovirt.engine.core.sso.utils.SSOUtils.getRequestParameter ( request , paramName ) ; } catch ( java.lang.Exception ex ) { org.ovirt.engine.core.sso.utils.SSOUtils.log.debug ( "Parameter not found request, using default value" , paramName ) ; value = defaultValue ; } return value ; }
Source:
public void onResize ( ) { super . onResize ( ) ; double currentWidth = westPanel.getOffsetWidth ( ) ; setStoredSplitterWidth ( currentWidth ) ; determineButtonVisiblity ( ) ; positionLeftCollapseButton ( ) ; }

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 void testDiscoverGeoRepDataWhenNoSessions ( ) { org.mockito.Mockito.doReturn ( getSessionsVDSReturnVal ( true , 0 ) ) . when ( syncJob ) . runVdsCommand ( org.mockito.Matchers.eq ( VDSCommandType.GetGlusterVolumeGeoRepStatus ) , org.mockito.Matchers.any ( org.ovirt.engine.core.common.vdscommands.gluster.GlusterVolumeGeoRepSessionVDSParameters.class ) ) ; syncJob.discoverGeoRepData ( ) ; org.mockito.Mockito.verify ( geoRepDao , org.mockito.Mockito.times ( 0 ) ) . save ( org.mockito.Matchers.any ( org.ovirt.engine.core.common.businessentities.gluster.GlusterGeoRepSession.class ) ) ; }

Target:
public void testDiscoverGeoRepDataWhenNoSessions ( ) { org.mockito.Mockito.doReturn ( getSessionsVDSReturnVal ( true , 0 ) ) . when ( syncJob ) . runVdsCommand ( org.mockito.Matchers.eq ( VDSCommandType.GetGlusterVolumeGeoRepSessionList ) , org.mockito.Matchers.any ( org.ovirt.engine.core.common.vdscommands.gluster.GlusterVolumeGeoRepSessionVDSParameters.class ) ) ; syncJob.discoverGeoRepData ( ) ; org.mockito.Mockito.verify ( geoRepDao , org.mockito.Mockito.times ( 0 ) ) . save ( org.mockito.Matchers.any ( org.ovirt.engine.core.common.businessentities.gluster.GlusterGeoRepSession.class ) ) ; }
Source:
public void postOnSetParameter ( org.ovirt.engine.core.common.action.VdcReturnValueBase returnValue ) { org.ovirt.engine.ui.uicommonweb.models.gluster.VolumeParameterModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.gluster.VolumeParameterModel ) ( getWindow ( ) ) ) ; model.StopProgress ( ) ; if ( ( returnValue != null ) && ( returnValue.getSucceeded ( ) ) ) { cancel ( ) ; } }

Target:
public void postOnSetParameter ( org.ovirt.engine.core.common.action.VdcReturnValueBase returnValue ) { org.ovirt.engine.ui.uicommonweb.models.gluster.VolumeParameterModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.gluster.VolumeParameterModel ) ( getWindow ( ) ) ) ; model.stopProgress ( ) ; if ( ( returnValue != null ) && ( returnValue.getSucceeded ( ) ) ) { cancel ( ) ; } }
Source:
public void testPrefixViewCache ( ) throws java.lang.Exception { java.io.File file = writeConf ( ) ; org.ovirt.engine.core.extensions.mgr.Configuration config = org.ovirt.engine.core.extensions.mgr.Configuration.loadFile ( file ) ; junit.framework.Assert.assertNotNull ( config ) ; org.ovirt.engine.core.extensions.mgr.Configuration view1 = config.getView ( "a" ) ; junit.framework.Assert.assertNotNull ( view1 ) ; org.ovirt.engine.core.extensions.mgr.Configuration view2 = config.getView ( "a" ) ; junit.framework.Assert.assertNotNull ( view2 ) ; junit.framework.Assert.assertTrue ( ( view1 == view2 ) ) ; }

Target:
public void testPrefixViewCache ( ) throws java.lang.Exception { java.io.File file = writeConf ( ) ; org.ovirt.engine.core.extensions.mgr.Configuration config = org.ovirt.engine.core.extensions.mgr.Configuration.loadFile ( file ) ; org.junit.Assert.assertNotNull ( config ) ; org.ovirt.engine.core.extensions.mgr.Configuration view1 = config.getView ( "a" ) ; org.junit.Assert.assertNotNull ( view1 ) ; org.ovirt.engine.core.extensions.mgr.Configuration view2 = config.getView ( "a" ) ; org.junit.Assert.assertNotNull ( view2 ) ; org.junit.Assert.assertTrue ( ( view1 == view2 ) ) ; }
Source:
protected java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > getDisksList ( ) { if ( ( cachedSelectedActiveDisks ) == null ) { cachedSelectedActiveDisks = org.ovirt.engine.core.bll.ImagesHandler.filterImageDisks ( org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getDiskDao ( ) . getAllForVm ( org.ovirt.engine.core.bll.CreateAllSnapshotsFromVmCommand.getVmId ( ) ) , true , true , true ) ; } return cachedSelectedActiveDisks ; }

Target:
protected java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > getDisksList ( ) { if ( ( cachedSelectedActiveDisks ) == null ) { java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > imagesForVm = getDiskImagesForVm ( ) ; if ( ( getParameters ( ) . getDisks ( ) ) == null ) { cachedSelectedActiveDisks = imagesForVm ; } else { cachedSelectedActiveDisks = org.ovirt.engine.core.bll.ImagesHandler.imagesIntersection ( imagesForVm , getParameters ( ) . getDisks ( ) ) ; } } return cachedSelectedActiveDisks ; }
Source:
protected java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > getDisksList ( ) { if ( ( cachedSelectedActiveDisks ) == null ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > imagesAndCinderForVm = getDiskImagesForVm ( ) ; if ( ( getParameters ( ) . getDisks ( ) ) == null ) { cachedSelectedActiveDisks = imagesAndCinderForVm ; } else { cachedSelectedActiveDisks = org.ovirt.engine.core.bll.storage.disk.image.ImagesHandler.imagesIntersection ( imagesAndCinderForVm , getParameters ( ) . getDisks ( ) ) ; } } return cachedSelectedActiveDisks ; }

Target:
protected java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > getDisksList ( ) { if ( ( cachedSelectedActiveDisks ) == null ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > imagesAndCinderForVm = getDiskImagesForVm ( ) ; if ( ( org.ovirt.engine.core.bll.snapshots.CreateAllSnapshotsFromVmCommand.getParameters ( ) . getDisks ( ) ) == null ) { cachedSelectedActiveDisks = imagesAndCinderForVm ; } else { cachedSelectedActiveDisks = org.ovirt.engine.core.bll.storage.disk.image.ImagesHandler.imagesIntersection ( imagesAndCinderForVm , org.ovirt.engine.core.bll.snapshots.CreateAllSnapshotsFromVmCommand.getParameters ( ) . getDisks ( ) ) ; } } return cachedSelectedActiveDisks ; }
Source:
private void updateAuditLogEventProcessed ( org.ovirt.engine.core.common.businessentities.event_audit_log_subscriber eventSubscriber ) throws java.sql.SQLException { java.sql.Connection connection = null ; java.sql.PreparedStatement ps = null ; try { connection = ds.getConnection ( ) ; ps = connection.prepareStatement ( "update audit_log set processed = 'true' where audit_log_id = ?" ) ; ps.setLong ( 1 , eventSubscriber.getaudit_log_id ( ) ) ; int updated = ps.executeUpdate ( ) ; if ( updated != 1 ) { org.ovirt.engine.core.notifier.NotificationService.log.error ( ( "Failed to mark audit_log entry as processed for audit_log_id: " + ( eventSubscriber.getaudit_log_id ( ) ) ) ) ; } } finally { org.ovirt.engine.core.utils.db.DbUtils.closeQuietly ( ps , connection ) ; } }

Target:
private void updateAuditLogEventProcessed ( org.ovirt.engine.core.common.businessentities.EventAuditLogSubscriber eventSubscriber ) throws java.sql.SQLException { java.sql.Connection connection = null ; java.sql.PreparedStatement ps = null ; try { connection = ds.getConnection ( ) ; ps = connection.prepareStatement ( "update audit_log set processed = 'true' where audit_log_id = ?" ) ; ps.setLong ( 1 , eventSubscriber.getaudit_log_id ( ) ) ; int updated = ps.executeUpdate ( ) ; if ( updated != 1 ) { org.ovirt.engine.core.notifier.NotificationService.log.error ( ( "Failed to mark audit_log entry as processed for audit_log_id: " + ( eventSubscriber.getaudit_log_id ( ) ) ) ) ; } } finally { org.ovirt.engine.core.utils.db.DbUtils.closeQuietly ( ps , connection ) ; } }
Source:
public java.lang.Void runInTransaction ( ) { final java.util.List < org.ovirt.engine.core.common.businessentities.network.Network > networks = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getNetworkDao ( ) . getAllForDataCenter ( getStoragePoolId ( ) ) ; for ( final org.ovirt.engine.core.common.businessentities.network.Network net : networks ) { getCompensationContext ( ) . snapshotEntity ( net ) ; org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getNetworkDao ( ) . remove ( net.getId ( ) ) ; } getCompensationContext ( ) . stateChanged ( ) ; return null ; }

Target:
public java.lang.Void runInTransaction ( ) { final java.util.List < org.ovirt.engine.core.common.businessentities.network.Network > networks = getNetworkDAO ( ) . getAllForDataCenter ( getStoragePoolId ( ) ) ; for ( final org.ovirt.engine.core.common.businessentities.network.Network net : networks ) { getCompensationContext ( ) . snapshotEntity ( net ) ; getNetworkDAO ( ) . remove ( net.getId ( ) ) ; } getCompensationContext ( ) . stateChanged ( ) ; return null ; }
Source:
public void setItems ( java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.SystemTreeItemModel > value ) { if ( ( items ) != value ) { ItemsChanging ( value , items ) ; items = value ; ItemsChanged ( ) ; getItemsChangedEvent ( ) . raise ( this , EventArgs.Empty ) ; OnPropertyChanged ( new org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ( "Items" ) ) ; } }

Target:
public void setItems ( java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.SystemTreeItemModel > value ) { if ( ( items ) != value ) { ItemsChanging ( value , items ) ; items = value ; ItemsChanged ( ) ; getItemsChangedEvent ( ) . raise ( this , EventArgs.Empty ) ; onPropertyChanged ( new org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ( "Items" ) ) ; } }
Source:
protected void updateExistingEntity ( ) { existingEntity.setStorageName ( "UpdatedName" ) ; existingEntity.setWipeAfterDelete ( true ) ; existingEntity.setWarningLowSpaceIndicator ( 4 ) ; existingEntity.setCriticalSpaceActionBlocker ( 8 ) ; existingEntity.setFirstMetadataDevice ( FixturesTool.LUN_ID1 ) ; existingEntity.setVgMetadataDevice ( FixturesTool.LUN_ID1 ) ; existingEntity.setBackup ( true ) ; }

Target:
protected void updateExistingEntity ( ) { existingEntity.setStorageName ( "UpdatedName" ) ; existingEntity.setWipeAfterDelete ( true ) ; existingEntity.setWarningLowSpaceIndicator ( 4 ) ; existingEntity.setCriticalSpaceActionBlocker ( 8 ) ; existingEntity.setWarningLowConfirmedSpaceIndicator ( 5 ) ; existingEntity.setFirstMetadataDevice ( FixturesTool.LUN_ID1 ) ; existingEntity.setVgMetadataDevice ( FixturesTool.LUN_ID1 ) ; existingEntity.setBackup ( true ) ; }
Source:
private java.util.Set < java.lang.String > getRemovedNetworks ( ) { if ( ( removedNetworks ) == null ) { removedNetworks = new java.util.HashSet ( org.ovirt.engine.core.bll.network.host.HostSetupNetworksCommand.getParameters ( ) . getRemovedNetworkAttachments ( ) . size ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.network.NetworkAttachment attachment : org.ovirt.engine.core.bll.network.host.HostSetupNetworksCommand.getParameters ( ) . getRemovedNetworkAttachments ( ) ) { removedNetworks.add ( getNetworkBusinessEntityMap ( ) . get ( attachment.getNetworkId ( ) ) . getName ( ) ) ; } } return removedNetworks ; }

Target:
private org.ovirt.engine.core.common.businessentities.network.Network existingNetworkRelatedToAttachment ( org.ovirt.engine.core.common.businessentities.network.NetworkAttachment attachment ) { return getNetworkBusinessEntityMap ( ) . get ( attachment.getNetworkId ( ) ) ; }
Source:
public java.lang.Void runInTransaction ( ) { getImageStorageDomainMapDao ( ) . remove ( new org.ovirt.engine.core.common.businessentities.ImageStorageDomainMapId ( getParameters ( ) . getImageId ( ) , getParameters ( ) . getStorageDomainId ( ) ) ) ; org.ovirt.engine.core.bll.ImagesHandler.updateAllDiskImageSnapshotsStatus ( getRelevantDiskImage ( ) . getId ( ) , getRelevantDiskImage ( ) . getImageStatus ( ) ) ; return null ; }

Target:
public java.lang.Void runInTransaction ( ) { getImageStorageDomainMapDao ( ) . remove ( new org.ovirt.engine.core.common.businessentities.storage.ImageStorageDomainMapId ( getParameters ( ) . getImageId ( ) , getParameters ( ) . getStorageDomainId ( ) ) ) ; org.ovirt.engine.core.bll.ImagesHandler.updateAllDiskImageSnapshotsStatus ( getRelevantDiskImage ( ) . getId ( ) , getRelevantDiskImage ( ) . getImageStatus ( ) ) ; return null ; }
Source:
public void onSuccess ( java.util.List < org.ovirt.engine.core.common.businessentities.VDS > hosts ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > filteredHosts = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.VDS host : hosts ) { if ( isHostAvailable ( host ) ) { filteredHosts.add ( host ) ; } } getHost ( ) . setItems ( filteredHosts ) ; }

Target:
public void onSuccess ( java.util.List < org.ovirt.engine.core.common.businessentities.VDS > hosts ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > filteredHosts = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.VDS host : hosts ) { if ( isHostAvailable ( host ) ) { filteredHosts.add ( host ) ; } } java.util.Collections.sort ( filteredHosts , new org.ovirt.engine.core.common.businessentities.comparators.NameableComparator ( ) ) ; getHost ( ) . setItems ( filteredHosts ) ; }
Source:
private void cancelTasks ( ) { if ( hasTasks ( ) ) { org.ovirt.engine.core.utils.threadpool.ThreadPoolUtil.execute ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { log.infoFormat ( "Rollback for command: {0}." , org.ovirt.engine.core.bll.CommandBase.this . getClass ( ) . getName ( ) ) ; try { getAsyncTaskManager ( ) . cancelTasks ( getReturnValue ( ) . getVdsmTaskIdList ( ) ) ; } catch ( java.lang.Exception e ) { log.errorFormat ( "Failed to cancel tasks for command: {0}." , org.ovirt.engine.core.bll.CommandBase.this . getClass ( ) . getName ( ) ) ; } } } ) ; } }

Target:
public void persistCommand ( org.ovirt.engine.core.common.action.VdcActionType parentCommand ) { persistCommand ( parentCommand , false ) ; }
Source:
public void hostAttachedToLocalStorageWithoutDataCenter ( ) { org.mockito.Mockito.when ( storagePoolDao.getForVdsGroup ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( null ) ; org.mockito.Mockito.when ( dbFacade.getStoragePoolDao ( ) ) . thenReturn ( storagePoolDao ) ; validator = new org.ovirt.engine.core.bll.validator.HostValidator ( dbFacade , host ) ; org.junit.Assert.assertThat ( validator.validateSingleHostAttachedToLocalStorage ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }

Target:
public void supportsHostedEngineDeploy ( ) { org.mockito.Mockito.when ( hostedEngineHelper.isVmManaged ( ) ) . thenReturn ( true ) ; mockCluster ( Version.v4_0 ) ; org.junit.Assert.assertThat ( validator.supportsDeployingHostedEngine ( new org.ovirt.engine.core.common.businessentities.HostedEngineDeployConfiguration ( HostedEngineDeployConfiguration.Action.DEPLOY ) ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }
Source:
public static boolean IsWindowsOsType ( org.ovirt.engine.core.common.businessentities.VmOsType osType ) { if ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetWindowsOsTypes ( ) . contains ( osType ) ) { return true ; } return false ; }

Target:
public static java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskInterface > getDiskInterfaceList ( org.ovirt.engine.core.compat.Version clusterVersion ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskInterface > diskInterfaces = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskInterface > ( java.util.Arrays.asList ( new org.ovirt.engine.core.common.businessentities.DiskInterface [ ] { org.ovirt.engine.core.common.businessentities.DiskInterface.IDE , org.ovirt.engine.core.common.businessentities.DiskInterface.VirtIO } ) ) ; boolean isVirtIOScsiEnabled = ( clusterVersion != null ) ? ( ( java.lang.Boolean ) ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigValuePreConverted ( ConfigurationValues.VirtIoScsiEnabled , clusterVersion.getValue ( ) ) ) ) : true ; if ( isVirtIOScsiEnabled ) { diskInterfaces.add ( DiskInterface.VirtIO_SCSI ) ; } return diskInterfaces ; }
Source:
public void onSucceeded ( org.ovirt.engine.core.compat.Guid cmdId , java.util.List < org.ovirt.engine.core.compat.Guid > childCmdIds ) { java.lang.String ovf = getOvf ( ) ; if ( ovf == null ) { return ; } org.ovirt.engine.core.common.businessentities.VM vm = readVmFromOvf ( ovf ) ; if ( vm == null ) { return ; } addImportedDevices ( vm.getStaticData ( ) ) ; deleteV2VJob ( ) ; }

Target:
private void addImportedDevices ( org.ovirt.engine.core.common.businessentities.VM vm ) { org.ovirt.engine.core.common.businessentities.VmStatic vmStatic = vm.getStaticData ( ) ; vmStatic.setImages ( new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.DiskImage > ( ) ) ; vmStatic.setInterfaces ( new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ( ) ) ; org.ovirt.engine.core.bll.ImportUtils.updateGraphicsDevices ( vmStatic , org.ovirt.engine.core.bll.ConvertVmCommand.getStoragePool ( ) . getCompatibilityVersion ( ) ) ; org.ovirt.engine.core.bll.utils.VmDeviceUtils.addImportedDevices ( vmStatic , false ) ; }
Source:
private static org.ovirt.engine.api.rsdl.ServiceTreeNode buildNode ( java.lang.Class < ? > resource , java.lang.String path ) { org.ovirt.engine.api.rsdl.ServiceTreeNode node = new org.ovirt.engine.api.rsdl.ServiceTreeNode.Builder ( ) . name ( resource.getSimpleName ( ) ) . path ( path ) . subCollections ( org.ovirt.engine.api.rsdl.ServiceTree.getSubServices ( resource ) ) . actions ( org.ovirt.engine.api.rsdl.ServiceTree.getActions ( resource ) ) . build ( ) ; if ( ! ( org.ovirt.engine.api.rsdl.ServiceTree.nodes.containsKey ( resource ) ) ) { org.ovirt.engine.api.rsdl.ServiceTree.nodes.put ( resource , node ) ; } return node ; }

Target:
private static org.ovirt.engine.api.rsdl.ServiceTreeNode buildNode ( java.lang.Class < ? > resource , java.lang.String path , java.lang.String getterMethod ) { org.ovirt.engine.api.rsdl.ServiceTreeNode node = new org.ovirt.engine.api.rsdl.ServiceTreeNode.Builder ( ) . name ( resource.getSimpleName ( ) ) . path ( path ) . getter ( getterMethod ) . subCollections ( org.ovirt.engine.api.rsdl.ServiceTree.getSubServices ( resource ) ) . actions ( org.ovirt.engine.api.rsdl.ServiceTree.getActions ( resource ) ) . build ( ) ; if ( ! ( org.ovirt.engine.api.rsdl.ServiceTree.nodes.containsKey ( resource ) ) ) { org.ovirt.engine.api.rsdl.ServiceTree.nodes.put ( resource , node ) ; } return node ; }
Source:
public void search ( ) { if ( ( getEntity ( ) ) != null ) { super . search ( ) ; } }

Target:
protected void syncSearch ( ) { if ( ( getEntity ( ) ) == null ) { return ; } org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getGlusterBricksForServer ( 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 ) { java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity > glusterBricks = ( ( java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity > ) ( returnValue ) ) ; java.util.Collections.sort ( glusterBricks , new org.ovirt.engine.ui.uicommonweb.Linq.ServerBricksComparer ( ) ) ; setItems ( glusterBricks ) ; } } ) , getEntity ( ) . getId ( ) ) ; }
Source:
protected void completeImageData ( org.ovirt.engine.core.common.businessentities.DiskImage fromIRS ) { getDestinationDiskImage ( ) . setCreationDate ( fromIRS.getCreationDate ( ) ) ; getDestinationDiskImage ( ) . setLastModifiedDate ( fromIRS.getLastModifiedDate ( ) ) ; getDestinationDiskImage ( ) . setLastModified ( getDestinationDiskImage ( ) . getLastModifiedDate ( ) ) ; org.ovirt.engine.core.common.businessentities.DiskImageDynamic destinationDiskDynamic = getDiskImageDynamicDAO ( ) . get ( getDestinationDiskImage ( ) . getImageId ( ) ) ; if ( destinationDiskDynamic != null ) { destinationDiskDynamic.setactual_size ( fromIRS.getActualSizeFromDiskImage ( ) ) ; getDiskImageDynamicDAO ( ) . update ( destinationDiskDynamic ) ; } }

Target:
protected void completeImageData ( org.ovirt.engine.core.common.businessentities.DiskImage fromIRS ) { getDestinationDiskImage ( ) . setCreationDate ( fromIRS.getCreationDate ( ) ) ; getDestinationDiskImage ( ) . setLastModifiedDate ( fromIRS.getLastModifiedDate ( ) ) ; getDestinationDiskImage ( ) . setLastModified ( getDestinationDiskImage ( ) . getLastModifiedDate ( ) ) ; org.ovirt.engine.core.common.businessentities.DiskImageDynamic destinationDiskDynamic = getDiskImageDynamicDAO ( ) . get ( getDestinationDiskImage ( ) . getImageId ( ) ) ; if ( destinationDiskDynamic != null ) { destinationDiskDynamic.setactual_size ( fromIRS.getActualSizeInBytes ( ) ) ; getDiskImageDynamicDAO ( ) . update ( destinationDiskDynamic ) ; } }
Source:
private void disableAllTabs ( ) { generalTab.disableContent ( ) ; poolTab.disableContent ( ) ; initialRunTab.disableContent ( ) ; consoleTab.disableContent ( ) ; hostTab.disableContent ( ) ; highAvailabilityTab.disableContent ( ) ; resourceAllocationTab.disableContent ( ) ; bootOptionsTab.disableContent ( ) ; customPropertiesTab.disableContent ( ) ; systemTab.disableContent ( ) ; oSTypeEditor.setEnabled ( false ) ; }

Target:
private void disableAllTabs ( ) { generalTab.disableContent ( ) ; poolTab.disableContent ( ) ; initialRunTab.disableContent ( ) ; consoleTab.disableContent ( ) ; hostTab.disableContent ( ) ; highAvailabilityTab.disableContent ( ) ; resourceAllocationTab.disableContent ( ) ; bootOptionsTab.disableContent ( ) ; customPropertiesTab.disableContent ( ) ; systemTab.disableContent ( ) ; oSTypeEditor.setEnabled ( false ) ; quotaEditor.setEnabled ( false ) ; }
Source:
public void onClick ( com.google.gwt.event.dom.client.ClickEvent event ) { model.setIsEveryoneSelected ( true ) ; getView ( ) . changeStateOfElementsWhenAccessIsForEveryone ( true ) ; }

Target:
public void onKeyPress ( com.google.gwt.event.dom.client.KeyPressEvent event ) { if ( ( com.google.gwt.event.dom.client.KeyCodes.KEY_ENTER ) == ( event.getNativeEvent ( ) . getKeyCode ( ) ) ) { model.setSearchString ( getView ( ) . getSearchString ( ) . getValue ( ) ) ; getView ( ) . getSearchButton ( ) . getCommand ( ) . Execute ( ) ; } }
Source:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event < ? extends org.ovirt.engine.ui.uicompat.EventArgs > ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { org.ovirt.engine.core.common.businessentities.StoragePool dataCenter = dataCenters.getSelectedItem ( ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageDomainsByStoragePoolId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenter.getId ( ) ) , new org.ovirt.engine.ui.frontend.AsyncQuery ( this , createGetStorageDomainsByStoragePoolIdCallback ( dataCenter ) ) ) ; }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event < ? extends org.ovirt.engine.ui.uicompat.EventArgs > ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { providerChanged ( ) ; }
Source:
public void testGetAllStoragePoolSearch ( ) { org.mockito.Mockito.when ( getQueryParameters ( ) . getSearchPattern ( ) ) . thenReturn ( ( "Datacenter" + ( org.ovirt.engine.core.common.utils.CommonConstants.QUERY_RETURN_TYPE_SEPARATOR ) ) ) ; org.mockito.Mockito.when ( getQueryParameters ( ) . getSearchTypeValue ( ) ) . thenReturn ( SearchType.StoragePool ) ; getQuery ( ) . executeQueryCommand ( ) ; org.junit.Assert.assertEquals ( storagePoolResultList , getQuery ( ) . getQueryReturnValue ( ) . getReturnValue ( ) ) ; }

Target:
public void testGetAllStoragePoolSearch ( ) { org.mockito.Mockito.when ( getQueryParameters ( ) . getSearchPattern ( ) ) . thenReturn ( ( "Datacenter" + ( org.ovirt.engine.core.common.utils.CommonConstants.QUERY_RETURN_TYPE_SEPARATOR ) ) ) ; org.mockito.Mockito.when ( getQueryParameters ( ) . getSearchTypeValue ( ) ) . thenReturn ( SearchType.StoragePool ) ; getQuery ( ) . executeQueryCommand ( ) ; org.junit.jupiter.api.Assertions.assertEquals ( storagePoolResultList , getQuery ( ) . getQueryReturnValue ( ) . getReturnValue ( ) ) ; }
Source:
protected void itemsCollectionChanged ( java.lang.Object sender , org.ovirt.engine.ui.uicompat.NotifyCollectionChangedEventArgs e ) { super . itemsCollectionChanged ( sender , e ) ; if ( ( ( getSystemTreeSelectedItem ( ) ) != null ) && ( ( getSystemTreeSelectedItem ( ) . getType ( ) ) == ( org.ovirt.engine.ui.uicommonweb.models.SystemTreeItemType.DataCenter ) ) ) { org.ovirt.engine.core.common.businessentities.StoragePool dataCenter = ( ( org.ovirt.engine.core.common.businessentities.StoragePool ) ( getSystemTreeSelectedItem ( ) . getEntity ( ) ) ) ; setSelectedItem ( org.ovirt.engine.ui.uicommonweb.Linq.firstOrDefault ( org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.StoragePool > cast ( getItems ( ) ) , new org.ovirt.engine.ui.uicommonweb.Linq.DataCenterPredicate ( dataCenter.getId ( ) ) ) ) ; } }

Target:
protected void itemsCollectionChanged ( java.lang.Object sender , org.ovirt.engine.ui.uicompat.NotifyCollectionChangedEventArgs e ) { super . itemsCollectionChanged ( sender , e ) ; if ( ( ( getSystemTreeSelectedItem ( ) ) != null ) && ( ( getSystemTreeSelectedItem ( ) . getType ( ) ) == ( org.ovirt.engine.ui.uicommonweb.models.SystemTreeItemType.DataCenter ) ) ) { org.ovirt.engine.core.common.businessentities.StoragePool dataCenter = ( ( org.ovirt.engine.core.common.businessentities.StoragePool ) ( getSystemTreeSelectedItem ( ) . getEntity ( ) ) ) ; setSelectedItem ( org.ovirt.engine.ui.uicommonweb.Linq.firstOrNull ( org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.StoragePool > cast ( getItems ( ) ) , new org.ovirt.engine.ui.uicommonweb.Linq.DataCenterPredicate ( dataCenter.getId ( ) ) ) ) ; } }