auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void testListCrashClientLocale ( ) throws java.lang.Exception { javax.ws.rs.core.UriInfo uriInfo = org.ovirt.engine.api.restapi.resource.AbstractBackendNetworkAttachmentsResourceTest.setUpUriExpectations ( null ) ; locales.add ( org.ovirt.engine.api.restapi.resource.CLIENT_LOCALE ) ; java.lang.Throwable t = new java.lang.RuntimeException ( FAILURE ) ; setUpNetworkAttachmentsQueryExpectations ( t ) ; collection.setUriInfo ( uriInfo ) ; control.replay ( ) ; try { getCollection ( ) ; org.ovirt.engine.api.restapi.resource.AbstractBackendNetworkAttachmentsResourceTest.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , org.ovirt.engine.api.restapi.resource.BACKEND_FAILED_CLIENT_LOCALE , t ) ; } finally { locales.clear ( ) ; } }

Target:
public void testListCrashClientLocale ( ) throws java.lang.Exception { javax.ws.rs.core.UriInfo uriInfo = org.ovirt.engine.api.restapi.resource.AbstractBackendNetworkAttachmentsResourceTest.setUpUriExpectations ( null ) ; locales.add ( org.ovirt.engine.api.restapi.resource.CLIENT_LOCALE ) ; java.lang.Throwable t = new java.lang.RuntimeException ( FAILURE ) ; setUpNetworkAttachmentsQueryExpectations ( t ) ; collection.setUriInfo ( uriInfo ) ; try { getCollection ( ) ; org.ovirt.engine.api.restapi.resource.AbstractBackendNetworkAttachmentsResourceTest.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , org.ovirt.engine.api.restapi.resource.BACKEND_FAILED_CLIENT_LOCALE , t ) ; } finally { locales.clear ( ) ; } }
Source:
protected void InitDetailModels ( ) { super . InitDetailModels ( ) ; org.ovirt.engine.core.compat.ObservableCollection < org.ovirt.engine.ui.uicommonweb.models.EntityModel > list = new org.ovirt.engine.core.compat.ObservableCollection < org.ovirt.engine.ui.uicommonweb.models.EntityModel > ( ) ; list.add ( new org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterPolicyModel ( ) ) ; list.add ( new org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterHostListModel ( ) ) ; list.add ( new org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterVmListModel ( ) ) ; list.add ( new org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterNetworkListModel ( ) ) ; list.add ( new org.ovirt.engine.ui.uicommonweb.models.configure.PermissionListModel ( ) ) ; setDetailModels ( list ) ; }

Target:
protected void InitDetailModels ( ) { super . InitDetailModels ( ) ; org.ovirt.engine.core.compat.ObservableCollection < org.ovirt.engine.ui.uicommonweb.models.EntityModel > list = new org.ovirt.engine.core.compat.ObservableCollection < org.ovirt.engine.ui.uicommonweb.models.EntityModel > ( ) ; list.add ( new org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterPolicyModel ( ) ) ; list.add ( new org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterNetworkListModel ( ) ) ; list.add ( new org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterHostListModel ( ) ) ; list.add ( new org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterVmListModel ( ) ) ; list.add ( new org.ovirt.engine.ui.uicommonweb.models.configure.PermissionListModel ( ) ) ; setDetailModels ( list ) ; }
Source:
private boolean canPerformQuotaValidation ( ) { if ( ( org.ovirt.engine.core.common.businessentities.Disk.DiskStorageType.IMAGE ) == ( _oldDisk.getDiskStorageType ( ) ) ) { if ( ! ( ( ( org.ovirt.engine.core.common.businessentities.DiskImage ) ( _oldDisk ) ) . getQuotaId ( ) . equals ( org.ovirt.engine.core.bll.UpdateVmDiskCommand.getQuotaId ( ) ) ) ) { return true ; } } return false ; }

Target:
private boolean canPerformQuotaValidation ( ) { if ( ( org.ovirt.engine.core.common.businessentities.Disk.DiskStorageType.IMAGE ) == ( _oldDisk.getDiskStorageType ( ) ) ) { if ( ! ( ( ( org.ovirt.engine.core.common.businessentities.DiskImage ) ( _oldDisk ) ) . getQuotaId ( ) . equals ( getQuotaId ( ) ) ) ) { return true ; } } return false ; }
Source:
public static void getStorageDomainById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storageDomainId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( org.ovirt.engine.core.common.businessentities.StorageDomain ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetStorageDomainById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( storageDomainId ) , aQuery ) ; }

Target:
public static void getStorageDomainById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storageDomainId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( org.ovirt.engine.core.common.businessentities.StorageDomain ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageDomainById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( storageDomainId ) , aQuery ) ; }
Source:
public void setDataCentersAndClusters ( org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel model , java.util.List < org.ovirt.engine.core.common.businessentities.StoragePool > dataCenters , java.util.List < org.ovirt.engine.core.common.businessentities.VDSGroup > clusters , org.ovirt.engine.core.compat.NGuid selectedCluster ) { if ( ( ( model.getBehavior ( ) . getSystemTreeSelectedItem ( ) ) != null ) && ( ( model.getBehavior ( ) . getSystemTreeSelectedItem ( ) . getType ( ) ) != ( org.ovirt.engine.ui.uicommonweb.models.SystemTreeItemType.System ) ) ) { setupDataCenterWithClustersFromSystemTree ( model , dataCenters , clusters , selectedCluster ) ; } else { setupDataCenterWithClusters ( model , dataCenters , clusters , selectedCluster ) ; } }

Target:
public void setDataCentersAndClusters ( org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel model , java.util.List < org.ovirt.engine.core.common.businessentities.StoragePool > dataCenters , java.util.List < org.ovirt.engine.core.common.businessentities.VDSGroup > clusters , org.ovirt.engine.core.compat.Guid selectedCluster ) { if ( ( ( model.getBehavior ( ) . getSystemTreeSelectedItem ( ) ) != null ) && ( ( model.getBehavior ( ) . getSystemTreeSelectedItem ( ) . getType ( ) ) != ( org.ovirt.engine.ui.uicommonweb.models.SystemTreeItemType.System ) ) ) { setupDataCenterWithClustersFromSystemTree ( model , dataCenters , clusters , selectedCluster ) ; } else { setupDataCenterWithClusters ( model , dataCenters , clusters , selectedCluster ) ; } }
Source:
void stubGetUserBySessionIdQuery ( ) { org.ovirt.engine.core.common.queries.VdcQueryReturnValue returnValue = new org.ovirt.engine.core.common.queries.VdcQueryReturnValue ( ) ; returnValue.setSucceeded ( true ) ; returnValue.setReturnValue ( mockUser ) ; org.mockito.Mockito.when ( mockBackend.runQuery ( org.mockito.Matchers.eq ( VdcQueryType.GetUserBySessionId ) , org.ovirt.engine.ui.frontend.server.gwt.AbstractGwtDynamicHostPageServletTest.isA ( org.ovirt.engine.core.common.queries.VdcQueryParametersBase.class ) ) ) . thenReturn ( returnValue ) ; }

Target:
void stubGetUserBySessionIdQuery ( ) { org.mockito.Mockito.when ( mockBackend.runQuery ( org.mockito.Matchers.eq ( VdcQueryType.GetUserBySessionId ) , org.ovirt.engine.ui.frontend.server.gwt.AbstractGwtDynamicHostPageServletTest.isA ( org.ovirt.engine.core.common.queries.VdcQueryParametersBase.class ) ) ) . thenReturn ( new org.ovirt.engine.core.common.queries.VdcQueryReturnValue ( ) { { setSucceeded ( true ) ; setReturnValue ( mockUser ) ; } } ) ; }
Source:
protected boolean canDoAction ( ) { initVmTemplate ( ) ; java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.DiskImage > disks = new java.util.ArrayList ( org.ovirt.engine.core.bll.ImportVmTemplateFromConfigurationCommand.getVmTemplate ( ) . getDiskTemplateMap ( ) . values ( ) ) ; setImagesWithStoragePoolId ( org.ovirt.engine.core.bll.ImportVmTemplateFromConfigurationCommand.getStorageDomain ( ) . getStoragePoolId ( ) , disks ) ; org.ovirt.engine.core.bll.ImportVmTemplateFromConfigurationCommand.getVmTemplate ( ) . setImages ( disks ) ; if ( ( org.ovirt.engine.core.bll.ImportVmTemplateFromConfigurationCommand.isImagesAlreadyOnTarget ( ) ) && ( ! ( validateUnregisteredEntity ( vmTemplateFromConfiguration , ovfEntityData ) ) ) ) { return false ; } return super . canDoAction ( ) ; }

Target:
protected boolean validate ( ) { initVmTemplate ( ) ; java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.DiskImage > disks = new java.util.ArrayList ( org.ovirt.engine.core.bll.ImportVmTemplateFromConfigurationCommand.getVmTemplate ( ) . getDiskTemplateMap ( ) . values ( ) ) ; setImagesWithStoragePoolId ( org.ovirt.engine.core.bll.ImportVmTemplateFromConfigurationCommand.getStorageDomain ( ) . getStoragePoolId ( ) , disks ) ; org.ovirt.engine.core.bll.ImportVmTemplateFromConfigurationCommand.getVmTemplate ( ) . setImages ( disks ) ; if ( ( org.ovirt.engine.core.bll.ImportVmTemplateFromConfigurationCommand.isImagesAlreadyOnTarget ( ) ) && ( ! ( validateUnregisteredEntity ( vmTemplateFromConfiguration , ovfEntityData ) ) ) ) { return false ; } return super . validate ( ) ; }
Source:
public org.ovirt.engine.core.compat.NGuid getUserId ( ) { if ( ( ( ( mUserId ) != null ) && ( mUserId.equals ( Guid.Empty ) ) ) && ( ( getCurrentUser ( ) ) != null ) ) { mUserId = getCurrentUser ( ) . getUserId ( ) ; } return mUserId ; }

Target:
public org.ovirt.engine.core.compat.Guid getUserId ( ) { if ( ( ( ( mUserId ) != null ) && ( mUserId.equals ( Guid.Empty ) ) ) && ( ( getCurrentUser ( ) ) != null ) ) { mUserId = getCurrentUser ( ) . getUserId ( ) ; } return mUserId ; }
Source:
public void testListCrashClientLocale ( ) throws java.lang.Exception { javax.ws.rs.core.UriInfo uriInfo = setUpUriExpectations ( null ) ; locales.add ( org.ovirt.engine.api.restapi.resource.CLIENT_LOCALE ) ; java.lang.Throwable t = new java.lang.RuntimeException ( FAILURE ) ; setUpMacPoolsQueryExpectations ( t ) ; collection.setUriInfo ( uriInfo ) ; control.replay ( ) ; try { getCollection ( ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , org.ovirt.engine.api.restapi.resource.BACKEND_FAILED_CLIENT_LOCALE , t ) ; } finally { locales.clear ( ) ; } }

Target:
public void testListCrashClientLocale ( ) throws java.lang.Exception { javax.ws.rs.core.UriInfo uriInfo = setUpUriExpectations ( null ) ; locales.add ( org.ovirt.engine.api.restapi.resource.CLIENT_LOCALE ) ; java.lang.Throwable t = new java.lang.RuntimeException ( FAILURE ) ; setUpMacPoolsQueryExpectations ( t ) ; collection.setUriInfo ( uriInfo ) ; try { getCollection ( ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , org.ovirt.engine.api.restapi.resource.BACKEND_FAILED_CLIENT_LOCALE , t ) ; } finally { locales.clear ( ) ; } }
Source:
public void setUp ( ) throws java.io.IOException { org.mockito.Mockito.doReturn ( cluster ) . when ( cmd ) . getCluster ( ) ; org.mockito.Mockito.doReturn ( java.util.Collections.emptyList ( ) ) . when ( cmd ) . getImages ( ) ; org.mockito.Mockito.when ( externalVnicProfileMappingValidator.validateExternalVnicProfileMapping ( new java.util.ArrayList < > ( ) , clusterId ) ) . thenReturn ( ValidationResult.VALID ) ; mockCluster ( ) ; setXmlOvfData ( ) ; }

Target:
public void setUp ( ) throws java.io.IOException { org.mockito.Mockito.doReturn ( cluster ) . when ( cmd ) . getCluster ( ) ; org.mockito.Mockito.doReturn ( java.util.Collections.emptyList ( ) ) . when ( cmd ) . getImages ( ) ; mockCluster ( ) ; setXmlOvfData ( ) ; }
Source:
void pluginReady ( java.lang.String pluginName ) { org.ovirt.engine.ui.webadmin.plugin.Plugin plugin = getPlugin ( pluginName ) ; if ( ( plugin != null ) && ( plugin.isInState ( PluginState.LOADING ) ) ) { if ( ( plugin.getEventHandlerObject ( ) ) == null ) { org.ovirt.engine.ui.webadmin.plugin.PluginManager.logger.warning ( ( ( "Plugin [" + pluginName ) + "] reports in as ready, but has no event handler object assigned" ) ) ; return ; } plugin.markAsReady ( ) ; org.ovirt.engine.ui.webadmin.plugin.PluginManager.logger.info ( ( ( "Plugin [" + pluginName ) + "] reports in as ready" ) ) ; initPlugin ( pluginName ) ; } }

Target:
void pluginReady ( java.lang.String pluginName ) { org.ovirt.engine.ui.webadmin.plugin.Plugin plugin = getPlugin ( pluginName ) ; if ( ( plugin != null ) && ( plugin.isInState ( PluginState.LOADING ) ) ) { if ( ( plugin.getEventHandlerObject ( ) ) == null ) { org.ovirt.engine.ui.webadmin.plugin.PluginManager.logger.warning ( ( ( "Plugin [" + pluginName ) + "] reports in as ready, but has no event handler object assigned" ) ) ; return ; } plugin.markAsReady ( ) ; org.ovirt.engine.ui.webadmin.plugin.PluginManager.logger.info ( ( ( "Plugin [" + pluginName ) + "] reports in as ready" ) ) ; initPlugin ( plugin ) ; } }
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:
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.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 ) ; }
Source:
public void shouldHandleEmptyHostList ( ) { final java.util.List < org.ovirt.engine.core.common.businessentities.VDS > filteredHost = policyUnit.filter ( new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ( ) , vm , null , org.mockito.Mockito.mock ( org.ovirt.engine.core.common.scheduling.PerHostMessages.class ) ) ; org.hamcrest.MatcherAssert.assertThat ( filteredHost , org.hamcrest.CoreMatchers.is ( org.hamcrest.Matchers.empty ( ) ) ) ; org.hamcrest.MatcherAssert.assertThat ( messages ( ) , org.hamcrest.CoreMatchers.is ( org.hamcrest.Matchers.empty ( ) ) ) ; }

Target:
public void shouldHandleEmptyHostList ( ) { final java.util.List < org.ovirt.engine.core.common.businessentities.VDS > filteredHost = policyUnit.filter ( cluster , new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ( ) , vm , null , org.mockito.Mockito.mock ( org.ovirt.engine.core.common.scheduling.PerHostMessages.class ) ) ; org.hamcrest.MatcherAssert.assertThat ( filteredHost , org.hamcrest.CoreMatchers.is ( org.hamcrest.Matchers.empty ( ) ) ) ; org.hamcrest.MatcherAssert.assertThat ( messages ( ) , org.hamcrest.CoreMatchers.is ( org.hamcrest.Matchers.empty ( ) ) ) ; }
Source:
public void init ( ) { super . init ( ) ; getIsAutoAssign ( ) . setEntity ( true ) ; getCustomPropertySheet ( ) . setKeyValueMap ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getCustomPropertiesList ( ) . get ( vm.getVdsGroupCompatibilityVersion ( ) ) ) ; getCustomPropertySheet ( ) . deserialize ( vm.getCustomProperties ( ) ) ; loadHosts ( ) ; }

Target:
public void init ( ) { super . init ( ) ; getIsAutoAssign ( ) . setEntity ( true ) ; getCustomPropertySheet ( ) . setKeyValueMap ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getCustomPropertiesList ( ) . get ( vm.getVdsGroupCompatibilityVersion ( ) ) ) ; getCustomPropertySheet ( ) . deserialize ( vm.getCustomProperties ( ) ) ; loadHosts ( ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.VM mockVm ( ) { org.ovirt.engine.core.common.businessentities.VM vm = new org.ovirt.engine.core.common.businessentities.VM ( ) ; vm.setstatus ( VMStatus.Down ) ; vm.setstorage_pool_id ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) ) ; org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseMockUtils.mockVmDao ( command , vmDAO ) ; org.powermock.api.mockito.PowerMockito.when ( vmDAO.get ( command.getParameters ( ) . getVmId ( ) ) ) . thenReturn ( vm ) ; return vm ; }

Target:
private org.ovirt.engine.core.common.businessentities.VM mockVm ( ) { org.ovirt.engine.core.common.businessentities.VM vm = new org.ovirt.engine.core.common.businessentities.VM ( ) ; vm.setstatus ( VMStatus.Down ) ; vm.setstorage_pool_id ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) ) ; org.mockito.Mockito.when ( vmDAO.get ( command.getParameters ( ) . getVmId ( ) ) ) . thenReturn ( vm ) ; return vm ; }
Source:
public void addExistingConnection ( ) { org.ovirt.engine.core.common.businessentities.StorageServerConnections newPosixConnection = createPosixConnection ( "multipass.my.domain.tlv.company.com:/export/allstorage/data1" , StorageType.POSIXFS , "nfs" , "timeo=30" ) ; parameters.setStorageServerConnection ( newPosixConnection ) ; parameters.setVdsId ( Guid.Empty ) ; org.mockito.Mockito.doReturn ( true ) . when ( command ) . initializeVds ( ) ; org.mockito.Mockito.doReturn ( true ) . when ( command ) . isConnWithSameDetailsExists ( ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( command , VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_CONNECTION_ALREADY_EXISTS ) ; }

Target:
public void addExistingConnection ( ) { org.ovirt.engine.core.common.businessentities.StorageServerConnections newPosixConnection = createPosixConnection ( "multipass.my.domain.tlv.company.com:/export/allstorage/data1" , StorageType.POSIXFS , "nfs" , "timeo=30" ) ; parameters.setStorageServerConnection ( newPosixConnection ) ; parameters.setVdsId ( Guid.Empty ) ; org.mockito.Mockito.doReturn ( true ) . when ( command ) . initializeVds ( ) ; org.mockito.Mockito.doReturn ( true ) . when ( command ) . isConnWithSameDetailsExists ( newPosixConnection ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( command , VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_CONNECTION_ALREADY_EXISTS ) ; }
Source:
public void OnSuccess ( java.lang.Object model1 , java.lang.Object ReturnValue1 ) { org.ovirt.engine.ui.uicommonweb.models.pools.PoolGeneralModel poolGeneralModel1 = ( ( org.ovirt.engine.ui.uicommonweb.models.pools.PoolGeneralModel ) ( model1 ) ) ; org.ovirt.engine.core.common.businessentities.storage_domains storage = ( ( org.ovirt.engine.core.common.businessentities.storage_domains ) ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( ReturnValue1 ) ) . getReturnValue ( ) ) ) ; poolGeneralModel1.setStorageDomain ( storage.getstorage_name ( ) ) ; poolGeneralModel1.getUpdateCompleteEvent ( ) . raise ( this , EventArgs.Empty ) ; }

Target:
public void OnSuccess ( java.lang.Object model1 , java.lang.Object ReturnValue1 ) { org.ovirt.engine.ui.uicommonweb.models.pools.PoolGeneralModel poolGeneralModel1 = ( ( org.ovirt.engine.ui.uicommonweb.models.pools.PoolGeneralModel ) ( model1 ) ) ; org.ovirt.engine.core.common.businessentities.StorageDomain storage = ( ( org.ovirt.engine.core.common.businessentities.StorageDomain ) ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( ReturnValue1 ) ) . getReturnValue ( ) ) ) ; poolGeneralModel1.setStorageDomain ( storage.getstorage_name ( ) ) ; poolGeneralModel1.getUpdateCompleteEvent ( ) . raise ( this , EventArgs.Empty ) ; }
Source:
public void insufficientDiskSpaceWithCollapse ( ) { setupDiskSpaceTest ( ) ; org.mockito.Mockito.doReturn ( true ) . when ( cmd ) . validateImages ( org.mockito.ArgumentMatchers.any ( ) ) ; org.mockito.Mockito.when ( cmd.getImportValidator ( ) . validateSpaceRequirements ( org.mockito.ArgumentMatchers.anyCollection ( ) ) ) . thenReturn ( new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_DISK_SPACE_LOW_ON_STORAGE_DOMAIN ) ) ; mockMemorySizeConfigValues ( org.ovirt.engine.core.compat.Version.getLast ( ) ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( cmd , EngineMessage.ACTION_TYPE_FAILED_DISK_SPACE_LOW_ON_STORAGE_DOMAIN ) ; }

Target:
public void insufficientDiskSpaceWithCollapse ( ) { setupDiskSpaceTest ( ) ; org.mockito.Mockito.doReturn ( true ) . when ( cmd ) . validateImages ( org.mockito.ArgumentMatchers.any ( ) ) ; org.mockito.Mockito.when ( cmd.getImportValidator ( ) . validateSpaceRequirements ( org.mockito.ArgumentMatchers.anyCollection ( ) ) ) . thenReturn ( new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_DISK_SPACE_LOW_ON_STORAGE_DOMAIN ) ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( cmd , EngineMessage.ACTION_TYPE_FAILED_DISK_SPACE_LOW_ON_STORAGE_DOMAIN ) ; }
Source:
private void doInit ( org.ovirt.engine.api.extensions.ExtMap input ) throws java.io.IOException , java.sql.SQLException { javax.sql.DataSource ds = new org.ovirt.engine.extension.aaa.jdbc.core.datasource.DataSourceProvider ( configuration ) . provide ( ) ; this . authentication = new org.ovirt.engine.extension.aaa.jdbc.core.Authentication ( ds ) ; this . tasks = new org.ovirt.engine.extension.aaa.jdbc.core.Tasks ( ds , this . authentication ) ; org.ovirt.engine.extension.aaa.jdbc.binding.api.ExtensionUtils.checkDbVersion ( ds.getConnection ( ) , input.< org.ovirt.engine.api.extensions.ExtMap > get ( Base.InvokeKeys.CONTEXT ) . < java.lang.String > get ( Base.ContextKeys.CONFIGURATION_FILE ) ) ; }

Target:
private void doInit ( org.ovirt.engine.api.extensions.ExtMap input ) throws java.io.IOException , java.sql.SQLException { javax.sql.DataSource ds = new org.ovirt.engine.extension.aaa.jdbc.core.datasource.DataSourceProvider ( configuration ) . provide ( ) ; this . authentication = new org.ovirt.engine.extension.aaa.jdbc.core.Authentication ( ds ) ; this . tasks = new org.ovirt.engine.extension.aaa.jdbc.core.Tasks ( ds , this . authentication ) ; org.ovirt.engine.extension.aaa.jdbc.binding.api.ExtensionUtils.checkDbVersion ( ds , input.< org.ovirt.engine.api.extensions.ExtMap > get ( Base.InvokeKeys.CONTEXT ) . < java.lang.String > get ( Base.ContextKeys.CONFIGURATION_FILE ) ) ; }
Source:
public java.lang.Void runInTransaction ( ) { if ( ! ( asyncTask.getChildCmdEntity ( ) . getRootCommandId ( ) . equals ( asyncTask.getChildCmdEntity ( ) . getId ( ) ) ) ) { coco.persistCommand ( asyncTask.getRootCmdEntity ( ) ) ; } coco.persistCommand ( asyncTask.getChildCmdEntity ( ) ) ; org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getAsyncTaskDao ( ) . saveOrUpdate ( asyncTask ) ; return null ; }

Target:
public java.lang.Void runInTransaction ( ) { if ( ( ( asyncTask.getChildCmdEntity ( ) . getRootCommandId ( ) ) != null ) && ( ! ( asyncTask.getChildCmdEntity ( ) . getRootCommandId ( ) . equals ( asyncTask.getChildCmdEntity ( ) . getId ( ) ) ) ) ) { coco.persistCommand ( asyncTask.getRootCmdEntity ( ) ) ; } coco.persistCommand ( asyncTask.getChildCmdEntity ( ) ) ; org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getAsyncTaskDao ( ) . saveOrUpdate ( asyncTask ) ; return null ; }
Source:
public javax.ws.rs.core.Response importCertificates ( org.ovirt.engine.api.model.Action action ) { org.ovirt.engine.core.common.businessentities.Provider provider = org.ovirt.engine.api.restapi.resource.BackendExternalProviderHelper.getProvider ( this , id ) ; java.util.List < org.ovirt.engine.core.common.businessentities.CertificateInfo > entities = getBackendCollection ( org.ovirt.engine.core.common.businessentities.CertificateInfo.class , VdcQueryType.GetProviderCertificateChain , new org.ovirt.engine.core.common.queries.ProviderQueryParameters ( provider ) ) ; if ( ( entities.size ( ) ) == 0 ) { return null ; } return performAction ( VdcActionType.ImportProviderCertificate , new org.ovirt.engine.core.common.action.ImportProviderCertificateParameters ( provider , entities.get ( 0 ) . getPayload ( ) ) ) ; }

Target:
public javax.ws.rs.core.Response importCertificates ( org.ovirt.engine.api.model.Action action ) { org.ovirt.engine.core.common.businessentities.Provider provider = org.ovirt.engine.api.restapi.resource.BackendExternalProviderHelper.getProvider ( this , id ) ; java.util.List < org.ovirt.engine.core.common.businessentities.CertificateInfo > entities = getBackendCollection ( org.ovirt.engine.core.common.businessentities.CertificateInfo.class , VdcQueryType.GetProviderCertificateChain , new org.ovirt.engine.core.common.queries.ProviderQueryParameters ( provider ) ) ; if ( ( entities.size ( ) ) == 0 ) { return null ; } return null ; }
Source:
public static void fillImagesMapBasedOnTemplate ( org.ovirt.engine.core.common.businessentities.VmTemplate template , java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.DiskImage > diskInfoDestinationMap , java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.StorageDomain > destStorages , boolean notCheckSize ) { java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > domains = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStorageDomainDao ( ) . getAllForStoragePool ( template.getStoragePoolId ( ) . getValue ( ) ) ; org.ovirt.engine.core.bll.ImagesHandler.fillImagesMapBasedOnTemplate ( template , domains , diskInfoDestinationMap , destStorages , notCheckSize ) ; }

Target:
public static void fillImagesMapBasedOnTemplate ( org.ovirt.engine.core.common.businessentities.VmTemplate template , java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.DiskImage > diskInfoDestinationMap , java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.StorageDomain > destStorages , boolean notCheckSize ) { java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > domains = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStorageDomainDao ( ) . getAllForStoragePool ( template.getStoragePoolId ( ) ) ; org.ovirt.engine.core.bll.ImagesHandler.fillImagesMapBasedOnTemplate ( template , domains , diskInfoDestinationMap , destStorages , notCheckSize ) ; }
Source:
public void twoNetworkInterfacesWithEmptyIp ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VdsNetworkInterface > listOfInterfaces = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VdsNetworkInterface > ( ) ; listOfInterfaces.add ( createVdsNetworkInterfaceWithStaticIp ( "" ) ) ; listOfInterfaces.add ( createVdsNetworkInterfaceWithStaticIp ( "" ) ) ; validateAndAssertResult ( listOfInterfaces , true ) ; }

Target:
public void twoNetworkInterfacesWithEmptyIp ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > listOfInterfaces = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > ( ) ; listOfInterfaces.add ( createVdsNetworkInterfaceWithStaticIp ( "" ) ) ; listOfInterfaces.add ( createVdsNetworkInterfaceWithStaticIp ( "" ) ) ; validateAndAssertResult ( listOfInterfaces , true ) ; }
Source:
public void diskInterfaceNotSupportedByOs ( ) { org.ovirt.engine.core.common.businessentities.VM vm = org.ovirt.engine.core.bll.validator.storage.DiskValidatorTest.createVM ( ) ; vm.setVmOs ( 2 ) ; initializeOsRepository ( vm.getOs ( ) , DiskInterface.VirtIO ) ; org.ovirt.engine.core.common.businessentities.storage.DiskVmElement dve = new org.ovirt.engine.core.common.businessentities.storage.DiskVmElement ( ) ; dve.setDiskInterface ( DiskInterface.VirtIO ) ; org.junit.Assert.assertThat ( validator.isDiskInterfaceSupported ( vm , dve ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.ACTION_TYPE_DISK_INTERFACE_UNSUPPORTED ) ) ; }

Target:
public void diskInterfaceNotSupportedByOs ( ) { org.ovirt.engine.core.common.businessentities.VM vm = org.ovirt.engine.core.bll.validator.storage.DiskValidatorTest.createVM ( ) ; vm.setVmOs ( 2 ) ; initializeOsRepository ( DiskInterface.VirtIO ) ; org.ovirt.engine.core.common.businessentities.storage.DiskVmElement dve = new org.ovirt.engine.core.common.businessentities.storage.DiskVmElement ( ) ; dve.setDiskInterface ( DiskInterface.VirtIO ) ; org.junit.Assert.assertThat ( validator.isDiskInterfaceSupported ( vm , dve ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.ACTION_TYPE_DISK_INTERFACE_UNSUPPORTED ) ) ; }
Source:
private void mockCommandCall ( org.ovirt.engine.core.common.action.ActionType actionType , boolean withContext ) { if ( withContext ) { org.mockito.Mockito.doReturn ( successfulReturnValue ( ) ) . when ( backend ) . runInternalAction ( org.mockito.ArgumentMatchers.eq ( actionType ) , org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.common.action.ActionParametersBase.class ) , org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.bll.context.CommandContext.class ) ) ; } else { org.mockito.Mockito.doReturn ( successfulReturnValue ( ) ) . when ( backend ) . runInternalAction ( org.mockito.ArgumentMatchers.eq ( actionType ) , org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.common.action.ActionParametersBase.class ) ) ; } }

Target:
private void mockCommandCall ( org.ovirt.engine.core.common.action.ActionType actionType , boolean withContext ) { if ( withContext ) { org.mockito.Mockito.doReturn ( successfulReturnValue ( ) ) . when ( backend ) . runInternalAction ( org.mockito.ArgumentMatchers.eq ( actionType ) , org.mockito.ArgumentMatchers.any ( ) , org.mockito.ArgumentMatchers.any ( ) ) ; } else { org.mockito.Mockito.doReturn ( successfulReturnValue ( ) ) . when ( backend ) . runInternalAction ( org.mockito.ArgumentMatchers.eq ( actionType ) , org.mockito.ArgumentMatchers.any ( ) ) ; } }
Source:
public static < T extends org.ovirt.engine.core.bll.CommandBase < ? extends org.ovirt.engine.core.common.action.VdcActionParametersBase > > T injectMembers ( T instance ) { javax.enterprise.inject.spi.AnnotatedType type = org.ovirt.engine.core.bll.utils.Injector.injector.manager.createAnnotatedType ( instance.getClass ( ) ) ; javax.enterprise.inject.spi.InjectionTarget injectionTarget = org.ovirt.engine.core.bll.utils.Injector.injector.manager.createInjectionTarget ( type ) ; injectionTarget.inject ( instance , org.ovirt.engine.core.bll.utils.Injector.injector.manager.createCreationalContext ( null ) ) ; injectionTarget.postConstruct ( instance ) ; return instance ; }

Target:
public static < T > T injectMembers ( T instance ) { javax.enterprise.inject.spi.AnnotatedType type = org.ovirt.engine.core.bll.utils.Injector.injector.manager.createAnnotatedType ( instance.getClass ( ) ) ; javax.enterprise.inject.spi.InjectionTarget injectionTarget = org.ovirt.engine.core.bll.utils.Injector.injector.manager.createInjectionTarget ( type ) ; injectionTarget.inject ( instance , org.ovirt.engine.core.bll.utils.Injector.injector.manager.createCreationalContext ( null ) ) ; injectionTarget.postConstruct ( instance ) ; return instance ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object result ) { org.ovirt.engine.ui.uicommonweb.models.userportal.UserPortalBasicListModel userPortalBasicListModel = ( ( org.ovirt.engine.ui.uicommonweb.models.userportal.UserPortalBasicListModel ) ( model ) ) ; if ( result != null ) { org.ovirt.engine.core.common.businessentities.VM vm = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( result ) ) . getReturnValue ( ) ; if ( vm != null ) { userPortalBasicListModel.updateDetails ( vm ) ; } } }

Target:
public void onSuccess ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue result ) { if ( result != null ) { org.ovirt.engine.core.common.businessentities.VM vm = result.getReturnValue ( ) ; if ( vm != null ) { updateDetails ( vm ) ; } } }
Source:
public void start ( ) { java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > list = new java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > ( ) ; for ( java.lang.Object item : org.ovirt.engine.ui.uicommonweb.models.hosts.HostListModel.getSelectedItems ( ) ) { org.ovirt.engine.core.common.businessentities.VDS vds = ( ( org.ovirt.engine.core.common.businessentities.VDS ) ( item ) ) ; list.add ( new org.ovirt.engine.core.common.action.FenceVdsActionParameters ( vds.getId ( ) , org.ovirt.engine.core.common.businessentities.pm.FenceActionType.START ) ) ; } org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runMultipleAction ( VdcActionType.StartVds , list , new org.ovirt.engine.ui.uicompat.IFrontendMultipleActionAsyncCallback ( ) { @ java.lang.Override public void executed ( org.ovirt.engine.ui.uicompat.FrontendMultipleActionAsyncResult result ) { } } , null ) ; }

Target:
public void start ( ) { java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > list = new java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > ( ) ; for ( java.lang.Object item : org.ovirt.engine.ui.uicommonweb.models.hosts.HostListModel.getSelectedItems ( ) ) { org.ovirt.engine.core.common.businessentities.VDS vds = ( ( org.ovirt.engine.core.common.businessentities.VDS ) ( item ) ) ; list.add ( new org.ovirt.engine.core.common.action.FenceVdsActionParameters ( vds.getId ( ) ) ) ; } org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runMultipleAction ( VdcActionType.StartVds , list , new org.ovirt.engine.ui.uicompat.IFrontendMultipleActionAsyncCallback ( ) { @ java.lang.Override public void executed ( org.ovirt.engine.ui.uicompat.FrontendMultipleActionAsyncResult result ) { } } , null ) ; }
Source:
public void edit ( ) { final org.ovirt.engine.core.common.businessentities.network.Network network = ( ( org.ovirt.engine.core.common.businessentities.network.Network ) ( getSelectedItem ( ) ) ) ; if ( ( getWindow ( ) ) != null ) { return ; } final org.ovirt.engine.ui.uicommonweb.models.datacenters.NetworkModel networkModel = new org.ovirt.engine.ui.uicommonweb.models.datacenters.EditNetworkModel ( network , this ) ; setWindow ( networkModel ) ; networkModel.getDataCenters ( ) . setItems ( java.util.Arrays.asList ( getEntity ( ) ) ) ; networkModel.getDataCenters ( ) . setSelectedItem ( getEntity ( ) ) ; }

Target:
public void edit ( ) { final org.ovirt.engine.core.common.businessentities.network.Network network = getSelectedItem ( ) ; if ( ( getWindow ( ) ) != null ) { return ; } final org.ovirt.engine.ui.uicommonweb.models.datacenters.NetworkModel networkModel = new org.ovirt.engine.ui.uicommonweb.models.datacenters.EditNetworkModel ( network , this ) ; setWindow ( networkModel ) ; networkModel.getDataCenters ( ) . setItems ( java.util.Arrays.asList ( getEntity ( ) ) ) ; networkModel.getDataCenters ( ) . setSelectedItem ( getEntity ( ) ) ; }
Source:
public void testMigrateMacsToAnotherMacPoolWithSuccessfulDuplicityCheck ( ) throws java.lang.Exception { underTest.migrateMacsToAnotherMacPool ( sourceMacPoolId , targetMacPoolId , macsToMigrate , true , commandContext ) ; org.mockito.Mockito.verify ( macPoolPerCluster ) . getMacPoolById ( sourceMacPoolId , commandContext ) ; org.mockito.Mockito.verify ( macPoolPerCluster ) . getMacPoolById ( targetMacPoolId , commandContext ) ; org.mockito.InOrder inOrder = org.mockito.Mockito.inOrder ( sourceMacPool , targetMacPool ) ; inOrder.verify ( sourceMacPool ) . freeMacs ( macsToMigrate ) ; inOrder.verify ( targetMacPool ) . addMacs ( macsToMigrate ) ; }

Target:
public void testMigrateMacsToAnotherMacPoolWithSuccessfulDuplicityCheck ( ) { underTest.migrateMacsToAnotherMacPool ( sourceMacPoolId , targetMacPoolId , macsToMigrate , commandContext ) ; org.mockito.Mockito.verify ( macPoolPerCluster ) . getMacPoolById ( sourceMacPoolId , commandContext ) ; org.mockito.Mockito.verify ( macPoolPerCluster ) . getMacPoolById ( targetMacPoolId , commandContext ) ; org.mockito.InOrder inOrder = org.mockito.Mockito.inOrder ( sourceMacPool , targetMacPool ) ; inOrder.verify ( sourceMacPool ) . freeMacs ( macsToMigrate ) ; inOrder.verify ( targetMacPool ) . addMacs ( macsToMigrate ) ; }
Source:
private void prepareMocks ( ) { org.mockito.Mockito.doReturn ( storagePoolIsoMapDao ) . when ( command ) . getStoragePoolIsoMapDao ( ) ; org.mockito.Mockito.doReturn ( null ) . when ( command ) . findConnectionWithSameDetails ( org.mockito.Matchers.any ( org.ovirt.engine.core.common.businessentities.StorageServerConnections.class ) ) ; org.mockito.Mockito.doReturn ( vmDao ) . when ( command ) . getVmDao ( ) ; }

Target:
private void prepareMocks ( ) { org.mockito.Mockito.doReturn ( null ) . when ( command ) . findConnectionWithSameDetails ( org.mockito.Matchers.any ( org.ovirt.engine.core.common.businessentities.StorageServerConnections.class ) ) ; org.mockito.Mockito.doReturn ( vmDao ) . when ( command ) . getVmDao ( ) ; }
Source:
private void initOsIds ( ) { osIds = new java.util.ArrayList < java.lang.Integer > ( osNames.keySet ( ) ) ; java.util.Collections.sort ( osIds , new java.util.Comparator < java.lang.Integer > ( ) { @ java.lang.Override public int compare ( java.lang.Integer o1 , java.lang.Integer o2 ) { return osNames.get ( o1 ) . compareTo ( osNames.get ( o2 ) ) ; } } ) ; }

Target:
private void initOsIds ( ) { osIds = new java.util.ArrayList < > ( osNames.keySet ( ) ) ; java.util.Collections.sort ( osIds , new java.util.Comparator < java.lang.Integer > ( ) { @ java.lang.Override public int compare ( java.lang.Integer o1 , java.lang.Integer o2 ) { return osNames.get ( o1 ) . compareTo ( osNames.get ( o2 ) ) ; } } ) ; }
Source:
public java.lang.Object convert ( java.lang.Object returnValue , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( returnValue != null ) { 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 cachedConfigValuesPreConvert ; }

Target:
public java.util.Map < org.ovirt.engine.core.compat.KeyValuePairCompat < org.ovirt.engine.core.common.queries.ConfigurationValues , java.lang.String > , java.lang.Object > convert ( java.lang.Object returnValue ) { if ( returnValue != null ) { 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 cachedConfigValuesPreConvert ; }
Source:
public org.ovirt.engine.core.aaa.DirectoryUser findUser ( org.ovirt.engine.core.common.utils.ExternalId id ) { java.lang.String name = null ; try { name = new java.lang.String ( id.getBytes ( ) , "UTF-8" ) ; } catch ( java.io.UnsupportedEncodingException e ) { return null ; } return new org.ovirt.engine.core.aaa.DirectoryUser ( this , id , name ) ; }

Target:
public org.ovirt.engine.core.aaa.DirectoryUser findUser ( org.ovirt.engine.core.common.utils.ExternalId id ) { java.lang.String name = null ; try { name = new java.lang.String ( id.getBytes ( ) , "UTF-8" ) ; } catch ( java.io.UnsupportedEncodingException e ) { return null ; } return new org.ovirt.engine.core.aaa.DirectoryUser ( this . getName ( ) , id , name ) ; }
Source:
protected java.lang.Object runPublicQuery ( org.ovirt.engine.core.common.queries.VdcQueryType queryType , org.ovirt.engine.core.common.queries.VdcQueryParametersBase queryParams , java.lang.String sessionId ) { initQueryParams ( queryParams , sessionId ) ; org.ovirt.engine.core.common.queries.VdcQueryReturnValue result = backend.RunPublicQuery ( queryType , queryParams ) ; return result.getSucceeded ( ) ? result.getReturnValue ( ) : null ; }

Target:
protected java.lang.Object runPublicQuery ( org.ovirt.engine.core.common.queries.VdcQueryType queryType , org.ovirt.engine.core.common.queries.VdcQueryParametersBase queryParams , java.lang.String sessionId ) { initQueryParams ( queryParams , sessionId ) ; org.ovirt.engine.core.common.queries.VdcQueryReturnValue result = backend.runPublicQuery ( queryType , queryParams ) ; return result.getSucceeded ( ) ? result.getReturnValue ( ) : null ; }
Source:
protected void updateHashName ( T model ) { java.lang.String hashName = model.getHashName ( ) ; org.ovirt.engine.ui.common.presenter.AbstractModelBoundPopupPresenterWidget.getView ( ) . setHashName ( hashName ) ; org.ovirt.engine.ui.uicommonweb.UICommand openDocumentationCommand = model.getOpenDocumentationCommand ( ) ; if ( openDocumentationCommand != null ) { boolean isDocumentationAvailable = ( hashName != null ) && ( ( org.ovirt.engine.ui.common.uicommon.ContextSensitiveHelpManager.getPath ( hashName ) ) != null ) ; openDocumentationCommand.setIsAvailable ( isDocumentationAvailable ) ; updateHelpCommand ( ( isDocumentationAvailable ? openDocumentationCommand : null ) ) ; } }

Target:
protected void updateHashName ( T model ) { java.lang.String hashName = model.getHashName ( ) ; org.ovirt.engine.ui.common.presenter.AbstractModelBoundPopupPresenterWidget.getView ( ) . setHashName ( hashName ) ; }
Source:
public void onSuccess ( java.lang.Object target2 , java.lang.Object returnValue2 ) { java.lang.Object [ ] array2 = ( ( java.lang.Object [ ] ) ( target2 ) ) ; org.ovirt.engine.ui.uicommonweb.models.storage.StorageDataCenterListModel listModel2 = ( ( org.ovirt.engine.ui.uicommonweb.models.storage.StorageDataCenterListModel ) ( array2 [ 0 ] ) ) ; org.ovirt.engine.core.common.businessentities.storage_pool dataCenter2 = ( ( org.ovirt.engine.core.common.businessentities.storage_pool ) ( array2 [ 1 ] ) ) ; boolean addDatacenter2 = ( ( dataCenter2.getstatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.StoragePoolStatus.Up ) ) && ( returnValue2 == null ) ; listModel2.AddToAttachCandidateDatacenters ( dataCenter2 , addDatacenter2 ) ; }

Target:
public void onSuccess ( java.lang.Object target2 , java.lang.Object returnValue2 ) { java.lang.Object [ ] array2 = ( ( java.lang.Object [ ] ) ( target2 ) ) ; org.ovirt.engine.ui.uicommonweb.models.storage.StorageDataCenterListModel listModel2 = ( ( org.ovirt.engine.ui.uicommonweb.models.storage.StorageDataCenterListModel ) ( array2 [ 0 ] ) ) ; org.ovirt.engine.core.common.businessentities.StoragePool dataCenter2 = ( ( org.ovirt.engine.core.common.businessentities.StoragePool ) ( array2 [ 1 ] ) ) ; boolean addDatacenter2 = ( ( dataCenter2.getstatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.StoragePoolStatus.Up ) ) && ( returnValue2 == null ) ; listModel2.AddToAttachCandidateDatacenters ( dataCenter2 , addDatacenter2 ) ; }
Source:
private static void setupLogger ( java.util.Map < java.lang.String , java.lang.Object > args ) throws java.io.IOException { java.util.logging.Logger log = java.util.logging.Logger.getLogger ( "" ) ; java.lang.String logfile = ( ( java.lang.String ) ( args.get ( "log-file" ) ) ) ; if ( logfile != null ) { java.util.logging.FileHandler fh = new java.util.logging.FileHandler ( logfile ) ; fh.setFormatter ( new java.util.logging.SimpleFormatter ( ) ) ; log.addHandler ( fh ) ; } org.ovirt.engine.exttool.core.ExtensionsToolExecutor.OVIRT_LOGGER.setLevel ( ( ( java.util.logging.Level ) ( args.get ( "log-level" ) ) ) ) ; }

Target:
private static void setupLogger ( java.util.Map < java.lang.String , java.lang.Object > args ) throws java.io.IOException { java.util.logging.Logger log = java.util.logging.Logger.getLogger ( "" ) ; java.lang.String logfile = ( ( java.lang.String ) ( args.get ( "log-file" ) ) ) ; if ( logfile != null ) { java.util.logging.FileHandler fh = new java.util.logging.FileHandler ( logfile , true ) ; fh.setFormatter ( new java.util.logging.SimpleFormatter ( ) ) ; log.addHandler ( fh ) ; } org.ovirt.engine.exttool.core.ExtensionsToolExecutor.OVIRT_LOGGER.setLevel ( ( ( java.util.logging.Level ) ( args.get ( "log-level" ) ) ) ) ; }
Source:
public void OnSuccess ( java.lang.Object target , java.lang.Object returnValue ) { java.lang.Object [ ] array = ( ( java.lang.Object [ ] ) ( target ) ) ; org.ovirt.engine.ui.uicommonweb.models.templates.VmBaseListModel vmListModel = ( ( org.ovirt.engine.ui.uicommonweb.models.templates.VmBaseListModel ) ( array [ 0 ] ) ) ; org.ovirt.engine.ui.uicommonweb.models.vms.ExportVmModel exportVmModel = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.ExportVmModel ) ( array [ 1 ] ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.storage_pool > storagePools = ( ( java.util.List < org.ovirt.engine.core.common.businessentities.storage_pool > ) ( returnValue ) ) ; vmListModel.PostShowWarningOnExistingVms ( exportVmModel , storagePools , getVmOrTemplateQuery ) ; }

Target:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { java.lang.Object [ ] array = ( ( java.lang.Object [ ] ) ( target ) ) ; org.ovirt.engine.ui.uicommonweb.models.templates.VmBaseListModel vmListModel = ( ( org.ovirt.engine.ui.uicommonweb.models.templates.VmBaseListModel ) ( array [ 0 ] ) ) ; org.ovirt.engine.ui.uicommonweb.models.vms.ExportVmModel exportVmModel = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.ExportVmModel ) ( array [ 1 ] ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.storage_pool > storagePools = ( ( java.util.List < org.ovirt.engine.core.common.businessentities.storage_pool > ) ( returnValue ) ) ; vmListModel.PostShowWarningOnExistingVms ( exportVmModel , storagePools , getVmOrTemplateQuery ) ; }
Source:
private java.util.SortedSet < org.ovirt.engine.ui.uicommonweb.models.storage.SanTargetModel > getTargetsSet ( ) { return new java.util.TreeSet < org.ovirt.engine.ui.uicommonweb.models.storage.SanTargetModel > ( new java.util.Comparator < org.ovirt.engine.ui.uicommonweb.models.storage.SanTargetModel > ( ) { org.ovirt.engine.core.common.businessentities.comparators.LexoNumericComparator lexoNumeric = new org.ovirt.engine.core.common.businessentities.comparators.LexoNumericComparator ( ) ; @ java.lang.Override public int compare ( org.ovirt.engine.ui.uicommonweb.models.storage.SanTargetModel targetModel1 , org.ovirt.engine.ui.uicommonweb.models.storage.SanTargetModel targetModel2 ) { return lexoNumeric.compare ( targetModel1.getEntity ( ) . getiqn ( ) , targetModel2.getEntity ( ) . getiqn ( ) ) ; } } ) ; }

Target:
private java.util.SortedSet < org.ovirt.engine.ui.uicommonweb.models.storage.SanTargetModel > getTargetsSet ( ) { return new java.util.TreeSet ( new java.util.Comparator < org.ovirt.engine.ui.uicommonweb.models.storage.SanTargetModel > ( ) { org.ovirt.engine.core.common.businessentities.comparators.LexoNumericComparator lexoNumeric = new org.ovirt.engine.core.common.businessentities.comparators.LexoNumericComparator ( ) ; @ java.lang.Override public int compare ( org.ovirt.engine.ui.uicommonweb.models.storage.SanTargetModel targetModel1 , org.ovirt.engine.ui.uicommonweb.models.storage.SanTargetModel targetModel2 ) { return lexoNumeric.compare ( targetModel1.getEntity ( ) . getiqn ( ) , targetModel2.getEntity ( ) . getiqn ( ) ) ; } } ) ; }
Source:
public void OnSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.storage.SanStorageModel sanStorageModel = ( ( org.ovirt.engine.ui.uicommonweb.models.storage.SanStorageModel ) ( target ) ) ; java.util.ArrayList < org.ovirt.engine.core.common.businessentities.LUNs > lunList = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.LUNs > ) ( returnValue ) ) ; sanStorageModel.ApplyData ( lunList , true ) ; }

Target:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.storage.SanStorageModel sanStorageModel = ( ( org.ovirt.engine.ui.uicommonweb.models.storage.SanStorageModel ) ( target ) ) ; java.util.ArrayList < org.ovirt.engine.core.common.businessentities.LUNs > lunList = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.LUNs > ) ( returnValue ) ) ; sanStorageModel.ApplyData ( lunList , true ) ; }