auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void testAddVMToAffinityGroup ( ) { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpGetEntityExpectations ( false ) ; setUriInfo ( setUpActionExpectations ( ActionType.EditAffinityGroup , org.ovirt.engine.core.common.scheduling.parameters.AffinityGroupCRUDParameters.class , new java.lang.String [ ] { } , new java.lang.Object [ ] { } , true , true ) ) ; org.ovirt.engine.api.model.Vm vm = new org.ovirt.engine.api.model.Vm ( ) ; vm.setId ( GUIDS [ 0 ] . toString ( ) ) ; javax.ws.rs.core.Response response = collection.add ( vm ) ; org.junit.Assert.assertEquals ( 200 , response.getStatus ( ) ) ; }

Target:
public void testAddVMToAffinityGroup ( ) { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpGetEntityExpectations ( false ) ; setUriInfo ( setUpActionExpectations ( ActionType.EditAffinityGroup , org.ovirt.engine.core.common.scheduling.parameters.AffinityGroupCRUDParameters.class , new java.lang.String [ ] { } , new java.lang.Object [ ] { } , true , true ) ) ; org.ovirt.engine.api.model.Vm vm = new org.ovirt.engine.api.model.Vm ( ) ; vm.setId ( GUIDS [ 0 ] . toString ( ) ) ; javax.ws.rs.core.Response response = collection.add ( vm ) ; org.junit.jupiter.api.Assertions.assertEquals ( 200 , response.getStatus ( ) ) ; }
Source:
public void testActiveDomainInList ( ) { org.ovirt.engine.core.common.action.StoragePoolParametersBase param = new org.ovirt.engine.core.common.action.StoragePoolParametersBase ( ) ; org.ovirt.engine.core.bll.storage.pool.RemoveStoragePoolCommand < org.ovirt.engine.core.common.action.StoragePoolParametersBase > cmd = org.ovirt.engine.core.bll.storage.pool.RemoveStoragePoolCommandTest.createCommand ( param ) ; java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > domainsList = new java.util.ArrayList < > ( ) ; org.ovirt.engine.core.common.businessentities.StorageDomain tempStorageDomains = new org.ovirt.engine.core.common.businessentities.StorageDomain ( ) ; tempStorageDomains.setStatus ( StorageDomainStatus.Active ) ; domainsList.add ( tempStorageDomains ) ; java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > listReturned = cmd.getActiveOrLockedDomainList ( domainsList ) ; org.junit.Assert.assertTrue ( ( ! ( listReturned.isEmpty ( ) ) ) ) ; }

Target:
public void testActiveDomainInList ( ) { org.ovirt.engine.core.common.action.StoragePoolParametersBase param = new org.ovirt.engine.core.common.action.StoragePoolParametersBase ( ) ; org.ovirt.engine.core.bll.storage.pool.RemoveStoragePoolCommand < org.ovirt.engine.core.common.action.StoragePoolParametersBase > cmd = org.ovirt.engine.core.bll.storage.pool.RemoveStoragePoolCommandTest.createCommand ( param ) ; java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > domainsList = new java.util.ArrayList < > ( ) ; org.ovirt.engine.core.common.businessentities.StorageDomain tempStorageDomains = new org.ovirt.engine.core.common.businessentities.StorageDomain ( ) ; tempStorageDomains.setStatus ( StorageDomainStatus.Active ) ; domainsList.add ( tempStorageDomains ) ; org.junit.Assert.assertFalse ( cmd.validateDomainsInMaintenance ( domainsList ) ) ; }
Source:
public static org.ovirt.engine.core.bll.provider.storage.OpenStackImageProviderProxy getFromStorageDomainId ( org.ovirt.engine.core.compat.Guid storageDomainId , org.ovirt.engine.core.bll.provider.ProviderProxyFactory providerProxyFactory ) { org.ovirt.engine.core.common.businessentities.StorageDomainStatic storageDomainStatic = getDbFacade ( ) . getStorageDomainStaticDao ( ) . get ( storageDomainId ) ; if ( storageDomainStatic != null ) { org.ovirt.engine.core.common.businessentities.Provider < ? > provider = getDbFacade ( ) . getProviderDao ( ) . get ( new org.ovirt.engine.core.compat.Guid ( storageDomainStatic.getStorage ( ) ) ) ; return providerProxyFactory.create ( provider ) ; } return null ; }

Target:
public static org.ovirt.engine.core.bll.provider.storage.OpenStackImageProviderProxy getFromStorageDomainId ( org.ovirt.engine.core.compat.Guid storageDomainId , org.ovirt.engine.core.bll.provider.ProviderProxyFactory providerProxyFactory ) { org.ovirt.engine.core.common.businessentities.StorageDomainStatic storageDomainStatic = org.ovirt.engine.core.di.Injector.get ( org.ovirt.engine.core.dao.StorageDomainStaticDao.class ) . get ( storageDomainId ) ; if ( storageDomainStatic != null ) { org.ovirt.engine.core.common.businessentities.Provider < ? > provider = org.ovirt.engine.core.di.Injector.get ( org.ovirt.engine.core.dao.provider.ProviderDao.class ) . get ( new org.ovirt.engine.core.compat.Guid ( storageDomainStatic.getStorage ( ) ) ) ; return providerProxyFactory.create ( provider ) ; } return null ; }
Source:
public static void Init ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.StoragePool > allPools = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStoragePoolDao ( ) . getAll ( ) ; for ( org.ovirt.engine.core.common.businessentities.StoragePool pool : allPools ) { if ( ( pool.getstatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.StoragePoolStatus.NotOperational ) ) { org.ovirt.engine.core.bll.storage.StoragePoolStatusHandler.PoolStatusChanged ( pool.getId ( ) , StoragePoolStatus.NotOperational ) ; } } }

Target:
public static void Init ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.StoragePool > allPools = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStoragePoolDao ( ) . getAll ( ) ; for ( org.ovirt.engine.core.common.businessentities.StoragePool pool : allPools ) { if ( ( pool.getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.StoragePoolStatus.NotOperational ) ) { org.ovirt.engine.core.bll.storage.StoragePoolStatusHandler.poolStatusChanged ( pool.getId ( ) , StoragePoolStatus.NotOperational ) ; } } }
Source:
public static void CacheConfigValues ( 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 returnValue , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( returnValue != null ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.cachedConfigValuesPreConvert.putAll ( ( ( java.util.HashMap < org.ovirt.engine.core.compat.KeyValuePairCompat < org.ovirt.engine.core.common.queries.ConfigurationValues , java.lang.String > , java.lang.Object > ) ( returnValue ) ) ) ; } return org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.cachedConfigValuesPreConvert ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetConfigurationValues , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }

Target:
private static void CacheConfigValues ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ; aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object returnValue , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( returnValue != null ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.cachedConfigValuesPreConvert.putAll ( ( ( java.util.HashMap < org.ovirt.engine.core.compat.KeyValuePairCompat < org.ovirt.engine.core.common.queries.ConfigurationValues , java.lang.String > , java.lang.Object > ) ( returnValue ) ) ) ; } return org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.cachedConfigValuesPreConvert ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetConfigurationValues , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.StorageServerConnections createISCSIConnection ( java.lang.String connection , org.ovirt.engine.core.common.businessentities.StorageType type , java.lang.String iqn , java.lang.String port , java.lang.String user , java.lang.String password ) { org.ovirt.engine.core.compat.Guid id = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; org.ovirt.engine.core.common.businessentities.StorageServerConnections connectionDetails = populateBasicConnectionDetails ( id , connection , type ) ; connectionDetails.setiqn ( iqn ) ; connectionDetails.setport ( port ) ; connectionDetails.setuser_name ( user ) ; connectionDetails.setpassword ( password ) ; return connectionDetails ; }

Target:
public void updateChangeConnectionType ( ) { org.ovirt.engine.core.common.businessentities.StorageServerConnections iscsiConnection = createISCSIConnection ( "10.35.16.25" , StorageType.ISCSI , "iqn.2013-04.myhat.com:aaa-target1" , "3260" , "user1" , "mypassword123" ) ; parameters.setStorageServerConnection ( iscsiConnection ) ; org.mockito.Mockito.when ( storageConnDao.get ( iscsiConnection.getid ( ) ) ) . thenReturn ( oldNFSConnection ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( command , VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_CONNECTION_UNSUPPORTED_CHANGE_STORAGE_TYPE ) ; }
Source:
public static void getVmListByClusterName ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String clusterName ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VM > vms = org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.VM > cast ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.IVdcQueryable > ) ( source ) ) ) ; return vms ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( ( "Vms: cluster=" + clusterName ) , org.ovirt.engine.core.common.interfaces.SearchType.VM ) , aQuery ) ; }

Target:
public static void getNextAvailableDiskAliasNameByVMId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , 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 ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetNextAvailableDiskAliasNameByVMId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) , aQuery ) ; }
Source:
private void initStorageDomain ( ) { org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain = new org.ovirt.engine.core.common.businessentities.StorageDomain ( ) ; storageDomain.setId ( storageDomainId ) ; storageDomain.setStoragePoolId ( storagePoolId ) ; org.mockito.Mockito.doReturn ( storageDomainDao ) . when ( command ) . getStorageDomainDao ( ) ; org.mockito.Mockito.when ( storageDomainDao.get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( storageDomain ) ; org.mockito.Mockito.when ( storageDomainDao.getForStoragePool ( storageDomainId , storagePoolId ) ) . thenReturn ( storageDomain ) ; }

Target:
public void validateFailedDiskInterfaceUnsupported ( ) { mockVmStatusUp ( ) ; createVirtIODisk ( ) ; initStorageDomain ( ) ; org.mockito.Mockito.when ( diskVmElementValidator.isDiskInterfaceSupported ( org.mockito.Matchers.any ( org.ovirt.engine.core.common.businessentities.VM.class ) ) ) . thenReturn ( new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_DISK_INTERFACE_UNSUPPORTED ) ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( command , EngineMessage.ACTION_TYPE_DISK_INTERFACE_UNSUPPORTED ) ; }
Source:
public void invokeClient ( ) { boolean sslTarget = ( consoleOptions.getSecurePort ( ) ) != ( - 1 ) ; int port = ( sslTarget ) ? consoleOptions.getSecurePort ( ) : consoleOptions.getPort ( ) ; org.ovirt.engine.ui.common.uicommon.WebClientConsoleInvoker invoker = new org.ovirt.engine.ui.common.uicommon.WebClientConsoleInvoker ( org.ovirt.engine.ui.common.uicommon.SpiceHtml5Impl.CLIENT_PAGE , getConfig ( ) , getOptions ( ) . getHost ( ) , port , getOptions ( ) . getTicket ( ) , sslTarget ) ; invoker.invokeClient ( ) ; }

Target:
public void invokeClient ( ) { boolean sslTarget = ( consoleOptions.getRawSecurePort ( ) ) != ( - 1 ) ; int port = ( sslTarget ) ? consoleOptions.getSecurePort ( ) : consoleOptions.getPort ( ) ; org.ovirt.engine.ui.common.uicommon.WebClientConsoleInvoker invoker = new org.ovirt.engine.ui.common.uicommon.WebClientConsoleInvoker ( org.ovirt.engine.ui.common.uicommon.SpiceHtml5Impl.CLIENT_PAGE , getConfig ( ) , getOptions ( ) . getHost ( ) , port , getOptions ( ) . getTicket ( ) , sslTarget ) ; invoker.invokeClient ( ) ; }
Source:
protected void processIncoming ( ) throws java.io.IOException , org.ovirt.vdsm.jsonrpc.client.ClientConnectionException { if ( ( this . ibuff ) == null ) { this . ibuff = java.nio.ByteBuffer.allocate ( 16384 ) ; readBytes ( this . ibuff ) ; } else { readBytes ( this . ibuff ) ; } }

Target:
private void processHeartbeat ( ) { if ( ( ( this . lastHeartbeat ) + ( this . policy.getHeartbeat ( ) ) ) < ( java.lang.System.currentTimeMillis ( ) ) ) { org.ovirt.vdsm.jsonrpc.client.reactors.ReactorClient.log.debug ( "Heartbeat exeeded. Closing channel" ) ; this . closeChannel ( ) ; } }
Source:
public static void getNextAvailableDiskAliasNameByVMId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , 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 ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetNextAvailableDiskAliasNameByVMId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) , aQuery ) ; }

Target:
public void getGlusterHook ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hookId , boolean includeServerHooks ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterHookById , new org.ovirt.engine.core.common.queries.gluster.GlusterHookQueryParameters ( hookId , includeServerHooks ) , aQuery ) ; }
Source:
public void calculateNetworkImplementationDetailsNetworkMtuOutOfSync ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface = createNetworkDevice ( ) ; calculateNetworkImplementationDetailsAndAssertSync ( iface , false , iface.getNetworkName ( ) , iface.isBridged ( ) , ( ( iface.getMtu ( ) ) + 1 ) , iface.getVlanId ( ) , null ) ; }

Target:
public void calculateNetworkImplementationDetailsNetworkMtuOutOfSync ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface = createNetworkDevice ( ) ; calculateNetworkImplementationDetailsAndAssertSync ( iface , false , iface.getNetworkName ( ) , iface.isBridged ( ) , ( ( iface.getMtu ( ) ) + 1 ) , iface.getVlanId ( ) , createQos ( ) ) ; }
Source:
public void testGetAllForStoragePool ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > result = dao.getAllForStoragePool ( org.ovirt.engine.core.dao.StorageDomainDaoTest.EXISTING_STORAGE_POOL_ID ) ; org.ovirt.engine.core.dao.StorageDomainDaoTest.assertGetAllForStoragePoolResult ( result , org.ovirt.engine.core.dao.StorageDomainDaoTest.EXISTING_STORAGE_POOL_ID ) ; }

Target:
public void testGetPermittedStorageDomains ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > result = dao.getPermittedStorageDomainsByStoragePool ( FixturesTool.USER_EXISTING_ID , ActionGroup.CONFIGURE_VM_STORAGE , FixturesTool.DATA_CENTER ) ; org.junit.Assert.assertFalse ( result.isEmpty ( ) ) ; org.junit.Assert.assertEquals ( result.get ( 0 ) . getId ( ) , existingDomain.getId ( ) ) ; }
Source:
public void testIgnoresCase ( ) { for ( java.lang.String value : getCaseCombinations ( "true" ) ) { org.junit.Assert.assertTrue ( org.ovirt.engine.api.utils.BooleanParser.parseBoolean ( value ) ) ; } for ( java.lang.String value : getCaseCombinations ( "false" ) ) { org.junit.Assert.assertFalse ( org.ovirt.engine.api.utils.BooleanParser.parseBoolean ( value ) ) ; } }

Target:
public void testIgnoresCase ( ) { for ( java.lang.String value : getCaseCombinations ( "true" ) ) { org.junit.jupiter.api.Assertions.assertTrue ( org.ovirt.engine.api.utils.BooleanParser.parseBoolean ( value ) ) ; } for ( java.lang.String value : getCaseCombinations ( "false" ) ) { org.junit.jupiter.api.Assertions.assertFalse ( org.ovirt.engine.api.utils.BooleanParser.parseBoolean ( value ) ) ; } }
Source:
protected boolean checkStorageDomainNameLengthValid ( ) { boolean result = true ; if ( ( org.ovirt.engine.core.bll.storage.StorageDomainCommandBase.getStorageDomain ( ) . getStorageName ( ) . length ( ) ) > ( org.ovirt.engine.core.common.config.Config.< java.lang.Integer > getValue ( ConfigValues.StorageDomainNameSizeLimit ) ) ) { addCanDoActionMessage ( EngineMessage.ACTION_TYPE_FAILED_NAME_LENGTH_IS_TOO_LONG ) ; result = false ; } return result ; }

Target:
protected boolean checkStorageDomainNameLengthValid ( ) { boolean result = true ; if ( ( org.apache.commons.lang.StringUtils.isNotEmpty ( org.ovirt.engine.core.bll.storage.StorageDomainCommandBase.getStorageDomain ( ) . getStorageName ( ) ) ) && ( ( org.ovirt.engine.core.bll.storage.StorageDomainCommandBase.getStorageDomain ( ) . getStorageName ( ) . length ( ) ) > ( org.ovirt.engine.core.common.config.Config.< java.lang.Integer > getValue ( ConfigValues.StorageDomainNameSizeLimit ) ) ) ) { addCanDoActionMessage ( EngineMessage.ACTION_TYPE_FAILED_NAME_LENGTH_IS_TOO_LONG ) ; result = false ; } return result ; }
Source:
private boolean registerLibvirtSecrets ( org.ovirt.engine.core.bll.context.CommandContext cmdContext , org.ovirt.engine.core.common.businessentities.VDS vds , org.ovirt.engine.core.compat.Guid poolId ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.LibvirtSecret > libvirtSecrets = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getLibvirtSecretDao ( ) . getAllByStoragePoolIdFilteredByActiveStorageDomains ( poolId ) ; if ( ( ! ( libvirtSecrets.isEmpty ( ) ) ) && ( ! ( registerLibvirtSecrets ( vds , libvirtSecrets , false ) ) ) ) { setNonOperational ( cmdContext , vds.getId ( ) , NonOperationalReason.LIBVIRT_SECRETS_REGISTRATION_FAILURE ) ; return false ; } return true ; }

Target:
private boolean handleLibvirtSecrets ( org.ovirt.engine.core.bll.context.CommandContext cmdContext , org.ovirt.engine.core.common.businessentities.VDS vds , org.ovirt.engine.core.compat.Guid poolId ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.LibvirtSecret > libvirtSecrets = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getLibvirtSecretDao ( ) . getAllByStoragePoolIdFilteredByActiveStorageDomains ( poolId ) ; if ( ( ! ( libvirtSecrets.isEmpty ( ) ) ) && ( ! ( registerLibvirtSecretsImpl ( vds , libvirtSecrets , false ) ) ) ) { org.ovirt.engine.core.bll.storage.CINDERStorageHelper.log.error ( "Failed to register libvirt secret on vds {}." , vds.getName ( ) ) ; setNonOperational ( cmdContext , vds.getId ( ) , NonOperationalReason.LIBVIRT_SECRETS_REGISTRATION_FAILURE ) ; return false ; } return true ; }
Source:
protected org.jboss.resteasy.client.ClientExecutor createClientExecutor ( ) { int socketTimeOut = ( org.ovirt.engine.core.common.config.Config.< java.lang.Integer > getValue ( ConfigValues.ExternalNetworkProviderTimeout ) ) * 1000 ; int connectionTimeOut = ( org.ovirt.engine.core.common.config.Config.< java.lang.Integer > getValue ( ConfigValues.ExternalNetworkProviderConnectionTimeout ) ) * 1000 ; org.apache.http.impl.client.DefaultHttpClient httpClient = new org.apache.http.impl.client.DefaultHttpClient ( ) ; org.apache.http.params.HttpParams params = httpClient.getParams ( ) ; org.apache.http.params.HttpConnectionParams.setConnectionTimeout ( params , connectionTimeOut ) ; org.apache.http.params.HttpConnectionParams.setSoTimeout ( params , socketTimeOut ) ; return new org.jboss.resteasy.client.core.executors.ApacheHttpClient4Executor ( httpClient ) ; }

Target:
protected org.jboss.resteasy.client.ClientExecutor createClientExecutor ( ) { org.apache.http.impl.client.DefaultHttpClient httpClient = new org.apache.http.impl.client.DefaultHttpClient ( ) ; configureTimeouts ( httpClient ) ; registerExternalProvidersTrustStore ( httpClient ) ; return new org.jboss.resteasy.client.core.executors.ApacheHttpClient4Executor ( httpClient ) ; }
Source:
protected void setUpQueryExpectations ( java.lang.String query , java.lang.Object failure ) throws java.lang.Exception { assertEquals ( "" , query ) ; setUpEntityQueryExpectations ( VdcQueryType.GetNetworkLabelsByNetworkId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendNetworkLabelsResourceTest.networkId } , getEntityList ( ) , failure ) ; control.replay ( ) ; }

Target:
protected void setUpQueryExpectations ( java.lang.String query , java.lang.Object failure ) throws java.lang.Exception { assertEquals ( "" , query ) ; setUpEntityQueryExpectations ( VdcQueryType.GetNetworkLabelsByNetworkId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendNetworkLabelsResourceTest.NETWORK_ID } , getEntityList ( ) , failure ) ; control.replay ( ) ; }
Source:
public void testGetAllForStoragePoolWithPermissionsUnprivilegedUser ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > result = dao.getAllForStoragePool ( org.ovirt.engine.core.dao.StorageDomainDaoTest.EXISTING_STORAGE_POOL_ID , org.ovirt.engine.core.dao.UNPRIVILEGED_USER_ID , true ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertTrue ( result.isEmpty ( ) ) ; }

Target:
public void testGetPermittedStorageDomains ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > result = dao.getPermittedStorageDomainsByStoragePool ( FixturesTool.USER_EXISTING_ID , ActionGroup.CONFIGURE_VM_STORAGE , FixturesTool.DATA_CENTER ) ; org.junit.Assert.assertFalse ( result.isEmpty ( ) ) ; org.ovirt.engine.core.common.businessentities.StorageDomain domain = result.get ( 0 ) ; org.junit.Assert.assertEquals ( existingDomain.getId ( ) , domain.getId ( ) ) ; org.junit.Assert.assertEquals ( "Wrong committed disk size" , 8 , domain.getCommittedDiskSize ( ) ) ; org.junit.Assert.assertEquals ( "Wrong actual disk size" , 4 , domain.getActualImagesSize ( ) ) ; }
Source:
public void validateTemplateImageIsLocked ( ) { initializeCommand ( new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ) ; command.getParameters ( ) . setOperation ( ImageOperation.Copy ) ; command.init ( ) ; initTemplateDiskImage ( ) ; command.getImage ( ) . setImageStatus ( ImageStatus.LOCKED ) ; org.mockito.Mockito.doReturn ( new org.ovirt.engine.core.common.businessentities.VmTemplate ( ) ) . when ( command ) . getTemplateForImage ( ) ; command.init ( ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( command , EngineMessage.VM_TEMPLATE_IMAGE_IS_LOCKED ) ; }

Target:
public void validateTemplateImageIsLocked ( ) { initializeCommand ( new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) , VmEntityType.TEMPLATE ) ; command.getParameters ( ) . setOperation ( ImageOperation.Copy ) ; command.getImage ( ) . setImageStatus ( ImageStatus.LOCKED ) ; org.mockito.Mockito.doReturn ( new org.ovirt.engine.core.common.businessentities.VmTemplate ( ) ) . when ( command ) . getTemplateForImage ( ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( command , EngineMessage.VM_TEMPLATE_IMAGE_IS_LOCKED ) ; }
Source:
public void canDoActionSucceedsWithForceOption ( ) throws java.lang.Exception { command = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.RemoveVdsCommand ( new org.ovirt.engine.core.common.action.RemoveVdsParameters ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , true ) ) ) ; prepareMocks ( ) ; mockVdsWithStatus ( VDSStatus.Maintenance ) ; mockVdsDynamic ( ) ; mockVmsPinnedToHost ( java.util.Collections.< java.lang.String > emptyList ( ) ) ; mockIsGlusterEnabled ( true ) ; mockHasVolumeOnServer ( true ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionSuccess ( command ) ; }

Target:
public void validateSucceedsWithForceOption ( ) throws java.lang.Exception { command = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.RemoveVdsCommand ( new org.ovirt.engine.core.common.action.RemoveVdsParameters ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , true ) ) ) ; prepareMocks ( ) ; mockVdsWithStatus ( VDSStatus.Maintenance ) ; mockVdsDynamic ( ) ; mockVmsPinnedToHost ( java.util.Collections.< java.lang.String > emptyList ( ) ) ; mockIsGlusterEnabled ( true ) ; mockHasVolumeOnServer ( true ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateSuccess ( command ) ; }
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 getAAAProfilesEntriesList ( 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.Collection < org.ovirt.engine.core.aaa.ProfileEntry > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.aaa.ProfileEntry > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAAAProfileList , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }
Source:
protected void InitDetailModels ( ) { super . InitDetailModels ( ) ; org.ovirt.engine.ui.uicompat.ObservableCollection < org.ovirt.engine.ui.uicommonweb.models.EntityModel > list = new org.ovirt.engine.ui.uicompat.ObservableCollection < org.ovirt.engine.ui.uicommonweb.models.EntityModel > ( ) ; list.add ( new org.ovirt.engine.ui.uicommonweb.models.networks.NetworkGeneralModel ( ) ) ; list.add ( new org.ovirt.engine.ui.uicommonweb.models.networks.NetworkClusterListModel ( ) ) ; list.add ( new org.ovirt.engine.ui.uicommonweb.models.networks.NetworkHostListModel ( ) ) ; list.add ( new org.ovirt.engine.ui.uicommonweb.models.networks.NetworkVmListModel ( ) ) ; list.add ( new org.ovirt.engine.ui.uicommonweb.models.networks.NetworkTemplateListModel ( ) ) ; list.add ( new org.ovirt.engine.ui.uicommonweb.models.configure.PermissionListModel ( ) ) ; setDetailModels ( list ) ; }

Target:
protected void initDetailModels ( ) { super . initDetailModels ( ) ; org.ovirt.engine.ui.uicompat.ObservableCollection < org.ovirt.engine.ui.uicommonweb.models.EntityModel > list = new org.ovirt.engine.ui.uicompat.ObservableCollection < org.ovirt.engine.ui.uicommonweb.models.EntityModel > ( ) ; list.add ( new org.ovirt.engine.ui.uicommonweb.models.networks.NetworkGeneralModel ( ) ) ; list.add ( new org.ovirt.engine.ui.uicommonweb.models.networks.NetworkClusterListModel ( ) ) ; list.add ( new org.ovirt.engine.ui.uicommonweb.models.networks.NetworkHostListModel ( ) ) ; list.add ( new org.ovirt.engine.ui.uicommonweb.models.networks.NetworkVmListModel ( ) ) ; list.add ( new org.ovirt.engine.ui.uicommonweb.models.networks.NetworkTemplateListModel ( ) ) ; list.add ( new org.ovirt.engine.ui.uicommonweb.models.configure.PermissionListModel ( ) ) ; setDetailModels ( list ) ; }
Source:
public void testPersistNetworkAttachmentsForInterfaceWithoutNetworkNothingIsPersisted ( ) { org.mockito.Mockito.when ( networkAttachmentDao.getAllForHost ( org.mockito.Matchers.eq ( hostId ) ) ) . thenReturn ( new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.NetworkAttachment > ( ) ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.HostNetworkAttachmentsPersister persister = new org.ovirt.engine.core.vdsbroker.vdsbroker.HostNetworkAttachmentsPersister ( networkAttachmentDao , hostId , new java.util.ArrayList ( java.util.Arrays.asList ( interfaceWithoutAttachedNetwork ) ) , java.util.Collections.< org.ovirt.engine.core.common.businessentities.network.NetworkAttachment > emptyList ( ) , clusterNetworks ) ; persister.persistNetworkAttachments ( ) ; org.mockito.Mockito.verify ( networkAttachmentDao ) . getAllForHost ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ; org.mockito.Mockito.verifyNoMoreInteractions ( networkAttachmentDao ) ; }

Target:
public void testPersistNetworkAttachmentsForInterfaceWithoutNetworkNothingIsPersisted ( ) { org.mockito.Mockito.when ( networkAttachmentDao.getAllForHost ( org.mockito.Matchers.eq ( hostId ) ) ) . thenReturn ( new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.NetworkAttachment > ( ) ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.HostNetworkAttachmentsPersister persister = createPersister ( java.util.Collections.< org.ovirt.engine.core.common.businessentities.network.NetworkAttachment > emptyList ( ) , interfaceWithoutAttachedNetwork ) ; persister.persistNetworkAttachments ( ) ; org.mockito.Mockito.verify ( networkAttachmentDao ) . getAllForHost ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ; org.mockito.Mockito.verifyNoMoreInteractions ( networkAttachmentDao ) ; }
Source:
public org.ovirt.engine.api.v3.types.V3NIC update ( org.ovirt.engine.api.v3.types.V3NIC nic ) { return adaptUpdate ( delegate :: update , nic ) ; }

Target:
public org.ovirt.engine.api.v3.types.V3NIC update ( org.ovirt.engine.api.v3.types.V3NIC v3Nic ) { org.ovirt.engine.api.model.Nic v4Nic = org.ovirt.engine.api.v3.adapters.V3InAdapters.adaptIn ( v3Nic ) ; org.ovirt.engine.api.v3.helpers.V3NICHelper.setVnicProfile ( vmId , v3Nic , v4Nic ) ; try { return org.ovirt.engine.api.v3.adapters.V3OutAdapters.adaptOut ( delegate.update ( v4Nic ) ) ; } catch ( javax.ws.rs.WebApplicationException exception ) { throw adaptException ( exception ) ; } }
Source:
protected void executeCommand ( ) { org.ovirt.engine.core.common.businessentities.VDSGroup vdsGroup = org.ovirt.engine.core.bll.InitVdsOnUpCommand.getVdsGroup ( ) ; if ( vdsGroup.supportsVirtService ( ) ) { initVirtResources ( ) ; } org.ovirt.engine.core.bll.InitVdsOnUpCommand.setSucceeded ( true ) ; }

Target:
protected void executeCommand ( ) { org.ovirt.engine.core.common.businessentities.VDSGroup vdsGroup = org.ovirt.engine.core.bll.InitVdsOnUpCommand.getVdsGroup ( ) ; if ( vdsGroup.supportsVirtService ( ) ) { initVirtResources ( ) ; } if ( vdsGroup.supportsGlusterService ( ) ) { initGlusterPeerProcess ( ) ; } org.ovirt.engine.core.bll.InitVdsOnUpCommand.setSucceeded ( true ) ; }
Source:
public static void getExternalProviderHostGroupList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.common.businessentities.Provider provider ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ExternalHostGroup > ( ) ; } return source ; } } ; org.ovirt.engine.core.common.queries.ProviderQueryParameters params = new org.ovirt.engine.core.common.queries.ProviderQueryParameters ( ) ; params.setProvider ( provider ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetHostGroupsFromExternalProvider , params , aQuery ) ; }

Target:
public void getAllProvidersByType ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.common.businessentities.ProviderType providerType ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Provider > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllProviders , new org.ovirt.engine.core.common.queries.GetAllProvidersParameters ( providerType ) , aQuery ) ; }
Source:
public org.ovirt.engine.ui.common.presenter.AbstractModelBoundPopupPresenterWidget < ? extends org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel , ? > getConfirmModelPopup ( org.ovirt.engine.ui.uicommonweb.models.vms.DiskModel source , org.ovirt.engine.ui.uicommonweb.UICommand lastExecutedCommand ) { if ( lastExecutedCommand.getName ( ) . equals ( "OnSave" ) ) { return forceCreateConfirmPopupProvider.get ( ) ; } else { return super . getConfirmModelPopup ( source , lastExecutedCommand ) ; } }

Target:
public org.ovirt.engine.ui.common.presenter.AbstractModelBoundPopupPresenterWidget < ? extends org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel , ? > getConfirmModelPopup ( org.ovirt.engine.ui.uicommonweb.models.vms.AbstractDiskModel source , org.ovirt.engine.ui.uicommonweb.UICommand lastExecutedCommand ) { if ( lastExecutedCommand.getName ( ) . equals ( "OnSave" ) ) { return forceCreateConfirmPopupProvider.get ( ) ; } else { return super . getConfirmModelPopup ( source , lastExecutedCommand ) ; } }
Source:
public com.google.gwt.resources.client.ImageResource getValue ( T value ) { setTitle ( value.getStopReason ( ) ) ; if ( ( ( value.getStopReason ( ) ) != null ) && ( ! ( value.getStopReason ( ) . trim ( ) . isEmpty ( ) ) ) ) { return org.ovirt.engine.ui.webadmin.widget.table.column.ReasonColumn.getApplicationResources ( ) . commentImage ( ) ; } return null ; }

Target:
public com.google.gwt.resources.client.ImageResource getValue ( T value ) { org.ovirt.engine.ui.webadmin.widget.table.column.ReasonColumn.setTitle ( getReason ( value ) ) ; if ( ( ( getReason ( value ) ) != null ) && ( ! ( getReason ( value ) . trim ( ) . isEmpty ( ) ) ) ) { return org.ovirt.engine.ui.webadmin.widget.table.column.ReasonColumn.getApplicationResources ( ) . commentImage ( ) ; } return null ; }
Source:
public void hostNameNotUsed ( ) { org.mockito.Mockito.when ( hostDao.getAllForHostname ( org.mockito.Matchers.any ( java.lang.String.class ) ) ) . thenReturn ( java.util.Collections.emptyList ( ) ) ; org.junit.Assert.assertThat ( validator.hostNameNotUsed ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }

Target:
public void hostNameNotUsed ( ) { org.mockito.Mockito.when ( hostDao.getAllForHostname ( org.mockito.ArgumentMatchers.any ( java.lang.String.class ) ) ) . thenReturn ( java.util.Collections.emptyList ( ) ) ; org.junit.Assert.assertThat ( validator.hostNameNotUsed ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }
Source:
protected boolean isAsync ( ) { java.lang.String value = org.ovirt.engine.api.common.util.QueryHelper.getMatrixConstraint ( getUriInfo ( ) , org.ovirt.engine.api.restapi.resource.BackendResource.ASYNC_CONSTRAINT ) ; if ( value == null ) { return false ; } else { if ( ( value.equalsIgnoreCase ( org.ovirt.engine.api.restapi.resource.BackendResource.TRUE ) ) || ( value.isEmpty ( ) ) ) { return true ; } else if ( value.equalsIgnoreCase ( org.ovirt.engine.api.restapi.resource.BackendResource.FALSE ) ) { return false ; } else { throw new org.ovirt.engine.api.restapi.resource.exception.UrlParamException ( this , null , ( ( "Illegal value '" + value ) + "' for matrix param: 'async'. Acceptable values are 'true' or 'false'" ) ) ; } } }

Target:
protected boolean isAsync ( ) { return getBooleanMatrixConstraint ( org.ovirt.engine.api.restapi.resource.BackendResource.ASYNC_CONSTRAINT ) ; }
Source:
protected void executeCommand ( ) { if ( ! ( org.ovirt.engine.core.compat.Guid.isNullOrEmpty ( serverId ) ) ) { performActionForServicesOfServer ( ) ; } else if ( ! ( org.ovirt.engine.core.compat.Guid.isNullOrEmpty ( clusterId ) ) ) { performActionForServicesOfCluster ( ) ; } }

Target:
protected void executeCommand ( ) { if ( ! ( org.ovirt.engine.core.compat.Guid.isNullOrEmpty ( serverId ) ) ) { performActionForServicesOfServer ( ) ; } else if ( ! ( org.ovirt.engine.core.compat.Guid.isNullOrEmpty ( clusterId ) ) ) { performActionForServicesOfCluster ( ) ; } addCustomValue ( GlusterConstants.SERVICE_TYPE , getParameters ( ) . getServiceType ( ) . name ( ) ) ; }
Source:
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.StorageServerConnections ) ( 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 ) ; }

Target:
public static void getExistingStorageDomainList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hostId , org.ovirt.engine.core.common.businessentities.StorageDomainType domainType , org.ovirt.engine.core.common.businessentities.StorageType storageType , java.lang.String path ) { 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.StorageDomain > ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetExistingStorageDomainList , new org.ovirt.engine.core.common.queries.GetExistingStorageDomainListParameters ( hostId , storageType , domainType , path ) , aQuery ) ; }
Source:
public void getDbGroupsByUserId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid userId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter < java.util.List < org.ovirt.engine.core.common.businessentities.aaa.DbGroup > > ( ) { @ java.lang.Override public java.util.List < org.ovirt.engine.core.common.businessentities.aaa.DbGroup > Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return ( ( java.util.List < org.ovirt.engine.core.common.businessentities.aaa.DbGroup > ) ( source ) ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetDbGroupsByUserId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( userId ) , aQuery ) ; }

Target:
public void getDataCenterList ( 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 ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StoragePool > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( "DataCenter: sortby name" , org.ovirt.engine.core.common.interfaces.SearchType.StoragePool ) , aQuery ) ; }
Source:
protected void executeCommand ( ) { org.ovirt.engine.core.bll.storage.AddExistingBlockStorageDomainCommand.addStorageDomainInDb ( ) ; org.ovirt.engine.core.bll.storage.AddExistingBlockStorageDomainCommand.updateStorageDomainDynamicFromIrs ( ) ; java.util.List < org.ovirt.engine.core.common.businessentities.LUNs > luns = getLUNsFromVgInfo ( org.ovirt.engine.core.bll.storage.AddExistingBlockStorageDomainCommand.getStorageDomain ( ) . getStorage ( ) ) ; saveLUNsInDB ( luns ) ; org.ovirt.engine.core.bll.storage.AddExistingBlockStorageDomainCommand.setSucceeded ( true ) ; }

Target:
protected void executeCommand ( ) { org.ovirt.engine.core.bll.storage.AddExistingBlockStorageDomainCommand.updateStorageDomainWipeAfterDelete ( ) ; org.ovirt.engine.core.bll.storage.AddExistingBlockStorageDomainCommand.addStorageDomainInDb ( ) ; org.ovirt.engine.core.bll.storage.AddExistingBlockStorageDomainCommand.updateStorageDomainDynamicFromIrs ( ) ; java.util.List < org.ovirt.engine.core.common.businessentities.LUNs > luns = getLUNsFromVgInfo ( org.ovirt.engine.core.bll.storage.AddExistingBlockStorageDomainCommand.getStorageDomain ( ) . getStorage ( ) ) ; saveLUNsInDB ( luns ) ; org.ovirt.engine.core.bll.storage.AddExistingBlockStorageDomainCommand.setSucceeded ( true ) ; }
Source:
public void getDataCenterById ( 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 ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStoragePoolById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) . withoutRefresh ( ) , aQuery ) ; }

Target:
public void getHostById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVdsByVdsId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) . withoutRefresh ( ) , aQuery ) ; }
Source:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.AbstractDiskModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.AbstractDiskModel ) ( target ) ) ; java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > disks = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ) ( returnValue ) ) ; org.ovirt.engine.ui.uicommonweb.Linq.Sort ( disks , new org.ovirt.engine.ui.uicommonweb.Linq.DiskByAliasComparer ( ) ) ; java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.vms.DiskModel > diskModels = org.ovirt.engine.ui.uicommonweb.Linq.DisksToDiskModelList ( disks ) ; model.getExternalAttachableDisks ( ) . setItems ( org.ovirt.engine.ui.uicommonweb.Linq.ToEntityModelList ( org.ovirt.engine.ui.uicommonweb.Linq.FilterDisksByType ( diskModels , DiskStorageType.LUN ) ) ) ; }

Target:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.AbstractDiskModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.AbstractDiskModel ) ( target ) ) ; java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > disks = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ) ( returnValue ) ) ; org.ovirt.engine.ui.uicommonweb.Linq.sort ( disks , new org.ovirt.engine.ui.uicommonweb.Linq.DiskByAliasComparer ( ) ) ; java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.vms.DiskModel > diskModels = org.ovirt.engine.ui.uicommonweb.Linq.disksToDiskModelList ( disks ) ; model.getExternalAttachableDisks ( ) . setItems ( org.ovirt.engine.ui.uicommonweb.Linq.toEntityModelList ( org.ovirt.engine.ui.uicommonweb.Linq.filterDisksByType ( diskModels , DiskStorageType.LUN ) ) ) ; }
Source:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs changedArgs = ( ( org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ) ( args ) ) ; if ( "IsDiskHotPlugAvailable" . equals ( changedArgs.PropertyName ) ) { com.google.gwt.event.logical.shared.InitializeEvent.fire ( plugButtonDefinition ) ; com.google.gwt.event.logical.shared.InitializeEvent.fire ( unPlugButtonDefinition ) ; } }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs changedArgs = ( ( org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ) ( args ) ) ; if ( "IsDiskHotPlugAvailable" . equals ( changedArgs.propertyName ) ) { com.google.gwt.event.logical.shared.InitializeEvent.fire ( plugButtonDefinition ) ; com.google.gwt.event.logical.shared.InitializeEvent.fire ( unPlugButtonDefinition ) ; } }
Source:
public void dispose ( ) { org.ovirt.engine.core.vdsbroker.VdsManager.log.info ( "vdsManager::disposing" ) ; org.ovirt.engine.core.utils.timer.SchedulerUtilQuartzImpl.getInstance ( ) . deleteJob ( onTimerJobId ) ; org.ovirt.engine.core.utils.timer.SchedulerUtilQuartzImpl.getInstance ( ) . deleteJob ( vmsMonitoringJobId ) ; vdsProxy.close ( ) ; }

Target:
public void dispose ( ) { org.ovirt.engine.core.vdsbroker.VdsManager.log.info ( "vdsManager::disposing" ) ; org.ovirt.engine.core.utils.timer.SchedulerUtilQuartzImpl.getInstance ( ) . deleteJob ( onTimerJobId ) ; org.ovirt.engine.core.utils.timer.SchedulerUtilQuartzImpl.getInstance ( ) . deleteJob ( vmsMonitoringJobId ) ; org.ovirt.engine.core.utils.timer.SchedulerUtilQuartzImpl.getInstance ( ) . deleteJob ( availableUpdatesJobId ) ; vdsProxy.close ( ) ; }
Source:
public void testVmDiskWithPassDiscardAndWadExistsSucceeds ( ) { createVmDiskOnSd ( false , false ) ; createVmDiskOnSd ( true , false ) ; createVmDiskOnSd ( false , true ) ; createVmDiskOnSd ( true , true ) ; org.junit.Assert.assertTrue ( discardHelper.vmDiskWithPassDiscardAndWadExists ( storageDomainDisks , storageDomainVmDisks ) ) ; }

Target:
public void testVmDiskWithPassDiscardAndWadExistsSucceeds ( ) { createVmDiskOnSd ( false , false ) ; createVmDiskOnSd ( true , false ) ; createVmDiskOnSd ( false , true ) ; org.ovirt.engine.core.compat.Guid diskId = createVmDiskOnSd ( true , true ) ; storageDomainVmDisks.add ( createVmDisk ( diskId , false ) ) ; org.junit.Assert.assertTrue ( discardHelper.vmDiskWithPassDiscardAndWadExists ( storageDomainDisks , storageDomainVmDisks ) ) ; }