auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void testRemoveNonExistant ( ) { setUpGetEntityExpectations ( QueryType.GetVmTemplate , org.ovirt.engine.core.common.queries.GetVmTemplateParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , null ) ; try { resource.remove ( ) ; org.junit.Assert.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { org.junit.Assert.assertNotNull ( wae.getResponse ( ) ) ; org.junit.Assert.assertEquals ( 404 , wae.getResponse ( ) . getStatus ( ) ) ; } }

Target:
public void testRemoveNonExistant ( ) { setUpGetEntityExpectations ( QueryType.GetVmTemplate , org.ovirt.engine.core.common.queries.GetVmTemplateParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , null ) ; try { resource.remove ( ) ; org.junit.jupiter.api.Assertions.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { org.junit.jupiter.api.Assertions.assertNotNull ( wae.getResponse ( ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( 404 , wae.getResponse ( ) . getStatus ( ) ) ; } }
Source:
protected boolean canDoAction ( ) { if ( checkIsDomainLocked ( org.ovirt.engine.core.bll.storage.ReconstructMasterDomainCommand.getStorageDomain ( ) . getStoragePoolIsoMapData ( ) ) ) { return false ; } java.util.List < org.ovirt.engine.core.common.businessentities.StoragePoolIsoMap > poolDomains = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStoragePoolIsoMapDao ( ) . getAllForStoragePool ( org.ovirt.engine.core.bll.storage.ReconstructMasterDomainCommand.getStoragePool ( ) . getId ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.StoragePoolIsoMap poolDomain : poolDomains ) { if ( checkIsDomainLocked ( poolDomain ) ) { return false ; } } return org.ovirt.engine.core.bll.storage.ReconstructMasterDomainCommand.initializeVds ( ) ; }

Target:
protected org.ovirt.engine.core.bll.validator.storage.StorageDomainValidator createStorageDomainValidator ( ) { return new org.ovirt.engine.core.bll.validator.storage.StorageDomainValidator ( org.ovirt.engine.core.bll.storage.ReconstructMasterDomainCommand.getStorageDomain ( ) ) ; }
Source:
public void disableVirtWhenVmsExist ( ) { createCommandWithGlusterEnabled ( ) ; org.powermock.api.mockito.PowerMockito.when ( vdsGroupDAO.get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( org.ovirt.engine.core.bll.UpdateVdsGroupCommandTest.createVdsGroupWithNoCpuName ( ) ) ; org.powermock.api.mockito.PowerMockito.when ( vdsGroupDAO.getByName ( org.mockito.Matchers.anyString ( ) ) ) . thenReturn ( org.ovirt.engine.core.bll.UpdateVdsGroupCommandTest.createVdsGroupWithNoCpuName ( ) ) ; org.ovirt.engine.core.bll.UpdateVdsGroupCommandTest.cpuExists ( ) ; org.ovirt.engine.core.bll.UpdateVdsGroupCommandTest.cpuFlagsNotMissing ( ) ; clusterHasVds ( ) ; clusterHasVMs ( ) ; canDoActionFailedWithReason ( VdcBllMessages.VDS_GROUP_CANNOT_DISABLE_VIRT_WHEN_CLUSTER_CONTAINS_VMS ) ; }

Target:
public void vdsGroupWithNoServiceEnabled ( ) { createCommandWithNoService ( ) ; org.mockito.Mockito.when ( vdsGroupDAO.get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( org.ovirt.engine.core.bll.UpdateVdsGroupCommandTest.createVdsGroupWithNoCpuName ( ) ) ; org.mockito.Mockito.when ( vdsGroupDAO.getByName ( org.mockito.Matchers.anyString ( ) ) ) . thenReturn ( org.ovirt.engine.core.bll.UpdateVdsGroupCommandTest.createVdsGroupWithNoCpuName ( ) ) ; cpuExists ( ) ; allQueriesEmpty ( ) ; canDoActionFailedWithReason ( VdcBllMessages.VDS_GROUP_AT_LEAST_ONE_SERVICE_MUST_BE_ENABLED ) ; }
Source:
protected void executeCommand ( ) { org.ovirt.engine.core.common.businessentities.Provider provider = org.ovirt.engine.core.bll.provider.network.AddNetworkOnProviderCommand.getDbFacade ( ) . getProviderDao ( ) . get ( org.ovirt.engine.core.bll.provider.network.AddNetworkOnProviderCommand.getNetwork ( ) . getProvidedBy ( ) . getProviderId ( ) ) ; org.ovirt.engine.core.bll.provider.network.NetworkProviderProxy proxy = org.ovirt.engine.core.bll.provider.ProviderProxyFactory.getInstance ( ) . create ( provider ) ; org.ovirt.engine.core.bll.provider.network.AddNetworkOnProviderCommand.getNetwork ( ) . getProvidedBy ( ) . setExternalId ( proxy.add ( org.ovirt.engine.core.bll.provider.network.AddNetworkOnProviderCommand.getNetwork ( ) ) ) ; org.ovirt.engine.core.bll.provider.network.AddNetworkOnProviderCommand.getNetwork ( ) . setVlanId ( null ) ; super . executeCommand ( ) ; }

Target:
private org.ovirt.engine.core.common.businessentities.Provider < ? > getProvider ( ) { if ( ( provider ) == null ) { provider = org.ovirt.engine.core.bll.provider.network.AddNetworkOnProviderCommand.getDbFacade ( ) . getProviderDao ( ) . get ( org.ovirt.engine.core.bll.provider.network.AddNetworkOnProviderCommand.getNetwork ( ) . getProvidedBy ( ) . getProviderId ( ) ) ; } return provider ; }
Source:
private void initAppsTable ( ) { appsTable = new org.ovirt.engine.ui.common.widget.editor.EntityModelCellTable < org.ovirt.engine.ui.uicommonweb.models.ListModel > ( false , true ) ; org.ovirt.engine.ui.common.widget.table.column.AbstractTextColumnWithTooltip < java.lang.String > appNameColumn = new org.ovirt.engine.ui.common.widget.table.column.AbstractTextColumnWithTooltip < java.lang.String > ( ) { @ java.lang.Override public java.lang.String getValue ( java.lang.String appName ) { return appName ; } } ; appsTable.addColumn ( appNameColumn , constants.nameSnapshot ( ) ) ; appsTable.setRowData ( new java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.EntityModel > ( ) ) ; appsTable.setWidth ( "100%" , true ) ; appsTable.setSelectionModel ( new com.google.gwt.view.client.NoSelectionModel ( ) ) ; }

Target:
private void initAppsTable ( ) { appsTable = new org.ovirt.engine.ui.common.widget.editor.EntityModelCellTable < org.ovirt.engine.ui.uicommonweb.models.ListModel > ( false , true ) ; org.ovirt.engine.ui.common.widget.table.column.AbstractTextColumn < java.lang.String > appNameColumn = new org.ovirt.engine.ui.common.widget.table.column.AbstractTextColumn < java.lang.String > ( ) { @ java.lang.Override public java.lang.String getValue ( java.lang.String appName ) { return appName ; } } ; appsTable.addColumn ( appNameColumn , constants.nameSnapshot ( ) ) ; appsTable.setRowData ( new java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.EntityModel > ( ) ) ; appsTable.setWidth ( "100%" , true ) ; appsTable.setSelectionModel ( new com.google.gwt.view.client.NoSelectionModel ( ) ) ; }
Source:
public void canDoActionNotEnoughSpace ( ) throws java.lang.Exception { initializeCommand ( ImageOperation.Move , new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ) ; initVmForSpace ( ) ; initVmDiskImage ( false ) ; initSrcStorageDomain ( ) ; initDestStorageDomain ( StorageType.NFS ) ; org.mockito.Mockito.doReturn ( org.ovirt.engine.core.bll.storage.disk.MoveOrCopyDiskCommandTest.mockStorageDomainValidatorWithoutSpace ( ) ) . when ( command ) . createStorageDomainValidator ( ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( command , EngineMessage.ACTION_TYPE_FAILED_DISK_SPACE_LOW_ON_STORAGE_DOMAIN ) ; }

Target:
public void validateNotEnoughSpace ( ) throws java.lang.Exception { initializeCommand ( ImageOperation.Move , new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ) ; initVmForSpace ( ) ; initVmDiskImage ( false ) ; initSrcStorageDomain ( ) ; initDestStorageDomain ( StorageType.NFS ) ; org.mockito.Mockito.doReturn ( org.ovirt.engine.core.bll.storage.disk.MoveOrCopyDiskCommandTest.mockStorageDomainValidatorWithoutSpace ( ) ) . when ( command ) . createStorageDomainValidator ( ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( command , EngineMessage.ACTION_TYPE_FAILED_DISK_SPACE_LOW_ON_STORAGE_DOMAIN ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.DiskImage createDiskImage ( org.ovirt.engine.core.common.businessentities.ImageStatus status , org.ovirt.engine.core.compat.Guid poolId ) { org.ovirt.engine.core.common.businessentities.DiskImage disk = new org.ovirt.engine.core.common.businessentities.DiskImage ( ) ; disk.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; disk.setImageStatus ( status ) ; java.util.ArrayList < org.ovirt.engine.core.compat.Guid > storageIds = new java.util.ArrayList < > ( ) ; storageIds.add ( poolDomainsOvfInfo.keySet ( ) . iterator ( ) . next ( ) ) ; disk.setStorageIds ( storageIds ) ; return disk ; }

Target:
private org.ovirt.engine.core.common.businessentities.storage.DiskImage createDiskImage ( org.ovirt.engine.core.common.businessentities.storage.ImageStatus status , org.ovirt.engine.core.compat.Guid poolId ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage disk = new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ; disk.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; disk.setImageStatus ( status ) ; java.util.ArrayList < org.ovirt.engine.core.compat.Guid > storageIds = new java.util.ArrayList < > ( ) ; storageIds.add ( poolDomainsOvfInfo.keySet ( ) . iterator ( ) . next ( ) ) ; disk.setStorageIds ( storageIds ) ; return disk ; }
Source:
protected boolean validateIsImagesOnDomains ( ) { for ( org.ovirt.engine.core.common.businessentities.DiskImage image : getImagesToCheckDestinationStorageDomains ( ) ) { if ( ! ( image.getstorage_ids ( ) . containsAll ( diskInfoDestinationMap.get ( image.getId ( ) ) . getstorage_ids ( ) ) ) ) { addCanDoActionMessage ( VdcBllMessages.ACTION_TYPE_FAILED_TEMPLATE_NOT_FOUND_ON_DESTINATION_DOMAIN ) ; return false ; } } return true ; }

Target:
protected boolean validateIsImagesOnDomains ( ) { for ( org.ovirt.engine.core.common.businessentities.DiskImage image : getImagesToCheckDestinationStorageDomains ( ) ) { if ( ! ( image.getStorageIds ( ) . containsAll ( diskInfoDestinationMap.get ( image.getId ( ) ) . getStorageIds ( ) ) ) ) { addCanDoActionMessage ( VdcBllMessages.ACTION_TYPE_FAILED_TEMPLATE_NOT_FOUND_ON_DESTINATION_DOMAIN ) ; return false ; } } return true ; }
Source:
protected void init ( ) { super . init ( ) ; setVdsId ( org.ovirt.engine.core.bll.ImportVmFromExternalProviderCommand.getParameters ( ) . getProxyHostId ( ) ) ; setStorageDomainId ( org.ovirt.engine.core.bll.ImportVmFromExternalProviderCommand.getParameters ( ) . getDestDomainId ( ) ) ; setStoragePoolId ( ( ( org.ovirt.engine.core.bll.ImportVmFromExternalProviderCommand.getVdsGroup ( ) ) != null ? org.ovirt.engine.core.bll.ImportVmFromExternalProviderCommand.getVdsGroup ( ) . getStoragePoolId ( ) : null ) ) ; }

Target:
protected void init ( ) { super . init ( ) ; setVmName ( org.ovirt.engine.core.bll.ImportVmFromExternalProviderCommand.getParameters ( ) . getExternalName ( ) ) ; setVdsId ( org.ovirt.engine.core.bll.ImportVmFromExternalProviderCommand.getParameters ( ) . getProxyHostId ( ) ) ; setStorageDomainId ( org.ovirt.engine.core.bll.ImportVmFromExternalProviderCommand.getParameters ( ) . getDestDomainId ( ) ) ; setStoragePoolId ( ( ( org.ovirt.engine.core.bll.ImportVmFromExternalProviderCommand.getCluster ( ) ) != null ? org.ovirt.engine.core.bll.ImportVmFromExternalProviderCommand.getCluster ( ) . getStoragePoolId ( ) : null ) ) ; }
Source:
private void verifyModel ( org.ovirt.engine.api.model.Cdrom model ) { assertEquals ( Guid.Empty.toString ( ) , model.getId ( ) ) ; assertTrue ( model.isSetTemplate ( ) ) ; assertEquals ( org.ovirt.engine.api.restapi.resource.BackendTemplateCdromResourceTest.TEMPLATE_ID.toString ( ) , model.getTemplate ( ) . getId ( ) ) ; assertTrue ( model.isSetFile ( ) ) ; assertEquals ( org.ovirt.engine.api.restapi.resource.BackendTemplateCdromResourceTest.ISO_PATH , model.getFile ( ) . getId ( ) ) ; }

Target:
private void verifyModel ( org.ovirt.engine.api.model.Cdrom model ) { org.junit.Assert.assertEquals ( Guid.Empty.toString ( ) , model.getId ( ) ) ; org.junit.Assert.assertTrue ( model.isSetTemplate ( ) ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.api.restapi.resource.BackendTemplateCdromResourceTest.TEMPLATE_ID.toString ( ) , model.getTemplate ( ) . getId ( ) ) ; org.junit.Assert.assertTrue ( model.isSetFile ( ) ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.api.restapi.resource.BackendTemplateCdromResourceTest.ISO_PATH , model.getFile ( ) . getId ( ) ) ; }
Source:
public synchronized void StopStoragePoolTasks ( final org.ovirt.engine.core.common.businessentities.storage_pool sp ) { org.ovirt.engine.core.bll.AsyncTaskManager.log.infoFormat ( "Attempting to get and stop tasks on storage pool '{0}'" , sp.getname ( ) ) ; AddStoragePoolExistingTasks ( sp ) ; java.util.List < org.ovirt.engine.core.bll.SPMAsyncTask > list = org.ovirt.engine.core.utils.linq.LinqUtils.filter ( _tasks.values ( ) , new org.ovirt.engine.core.utils.linq.Predicate < org.ovirt.engine.core.bll.SPMAsyncTask > ( ) { @ java.lang.Override public boolean eval ( org.ovirt.engine.core.bll.SPMAsyncTask a ) { return a.getStoragePoolID ( ) . equals ( sp.getId ( ) ) ; } } ) ; for ( org.ovirt.engine.core.bll.SPMAsyncTask task : list ) { task.stopTask ( ) ; } }

Target:
public synchronized void CancelTask ( org.ovirt.engine.core.compat.Guid taskID ) { if ( _tasks.containsKey ( taskID ) ) { org.ovirt.engine.core.bll.AsyncTaskManager.log.infoFormat ( "Attempting to cancel task '{0}'." , taskID ) ; _tasks.get ( taskID ) . stopTask ( ) ; _tasks.get ( taskID ) . ConcreteStartPollingTask ( ) ; } }
Source:
public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.RepoFileMetaData > repoList = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.RepoFileMetaData > ) ( source ) ) ; java.util.ArrayList < java.lang.String > fileNameList = new java.util.ArrayList < java.lang.String > ( ) ; for ( org.ovirt.engine.core.common.businessentities.RepoFileMetaData RepoFileMetaData : repoList ) { fileNameList.add ( RepoFileMetaData.getRepoFileName ( ) ) ; } java.util.Collections.sort ( fileNameList , new org.ovirt.engine.ui.uicommonweb.Linq.CaseInsensitiveComparer ( ) ) ; return fileNameList ; } return new java.util.ArrayList < java.lang.String > ( ) ; }

Target:
public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.RepoFileMetaData > repoList = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.RepoFileMetaData > ) ( source ) ) ; java.util.ArrayList < java.lang.String > fileNameList = new java.util.ArrayList < java.lang.String > ( ) ; for ( org.ovirt.engine.core.common.businessentities.RepoFileMetaData RepoFileMetaData : repoList ) { fileNameList.add ( RepoFileMetaData.getRepoImageId ( ) ) ; } java.util.Collections.sort ( fileNameList , new org.ovirt.engine.ui.uicommonweb.Linq.CaseInsensitiveComparer ( ) ) ; return fileNameList ; } return new java.util.ArrayList < java.lang.String > ( ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeGeoRepStatusDetailForXmlRpc glusterVolumeGeoRepStatusDetail ( java.lang.String volumeName , java.lang.String slaveHost , java.lang.String slaveVolumeName ) { try { java.util.Map < java.lang.String , java.lang.Object > response = vdsServer.glusterVolumeGeoRepStatusDetail ( volumeName , slaveHost , slaveVolumeName ) ; return new org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeGeoRepStatusDetailForXmlRpc ( response ) ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }

Target:
public org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeGeoRepStatusDetailForXmlRpc glusterVolumeGeoRepSessionStatus ( java.lang.String volumeName , java.lang.String slaveHost , java.lang.String slaveVolumeName ) { try { java.util.Map < java.lang.String , java.lang.Object > response = vdsServer.glusterVolumeGeoRepSessionStatus ( volumeName , slaveHost , slaveVolumeName ) ; return new org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeGeoRepStatusDetailForXmlRpc ( response ) ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
Source:
protected void synchronizeNics ( org.ovirt.engine.core.compat.Guid vmId , java.util.List < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > nics , org.ovirt.engine.core.bll.context.CompensationContext compensationContext , org.ovirt.engine.core.compat.Version version ) { org.ovirt.engine.core.bll.network.VmInterfaceManager vmInterfaceManager = new org.ovirt.engine.core.bll.network.VmInterfaceManager ( ) ; vmInterfaceManager.removeAll ( vmId ) ; for ( org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface vmInterface : nics ) { if ( ( vmInterface.getId ( ) ) == null ) { vmInterface.setId ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) ) ; } vmInterface.setVmId ( vmId ) ; vmInterfaceManager.add ( vmInterface , compensationContext , false , version ) ; } }

Target:
protected void synchronizeNics ( org.ovirt.engine.core.compat.Guid vmId , java.util.List < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > nics , org.ovirt.engine.core.bll.context.CompensationContext compensationContext , org.ovirt.engine.core.compat.Version version ) { org.ovirt.engine.core.bll.network.VmInterfaceManager vmInterfaceManager = new org.ovirt.engine.core.bll.network.VmInterfaceManager ( ) ; vmInterfaceManager.removeAll ( vmId ) ; for ( org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface vmInterface : nics ) { if ( ( vmInterface.getId ( ) ) == null ) { vmInterface.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; } vmInterface.setVmId ( vmId ) ; vmInterfaceManager.add ( vmInterface , compensationContext , false , version ) ; } }
Source:
private java.util.List < org.ovirt.engine.core.common.businessentities.storage.Disk > getSortedDisks ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.Disk > diskImages = new java.util.ArrayList ( vm.getDiskMap ( ) . values ( ) ) ; java.util.Collections.sort ( diskImages , new org.ovirt.engine.core.common.businessentities.comparators.DiskByDiskAliasComparator ( ) ) ; java.util.Collections.sort ( diskImages , java.util.Collections.reverseOrder ( new org.ovirt.engine.core.vdsbroker.builder.vminfo.DiskImageByBootAndSnapshotComparator ( vm.getId ( ) ) ) ) ; return diskImages ; }

Target:
private java.util.List < org.ovirt.engine.core.common.businessentities.storage.Disk > getSortedDisks ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.Disk > diskImages = new java.util.ArrayList ( vm.getDiskMap ( ) . values ( ) ) ; java.util.Collections.sort ( diskImages , new org.ovirt.engine.core.common.businessentities.comparators.LexoNumericNameableComparator ( ) ) ; java.util.Collections.sort ( diskImages , java.util.Collections.reverseOrder ( new org.ovirt.engine.core.vdsbroker.builder.vminfo.DiskImageByBootAndSnapshotComparator ( vm.getId ( ) ) ) ) ; return diskImages ; }
Source:
private void generateMethodInterface ( org.ovirt.api.metamodel.concepts.Method method ) { if ( ( method.getBase ( ) ) != null ) { return ; } org.ovirt.api.metamodel.concepts.Name name = method.getName ( ) ; generateRequestInterface ( method ) ; generateResponseInterface ( method ) ; generateDoc ( method ) ; java.lang.String request = getRequestName ( method ) ; java.lang.String member = javaNames.getJavaMemberStyleName ( name ) ; javaBuffer.addLine ( "%1$s %2$s();" , request , member ) ; javaBuffer.addLine ( ) ; }

Target:
private void generateMethodInterface ( org.ovirt.api.metamodel.concepts.Method method ) { org.ovirt.api.metamodel.concepts.Name name = getFullName ( method ) ; generateRequestInterface ( method ) ; generateResponseInterface ( method ) ; generateDoc ( method ) ; java.lang.String request = getRequestName ( method ) ; java.lang.String member = javaNames.getJavaMemberStyleName ( name ) ; javaBuffer.addLine ( "%1$s %2$s();" , request , member ) ; javaBuffer.addLine ( ) ; }
Source:
public void testRemoveAllByVolumeId ( ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity volume = volumeDao.getById ( org.ovirt.engine.core.dao.gluster.GlusterVolumeSnapshotDaoTest.VOLUME_ID ) ; org.junit.Assert.assertEquals ( 2 , volume.getSnapshotsCount ( ) . intValue ( ) ) ; dao.removeAllByVolumeId ( org.ovirt.engine.core.dao.gluster.GlusterVolumeSnapshotDaoTest.VOLUME_ID ) ; java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeSnapshotEntity > snapshots = dao.getAllByVolumeId ( org.ovirt.engine.core.dao.gluster.GlusterVolumeSnapshotDaoTest.VOLUME_ID ) ; org.junit.Assert.assertTrue ( snapshots.isEmpty ( ) ) ; org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity volume1 = volumeDao.getById ( org.ovirt.engine.core.dao.gluster.GlusterVolumeSnapshotDaoTest.VOLUME_ID ) ; org.junit.Assert.assertEquals ( 0 , volume1.getSnapshotsCount ( ) . intValue ( ) ) ; }

Target:
public void testRemoveAllByVolumeId ( ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity volume = volumeDao.getById ( org.ovirt.engine.core.dao.gluster.GlusterVolumeSnapshotDaoTest.VOLUME_ID ) ; org.junit.jupiter.api.Assertions.assertEquals ( 2 , volume.getSnapshotsCount ( ) . intValue ( ) ) ; dao.removeAllByVolumeId ( org.ovirt.engine.core.dao.gluster.GlusterVolumeSnapshotDaoTest.VOLUME_ID ) ; java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeSnapshotEntity > snapshots = dao.getAllByVolumeId ( org.ovirt.engine.core.dao.gluster.GlusterVolumeSnapshotDaoTest.VOLUME_ID ) ; org.junit.jupiter.api.Assertions.assertTrue ( snapshots.isEmpty ( ) ) ; org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity volume1 = volumeDao.getById ( org.ovirt.engine.core.dao.gluster.GlusterVolumeSnapshotDaoTest.VOLUME_ID ) ; org.junit.jupiter.api.Assertions.assertEquals ( 0 , volume1.getSnapshotsCount ( ) . intValue ( ) ) ; }
Source:
public static void GetMinimalVmMemSize ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Integer ) ( source ) ) . intValue ( ) : 1 ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.VMMinMemorySizeInMB , org.ovirt.engine.core.common.config.Config.DefaultConfigurationVersion ) , aQuery ) ; }

Target:
public static void GetMinimalVmMemSize ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Integer ) ( source ) ) . intValue ( ) : 1 ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.VMMinMemorySizeInMB , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel ) ( target ) ) ; java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StoragePool > list = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StoragePool > ( ) ; for ( org.ovirt.engine.core.common.businessentities.StoragePool a : ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StoragePool > ) ( returnValue ) ) ) { if ( ( a.getstatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.StoragePoolStatus.Up ) ) { list.add ( a ) ; } } model.SetDataCenter ( model , list ) ; getPoolModelBehaviorInitializedEvent ( ) . raise ( this , EventArgs.Empty ) ; }

Target:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel ) ( target ) ) ; java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StoragePool > list = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StoragePool > ( ) ; for ( org.ovirt.engine.core.common.businessentities.StoragePool a : ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StoragePool > ) ( returnValue ) ) ) { if ( ( a.getstatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.StoragePoolStatus.Up ) ) { list.add ( a ) ; } } model.setDataCenter ( model , list ) ; getPoolModelBehaviorInitializedEvent ( ) . raise ( this , EventArgs.Empty ) ; }
Source:
protected org.ovirt.engine.core.bll.ValidationResult vnicProfileNotUsed ( java.util.List < ? extends org.ovirt.engine.core.common.businessentities.Nameable > entities , org.ovirt.engine.core.common.errors.VdcBllMessages entitiesReplacement ) { if ( entities.isEmpty ( ) ) { return org.ovirt.engine.core.bll.ValidationResult.VALID ; } java.util.Collection < java.lang.String > replacements = org.ovirt.engine.core.utils.ReplacementUtils.replaceWithNameable ( "ENTITIES_USING_VNIC_PROFILE" , entities ) ; replacements.add ( entitiesReplacement.name ( ) ) ; return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.VNIC_PROFILE_IN_USE , replacements ) ; }

Target:
protected org.ovirt.engine.core.bll.ValidationResult vnicProfileNotUsed ( java.util.List < ? extends org.ovirt.engine.core.common.businessentities.Nameable > entities , org.ovirt.engine.core.common.errors.VdcBllMessages entitiesReplacement ) { if ( entities.isEmpty ( ) ) { return org.ovirt.engine.core.bll.ValidationResult.VALID ; } java.util.Collection < java.lang.String > replacements = org.ovirt.engine.core.utils.ReplacementUtils.replaceWithNameable ( "ENTITIES_USING_VNIC_PROFILE" , entities ) ; replacements.add ( entitiesReplacement.name ( ) ) ; return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.ACTION_TYPE_FAILED_VNIC_PROFILE_IN_USE , replacements ) ; }
Source:
private org.ovirt.engine.api.model.Host setCluster ( org.ovirt.engine.api.model.Host host , org.ovirt.engine.api.model.Cluster cluster ) { if ( cluster.isSetId ( ) ) { host.setCluster ( cluster ) ; } else { host.setCluster ( new org.ovirt.engine.api.model.Cluster ( ) ) ; host.getCluster ( ) . setId ( lookupClusterByName ( cluster.getName ( ) ) . getId ( ) . toString ( ) ) ; } return host ; }

Target:
private org.ovirt.engine.api.model.Host setCluster ( org.ovirt.engine.api.model.Host host , org.ovirt.engine.core.common.businessentities.Cluster cluster ) { if ( cluster.isSetId ( ) ) { host.setCluster ( cluster ) ; } else { host.setCluster ( new org.ovirt.engine.core.common.businessentities.Cluster ( ) ) ; host.getCluster ( ) . setId ( lookupClusterByName ( cluster.getName ( ) ) . getId ( ) . toString ( ) ) ; } return host ; }
Source:
protected void alertIfFencingDisabled ( ) { if ( ! ( getVdsGroup ( ) . getFencingPolicy ( ) . isFencingEnabled ( ) ) ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase alb = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; alb.setVdsGroupId ( getVdsGroup ( ) . getId ( ) ) ; alb.setRepeatable ( true ) ; auditLogDirector.log ( alb , AuditLogType.FENCE_DISABLED_IN_CLUSTER_POLICY ) ; } }

Target:
protected void alertIfFencingDisabled ( ) { if ( ! ( getCluster ( ) . getFencingPolicy ( ) . isFencingEnabled ( ) ) ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase alb = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; alb.setClusterId ( getCluster ( ) . getId ( ) ) ; alb.setRepeatable ( true ) ; auditLogDirector.log ( alb , AuditLogType.FENCE_DISABLED_IN_CLUSTER_POLICY ) ; } }
Source:
public void testAddLunDiskMissingId ( ) { org.ovirt.engine.api.model.Disk model = createIscsiLunDisk ( ) ; model.getLunStorage ( ) . getLogicalUnits ( ) . getLogicalUnits ( ) . get ( 0 ) . setId ( null ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; try { collection.add ( model ) ; org.junit.Assert.fail ( "expected WebApplicationException on incomplete parameters" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyIncompleteException ( wae , "LogicalUnit" , "testAddLunDiskMissingId" , "id" ) ; } }

Target:
public void testAddLunDiskMissingId ( ) { org.ovirt.engine.api.model.Disk model = createIscsiLunDisk ( ) ; model.getLunStorage ( ) . getLogicalUnits ( ) . getLogicalUnits ( ) . get ( 0 ) . setId ( null ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; try { collection.add ( model ) ; org.junit.jupiter.api.Assertions.fail ( "expected WebApplicationException on incomplete parameters" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyIncompleteException ( wae , "LogicalUnit" , "testAddLunDiskMissingId" , "id" ) ; } }
Source:
public static void getVnicProfilesByDcId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dcId ) { if ( ( aQuery.converterCallback ) == null ) { 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.network.VnicProfileView > ( ) ; } return source ; } } ; } org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVnicProfilesByDataCenterId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dcId ) , aQuery ) ; }

Target:
public static void getVmGuestAgentInterfacesByVmId ( 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 ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmGuestAgentInterface > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVmGuestAgentInterfacesByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) , aQuery ) ; }
Source:
public < T > T getEntity ( java.lang.Class < T > clz , org.ovirt.engine.core.common.queries.VdcQueryType query , org.ovirt.engine.core.common.queries.VdcQueryParametersBase queryParams , java.lang.String identifier , boolean notFoundAs404 , boolean isMandatory ) { try { return doGetEntity ( clz , query , queryParams , identifier , isMandatory ) ; } catch ( java.lang.Exception e ) { return handleError ( clz , e , notFoundAs404 ) ; } }

Target:
public < T > T getEntity ( java.lang.Class < T > clz , org.ovirt.engine.core.common.queries.QueryType query , org.ovirt.engine.core.common.queries.VdcQueryParametersBase queryParams , java.lang.String identifier , boolean notFoundAs404 , boolean isMandatory ) { try { return doGetEntity ( clz , query , queryParams , identifier , isMandatory ) ; } catch ( java.lang.Exception e ) { return handleError ( clz , e , notFoundAs404 ) ; } }
Source:
public static void getVmsRunningOnOrMigratingToVds ( 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 ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VM > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVmsRunningOnOrMigratingToVds , new org.ovirt.engine.core.common.queries.GetVmsRunningOnOrMigratingToVdsParameters ( id ) , aQuery ) ; }

Target:
public static void getoVirtISOsList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? new java.util.ArrayList < org.ovirt.engine.core.compat.RpmVersion > ( ( ( java.util.ArrayList < org.ovirt.engine.core.compat.RpmVersion > ) ( source ) ) ) : new java.util.ArrayList < org.ovirt.engine.core.compat.RpmVersion > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetoVirtISOs , new org.ovirt.engine.core.common.queries.VdsIdParametersBase ( id ) , aQuery ) ; }
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.uicommonweb.models.hosts.HostSetupNetworksModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.hosts.HostSetupNetworksModel ) ( sender ) ) ; java.util.List < org.ovirt.engine.ui.uicommonweb.models.hosts.network.LogicalNetworkModel > networks = model.getNetworks ( ) ; java.util.List < org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkInterfaceModel > nics = model.getNics ( ) ; status.setText ( org.ovirt.engine.ui.webadmin.section.main.view.popup.host.HostSetupNetworksPopupView.EMPTY_STATUS ) ; updateNetworks ( networks ) ; updateNics ( nics ) ; rendered = true ; }

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.uicommonweb.models.hosts.HostSetupNetworksModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.hosts.HostSetupNetworksModel ) ( sender ) ) ; java.util.List < org.ovirt.engine.ui.uicommonweb.models.hosts.network.LogicalNetworkModel > networks = model.getNetworks ( ) ; java.util.List < org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkInterfaceModel > nics = model.getNics ( ) ; status.setFadeText ( org.ovirt.engine.ui.webadmin.section.main.view.popup.host.HostSetupNetworksPopupView.EMPTY_STATUS ) ; updateNetworks ( networks ) ; updateNics ( nics ) ; rendered = true ; }
Source:
public java.lang.Void runInTransaction ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.Disk > pluggedDisks = getDiskDao ( ) . getAllForVm ( getVm ( ) . getId ( ) , true ) ; runVdsCommand ( VDSCommandType.Snapshot , new org.ovirt.engine.core.common.vdscommands.SnapshotVDSCommandParameters ( getVm ( ) . getRunOnVds ( ) . getValue ( ) , getVm ( ) . getId ( ) , org.ovirt.engine.core.bll.ImagesHandler.filterImageDisks ( pluggedDisks , false , true ) ) ) ; return null ; }

Target:
public java.lang.Void runInTransaction ( ) { runVdsCommand ( VDSCommandType.Snapshot , buildLiveSnapshotParameters ( snapshot ) ) ; return null ; }
Source:
public void getTemplateById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid templateId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmTemplate , new org.ovirt.engine.core.common.queries.GetVmTemplateParameters ( templateId ) , aQuery ) ; }

Target:
public void getClusterGlusterServices ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.core.common.queries.gluster.GlusterVolumeAdvancedDetailsParameters parameters = new org.ovirt.engine.core.common.queries.gluster.GlusterVolumeAdvancedDetailsParameters ( clusterId , null , null , false ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterVolumeAdvancedDetails , parameters , aQuery ) ; }
Source:
public static org.ovirt.engine.core.aaa.DirectoryUser findPrincipalById ( final org.ovirt.engine.core.extensions.mgr.ExtensionProxy extension , java.lang.String namespace , final java.lang.String id ) { java.util.List < org.ovirt.engine.core.aaa.DirectoryUser > users = org.ovirt.engine.core.aaa.AuthzUtils.findPrincipalsByIds ( extension , namespace , java.util.Arrays.asList ( id ) ) ; if ( users.isEmpty ( ) ) { return null ; } return users.get ( 0 ) ; }

Target:
public static org.ovirt.engine.core.aaa.DirectoryUser findPrincipalById ( final org.ovirt.engine.core.extensions.mgr.ExtensionProxy extension , final java.lang.String namespace , final java.lang.String id , final boolean groupsResolving , final boolean groupsResolvingRecursive ) { java.util.List < org.ovirt.engine.core.aaa.DirectoryUser > users = org.ovirt.engine.core.aaa.AuthzUtils.findPrincipalsByIds ( extension , namespace , java.util.Arrays.asList ( id ) , groupsResolving , groupsResolvingRecursive ) ; if ( users.isEmpty ( ) ) { return null ; } return users.get ( 0 ) ; }
Source:
protected void logToAudit ( ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase auditLogableBase = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( vds.getId ( ) ) ; auditLogableBase.setVds ( vds ) ; auditLogableBase.addCustomValue ( "message" , org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerCommand.getReturnStatus ( ) . mMessage ) ; auditLogDirector.log ( auditLogableBase , AuditLogType.VDS_BROKER_COMMAND_FAILURE ) ; }

Target:
protected void logToAudit ( ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase auditLogableBase = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( vds.getId ( ) ) ; auditLogableBase.setVds ( vds ) ; auditLogableBase.addCustomValue ( "message" , org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerCommand.getReturnStatus ( ) . message ) ; auditLogDirector.log ( auditLogableBase , AuditLogType.VDS_BROKER_COMMAND_FAILURE ) ; }
Source:
protected org.ovirt.engine.core.common.action.VdcActionParametersBase getParametersForTask ( org.ovirt.engine.core.common.action.VdcActionType parentCommandType , org.ovirt.engine.core.common.action.VdcActionParametersBase parameters ) { org.ovirt.engine.core.common.action.VdcActionParametersBase parentParameters = parameters.getParentParameters ( ) ; if ( ( parentCommandType == ( org.ovirt.engine.core.common.action.VdcActionType.Unknown ) ) || ( parentParameters == null ) ) { return parameters ; } parentParameters.setExecutionReason ( parameters.getExecutionReason ( ) ) ; return parentParameters ; }

Target:
protected org.ovirt.engine.core.common.action.VdcActionParametersBase getParametersForTask ( org.ovirt.engine.core.common.action.VdcActionType parentCommandType , org.ovirt.engine.core.common.action.VdcActionParametersBase parameters ) { org.ovirt.engine.core.common.action.VdcActionParametersBase parentParameters = parameters.getParentParameters ( ) ; if ( ( parentCommandType == ( org.ovirt.engine.core.common.action.VdcActionType.Unknown ) ) || ( parentParameters == null ) ) { return parameters ; } parentParameters.setExecutionReason ( parameters.getExecutionReason ( ) ) ; parentParameters.setCommandType ( parentCommandType ) ; return parentParameters ; }
Source:
public void getProviderCertificateChain ( 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 ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetProviderCertificateChainText , new org.ovirt.engine.core.common.queries.ProviderQueryParameters ( provider ) , aQuery ) ; }

Target:
public void getProviderCertificateChain ( 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 java.util.Collections.< org.ovirt.engine.core.common.businessentities.CertificateInfo > emptyList ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetProviderCertificateChain , new org.ovirt.engine.core.common.queries.ProviderQueryParameters ( provider ) , aQuery ) ; }
Source:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { super . eventRaised ( ev , sender , args ) ; if ( ev.matchesDefinition ( HostGeneralModel.RequestEditEventDefinition ) ) { getEditWithPMemphasisCommand ( ) . Execute ( ) ; } if ( ev.matchesDefinition ( HostGeneralModel.RequestGOToEventsTabEventDefinition ) ) { GoToEventsTab ( ) ; } }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { super . eventRaised ( ev , sender , args ) ; if ( ev.matchesDefinition ( HostGeneralModel.RequestEditEventDefinition ) ) { getEditWithPMemphasisCommand ( ) . execute ( ) ; } if ( ev.matchesDefinition ( HostGeneralModel.RequestGOToEventsTabEventDefinition ) ) { goToEventsTab ( ) ; } }
Source:
public void testListFailure ( ) throws java.lang.Exception { javax.ws.rs.core.UriInfo uriInfo = setUpUriExpectations ( null ) ; setUpQueryExpectations ( org.ovirt.engine.api.restapi.resource.BackendUsersResourceTest.QUERY , org.ovirt.engine.api.restapi.resource.FAILURE ) ; collection.setUriInfo ( uriInfo ) ; try { getCollection ( ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { assertTrue ( ( ( wae.getResponse ( ) . getEntity ( ) ) instanceof org.ovirt.engine.api.model.Fault ) ) ; assertEquals ( mockl10n ( org.ovirt.engine.api.restapi.resource.FAILURE ) , ( ( org.ovirt.engine.api.model.Fault ) ( wae.getResponse ( ) . getEntity ( ) ) ) . getDetail ( ) ) ; } }

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 ) ; setUpQueryExpectations ( org.ovirt.engine.api.restapi.resource.BackendUsersResourceTest.QUERY , 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 testGetNotFound_1 ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpGetEntityExpectations ( new java.util.ArrayList < > ( ) ) ; control.replay ( ) ; try { resource.get ( ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }

Target:
public void testGetNotFound1 ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpGetEntityExpectations ( new java.util.ArrayList < > ( ) ) ; control.replay ( ) ; try { resource.get ( ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }
Source:
public java.util.List < org.ovirt.engine.core.common.businessentities.Erratum > getErrataForHost ( org.ovirt.engine.core.common.businessentities.VdsStatic host ) { org.ovirt.engine.core.bll.host.provider.foreman.ContentHost contentHost = findContentHost ( host ) ; if ( contentHost == null ) { return java.util.Collections.emptyList ( ) ; } return runErrataListMethod ( java.lang.String.format ( org.ovirt.engine.core.bll.host.provider.foreman.ForemanHostProviderProxy.CONTENT_HOST_ERRATA_ENTRY_POINT , contentHost.getId ( ) ) ) ; }

Target:
public java.util.List < org.ovirt.engine.core.common.businessentities.Erratum > getErrataForHost ( java.lang.String hostName ) { org.ovirt.engine.core.bll.host.provider.foreman.ContentHost contentHost = findContentHost ( hostName ) ; if ( contentHost == null ) { return java.util.Collections.emptyList ( ) ; } return runErrataListMethod ( java.lang.String.format ( org.ovirt.engine.core.bll.host.provider.foreman.ForemanHostProviderProxy.CONTENT_HOST_ERRATA_ENTRY_POINT , contentHost.getId ( ) ) ) ; }
Source:
public void testCheckForIndex_BadParams ( ) throws java.io.IOException , java.net.URISyntaxException { org.junit.Assert.assertNull ( "no index file" , testServlet.checkForIndex ( mockRequest , mockResponse , null , null ) ) ; org.junit.Assert.assertNull ( "no index file" , testServlet.checkForIndex ( mockRequest , mockResponse , new java.io.File ( "/etc" ) , null ) ) ; }

Target:
public void testCheckForIndex_BadParams ( ) throws java.io.IOException , java.net.URISyntaxException { org.junit.Assert.assertNull ( "no index file" , testServlet.checkForIndex ( mockRequest , mockResponse , null , null ) ) ; org.junit.Assert.assertNull ( "no index file" , testServlet.checkForIndex ( mockRequest , mockResponse , file.getParentFile ( ) , null ) ) ; }
Source:
public void addPosixNonEmptyVFSType ( ) { 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 ( false ) . when ( command ) . isConnWithSameDetailsExists ( newPosixConnection , null ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionSuccess ( command ) ; }

Target:
public void addPosixNonEmptyVFSType ( ) { 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 ( false ) . when ( command ) . isConnWithSameDetailsExists ( newPosixConnection , null ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateSuccess ( command ) ; }
Source:
private void setupVdsDao ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VDS > expectedVds = java.util.Collections.singletonList ( vds ) ; org.ovirt.engine.core.dao.VdsDAO vdsDaoMock = org.mockito.Mockito.mock ( org.ovirt.engine.core.dao.VdsDAO.class ) ; org.mockito.Mockito.when ( vdsDaoMock.getAllForNetwork ( networkId ) ) . thenReturn ( expectedVds ) ; org.mockito.Mockito.when ( getDbFacadeMockInstance ( ) . getVdsDao ( ) ) . thenReturn ( vdsDaoMock ) ; }

Target:
private void setupVdsNetworkInterfaceDao ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > expectedVdsNetworkInterface = java.util.Collections.singletonList ( vdsNetworkInterface ) ; org.mockito.Mockito.when ( interfaceDaoMocked.getVdsInterfacesByNetworkId ( networkId ) ) . thenReturn ( expectedVdsNetworkInterface ) ; }