auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public synchronized boolean HasTasksByStoragePoolId ( org.ovirt.engine.core.compat.Guid storagePoolID ) { boolean retVal = false ; if ( ( _tasks ) != null ) { for ( org.ovirt.engine.core.bll.SPMAsyncTask task : _tasks.values ( ) ) { if ( task.getStoragePoolID ( ) . equals ( storagePoolID ) ) { retVal = true ; break ; } } } return retVal ; }

Target:
public synchronized boolean hasTasksByStoragePoolId ( org.ovirt.engine.core.compat.Guid storagePoolID ) { boolean retVal = false ; if ( ( _tasks ) != null ) { for ( org.ovirt.engine.core.bll.SPMAsyncTask task : _tasks.values ( ) ) { if ( task.getStoragePoolID ( ) . equals ( storagePoolID ) ) { retVal = true ; break ; } } } return retVal ; }
Source:
public static void initOsArchitecture ( ) { 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.osArchitectures = ( ( java.util.HashMap < java.lang.Integer , org.ovirt.engine.core.common.businessentities.ArchitectureType > ) ( ( ( 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.GetOsArchitectures ) , callback ) ; }

Target:
public void initOsArchitecture ( ) { 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 ) { osArchitectures = ( ( 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.GetOsArchitectures ) , callback ) ; }
Source:
public void testBootProtocolSetForDisplayNetworkWhenNetworkIsNonDisplay ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.Network network = new org.ovirt.engine.core.common.businessentities.network.Network ( ) ; network.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; org.ovirt.engine.core.common.businessentities.network.NetworkAttachment attachment = createNetworkAttachmentWithIpConfiguration ( NetworkBootProtocol.NONE , null , null ) ; attachment.setNetworkId ( network.getId ( ) ) ; doTestBootProtocolSetForDisplayNetworkWhenNullValuedIpConfigurationAndWhenNetworkClusterDisplay ( false , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) , network , attachment ) ; }

Target:
public void testNicExistsWhenNicNameIsNotNull ( ) { org.ovirt.engine.core.common.businessentities.network.NetworkAttachment attachment = new org.ovirt.engine.core.common.businessentities.network.NetworkAttachment ( ) ; attachment.setNicId ( null ) ; attachment.setNicName ( "whatever" ) ; org.junit.Assert.assertThat ( createNetworkAttachmentValidator ( attachment ) . nicNameIsSet ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }
Source:
public void testIsUpdateable ( ) { org.ovirt.engine.core.utils.ObjectIdentityChecker oic = new org.ovirt.engine.core.utils.ObjectIdentityChecker ( org.ovirt.engine.core.utils.Jedi.class ) ; assertFalse ( "Should be false by default" , oic.IsFieldUpdatable ( "name" ) ) ; oic.AddPermittedFields ( "name" ) ; assertTrue ( "Should be true now" , oic.IsFieldUpdatable ( "name" ) ) ; }

Target:
public void testIsUpdateable ( ) { org.ovirt.engine.core.utils.ObjectIdentityChecker oic = new org.ovirt.engine.core.utils.ObjectIdentityChecker ( org.ovirt.engine.core.utils.Jedi.class ) ; org.junit.Assert.assertFalse ( "Should be false by default" , oic.IsFieldUpdatable ( "name" ) ) ; oic.AddPermittedFields ( "name" ) ; org.junit.Assert.assertTrue ( "Should be true now" , oic.IsFieldUpdatable ( "name" ) ) ; }
Source:
protected void ExecuteVdsBrokerCommand ( ) { result = org.ovirt.engine.core.vdsbroker.gluster.GetGlusterVolumeProfileInfoVDSCommand.getBroker ( ) . glusterVolumeProfileInfo ( org.ovirt.engine.core.vdsbroker.gluster.GetGlusterVolumeProfileInfoVDSCommand.getParameters ( ) . getClusterId ( ) , org.ovirt.engine.core.vdsbroker.gluster.GetGlusterVolumeProfileInfoVDSCommand.getParameters ( ) . getVolumeName ( ) ) ; org.ovirt.engine.core.vdsbroker.gluster.GetGlusterVolumeProfileInfoVDSCommand.proceedProxyReturnValue ( ) ; setReturnValue ( result.getGlusterVolumeProfileInfo ( ) ) ; }

Target:
protected void executeVdsBrokerCommand ( ) { result = org.ovirt.engine.core.vdsbroker.gluster.GetGlusterVolumeProfileInfoVDSCommand.getBroker ( ) . glusterVolumeProfileInfo ( org.ovirt.engine.core.vdsbroker.gluster.GetGlusterVolumeProfileInfoVDSCommand.getParameters ( ) . getClusterId ( ) , org.ovirt.engine.core.vdsbroker.gluster.GetGlusterVolumeProfileInfoVDSCommand.getParameters ( ) . getVolumeName ( ) ) ; org.ovirt.engine.core.vdsbroker.gluster.GetGlusterVolumeProfileInfoVDSCommand.proceedProxyReturnValue ( ) ; setReturnValue ( result.getGlusterVolumeProfileInfo ( ) ) ; }
Source:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; dao = dbFacade.getRoleDao ( ) ; existingRole = dao.get ( new org.ovirt.engine.core.compat.Guid ( "f5972bfa-7102-4d33-ad22-9dd421bfba78" ) ) ; newRole = new org.ovirt.engine.core.common.businessentities.Role ( ) ; newRole.setname ( "new role" ) ; newRole.setdescription ( "This is a new role." ) ; newRole.setType ( RoleType.USER ) ; newRole.setAllowsViewingChildren ( false ) ; newRole.setAppMode ( ApplicationMode.AllModes ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; dao = dbFacade.getRoleDao ( ) ; existingRole = dao.get ( new org.ovirt.engine.core.compat.Guid ( "f5972bfa-7102-4d33-ad22-9dd421bfba78" ) ) ; newRole = new org.ovirt.engine.core.common.businessentities.Role ( ) ; newRole.setName ( "new role" ) ; newRole.setDescription ( "This is a new role." ) ; newRole.setType ( RoleType.USER ) ; newRole.setAllowsViewingChildren ( false ) ; newRole.setAppMode ( ApplicationMode.AllModes ) ; }
Source:
protected void setUpQueryExpectations ( java.lang.String query , java.lang.Object failure ) { org.junit.Assert.assertEquals ( "" , query ) ; setUpEntityQueryExpectations ( QueryType.GetStorageDomainsByStoragePoolId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ ( ( NAMES.length ) - 1 ) ] } , setUpStorageDomains ( ) , failure ) ; }

Target:
protected void setUpQueryExpectations ( java.lang.String query , java.lang.Object failure ) { org.junit.jupiter.api.Assertions.assertEquals ( "" , query ) ; setUpEntityQueryExpectations ( QueryType.GetStorageDomainsByStoragePoolId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ ( ( NAMES.length ) - 1 ) ] } , setUpStorageDomains ( ) , failure ) ; }
Source:
private boolean validateAttachment ( ) { org.ovirt.engine.core.bll.network.cluster.NetworkClusterValidator validator = new org.ovirt.engine.core.bll.network.cluster.NetworkClusterValidator ( getNetworkCluster ( ) , org.ovirt.engine.core.bll.network.cluster.AttachNetworkToVdsGroupCommand.getVdsGroup ( ) . getcompatibility_version ( ) ) ; return ( ( ( ! ( org.ovirt.engine.core.utils.NetworkUtils.isManagementNetwork ( getNetwork ( ) ) ) ) || ( validate ( validator.managementNetworkAttachment ( getNetworkName ( ) ) ) ) ) && ( validate ( validator.migrationPropertySupported ( getNetworkName ( ) ) ) ) ) && ( ( ( getPersistedNetwork ( ) . getProvidedBy ( ) ) == null ) || ( validateExternalNetwork ( validator ) ) ) ; }

Target:
private boolean validateAttachment ( ) { org.ovirt.engine.core.bll.network.cluster.NetworkClusterValidator validator = new org.ovirt.engine.core.bll.network.cluster.NetworkClusterValidator ( getNetworkCluster ( ) , org.ovirt.engine.core.bll.network.cluster.AttachNetworkToVdsGroupCommand.getVdsGroup ( ) . getcompatibility_version ( ) ) ; return ( ( ( ! ( org.ovirt.engine.core.utils.NetworkUtils.isManagementNetwork ( getNetwork ( ) ) ) ) || ( validate ( validator.managementNetworkAttachment ( getNetworkName ( ) ) ) ) ) && ( validate ( validator.migrationPropertySupported ( getNetworkName ( ) ) ) ) ) && ( ( ! ( getPersistedNetwork ( ) . isExternal ( ) ) ) || ( validateExternalNetwork ( validator ) ) ) ; }
Source:
public void updateSubnetTabValidity ( boolean isValid ) { if ( isValid ) { subnetTab.markAsValid ( ) ; } else { subnetTab.markAsInvalid ( null ) ; } }

Target:
protected void populateTabMap ( ) { org.ovirt.engine.ui.webadmin.section.main.view.popup.AbstractNetworkPopupView.getTabNameMapping ( ) . put ( TabName.GENERAL_TAB , this . generalTab ) ; org.ovirt.engine.ui.webadmin.section.main.view.popup.AbstractNetworkPopupView.getTabNameMapping ( ) . put ( TabName.CLUSTERS_TAB , this . clusterTab ) ; org.ovirt.engine.ui.webadmin.section.main.view.popup.AbstractNetworkPopupView.getTabNameMapping ( ) . put ( TabName.PROFILES_TAB , this . profilesTab ) ; org.ovirt.engine.ui.webadmin.section.main.view.popup.AbstractNetworkPopupView.getTabNameMapping ( ) . put ( TabName.SUBNET_TAB , this . subnetTab ) ; }
Source:
public boolean isWanOptionsAvailable ( org.ovirt.engine.ui.uicommonweb.models.HasConsoleModel model ) { boolean spiceAvailable = ( model.getDefaultConsoleModel ( ) ) instanceof org.ovirt.engine.ui.uicommonweb.models.vms.SpiceConsoleModel ; boolean isWindowsVm = model.getVM ( ) . getOs ( ) . isWindows ( ) ; boolean spiceGuestAgentInstalled = ( model.getVM ( ) . getSpiceDriverVersion ( ) ) != null ; return ( spiceAvailable && isWindowsVm ) && spiceGuestAgentInstalled ; }

Target:
public boolean isWanOptionsAvailable ( org.ovirt.engine.ui.uicommonweb.models.HasConsoleModel model ) { boolean spiceAvailable = ( model.getDefaultConsoleModel ( ) ) instanceof org.ovirt.engine.ui.uicommonweb.models.vms.SpiceConsoleModel ; boolean isWindowsVm = org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.isWindowsOsType ( model.getVM ( ) . getOs ( ) ) ; boolean spiceGuestAgentInstalled = ( model.getVM ( ) . getSpiceDriverVersion ( ) ) != null ; return ( spiceAvailable && isWindowsVm ) && spiceGuestAgentInstalled ; }
Source:
public void update ( org.ovirt.engine.core.common.businessentities.Role role ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) . addValue ( "description" , role.getdescription ( ) ) . addValue ( "id" , role.getId ( ) ) . addValue ( "name" , role.getname ( ) ) . addValue ( "is_readonly" , role.getis_readonly ( ) ) . addValue ( "role_type" , role.getType ( ) . getId ( ) ) . addValue ( "allows_viewing_children" , role.allowsViewingChildren ( ) ) ; getCallsHandler ( ) . executeModification ( "UpdateRole" , parameterSource ) ; }

Target:
public void update ( org.ovirt.engine.core.common.businessentities.Role role ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) . addValue ( "description" , role.getDescription ( ) ) . addValue ( "id" , role.getId ( ) ) . addValue ( "name" , role.getName ( ) ) . addValue ( "is_readonly" , role.isReadonly ( ) ) . addValue ( "role_type" , role.getType ( ) . getId ( ) ) . addValue ( "allows_viewing_children" , role.allowsViewingChildren ( ) ) ; getCallsHandler ( ) . executeModification ( "UpdateRole" , parameterSource ) ; }
Source:
public boolean isStartupTimeoutPassed ( java.util.List < java.lang.String > messages ) { java.util.Date waitTo = getBackend ( ) . getStartedAt ( ) . addSeconds ( ( ( java.lang.Integer ) ( org.ovirt.engine.core.common.config.Config.getValue ( ConfigValues.DisableFenceAtStartupInSec ) ) ) ) ; java.util.Date now = new java.util.Date ( ) ; if ( ! ( ( waitTo.before ( now ) ) || ( waitTo.equals ( now ) ) ) ) { messages.add ( EngineMessage.VDS_FENCE_DISABLED_AT_SYSTEM_STARTUP_INTERVAL.name ( ) ) ; return false ; } else { return true ; } }

Target:
public boolean isStartupTimeoutPassed ( java.util.List < java.lang.String > messages ) { boolean startupTimeoutPassed = isStartupTimeoutPassed ( ) ; if ( ! startupTimeoutPassed ) { messages.add ( EngineMessage.VDS_FENCE_DISABLED_AT_SYSTEM_STARTUP_INTERVAL.name ( ) ) ; } return startupTimeoutPassed ; }
Source:
public void run ( ) { if ( firstRun ) { firstRun = false ; startSliding ( true , false ) ; } if ( shiftRight ) { setCurrentValue ( ( ( curValue ) + ( ( multiplier ) * ( stepSize ) ) ) ) ; } else { setCurrentValue ( ( ( curValue ) - ( ( multiplier ) * ( stepSize ) ) ) ) ; } schedule ( repeatDelay ) ; }

Target:
public void run ( ) { if ( firstRun ) { firstRun = false ; startSliding ( true , false ) ; } if ( shiftRight ) { setCurrentValue ( ( ( curValue ) + ( ( multiplier ) * ( stepSize ) ) ) ) ; } else { setCurrentValue ( ( ( curValue ) - ( ( multiplier ) * ( stepSize ) ) ) ) ; } schedule ( org.ovirt.engine.ui.common.widget.SliderBar.KeyTimer.repeatDelay ) ; }
Source:
private void applyNetworkChangesToHosts ( ) { org.ovirt.engine.core.bll.network.dc.UpdateNetworkCommand < T > . SyncNetworkParametersBuilder builder = new SyncNetworkParametersBuilder ( org.ovirt.engine.core.bll.network.dc.UpdateNetworkCommand.getContext ( ) ) ; java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > parameters = builder.buildParameters ( org.ovirt.engine.core.bll.network.dc.UpdateNetworkCommand.getNetwork ( ) , getOldNetwork ( ) ) ; if ( ! ( parameters.isEmpty ( ) ) ) { org.ovirt.engine.core.bll.network.NetworkParametersBuilder.updateParametersSequencing ( parameters ) ; runInternalMultipleActions ( VdcActionType.PersistentSetupNetworks , parameters ) ; } }

Target:
private void applyNetworkChangesToHosts ( ) { java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > parameters = syncNetworkParametersBuilder.buildParameters ( org.ovirt.engine.core.bll.network.dc.UpdateNetworkCommand.getNetwork ( ) , getOldNetwork ( ) ) ; if ( ! ( parameters.isEmpty ( ) ) ) { org.ovirt.engine.core.bll.network.HostSetupNetworksParametersBuilder.updateParametersSequencing ( parameters ) ; runInternalMultipleActions ( VdcActionType.PersistentHostSetupNetworks , parameters ) ; } }
Source:
public 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.getInstance ( ) . runQuery ( VdcQueryType.GetStorageDomainById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( storageDomainId ) , aQuery ) ; }

Target:
public void getRoleList ( 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.ArrayList < org.ovirt.engine.core.common.businessentities.Role > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Role > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllRoles , new org.ovirt.engine.core.common.queries.MultilevelAdministrationsQueriesParameters ( ) , aQuery ) ; }
Source:
public void guestLogoutTimeTreatmentAfterDestroy ( ) { if ( ( ( getguest_last_login_time ( ) ) != null ) && ( ( ( getguest_last_logout_time ( ) ) == null ) || ( ( getguest_last_login_time ( ) . compareTo ( getguest_last_logout_time ( ) ) ) > 0 ) ) ) { setguest_last_logout_time ( new java.util.Date ( ) ) ; } }

Target:
public org.ovirt.engine.core.common.businessentities.VmStatic getStaticData ( ) { return vmStatic ; }
Source:
private java.lang.Object getStorageDomains ( ) { java.util.List < org.ovirt.engine.api.model.StorageDomain > sds = new java.util.LinkedList < org.ovirt.engine.api.model.StorageDomain > ( ) ; org.ovirt.engine.api.model.StorageDomain sd = new org.ovirt.engine.api.model.StorageDomain ( ) ; sd.setStorageName ( "Storage_Domain_1" ) ; sd.setId ( GUIDS [ 2 ] ) ; sds.add ( sd ) ; return sds ; }

Target:
private org.ovirt.engine.api.model.StorageDomain getStorageDomain ( org.ovirt.engine.core.compat.Guid guid ) { org.ovirt.engine.api.model.StorageDomain sd = new org.ovirt.engine.api.model.StorageDomain ( ) ; sd.setStorageName ( "Storage_Domain_1" ) ; sd.setId ( guid ) ; return sd ; }
Source:
private void logGeoRepMessage ( org.ovirt.engine.core.common.AuditLogType logType , org.ovirt.engine.core.compat.Guid clusterId , final org.ovirt.engine.core.common.businessentities.gluster.GlusterGeoRepSession session ) { logUtil.logAuditMessage ( clusterId , null , null , logType , new java.util.HashMap < java.lang.String , java.lang.String > ( ) { { put ( GlusterConstants.VOLUME_NAME , session.getMasterVolumeName ( ) ) ; put ( "geoRepSessionKey" , session.getSessionKey ( ) ) ; } } ) ; }

Target:
public org.ovirt.engine.core.common.businessentities.gluster.GlusterGeoRepSession call ( ) throws java.lang.Exception { geoRepSession.setSessionDetails ( ( ( java.util.ArrayList ) ( getSessionDetailFromCLI ( cluster , geoRepSession ) ) ) ) ; return geoRepSession ; }
Source:
protected boolean checkSingleQxlDisplay ( ) { if ( ! ( org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . getVmStaticData ( ) . getSingleQxlPci ( ) ) ) { return true ; } return org.ovirt.engine.core.bll.VmHandler.isSingleQxlDeviceLegal ( org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . getVm ( ) . getDefaultDisplayType ( ) , org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . getVm ( ) . getOs ( ) , org.ovirt.engine.core.bll.AddVmCommand.getReturnValue ( ) . getValidationMessages ( ) , org.ovirt.engine.core.bll.AddVmCommand.getEffectiveCompatibilityVersion ( ) ) ; }

Target:
protected boolean checkSingleQxlDisplay ( ) { if ( ! ( org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . getVmStaticData ( ) . getSingleQxlPci ( ) ) ) { return true ; } return org.ovirt.engine.core.bll.VmHandler.isSingleQxlDeviceLegal ( org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . getVm ( ) . getDefaultDisplayType ( ) , org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . getVm ( ) . getOs ( ) , org.ovirt.engine.core.bll.AddVmCommand.getReturnValue ( ) . getCanDoActionMessages ( ) , org.ovirt.engine.core.bll.AddVmCommand.getVdsGroup ( ) . getCompatibilityVersion ( ) ) ; }
Source:
public static void getGlusterHooks ( 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 != null ? source : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetGlusterHooks , new org.ovirt.engine.core.common.queries.gluster.GlusterParameters ( clusterId ) , aQuery ) ; }

Target:
public static void getAllAttachableDisks ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.compat.Guid vmId ) { 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.Disk > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ( ) ; } } ; org.ovirt.engine.core.common.queries.GetAllAttachableDisks params = new org.ovirt.engine.core.common.queries.GetAllAttachableDisks ( storagePoolId ) ; params.setVmId ( vmId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllAttachableDisks , params , aQuery ) ; }
Source:
public void nameInUse ( ) { org.mockito.Mockito.when ( oldHost.getName ( ) ) . thenReturn ( generateRandomName ( ) ) ; org.mockito.Mockito.when ( host.getName ( ) ) . thenReturn ( generateRandomName ( ) ) ; org.mockito.Mockito.when ( hostDao.getByName ( org.mockito.ArgumentMatchers.any ( ) ) ) . thenReturn ( org.mockito.Mockito.mock ( org.ovirt.engine.core.common.businessentities.VDS.class ) ) ; org.junit.Assert.assertThat ( validator.nameNotUsed ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.ACTION_TYPE_FAILED_NAME_ALREADY_USED ) ) ; }

Target:
public void nameInUse ( ) { org.mockito.Mockito.when ( oldHost.getName ( ) ) . thenReturn ( generateRandomName ( ) ) ; org.mockito.Mockito.when ( host.getName ( ) ) . thenReturn ( generateRandomName ( ) ) ; org.mockito.Mockito.when ( hostDao.getByName ( org.mockito.ArgumentMatchers.any ( ) ) ) . thenReturn ( org.mockito.Mockito.mock ( org.ovirt.engine.core.common.businessentities.VDS.class ) ) ; org.hamcrest.MatcherAssert.assertThat ( validator.nameNotUsed ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.ACTION_TYPE_FAILED_NAME_ALREADY_USED ) ) ; }
Source:
protected void mockBackendStatusChange ( T cmd , boolean succeeded , org.ovirt.engine.core.common.errors.EngineError errorCode ) { org.mockito.Mockito.doReturn ( backend ) . when ( cmd ) . getBackend ( ) ; org.ovirt.engine.core.common.vdscommands.VDSReturnValue vdsReturnValue = new org.ovirt.engine.core.common.vdscommands.VDSReturnValue ( ) ; vdsReturnValue.setReturnValue ( succeeded ) ; vdsReturnValue.setSucceeded ( succeeded ) ; if ( ! succeeded ) { vdsReturnValue.setVdsError ( new org.ovirt.engine.core.common.errors.VDSError ( errorCode , "" ) ) ; } org.mockito.Mockito.when ( vdsBrokerFrontend.RunVdsCommand ( org.ovirt.engine.core.bll.gluster.GlusterHookCommandTest.any ( org.ovirt.engine.core.common.vdscommands.VDSCommandType.class ) , org.ovirt.engine.core.bll.gluster.GlusterHookCommandTest.any ( org.ovirt.engine.core.common.vdscommands.VDSParametersBase.class ) ) ) . thenReturn ( vdsReturnValue ) ; }

Target:
protected void mockBackendStatusChange ( T cmd , boolean succeeded , org.ovirt.engine.core.common.errors.EngineError errorCode ) { org.mockito.Mockito.doReturn ( backend ) . when ( cmd ) . getBackend ( ) ; org.ovirt.engine.core.common.vdscommands.VDSReturnValue vdsReturnValue = new org.ovirt.engine.core.common.vdscommands.VDSReturnValue ( ) ; vdsReturnValue.setReturnValue ( succeeded ) ; vdsReturnValue.setSucceeded ( succeeded ) ; if ( ! succeeded ) { vdsReturnValue.setVdsError ( new org.ovirt.engine.core.common.errors.VDSError ( errorCode , "" ) ) ; } org.mockito.Mockito.when ( vdsBrokerFrontend.runVdsCommand ( org.ovirt.engine.core.bll.gluster.GlusterHookCommandTest.any ( org.ovirt.engine.core.common.vdscommands.VDSCommandType.class ) , org.ovirt.engine.core.bll.gluster.GlusterHookCommandTest.any ( org.ovirt.engine.core.common.vdscommands.VDSParametersBase.class ) ) ) . thenReturn ( vdsReturnValue ) ; }
Source:
public void checkClear ( ) { org.junit.Assert.assertTrue ( lockManager.acquireLock ( lockLock1 ) . getFirst ( ) ) ; org.junit.Assert.assertTrue ( lockManager.acquireLock ( lockLock2 ) . getFirst ( ) ) ; lockManager.clear ( ) ; org.junit.Assert.assertTrue ( lockManager.acquireLock ( lockLock1 ) . getFirst ( ) ) ; org.junit.Assert.assertTrue ( lockManager.acquireLock ( lockLock2 ) . getFirst ( ) ) ; lockManager.clear ( ) ; }

Target:
public void checkClear ( ) { org.junit.jupiter.api.Assertions.assertTrue ( lockManager.acquireLock ( lockLock1 ) . getFirst ( ) ) ; org.junit.jupiter.api.Assertions.assertTrue ( lockManager.acquireLock ( lockLock2 ) . getFirst ( ) ) ; lockManager.clear ( ) ; org.junit.jupiter.api.Assertions.assertTrue ( lockManager.acquireLock ( lockLock1 ) . getFirst ( ) ) ; org.junit.jupiter.api.Assertions.assertTrue ( lockManager.acquireLock ( lockLock2 ) . getFirst ( ) ) ; lockManager.clear ( ) ; }
Source:
protected void readOsSection ( org.ovirt.engine.core.compat.backendcompat.XmlNode section ) { _vm.getStaticData ( ) . 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 ) { _vm.getStaticData ( ) . setOsId ( osRepository.getOsIdByUniqueName ( node.InnerText ) ) ; } }

Target:
protected void readOsSection ( org.ovirt.engine.core.compat.backendcompat.XmlNode section ) { _vm.getStaticData ( ) . 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 ) { int osId = osRepository.getOsIdByUniqueName ( node.innerText ) ; _vm.getStaticData ( ) . setOsId ( osId ) ; _vm.setClusterArch ( osRepository.getArchitectureFromOS ( osId ) ) ; } else { _vm.setClusterArch ( ArchitectureType.undefined ) ; } }
Source:
public static java.lang.String getJsonDiskDescription ( java.lang.String diskAlias , java.lang.String diskDescription ) throws java.io.IOException { java.util.Map < java.lang.String , java.lang.Object > description = new java.util.TreeMap < > ( ) ; description.put ( org.ovirt.engine.core.bll.ImagesHandler.DISK_ALIAS , diskAlias ) ; description.put ( org.ovirt.engine.core.bll.ImagesHandler.DISK_DESCRIPTION , ( diskDescription != null ? diskDescription : "" ) ) ; return org.ovirt.engine.core.utils.JsonHelper.mapToJson ( description , false ) ; }

Target:
public static java.lang.String getJsonDiskDescription ( org.ovirt.engine.core.common.businessentities.storage.Disk disk ) throws java.io.IOException { java.util.Map < java.lang.String , java.lang.Object > description = new java.util.TreeMap < > ( ) ; description.put ( org.ovirt.engine.core.bll.ImagesHandler.DISK_ALIAS , disk.getDiskAlias ( ) ) ; description.put ( org.ovirt.engine.core.bll.ImagesHandler.DISK_DESCRIPTION , ( ( disk.getDiskDescription ( ) ) != null ? disk.getDiskDescription ( ) : "" ) ) ; return org.ovirt.engine.core.utils.JsonHelper.mapToJson ( description , false ) ; }
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 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 testChangeClusterForbidden ( ) { prepareVmToPassCanDoAction ( ) ; vmStatic.setVdsGroupId ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) ) ; junit.framework.Assert.assertFalse ( "canDoAction should have failed with cant change cluster." , command.canDoAction ( ) ) ; assertCanDoActionMessage ( VdcBllMessages.VM_CANNOT_UPDATE_CLUSTER ) ; }

Target:
public void testValidDedicatedHost ( ) { prepareVmToPassCanDoAction ( ) ; org.ovirt.engine.core.common.businessentities.VDS vds = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; vds.setVdsGroupId ( group.getId ( ) ) ; org.mockito.Mockito.doReturn ( vdsDAO ) . when ( command ) . getVdsDAO ( ) ; org.mockito.Mockito.when ( vdsDAO.get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( vds ) ; vmStatic.setDedicatedVmForVds ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; junit.framework.Assert.assertTrue ( "canDoAction should have passed." , command.canDoAction ( ) ) ; }
Source:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.storage.StorageListModel storageListModel = ( ( org.ovirt.engine.ui.uicommonweb.models.storage.StorageListModel ) ( target ) ) ; java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > storages = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ) ( returnValue ) ) ; if ( ( storages != null ) && ( ( storages.size ( ) ) > 0 ) ) { handleDomainAlreadyExists ( storageListModel , storages ) ; } else { storageListModel.saveNewPosixStorage ( ) ; } }

Target:
public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { org.ovirt.engine.ui.uicommonweb.models.storage.StorageListModel storageListModel = ( ( org.ovirt.engine.ui.uicommonweb.models.storage.StorageListModel ) ( result.getState ( ) ) ) ; cleanConnection ( storageListModel.fileConnection , storageListModel.hostId ) ; storageListModel.fileConnection = null ; }
Source:
protected void updateUserCdImage ( org.ovirt.engine.core.compat.Guid storagePoolId ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getIrsImageList ( new org.ovirt.engine.ui.frontend.AsyncQuery ( getModel ( ) , new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel ) ( target ) ) ; java.util.List < java.lang.String > images = ( ( java.util.List < java.lang.String > ) ( returnValue ) ) ; setImagesToModel ( model , images ) ; } } ) , storagePoolId ) ; }

Target:
protected void baseTemplateSelectedItemChanged ( ) { org.ovirt.engine.core.common.businessentities.VmTemplate baseTemplate = getModel ( ) . getBaseTemplate ( ) . getSelectedItem ( ) ; if ( baseTemplate != null ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmTemplate > subVersions = baseTemplateToSubTemplates.get ( baseTemplate.getId ( ) ) ; getModel ( ) . getTemplate ( ) . setItems ( new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmTemplate > ( subVersions ) ) ; getModel ( ) . getTemplate ( ) . setSelectedItem ( subVersions.get ( 1 ) ) ; } }
Source:
public javax.ws.rs.core.Response add ( org.ovirt.engine.api.model.StorageConnectionExtension storageConnectionExtension ) { org.ovirt.engine.core.common.businessentities.storage.StorageServerConnectionExtension connExt = org.ovirt.engine.api.restapi.types.StorageServerConnectionExtensionMapper.map ( storageConnectionExtension , null ) ; connExt.setHostId ( hostId ) ; org.ovirt.engine.core.common.action.StorageServerConnectionExtensionParameters params = new org.ovirt.engine.core.common.action.StorageServerConnectionExtensionParameters ( connExt ) ; return performCreate ( VdcActionType.AddStorageServerConnectionExtension , params , new org.ovirt.engine.api.restapi.resource.QueryIdResolver < org.ovirt.engine.core.compat.Guid > ( org.ovirt.engine.core.common.queries.VdcQueryType.GetStorageServerConnectionExtensionById , org.ovirt.engine.core.common.queries.IdQueryParameters.class ) ) ; }

Target:
public javax.ws.rs.core.Response add ( org.ovirt.engine.api.model.StorageConnectionExtension storageConnectionExtension ) { org.ovirt.engine.core.common.businessentities.storage.StorageServerConnectionExtension connExt = org.ovirt.engine.api.restapi.types.StorageServerConnectionExtensionMapper.map ( storageConnectionExtension , null ) ; connExt.setHostId ( hostId ) ; org.ovirt.engine.core.common.action.StorageServerConnectionExtensionParameters params = new org.ovirt.engine.core.common.action.StorageServerConnectionExtensionParameters ( connExt ) ; return performCreate ( ActionType.AddStorageServerConnectionExtension , params , new org.ovirt.engine.api.restapi.resource.QueryIdResolver < org.ovirt.engine.core.compat.Guid > ( org.ovirt.engine.core.common.queries.VdcQueryType.GetStorageServerConnectionExtensionById , org.ovirt.engine.core.common.queries.IdQueryParameters.class ) ) ; }
Source:
public java.util.Set < org.ovirt.engine.core.common.businessentities.GraphicsType > graphicsTypesToBeSet ( ) { java.util.HashSet < org.ovirt.engine.core.common.businessentities.GraphicsType > result = new java.util.HashSet < org.ovirt.engine.core.common.businessentities.GraphicsType > ( ) ; for ( org.ovirt.engine.core.common.businessentities.GraphicsType graphicsType : org.ovirt.engine.core.common.businessentities.GraphicsType.values ( ) ) { if ( ( graphicsDevices.get ( graphicsType ) ) != null ) { result.add ( graphicsType ) ; } } return result ; }

Target:
public org.ovirt.engine.core.compat.Guid getCpuProfileId ( ) { return cpuProfileId ; }
Source:
public void testCommandClassExistance ( ) { java.util.List < org.ovirt.engine.core.common.action.VdcActionType > missingCommands = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.core.common.action.VdcActionType vat : org.ovirt.engine.core.common.action.VdcActionType.values ( ) ) { if ( vat != ( org.ovirt.engine.core.common.action.VdcActionType.Unknown ) ) { if ( ( org.ovirt.engine.core.bll.CommandsFactory.getCommandClass ( vat.name ( ) ) ) == null ) { missingCommands.add ( vat ) ; } } } org.junit.Assert.assertTrue ( ( "VdcActionType contains the following values that does not correspond to an existing command class: " + missingCommands ) , missingCommands.isEmpty ( ) ) ; }

Target:
public void testCommandClassExistence ( ) { java.util.List < org.ovirt.engine.core.common.action.VdcActionType > missingCommands = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.core.common.action.VdcActionType vat : org.ovirt.engine.core.common.action.VdcActionType.values ( ) ) { if ( vat != ( org.ovirt.engine.core.common.action.VdcActionType.Unknown ) ) { if ( ( org.ovirt.engine.core.bll.CommandsFactory.getCommandClass ( vat.name ( ) ) ) == null ) { missingCommands.add ( vat ) ; } } } org.junit.Assert.assertTrue ( ( "VdcActionType contains the following values that does not correspond to an existing command class: " + missingCommands ) , missingCommands.isEmpty ( ) ) ; }
Source:
public void testList_LimitResults_BadFormat ( ) throws java.lang.Exception { javax.ws.rs.core.UriInfo uriInfo = setUpUriExpectationsWithMax ( true ) ; setUpEntityQueryExpectations ( VdcQueryType.GetAllTags , org.ovirt.engine.core.common.queries.VdcQueryParametersBase.class , new java.lang.String [ ] { } , new java.lang.Object [ ] { } , org.ovirt.engine.api.restapi.resource.BackendTagsResourceTest.setUpTags ( ) , null ) ; control.replay ( ) ; collection.setUriInfo ( uriInfo ) ; getCollection ( ) ; fail ( "Expected WebFaultException" ) ; }

Target:
public void testListLimitResultsBadFormat ( ) throws java.lang.Exception { javax.ws.rs.core.UriInfo uriInfo = setUpUriExpectationsWithMax ( true ) ; setUpEntityQueryExpectations ( VdcQueryType.GetAllTags , org.ovirt.engine.core.common.queries.VdcQueryParametersBase.class , new java.lang.String [ ] { } , new java.lang.Object [ ] { } , org.ovirt.engine.api.restapi.resource.BackendTagsResourceTest.setUpTags ( ) , null ) ; control.replay ( ) ; collection.setUriInfo ( uriInfo ) ; getCollection ( ) ; fail ( "Expected WebFaultException" ) ; }
Source:
public static java.util.List < org.ovirt.engine.api.extensions.ExtMap > findGroupRecordsByIds ( final org.ovirt.engine.core.extensions.mgr.ExtensionProxy extension , final java.lang.String namespace , final java.util.List < java.lang.String > ids , final boolean groupsResolving , final boolean groupsResolvingRecursive ) { java.util.List < org.ovirt.engine.api.extensions.ExtMap > results = new java.util.ArrayList < > ( ) ; for ( java.util.List < java.lang.String > batch : org.ovirt.engine.core.aaa.SearchQueryParsingUtils.getIdsBatches ( extension.getContext ( ) , ids ) ) { results.addAll ( org.ovirt.engine.core.aaa.AuthzUtils.queryGroupRecords ( extension , namespace , org.ovirt.engine.core.aaa.SearchQueryParsingUtils.generateQueryMap ( batch , Authz.QueryEntity.GROUP ) , groupsResolving , groupsResolvingRecursive ) ) ; } return results ; }

Target:
public static java.util.Collection < org.ovirt.engine.api.extensions.ExtMap > findPrincipalsByIds ( final org.ovirt.engine.core.extensions.mgr.ExtensionProxy extension , final java.lang.String namespace , final java.util.Collection < java.lang.String > ids , final boolean groupsResolving , final boolean groupsResolvingRecursive ) { java.util.Collection < org.ovirt.engine.api.extensions.ExtMap > results = new java.util.ArrayList < > ( ) ; for ( java.util.Collection < java.lang.String > batch : org.ovirt.engine.core.aaa.SearchQueryParsingUtils.getIdsBatches ( extension.getContext ( ) , ids ) ) { results.addAll ( org.ovirt.engine.core.aaa.AuthzUtils.queryPrincipalRecords ( extension , namespace , org.ovirt.engine.core.aaa.SearchQueryParsingUtils.generateQueryMap ( batch , Authz.QueryEntity.PRINCIPAL ) , groupsResolving , groupsResolvingRecursive ) ) ; } return results ; }
Source:
public static void addStatistics ( org.ovirt.engine.api.restapi.resource.BackendResource resource , org.ovirt.engine.api.model.Nic model , org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface entity ) { model.setStatistics ( new org.ovirt.engine.api.model.Statistics ( ) ) ; org.ovirt.engine.api.restapi.resource.NicStatisticalQuery query = new org.ovirt.engine.api.restapi.resource.NicStatisticalQuery ( model ) ; java.util.List < org.ovirt.engine.api.model.Statistic > statistics = query.getStatistics ( entity ) ; for ( org.ovirt.engine.api.model.Statistic statistic : statistics ) { org.ovirt.engine.api.utils.LinkHelper.addLinks ( resource.getUriInfo ( ) , statistic , query.getParentType ( ) ) ; } model.getStatistics ( ) . getStatistics ( ) . addAll ( statistics ) ; }

Target:
public static void addStatistics ( org.ovirt.engine.api.restapi.resource.BackendResource resource , org.ovirt.engine.api.model.Nic model , org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface entity ) { model.setStatistics ( new org.ovirt.engine.api.model.Statistics ( ) ) ; org.ovirt.engine.api.restapi.resource.NicStatisticalQuery query = new org.ovirt.engine.api.restapi.resource.NicStatisticalQuery ( model ) ; java.util.List < org.ovirt.engine.api.model.Statistic > statistics = query.getStatistics ( entity ) ; for ( org.ovirt.engine.api.model.Statistic statistic : statistics ) { org.ovirt.engine.api.restapi.util.LinkHelper.addLinks ( resource.getUriInfo ( ) , statistic , query.getParentType ( ) ) ; } model.getStatistics ( ) . getStatistics ( ) . addAll ( statistics ) ; }
Source:
public static void GetMaxSpmPriority ( 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 ; } } ; aQuery.asyncCallback.onSuccess ( aQuery.getModel ( ) , 10 ) ; }

Target:
public static void getNetworkList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId ) { 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.network.Network > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.Network > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllNetworks , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) , aQuery ) ; }
Source:
public void testRemoveForced ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpGetEntityExpectations ( ) ; setUpGetPayloadExpectations ( 0 , 1 ) ; setUpGetBallooningExpectations ( ) ; setUpGetGraphicsExpectations ( 1 ) ; setUpActionExpectations ( VdcActionType.RemoveVm , org.ovirt.engine.core.common.action.RemoveVmParameters.class , new java.lang.String [ ] { "VmId" , "Force" } , new java.lang.Object [ ] { GUIDS [ 0 ] , java.lang.Boolean.TRUE } , true , true ) ; verifyRemove ( resource.remove ( new org.ovirt.engine.api.model.Action ( ) { { setForce ( true ) ; } } ) ) ; }

Target:
protected void setUpWindowsGetEntityExpectations ( int times , boolean notFound ) throws java.lang.Exception { setUpGetEntityExpectations ( times , notFound , new org.ovirt.engine.api.restapi.resource.VM ( ) { { setId ( GUIDS [ 0 ] ) ; setVmOs ( OsRepository.DEFAULT_X86_OS ) ; } } ) ; }
Source:
public void getGlusterHooks ( 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 != null ? source : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterHooks , new org.ovirt.engine.core.common.queries.gluster.GlusterParameters ( clusterId ) , aQuery ) ; }

Target:
public void getGlusterSwiftServerServices ( 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 != null ? source : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterServerService > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterServerServicesByClusterId , new org.ovirt.engine.core.common.queries.gluster.GlusterServiceQueryParameters ( clusterId , org.ovirt.engine.core.common.businessentities.gluster.ServiceType.GLUSTER_SWIFT ) , aQuery ) ; }
Source:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event < ? extends org.ovirt.engine.ui.uicompat.EventArgs > ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { org.ovirt.engine.core.common.businessentities.network.Network network = getNetwork ( ) . getSelectedItem ( ) ; boolean portMirroringAllowed = ( network == null ) || ( ! ( network.isExternal ( ) ) ) ; if ( ! portMirroringAllowed ) { getPortMirroring ( ) . setEntity ( false ) ; getPortMirroring ( ) . setChangeProhibitionReason ( org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getConstants ( ) . portMirroringNotSupportedExternalNetworks ( ) ) ; } getPortMirroring ( ) . setIsChangable ( portMirroringAllowed ) ; }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event < ? extends org.ovirt.engine.ui.uicompat.EventArgs > ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { org.ovirt.engine.core.common.businessentities.network.Network network = getNetwork ( ) . getSelectedItem ( ) ; boolean portMirroringAllowed = ( network == null ) || ( ! ( network.isExternal ( ) ) ) ; if ( ! portMirroringAllowed ) { getPortMirroring ( ) . setEntity ( false ) ; getPortMirroring ( ) . setChangeProhibitionReason ( org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getConstants ( ) . portMirroringNotSupportedExternalNetworks ( ) ) ; } getPortMirroring ( ) . setIsChangeable ( portMirroringAllowed ) ; }
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 getHostsForStorageOperation ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , boolean localFsOnly ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { return source ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetHostsForStorageOperation , new org.ovirt.engine.core.common.queries.GetHostsForStorageOperationParameters ( storagePoolId , localFsOnly ) , aQuery ) ; }
Source:
private void persistTopology ( org.ovirt.engine.core.common.businessentities.VDS host , java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > dbNics , java.util.List < org.ovirt.engine.core.common.businessentities.network.Network > clusterNetworks , org.ovirt.engine.core.common.vdscommands.UserConfiguredNetworkData userConfiguredData ) { final org.ovirt.engine.core.vdsbroker.vdsbroker.HostNetworkInterfacesPersister networkInterfacesPersister = new org.ovirt.engine.core.vdsbroker.vdsbroker.HostNetworkInterfacesPersisterImpl ( interfaceDao , host.getInterfaces ( ) , dbNics , userConfiguredData ) ; networkInterfacesPersister.persistTopology ( ) ; final org.ovirt.engine.core.vdsbroker.vdsbroker.HostNetworkAttachmentsPersister networkAttachmentPersister = new org.ovirt.engine.core.vdsbroker.vdsbroker.HostNetworkAttachmentsPersister ( networkAttachmentDao , host.getId ( ) , host.getInterfaces ( ) , userConfiguredData.getNetworkAttachments ( ) , clusterNetworks ) ; networkAttachmentPersister.persistNetworkAttachments ( ) ; }

Target:
private void persistTopology ( org.ovirt.engine.core.common.businessentities.VDS host , java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > dbNics , java.util.List < org.ovirt.engine.core.common.businessentities.network.Network > clusterNetworks , org.ovirt.engine.core.common.vdscommands.UserConfiguredNetworkData userConfiguredData ) { final org.ovirt.engine.core.vdsbroker.vdsbroker.HostNetworkInterfacesPersister networkInterfacesPersister = new org.ovirt.engine.core.vdsbroker.vdsbroker.HostNetworkInterfacesPersisterImpl ( interfaceDao , host.getInterfaces ( ) , dbNics , userConfiguredData ) ; networkInterfacesPersister.persistTopology ( ) ; final org.ovirt.engine.core.vdsbroker.vdsbroker.HostNetworkAttachmentsPersister networkAttachmentPersister = new org.ovirt.engine.core.vdsbroker.vdsbroker.HostNetworkAttachmentsPersister ( networkAttachmentDao , host.getId ( ) , host.getInterfaces ( ) , userConfiguredData.getCustomProperties ( ) , userConfiguredData.getNetworkAttachments ( ) , clusterNetworks ) ; networkAttachmentPersister.persistNetworkAttachments ( ) ; }