auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private org.ovirt.engine.core.vdsbroker.vdsbroker.SetupNetworksVDSCommand < org.ovirt.engine.core.common.vdscommands.SetupNetworksVdsCommandParameters > createCommand ( org.ovirt.engine.core.common.vdscommands.SetupNetworksVdsCommandParameters parameters ) { final org.ovirt.engine.core.dal.dbbroker.DbFacade dbFacade = org.mockito.Mockito.mock ( org.ovirt.engine.core.dal.dbbroker.DbFacade.class ) ; final org.ovirt.engine.core.dao.VdsDAO vdsDao = org.mockito.Mockito.mock ( org.ovirt.engine.core.dao.VdsDAO.class ) ; org.mockito.Mockito.when ( dbFacade.getVdsDAO ( ) ) . thenReturn ( vdsDao ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.SetupNetworksVDSCommand < org.ovirt.engine.core.common.vdscommands.SetupNetworksVdsCommandParameters > ( parameters ) { @ java.lang.Override protected org.ovirt.engine.core.vdsbroker.vdsbroker.IVdsServer initializeVdsBroker ( org.ovirt.engine.core.compat.Guid vdsId ) { return server ; } @ java.lang.Override protected org.ovirt.engine.core.dal.dbbroker.DbFacade getDbFacade ( ) { return dbFacade ; } } ; }

Target:
private org.ovirt.engine.core.vdsbroker.vdsbroker.SetupNetworksVDSCommand < org.ovirt.engine.core.common.vdscommands.SetupNetworksVdsCommandParameters > createCommand ( org.ovirt.engine.core.common.vdscommands.SetupNetworksVdsCommandParameters parameters ) { final org.ovirt.engine.core.dal.dbbroker.DbFacade dbFacade = org.mockito.Mockito.mock ( org.ovirt.engine.core.dal.dbbroker.DbFacade.class ) ; final org.ovirt.engine.core.dao.VdsDAO vdsDao = org.mockito.Mockito.mock ( org.ovirt.engine.core.dao.VdsDAO.class ) ; org.mockito.Mockito.when ( dbFacade.getVdsDao ( ) ) . thenReturn ( vdsDao ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.SetupNetworksVDSCommand < org.ovirt.engine.core.common.vdscommands.SetupNetworksVdsCommandParameters > ( parameters ) { @ java.lang.Override protected org.ovirt.engine.core.vdsbroker.vdsbroker.IVdsServer initializeVdsBroker ( org.ovirt.engine.core.compat.Guid vdsId ) { return server ; } @ java.lang.Override protected org.ovirt.engine.core.dal.dbbroker.DbFacade getDbFacade ( ) { return dbFacade ; } } ; }
Source:
public void setup ( ) { initVds ( ) ; mockEjbStrategy ( ) ; initConditions ( ) ; updater = new org.ovirt.engine.core.vdsbroker.VdsUpdateRunTimeInfo ( null , vds ) { @ java.lang.Override public org.ovirt.engine.core.dal.dbbroker.DbFacade getDbFacade ( ) { return dbFacade ; } @ java.lang.Override protected org.ovirt.engine.core.vdsbroker.MonitoringStrategy getMonitoringStrategyForVds ( org.ovirt.engine.core.common.businessentities.VDS param ) { return org.mockito.Mockito.mock ( org.ovirt.engine.core.vdsbroker.MonitoringStrategy.class ) ; } @ java.lang.Override protected void auditLog ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase auditLogable , org.ovirt.engine.core.common.AuditLogType logType ) { org.ovirt.engine.core.common.businessentities.AuditLog al = new org.ovirt.engine.core.common.businessentities.AuditLog ( ) ; al.setlog_type ( logType ) ; mockAuditLogDao.save ( al ) ; } } ; }

Target:
protected org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcStruct [ ] getVmInfo ( java.util.List < java.lang.String > vmsToUpdate ) { return vmInfo ; }
Source:
public java.lang.String getThemeStyleSheet ( java.lang.String applicationName ) { return brandingProperties.getProperty ( ( applicationName + ( org.ovirt.engine.core.branding.BrandingTheme.CSS_POST_FIX ) ) ) ; }

Target:
public java.util.List < java.lang.String > getThemeStylesheets ( java.lang.String applicationName ) { java.util.List < java.lang.String > ret = null ; final java.lang.String cssFiles = brandingProperties.getProperty ( ( applicationName + ( org.ovirt.engine.core.branding.BrandingTheme.CSS_POST_FIX ) ) ) ; if ( cssFiles == null ) { org.ovirt.engine.core.branding.BrandingTheme.log.warn ( ( ( ( ( ( "Theme '" + ( this . getPath ( ) ) ) + "' has no property defined for key '" ) + applicationName ) + ( org.ovirt.engine.core.branding.BrandingTheme.CSS_POST_FIX ) ) + "'" ) ) ; } else { ret = java.util.Arrays.asList ( cssFiles.split ( "\\s*,\\s*" ) ) ; } return ret ; }
Source:
public static void getTemplateById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid templateId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmTemplate , new org.ovirt.engine.core.common.queries.GetVmTemplateParameters ( templateId ) , aQuery ) ; }

Target:
public static void getClusterServerMemoryOverCommit ( 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 ( ) : 0 ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.MaxVdsMemOverCommitForServers , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
protected boolean canDoAction ( ) { if ( ! ( super . canDoAction ( ) ) ) { return false ; } if ( ( ( getAllUpServers ( ) ) == null ) || ( getAllUpServers ( ) . isEmpty ( ) ) ) { addCanDoActionMessage ( VdcBllMessages.ACTION_TYPE_FAILED_NO_UP_SERVER_FOUND ) ; return false ; } return true ; }

Target:
protected boolean canDoAction ( ) { if ( ! ( super . canDoAction ( ) ) ) { return false ; } if ( ( ( getAllUpServers ( ) ) == null ) || ( getAllUpServers ( ) . isEmpty ( ) ) ) { addCanDoActionMessage ( EngineMessage.ACTION_TYPE_FAILED_NO_UP_SERVER_FOUND ) ; return false ; } return true ; }
Source:
public java.util.Set < java.lang.String > getConsumedEvents ( ) { java.util.Set < java.lang.String > set = new java.util.HashSet < java.lang.String > ( ) ; set.add ( BrowserEvents.CLICK ) ; set.add ( BrowserEvents.CHANGE ) ; set.add ( BrowserEvents.KEYDOWN ) ; set.addAll ( super . getConsumedEvents ( ) ) ; return set ; }

Target:
public java.util.Set < java.lang.String > getConsumedEvents ( ) { java.util.Set < java.lang.String > set = new java.util.HashSet < java.lang.String > ( super . getConsumedEvents ( ) ) ; set.add ( BrowserEvents.CLICK ) ; set.add ( BrowserEvents.MOUSEMOVE ) ; set.add ( BrowserEvents.CHANGE ) ; return set ; }
Source:
private boolean isTaskStateError ( org.ovirt.engine.core.common.vdscommands.VDSReturnValue vdsReturnValue ) { if ( ( ( vdsReturnValue != null ) && ( ( vdsReturnValue.getVdsError ( ) ) != null ) ) && ( ( vdsReturnValue.getVdsError ( ) . getCode ( ) ) == ( org.ovirt.engine.core.common.errors.VdcBllErrors.TaskStateError ) ) ) { org.ovirt.engine.core.bll.SPMAsyncTask.log.infoFormat ( "SPMAsyncTask::ClearAsyncTask: At time of attemp to clear task '{0}' the response code was {2} and message was {3}. Task will not be cleaned" , getTaskID ( ) , vdsReturnValue.getVdsError ( ) . getCode ( ) , vdsReturnValue.getVdsError ( ) . getMessage ( ) ) ; return true ; } return false ; }

Target:
private boolean isTaskStateError ( org.ovirt.engine.core.common.vdscommands.VDSReturnValue vdsReturnValue ) { if ( ( ( vdsReturnValue != null ) && ( ( vdsReturnValue.getVdsError ( ) ) != null ) ) && ( ( vdsReturnValue.getVdsError ( ) . getCode ( ) ) == ( org.ovirt.engine.core.common.errors.VdcBllErrors.TaskStateError ) ) ) { org.ovirt.engine.core.bll.SPMAsyncTask.log.infoFormat ( "SPMAsyncTask::ClearAsyncTask: At time of attemp to clear task '{0}' the response code was {2} and message was {3}. Task will not be cleaned" , getVdsmTaskId ( ) , vdsReturnValue.getVdsError ( ) . getCode ( ) , vdsReturnValue.getVdsError ( ) . getMessage ( ) ) ; return true ; } return false ; }
Source:
private void applyOnAttachmentParamsFrom ( org.ovirt.engine.ui.uicommonweb.models.hosts.InterfacePropertiesAccessor interfacePropertiesAccessor , org.ovirt.engine.core.common.businessentities.network.NetworkAttachment networkAttachment ) { org.ovirt.engine.ui.uicommonweb.models.hosts.network.LogicalNetworkModelParametersHelper.populateIpv4Details ( interfacePropertiesAccessor , networkAttachment.getIpConfiguration ( ) . getIpv4PrimaryAddress ( ) ) ; org.ovirt.engine.ui.uicommonweb.models.hosts.network.LogicalNetworkModelParametersHelper.populateIpv6Details ( interfacePropertiesAccessor , networkAttachment.getIpConfiguration ( ) . getIpv6PrimaryAddress ( ) ) ; if ( interfacePropertiesAccessor.isQosOverridden ( ) ) { networkAttachment.setHostNetworkQos ( interfacePropertiesAccessor.getHostNetworkQos ( ) ) ; } networkAttachment.setProperties ( interfacePropertiesAccessor.getCustomProperties ( ) ) ; }

Target:
private void applyOnAttachmentParamsFrom ( org.ovirt.engine.ui.uicommonweb.models.hosts.InterfacePropertiesAccessor interfacePropertiesAccessor , org.ovirt.engine.core.common.businessentities.network.NetworkAttachment networkAttachment ) { org.ovirt.engine.ui.uicommonweb.models.hosts.network.LogicalNetworkModelParametersHelper.populateIpv4Details ( interfacePropertiesAccessor , networkAttachment.getIpConfiguration ( ) . getIpv4PrimaryAddress ( ) ) ; org.ovirt.engine.ui.uicommonweb.models.hosts.network.LogicalNetworkModelParametersHelper.populateIpv6Details ( interfacePropertiesAccessor , networkAttachment.getIpConfiguration ( ) . getIpv6PrimaryAddress ( ) ) ; if ( interfacePropertiesAccessor.isQosOverridden ( ) ) { org.ovirt.engine.core.common.businessentities.network.AnonymousHostNetworkQos anonymousHostNetworkQos = org.ovirt.engine.core.common.businessentities.network.AnonymousHostNetworkQos.fromHostNetworkQos ( interfacePropertiesAccessor.getHostNetworkQos ( ) ) ; networkAttachment.setHostNetworkQos ( anonymousHostNetworkQos ) ; } networkAttachment.setProperties ( interfacePropertiesAccessor.getCustomProperties ( ) ) ; }
Source:
public void addStatistics ( org.ovirt.engine.api.model.NIC model , org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface entity ) { model.setStatistics ( new org.ovirt.engine.api.model.Statistics ( ) ) ; org.ovirt.engine.api.restapi.resource.NicStatisticalQuery query = new org.ovirt.engine.api.restapi.resource.NicStatisticalQuery ( newModel ( model.getId ( ) ) ) ; java.util.List < org.ovirt.engine.api.model.Statistic > statistics = query.getStatistics ( entity ) ; for ( org.ovirt.engine.api.model.Statistic statistic : statistics ) { org.ovirt.engine.api.utils.LinkHelper.addLinks ( uriInfo , statistic , query.getParentType ( ) ) ; } model.getStatistics ( ) . getStatistics ( ) . addAll ( statistics ) ; }

Target:
public void addStatistics ( org.ovirt.engine.api.model.Nic model , org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface entity ) { model.setStatistics ( new org.ovirt.engine.api.model.Statistics ( ) ) ; org.ovirt.engine.api.restapi.resource.NicStatisticalQuery query = new org.ovirt.engine.api.restapi.resource.NicStatisticalQuery ( newModel ( model.getId ( ) ) ) ; java.util.List < org.ovirt.engine.api.model.Statistic > statistics = query.getStatistics ( entity ) ; for ( org.ovirt.engine.api.model.Statistic statistic : statistics ) { org.ovirt.engine.api.utils.LinkHelper.addLinks ( uriInfo , statistic , query.getParentType ( ) ) ; } model.getStatistics ( ) . getStatistics ( ) . addAll ( statistics ) ; }
Source:
public int hashCode ( ) { final int prime = 31 ; int result = 1 ; result = ( prime * result ) + ( ( elementId ) == null ? 0 : elementId.hashCode ( ) ) ; return result ; }

Target:
public boolean equals ( java.lang.Object obj ) { if ( ( this ) == obj ) { return true ; } if ( ! ( obj instanceof org.ovirt.engine.ui.common.binding.ElementIdStatement ) ) { return false ; } org.ovirt.engine.ui.common.binding.ElementIdStatement other = ( ( org.ovirt.engine.ui.common.binding.ElementIdStatement ) ( obj ) ) ; return java.util.Objects.equals ( elementId , other.elementId ) ; }
Source:
private void verifyActionResponse ( javax.ws.rs.core.Response r ) throws java.lang.Exception { verifyActionResponse ( r , ( ( ( "vms/" + ( org.ovirt.engine.api.restapi.resource.AbstractBackendDisksResourceTest.PARENT_ID ) ) + "/disks/" ) + ( org.ovirt.engine.api.restapi.resource.AbstractBackendDisksResourceTest.PARENT_ID ) ) , false ) ; }

Target:
public void testIncompleteMove ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; try { control.replay ( ) ; resource.move ( new org.ovirt.engine.api.model.Action ( ) ) ; fail ( "expected WebApplicationException on incomplete parameters" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyIncompleteException ( wae , "Action" , "move" , "storageDomain.id|name" ) ; } }
Source:
protected void executeVdsBrokerCommand ( ) { status = org.ovirt.engine.core.vdsbroker.gluster.SetGlusterVolumeGeoRepConfigVDSCommand.getBroker ( ) . glusterVolumeGeoRepConfigSet ( org.ovirt.engine.core.vdsbroker.gluster.SetGlusterVolumeGeoRepConfigVDSCommand.getParameters ( ) . getVolumeName ( ) , org.ovirt.engine.core.vdsbroker.gluster.SetGlusterVolumeGeoRepConfigVDSCommand.getParameters ( ) . getSlaveHost ( ) , org.ovirt.engine.core.vdsbroker.gluster.SetGlusterVolumeGeoRepConfigVDSCommand.getParameters ( ) . getSlaveVolume ( ) , org.ovirt.engine.core.vdsbroker.gluster.SetGlusterVolumeGeoRepConfigVDSCommand.getParameters ( ) . getConfigKey ( ) , org.ovirt.engine.core.vdsbroker.gluster.SetGlusterVolumeGeoRepConfigVDSCommand.getParameters ( ) . getConfigValue ( ) ) ; org.ovirt.engine.core.vdsbroker.gluster.SetGlusterVolumeGeoRepConfigVDSCommand.proceedProxyReturnValue ( ) ; }

Target:
protected void executeVdsBrokerCommand ( ) { status = org.ovirt.engine.core.vdsbroker.gluster.SetGlusterVolumeGeoRepConfigVDSCommand.getBroker ( ) . glusterVolumeGeoRepConfigSet ( org.ovirt.engine.core.vdsbroker.gluster.SetGlusterVolumeGeoRepConfigVDSCommand.getParameters ( ) . getVolumeName ( ) , org.ovirt.engine.core.vdsbroker.gluster.SetGlusterVolumeGeoRepConfigVDSCommand.getParameters ( ) . getSlaveHost ( ) , org.ovirt.engine.core.vdsbroker.gluster.SetGlusterVolumeGeoRepConfigVDSCommand.getParameters ( ) . getSlaveVolume ( ) , org.ovirt.engine.core.vdsbroker.gluster.SetGlusterVolumeGeoRepConfigVDSCommand.getParameters ( ) . getConfigKey ( ) , org.ovirt.engine.core.vdsbroker.gluster.SetGlusterVolumeGeoRepConfigVDSCommand.getParameters ( ) . getConfigValue ( ) , org.ovirt.engine.core.vdsbroker.gluster.SetGlusterVolumeGeoRepConfigVDSCommand.getParameters ( ) . getUserName ( ) ) ; org.ovirt.engine.core.vdsbroker.gluster.SetGlusterVolumeGeoRepConfigVDSCommand.proceedProxyReturnValue ( ) ; }
Source:
public static void getVmList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String poolName ) { 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 ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VM > vms = org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.VM > cast ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.IVdcQueryable > ) ( source ) ) ) ; return vms ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( ( "Vms: pool=" + poolName ) , org.ovirt.engine.core.common.interfaces.SearchType.VM ) , aQuery ) ; }

Target:
public void getAllTemplatesFromExportDomain ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.compat.Guid storageDomainId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? source : new java.util.HashMap < org.ovirt.engine.core.common.businessentities.VmTemplate , java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.DiskImage > > ( ) ; } } ; org.ovirt.engine.core.common.queries.GetAllFromExportDomainQueryParameters getAllFromExportDomainQueryParamenters = new org.ovirt.engine.core.common.queries.GetAllFromExportDomainQueryParameters ( storagePoolId , storageDomainId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetTemplatesFromExportDomain , getAllFromExportDomainQueryParamenters , aQuery ) ; }
Source:
protected org.ovirt.engine.core.common.action.PersistentSetupNetworksParameters createSetupNetworksParameters ( org.ovirt.engine.core.compat.Guid hostId ) { org.ovirt.engine.core.common.businessentities.VDS host = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; host.setId ( hostId ) ; org.ovirt.engine.core.bll.network.NetworkConfigurator configurator = new org.ovirt.engine.core.bll.network.NetworkConfigurator ( host ) ; java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > nics = configurator.filterBondsWithoutSlaves ( getHostInterfaces ( hostId ) ) ; org.ovirt.engine.core.common.action.PersistentSetupNetworksParameters parameters = new org.ovirt.engine.core.common.action.PersistentSetupNetworksParameters ( ) ; parameters.setVdsId ( host.getId ( ) ) ; parameters.setInterfaces ( nics ) ; parameters.setCheckConnectivity ( true ) ; return parameters ; }

Target:
protected org.ovirt.engine.core.common.action.PersistentSetupNetworksParameters createSetupNetworksParameters ( org.ovirt.engine.core.compat.Guid hostId ) { org.ovirt.engine.core.common.businessentities.VDS host = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; host.setId ( hostId ) ; org.ovirt.engine.core.bll.network.NetworkConfigurator configurator = new org.ovirt.engine.core.bll.network.NetworkConfigurator ( host ) ; java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > nics = configurator.filterBondsWithoutSlaves ( getHostInterfaces ( hostId ) ) ; org.ovirt.engine.core.common.action.PersistentSetupNetworksParameters parameters = new org.ovirt.engine.core.common.action.PersistentSetupNetworksParameters ( ) ; parameters.setVdsId ( host.getId ( ) ) ; parameters.setInterfaces ( nics ) ; parameters.setCheckConnectivity ( true ) ; parameters.setShouldBeLogged ( false ) ; return parameters ; }
Source:
public void getClusterById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVdsGroupById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }

Target:
public void getGlusterVolumeGeoRepStatusForMasterVolume ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid masterVolumeId ) { 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 ? source : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterGeoRepSession > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterVolumeGeoRepSessions , new org.ovirt.engine.core.common.queries.IdQueryParameters ( masterVolumeId ) , aQuery ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc refreshStoragePool ( java.lang.String spUUID , java.lang.String msdUUID , int masterVersion ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.refreshStoragePool ( spUUID , msdUUID , masterVersion ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.QemuImageInfoReturnForXmlRpc getQemuImageInfo ( java.lang.String sdUUID , java.lang.String spUUID , java.lang.String imgUUID , java.lang.String volUUID ) { try { java.util.Map < java.lang.String , java.lang.Object > xmpRpcReturnValue = vdsServer.getQemuImageInfo ( sdUUID , spUUID , imgUUID , volUUID ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.QemuImageInfoReturnForXmlRpc ( xmpRpcReturnValue ) ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
Source:
protected void executeCommand ( ) { getAffinityGroup ( ) . setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; getAffinityGroupDao ( ) . save ( getAffinityGroup ( ) ) ; getReturnValue ( ) . setActionReturnValue ( getAffinityGroup ( ) . getId ( ) ) ; setSucceeded ( true ) ; }

Target:
protected void executeCommand ( ) { getAffinityGroup ( ) . setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; affinityGroupDao.save ( getAffinityGroup ( ) ) ; getReturnValue ( ) . setActionReturnValue ( getAffinityGroup ( ) . getId ( ) ) ; setSucceeded ( true ) ; }
Source:
public static void getGlusterHook ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hookId , boolean includeServerHooks ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetGlusterHookById , new org.ovirt.engine.core.common.queries.gluster.GlusterHookQueryParameters ( hookId , includeServerHooks ) , aQuery ) ; }

Target:
public static void getGlusterHookContent ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hookId , org.ovirt.engine.core.compat.Guid serverId ) { 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 ? source : "" ; } } ; org.ovirt.engine.core.common.queries.gluster.GlusterHookContentQueryParameters parameters = new org.ovirt.engine.core.common.queries.gluster.GlusterHookContentQueryParameters ( hookId ) ; parameters.setGlusterServerId ( serverId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterHookContent , parameters , aQuery ) ; }
Source:
protected org.ovirt.engine.core.common.businessentities.Cluster setUpClusterExpectations ( org.ovirt.engine.core.compat.Guid id ) { org.ovirt.engine.core.common.businessentities.Cluster group = org.mockito.Mockito.mock ( org.ovirt.engine.core.common.businessentities.Cluster.class ) ; org.mockito.Mockito.when ( group.getId ( ) ) . thenReturn ( id ) ; org.mockito.Mockito.when ( group.getStoragePoolId ( ) ) . thenReturn ( GUIDS [ 2 ] ) ; setUpEntityQueryExpectations ( VdcQueryType.GetClusterById , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { id } , group ) ; return group ; }

Target:
private org.ovirt.engine.core.common.businessentities.Cluster getCluster ( int index ) { org.ovirt.engine.api.restapi.resource.Cluster entity = org.mockito.Mockito.mock ( org.ovirt.engine.core.common.businessentities.Cluster.class ) ; org.mockito.Mockito.when ( entity.getId ( ) ) . thenReturn ( GUIDS [ index ] ) ; org.mockito.Mockito.when ( entity.getName ( ) ) . thenReturn ( NAMES [ index ] ) ; org.mockito.Mockito.when ( entity.getDescription ( ) ) . thenReturn ( DESCRIPTIONS [ index ] ) ; org.mockito.Mockito.when ( entity.getStoragePoolId ( ) ) . thenReturn ( org.ovirt.engine.api.restapi.resource.BackendClusterNetworksResourceTest.DATA_CENTER_ID ) ; return entity ; }
Source:
public static com.gwtplatform.mvp.client.proxy.PlaceRequest get ( java.lang.String nameToken ) { if ( ! ( org.ovirt.engine.ui.common.place.PlaceRequestFactory.instances.containsKey ( nameToken ) ) ) { org.ovirt.engine.ui.common.place.PlaceRequestFactory.instances.put ( nameToken , new com.gwtplatform.mvp.client.proxy.PlaceRequest.Builder ( ) . nameToken ( nameToken ) . build ( ) ) ; } return org.ovirt.engine.ui.common.place.PlaceRequestFactory.instances.get ( nameToken ) ; }

Target:
public static com.gwtplatform.mvp.shared.proxy.PlaceRequest get ( java.lang.String nameToken ) { if ( ! ( org.ovirt.engine.ui.common.place.PlaceRequestFactory.instances.containsKey ( nameToken ) ) ) { org.ovirt.engine.ui.common.place.PlaceRequestFactory.instances.put ( nameToken , new com.gwtplatform.mvp.shared.proxy.PlaceRequest.Builder ( ) . nameToken ( nameToken ) . build ( ) ) ; } return org.ovirt.engine.ui.common.place.PlaceRequestFactory.instances.get ( nameToken ) ; }
Source:
public static void GetHighUtilizationForPowerSave ( 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 ( ) : 0 ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.HighUtilizationForPowerSave ) , aQuery ) ; }

Target:
public static void GetStorageDomainMaxNameLength ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Integer ) ( source ) ) . intValue ( ) : 1 ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.StorageDomainNameSizeLimit ) , aQuery ) ; }
Source:
public boolean StorageDomainRemoved ( org.ovirt.engine.core.common.businessentities.storage_domain_static storageDomain ) { org.ovirt.engine.core.common.businessentities.storage_server_connections connection = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStorageServerConnectionDAO ( ) . get ( storageDomain.getstorage ( ) ) ; if ( connection != null ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStorageServerConnectionDAO ( ) . remove ( connection.getid ( ) ) ; } return true ; }

Target:
public boolean StorageDomainRemoved ( org.ovirt.engine.core.common.businessentities.storage_domain_static storageDomain ) { org.ovirt.engine.core.common.businessentities.storage_server_connections connection = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStorageServerConnectionDao ( ) . get ( storageDomain.getstorage ( ) ) ; if ( connection != null ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStorageServerConnectionDao ( ) . remove ( connection.getid ( ) ) ; } return true ; }
Source:
public void ExecuteCommand ( org.ovirt.engine.ui.uicommonweb.UICommand command ) { super . ExecuteCommand ( command ) ; if ( org.ovirt.engine.core.compat.StringHelper.stringsEqual ( command.getName ( ) , "OnSave" ) ) { onSave ( ) ; } if ( org.ovirt.engine.core.compat.StringHelper.stringsEqual ( command.getName ( ) , "OnForceSave" ) ) { onForceSave ( ) ; } else if ( org.ovirt.engine.core.compat.StringHelper.stringsEqual ( command.getName ( ) , "CancelConfirm" ) ) { cancelConfirm ( ) ; } }

Target:
public void executeCommand ( org.ovirt.engine.ui.uicommonweb.UICommand command ) { super . executeCommand ( command ) ; if ( org.ovirt.engine.core.compat.StringHelper.stringsEqual ( command.getName ( ) , "OnSave" ) ) { onSave ( ) ; } if ( org.ovirt.engine.core.compat.StringHelper.stringsEqual ( command.getName ( ) , "OnForceSave" ) ) { onForceSave ( ) ; } else if ( org.ovirt.engine.core.compat.StringHelper.stringsEqual ( command.getName ( ) , "CancelConfirm" ) ) { cancelConfirm ( ) ; } }
Source:
protected java.util.Map < java.lang.String , org.ovirt.engine.core.common.utils.Pair < java.lang.String , java.lang.String > > getExclusiveLocks ( ) { return java.util.Collections.singletonMap ( org.ovirt.engine.core.bll.RefreshHostCapabilitiesCommand.getParameters ( ) . getVdsId ( ) . toString ( ) , org.ovirt.engine.core.bll.LockMessagesMatchUtil.makeLockingPair ( LockingGroup.VDS , EngineMessage.ACTION_TYPE_FAILED_OBJECT_LOCKED ) ) ; }

Target:
protected java.util.Map < java.lang.String , org.ovirt.engine.core.common.utils.Pair < java.lang.String , java.lang.String > > getExclusiveLocks ( ) { org.ovirt.engine.core.compat.Guid hostId = org.ovirt.engine.core.bll.RefreshHostCapabilitiesCommand.getParameters ( ) . getVdsId ( ) ; java.util.Map < java.lang.String , org.ovirt.engine.core.common.utils.Pair < java.lang.String , java.lang.String > > exclusiveLocks = new java.util.HashMap < > ( ) ; exclusiveLocks.put ( hostId.toString ( ) , org.ovirt.engine.core.bll.LockMessagesMatchUtil.makeLockingPair ( LockingGroup.VDS , EngineMessage.ACTION_TYPE_FAILED_OBJECT_LOCKED ) ) ; exclusiveLocks.putAll ( hostLocking.getSetupNetworksLock ( hostId ) ) ; return exclusiveLocks ; }
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 ) { setIsFingerprintVerified ( false ) ; if ( ( ( getGlusterHostAddress ( ) . getEntity ( ) ) == null ) || ( ( getGlusterHostAddress ( ) . getEntity ( ) . trim ( ) . length ( ) ) == 0 ) ) { getGlusterHostFingerprint ( ) . setEntity ( "" ) ; return ; } fetchFingerprint ( getGlusterHostAddress ( ) . getEntity ( ) ) ; }

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 ) { java.lang.Boolean entity = getAllowOverbooking ( ) . getEntity ( ) ; if ( entity ) { getOptimizeForUtilization ( ) . setEntity ( true ) ; } getOptimizeForSpeed ( ) . setIsChangeable ( ( ! entity ) ) ; }
Source:
public void canDoActionFailedVMNotFound ( ) throws java.lang.Exception { initializeCommand ( createParameters ( ) ) ; mockNullVm ( ) ; org.junit.Assert.assertFalse ( command.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( command.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( VdcBllMessages.ACTION_TYPE_FAILED_VM_NOT_FOUND.toString ( ) ) ) ; }

Target:
public void canDoActionFailedVMNotFound ( ) throws java.lang.Exception { initializeCommand ( createParameters ( ) ) ; mockNullVm ( ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( command , VdcBllMessages.ACTION_TYPE_FAILED_VM_NOT_FOUND ) ; }
Source:
private void HandleEndAction ( ) { try { if ( org.ovirt.engine.core.bll.RemoveVmTemplateCommand.getParameters ( ) . isRemoveTemplateFromDb ( ) ) { RemoveTemplateFromDb ( ) ; } else { org.ovirt.engine.core.bll.VmTemplateHandler.UnLockVmTemplate ( org.ovirt.engine.core.bll.RemoveVmTemplateCommand.getVmTemplateId ( ) ) ; } org.ovirt.engine.core.bll.RemoveVmTemplateCommand.setSucceeded ( true ) ; } catch ( java.lang.RuntimeException e ) { org.ovirt.engine.core.bll.RemoveVmTemplateCommand.getReturnValue ( ) . setEndActionTryAgain ( false ) ; log.errorFormat ( "Encounter a problem removing template from DB, Setting the action, not to try again." ) ; } }

Target:
private void HandleEndAction ( ) { try { if ( org.ovirt.engine.core.bll.RemoveVmTemplateCommand.getParameters ( ) . isRemoveTemplateFromDb ( ) ) { RemoveTemplateFromDb ( ) ; } else { org.ovirt.engine.core.bll.VmTemplateHandler.UnLockVmTemplate ( org.ovirt.engine.core.bll.RemoveVmTemplateCommand.getVmTemplateId ( ) ) ; } org.ovirt.engine.core.bll.RemoveVmTemplateCommand.setSucceeded ( true ) ; } catch ( java.lang.RuntimeException e ) { org.ovirt.engine.core.bll.RemoveVmTemplateCommand.getReturnValue ( ) . setEndActionTryAgain ( false ) ; log.error ( "Encountered a problem removing template from DB, setting the action not to retry." ) ; } }
Source:
public void deallocate ( org.ovirt.engine.core.common.businessentities.network.VmNic nic ) { try { com.woorea.openstack.quantum.model.Port port = locatePort ( nic ) ; if ( port != null ) { getClient ( ) . ports ( ) . delete ( port.getId ( ) ) . execute ( ) ; } } catch ( java.lang.RuntimeException e ) { throw new org.ovirt.engine.core.common.errors.EngineException ( org.ovirt.engine.core.common.errors.EngineError.PROVIDER_FAILURE , e ) ; } }

Target:
private < R > R execute ( com.woorea.openstack.base.client.OpenStackRequest < R > request ) { try { return request.execute ( ) ; } catch ( com.woorea.openstack.base.client.OpenStackResponseException e ) { throw new org.ovirt.engine.core.common.errors.EngineException ( org.ovirt.engine.core.common.errors.EngineError.PROVIDER_FAILURE , e , true ) ; } catch ( java.lang.RuntimeException e ) { throw new org.ovirt.engine.core.common.errors.EngineException ( org.ovirt.engine.core.common.errors.EngineError.PROVIDER_FAILURE , org.apache.commons.lang.exception.ExceptionUtils.getRootCause ( e ) , true ) ; } }
Source:
public void InternalSetVmStatus ( org.ovirt.engine.core.common.businessentities.VM vm , final org.ovirt.engine.core.common.businessentities.VMStatus status ) { vm.setStatus ( status ) ; boolean isVmStatusDown = org.ovirt.engine.core.common.businessentities.VM.isStatusDown ( status ) ; if ( isVmStatusDown || ( status == ( org.ovirt.engine.core.common.businessentities.VMStatus.Unknown ) ) ) { resetVmAttributes ( vm ) ; if ( isVmStatusDown ) { vm.setRunOnVds ( null ) ; vm.setVmPauseStatus ( VmPauseStatus.NONE ) ; } } }

Target:
public void InternalSetVmStatus ( org.ovirt.engine.core.common.businessentities.VM vm , final org.ovirt.engine.core.common.businessentities.VMStatus status , final org.ovirt.engine.core.common.businessentities.VmExitStatus exitStaus , final java.lang.String exitMessage ) { vm.setStatus ( status ) ; vm.setExitStatus ( exitStaus ) ; vm.setExitMessage ( exitMessage ) ; boolean isVmNotRunning = status.isNotRunning ( ) ; if ( isVmNotRunning || ( status == ( org.ovirt.engine.core.common.businessentities.VMStatus.Unknown ) ) ) { resetVmAttributes ( vm ) ; if ( isVmNotRunning ) { vm.setRunOnVds ( null ) ; vm.setVmPauseStatus ( VmPauseStatus.NONE ) ; } } }
Source:
protected org.ovirt.engine.api.model.InstanceTypes mapCollection ( java.util.List < org.ovirt.engine.api.model.InstanceType > entities ) { org.ovirt.engine.api.model.InstanceTypes collection = new org.ovirt.engine.api.model.InstanceTypes ( ) ; for ( org.ovirt.engine.api.model.InstanceType entity : entities ) { collection.getInstanceTypes ( ) . add ( addLinks ( populate ( map ( entity ) , entity ) ) ) ; } return collection ; }

Target:
protected org.ovirt.engine.api.model.InstanceTypes mapCollection ( java.util.List < org.ovirt.engine.api.model.InstanceType > entities ) { org.ovirt.engine.api.model.InstanceTypes collection = new org.ovirt.engine.api.model.InstanceTypes ( ) ; for ( org.ovirt.engine.api.model.InstanceType entity : entities ) { org.ovirt.engine.api.model.InstanceType instanceType = map ( entity ) ; org.ovirt.engine.api.restapi.util.DisplayHelper.adjustDisplayData ( this , instanceType ) ; collection.getInstanceTypes ( ) . add ( addLinks ( populate ( instanceType , entity ) ) ) ; } return collection ; }
Source:
public static void getHostPublicKey ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.String ) ( source ) ) : "" ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetServerSSHPublicKey , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }

Target:
public void getHostFingerprint ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String hostAddress ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.String ) ( source ) ) : "" ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetServerSSHKeyFingerprint , new org.ovirt.engine.core.common.queries.ServerParameters ( hostAddress ) , aQuery ) ; }
Source:
private void assertIpv4Details ( org.ovirt.engine.core.common.businessentities.network.IpConfiguration ipConfiguration ) { org.junit.Assert.assertThat ( ipConfiguration.getIPv4Addresses ( ) , org.hamcrest.Matchers.hasSize ( 1 ) ) ; final org.ovirt.engine.core.common.businessentities.network.IPv4Address ipv4Address = ipConfiguration.getIPv4Addresses ( ) . get ( 0 ) ; org.junit.Assert.assertThat ( ipv4Address.getAddress ( ) , org.hamcrest.Matchers.is ( org.ovirt.engine.core.bll.network.NetworkConfiguratorTest.IPV4_ADDRESS ) ) ; org.junit.Assert.assertThat ( ipv4Address.getBootProtocol ( ) , org.hamcrest.Matchers.is ( Ipv4BootProtocol.STATIC_IP ) ) ; org.junit.Assert.assertThat ( ipv4Address.getAddress ( ) , org.hamcrest.Matchers.is ( org.ovirt.engine.core.bll.network.NetworkConfiguratorTest.IPV4_ADDRESS ) ) ; }

Target:
private void assertIpv4Details ( org.ovirt.engine.core.common.businessentities.network.IpConfiguration ipConfiguration ) { org.hamcrest.MatcherAssert.assertThat ( ipConfiguration.getIPv4Addresses ( ) , org.hamcrest.Matchers.hasSize ( 1 ) ) ; final org.ovirt.engine.core.common.businessentities.network.IPv4Address ipv4Address = ipConfiguration.getIPv4Addresses ( ) . get ( 0 ) ; org.hamcrest.MatcherAssert.assertThat ( ipv4Address.getAddress ( ) , org.hamcrest.Matchers.is ( org.ovirt.engine.core.bll.network.NetworkConfiguratorTest.IPV4_ADDRESS ) ) ; org.hamcrest.MatcherAssert.assertThat ( ipv4Address.getBootProtocol ( ) , org.hamcrest.Matchers.is ( Ipv4BootProtocol.STATIC_IP ) ) ; org.hamcrest.MatcherAssert.assertThat ( ipv4Address.getAddress ( ) , org.hamcrest.Matchers.is ( org.ovirt.engine.core.bll.network.NetworkConfiguratorTest.IPV4_ADDRESS ) ) ; }
Source:
protected java.lang.String getIconToShow ( java.lang.String currentOsDefaultIcon ) { if ( ( getIcon ( ) . getEntity ( ) ) == null ) { return currentOsDefaultIcon ; } return getIcon ( ) . getEntity ( ) . isCustom ( ) ? getIcon ( ) . getEntity ( ) . getIcon ( ) : currentOsDefaultIcon ; }

Target:
public void onCreated ( org.ovirt.engine.ui.uicommonweb.models.vms.IconWithOsDefault instance ) { getIcon ( ) . setEntity ( instance ) ; }
Source:
protected boolean setAndValidateCpuProfile ( ) { return validate ( org.ovirt.engine.core.bll.profiles.CpuProfileHelper.setAndValidateCpuProfile ( getVm ( ) . getStaticData ( ) , org.ovirt.engine.core.bll.ImportVmCommand.getVdsGroup ( ) . getcompatibility_version ( ) ) ) ; }

Target:
protected boolean setAndValidateCpuProfile ( ) { getVm ( ) . getStaticData ( ) . setVdsGroupId ( org.ovirt.engine.core.bll.ImportVmCommand.getVdsGroupId ( ) ) ; return validate ( org.ovirt.engine.core.bll.profiles.CpuProfileHelper.setAndValidateCpuProfile ( getVm ( ) . getStaticData ( ) , org.ovirt.engine.core.bll.ImportVmCommand.getVdsGroup ( ) . getcompatibility_version ( ) ) ) ; }
Source:
private void cluster_SelectedItemChanged ( java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { behavior.cluster_SelectedItemChanged ( ) ; updateMaximalVmMemSize ( ) ; }

Target:
private void dataCenterWithClusterSelectedItemChanged ( java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { behavior.dataCenterWithClusterSelectedItemChanged ( ) ; org.ovirt.engine.ui.uicommonweb.models.vms.DataCenterWithCluster dataCenterWithCluster = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.DataCenterWithCluster ) ( getDataCenterWithClustersList ( ) . getSelectedItem ( ) ) ) ; if ( ( dataCenterWithCluster != null ) && ( ( dataCenterWithCluster.getDataCenter ( ) ) != null ) ) { getDisksAllocationModel ( ) . setQuotaEnforcementType ( dataCenterWithCluster.getDataCenter ( ) . getQuotaEnforcementType ( ) ) ; } updateMaximalVmMemSize ( ) ; }
Source:
public void testAddVmsForExistingAffinityGroup ( ) { org.ovirt.engine.core.common.scheduling.AffinityGroup existing = dao.get ( FixturesTool.EXISTING_AFFINITY_GROUP_ID ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.core.dao.AffinityGroupDaoTest.NUM_OF_VMS_IN_EXISTING_AFFINITY_GROUP , existing.getVmEntityNames ( ) . size ( ) ) ; existing.getVmIds ( ) . add ( FixturesTool.VM_RHEL5_POOL_51 ) ; dao.update ( existing ) ; org.ovirt.engine.core.common.scheduling.AffinityGroup fetched = dao.get ( existing.getId ( ) ) ; org.junit.Assert.assertEquals ( ( ( org.ovirt.engine.core.dao.AffinityGroupDaoTest.NUM_OF_VMS_IN_EXISTING_AFFINITY_GROUP ) + 1 ) , fetched.getVmEntityNames ( ) . size ( ) ) ; }

Target:
public void testAddVmsForExistingAffinityGroup ( ) { org.ovirt.engine.core.common.scheduling.AffinityGroup existing = dao.get ( FixturesTool.EXISTING_AFFINITY_GROUP_ID ) ; org.junit.jupiter.api.Assertions.assertEquals ( org.ovirt.engine.core.dao.AffinityGroupDaoTest.NUM_OF_VMS_IN_EXISTING_AFFINITY_GROUP , existing.getVmEntityNames ( ) . size ( ) ) ; existing.getVmIds ( ) . add ( FixturesTool.VM_RHEL5_POOL_51 ) ; dao.update ( existing ) ; org.ovirt.engine.core.common.scheduling.AffinityGroup fetched = dao.get ( existing.getId ( ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( ( ( org.ovirt.engine.core.dao.AffinityGroupDaoTest.NUM_OF_VMS_IN_EXISTING_AFFINITY_GROUP ) + 1 ) , fetched.getVmEntityNames ( ) . size ( ) ) ; }
Source:
private void freeLockExecute ( ) { if ( ( ( releaseLocksAtEndOfExecute ) || ( ! ( getSucceeded ( ) ) ) ) || ( ( ! ( hasTasks ( ) ) ) && ( ! ( ( this ) instanceof org.ovirt.engine.core.common.businessentities.IVdsAsyncCommand ) ) ) ) { freeLock ( ) ; } }

Target:
private void freeLockExecute ( ) { if ( ( ( releaseLocksAtEndOfExecute ) || ( ! ( getSucceeded ( ) ) ) ) || ( ( noAsyncOperations ( ) ) && ( ! ( ( this ) instanceof org.ovirt.engine.core.common.businessentities.IVdsAsyncCommand ) ) ) ) { freeLock ( ) ; } }
Source:
public void setAttached ( boolean attached ) { attachedSeparatedImage.setResource ( ( attached ? org.ovirt.engine.ui.common.widget.editor.generic.BaseEntityModelDetachableWidget.resource.joinedIcon ( ) : org.ovirt.engine.ui.common.widget.editor.generic.BaseEntityModelDetachableWidget.resource.separatedIcon ( ) ) ) ; attachedSeparatedImage.setTitle ( ( attached ? org.ovirt.engine.ui.common.widget.editor.generic.BaseEntityModelDetachableWidget.constants.attachedToInstanceType ( ) : org.ovirt.engine.ui.common.widget.editor.generic.BaseEntityModelDetachableWidget.constants.detachedFromInstanceType ( ) ) ) ; }

Target:
public void setAttached ( boolean attached ) { attachedSeparatedImage.setResource ( ( attached ? org.ovirt.engine.ui.common.widget.editor.generic.BaseEntityModelDetachableWidget.resources.joinedIcon ( ) : org.ovirt.engine.ui.common.widget.editor.generic.BaseEntityModelDetachableWidget.resources.separatedIcon ( ) ) ) ; attachedSeparatedImage.setTitle ( ( attached ? org.ovirt.engine.ui.common.widget.editor.generic.BaseEntityModelDetachableWidget.constants.attachedToInstanceType ( ) : org.ovirt.engine.ui.common.widget.editor.generic.BaseEntityModelDetachableWidget.constants.detachedFromInstanceType ( ) ) ) ; }
Source:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; dao = dbFacade.getVmTemplateDao ( ) ; existingTemplate = dao.get ( new org.ovirt.engine.core.compat.Guid ( "1b85420c-b84c-4f29-997e-0eb674b40b79" ) ) ; newVmTemplate = new org.ovirt.engine.core.common.businessentities.VmTemplate ( ) ; newVmTemplate.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; newVmTemplate.setName ( "NewVmTemplate" ) ; newVmTemplate.setVdsGroupId ( org.ovirt.engine.core.dao.VmTemplateDAOTest.VDS_GROUP_ID ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; dao = dbFacade.getVmTemplateDao ( ) ; existingTemplate = dao.get ( new org.ovirt.engine.core.compat.Guid ( "1b85420c-b84c-4f29-997e-0eb674b40b79" ) ) ; newVmTemplate = new org.ovirt.engine.core.common.businessentities.VmTemplate ( ) ; newVmTemplate.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; newVmTemplate.setName ( "NewVmTemplate" ) ; newVmTemplate.setVdsGroupId ( org.ovirt.engine.core.dao.VmTemplateDAOTest.VDS_GROUP_ID ) ; newVmTemplate.setClusterArch ( ArchitectureType.x86_64 ) ; }
Source:
private void interfaceHasSiblingVlanInterfaces ( org.ovirt.engine.core.compat.Guid vdsID , org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface , 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 ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > siblingVlanInterfaces = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > ) ( source ) ) ; return ! ( siblingVlanInterfaces.isEmpty ( ) ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllSiblingVlanInterfaces , new org.ovirt.engine.core.common.queries.InterfaceAndIdQueryParameters ( vdsID , iface ) , aQuery ) ; }

Target:
public void getExternalProviderComputeResourceList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.common.businessentities.Provider provider ) { 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.ExternalComputeResource > ( ) ; } return source ; } } ; org.ovirt.engine.core.common.queries.ProviderQueryParameters params = new org.ovirt.engine.core.common.queries.ProviderQueryParameters ( ) ; params.setProvider ( provider ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetComputeResourceFromExternalProvider , params , aQuery ) ; }
Source:
public void onRevealOverlayContent ( org.ovirt.engine.ui.webadmin.section.main.presenter.RevealOverlayContentEvent event ) { setInSlot ( org.ovirt.engine.ui.webadmin.section.main.presenter.MainContentPresenter.TYPE_SetOverlay , event.getContent ( ) ) ; }

Target:
public void onRevealOverlayContent ( org.ovirt.engine.ui.webadmin.section.main.presenter.RevealOverlayContentEvent event ) { java.util.Set < com.gwtplatform.mvp.client.PresenterWidget < ? > > children = getChildren ( com.gwtplatform.mvp.client.presenter.slots.LegacySlotConvertor.convert ( org.ovirt.engine.ui.webadmin.section.main.presenter.MainContentPresenter.TYPE_SetContent ) ) ; if ( ( event.getContent ( ) ) != null ) { event.getContent ( ) . setCurrentPlaceWidget ( children.iterator ( ) . next ( ) ) ; } setInSlot ( org.ovirt.engine.ui.webadmin.section.main.presenter.MainContentPresenter.TYPE_SetOverlay , event.getContent ( ) ) ; }