auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void testRemoveNonExistant ( ) throws java.lang.Exception { setUpEntityQueryExpectations ( QueryType.GetMacPoolById , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendMacPoolResourceTest.MAC_POOL_ID } , null ) ; try { resource.remove ( ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { assertNotNull ( wae.getResponse ( ) ) ; assertEquals ( 404 , wae.getResponse ( ) . getStatus ( ) ) ; } }

Target:
public void testRemoveNonExistant ( ) throws java.lang.Exception { setUpEntityQueryExpectations ( QueryType.GetMacPoolById , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendMacPoolResourceTest.MAC_POOL_ID } , null ) ; try { resource.remove ( ) ; org.junit.Assert.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { org.junit.Assert.assertNotNull ( wae.getResponse ( ) ) ; org.junit.Assert.assertEquals ( 404 , wae.getResponse ( ) . getStatus ( ) ) ; } }
Source:
public static void GetDataCentersWithPermittedActionOnClusters ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.common.businessentities.ActionGroup actionGroup ) { 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.storage_pool > ( ) ; } return source ; } } ; org.ovirt.engine.core.common.queries.GetEntitiesWithPermittedActionParameters getEntitiesWithPermittedActionParameters = new org.ovirt.engine.core.common.queries.GetEntitiesWithPermittedActionParameters ( ) ; getEntitiesWithPermittedActionParameters.setActionGroup ( actionGroup ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetDataCentersWithPermittedActionOnClusters , getEntitiesWithPermittedActionParameters , 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.core.common.config.Config.DefaultConfigurationVersion ) , aQuery ) ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { java.util.Map < java.lang.Integer , java.util.Map < org.ovirt.engine.core.compat.Version , java.util.List < org.ovirt.engine.core.common.businessentities.DisplayType > > > result = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.displayTypes = new org.ovirt.engine.ui.uicommonweb.MapWithDefaults < java.lang.Integer , java.util.Map < org.ovirt.engine.core.compat.Version , java.util.List < org.ovirt.engine.core.common.businessentities.DisplayType > > > ( result , result.get ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.DEFAULT_OS_ID ) ) ; }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { osArchitectures = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ; }
Source:
public void executeCommand ( ) { setUpMocksForUpdate ( ) ; mockBackend ( true , null ) ; cmd.executeCommand ( ) ; org.mockito.Mockito.verify ( hooksDao , org.mockito.Mockito.times ( 1 ) ) . updateGlusterHook ( org.mockito.Matchers.any ( org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity.class ) ) ; org.junit.Assert.assertEquals ( AuditLogType.GLUSTER_HOOK_UPDATED , cmd.getAuditLogTypeValue ( ) ) ; }

Target:
public void executeCommand ( ) { setUpMocksForUpdate ( ) ; mockBackend ( true , null ) ; cmd.executeCommand ( ) ; org.mockito.Mockito.verify ( hooksDao , org.mockito.Mockito.times ( 1 ) ) . updateGlusterHook ( org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity.class ) ) ; org.junit.Assert.assertEquals ( AuditLogType.GLUSTER_HOOK_UPDATED , cmd.getAuditLogTypeValue ( ) ) ; }
Source:
private void handleVdsLiveSnapshotFailure ( org.ovirt.engine.core.common.errors.VdcBLLException e ) { log.warn ( ( "Could not perform live snapshot due to error, VM will still be configured to the new created" + " snapshot: {}" ) , e.getMessage ( ) ) ; log.debug ( "Exception" , e ) ; addCustomValue ( "SnapshotName" , org.ovirt.engine.core.bll.CreateAllSnapshotsFromVmCommand.getSnapshotName ( ) ) ; addCustomValue ( "VmName" , org.ovirt.engine.core.bll.CreateAllSnapshotsFromVmCommand.getVmName ( ) ) ; updateCallStackFromThrowable ( e ) ; org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.log ( this , AuditLogType.USER_CREATE_LIVE_SNAPSHOT_FINISHED_FAILURE ) ; }

Target:
private void handleVdsLiveSnapshotFailure ( org.ovirt.engine.core.common.errors.VdcBLLException e ) { log.warn ( ( "Could not perform live snapshot due to error, VM will still be configured to the new created" + " snapshot: {}" ) , e.getMessage ( ) ) ; log.debug ( "Exception" , e ) ; addCustomValue ( "SnapshotName" , org.ovirt.engine.core.bll.CreateAllSnapshotsFromVmCommand.getSnapshotName ( ) ) ; addCustomValue ( "VmName" , org.ovirt.engine.core.bll.CreateAllSnapshotsFromVmCommand.getVmName ( ) ) ; updateCallStackFromThrowable ( e ) ; auditLogDirector.log ( this , AuditLogType.USER_CREATE_LIVE_SNAPSHOT_FINISHED_FAILURE ) ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { if ( returnValue != null ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider._defaultConfigurationVersion = ( ( java.lang.String ) ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ) ) ; } else { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider._defaultConfigurationVersion = org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GENERAL ; } org.ovirt.engine.ui.uicommonweb.models.LoginModel loginModel = ( ( org.ovirt.engine.ui.uicommonweb.models.LoginModel ) ( model ) ) ; loginModel.getLoggedInEvent ( ) . raise ( loginModel , EventArgs.Empty ) ; }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { if ( returnValue != null ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider._defaultConfigurationVersion = ( ( java.lang.String ) ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ) ) ; } else { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider._defaultConfigurationVersion = org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GENERAL ; } org.ovirt.engine.ui.uicommonweb.models.LoginModel loginModel = ( ( org.ovirt.engine.ui.uicommonweb.models.LoginModel ) ( model ) ) ; loginModel.getLoggedInEvent ( ) . raise ( loginModel , EventArgs.EMPTY ) ; }
Source:
void addStyles ( ) { storageTypeListEditor.setLabelStyleName ( style.label ( ) ) ; storageTypeListEditor.addContentWidgetStyleName ( style.storageContentWidget ( ) ) ; formatListEditor.setLabelStyleName ( style.label ( ) ) ; formatListEditor.addContentWidgetStyleName ( style.formatContentWidget ( ) ) ; }

Target:
void addStyles ( ) { storageTypeListEditor.setLabelStyleName ( style.label ( ) ) ; storageTypeListEditor.addContentWidgetStyleName ( style.storageContentWidget ( ) ) ; formatListEditor.setLabelStyleName ( style.label ( ) ) ; formatListEditor.addContentWidgetStyleName ( style.formatContentWidget ( ) ) ; activateDomainEditor.addContentWidgetStyleName ( style.activateDomainEditor ( ) ) ; }
Source:
private java.lang.String getVmIsHibernatingMessage ( ) { java.lang.StringBuilder builder = new java.lang.StringBuilder ( EngineMessage.ACTION_TYPE_FAILED_VM_IS_HIBERNATING.name ( ) ) ; if ( ( org.ovirt.engine.core.bll.HibernateVmCommand.getVmName ( ) ) != null ) { builder.append ( java.lang.String.format ( "$VmName %1$s" , org.ovirt.engine.core.bll.HibernateVmCommand.getVmName ( ) ) ) ; } return builder.toString ( ) ; }

Target:
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.HibernateVmCommand.getVmId ( ) . toString ( ) , org.ovirt.engine.core.bll.LockMessagesMatchUtil.makeLockingPair ( LockingGroup.VM , new org.ovirt.engine.core.bll.LockMessage ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_VM_IS_HIBERNATING ) . withOptional ( "VmName" , org.ovirt.engine.core.bll.HibernateVmCommand.getVmName ( ) ) ) ) ; }
Source:
public org.ovirt.engine.api.model.Networks list ( ) { org.ovirt.engine.api.model.Networks networks ; if ( isFiltered ( ) ) { networks = mapCollection ( getBackendCollection ( queryType , getQueryParameters ( ) , SearchType.Network ) ) ; } else { networks = mapCollection ( getBackendCollection ( SearchType.Network ) ) ; } for ( org.ovirt.engine.api.model.Network network : networks.getNetworks ( ) ) { network.setDisplay ( null ) ; } return networks ; }

Target:
private org.ovirt.engine.api.model.Networks mapCollection ( java.util.List < org.ovirt.engine.api.model.Network > entities ) { org.ovirt.engine.api.model.Networks collection = new org.ovirt.engine.api.model.Networks ( ) ; for ( org.ovirt.engine.api.model.Network entity : entities ) { collection.getNetworks ( ) . add ( addLinks ( map ( entity ) ) ) ; } return collection ; }
Source:
public void executeCommandWhenFailed ( ) { cmd = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.gluster.EnableGlusterHookCommand ( new org.ovirt.engine.core.common.action.gluster.GlusterHookParameters ( org.ovirt.engine.core.bll.gluster.EnableGlusterHookCommandTest.CLUSTER_ID , org.ovirt.engine.core.bll.gluster.EnableGlusterHookCommandTest.HOOK_ID ) ) ) ; setupMocks ( ) ; mockConfig ( ) ; mockBackend ( false ) ; cmd.executeCommand ( ) ; org.junit.Assert.assertEquals ( cmd.getAuditLogTypeValue ( ) , AuditLogType.GLUSTER_HOOK_ENABLE_FAILED ) ; }

Target:
public void canDoActionFailsOnNullHookId ( ) { cmd = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.gluster.EnableGlusterHookCommand ( new org.ovirt.engine.core.common.action.gluster.GlusterHookParameters ( CLUSTER_ID , null ) ) ) ; setupMocks ( cmd ) ; org.junit.Assert.assertFalse ( cmd.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( cmd.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( VdcBllMessages.ACTION_TYPE_FAILED_GLUSTER_HOOK_ID_IS_REQUIRED.toString ( ) ) ) ; }
Source:
protected void executeVdsBrokerCommand ( ) { org.ovirt.engine.core.common.vdscommands.gluster.GlusterVolumeGeoRepSessionVDSParameters parameters = getParameters ( ) ; status = getBroker ( ) . glusterVolumeGeoRepPause ( parameters.getVolumeName ( ) , parameters.getSlaveHost ( ) , parameters.getSlaveVolume ( ) , parameters.getForce ( ) ) ; proceedProxyReturnValue ( ) ; }

Target:
protected void executeVdsBrokerCommand ( ) { org.ovirt.engine.core.common.vdscommands.gluster.GlusterVolumeGeoRepSessionVDSParameters parameters = getParameters ( ) ; status = getBroker ( ) . glusterVolumeGeoRepSessionPause ( parameters.getVolumeName ( ) , parameters.getSlaveHost ( ) , parameters.getSlaveVolume ( ) , parameters.getForce ( ) ) ; proceedProxyReturnValue ( ) ; }
Source:
public 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 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 ) ; }
Source:
private static void cloneNetworkStatisticss ( org.ovirt.engine.core.common.businessentities.network.NetworkStatistics instance , org.ovirt.engine.core.common.businessentities.network.NetworkStatistics obj ) { obj.setId ( instance.getId ( ) ) ; obj.setReceiveDropRate ( instance.getReceiveDropRate ( ) ) ; obj.setReceiveRate ( instance.getReceiveRate ( ) ) ; obj.setTransmitDropRate ( instance.getTransmitDropRate ( ) ) ; obj.setTransmitRate ( instance.getTransmitRate ( ) ) ; obj.setStatus ( instance.getStatus ( ) ) ; }

Target:
private static java.util.List < org.ovirt.engine.core.common.businessentities.pm.FenceAgent > cloneAgents ( java.util.List < org.ovirt.engine.core.common.businessentities.pm.FenceAgent > agents ) { if ( ( agents == null ) || ( agents.isEmpty ( ) ) ) { return null ; } else { java.util.List < org.ovirt.engine.core.common.businessentities.pm.FenceAgent > clonedAgents = new java.util.LinkedList < org.ovirt.engine.core.common.businessentities.pm.FenceAgent > ( ) ; for ( org.ovirt.engine.core.common.businessentities.pm.FenceAgent agent : agents ) { clonedAgents.add ( org.ovirt.engine.ui.uicommonweb.Cloner.cloneAgent ( agent ) ) ; } return clonedAgents ; } }
Source:
public static void GetStorageDomainById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storageDomainId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( org.ovirt.engine.core.common.businessentities.StorageDomain ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetStorageDomainById , new org.ovirt.engine.core.common.queries.StorageDomainQueryParametersBase ( storageDomainId ) , aQuery ) ; }

Target:
public static void getVmDiskList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid vmId , boolean isRefresh ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { return source ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > ( ) ; } } ; org.ovirt.engine.core.common.queries.IdQueryParameters params = new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) ; params.setRefresh ( isRefresh ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllDisksByVmId , params , aQuery ) ; }
Source:
private static < T extends org.ovirt.engine.core.common.businessentities.BusinessEntity < ? > > void updateAllInTransaction ( final java.lang.String procedureName , final java.util.Collection < T > entities , final org.ovirt.engine.core.dao.MassOperationsDao < T > dao ) { if ( ! ( entities.isEmpty ( ) ) ) { org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInScope ( TransactionScopeOption.Required , new org.ovirt.engine.core.utils.transaction.TransactionMethod < java.lang.Void > ( ) { @ java.lang.Override public java.lang.Void runInTransaction ( ) { dao.updateAll ( procedureName , entities ) ; return null ; } } ) ; } }

Target:
private static < T extends org.ovirt.engine.core.common.businessentities.BusinessEntity < ? > , ID extends java.io.Serializable > void updateAllInTransaction ( final java.lang.String procedureName , final java.util.Collection < T > entities , final org.ovirt.engine.core.dao.MassOperationsDao < T , ID > dao ) { if ( ! ( entities.isEmpty ( ) ) ) { org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInScope ( TransactionScopeOption.Required , new org.ovirt.engine.core.utils.transaction.TransactionMethod < java.lang.Void > ( ) { @ java.lang.Override public java.lang.Void runInTransaction ( ) { dao.updateAll ( procedureName , entities ) ; return null ; } } ) ; } }
Source:
public void schedulJobs ( ) { org.ovirt.engine.core.utils.timer.SchedulerUtil sched = org.ovirt.engine.core.utils.timer.SchedulerUtilQuartzImpl.getInstance ( ) ; duringFailureJobId = sched.scheduleAFixedDelayJob ( this , "OnVdsDuringFailureTimer" , new java.lang.Class [ 0 ] , new java.lang.Object [ 0 ] , org.ovirt.engine.core.vdsbroker.VdsManager.VDS_DURING_FAILURE_TIMEOUT_IN_MINUTES , org.ovirt.engine.core.vdsbroker.VdsManager.VDS_DURING_FAILURE_TIMEOUT_IN_MINUTES , java.util.concurrent.TimeUnit.MINUTES ) ; sched.pauseJob ( duringFailureJobId ) ; _refreshIteration = ( _numberRefreshesBeforeSave ) - 1 ; onTimerJobId = sched.scheduleAFixedDelayJob ( this , "OnTimer" , new java.lang.Class [ 0 ] , new java.lang.Object [ 0 ] , org.ovirt.engine.core.vdsbroker.VdsManager.VDS_REFRESH_RATE , org.ovirt.engine.core.vdsbroker.VdsManager.VDS_REFRESH_RATE , java.util.concurrent.TimeUnit.MILLISECONDS ) ; }

Target:
public void schedulJobs ( ) { org.ovirt.engine.core.utils.timer.SchedulerUtil sched = org.ovirt.engine.core.utils.timer.SchedulerUtilQuartzImpl.getInstance ( ) ; duringFailureJobId = sched.scheduleAFixedDelayJob ( this , "onVdsDuringFailureTimer" , new java.lang.Class [ 0 ] , new java.lang.Object [ 0 ] , org.ovirt.engine.core.vdsbroker.VdsManager.VDS_DURING_FAILURE_TIMEOUT_IN_MINUTES , org.ovirt.engine.core.vdsbroker.VdsManager.VDS_DURING_FAILURE_TIMEOUT_IN_MINUTES , java.util.concurrent.TimeUnit.MINUTES ) ; sched.pauseJob ( duringFailureJobId ) ; _refreshIteration = ( _numberRefreshesBeforeSave ) - 1 ; onTimerJobId = sched.scheduleAFixedDelayJob ( this , "onTimer" , new java.lang.Class [ 0 ] , new java.lang.Object [ 0 ] , org.ovirt.engine.core.vdsbroker.VdsManager.VDS_REFRESH_RATE , org.ovirt.engine.core.vdsbroker.VdsManager.VDS_REFRESH_RATE , java.util.concurrent.TimeUnit.MILLISECONDS ) ; }
Source:
public org.ovirt.engine.core.bll.ValidationResult protocolIsNotXmlrpc ( org.ovirt.engine.core.common.businessentities.VDSGroup cluster ) { return org.ovirt.engine.core.bll.ValidationResult.failWith ( EngineMessage.NOT_SUPPORTED_PROTOCOL_FOR_CLUSTER_VERSION ) . when ( ( ( VdsProtocol.XML.equals ( host.getProtocol ( ) ) ) && ( ( Version.v3_6.compareTo ( cluster.getCompatibilityVersion ( ) ) ) <= 0 ) ) ) ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult protocolIsNotXmlrpc ( org.ovirt.engine.core.common.businessentities.Cluster cluster ) { return org.ovirt.engine.core.bll.ValidationResult.failWith ( EngineMessage.NOT_SUPPORTED_PROTOCOL_FOR_CLUSTER_VERSION ) . when ( ( ( VdsProtocol.XML.equals ( host.getProtocol ( ) ) ) && ( ( Version.v3_6.compareTo ( cluster.getCompatibilityVersion ( ) ) ) <= 0 ) ) ) ; }
Source:
public static void initWindowsOsTypes ( ) { org.ovirt.engine.ui.frontend.AsyncQuery callback = new org.ovirt.engine.ui.frontend.AsyncQuery ( ) ; callback.asyncCallback = new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.windowsOsIds = ( ( java.util.ArrayList < java.lang.Integer > ) ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ) ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.OsRepository , new org.ovirt.engine.core.common.queries.OsQueryParameters ( org.ovirt.engine.core.common.queries.OsQueryParameters.OsRepositoryVerb.GetWindowsOss ) , callback ) ; }

Target:
private void initDisplayTypes ( ) { org.ovirt.engine.ui.frontend.AsyncQuery callback = new org.ovirt.engine.ui.frontend.AsyncQuery ( ) ; callback.asyncCallback = new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { graphicsAndDisplays = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.OsRepository , new org.ovirt.engine.core.common.queries.OsQueryParameters ( org.ovirt.engine.core.common.queries.OsQueryParameters.OsRepositoryVerb.GetDisplayTypes ) , callback ) ; }
Source:
protected void setRngDevice ( org.ovirt.engine.api.model.VmPool model ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmRngDevice > rngDevices = getEntity ( java.util.List.class , VdcQueryType.GetRngDevice , new org.ovirt.engine.core.common.queries.IdQueryParameters ( org.ovirt.engine.core.compat.Guid.createGuidFromString ( model.getId ( ) ) ) , "GetRngDevice" , true ) ; if ( ( rngDevices != null ) && ( ! ( rngDevices.isEmpty ( ) ) ) ) { model.setRngDevice ( org.ovirt.engine.api.restapi.types.RngDeviceMapper.map ( rngDevices.get ( 0 ) , null ) ) ; } }

Target:
protected void setRngDevice ( org.ovirt.engine.api.model.VmPool model ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmRngDevice > rngDevices = getEntity ( java.util.List.class , QueryType.GetRngDevice , new org.ovirt.engine.core.common.queries.IdQueryParameters ( org.ovirt.engine.core.compat.Guid.createGuidFromString ( model.getId ( ) ) ) , "GetRngDevice" , true ) ; if ( ( rngDevices != null ) && ( ! ( rngDevices.isEmpty ( ) ) ) ) { model.setRngDevice ( org.ovirt.engine.api.restapi.types.RngDeviceMapper.map ( rngDevices.get ( 0 ) , null ) ) ; } }
Source:
private static void SetVmTemplateStatus ( org.ovirt.engine.core.compat.Guid vmTemplateGuid , org.ovirt.engine.core.common.businessentities.VmTemplateStatus status , org.ovirt.engine.core.bll.context.CompensationContext compensationContext ) { org.ovirt.engine.core.common.businessentities.VmTemplate vmTemplate = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmTemplateDao ( ) . get ( vmTemplateGuid ) ; if ( vmTemplate != null ) { if ( compensationContext != null ) { compensationContext.snapshotEntityStatus ( vmTemplate ) ; } vmTemplate.setStatus ( status ) ; org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmTemplateDao ( ) . update ( vmTemplate ) ; } else { org.ovirt.engine.core.bll.VmTemplateHandler.log.warnFormat ( "VmTemplateHandler::SetVmTemplateStatus: vmTemplate is null, not setting status '{0}' to vmTemplate" , status ) ; } }

Target:
private static void setVmTemplateStatus ( org.ovirt.engine.core.compat.Guid vmTemplateGuid , org.ovirt.engine.core.common.businessentities.VmTemplateStatus status , org.ovirt.engine.core.bll.context.CompensationContext compensationContext ) { org.ovirt.engine.core.common.businessentities.VmTemplate vmTemplate = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmTemplateDao ( ) . get ( vmTemplateGuid ) ; if ( vmTemplate != null ) { if ( compensationContext != null ) { compensationContext.snapshotEntityStatus ( vmTemplate ) ; } vmTemplate.setStatus ( status ) ; org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmTemplateDao ( ) . update ( vmTemplate ) ; } else { org.ovirt.engine.core.bll.VmTemplateHandler.log.warnFormat ( "setVmTemplateStatus: vmTemplate is null, not setting status '{0}' to vmTemplate" , status ) ; } }
Source:
private void initDetachableFields ( ) { detachableModels = java.util.Arrays.asList ( new org.ovirt.engine.ui.uicommonweb.models.Model [ ] { model.getMemSize ( ) , model.getTotalCPUCores ( ) , model.getNumOfSockets ( ) , model.getCoresPerSocket ( ) , model.getIsHighlyAvailable ( ) , model.getMigrationMode ( ) , model.getOverrideMigrationDowntime ( ) , model.getMigrationDowntime ( ) , model.getPriority ( ) , model.getMinAllocatedMemory ( ) , model.getMemoryBalloonDeviceEnabled ( ) , model.getNumOfIoThreads ( ) , model.getIoThreadsEnabled ( ) } ) ; }

Target:
private void initDetachableFields ( ) { detachableModels = java.util.Arrays.asList ( model.getMemSize ( ) , model.getTotalCPUCores ( ) , model.getNumOfSockets ( ) , model.getCoresPerSocket ( ) , model.getThreadsPerCore ( ) , model.getIsHighlyAvailable ( ) , model.getMigrationMode ( ) , model.getOverrideMigrationDowntime ( ) , model.getMigrationDowntime ( ) , model.getPriority ( ) , model.getMinAllocatedMemory ( ) , model.getMemoryBalloonDeviceEnabled ( ) , model.getNumOfIoThreads ( ) , model.getIoThreadsEnabled ( ) ) ; }
Source:
private void restartVdsVms ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VM > vms = org.ovirt.engine.core.bll.VdsKdumpDetectionCommand.getVmDAO ( ) . getAllRunningForVds ( org.ovirt.engine.core.bll.VdsKdumpDetectionCommand.getVdsId ( ) ) ; if ( ! ( vms.isEmpty ( ) ) ) { org.ovirt.engine.core.bll.RestartVdsVmsOperation restartVmsOper = new org.ovirt.engine.core.bll.RestartVdsVmsOperation ( org.ovirt.engine.core.bll.VdsKdumpDetectionCommand.getExecutionContext ( ) , org.ovirt.engine.core.bll.VdsKdumpDetectionCommand.getVds ( ) ) ; restartVmsOper.restartVms ( vms ) ; org.ovirt.engine.core.bll.Backend.getInstance ( ) . getResourceManager ( ) . RunVdsCommand ( VDSCommandType.UpdateVdsVMsCleared , new org.ovirt.engine.core.common.vdscommands.UpdateVdsVMsClearedVDSCommandParameters ( org.ovirt.engine.core.bll.VdsKdumpDetectionCommand.getVds ( ) . getId ( ) ) ) ; } }

Target:
private void restartVdsVms ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VM > vms = org.ovirt.engine.core.bll.VdsKdumpDetectionCommand.getVmDAO ( ) . getAllRunningForVds ( org.ovirt.engine.core.bll.VdsKdumpDetectionCommand.getVdsId ( ) ) ; if ( ! ( vms.isEmpty ( ) ) ) { org.ovirt.engine.core.bll.RestartVdsVmsOperation restartVmsOper = new org.ovirt.engine.core.bll.RestartVdsVmsOperation ( org.ovirt.engine.core.bll.VdsKdumpDetectionCommand.getContext ( ) , org.ovirt.engine.core.bll.VdsKdumpDetectionCommand.getVds ( ) ) ; restartVmsOper.restartVms ( vms ) ; org.ovirt.engine.core.bll.Backend.getInstance ( ) . getResourceManager ( ) . RunVdsCommand ( VDSCommandType.UpdateVdsVMsCleared , new org.ovirt.engine.core.common.vdscommands.UpdateVdsVMsClearedVDSCommandParameters ( org.ovirt.engine.core.bll.VdsKdumpDetectionCommand.getVds ( ) . getId ( ) ) ) ; } }
Source:
public void IsSelectedChanged ( ) { if ( ( getParent ( ) ) != null ) { UpdateParentSelection ( ) ; } for ( org.ovirt.engine.ui.uicommonweb.models.common.SelectionTreeNodeModel child : getChildren ( ) ) { child.setIsSelectedNotificationPrevent ( true ) ; child.setIsSelectedNullable ( getIsSelectedNullable ( ) ) ; child.setIsSelectedNotificationPrevent ( false ) ; for ( org.ovirt.engine.ui.uicommonweb.models.common.SelectionTreeNodeModel grandChild : child.getChildren ( ) ) { grandChild.setIsSelectedNotificationPrevent ( true ) ; grandChild.setIsSelectedNullable ( getIsSelectedNullable ( ) ) ; grandChild.setIsSelectedNotificationPrevent ( false ) ; } } }

Target:
public void isSelectedChanged ( ) { if ( ( getParent ( ) ) != null ) { updateParentSelection ( ) ; } for ( org.ovirt.engine.ui.uicommonweb.models.common.SelectionTreeNodeModel child : getChildren ( ) ) { child.setIsSelectedNotificationPrevent ( true ) ; child.setIsSelectedNullable ( getIsSelectedNullable ( ) ) ; child.setIsSelectedNotificationPrevent ( false ) ; for ( org.ovirt.engine.ui.uicommonweb.models.common.SelectionTreeNodeModel grandChild : child.getChildren ( ) ) { grandChild.setIsSelectedNotificationPrevent ( true ) ; grandChild.setIsSelectedNullable ( getIsSelectedNullable ( ) ) ; grandChild.setIsSelectedNotificationPrevent ( false ) ; } } }
Source:
public void onError ( java.lang.String message ) { org.ovirt.engine.ui.webadmin.plugin.PluginManager.logger.severe ( ( ( ( ( ( "Exception caught while invoking event handler function [" + functionName ) + "] for plugin [" ) + ( plugin.getMetaData ( ) . getName ( ) ) ) + "]: " ) + message ) ) ; }

Target:
public void onError ( java.lang.String message ) { org.ovirt.engine.ui.webadmin.plugin.PluginManager.logger.severe ( ( ( ( ( ( "Exception caught while invoking event handler function [" + functionName ) + "] for plugin [" ) + pluginName ) + "]: " ) + message ) ) ; com.google.gwt.dom.client.Document.get ( ) . getBody ( ) . removeChild ( plugin.getIFrameElement ( ) ) ; plugin.markAsFailed ( ) ; org.ovirt.engine.ui.webadmin.plugin.PluginManager.logger.warning ( ( ( "Plugin [" + pluginName ) + "] removed from service due to failure" ) ) ; }
Source:
void addPropertyChangeEventHandler ( ) { propertyChangeListener = 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 ) { com.google.gwt.event.logical.shared.InitializeEvent.fire ( org.ovirt.engine.ui.common.widget.action.UiCommandButtonDefinition.this ) ; } } ; command.getPropertyChangedEvent ( ) . addListener ( propertyChangeListener ) ; }

Target:
void addPropertyChangeEventHandler ( ) { propertyChangeListener = new org.ovirt.engine.ui.uicompat.IEventListener < org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs > ( ) { @ java.lang.Override public void eventRaised ( org.ovirt.engine.ui.uicompat.Event < ? extends org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs > ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs args ) { com.google.gwt.event.logical.shared.InitializeEvent.fire ( org.ovirt.engine.ui.common.widget.action.UiCommandButtonDefinition.this ) ; } } ; command.getPropertyChangedEvent ( ) . addListener ( propertyChangeListener ) ; }
Source:
public static void setUpOsRepository ( ) { org.ovirt.engine.core.common.osinfo.OsRepository osRepository = org.mockito.Mockito.mock ( org.ovirt.engine.core.common.osinfo.OsRepository.class ) ; org.ovirt.engine.core.common.utils.SimpleDependencyInjector.getInstance ( ) . bind ( org.ovirt.engine.core.common.osinfo.OsRepository.class , osRepository ) ; org.mockito.Mockito.when ( osRepository.getVmWatchdogTypes ( org.mockito.Matchers.any ( java.lang.Integer.class ) , org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Version.class ) ) ) . thenReturn ( org.ovirt.engine.core.bll.UpdateWatchdogCommandTest.WATCHDOG_MODELS ) ; }

Target:
public static void setUpOsRepository ( ) { org.ovirt.engine.core.common.osinfo.OsRepository osRepository = org.mockito.Mockito.mock ( org.ovirt.engine.core.common.osinfo.OsRepository.class ) ; org.ovirt.engine.core.common.utils.SimpleDependencyInjector.getInstance ( ) . bind ( org.ovirt.engine.core.common.osinfo.OsRepository.class , osRepository ) ; org.mockito.Mockito.when ( osRepository.getVmWatchdogTypes ( org.mockito.ArgumentMatchers.anyInt ( ) , org.mockito.ArgumentMatchers.any ( ) ) ) . thenReturn ( org.ovirt.engine.core.bll.UpdateWatchdogCommandTest.WATCHDOG_MODELS ) ; }
Source:
public void testAddLunDiskMissingType ( ) { org.ovirt.engine.api.model.Disk model = createIscsiLunDisk ( ) ; model.getLunStorage ( ) . setType ( null ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; try { collection.add ( model ) ; fail ( "expected WebApplicationException on incomplete parameters" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyIncompleteException ( wae , "HostStorage" , "testAddLunDiskMissingType" , "type" ) ; } }

Target:
public void testAddLunDiskMissingType ( ) { org.ovirt.engine.api.model.Disk model = createIscsiLunDisk ( ) ; model.getLunStorage ( ) . setType ( null ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; try { collection.add ( model ) ; org.junit.Assert.fail ( "expected WebApplicationException on incomplete parameters" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyIncompleteException ( wae , "HostStorage" , "testAddLunDiskMissingType" , "type" ) ; } }
Source:
public void testStringSubstitutionWithList ( ) { org.ovirt.engine.core.common.interfaces.ErrorTranslator et = new org.ovirt.engine.core.utils.ErrorTranslatorImpl ( org.ovirt.engine.core.utils.ErrorTranslatorTest.FILENAME ) ; java.util.List < java.lang.String > error = et.TranslateErrorText ( java.util.Arrays.asList ( org.ovirt.engine.core.utils.ErrorTranslatorTest.TEST_KEY_WITH_REPLACEMENT , "$action SOMEACTION" , "$type SOME Type" ) ) ; java.lang.String result = "Cannot SOMEACTION SOME Type. VM's Image doesn't exist." ; org.junit.Assert.assertTrue ( "Size" , ( ( error.size ( ) ) == 1 ) ) ; org.junit.Assert.assertEquals ( "String should equal" , result , error.get ( 0 ) ) ; }

Target:
public void testStringSubstitutionWithList ( ) { org.ovirt.engine.core.common.interfaces.ErrorTranslator et = new org.ovirt.engine.core.utils.ErrorTranslatorImpl ( org.ovirt.engine.core.utils.ErrorTranslatorTest.FILENAME ) ; java.util.List < java.lang.String > error = et.translateErrorText ( java.util.Arrays.asList ( org.ovirt.engine.core.utils.ErrorTranslatorTest.TEST_KEY_WITH_REPLACEMENT , "$action SOMEACTION" , "$type SOME Type" ) ) ; java.lang.String result = "Cannot SOMEACTION SOME Type. VM's Image doesn't exist." ; org.junit.Assert.assertTrue ( "Size" , ( ( error.size ( ) ) == 1 ) ) ; org.junit.Assert.assertEquals ( "String should equal" , result , error.get ( 0 ) ) ; }
Source:
public void getStorageDomainDefaultWipeAfterDelete ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.common.businessentities.storage.StorageType storageType ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter < java.lang.Boolean > ( ) { @ java.lang.Override public java.lang.Boolean Convert ( java.lang.Object returnValue , org.ovirt.engine.ui.frontend.AsyncQuery asyncQuery ) { return ( ( java.lang.Boolean ) ( returnValue ) ) ; } } ; org.ovirt.engine.core.common.queries.GetStorageDomainDefaultWipeAfterDeleteParameters params = new org.ovirt.engine.core.common.queries.GetStorageDomainDefaultWipeAfterDeleteParameters ( storageType ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageDomainDefaultWipeAfterDelete , params , aQuery ) ; }

Target:
public java.util.ArrayList < java.util.Map.Entry < java.lang.String , org.ovirt.engine.ui.uicommonweb.models.EntityModel < java.lang.String > > > getBondingOptionList ( org.ovirt.engine.core.compat.RefObject < java.util.Map.Entry < java.lang.String , org.ovirt.engine.ui.uicommonweb.models.EntityModel < java.lang.String > > > defaultItem ) { return getBondingOptionListDependingOnNetwork ( defaultItem , false ) ; }
Source:
public void setVmIdOnVfs ( org.ovirt.engine.core.compat.Guid hostId , org.ovirt.engine.core.compat.Guid vmId , final java.util.Set < java.lang.String > vfsNames ) { java.util.List < org.ovirt.engine.core.common.businessentities.HostDevice > hostDevices = hostDeviceDao.getHostDevicesByHostId ( hostId ) ; java.util.List < org.ovirt.engine.core.common.businessentities.HostDevice > vfs = org.ovirt.engine.core.utils.linq.LinqUtils.filter ( hostDevices , new org.ovirt.engine.core.utils.linq.Predicate < org.ovirt.engine.core.common.businessentities.HostDevice > ( ) { @ java.lang.Override public boolean eval ( org.ovirt.engine.core.common.businessentities.HostDevice device ) { return vfsNames.contains ( device.getDeviceName ( ) ) ; } } ) ; for ( org.ovirt.engine.core.common.businessentities.HostDevice vf : vfs ) { vf.setVmId ( vmId ) ; } hostDeviceDao.updateAllInBatch ( vfs ) ; }

Target:
private void setVmIdOnVfsDevices ( org.ovirt.engine.core.compat.Guid hostId , org.ovirt.engine.core.compat.Guid vmId , java.util.Set < org.ovirt.engine.core.common.businessentities.HostDevice > vfs ) { for ( org.ovirt.engine.core.common.businessentities.HostDevice vf : vfs ) { hostDeviceDao.setVmIdOnHostDevice ( vf.getId ( ) , vmId ) ; } }
Source:
public static void GetSANWipeAfterDelete ( 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.SANWipeAfterDelete , org.ovirt.engine.core.common.config.Config.DefaultConfigurationVersion ) , aQuery ) ; }

Target:
public static void GetCustomPropertiesList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.HashMap < org.ovirt.engine.core.compat.Version , java.lang.String > ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVmCustomProperties , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }
Source:
public void validateIsoPrefixForOnlyIsoPrefixInKernelAndInitrd ( ) throws java.lang.Exception { java.lang.String initrd = org.ovirt.engine.core.bll.RunVmCommandTest.ISO_PREFIX ; java.lang.String kernelUrl = org.ovirt.engine.core.bll.RunVmCommandTest.ISO_PREFIX ; org.ovirt.engine.core.common.businessentities.VM vm = createVmForTesting ( initrd , kernelUrl ) ; org.junit.Assert.assertEquals ( vm.getinitrd_url ( ) , "" ) ; org.junit.Assert.assertEquals ( vm.getkernel_url ( ) , "" ) ; }

Target:
public void validateIsoPrefixForOnlyIsoPrefixInKernelAndInitrd ( ) throws java.lang.Exception { java.lang.String initrd = org.ovirt.engine.core.bll.RunVmCommandTest.ISO_PREFIX ; java.lang.String kernelUrl = org.ovirt.engine.core.bll.RunVmCommandTest.ISO_PREFIX ; org.ovirt.engine.core.common.businessentities.VM vm = createVmForTesting ( initrd , kernelUrl ) ; org.junit.Assert.assertEquals ( vm.getInitrdUrl ( ) , "" ) ; org.junit.Assert.assertEquals ( vm.getKernelUrl ( ) , "" ) ; }
Source:
public void edit ( final org.ovirt.engine.ui.uicommonweb.models.vms.VmInterfaceModel iface ) { driver.edit ( iface ) ; hideMacWhenNotEnabled ( iface ) ; }

Target:
public void edit ( final org.ovirt.engine.ui.uicommonweb.models.vms.VmInterfaceModel iface ) { driver.edit ( iface ) ; hideMacWhenNotEnabled ( iface ) ; iface.getMAC ( ) . getPropertyChangedEvent ( ) . 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 ) { if ( "IsAvailable" . equals ( ( ( org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ) ( args ) ) . PropertyName ) ) { hideMacWhenNotEnabled ( iface ) ; } } } ) ; }
Source:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { super . eventRaised ( ev , sender , args ) ; if ( ( ev.matchesDefinition ( ListModel.selectedItemChangedEventDefinition ) ) && ( sender == ( getExternalHostName ( ) ) ) ) { hostName_SelectedItemChanged ( ) ; } else if ( ( ev.matchesDefinition ( ListModel.selectedItemChangedEventDefinition ) ) && ( sender == ( getProviders ( ) ) ) ) { providers_SelectedItemChanged ( ) ; } }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object result ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ExternalHostGroup > hostGroups = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ExternalHostGroup > ) ( result ) ) ; org.ovirt.engine.ui.uicommonweb.models.ListModel externalHostGroupsListModel = getExternalHostGroups ( ) ; externalHostGroupsListModel.setItems ( hostGroups ) ; externalHostGroupsListModel.setIsChangable ( true ) ; }
Source:
public void testPersistNetworkAttachmentsWhenIpConfigurationChanged ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.NetworkAttachment networkAttachmentForClusterNetworkA = createNetworkAttachment ( clusterNetworkA ) ; networkAttachmentForClusterNetworkA.setNicId ( interfaceWithAttachedClusterNetworkA.getId ( ) ) ; org.ovirt.engine.core.common.businessentities.network.IpConfiguration ipConfiguration = org.ovirt.engine.core.utils.NetworkUtils.createIpConfigurationFromVdsNetworkInterface ( interfaceWithAttachedClusterNetworkA ) ; ipConfiguration.getIpv4PrimaryAddress ( ) . setAddress ( "192.168.1.11" ) ; networkAttachmentForClusterNetworkA.setIpConfiguration ( ipConfiguration ) ; networkAttachmentForClusterNetworkA.setProperties ( customPropertiesForNics.getCustomPropertiesFor ( interfaceWithAttachedClusterNetworkA ) ) ; callPersistNetworkAttachmentsAndVerifyThatNetworkAttachmentIsSynced ( networkAttachmentForClusterNetworkA , createLegacyPersister ( java.util.Collections.< org.ovirt.engine.core.common.businessentities.network.NetworkAttachment > emptyList ( ) ) ) ; }

Target:
private void assertNicIpConfiguration ( org.ovirt.engine.core.common.businessentities.network.IpConfiguration ipConfiguration , org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nic ) { assertNicIpv4Configuration ( ipConfiguration.getIpv4PrimaryAddress ( ) , nic ) ; assertNicIpv6Configuration ( ipConfiguration.getIpv6PrimaryAddress ( ) , nic ) ; }
Source:
protected java.lang.String getString ( final org.ovirt.engine.ui.common.utils.DynamicMessages.DynamicMessageKey key ) { try { if ( ( dictionary ) != null ) { return dictionary.get ( key.getValue ( ) ) ; } } catch ( java.util.MissingResourceException mre ) { } java.lang.String fallback = fallbackValues.get ( key ) ; if ( fallback == null ) { fallback = "" ; } return fallback ; }

Target:
protected java.lang.String getString ( final org.ovirt.engine.ui.common.utils.BaseDynamicMessages.DynamicMessageKey key ) { try { if ( ( dictionary ) != null ) { return dictionary.get ( key.getValue ( ) ) ; } } catch ( java.util.MissingResourceException mre ) { } java.lang.String fallback = fallbackValues.get ( key ) ; if ( fallback == null ) { fallback = "" ; } return fallback ; }
Source:
public void setUp ( ) { org.ovirt.engine.core.common.action.RemoveImageParameters params = new org.ovirt.engine.core.common.action.RemoveImageParameters ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) ) ; cmd = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.RemoveImageCommand < org.ovirt.engine.core.common.action.RemoveImageParameters > ( params ) { @ java.lang.Override protected void initImage ( ) { } @ java.lang.Override protected void initStoragePoolId ( ) { } @ java.lang.Override protected void initStorageDomainId ( ) { } @ java.lang.Override protected void initContainerDetails ( org.ovirt.engine.core.common.action.ImagesContainterParametersBase parameters ) { } } ) ; org.mockito.Mockito.doReturn ( snapshotDAO ) . when ( cmd ) . getSnapshotDao ( ) ; }

Target:
public void setUp ( ) { org.ovirt.engine.core.common.action.RemoveImageParameters params = new org.ovirt.engine.core.common.action.RemoveImageParameters ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; cmd = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.RemoveImageCommand < org.ovirt.engine.core.common.action.RemoveImageParameters > ( params ) { @ java.lang.Override protected void initImage ( ) { } @ java.lang.Override protected void initStoragePoolId ( ) { } @ java.lang.Override protected void initStorageDomainId ( ) { } @ java.lang.Override protected void initContainerDetails ( org.ovirt.engine.core.common.action.ImagesContainterParametersBase parameters ) { } } ) ; org.mockito.Mockito.doReturn ( snapshotDAO ) . when ( cmd ) . getSnapshotDao ( ) ; org.ovirt.engine.core.common.utils.SimpleDependecyInjector.getInstance ( ) . bind ( org.ovirt.engine.core.common.osinfo.OsRepository.class , osRepository ) ; }
Source:
public void testUpdateNotFound ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpEntityQueryExpectations ( VdcQueryType.GetAllDisksByVmId , org.ovirt.engine.core.common.queries.GetAllDisksByVmIdParameters.class , new java.lang.String [ ] { "VmId" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.AbstractBackendDisksResourceTest.PARENT_ID } , new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > ( ) ) ; control.replay ( ) ; try { resource.update ( getUpdate ( ) ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }

Target:
public void testUpdateNotFound ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpEntityQueryExpectations ( VdcQueryType.GetAllDisksByVmId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.AbstractBackendDisksResourceTest.PARENT_ID } , new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > ( ) ) ; control.replay ( ) ; try { resource.update ( getUpdate ( ) ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }
Source:
protected void readOsSection ( org.ovirt.engine.core.compat.backendcompat.XmlNode section ) { _vmTemplate.setId ( new org.ovirt.engine.core.compat.Guid ( section.Attributes.get ( "ovf:id" ) . getValue ( ) ) ) ; org.ovirt.engine.core.compat.backendcompat.XmlNode node = section.SelectSingleNode ( "Description" ) ; if ( node != null ) { _vmTemplate.setOsId ( osRepository.getOsIdByUniqueName ( node.InnerText ) ) ; } }

Target:
protected void readOsSection ( org.ovirt.engine.core.compat.backendcompat.XmlNode section ) { _vmTemplate.setId ( new org.ovirt.engine.core.compat.Guid ( section.attributes.get ( "ovf:id" ) . getValue ( ) ) ) ; org.ovirt.engine.core.compat.backendcompat.XmlNode node = section.SelectSingleNode ( "Description" ) ; if ( node != null ) { _vmTemplate.setOsId ( osRepository.getOsIdByUniqueName ( node.innerText ) ) ; } }
Source:
public org.ovirt.engine.api.model.Nics list ( ) { org.ovirt.engine.api.model.Nics nics = new org.ovirt.engine.api.model.Nics ( ) ; if ( parent.getSnapshot ( ) . isVmConfigurationAvailable ( ) ) { org.ovirt.engine.core.common.businessentities.VM vm = parent.collection.getVmPreview ( parent.get ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.VmNetworkInterface nic : vm.getInterfaces ( ) ) { nics.getNics ( ) . add ( org.ovirt.engine.api.restapi.types.NicMapper.map ( nic , null ) ) ; } } return nics ; }

Target:
public org.ovirt.engine.api.model.Nics list ( ) { org.ovirt.engine.api.model.Nics nics = new org.ovirt.engine.api.model.Nics ( ) ; if ( parent.getSnapshot ( ) . isVmConfigurationAvailable ( ) ) { org.ovirt.engine.core.common.businessentities.VM vm = parent.collection.getVmPreview ( parent.get ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface nic : vm.getInterfaces ( ) ) { nics.getNics ( ) . add ( org.ovirt.engine.api.restapi.types.NicMapper.map ( nic , null ) ) ; } } return nics ; }