auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void Dispose ( ) { synchronized ( syncObj ) { org.ovirt.engine.core.vdsbroker.irsbroker.IrsBrokerCommand.log.info ( "IrsProxyData::disposing" ) ; ResetIrs ( ) ; org.ovirt.engine.core.utils.timer.SchedulerUtilQuartzImpl.getInstance ( ) . deleteJob ( storagePoolRefreshJobId ) ; if ( ( privatemIrsProxy ) != null ) { org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcUtils.shutDownConnection ( ( ( org.ovirt.engine.core.vdsbroker.irsbroker.IrsServerWrapper ) ( privatemIrsProxy ) ) . getHttpClient ( ) ) ; } _disposed = true ; } }

Target:
private void nullifyInternalProxies ( ) { if ( ( privatemIrsProxy ) != null ) { org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcUtils.shutDownConnection ( ( ( org.ovirt.engine.core.vdsbroker.irsbroker.IrsServerWrapper ) ( privatemIrsProxy ) ) . getHttpClient ( ) ) ; } privatemCurrentIrsHost = null ; privatemIrsProxy = null ; mCurrentVdsId = null ; }
Source:
public static void getClusterGlusterServices ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.core.common.queries.gluster.GlusterVolumeAdvancedDetailsParameters parameters = new org.ovirt.engine.core.common.queries.gluster.GlusterVolumeAdvancedDetailsParameters ( clusterId , null , null , false ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterVolumeAdvancedDetails , parameters , aQuery ) ; }

Target:
public static void countAllTemplates ( 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 ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmTemplateCount , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }
Source:
public void testNotEnoughForMultipleDiskAndDomainsSecondDomainFails ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > imagesDisks = org.ovirt.engine.core.bll.RemoveSnapshotCommandTest.mockMultipleSourceImagesForDomain ( 4 , org.ovirt.engine.core.bll.RemoveSnapshotCommandTest.STORAGE_DOMAIN_ID , org.ovirt.engine.core.bll.RemoveSnapshotCommandTest.IMAGE_ACTUAL_SIZE_GB ) ; imagesDisks.addAll ( org.ovirt.engine.core.bll.RemoveSnapshotCommandTest.mockMultipleSourceImagesForDomain ( 4 , org.ovirt.engine.core.bll.RemoveSnapshotCommandTest.STORAGE_DOMAIN_ID2 , org.ovirt.engine.core.bll.RemoveSnapshotCommandTest.IMAGE_ACTUAL_SIZE_GB ) ) ; org.mockito.Mockito.doReturn ( imagesDisks ) . when ( cmd ) . getSourceImages ( ) ; mockStorageDomainDAOGetForStoragePool ( 22 , org.ovirt.engine.core.bll.RemoveSnapshotCommandTest.STORAGE_DOMAIN_ID ) ; mockStorageDomainDAOGetForStoragePool ( 10 , org.ovirt.engine.core.bll.RemoveSnapshotCommandTest.STORAGE_DOMAIN_ID2 ) ; org.junit.Assert.assertFalse ( "Validation should fail. Second domain should not have enough free space for request." , cmd.validateStorageDomains ( ) ) ; }

Target:
private org.ovirt.engine.core.common.businessentities.DiskImage mockSourceImage ( ) { org.ovirt.engine.core.common.businessentities.DiskImage image = createDiskImage ( org.ovirt.engine.core.bll.RemoveSnapshotCommandTest.STORAGE_DOMAIN_ID ) ; org.mockito.Mockito.doReturn ( java.util.Collections.singletonList ( image ) ) . when ( cmd ) . getSourceImages ( ) ; org.mockito.Mockito.when ( diskImageDAO.get ( image.getImageId ( ) ) ) . thenReturn ( image ) ; return image ; }
Source:
private java.util.HashSet < org.ovirt.engine.core.compat.Guid > convertToGuidSet ( java.lang.String str , char delimiter ) { java.util.HashSet < org.ovirt.engine.core.compat.Guid > results = new java.util.HashSet < > ( ) ; if ( str != null ) { for ( java.lang.String id : str.split ( java.lang.String.format ( " *%s *" , delimiter ) ) ) { results.add ( org.ovirt.engine.core.compat.Guid.createGuidFromString ( id ) ) ; } } return results ; }

Target:
private java.util.LinkedList < org.ovirt.engine.core.compat.Guid > convertToGuidList ( java.lang.String str , char delimiter ) { java.util.LinkedList < org.ovirt.engine.core.compat.Guid > results = new java.util.LinkedList < > ( ) ; if ( str != null ) { for ( java.lang.String id : str.split ( java.lang.String.format ( " *%s *" , delimiter ) ) ) { results.add ( org.ovirt.engine.core.compat.Guid.createGuidFromString ( id ) ) ; } } return results ; }
Source:
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 ) ; }

Target:
public 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.action.SetupNetworksParameters 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 ) ) ; return configurator.createSetupNetworkParams ( nics ) ; }

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 org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc extendImageTransferSession ( java.lang.String ticketId , long expiration ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "Host.extendImageTransferSession" ) . withParameter ( "ticketUUID" , ticketId ) . withParameter ( "expiration" , expiration ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( response ) ; }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc remove_image_ticket ( java.lang.String ticketId ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "Host.remove_image_ticket" ) . withParameter ( "uuid" , ticketId ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( response ) ; }
Source:
protected void endVmCommand ( ) { org.ovirt.engine.core.bll.StopVmCommandBase.setCommandShouldBeLogged ( false ) ; if ( ( org.ovirt.engine.core.bll.StopVmCommandBase.getVm ( ) ) != null ) { org.ovirt.engine.core.bll.StopVmCommandBase.getVm ( ) . setStatus ( VMStatus.Down ) ; org.ovirt.engine.core.bll.StopVmCommandBase.getVm ( ) . setHibernationVolHandle ( null ) ; org.ovirt.engine.core.bll.StopVmCommandBase.getVmDynamicDao ( ) . update ( org.ovirt.engine.core.bll.StopVmCommandBase.getVm ( ) . getDynamicData ( ) ) ; } else { org.ovirt.engine.core.bll.StopVmCommandBase.log.warn ( "StopVmCommandBase::EndVmCommand: Vm is null - not performing full endAction" ) ; } org.ovirt.engine.core.bll.StopVmCommandBase.setSucceeded ( true ) ; }

Target:
protected void endVmCommand ( ) { org.ovirt.engine.core.bll.StopVmCommandBase.setCommandShouldBeLogged ( false ) ; if ( ( org.ovirt.engine.core.bll.StopVmCommandBase.getVm ( ) ) != null ) { org.ovirt.engine.core.bll.StopVmCommandBase.getVm ( ) . setStatus ( VMStatus.Down ) ; org.ovirt.engine.core.bll.StopVmCommandBase.getSnapshotDAO ( ) . removeMemoryFromActiveSnapshot ( org.ovirt.engine.core.bll.StopVmCommandBase.getVmId ( ) ) ; org.ovirt.engine.core.bll.StopVmCommandBase.getVmDynamicDao ( ) . update ( org.ovirt.engine.core.bll.StopVmCommandBase.getVm ( ) . getDynamicData ( ) ) ; } else { org.ovirt.engine.core.bll.StopVmCommandBase.log.warn ( "StopVmCommandBase::EndVmCommand: Vm is null - not performing full endAction" ) ; } org.ovirt.engine.core.bll.StopVmCommandBase.setSucceeded ( true ) ; }
Source:
protected void executeVmCommand ( ) { vmHandler.updateDisksFromDb ( org.ovirt.engine.core.bll.exportimport.ExtractOvaCommand.getVm ( ) ) ; java.util.List < java.lang.String > diskPaths = prepareImages ( ) ; boolean succeeded = runAnsibleImportOvaPlaybook ( diskPaths ) ; teardownImages ( ) ; org.ovirt.engine.core.bll.exportimport.ExtractOvaCommand.setSucceeded ( succeeded ) ; }

Target:
protected void executeVmCommand ( ) { try { vmHandler.updateDisksFromDb ( org.ovirt.engine.core.bll.exportimport.ExtractOvaCommand.getVm ( ) ) ; java.util.List < java.lang.String > diskPaths = prepareImages ( ) ; boolean succeeded = runAnsibleImportOvaPlaybook ( diskPaths ) ; teardownImages ( ) ; if ( ! succeeded ) { log.error ( "Failed to extract OVA file" ) ; removeVm ( ) ; } org.ovirt.engine.core.bll.exportimport.ExtractOvaCommand.setSucceeded ( succeeded ) ; } catch ( org.ovirt.engine.core.common.errors.EngineException e ) { log.error ( "Failed to extract OVA file" ) ; removeVm ( ) ; throw e ; } }
Source:
protected void ExecuteVdsBrokerCommand ( ) { status = org.ovirt.engine.core.vdsbroker.gluster.UpdateGlusterHookVDSCommand.getBroker ( ) . glusterHookUpdate ( org.ovirt.engine.core.vdsbroker.gluster.UpdateGlusterHookVDSCommand.getParameters ( ) . getGlusterCommand ( ) , org.ovirt.engine.core.vdsbroker.gluster.UpdateGlusterHookVDSCommand.getParameters ( ) . getHookStage ( ) . toString ( ) , org.ovirt.engine.core.vdsbroker.gluster.UpdateGlusterHookVDSCommand.getParameters ( ) . getHookName ( ) , org.ovirt.engine.core.vdsbroker.gluster.UpdateGlusterHookVDSCommand.getParameters ( ) . getHookContent ( ) , org.ovirt.engine.core.vdsbroker.gluster.UpdateGlusterHookVDSCommand.getParameters ( ) . getChecksum ( ) ) ; org.ovirt.engine.core.vdsbroker.gluster.UpdateGlusterHookVDSCommand.ProceedProxyReturnValue ( ) ; }

Target:
protected void ExecuteVdsBrokerCommand ( ) { status = org.ovirt.engine.core.vdsbroker.gluster.UpdateGlusterHookVDSCommand.getBroker ( ) . glusterHookUpdate ( org.ovirt.engine.core.vdsbroker.gluster.UpdateGlusterHookVDSCommand.getParameters ( ) . getGlusterCommand ( ) , org.ovirt.engine.core.vdsbroker.gluster.UpdateGlusterHookVDSCommand.getParameters ( ) . getHookStage ( ) . toString ( ) , org.ovirt.engine.core.vdsbroker.gluster.UpdateGlusterHookVDSCommand.getParameters ( ) . getHookName ( ) , org.ovirt.engine.core.vdsbroker.gluster.UpdateGlusterHookVDSCommand.getParameters ( ) . getHookContent ( ) , org.ovirt.engine.core.vdsbroker.gluster.UpdateGlusterHookVDSCommand.getParameters ( ) . getChecksum ( ) ) ; org.ovirt.engine.core.vdsbroker.gluster.UpdateGlusterHookVDSCommand.proceedProxyReturnValue ( ) ; }
Source:
public static void GetCPUList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Version version ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ServerCpu > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ServerCpu > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllServerCpuList , new org.ovirt.engine.core.common.queries.GetAllServerCpuListParameters ( version ) , aQuery ) ; }

Target:
public static void IsUSBEnabledByDefault ( 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.Boolean ) ( source ) ) . booleanValue ( ) : false ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.EnableUSBAsDefault , org.ovirt.engine.core.common.config.Config.DefaultConfigurationVersion ) , aQuery ) ; }
Source:
private void testIsManagementNetworkInAClusterCommon ( boolean expectedResult ) { org.mockito.Mockito.when ( mockNetworkCluster.isManagement ( ) ) . thenReturn ( expectedResult ) ; org.mockito.Mockito.when ( mockNetworkClusterDao.getAllForNetwork ( org.ovirt.engine.core.bll.network.cluster.ManagementNetworkUtilImplTest.TEST_NETWORK_ID ) ) . thenReturn ( java.util.Collections.singletonList ( mockNetworkCluster ) ) ; final boolean actual = underTest.isManagementNetwork ( org.ovirt.engine.core.bll.network.cluster.ManagementNetworkUtilImplTest.TEST_NETWORK_ID ) ; org.junit.Assert.assertEquals ( expectedResult , actual ) ; org.mockito.Mockito.verify ( mockNetworkClusterDao ) . getAllForNetwork ( org.ovirt.engine.core.bll.network.cluster.ManagementNetworkUtilImplTest.TEST_NETWORK_ID ) ; }

Target:
private void testIsManagementNetworkInAClusterCommon ( boolean expectedResult ) { org.mockito.Mockito.when ( mockNetworkCluster.isManagement ( ) ) . thenReturn ( expectedResult ) ; org.mockito.Mockito.when ( mockNetworkClusterDao.getAllForNetwork ( org.ovirt.engine.core.bll.network.cluster.ManagementNetworkUtilImplTest.TEST_NETWORK_ID ) ) . thenReturn ( java.util.Collections.singletonList ( mockNetworkCluster ) ) ; final boolean actual = underTest.isManagementNetwork ( org.ovirt.engine.core.bll.network.cluster.ManagementNetworkUtilImplTest.TEST_NETWORK_ID ) ; org.junit.jupiter.api.Assertions.assertEquals ( expectedResult , actual ) ; org.mockito.Mockito.verify ( mockNetworkClusterDao ) . getAllForNetwork ( org.ovirt.engine.core.bll.network.cluster.ManagementNetworkUtilImplTest.TEST_NETWORK_ID ) ; }
Source:
public static java.lang.String toSingular ( java.lang.String candidate ) { if ( ( ( candidate.length ( ) ) >= 1 ) && ( candidate.endsWith ( "s" ) ) ) { return candidate.substring ( 0 , ( ( candidate.length ( ) ) - 1 ) ) ; } return candidate ; }

Target:
public static java.lang.String toSingular ( java.lang.String plural ) { java.lang.String singular = org.ovirt.engine.sdk.codegen.utils.StringUtils.SINGULAR_EXCEPTIONS.get ( plural ) ; if ( singular == null ) { if ( ( ( plural.length ( ) ) >= 1 ) && ( plural.endsWith ( "s" ) ) ) { singular = plural.substring ( 0 , ( ( plural.length ( ) ) - 1 ) ) ; } else { singular = plural ; } } return singular ; }
Source:
public void run ( ) { org.ovirt.engine.core.bll.scheduling.external.ExternalSchedulerDiscoveryResult discoveryResult = org.ovirt.engine.core.bll.scheduling.external.ExternalSchedulerFactory.getInstance ( ) . runDiscover ( ) ; if ( discoveryResult != null ) { updateDB ( discoveryResult ) ; org.ovirt.engine.core.bll.scheduling.external.ExternalSchedulerDiscoveryThread.log.info ( "PolicyUnits updated" ) ; } else { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase loggable = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector ( ) . log ( loggable , AuditLogType.FAILED_TO_CONNECT_TO_SCHEDULER_PROXY ) ; markAllExternalPoliciesAsDisabled ( ) ; org.ovirt.engine.core.bll.scheduling.external.ExternalSchedulerDiscoveryThread.log.warn ( "Discovery returned empty result, disabled external policy units" ) ; } }

Target:
public boolean discover ( ) { org.ovirt.engine.core.bll.scheduling.external.ExternalSchedulerDiscoveryResult discoveryResult = org.ovirt.engine.core.bll.scheduling.external.ExternalSchedulerFactory.getInstance ( ) . runDiscover ( ) ; boolean dbUpdated = false ; if ( discoveryResult != null ) { updateDB ( discoveryResult ) ; org.ovirt.engine.core.bll.scheduling.external.ExternalSchedulerDiscovery.log.info ( "PolicyUnits updated" ) ; dbUpdated = true ; } else { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase loggable = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector ( ) . log ( loggable , AuditLogType.FAILED_TO_CONNECT_TO_SCHEDULER_PROXY ) ; markAllExternalPoliciesAsDisabled ( ) ; org.ovirt.engine.core.bll.scheduling.external.ExternalSchedulerDiscovery.log.warn ( "Discovery returned empty result, disabled external policy units" ) ; } return dbUpdated ; }
Source:
protected javax.ws.rs.core.UriInfo setUpActionExpectations ( org.ovirt.engine.core.common.action.VdcActionType task , java.lang.Class < ? extends org.ovirt.engine.core.common.action.VdcActionParametersBase > clz , java.lang.String [ ] names , java.lang.Object [ ] values , boolean canDo , boolean success , java.lang.Object taskReturn , java.lang.String baseUri , boolean replay ) { return setUpActionExpectations ( task , clz , names , values , canDo , success , taskReturn , null , null , null , null , baseUri , replay ) ; }

Target:
protected javax.ws.rs.core.UriInfo setUpActionExpectations ( org.ovirt.engine.core.common.action.VdcActionType task , java.lang.Class < ? extends org.ovirt.engine.core.common.action.VdcActionParametersBase > clz , java.lang.String [ ] names , java.lang.Object [ ] values , boolean canDo , boolean success , java.lang.Object taskReturn , boolean replay ) { return setUpActionExpectations ( task , clz , names , values , canDo , success , taskReturn , null , replay , org.ovirt.engine.api.restapi.resource.AbstractBackendBaseTest.CANT_DO ) ; }
Source:
private void Alert ( org.ovirt.engine.core.common.AuditLogType logType , java.lang.String operation ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase alert = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; alert.setVdsId ( org.ovirt.engine.core.bll.VdsCommand.getVds ( ) . getId ( ) ) ; java.lang.String op = ( operation == null ) ? org.ovirt.engine.core.bll.VdsCommand.getActionType ( ) . name ( ) : operation ; alert.addCustomValue ( "Operation" , op ) ; org.ovirt.engine.core.dal.dbbroker.auditloghandling.AlertDirector.Alert ( alert , logType , auditLogDirector ) ; }

Target:
private void Alert ( org.ovirt.engine.core.common.AuditLogType logType , java.lang.String operation ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase alert = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; alert.setVdsId ( org.ovirt.engine.core.bll.VdsCommand.getVds ( ) . getId ( ) ) ; java.lang.String op = ( operation == null ) ? org.ovirt.engine.core.bll.VdsCommand.getActionType ( ) . name ( ) : operation ; alert.addCustomValue ( "Operation" , op ) ; org.ovirt.engine.core.dal.dbbroker.auditloghandling.AlertDirector.alert ( alert , logType , auditLogDirector ) ; }
Source:
protected boolean canDoAction ( ) { if ( ( ( org.ovirt.engine.core.bll.VdsTagMapBase.getTagId ( ) ) != null ) && ( ! ( org.ovirt.engine.core.bll.VdsTagMapBase.getTagId ( ) . equals ( Guid.Empty ) ) ) ) { return true ; } else { addCanDoActionMessage ( VdcBllMessages.TAGS_SPECIFY_TAG_IS_NOT_EXISTS ) ; return false ; } }

Target:
protected boolean canDoAction ( ) { if ( ( ( org.ovirt.engine.core.bll.VdsTagMapBase.getTagId ( ) ) != null ) && ( ! ( org.ovirt.engine.core.bll.VdsTagMapBase.getTagId ( ) . equals ( Guid.Empty ) ) ) ) { return true ; } else { addCanDoActionMessage ( EngineMessage.TAGS_SPECIFY_TAG_IS_NOT_EXISTS ) ; return false ; } }
Source:
public org.ovirt.engine.ui.common.presenter.AbstractModelBoundPopupPresenterWidget < ? extends org.ovirt.engine.ui.uicommonweb.models.Model , ? > getModelPopup ( org.ovirt.engine.ui.uicommonweb.models.vms.hostdev.VmHostDeviceListModel source , org.ovirt.engine.ui.uicommonweb.UICommand lastExecutedCommand , org.ovirt.engine.ui.uicommonweb.models.Model windowModel ) { if ( lastExecutedCommand == ( getModel ( ) . getAddCommand ( ) ) ) { return addPopupProvider.get ( ) ; } else if ( lastExecutedCommand == ( getModel ( ) . getRepinHostCommand ( ) ) ) { return repinPopupProvider.get ( ) ; } return super . getModelPopup ( source , lastExecutedCommand , windowModel ) ; }

Target:
public org.ovirt.engine.ui.common.presenter.AbstractModelBoundPopupPresenterWidget < ? extends org.ovirt.engine.ui.uicommonweb.models.Model , ? > getModelPopup ( org.ovirt.engine.ui.uicommonweb.models.configure.labels.list.VmAffinityLabelListModel source , org.ovirt.engine.ui.uicommonweb.UICommand lastExecutedCommand , org.ovirt.engine.ui.uicommonweb.models.Model windowModel ) { if ( ( lastExecutedCommand == ( getModel ( ) . getNewCommand ( ) ) ) || ( lastExecutedCommand == ( getModel ( ) . getEditCommand ( ) ) ) ) { return popupProvider.get ( ) ; } else { return super . getModelPopup ( source , lastExecutedCommand , windowModel ) ; } }
Source:
public void validCustomDevPropSpec ( ) { java.lang.String customDevPropSpec = "{type=disk;prop={bootable=^(true|false)$}};" + ( ( ( ( ( ( ( ( "{type=interface;prop={speed=[0-9]{1,5};duplex=^(full|half)$}};" + "{type=video;prop={turned_on=^(true|false)$}};" ) + "{type=sound;prop={volume=[0-9]{1,2}}};" ) + "{type=controller;prop={hotplug=^(true|false)$}};" ) + "{type=balloon;prop={max_size=[0-9]{1,15}}};" ) + "{type=channel;prop={auth_type=^(plain|md5|kerberos)$}};" ) + "{type=redir;prop={max_len=[0-9]{1,15}}};" ) + "{type=console;prop={type=^(text|vnc)$}};" ) + "{type=smartcard;prop={version=([1-9]{1}).([0-9]{1})}}" ) ; org.ovirt.engine.core.utils.customprop.DevicePropertiesUtils utils = org.ovirt.engine.core.utils.customprop.DevicePropertiesUtils.getInstance ( ) ; org.junit.Assert.assertTrue ( utils.isDevicePropertiesDefinitionValid ( customDevPropSpec ) ) ; }

Target:
public void validCustomDevPropSpec ( ) { java.lang.String customDevPropSpec = "{type=disk;prop={bootable=^(true|false)$}};" + ( ( ( ( ( ( ( ( "{type=interface;prop={speed=[0-9]{1,5};duplex=^(full|half)$;debug=([a-z0-9A-Z]*)$}};" + "{type=video;prop={turned_on=^(true|false)$}};" ) + "{type=sound;prop={volume=[0-9]{1,2}}};" ) + "{type=controller;prop={hotplug=^(true|false)$}};" ) + "{type=balloon;prop={max_size=[0-9]{1,15}}};" ) + "{type=channel;prop={auth_type=^(plain|md5|kerberos)$}};" ) + "{type=redir;prop={max_len=[0-9]{1,15}}};" ) + "{type=console;prop={type=^(text|vnc)$}};" ) + "{type=smartcard;prop={version=([1-9]{1}).([0-9]{1})}}" ) ; org.ovirt.engine.core.utils.customprop.DevicePropertiesUtils utils = org.ovirt.engine.core.utils.customprop.DevicePropertiesUtils.getInstance ( ) ; org.junit.Assert.assertTrue ( utils.isDevicePropertiesDefinitionValid ( customDevPropSpec ) ) ; }
Source:
private org.ovirt.engine.core.compat.Guid getHostId ( org.ovirt.engine.api.model.StorageDomain storageDomain ) { return storageDomain.getHost ( ) . isSetId ( ) ? new org.ovirt.engine.core.compat.Guid ( storageDomain.getHost ( ) . getId ( ) ) : storageDomain.getHost ( ) . isSetName ( ) ? getEntity ( org.ovirt.engine.core.common.businessentities.VdsStatic.class , VdcQueryType.GetVdsStaticByName , new org.ovirt.engine.core.common.queries.NameQueryParameters ( storageDomain.getHost ( ) . getName ( ) ) , ( "Hosts: name=" + ( storageDomain.getHost ( ) . getName ( ) ) ) ) . getId ( ) : null ; }

Target:
private org.ovirt.engine.core.compat.Guid getHostId ( java.lang.String host ) { try { return org.ovirt.engine.core.compat.Guid.createGuidFromString ( host ) ; } catch ( java.lang.IllegalArgumentException exception ) { org.ovirt.engine.core.common.businessentities.VdsStatic entity = getEntity ( org.ovirt.engine.core.common.businessentities.VdsStatic.class , VdcQueryType.GetVdsStaticByName , new org.ovirt.engine.core.common.queries.NameQueryParameters ( host ) , host ) ; if ( entity != null ) { return entity.getId ( ) ; } return org.ovirt.engine.core.compat.Guid.Empty ; } }
Source:
public 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 ; } } ; getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.MaxVdsMemOverCommitForServers , getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public void getClusterDesktopMemoryOverCommit ( 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 ; } } ; getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.MaxVdsMemOverCommit , getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
private void attachDiskToTemplate ( org.ovirt.engine.core.compat.Guid templateId ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage templateDiskImage = org.ovirt.engine.core.bll.storage.repoimage.ImportRepoImageCommand.getParameters ( ) . getDiskImage ( ) ; org.ovirt.engine.core.common.businessentities.storage.DiskVmElement dve = new org.ovirt.engine.core.common.businessentities.storage.DiskVmElement ( templateDiskImage.getId ( ) , templateId ) ; dve.setDiskInterface ( DiskInterface.VirtIO ) ; diskVmElementDao.save ( dve ) ; vmDeviceUtils.addDiskDevice ( templateId , templateDiskImage.getId ( ) ) ; }

Target:
private void attachDiskToTemplate ( org.ovirt.engine.core.compat.Guid templateId ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage templateDiskImage = org.ovirt.engine.core.bll.storage.repoimage.ImportRepoImageCommand.getParameters ( ) . getDiskImage ( ) ; org.ovirt.engine.core.common.businessentities.storage.DiskVmElement dve = new org.ovirt.engine.core.common.businessentities.storage.DiskVmElement ( templateDiskImage.getId ( ) , templateId ) ; dve.setBoot ( true ) ; dve.setDiskInterface ( DiskInterface.VirtIO ) ; diskVmElementDao.save ( dve ) ; vmDeviceUtils.addDiskDevice ( templateId , templateDiskImage.getId ( ) ) ; }
Source:
protected java.util.List < org.ovirt.engine.core.common.businessentities.VDS > getSecondaryDestinations ( org.ovirt.engine.core.common.businessentities.VDSGroup cluster , java.util.List < org.ovirt.engine.core.common.businessentities.VDS > candidateHosts , java.util.Map < java.lang.String , java.lang.String > parameters ) { long notEnoughMemory = ( parameters.containsKey ( org.ovirt.engine.core.bll.scheduling.policyunits.LOW_MEMORY_LIMIT_FOR_OVER_UTILIZED ) ) ? java.lang.Long.valueOf ( parameters.get ( org.ovirt.engine.core.bll.scheduling.policyunits.LOW_MEMORY_LIMIT_FOR_OVER_UTILIZED ) ) : 0L ; long tooMuchMemory = ( parameters.containsKey ( org.ovirt.engine.core.bll.scheduling.policyunits.HIGH_MEMORY_LIMIT_FOR_UNDER_UTILIZED ) ) ? java.lang.Long.valueOf ( parameters.get ( org.ovirt.engine.core.bll.scheduling.policyunits.HIGH_MEMORY_LIMIT_FOR_UNDER_UTILIZED ) ) : 0L ; return getNormallyUtilizedMemoryHosts ( candidateHosts , notEnoughMemory , tooMuchMemory ) ; }

Target:
protected java.util.List < org.ovirt.engine.core.common.businessentities.VDS > getSecondaryDestinations ( org.ovirt.engine.core.common.businessentities.VDSGroup cluster , java.util.List < org.ovirt.engine.core.common.businessentities.VDS > candidateHosts , java.util.Map < java.lang.String , java.lang.String > parameters ) { long notEnoughMemory = ( parameters.containsKey ( org.ovirt.engine.core.bll.scheduling.policyunits.LOW_MEMORY_LIMIT_FOR_OVER_UTILIZED ) ) ? java.lang.Long.valueOf ( parameters.get ( org.ovirt.engine.core.bll.scheduling.policyunits.LOW_MEMORY_LIMIT_FOR_OVER_UTILIZED ) ) : 0L ; long tooMuchMemory = ( parameters.containsKey ( org.ovirt.engine.core.bll.scheduling.policyunits.HIGH_MEMORY_LIMIT_FOR_UNDER_UTILIZED ) ) ? java.lang.Long.valueOf ( parameters.get ( org.ovirt.engine.core.bll.scheduling.policyunits.HIGH_MEMORY_LIMIT_FOR_UNDER_UTILIZED ) ) : java.lang.Long.MAX_VALUE ; return getNormallyUtilizedMemoryHosts ( candidateHosts , notEnoughMemory , tooMuchMemory ) ; }
Source:
protected javax.ws.rs.core.Response add ( org.ovirt.engine.api.model.CpuProfile cpuProfile ) { validateParameters ( cpuProfile ) ; org.ovirt.engine.core.common.action.CpuProfileParameters parameters = new org.ovirt.engine.core.common.action.CpuProfileParameters ( ) ; org.ovirt.engine.api.model.CpuProfile map = map ( cpuProfile ) ; parameters.setProfile ( map ) ; parameters.setAddPermissions ( true ) ; return performCreate ( ActionType.AddCpuProfile , parameters , new org.ovirt.engine.api.restapi.resource.QueryIdResolver < org.ovirt.engine.core.compat.Guid > ( org.ovirt.engine.core.common.queries.VdcQueryType.GetCpuProfileById , org.ovirt.engine.core.common.queries.IdQueryParameters.class ) ) ; }

Target:
protected javax.ws.rs.core.Response add ( org.ovirt.engine.api.model.CpuProfile cpuProfile ) { validateParameters ( cpuProfile ) ; org.ovirt.engine.core.common.action.CpuProfileParameters parameters = new org.ovirt.engine.core.common.action.CpuProfileParameters ( ) ; org.ovirt.engine.api.model.CpuProfile map = map ( cpuProfile ) ; parameters.setProfile ( map ) ; parameters.setAddPermissions ( true ) ; return performCreate ( ActionType.AddCpuProfile , parameters , new org.ovirt.engine.api.restapi.resource.QueryIdResolver < org.ovirt.engine.core.compat.Guid > ( org.ovirt.engine.core.common.queries.QueryType.GetCpuProfileById , org.ovirt.engine.core.common.queries.IdQueryParameters.class ) ) ; }
Source:
public void testValidRemovedBondsWhenNotRemovingAnyBond ( ) throws java.lang.Exception { org.ovirt.engine.core.common.action.HostSetupNetworksParameters params = new org.ovirt.engine.core.common.action.HostSetupNetworksParameters ( host.getId ( ) ) ; params.setRemovedBonds ( java.util.Collections.< org.ovirt.engine.core.common.businessentities.network.Bond > emptyList ( ) ) ; org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidator validator = new org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidator ( host , params , java.util.Collections.< org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > emptyList ( ) , null , null , managementNetworkUtil ) ; org.junit.Assert.assertThat ( validator.validRemovedBonds ( java.util.Collections.< org.ovirt.engine.core.common.businessentities.network.NetworkAttachment > emptyList ( ) ) , org.hamcrest.CoreMatchers.is ( true ) ) ; }

Target:
public void testValidRemovedBondsWhenNotRemovingAnyBond ( ) throws java.lang.Exception { org.ovirt.engine.core.common.action.HostSetupNetworksParameters params = new org.ovirt.engine.core.common.action.HostSetupNetworksParameters ( host.getId ( ) ) ; params.setRemovedBonds ( java.util.Collections.< org.ovirt.engine.core.compat.Guid > emptySet ( ) ) ; org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidator validator = createHostSetupNetworksValidator ( params , null ) ; org.junit.Assert.assertThat ( validator.validRemovedBonds ( java.util.Collections.< org.ovirt.engine.core.common.businessentities.network.NetworkAttachment > emptyList ( ) ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }
Source:
public org.ovirt.engine.core.bll.ValidationResult addLabelToNicAndValidate ( java.lang.String label , java.util.List < java.lang.Class < ? > > commandValidationGroups ) { iface.getLabels ( ) . add ( label ) ; java.util.List < java.lang.String > validationResult = org.ovirt.engine.core.common.utils.ValidationUtils.validateInputs ( commandValidationGroups , iface ) ; return org.ovirt.engine.core.bll.ValidationResult.failWith ( VdcBllMessages.IMPROPER_INTERFACE_IS_LABELED ) . when ( ( ! ( validationResult.isEmpty ( ) ) ) ) ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult addLabelToNicAndValidate ( java.lang.String label , java.util.List < java.lang.Class < ? > > commandValidationGroups ) { iface.getLabels ( ) . add ( label ) ; java.util.List < java.lang.String > validationResult = org.ovirt.engine.core.common.utils.ValidationUtils.validateInputs ( commandValidationGroups , iface ) ; return org.ovirt.engine.core.bll.ValidationResult.failWith ( EngineMessage.IMPROPER_INTERFACE_IS_LABELED ) . when ( ( ! ( validationResult.isEmpty ( ) ) ) ) ; }
Source:
public static com.google.gwt.i18n.client.DateTimeFormat getFormat ( int dateStyle ) { switch ( dateStyle ) { case org.ovirt.engine.core.compat.DateFormatCompat.FULL : return com.google.gwt.i18n.client.DateTimeFormat.getFormat ( PredefinedFormat.DATE_FULL ) ; case org.ovirt.engine.core.compat.DateFormatCompat.LONG : return com.google.gwt.i18n.client.DateTimeFormat.getFormat ( PredefinedFormat.DATE_LONG ) ; case org.ovirt.engine.core.compat.DateFormatCompat.SHORT : return com.google.gwt.i18n.client.DateTimeFormat.getFormat ( PredefinedFormat.DATE_SHORT ) ; default : return com.google.gwt.i18n.client.DateTimeFormat.getFormat ( PredefinedFormat.DATE_MEDIUM ) ; } }

Target:
public static com.google.gwt.i18n.client.DateTimeFormat getFormat ( int dateStyle ) { switch ( dateStyle ) { case java.text.DateFormat.FULL : return com.google.gwt.i18n.client.DateTimeFormat.getFormat ( PredefinedFormat.DATE_FULL ) ; case java.text.DateFormat.LONG : return com.google.gwt.i18n.client.DateTimeFormat.getFormat ( PredefinedFormat.DATE_LONG ) ; case java.text.DateFormat.SHORT : return com.google.gwt.i18n.client.DateTimeFormat.getFormat ( PredefinedFormat.DATE_SHORT ) ; default : return com.google.gwt.i18n.client.DateTimeFormat.getFormat ( PredefinedFormat.DATE_MEDIUM ) ; } }
Source:
public static void GetMaxVmsInPool ( 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 ( ) : 1000 ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.MaxVmsInPool ) , aQuery ) ; }

Target:
public static void GetMaxVmsInPool ( 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 ( ) : 1000 ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.MaxVmsInPool , org.ovirt.engine.core.common.config.Config.DefaultConfigurationVersion ) , aQuery ) ; }
Source:
protected void SelectedItemPropertyChanged ( java.lang.Object sender , org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs e ) { super . SelectedItemPropertyChanged ( sender , e ) ; if ( e.PropertyName.equals ( "status" ) ) { UpdateActionAvailability ( ) ; } else if ( e.PropertyName.equals ( "display_type" ) ) { UpdateConsoleModels ( ) ; } }

Target:
protected void selectedItemPropertyChanged ( java.lang.Object sender , org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs e ) { super . selectedItemPropertyChanged ( sender , e ) ; if ( e.PropertyName.equals ( "status" ) ) { updateActionAvailability ( ) ; } else if ( e.PropertyName.equals ( "display_type" ) ) { updateConsoleModels ( ) ; } }
Source:
public org.ovirt.engine.core.common.action.VdcActionParametersBase getParameters ( org.ovirt.engine.api.model.WatchDog model , org.ovirt.engine.core.common.businessentities.VmWatchdog entity ) { org.ovirt.engine.core.common.action.WatchdogParameters params = new org.ovirt.engine.core.common.action.WatchdogParameters ( ) ; params.setModel ( org.ovirt.engine.core.common.businessentities.VmWatchdogType.getByName ( model.getModel ( ) ) ) ; params.setAction ( org.ovirt.engine.core.common.businessentities.VmWatchdogAction.getByName ( model.getAction ( ) ) ) ; params.setId ( org.ovirt.engine.api.restapi.resource.BackendWatchdogResourceTest.VM_ID ) ; params.setVm ( true ) ; return params ; }

Target:
public org.ovirt.engine.core.common.action.VdcActionParametersBase getParameters ( org.ovirt.engine.api.model.Watchdog model , org.ovirt.engine.core.common.businessentities.VmWatchdog entity ) { org.ovirt.engine.core.common.action.WatchdogParameters params = new org.ovirt.engine.core.common.action.WatchdogParameters ( ) ; params.setModel ( org.ovirt.engine.core.common.businessentities.VmWatchdogType.getByName ( model.getModel ( ) ) ) ; params.setAction ( org.ovirt.engine.core.common.businessentities.VmWatchdogAction.getByName ( model.getAction ( ) ) ) ; params.setId ( org.ovirt.engine.api.restapi.resource.BackendWatchdogResourceTest.VM_ID ) ; params.setVm ( true ) ; return params ; }
Source:
protected org.ovirt.engine.api.model.VM doPopulate ( org.ovirt.engine.api.model.VM model , org.ovirt.engine.api.model.VM entity ) { setPayload ( model ) ; setBallooning ( model ) ; setConsoleDevice ( model ) ; setVirtioScsiController ( model ) ; setSoundcard ( model ) ; setCertificateInfo ( model ) ; setVmOvfConfiguration ( model , entity ) ; setRngDevice ( model ) ; return model ; }

Target:
protected org.ovirt.engine.api.model.Vm deprecatedPopulate ( org.ovirt.engine.api.model.Vm model , org.ovirt.engine.api.restapi.resource.VM entity ) { java.util.Set < java.lang.String > details = org.ovirt.engine.api.common.util.DetailHelper.getDetails ( httpHeaders , uriInfo ) ; model = addInlineDetails ( details , model ) ; if ( details.contains ( "statistics" ) ) { addInlineStatistics ( model ) ; } return model ; }
Source:
public void setRefreshRate ( int interval ) { if ( ( getRefreshRate ( ) ) == interval ) { return ; } reset ( ) ; org.ovirt.engine.ui.uicommonweb.models.GridTimer.logger.fine ( ( ( ( "GridTimer[" + ( name ) ) + "]: Refresh Rate set to: " ) + interval ) ) ; normalInterval = interval ; com.google.gwt.event.logical.shared.ValueChangeEvent.fire ( this , getRefreshRate ( ) ) ; }

Target:
public void setRefreshRate ( int interval ) { if ( ( getRefreshRate ( ) ) == interval ) { return ; } reset ( ) ; org.ovirt.engine.ui.uicommonweb.models.GridTimer.logger.fine ( ( ( ( "GridTimer[" + ( name ) ) + "]: Refresh Rate set to: " ) + interval ) ) ; normalInterval = interval ; start ( ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc migrateStatus ( java.lang.String vmId ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.migrateStatus ( vmId ) ; 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.BooleanReturnForXmlRpc glusterVolumeEmptyCheck ( java.lang.String volumeName ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.glusterVolumeEmptyCheck ( volumeName ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.BooleanReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.BooleanReturnForXmlRpc ( xmlRpcReturnValue , "volumeEmptyCheck" ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
Source:
public void testMapOriginTypeRhev ( ) { java.lang.String s = org.ovirt.engine.api.restapi.types.VmMapper.map ( OriginType.RHEV , null ) ; assertEquals ( s , "rhev" ) ; org.ovirt.engine.core.common.businessentities.OriginType s2 = org.ovirt.engine.api.restapi.types.VmMapper.map ( s , OriginType.RHEV ) ; assertEquals ( s2 , OriginType.RHEV ) ; }

Target:
public void testGlobalSpiceProxy ( ) { org.ovirt.engine.api.model.VM entity = new org.ovirt.engine.api.model.VM ( ) ; mcr.mockConfigValue ( ConfigValues.SpiceProxyDefault , org.ovirt.engine.api.restapi.types.VmMapperTest.GLOBAL_SPICE_PROXY ) ; org.ovirt.engine.api.model.VM model = org.ovirt.engine.api.restapi.types.VmMapper.map ( entity , ( ( org.ovirt.engine.api.model.VM ) ( null ) ) ) ; assertEquals ( org.ovirt.engine.api.restapi.types.VmMapperTest.GLOBAL_SPICE_PROXY , model.getDisplay ( ) . getProxy ( ) ) ; }
Source:
protected void initLoginModel ( ) { final T loginModel = getLoginModel ( ) ; loginModel.getLoggedInEvent ( ) . addListener ( new org.ovirt.engine.ui.uicompat.IEventListener ( ) { @ java.lang.Override public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { onLogin ( loginModel ) ; } } ) ; }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { currentUserRole.setCreateInstanceOnly ( loginModel.getCreateInstanceOnly ( ) . getEntity ( ) ) ; }
Source:
protected void addUsersToModel ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue returnValue , java.util.Set < java.lang.String > excludeUsers ) { for ( org.ovirt.engine.core.common.businessentities.IVdcQueryable item : ( ( java.util.List < org.ovirt.engine.core.common.businessentities.IVdcQueryable > ) ( returnValue.getReturnValue ( ) ) ) ) { org.ovirt.engine.core.aaa.DirectoryUser a = ( ( org.ovirt.engine.core.aaa.DirectoryUser ) ( item ) ) ; if ( ! ( excludeUsers.contains ( a.getId ( ) ) ) ) { org.ovirt.engine.ui.uicommonweb.models.EntityModel tempVar2 = new org.ovirt.engine.ui.uicommonweb.models.EntityModel ( ) ; tempVar2.setEntity ( new org.ovirt.engine.core.common.businessentities.DbUser ( a ) ) ; getusers ( ) . add ( tempVar2 ) ; } } }

Target:
protected void addUsersToModel ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue returnValue , java.util.Set < java.lang.String > excludeUsers ) { for ( org.ovirt.engine.core.common.businessentities.IVdcQueryable item : ( ( java.util.List < org.ovirt.engine.core.common.businessentities.IVdcQueryable > ) ( returnValue.getReturnValue ( ) ) ) ) { org.ovirt.engine.core.aaa.DirectoryUser a = ( ( org.ovirt.engine.core.aaa.DirectoryUser ) ( item ) ) ; if ( ! ( excludeUsers.contains ( a.getId ( ) ) ) ) { org.ovirt.engine.ui.uicommonweb.models.EntityModel tempVar2 = new org.ovirt.engine.ui.uicommonweb.models.EntityModel ( ) ; tempVar2.setEntity ( new org.ovirt.engine.core.common.businessentities.aaa.DbUser ( a ) ) ; getusers ( ) . add ( tempVar2 ) ; } } }
Source:
public 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 void getStorageDomainByName ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String storageDomainName ) { 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.GetStorageDomainByName , new org.ovirt.engine.core.common.queries.NameQueryParameters ( storageDomainName ) , aQuery ) ; }
Source:
protected void initTableColumns ( org.ovirt.engine.ui.webadmin.ApplicationConstants constants ) { bricksTable.addEntityModelColumn ( new org.ovirt.engine.ui.common.widget.table.column.EntityModelTextColumn < org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity > ( ) { @ java.lang.Override public java.lang.String getText ( org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity entity ) { return entity.getServerName ( ) ; } } , constants.serverBricks ( ) ) ; bricksTable.addEntityModelColumn ( new org.ovirt.engine.ui.common.widget.table.column.EntityModelTextColumn < org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity > ( ) { @ java.lang.Override public java.lang.String getText ( org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity entity ) { return entity.getBrickDirectory ( ) ; } } , constants.brickDirectoryBricks ( ) ) ; }

Target:
protected void initTableColumns ( org.ovirt.engine.ui.webadmin.ApplicationConstants constants ) { bricksTable.addEntityModelColumn ( new org.ovirt.engine.ui.common.widget.table.column.AbstractEntityModelTextColumn < org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity > ( ) { @ java.lang.Override public java.lang.String getText ( org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity entity ) { return entity.getServerName ( ) ; } } , constants.serverBricks ( ) ) ; bricksTable.addEntityModelColumn ( new org.ovirt.engine.ui.common.widget.table.column.AbstractEntityModelTextColumn < org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity > ( ) { @ java.lang.Override public java.lang.String getText ( org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity entity ) { return entity.getBrickDirectory ( ) ; } } , constants.brickDirectoryBricks ( ) ) ; }