auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private org.ovirt.engine.ui.uicommonweb.models.hosts.NetworkParameters createBeforeSyncNetParams ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nic , org.ovirt.engine.core.common.businessentities.network.NetworkAttachment attachment ) { org.ovirt.engine.ui.uicommonweb.models.hosts.NetworkParameters params = new org.ovirt.engine.ui.uicommonweb.models.hosts.NetworkParameters ( ) ; params.setBootProtocol ( nic.getBootProtocol ( ) ) ; params.setAddress ( nic.getAddress ( ) ) ; params.setSubnet ( nic.getSubnet ( ) ) ; params.setGateway ( nic.getGateway ( ) ) ; params.setQos ( nic.getQos ( ) ) ; params.setQosOverridden ( attachment.isQosOverridden ( ) ) ; params.setCustomProperties ( attachment.getProperties ( ) ) ; return params ; }

Target:
private void setVlanDeviceOnNetworkModelIfNeeded ( java.lang.String baseNicName , org.ovirt.engine.ui.uicommonweb.models.hosts.network.LogicalNetworkModel networkModel ) { if ( networkModel.hasVlan ( ) ) { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface existingVlanDevice = networkModel.getVlanDevice ( ) ; assert existingVlanDevice == null : "should have only one vlan device, but found " + existingVlanDevice ; org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface vlanDeviceWithTheSameVlanIdAsTheNetwork = getExistingVlanDeviceByVlanId ( networkModel.getVlanId ( ) ) ; if ( ( vlanDeviceWithTheSameVlanIdAsTheNetwork != null ) && ( baseNicName.equals ( vlanDeviceWithTheSameVlanIdAsTheNetwork.getBaseInterface ( ) ) ) ) { networkModel.setVlanDevice ( vlanDeviceWithTheSameVlanIdAsTheNetwork ) ; } } }
Source:
public static void GetVmList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String poolName ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VM > vms = org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.VM > Cast ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.IVdcQueryable > ) ( source ) ) ) ; return vms ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( ( "Vms: pool=" + poolName ) , org.ovirt.engine.core.common.interfaces.SearchType.VM ) , aQuery ) ; }

Target:
public static void GetVmNicList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmNetworkInterface > ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmNetworkInterface > ) ( source ) ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmNetworkInterface > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVmInterfacesByVmId , new org.ovirt.engine.core.common.queries.GetVmByVmIdParameters ( id ) , aQuery ) ; }
Source:
public org.ovirt.engine.core.bll.ValidationResult isDomainExistAndActive ( ) { if ( ( storageDomain ) == null ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.dal.VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_DOMAIN_NOT_EXIST ) ; } if ( ( ( storageDomain.getStatus ( ) ) == null ) || ( ( storageDomain.getStatus ( ) ) != ( org.ovirt.engine.core.common.businessentities.StorageDomainStatus.Active ) ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.dal.VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_DOMAIN_STATUS_ILLEGAL ) ; } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult isDomainExistAndActive ( ) { if ( ( storageDomain ) == null ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_DOMAIN_NOT_EXIST ) ; } if ( ( ( storageDomain.getStatus ( ) ) == null ) || ( ( storageDomain.getStatus ( ) ) != ( org.ovirt.engine.core.common.businessentities.StorageDomainStatus.Active ) ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_DOMAIN_STATUS_ILLEGAL ) ; } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }
Source:
org.ovirt.engine.core.common.businessentities.VmwareVmProviderProperties getVmwareVmProviderProperties ( org.ovirt.engine.core.compat.Guid dataCenterId ) { return new org.ovirt.engine.core.common.businessentities.VmwareVmProviderProperties ( getvCenter ( ) . getEntity ( ) , getEsx ( ) . getEntity ( ) , getVmwareDatacenter ( ) . getEntity ( ) , getVerifySSL ( ) . getEntity ( ) , dataCenterId , ( ( getProxyHost ( ) . getSelectedItem ( ) ) != null ? getProxyHost ( ) . getSelectedItem ( ) . getId ( ) : null ) ) ; }

Target:
org.ovirt.engine.core.common.businessentities.VmwareVmProviderProperties getVmwareVmProviderProperties ( org.ovirt.engine.core.compat.Guid dataCenterId ) { return new org.ovirt.engine.core.common.businessentities.VmwareVmProviderProperties ( getvCenter ( ) . getEntity ( ) , getEsx ( ) . getEntity ( ) , org.ovirt.engine.ui.uicommonweb.models.vms.ImportVmsModel.mergeDcAndCluster ( getVmwareDatacenter ( ) . getEntity ( ) , getVmwareCluster ( ) . getEntity ( ) ) , getVerifySSL ( ) . getEntity ( ) , dataCenterId , ( ( getProxyHost ( ) . getSelectedItem ( ) ) != null ? getProxyHost ( ) . getSelectedItem ( ) . getId ( ) : null ) ) ; }
Source:
public void testUpdateBrickStatus ( ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity existingBrick = dao.getById ( org.ovirt.engine.core.dao.gluster.GlusterBrickDaoTest.EXISTING_BRICK_ID ) ; org.junit.Assert.assertNotNull ( existingBrick ) ; org.junit.Assert.assertEquals ( GlusterStatus.UP , existingBrick.getStatus ( ) ) ; dao.updateBrickStatus ( org.ovirt.engine.core.dao.gluster.GlusterBrickDaoTest.EXISTING_BRICK_ID , GlusterStatus.DOWN ) ; existingBrick = dao.getById ( org.ovirt.engine.core.dao.gluster.GlusterBrickDaoTest.EXISTING_BRICK_ID ) ; org.junit.Assert.assertNotNull ( existingBrick ) ; org.junit.Assert.assertEquals ( GlusterStatus.DOWN , existingBrick.getStatus ( ) ) ; }

Target:
public void testUpdateBrickStatus ( ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity existingBrick = dao.getById ( FixturesTool.GLUSTER_BRICK_UUID1 ) ; org.junit.Assert.assertNotNull ( existingBrick ) ; org.junit.Assert.assertEquals ( GlusterStatus.UP , existingBrick.getStatus ( ) ) ; dao.updateBrickStatus ( FixturesTool.GLUSTER_BRICK_UUID1 , GlusterStatus.DOWN ) ; existingBrick = dao.getById ( FixturesTool.GLUSTER_BRICK_UUID1 ) ; org.junit.Assert.assertNotNull ( existingBrick ) ; org.junit.Assert.assertEquals ( GlusterStatus.DOWN , existingBrick.getStatus ( ) ) ; }
Source:
protected org.ovirt.engine.core.compat.Guid getHostId ( org.ovirt.engine.api.model.Host host ) { return host.isSetId ( ) ? new org.ovirt.engine.core.compat.Guid ( host.getId ( ) ) : getEntity ( org.ovirt.engine.core.common.businessentities.VDS.class , VdcQueryType.GetVdsByName , new org.ovirt.engine.core.common.queries.GetVdsByNameParameters ( host.getName ( ) ) , host.getName ( ) ) . getId ( ) ; }

Target:
protected org.ovirt.engine.core.compat.Guid getHostId ( org.ovirt.engine.api.model.Host host ) { return host.isSetId ( ) ? new org.ovirt.engine.core.compat.Guid ( host.getId ( ) ) : getEntity ( org.ovirt.engine.core.common.businessentities.VDS.class , VdcQueryType.GetVdsByName , new org.ovirt.engine.core.common.queries.NameQueryParameters ( host.getName ( ) ) , host.getName ( ) ) . getId ( ) ; }
Source:
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 ) , aQuery ) ; }

Target:
public static void GetStorageConnectionById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String id , 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 ) { return source != null ? ( ( org.ovirt.engine.core.common.businessentities.storage_server_connections ) ( source ) ) : null ; } } ; org.ovirt.engine.core.common.queries.StorageServerConnectionQueryParametersBase params = new org.ovirt.engine.core.common.queries.StorageServerConnectionQueryParametersBase ( id ) ; params.setRefresh ( isRefresh ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetStorageServerConnectionById , params , aQuery ) ; }
Source:
public void getDataCenterMaxNameLength ( 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 ) ) : 1 ; } } ; getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.StoragePoolNameSizeLimit , getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public void getStorageDomainDefaultWipeAfterDelete ( org.ovirt.engine.ui.frontend.AsyncQuery < java.lang.Boolean > aQuery , org.ovirt.engine.core.common.businessentities.storage.StorageType storageType ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.CastingConverter < > ( ) ; 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 ) ; }
Source:
protected void executeCommand ( ) { org.ovirt.engine.core.bll.storage.UpdateStorageDomainCommand.getStorageDomainStaticDAO ( ) . update ( org.ovirt.engine.core.bll.storage.UpdateStorageDomainCommand.getStorageDomain ( ) . getStorageStaticData ( ) ) ; if ( ( storageDomainNameChanged ) && ( ( org.ovirt.engine.core.bll.storage.UpdateStorageDomainCommand.getStoragePool ( ) ) != null ) ) { runVdsCommand ( VDSCommandType.SetStorageDomainDescription , new org.ovirt.engine.core.common.vdscommands.SetStorageDomainDescriptionVDSCommandParameters ( org.ovirt.engine.core.bll.storage.UpdateStorageDomainCommand.getStoragePool ( ) . getId ( ) , org.ovirt.engine.core.bll.storage.UpdateStorageDomainCommand.getStorageDomain ( ) . getId ( ) , org.ovirt.engine.core.bll.storage.UpdateStorageDomainCommand.getStorageDomain ( ) . getStorageName ( ) ) ) ; } org.ovirt.engine.core.bll.storage.UpdateStorageDomainCommand.setSucceeded ( true ) ; }

Target:
protected void executeCommand ( ) { org.ovirt.engine.core.bll.storage.UpdateStorageDomainCommand.getStorageDomainStaticDao ( ) . update ( org.ovirt.engine.core.bll.storage.UpdateStorageDomainCommand.getStorageDomain ( ) . getStorageStaticData ( ) ) ; if ( ( storageDomainNameChanged ) && ( ( org.ovirt.engine.core.bll.storage.UpdateStorageDomainCommand.getStoragePool ( ) ) != null ) ) { runVdsCommand ( VDSCommandType.SetStorageDomainDescription , new org.ovirt.engine.core.common.vdscommands.SetStorageDomainDescriptionVDSCommandParameters ( org.ovirt.engine.core.bll.storage.UpdateStorageDomainCommand.getStoragePool ( ) . getId ( ) , org.ovirt.engine.core.bll.storage.UpdateStorageDomainCommand.getStorageDomain ( ) . getId ( ) , org.ovirt.engine.core.bll.storage.UpdateStorageDomainCommand.getStorageDomain ( ) . getStorageName ( ) ) ) ; } org.ovirt.engine.core.bll.storage.UpdateStorageDomainCommand.setSucceeded ( true ) ; }
Source:
protected void AsyncSearch ( ) { super . AsyncSearch ( ) ; org.ovirt.engine.core.common.businessentities.VM vm = getEntity ( ) ; setAsyncResult ( org.ovirt.engine.ui.frontend.Frontend.RegisterQuery ( VdcQueryType.GetAllDisksByVmId , new org.ovirt.engine.core.common.queries.GetAllDisksByVmIdParameters ( vm.getId ( ) ) ) ) ; setItems ( getAsyncResult ( ) . getData ( ) ) ; }

Target:
protected void asyncSearch ( ) { super . asyncSearch ( ) ; org.ovirt.engine.core.common.businessentities.VM vm = getEntity ( ) ; setAsyncResult ( org.ovirt.engine.ui.frontend.Frontend.RegisterQuery ( VdcQueryType.GetAllDisksByVmId , new org.ovirt.engine.core.common.queries.GetAllDisksByVmIdParameters ( vm.getId ( ) ) ) ) ; setItems ( getAsyncResult ( ) . getData ( ) ) ; }
Source:
public void diskImagesHasDerivedDisksNoStorageDomainSpecifiedSuccess ( ) { disk1.setVmEntityType ( VmEntityType.TEMPLATE ) ; org.mockito.Mockito.when ( diskImageDao.getAllSnapshotsForParent ( disk1.getImageId ( ) ) ) . thenReturn ( java.util.Collections.< org.ovirt.engine.core.common.businessentities.DiskImage > emptyList ( ) ) ; org.junit.Assert.assertThat ( validator.diskImagesHaveNoDerivedDisks ( null ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }

Target:
public void diskImagesHasDerivedDisksNoStorageDomainSpecifiedSuccess ( ) { disk1.setVmEntityType ( VmEntityType.TEMPLATE ) ; org.mockito.Mockito.when ( diskImageDao.getAllSnapshotsForParent ( disk1.getImageId ( ) ) ) . thenReturn ( java.util.Collections.< org.ovirt.engine.core.common.businessentities.storage.DiskImage > emptyList ( ) ) ; org.junit.Assert.assertThat ( validator.diskImagesHaveNoDerivedDisks ( null ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }
Source:
public void canDoActionFailsIfStopped ( ) { cmd = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.gluster.StopGeoRepSessionCommand ( new org.ovirt.engine.core.common.action.gluster.GlusterVolumeGeoRepSessionParameters ( stoppedVolumeId , geoRepSessionId ) ) ) ; prepareMocks ( cmd ) ; org.mockito.Mockito.doReturn ( getGeoRepSession ( geoRepSessionId , GeoRepSessionStatus.STOPPED ) ) . when ( geoRepDao ) . getById ( geoRepSessionId ) ; org.junit.Assert.assertFalse ( cmd.canDoAction ( ) ) ; }

Target:
public void validateFailsIfStopped ( ) { cmd = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.gluster.StopGeoRepSessionCommand ( new org.ovirt.engine.core.common.action.gluster.GlusterVolumeGeoRepSessionParameters ( stoppedVolumeId , geoRepSessionId ) ) ) ; prepareMocks ( cmd ) ; org.mockito.Mockito.doReturn ( getGeoRepSession ( geoRepSessionId , GeoRepSessionStatus.STOPPED ) ) . when ( geoRepDao ) . getById ( geoRepSessionId ) ; org.junit.Assert.assertFalse ( cmd.validate ( ) ) ; }
Source:
protected void doGet ( javax.servlet.http.HttpServletRequest request , javax.servlet.http.HttpServletResponse response ) throws java.io.IOException , javax.servlet.ServletException { java.lang.Integer applicationMode = getApplicationMode ( getEngineSessionId ( request ) ) ; request.setAttribute ( org.ovirt.engine.ui.frontend.server.gwt.WebAdminHostPageServlet.ATTR_APPLICATION_MODE , getApplicationModeObject ( applicationMode ) ) ; java.util.List < org.ovirt.engine.ui.frontend.server.gwt.plugin.PluginData > pluginData = getPluginData ( ) ; request.setAttribute ( org.ovirt.engine.ui.frontend.server.gwt.WebAdminHostPageServlet.ATTR_PLUGIN_DEFS , getPluginDefinitionsArray ( pluginData ) ) ; request.setAttribute ( org.ovirt.engine.ui.frontend.server.gwt.WebAdminHostPageServlet.ATTR_ENGINE_SESSION_TIMEOUT , getEngineSessionTimeoutObject ( getUserSessionTimeout ( ) , getUserSessionHardTimeout ( ) ) ) ; super . doGet ( request , response ) ; }

Target:
protected void doGet ( javax.servlet.http.HttpServletRequest request , javax.servlet.http.HttpServletResponse response ) throws java.io.IOException , javax.servlet.ServletException { java.lang.Integer applicationMode = getApplicationMode ( getEngineSessionId ( request ) ) ; request.setAttribute ( org.ovirt.engine.ui.frontend.server.gwt.WebAdminHostPageServlet.ATTR_APPLICATION_MODE , getApplicationModeObject ( applicationMode ) ) ; java.util.List < org.ovirt.engine.ui.frontend.server.gwt.plugin.PluginData > pluginData = getPluginData ( ) ; request.setAttribute ( org.ovirt.engine.ui.frontend.server.gwt.WebAdminHostPageServlet.ATTR_PLUGIN_DEFS , getPluginDefinitionsArray ( pluginData ) ) ; java.lang.Integer engineSessionTimeout = getEngineSessionTimeout ( getEngineSessionId ( request ) ) ; request.setAttribute ( org.ovirt.engine.ui.frontend.server.gwt.WebAdminHostPageServlet.ATTR_ENGINE_SESSION_TIMEOUT , getEngineSessionTimeoutObject ( engineSessionTimeout ) ) ; super . doGet ( request , response ) ; }
Source:
public void getCustomValuesLeaksInternalStructure ( ) { final org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase b = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.TestAuditLogableBase ( ) ; final java.lang.String key = "foo" ; final java.lang.String value = org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.NAME ; b.AddCustomValue ( key , value ) ; final java.lang.String v = b.GetCustomValue ( key ) ; org.junit.Assert.assertEquals ( value , v ) ; final java.util.Map < java.lang.String , java.lang.String > m = b.getCustomValues ( ) ; m.clear ( ) ; final java.lang.String s = b.GetCustomValue ( key ) ; org.junit.Assert.assertEquals ( "" , s ) ; }

Target:
public void getCustomValuesLeaksInternalStructure ( ) { final org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase b = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.TestAuditLogableBase ( ) ; final java.lang.String key = "foo" ; final java.lang.String value = org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.NAME ; b.addCustomValue ( key , value ) ; final java.lang.String v = b.getCustomValue ( key ) ; org.junit.Assert.assertEquals ( value , v ) ; final java.util.Map < java.lang.String , java.lang.String > m = b.getCustomValues ( ) ; m.clear ( ) ; final java.lang.String s = b.getCustomValue ( key ) ; org.junit.Assert.assertEquals ( "" , s ) ; }
Source:
private void ensureFramework ( org.ovirt.engineextensions.aaa.ldap.ExtMap input ) throws java.lang.Exception { if ( ! ( frameworkInitialized ) ) { synchronized ( this ) { if ( ! ( frameworkInitialized ) ) { try { framework.getGlobals ( ) . put ( ExtensionUtil.VARS_AUTHN_ENABLE , "1" ) ; framework.open ( ) ; frameworkInitialized = true ; } catch ( java.lang.Exception e ) { org.ovirt.engineextensions.aaa.ldap.AuthnExtension.log.warn ( "{} Cannot initialize LDAP framework, deferring initialization. Error: {}" , logPrefix , e.getMessage ( ) ) ; throw e ; } } } } }

Target:
private void ensureFramework ( org.ovirt.engine.api.extensions.ExtMap input ) throws java.lang.Exception { if ( ! ( frameworkInitialized ) ) { synchronized ( this ) { if ( ! ( frameworkInitialized ) ) { try { framework.getGlobals ( ) . put ( ExtensionUtil.VARS_AUTHN_ENABLE , "1" ) ; framework.open ( ) ; frameworkInitialized = true ; } catch ( java.lang.Exception e ) { org.ovirt.engineextensions.aaa.ldap.AuthnExtension.log.warn ( "{} Cannot initialize LDAP framework, deferring initialization. Error: {}" , logPrefix , e.getMessage ( ) ) ; throw e ; } } } } }
Source:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; dao = dbFacade.getVmPoolDao ( ) ; existingVmPool = dao.get ( org.ovirt.engine.core.dao.VmPoolDAOTest.EXISTING_VM_POOL_ID ) ; deletableVmPool = dao.get ( org.ovirt.engine.core.dao.VmPoolDAOTest.DELETABLE_VM_POOL_ID ) ; newVmPool = new org.ovirt.engine.core.common.businessentities.VmPool ( ) ; newVmPool.setVmPoolName ( "New VM Pool" ) ; newVmPool.setVmPoolDescription ( "This is a new VM pool." ) ; newVmPool.setVdsGroupId ( org.ovirt.engine.core.dao.VmPoolDAOTest.VDS_GROUP_ID ) ; existingVmPoolMap = dao.getVmPoolMapByVmGuid ( new org.ovirt.engine.core.compat.Guid ( "77296e00-0cad-4e5a-9299-008a7b6f4355" ) ) ; newVmPoolMap = new org.ovirt.engine.core.common.businessentities.VmPoolMap ( org.ovirt.engine.core.dao.VmPoolDAOTest.FREE_VM_ID , existingVmPool.getVmPoolId ( ) ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; dao = dbFacade.getVmPoolDao ( ) ; existingVmPool = dao.get ( org.ovirt.engine.core.dao.VmPoolDAOTest.EXISTING_VM_POOL_ID ) ; deletableVmPool = dao.get ( org.ovirt.engine.core.dao.VmPoolDAOTest.DELETABLE_VM_POOL_ID ) ; newVmPool = new org.ovirt.engine.core.common.businessentities.VmPool ( ) ; newVmPool.setName ( "New VM Pool" ) ; newVmPool.setVmPoolDescription ( "This is a new VM pool." ) ; newVmPool.setVdsGroupId ( org.ovirt.engine.core.dao.VmPoolDAOTest.VDS_GROUP_ID ) ; existingVmPoolMap = dao.getVmPoolMapByVmGuid ( new org.ovirt.engine.core.compat.Guid ( "77296e00-0cad-4e5a-9299-008a7b6f4355" ) ) ; newVmPoolMap = new org.ovirt.engine.core.common.businessentities.VmPoolMap ( org.ovirt.engine.core.dao.VmPoolDAOTest.FREE_VM_ID , existingVmPool.getVmPoolId ( ) ) ; }
Source:
protected void performLogin ( T loginModel ) { org.ovirt.engine.core.common.businessentities.aaa.DbUser loggedUser = loginModel.getLoggedUser ( ) ; java.lang.String loginPassword = loginModel.getPassword ( ) . getEntity ( ) ; beforeLogin ( loginModel ) ; frontend.initLoggedInUser ( loggedUser , loginPassword ) ; user.onUserLogin ( loggedUser ) ; loginModel.getPassword ( ) . setEntity ( null ) ; }

Target:
protected void performPlaceTransition ( ) { user.fireLoginChangeEvent ( ) ; }
Source:
public void diskImagesAlreadyExistBothDoesntExist ( ) { org.mockito.Mockito.doReturn ( false ) . when ( validator ) . isDiskExists ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ; org.junit.Assert.assertEquals ( validator.diskImagesAlreadyExist ( ) , ValidationResult.VALID ) ; }

Target:
public void diskImagesDontExist ( ) { org.mockito.Mockito.doReturn ( false ) . when ( validator ) . isDiskExists ( disk1.getId ( ) ) ; org.mockito.Mockito.doReturn ( false ) . when ( validator ) . isDiskExists ( disk2.getId ( ) ) ; org.junit.Assert.assertThat ( validator.diskImagesNotExist ( ) , org.junit.matchers.JUnitMatchers.both ( org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( VdcBllMessages.ACTION_TYPE_FAILED_DISKS_NOT_EXIST ) ) ) ; }
Source:
private void handleTransferring ( final org.ovirt.engine.core.bll.storage.disk.image.UploadImageCommand < T > . StateContext context ) { if ( ( context.iterationTimestamp ) >= ( ( org.ovirt.engine.core.bll.storage.disk.image.UploadImageCommand.getParameters ( ) . getSessionExpiration ( ) ) - ( getHostTicketRefreshAllowance ( ) ) ) ) { log.info ( "Renewing transfer ticket for {}" , getUploadDescription ( ) ) ; extendImageTransferSession ( context.entity ) ; } else { log.debug ( "Not yet renewing transfer ticket for {}" , getUploadDescription ( ) ) ; } resetPeriodicPauseLogTime ( 0 ) ; }

Target:
private void handleTransferring ( final org.ovirt.engine.core.bll.storage.disk.image.TransferImageCommand < T > . StateContext context ) { if ( ( context.iterationTimestamp ) >= ( ( org.ovirt.engine.core.bll.storage.disk.image.TransferImageCommand.getParameters ( ) . getSessionExpiration ( ) ) - ( getHostTicketRefreshAllowance ( ) ) ) ) { log.info ( "Renewing transfer ticket for {}" , getTransferDescription ( ) ) ; extendImageTransferSession ( context.entity ) ; } else { log.debug ( "Not yet renewing transfer ticket for {}" , getTransferDescription ( ) ) ; } resetPeriodicPauseLogTime ( 0 ) ; }
Source:
private void spySdValidator ( java.util.Set < org.ovirt.engine.core.compat.Guid > sdIds ) { storageDomainsValidator = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.validator.MultipleStorageDomainsValidator ( org.ovirt.engine.core.bll.RemoveSnapshotCommandTest.STORAGE_POOLD_ID , sdIds ) ) ; org.mockito.Mockito.doReturn ( storageDomainsValidator ) . when ( cmd ) . getStorageDomainsValidator ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) , org.mockito.Matchers.anySet ( ) ) ; org.mockito.Mockito.doReturn ( ValidationResult.VALID ) . when ( storageDomainsValidator ) . allDomainsExistAndActive ( ) ; org.mockito.Mockito.doReturn ( sdDAO ) . when ( storageDomainsValidator ) . getStorageDomainDAO ( ) ; org.mockito.Mockito.doReturn ( sdIds ) . when ( cmd ) . getStorageDomainsIds ( ) ; }

Target:
private void spySdValidator ( java.util.Set < org.ovirt.engine.core.compat.Guid > sdIds ) { storageDomainsValidator = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.validator.storage.MultipleStorageDomainsValidator ( org.ovirt.engine.core.bll.RemoveSnapshotCommandTest.STORAGE_POOLD_ID , sdIds ) ) ; org.mockito.Mockito.doReturn ( storageDomainsValidator ) . when ( cmd ) . getStorageDomainsValidator ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) , org.mockito.Matchers.anySet ( ) ) ; org.mockito.Mockito.doReturn ( ValidationResult.VALID ) . when ( storageDomainsValidator ) . allDomainsExistAndActive ( ) ; org.mockito.Mockito.doReturn ( sdDAO ) . when ( storageDomainsValidator ) . getStorageDomainDAO ( ) ; org.mockito.Mockito.doReturn ( sdIds ) . when ( cmd ) . getStorageDomainsIds ( ) ; }
Source:
private void localize ( org.ovirt.engine.ui.webadmin.ApplicationConstants constants ) { networkEditor.setLabel ( constants.networkVnicProfile ( ) ) ; nameEditor.setLabel ( constants.nameVnicProfile ( ) ) ; descriptionEditor.setLabel ( constants.descriptionVnicProfile ( ) ) ; portMirroringEditor.setLabel ( constants.portMirroringVnicProfile ( ) ) ; publicUseEditor.setLabel ( constants.publicUseVnicProfile ( ) ) ; }

Target:
private void localize ( org.ovirt.engine.ui.webadmin.ApplicationConstants constants ) { networkEditor.setLabel ( constants.networkVnicProfile ( ) ) ; nameEditor.setLabel ( constants.nameVnicProfile ( ) ) ; descriptionEditor.setLabel ( constants.descriptionVnicProfile ( ) ) ; portMirroringEditor.setLabel ( constants.portMirroringVnicProfile ( ) ) ; publicUseEditor.setLabel ( constants.publicUseVnicProfile ( ) ) ; networkQoSEditor.setLabel ( constants.profileQoSInstanceTypeLabel ( ) ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.network.HostNicVfsConfig getHostNicVfsConfigToRemove ( org.ovirt.engine.core.common.businessentities.HostDevice device ) { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nic = hostNicVfsConfigHelper.getNicByPciDevice ( device ) ; if ( nic == null ) { return null ; } return hostNicVfsConfigDao.getByNicId ( nic.getId ( ) ) ; }

Target:
private org.ovirt.engine.core.common.businessentities.network.HostNicVfsConfig getHostNicVfsConfigToAdd ( org.ovirt.engine.core.common.businessentities.HostDevice device ) { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nic = hostNicVfsConfigHelper.getNicByPciDevice ( device , fetchedMap.values ( ) ) ; if ( nic == null ) { return null ; } org.ovirt.engine.core.common.businessentities.network.HostNicVfsConfig hostNicVfsConfig = new org.ovirt.engine.core.common.businessentities.network.HostNicVfsConfig ( ) ; hostNicVfsConfig.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; hostNicVfsConfig.setNicId ( nic.getId ( ) ) ; hostNicVfsConfig.setAllNetworksAllowed ( true ) ; return hostNicVfsConfig ; }
Source:
private void writeCleanup ( ) { com.google.gwt.core.ext.typeinfo.JClassType editorType = model.getEditorType ( ) ; logger.log ( Type.DEBUG , ( "Starting to write cleanup impl. for editor " + ( editorType.getQualifiedSourceName ( ) ) ) ) ; sw.println ( ) ; sw.println ( "@Override" ) ; sw.println ( "public void cleanup() {" ) ; sw.indent ( ) ; sw.println ( "if (getObject() != null) {" ) ; sw.indent ( ) ; if ( model.getProxyType ( ) . isAssignableTo ( hasCleanupType ) ) { sw.println ( "getObject().cleanup();" ) ; } for ( com.google.gwt.editor.rebind.model.EditorData editorData : model.getEditorData ( ) ) { if ( editorData.getPropertyOwnerType ( ) . isAssignableTo ( hasCleanupType ) ) { sw.println ( java.lang.String.format ( "getObject()%s.cleanup();" , editorData.getBeanOwnerExpression ( ) ) ) ; } } sw.outdent ( ) ; sw.println ( "}" ) ; for ( com.google.gwt.core.ext.typeinfo.JField field : editorType.getFields ( ) ) { com.google.gwt.core.ext.typeinfo.JClassType fieldClassType = field.getType ( ) . isClassOrInterface ( ) ; if ( ( ( fieldClassType != null ) && ( fieldClassType.isAssignableTo ( hasCleanupType ) ) ) && ( ! ( field.getType ( ) . isClassOrInterface ( ) . isAssignableTo ( baseModelType ) ) ) ) { sw.println ( java.lang.String.format ( "getEditor().%s.cleanup();" , field.getName ( ) ) ) ; } } sw.outdent ( ) ; sw.println ( "}" ) ; }

Target:
private java.util.Set < java.lang.String > getModelCleanupExpressions ( ) { java.util.Set < java.lang.String > result = new java.util.LinkedHashSet < > ( ) ; if ( model.getProxyType ( ) . isAssignableTo ( hasCleanupType ) ) { result.add ( "getObject()" ) ; } for ( com.google.gwt.editor.rebind.model.EditorData editorData : model.getEditorData ( ) ) { if ( editorData.getPropertyOwnerType ( ) . isAssignableTo ( hasCleanupType ) ) { result.add ( java.lang.String.format ( "getObject()%s" , editorData.getBeanOwnerExpression ( ) ) ) ; } } return result ; }
Source:
public 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 ) ; }

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:
public java.util.concurrent.Future < java.lang.Void > close ( ) { final java.lang.String message = "Client close" ; final java.util.concurrent.Callable < java.lang.Void > disconnectCallable = new java.util.concurrent.Callable < java.lang.Void > ( ) { @ java.lang.Override public java.lang.Void call ( ) { disconnect ( message ) ; return null ; } } ; return scheduleTask ( disconnectCallable ) ; }

Target:
public java.util.concurrent.Future < java.lang.Void > close ( ) { final java.util.concurrent.Callable < java.lang.Void > disconnectCallable = new java.util.concurrent.Callable < java.lang.Void > ( ) { @ java.lang.Override public java.lang.Void call ( ) { disconnect ( org.ovirt.vdsm.jsonrpc.client.reactors.ReactorClient.CLIENT_CLOSED ) ; return null ; } } ; return scheduleTask ( disconnectCallable ) ; }
Source:
public void testListCrash ( ) { javax.ws.rs.core.UriInfo uriInfo = setUpUriExpectations ( null ) ; collection.setUriInfo ( uriInfo ) ; java.lang.Throwable t = new java.lang.RuntimeException ( FAILURE ) ; setUpHooksQueryExpectations ( t ) ; try { getCollection ( ) ; org.junit.Assert.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , org.ovirt.engine.api.restapi.resource.gluster.BACKEND_FAILED_SERVER_LOCALE , t ) ; } }

Target:
public void testListCrash ( ) { javax.ws.rs.core.UriInfo uriInfo = setUpUriExpectations ( null ) ; collection.setUriInfo ( uriInfo ) ; java.lang.Throwable t = new java.lang.RuntimeException ( FAILURE ) ; setUpHooksQueryExpectations ( t ) ; try { getCollection ( ) ; org.junit.jupiter.api.Assertions.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , org.ovirt.engine.api.restapi.resource.gluster.BACKEND_FAILED_SERVER_LOCALE , t ) ; } }
Source:
public void SaveNewSanStorage ( ) { org.ovirt.engine.ui.uicommonweb.models.storage.StorageModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.storage.StorageModel ) ( getWindow ( ) ) ) ; org.ovirt.engine.ui.uicommonweb.models.storage.SanStorageModel sanStorageModel = ( ( org.ovirt.engine.ui.uicommonweb.models.storage.SanStorageModel ) ( model.getSelectedItem ( ) ) ) ; org.ovirt.engine.core.common.businessentities.VDS host = ( ( org.ovirt.engine.core.common.businessentities.VDS ) ( model.getHost ( ) . getSelectedItem ( ) ) ) ; java.util.ArrayList < java.lang.String > usedLunsMessages = sanStorageModel.getUsedLunsMessages ( ) ; if ( usedLunsMessages.isEmpty ( ) ) { OnSaveSanStorage ( ) ; } else { ForceCreationWarning ( usedLunsMessages ) ; } }

Target:
public void saveNewSanStorage ( ) { org.ovirt.engine.ui.uicommonweb.models.storage.StorageModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.storage.StorageModel ) ( getWindow ( ) ) ) ; org.ovirt.engine.ui.uicommonweb.models.storage.SanStorageModel sanStorageModel = ( ( org.ovirt.engine.ui.uicommonweb.models.storage.SanStorageModel ) ( model.getSelectedItem ( ) ) ) ; org.ovirt.engine.core.common.businessentities.VDS host = ( ( org.ovirt.engine.core.common.businessentities.VDS ) ( model.getHost ( ) . getSelectedItem ( ) ) ) ; java.util.ArrayList < java.lang.String > usedLunsMessages = sanStorageModel.getUsedLunsMessages ( ) ; if ( usedLunsMessages.isEmpty ( ) ) { onSaveSanStorage ( ) ; } else { forceCreationWarning ( usedLunsMessages ) ; } }
Source:
protected java.util.List < org.ovirt.engine.core.common.businessentities.VdsNumaNode > getVdsNumaNodes ( ) { if ( ! ( org.ovirt.engine.core.bll.numa.vm.AbstractVmNumaNodeCommand.getVm ( ) . getDedicatedVmForVdsList ( ) . isEmpty ( ) ) ) { org.ovirt.engine.core.compat.Guid vdsId = org.ovirt.engine.core.bll.numa.vm.AbstractVmNumaNodeCommand.getVm ( ) . getDedicatedVmForVdsList ( ) . get ( 0 ) ; if ( vdsId != null ) { return getVdsNumaNodeDao ( ) . getAllVdsNumaNodeByVdsId ( vdsId ) ; } } return java.util.Arrays.asList ( ) ; }

Target:
protected java.util.List < org.ovirt.engine.core.common.businessentities.VdsNumaNode > getVdsNumaNodes ( ) { if ( ! ( org.ovirt.engine.core.bll.numa.vm.AbstractVmNumaNodeCommand.getVm ( ) . getDedicatedVmForVdsList ( ) . isEmpty ( ) ) ) { org.ovirt.engine.core.compat.Guid vdsId = org.ovirt.engine.core.bll.numa.vm.AbstractVmNumaNodeCommand.getVm ( ) . getDedicatedVmForVdsList ( ) . get ( 0 ) ; if ( vdsId != null ) { return vdsNumaNodeDao.getAllVdsNumaNodeByVdsId ( vdsId ) ; } } return java.util.Arrays.asList ( ) ; }
Source:
public void getAllTemplatesFromExportDomain ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.compat.Guid storageDomainId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? source : new java.util.HashMap < org.ovirt.engine.core.common.businessentities.VmTemplate , java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.DiskImage > > ( ) ; } } ; org.ovirt.engine.core.common.queries.GetAllFromExportDomainQueryParameters getAllFromExportDomainQueryParamenters = new org.ovirt.engine.core.common.queries.GetAllFromExportDomainQueryParameters ( storagePoolId , storageDomainId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetTemplatesFromExportDomain , getAllFromExportDomainQueryParamenters , aQuery ) ; }

Target:
public void getAllTemplatesFromExportDomain ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.compat.Guid storageDomainId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? source : new java.util.HashMap < org.ovirt.engine.core.common.businessentities.VmTemplate , java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.DiskImage > > ( ) ; } } ; org.ovirt.engine.core.common.queries.GetAllFromExportDomainQueryParameters getAllFromExportDomainQueryParamenters = new org.ovirt.engine.core.common.queries.GetAllFromExportDomainQueryParameters ( storagePoolId , storageDomainId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetTemplatesFromExportDomain , getAllFromExportDomainQueryParamenters , aQuery ) ; }
Source:
public org.ovirt.engine.core.bll.ValidationResult glusterServiceSupported ( ) { return org.ovirt.engine.core.bll.ValidationResult.failWith ( VdcBllMessages.GLUSTER_NOT_SUPPORTED , "compatibilityVersion" , cluster.getCompatibilityVersion ( ) . getValue ( ) ) . when ( ( ( cluster.supportsGlusterService ( ) ) && ( ! ( glusterFeatureEnabled ( ) ) ) ) ) ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult glusterServiceSupported ( ) { return org.ovirt.engine.core.bll.ValidationResult.failWith ( EngineMessage.GLUSTER_NOT_SUPPORTED , "compatibilityVersion" , cluster.getCompatibilityVersion ( ) . getValue ( ) ) . when ( ( ( cluster.supportsGlusterService ( ) ) && ( ! ( glusterFeatureEnabled ( ) ) ) ) ) ; }
Source:
public org.ovirt.engine.core.dal.VdcBllMessages validate ( org.ovirt.engine.core.common.businessentities.VDS vds , java.lang.StringBuilder sb ) { if ( ( ( getVm ( ) . getstatus ( ) ) != ( org.ovirt.engine.core.common.businessentities.VMStatus.Paused ) ) && ( ! ( memoryChecker.evaluate ( vds , getVm ( ) ) ) ) ) { sb.append ( "has insufficient memory to run the VM" ) ; return org.ovirt.engine.core.dal.VdcBllMessages.ACTION_TYPE_FAILED_VDS_VM_MEMORY ; } return null ; }

Target:
public org.ovirt.engine.core.dal.VdcBllMessages validate ( org.ovirt.engine.core.common.businessentities.VDS vds , java.lang.StringBuilder sb , boolean isMigrate ) { if ( ( ( getVm ( ) . getStatus ( ) ) != ( org.ovirt.engine.core.common.businessentities.VMStatus.Paused ) ) && ( ! ( memoryChecker.evaluate ( vds , getVm ( ) ) ) ) ) { sb.append ( "has insufficient memory to run the VM" ) ; return org.ovirt.engine.core.dal.VdcBllMessages.ACTION_TYPE_FAILED_VDS_VM_MEMORY ; } return null ; }
Source:
protected void executeQueryCommand ( ) { org.ovirt.engine.core.bll.GetBookmarkByNameParameters params = ( ( org.ovirt.engine.core.bll.GetBookmarkByNameParameters ) ( org.ovirt.engine.core.bll.GetBookmarkByNameQuery.getParameters ( ) ) ) ; org.ovirt.engine.core.common.businessentities.bookmarks bookmark = org.ovirt.engine.core.bll.DbFacade.getInstance ( ) . getBookmarkDao ( ) . getByName ( params.getBookmarkName ( ) ) ; org.ovirt.engine.core.bll.GetBookmarkByNameQuery.getQueryReturnValue ( ) . setReturnValue ( bookmark ) ; }

Target:
protected void executeQueryCommand ( ) { org.ovirt.engine.core.bll.GetBookmarkByNameParameters params = ( ( org.ovirt.engine.core.bll.GetBookmarkByNameParameters ) ( org.ovirt.engine.core.bll.GetBookmarkByNameQuery.getParameters ( ) ) ) ; org.ovirt.engine.core.common.businessentities.Bookmark bookmark = org.ovirt.engine.core.bll.DbFacade.getInstance ( ) . getBookmarkDao ( ) . getByName ( params.getBookmarkName ( ) ) ; org.ovirt.engine.core.bll.GetBookmarkByNameQuery.getQueryReturnValue ( ) . setReturnValue ( bookmark ) ; }
Source:
public static void getMinimalVmMemSize ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Integer ) ( source ) ) . intValue ( ) : 1 ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.VMMinMemorySizeInMB , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public static void getPoolById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid poolId ) { 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.GetVmPoolById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( poolId ) , aQuery ) ; }
Source:
public static void initDiskHotpluggableInterfacesMap ( ) { 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.diskHotpluggableInterfacesMap = ( ( 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.GetDiskHotpluggableInterfacesMap ) , callback ) ; }

Target:
public void initNicHotplugSupportMap ( ) { 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 ) { nicHotplugSupportMap = ( ( 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.GetNicHotplugSupportMap ) , callback ) ; }
Source:
public void testConflictedUpdate ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpGetEntityExpectations ( 1 ) ; org.ovirt.engine.api.model.OpenStackImageProvider model = getModel ( 1 ) ; model.setId ( GUIDS [ 1 ] . toString ( ) ) ; try { resource.update ( model ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyImmutabilityConstraint ( wae ) ; } }

Target:
public void testConflictedUpdate ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpGetEntityExpectations ( 1 ) ; org.ovirt.engine.api.model.OpenStackImageProvider model = getModel ( 1 ) ; model.setId ( GUIDS [ 1 ] . toString ( ) ) ; try { resource.update ( model ) ; org.junit.Assert.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyImmutabilityConstraint ( wae ) ; } }
Source:
public org.ovirt.engine.core.bll.ValidationResult isDomainWithinThresholds ( ) { org.ovirt.engine.core.common.businessentities.StorageDomainDynamic dynamic = storageDomain.getStorageDynamicData ( ) ; if ( ( dynamic != null ) && ( ( dynamic.getfreeDiskInGB ( ) ) < ( org.ovirt.engine.core.bll.validator.StorageDomainValidator.getLowDiskSpaceThreshold ( ) ) ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.ACTION_TYPE_FAILED_DISK_SPACE_LOW_ON_TARGET_STORAGE_DOMAIN , storageName ( ) ) ; } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult isDomainWithinThresholds ( ) { org.ovirt.engine.core.common.businessentities.StorageDomainDynamic dynamic = storageDomain.getStorageDynamicData ( ) ; if ( ( dynamic != null ) && ( ( dynamic.getfreeDiskInGB ( ) ) < ( org.ovirt.engine.core.bll.validator.StorageDomainValidator.getLowDiskSpaceThreshold ( ) ) ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.ACTION_TYPE_FAILED_DISK_SPACE_LOW_ON_STORAGE_DOMAIN , storageName ( ) ) ; } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }
Source:
public static void countAllTemplates ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmTemplateCount , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }

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:
public boolean shouldUpdateVmStatus ( org.ovirt.engine.core.common.businessentities.VmDynamic vmDynamic ) { org.ovirt.engine.core.compat.Guid id = vmDynamic.getId ( ) ; if ( ! ( this . vmStatusUpdated.containsKey ( id ) ) ) { this . vmStatusUpdated.put ( id , vmDynamic.getStatusUpdatedTime ( ) ) ; return true ; } java.lang.Double knownStatusUpdate = this . vmStatusUpdated.get ( id ) ; java.lang.Double statusUpdateTime = vmDynamic.getStatusUpdatedTime ( ) ; if ( knownStatusUpdate <= statusUpdateTime ) { this . vmStatusUpdated.replace ( id , statusUpdateTime ) ; return true ; } return false ; }

Target:
public void updatePartialDynamicData ( org.ovirt.engine.core.common.businessentities.NonOperationalReason nonOperationalReason , java.lang.String maintenanceReason ) { cachedVds.getDynamicData ( ) . setNonOperationalReason ( nonOperationalReason ) ; cachedVds.getDynamicData ( ) . setMaintenanceReason ( maintenanceReason ) ; dbFacade.getVdsDynamicDao ( ) . updateStatusAndReasons ( cachedVds.getDynamicData ( ) ) ; }