auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void isVirtioScsiEnabledForVm ( 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 ! ( ( ( java.util.List < ? > ) ( source ) ) . isEmpty ( ) ) ; } return false ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVirtioScsiControllers , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) , aQuery ) ; }

Target:
public void getMaxNumOfCPUsPerSocket ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String version ) { 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.core.common.queries.GetConfigurationValueParameters tempVar = new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.MaxNumOfCpuPerSocket ) ; tempVar.setVersion ( version ) ; getConfigFromCache ( tempVar , aQuery ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.VDS makeTestVds ( org.ovirt.engine.core.compat.Guid vdsId ) { org.ovirt.engine.core.common.businessentities.VDS newVdsData = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; newVdsData.setHostName ( "BUZZ" ) ; newVdsData.setVdsName ( "BAR" ) ; newVdsData.setVdsGroupCompatibilityVersion ( new org.ovirt.engine.core.compat.Version ( "1.2.3" ) ) ; newVdsData.setVdsGroupId ( new org.ovirt.engine.core.compat.Guid ( ) ) ; newVdsData.setId ( vdsId ) ; return newVdsData ; }

Target:
private org.ovirt.engine.core.common.businessentities.VDS makeTestVds ( org.ovirt.engine.core.compat.Guid vdsId ) { org.ovirt.engine.core.common.businessentities.VDS newVdsData = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; newVdsData.setHostName ( "BUZZ" ) ; newVdsData.setVdsName ( "BAR" ) ; newVdsData.setVdsGroupCompatibilityVersion ( new org.ovirt.engine.core.compat.Version ( "1.2.3" ) ) ; newVdsData.setVdsGroupId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; newVdsData.setId ( vdsId ) ; return newVdsData ; }
Source:
protected org.ovirt.engine.core.bll.CommandBase < ? > constructCommand ( org.ovirt.engine.core.common.action.VdcActionType actionType , org.ovirt.engine.core.common.action.VdcActionParametersBase parameters , boolean runAsInternal , org.ovirt.engine.core.bll.context.CommandContext context ) { org.ovirt.engine.core.bll.job.ExecutionHandler.evaluateCorrelationId ( parameters ) ; org.ovirt.engine.core.bll.CommandBase < ? > command = org.ovirt.engine.core.bll.CommandsFactory.CreateCommand ( actionType , parameters ) ; command.setInternalExecution ( runAsInternal ) ; command.setContext ( context ) ; org.ovirt.engine.core.bll.job.ExecutionHandler.prepareCommandForMonitoring ( command , actionType , runAsInternal ) ; return command ; }

Target:
protected org.ovirt.engine.core.compat.Guid createTask ( org.ovirt.engine.core.compat.Guid taskId , org.ovirt.engine.core.common.asynctasks.AsyncTaskCreationInfo asyncTaskCreationInfo , org.ovirt.engine.core.common.action.VdcActionType parentCommand , org.ovirt.engine.core.common.VdcObjectType vdcObjectType , org.ovirt.engine.core.compat.Guid ... entityIds ) { return createTask ( taskId , asyncTaskCreationInfo , parentCommand , createEntitiesMapForSingleEntityType ( vdcObjectType , entityIds ) ) ; }
Source:
public java.lang.String getStorageNameById ( org.ovirt.engine.core.compat.NGuid storageId ) { java.lang.String storageName = "" ; for ( java.lang.Object storageDomain : getAllDestinationStorage ( ) . getItems ( ) ) { org.ovirt.engine.core.common.businessentities.storage_domains storage = ( ( org.ovirt.engine.core.common.businessentities.storage_domains ) ( storageDomain ) ) ; if ( storage.getId ( ) . equals ( storageId ) ) { storageName = storage.getstorage_name ( ) ; } } return storageName ; }

Target:
public boolean isQuotaEnabled ( ) { return ( ( getStoragePool ( ) ) != null ) && ( ( getStoragePool ( ) . getQuotaEnforcementType ( ) ) != ( org.ovirt.engine.core.common.businessentities.QuotaEnforcementTypeEnum.DISABLED ) ) ; }
Source:
private boolean isCompatibleAgentExists ( java.util.List < org.ovirt.engine.core.common.businessentities.pm.FenceAgent > fenceAgents , org.ovirt.engine.core.common.businessentities.VDSGroup vdsGroup , java.util.List < java.lang.String > messages ) { for ( org.ovirt.engine.core.common.businessentities.pm.FenceAgent agent : fenceAgents ) { if ( isFenceAgentVersionCompatible ( agent , vdsGroup.getCompatibilityVersion ( ) . toString ( ) , messages ) ) { return true ; } } return false ; }

Target:
private boolean isCompatibleAgentExists ( java.util.List < org.ovirt.engine.core.common.businessentities.pm.FenceAgent > fenceAgents , org.ovirt.engine.core.common.businessentities.Cluster cluster , java.util.List < java.lang.String > messages ) { for ( org.ovirt.engine.core.common.businessentities.pm.FenceAgent agent : fenceAgents ) { if ( isFenceAgentVersionCompatible ( agent , cluster.getCompatibilityVersion ( ) . toString ( ) , messages ) ) { return true ; } } return false ; }
Source:
public void getDiskList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.DiskImage > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.DiskImage > ( ) ; } } ; org.ovirt.engine.core.common.queries.SearchParameters searchParams = new org.ovirt.engine.core.common.queries.SearchParameters ( "Disks:" , org.ovirt.engine.core.common.interfaces.SearchType.Disk ) ; searchParams.setMaxCount ( 9999 ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , searchParams , aQuery ) ; }

Target:
public void getVmsFromExternalServer ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId , org.ovirt.engine.core.compat.Guid vdsId , java.lang.String url , java.lang.String username , java.lang.String password , org.ovirt.engine.core.common.businessentities.OriginType originType ) { 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.getInstance ( ) . runQuery ( VdcQueryType.GetVmsFromExternalProvider , new org.ovirt.engine.core.common.queries.GetVmsFromExternalProviderQueryParameters ( url , username , password , originType , vdsId , dataCenterId ) , aQuery ) ; }
Source:
public void render ( org.ovirt.engine.ui.webadmin.widget.table.cell.Context context , T value , com.google.gwt.safehtml.shared.SafeHtmlBuilder sb ) { if ( ! ( isVisible ( value ) ) ) { return ; } com.google.gwt.resources.client.ImageResource image = resources.expanderDownImage ( ) ; com.google.gwt.safehtml.shared.SafeHtml imageHtml = com.google.gwt.safehtml.shared.SafeHtmlUtils.fromTrustedString ( com.google.gwt.user.client.ui.AbstractImagePrototype.create ( image ) . getHTML ( ) ) ; sb.append ( templates.volumeActivityMenu ( imageHtml ) ) ; }

Target:
public void render ( org.ovirt.engine.ui.webadmin.widget.table.cell.Context context , T value , com.google.gwt.safehtml.shared.SafeHtmlBuilder sb , java.lang.String id ) { if ( ! ( isVisible ( value ) ) ) { return ; } com.google.gwt.resources.client.ImageResource image = org.ovirt.engine.ui.webadmin.widget.table.cell.MenuCell.resources.expanderDownImage ( ) ; com.google.gwt.safehtml.shared.SafeHtml imageHtml = com.google.gwt.safehtml.shared.SafeHtmlUtils.fromTrustedString ( com.google.gwt.user.client.ui.AbstractImagePrototype.create ( image ) . getHTML ( ) ) ; sb.append ( org.ovirt.engine.ui.webadmin.widget.table.cell.MenuCell.templates.volumeActivityMenu ( imageHtml , id ) ) ; }
Source:
public void getTemplateDiskList ( 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 ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.DiskImage > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmTemplatesDisks , new org.ovirt.engine.core.common.queries.IdQueryParameters ( templateId ) , aQuery ) ; }

Target:
public void getStorageDomainList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageDomainsByStoragePoolId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) , aQuery ) ; }
Source:
public static void isTemplateNameUnique ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String name ) { 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.Boolean ) ( source ) ) . booleanValue ( ) ) : false ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.IsVmTemlateWithSameNameExist , new org.ovirt.engine.core.common.queries.NameQueryParameters ( name ) , aQuery ) ; }

Target:
public static void getRpmVersion ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.String ) ( source ) ) : "" ; } } ; org.ovirt.engine.core.common.queries.GetConfigurationValueParameters tempVar = new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.ProductRPMVersion ) ; tempVar.setVersion ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigFromCache ( tempVar , aQuery ) ; }
Source:
protected void verify ( org.ovirt.engine.api.model.ExternalHost model , org.ovirt.engine.api.model.ExternalHost transform ) { org.junit.Assert.assertNotNull ( transform ) ; org.junit.Assert.assertEquals ( model.getId ( ) , transform.getId ( ) ) ; org.junit.Assert.assertEquals ( model.getName ( ) , transform.getName ( ) ) ; org.junit.Assert.assertEquals ( model.getAddress ( ) , transform.getAddress ( ) ) ; }

Target:
protected void verify ( org.ovirt.engine.api.model.ExternalHost model , org.ovirt.engine.api.model.ExternalHost transform ) { org.junit.jupiter.api.Assertions.assertNotNull ( transform ) ; org.junit.jupiter.api.Assertions.assertEquals ( model.getId ( ) , transform.getId ( ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( model.getName ( ) , transform.getName ( ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( model.getAddress ( ) , transform.getAddress ( ) ) ; }
Source:
public static void getNetworkList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.Network > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.Network > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllNetworks , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) , aQuery ) ; }

Target:
public static void getPermissionsByAdElementId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid userId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Permissions > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Permissions > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetPermissionsByAdElementId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( userId ) , aQuery ) ; }
Source:
private boolean validateExternalNetwork ( org.ovirt.engine.core.bll.network.cluster.NetworkClusterValidator validator ) { return ( validate ( validator.externalNetworkNotDisplay ( getNetworkName ( ) ) ) ) && ( validate ( validator.externalNetworkNotRequired ( getNetworkName ( ) ) ) ) ; }

Target:
private boolean validateExternalNetwork ( org.ovirt.engine.core.bll.network.cluster.NetworkClusterValidator validator ) { return ( ( validate ( validator.externalNetworkSupported ( ) ) ) && ( validate ( validator.externalNetworkNotDisplay ( getNetworkName ( ) ) ) ) ) && ( validate ( validator.externalNetworkNotRequired ( getNetworkName ( ) ) ) ) ; }
Source:
public void lowThresholdStorageSpace ( ) { org.ovirt.engine.core.common.action.ImportVmParameters parameters = createParameters ( ) ; org.ovirt.engine.core.bll.validator.ImportValidator validator = setupDiskSpaceTest ( parameters ) ; org.mockito.Mockito.doReturn ( new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.ACTION_TYPE_FAILED_DISK_SPACE_LOW_ON_STORAGE_DOMAIN ) ) . when ( multipleSdValidator ) . allDomainsWithinThresholds ( ) ; org.junit.Assert.assertEquals ( VdcBllMessages.ACTION_TYPE_FAILED_DISK_SPACE_LOW_ON_STORAGE_DOMAIN , validator.validateSpaceRequirements ( java.util.Collections.< org.ovirt.engine.core.common.businessentities.storage.DiskImage > emptyList ( ) ) . getMessage ( ) ) ; }

Target:
public void lowThresholdStorageSpace ( ) { org.ovirt.engine.core.common.action.ImportVmParameters parameters = createParameters ( ) ; org.ovirt.engine.core.bll.validator.ImportValidator validator = setupDiskSpaceTest ( parameters ) ; org.mockito.Mockito.doReturn ( new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_DISK_SPACE_LOW_ON_STORAGE_DOMAIN ) ) . when ( multipleSdValidator ) . allDomainsWithinThresholds ( ) ; org.junit.Assert.assertEquals ( EngineMessage.ACTION_TYPE_FAILED_DISK_SPACE_LOW_ON_STORAGE_DOMAIN , validator.validateSpaceRequirements ( java.util.Collections.< org.ovirt.engine.core.common.businessentities.storage.DiskImage > emptyList ( ) ) . getMessage ( ) ) ; }
Source:
public void setLibvirtVersion ( java.lang.String value ) { if ( ( ( libvirtVersion ) == null ) && ( value == null ) ) { return ; } if ( ( ( libvirtVersion ) == null ) || ( ! ( libvirtVersion.equals ( value ) ) ) ) { libvirtVersion = value ; OnPropertyChanged ( new org.ovirt.engine.core.compat.PropertyChangedEventArgs ( "LibvirtVersion" ) ) ; } }

Target:
public void setLibvirtVersion ( org.ovirt.engine.core.compat.RpmVersion value ) { if ( org.ovirt.engine.core.compat.Version.OpInequality ( libvirtVersion , value ) ) { libvirtVersion = value ; OnPropertyChanged ( new org.ovirt.engine.core.compat.PropertyChangedEventArgs ( "LibvirtVersion" ) ) ; } }
Source:
public void testGetAnnotationFromClass ( ) { org.ovirt.engine.core.utils.log.Logged logged = org.ovirt.engine.core.utils.log.LoggedUtils.getAnnotation ( new org.ovirt.engine.core.utils.log.LoggedUtilsTest.LoggedClass ( ) ) ; org.junit.Assert.assertEquals ( LogLevel.OFF , logged.executionLevel ( ) ) ; org.junit.Assert.assertEquals ( LogLevel.OFF , logged.errorLevel ( ) ) ; org.junit.Assert.assertEquals ( LogLevel.INFO , logged.parametersLevel ( ) ) ; org.junit.Assert.assertEquals ( LogLevel.INFO , logged.returnLevel ( ) ) ; }

Target:
public void testGetAnnotationFromClass ( ) { org.ovirt.engine.core.utils.log.Logged logged = org.ovirt.engine.core.utils.log.LoggedUtils.getAnnotation ( new org.ovirt.engine.core.utils.log.LoggedUtilsTest.LoggedClass ( ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( LogLevel.OFF , logged.executionLevel ( ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( LogLevel.OFF , logged.errorLevel ( ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( LogLevel.INFO , logged.parametersLevel ( ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( LogLevel.INFO , logged.returnLevel ( ) ) ; }
Source:
protected void updateVmDataChangedTime ( ) { vmManager.updateVmDataChangedTime ( ) ; }

Target:
protected void executeVDSCommand ( ) { vmManager = resourceManager.getVmManager ( org.ovirt.engine.core.vdsbroker.ManagingVmCommand.getParameters ( ) . getVmId ( ) ) ; vmManager.lock ( ) ; try { executeVmCommand ( ) ; vmManager.updateVmDataChangedTime ( ) ; } finally { vmManager.unlock ( ) ; } }
Source:
public static void getNetworkList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.Network > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.Network > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllNetworks , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) , aQuery ) ; }

Target:
public void getStorageDomainList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ( ) ; } } ; org.ovirt.engine.core.common.queries.SearchParameters searchParams = new org.ovirt.engine.core.common.queries.SearchParameters ( "Storage:" , org.ovirt.engine.core.common.interfaces.SearchType.StorageDomain ) ; searchParams.setMaxCount ( 9999 ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , searchParams , aQuery ) ; }
Source:
private void verifyCertificate ( org.ovirt.engine.api.model.Vm model ) { org.junit.Assert.assertNotNull ( model.getDisplay ( ) ) ; org.junit.Assert.assertNotNull ( model.getDisplay ( ) . getCertificate ( ) ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.api.restapi.resource.BackendVmResourceTest.CERTIFICATE , model.getDisplay ( ) . getCertificate ( ) . getSubject ( ) ) ; }

Target:
private void verifyCertificate ( org.ovirt.engine.api.model.Vm model ) { org.junit.jupiter.api.Assertions.assertNotNull ( model.getDisplay ( ) ) ; org.junit.jupiter.api.Assertions.assertNotNull ( model.getDisplay ( ) . getCertificate ( ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( org.ovirt.engine.api.restapi.resource.BackendVmResourceTest.CERTIFICATE , model.getDisplay ( ) . getCertificate ( ) . getSubject ( ) ) ; }
Source:
public void onFailed ( org.ovirt.engine.core.compat.Guid cmdId , java.util.List < org.ovirt.engine.core.compat.Guid > childCmdIds ) { super . onFailed ( cmdId , childCmdIds ) ; log.error ( "Failed deleting disk from Cinder. ID: {}" , getDiskId ( ) ) ; if ( getCommand ( ) . getParameters ( ) . getShouldBeLogged ( ) ) { new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector ( ) . log ( getCommand ( ) , AuditLogType.USER_FINISHED_FAILED_REMOVE_DISK ) ; } org.ovirt.engine.core.bll.ImagesHandler.updateImageStatus ( getDiskId ( ) , ImageStatus.ILLEGAL ) ; getCommand ( ) . endAction ( ) ; org.ovirt.engine.core.bll.tasks.CommandCoordinatorUtil.removeAllCommandsInHierarchy ( cmdId ) ; }

Target:
private org.ovirt.engine.core.common.businessentities.storage.ImageStatus checkImageStatus ( org.ovirt.engine.core.common.businessentities.storage.CinderDisk removedVolume ) { if ( ( removedVolume.getVolumeClassification ( ) ) == ( org.ovirt.engine.core.common.businessentities.storage.VolumeClassification.Volume ) ) { return getCinderBroker ( ) . getDiskStatus ( removedVolume.getImageId ( ) ) ; } else if ( ( removedVolume.getVolumeClassification ( ) ) == ( org.ovirt.engine.core.common.businessentities.storage.VolumeClassification.Snapshot ) ) { return getCinderBroker ( ) . getSnapshotStatus ( removedVolume.getImageId ( ) ) ; } else { log.error ( "No valid cinder volume type enum has been initialized in the Cinder disk business entity." ) ; return org.ovirt.engine.core.common.businessentities.storage.ImageStatus.ILLEGAL ; } }
Source:
public static void getHostsForStorageOperation ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , boolean localFsOnly ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { return source ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetHostsForStorageOperation , new org.ovirt.engine.core.common.queries.GetHostsForStorageOperationParameters ( storagePoolId , localFsOnly ) , aQuery ) ; }

Target:
public static void getDataCenterById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStoragePoolById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) , aQuery ) ; }
Source:
protected static java.util.Set < org.ovirt.engine.core.common.businessentities.BaseDisk > getDisks ( java.util.Collection < org.ovirt.engine.core.common.businessentities.DiskImage > diskImages ) { java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.BaseDisk > diskMap = new java.util.HashMap < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.BaseDisk > ( ) ; for ( org.ovirt.engine.core.common.businessentities.Disk diskImage : diskImages ) { diskMap.put ( diskImage.getId ( ) , diskImage ) ; } return new java.util.HashSet < org.ovirt.engine.core.common.businessentities.BaseDisk > ( diskMap.values ( ) ) ; }

Target:
protected static java.util.Set < org.ovirt.engine.core.common.businessentities.storage.BaseDisk > getDisks ( java.util.Collection < org.ovirt.engine.core.common.businessentities.storage.DiskImage > diskImages ) { java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.storage.BaseDisk > diskMap = new java.util.HashMap < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.storage.BaseDisk > ( ) ; for ( org.ovirt.engine.core.common.businessentities.storage.Disk diskImage : diskImages ) { diskMap.put ( diskImage.getId ( ) , diskImage ) ; } return new java.util.HashSet < org.ovirt.engine.core.common.businessentities.storage.BaseDisk > ( diskMap.values ( ) ) ; }
Source:
private org.ovirt.engine.core.bll.AddVmCommand < org.ovirt.engine.core.common.action.AddVmParameters > setupCanAddVmTests ( final int domainSizeGB , final int sizeRequired ) { org.ovirt.engine.core.common.businessentities.VM vm = initializeMock ( domainSizeGB , sizeRequired ) ; org.ovirt.engine.core.bll.AddVmCommand < org.ovirt.engine.core.common.action.AddVmParameters > cmd = createCommand ( vm ) ; org.ovirt.engine.core.bll.AddVmCommandTest.initCommandMethods ( cmd ) ; org.mockito.Mockito.doReturn ( createVmTemplate ( ) ) . when ( cmd ) . getVmTemplate ( ) ; org.mockito.Mockito.doReturn ( createStoragePool ( ) ) . when ( cmd ) . getStoragePool ( ) ; return cmd ; }

Target:
private org.ovirt.engine.core.bll.AddVmCommand < org.ovirt.engine.core.common.action.AddVmParameters > setupCanAddVmTests ( final int domainSizeGB , final int sizeRequired ) { org.ovirt.engine.core.common.businessentities.VM vm = initializeMock ( domainSizeGB , sizeRequired ) ; org.ovirt.engine.core.bll.AddVmCommand < org.ovirt.engine.core.common.action.AddVmParameters > cmd = createCommand ( vm ) ; org.ovirt.engine.core.bll.AddVmCommandTest.initCommandMethods ( cmd ) ; initializeVmStaticDaoMock ( vm ) ; org.mockito.Mockito.doReturn ( createVmTemplate ( ) ) . when ( cmd ) . getVmTemplate ( ) ; org.mockito.Mockito.doReturn ( createStoragePool ( ) ) . when ( cmd ) . getStoragePool ( ) ; return cmd ; }
Source:
private org.ovirt.engine.core.common.businessentities.VDS getPreviousHost ( java.util.List < org.ovirt.engine.core.common.businessentities.VDS > hosts ) { org.ovirt.engine.core.compat.Guid previousProxyHostId = getVmwarePropertiesModel ( ) . getLastProxyHostId ( ) ; for ( org.ovirt.engine.core.common.businessentities.VDS host : hosts ) { if ( host.getId ( ) . equals ( previousProxyHostId ) ) { return host ; } } return null ; }

Target:
private org.ovirt.engine.core.common.businessentities.VDS getPreviousHost ( java.util.List < org.ovirt.engine.core.common.businessentities.VDS > hosts ) { org.ovirt.engine.core.compat.Guid previousProxyHostId = getProxyHostPropertiesModel ( ) . getLastProxyHostId ( ) ; for ( org.ovirt.engine.core.common.businessentities.VDS host : hosts ) { if ( host.getId ( ) . equals ( previousProxyHostId ) ) { return host ; } } return null ; }
Source:
public void getHostListByDataCenter ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid spId ) { 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 org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.VDS > cast ( ( ( java.util.List < ? > ) ( source ) ) ) ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllVdsByStoragePool , new org.ovirt.engine.core.common.queries.IdQueryParameters ( spId ) , aQuery ) ; }

Target:
public void getClusterGlusterServices ( org.ovirt.engine.ui.frontend.AsyncQuery < org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeAdvancedDetails > aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.CastingConverter < > ( ) ; 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 void testList ( ) { resource.setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpEntityQueryExpectations ( VdcQueryType.GetHostDevicesByHostId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { HOST_ID } , getHostDeviceCollection ( ) ) ; verifyHostDevices ( resource.list ( ) . getHostDevices ( ) ) ; }

Target:
public void testList ( ) { resource.setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpEntityQueryExpectations ( QueryType.GetHostDevicesByHostId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { HOST_ID } , getHostDeviceCollection ( ) ) ; verifyHostDevices ( resource.list ( ) . getHostDevices ( ) ) ; }
Source:
public void setCommandStatus ( org.ovirt.engine.core.compat.CommandStatus status , boolean updateDB ) { this . commandStatus = status ; if ( updateDB ) { javax.transaction.Transaction transaction = org.ovirt.engine.core.utils.transaction.TransactionSupport.suspend ( ) ; try { org.ovirt.engine.core.bll.tasks.TaskManagerUtil.updateCommandStatus ( getCommandId ( ) , getTaskType ( ) , commandStatus ) ; } finally { org.ovirt.engine.core.utils.transaction.TransactionSupport.resume ( transaction ) ; } } }

Target:
public org.ovirt.engine.core.common.action.VdcActionParametersBase getParentParameters ( ) { org.ovirt.engine.core.common.action.VdcActionParametersBase parentParameters = getParameters ( ) ; if ( parentHasCallback ( ) ) { if ( ( ! ( getParameters ( ) . getShouldBeEndedByParent ( ) ) ) || ( ( getTaskType ( ) ) == ( org.ovirt.engine.core.common.asynctasks.AsyncTaskType.notSupported ) ) ) { parentParameters = getParameters ( ) . getParentParameters ( ) ; } } else if ( getParameters ( ) . getShouldBeEndedByParent ( ) ) { parentParameters = getParameters ( ) . getParentParameters ( ) ; } return parentParameters ; }
Source:
public java.util.List < org.ovirt.engine.core.common.businessentities.RepoFileMetaData > getUserRequestForStoragePoolAndDomainRepoFileList ( org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.compat.Guid storageDomainId , org.ovirt.engine.core.common.businessentities.ImageType imageType , boolean forceRefresh ) { java.util.List < org.ovirt.engine.core.common.businessentities.RepoFileMetaData > repoList = null ; if ( ! ( isStorageDomainValid ( storageDomainId , imageType , forceRefresh ) ) ) { return null ; } repoList = getCachedIsoListByStoragePoolAndDomainId ( storagePoolId , storageDomainId , imageType ) ; return repoList ; }

Target:
public java.util.List < org.ovirt.engine.core.common.businessentities.RepoFileMetaData > getUserRequestForStorageDomainRepoFileList ( org.ovirt.engine.core.compat.Guid storageDomainId , org.ovirt.engine.core.common.businessentities.ImageFileType imageType , boolean forceRefresh ) { java.util.List < org.ovirt.engine.core.common.businessentities.RepoFileMetaData > repoList = null ; if ( ! ( isStorageDomainValid ( storageDomainId , imageType , forceRefresh ) ) ) { return null ; } repoList = getCachedIsoListByDomainId ( storageDomainId , imageType ) ; return repoList ; }
Source:
private void logRemoveCinderDiskError ( org.ovirt.engine.core.common.businessentities.storage.CinderDisk cinderDisk , org.ovirt.engine.core.common.action.VdcReturnValueBase vdcReturnValue ) { log.error ( "Can't remove cinder disk id '{}' for VM id '{}' from domain id '{}' due to: {}." , cinderDisk.getImageId ( ) , org.ovirt.engine.core.bll.storage.disk.cinder.RemoveAllVmCinderDisksCommand.getParameters ( ) . getVmId ( ) , cinderDisk.getStorageIds ( ) . get ( 0 ) , ( vdcReturnValue != null ? vdcReturnValue.getFault ( ) . getMessage ( ) : "" ) ) ; }

Target:
private void logRemoveCinderDiskError ( org.ovirt.engine.core.common.businessentities.storage.CinderDisk cinderDisk , org.ovirt.engine.core.common.action.ActionReturnValue actionReturnValue ) { log.error ( "Can't remove cinder disk id '{}' for VM id '{}' from domain id '{}' due to: {}." , cinderDisk.getImageId ( ) , org.ovirt.engine.core.bll.storage.disk.cinder.RemoveAllVmCinderDisksCommand.getParameters ( ) . getVmId ( ) , cinderDisk.getStorageIds ( ) . get ( 0 ) , ( actionReturnValue != null ? actionReturnValue.getFault ( ) . getMessage ( ) : "" ) ) ; }
Source:
public static org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface getSlave ( ) { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface entity = new org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface ( ) ; entity.setId ( org.ovirt.engine.api.restapi.resource.BackendHostNicsResourceTest.SLAVE_GUID ) ; entity.setName ( org.ovirt.engine.api.restapi.resource.BackendHostNicsResourceTest.SLAVE_NAME ) ; entity.setNetworkName ( org.ovirt.engine.api.restapi.resource.BackendHostNicsResourceTest.NETWORK_NAME ) ; entity.setSpeed ( org.ovirt.engine.api.restapi.resource.BackendHostNicsResourceTest.NIC_SPEED ) ; entity.setBondName ( org.ovirt.engine.api.restapi.resource.BackendHostNicsResourceTest.MASTER_NAME ) ; entity.setIpv4BootProtocol ( org.ovirt.engine.api.restapi.resource.BackendHostNicsResourceTest.BOOT_PROTOCOL ) ; return org.ovirt.engine.api.restapi.resource.BackendHostNicsResourceTest.setUpStatistics ( entity , org.ovirt.engine.api.restapi.resource.BackendHostNicsResourceTest.SLAVE_GUID ) ; }

Target:
public static org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface getSlave ( ) { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface entity = new org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface ( ) ; entity.setId ( org.ovirt.engine.api.restapi.resource.BackendHostNicsResourceTest.SLAVE_GUID ) ; entity.setName ( org.ovirt.engine.api.restapi.resource.BackendHostNicsResourceTest.SLAVE_NAME ) ; entity.setNetworkName ( org.ovirt.engine.api.restapi.resource.BackendHostNicsResourceTest.NETWORK_NAME ) ; entity.setSpeed ( org.ovirt.engine.api.restapi.resource.BackendHostNicsResourceTest.NIC_SPEED ) ; entity.setBondName ( org.ovirt.engine.api.restapi.resource.BackendHostNicsResourceTest.MASTER_NAME ) ; entity.setIpv4BootProtocol ( org.ovirt.engine.api.restapi.resource.BackendHostNicsResourceTest.IPV4_BOOT_PROTOCOL ) ; entity.setIpv6BootProtocol ( org.ovirt.engine.api.restapi.resource.BackendHostNicsResourceTest.IPV6_BOOT_PROTOCOL ) ; return org.ovirt.engine.api.restapi.resource.BackendHostNicsResourceTest.setUpStatistics ( entity , org.ovirt.engine.api.restapi.resource.BackendHostNicsResourceTest.SLAVE_GUID ) ; }
Source:
public void testGetHasPermission ( ) { org.ovirt.engine.core.common.businessentities.network.VnicProfile result = dao.get ( FixturesTool.VM_NETWORK_INTERFACE_PROFILE , org.ovirt.engine.core.dao.network.VnicProfileDaoTest.PRIVILEGED_USER_ID , true ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertEquals ( FixturesTool.VM_NETWORK_INTERFACE_PROFILE , result.getId ( ) ) ; }

Target:
public void testSave ( ) { dao.save ( vnicProfile ) ; org.ovirt.engine.core.common.businessentities.network.VnicProfile result = dao.get ( vnicProfile.getId ( ) ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertEquals ( vnicProfile.getId ( ) , result.getId ( ) ) ; org.junit.Assert.assertEquals ( false , result.isPortMirroring ( ) ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc startSpice ( java.lang.String vdsIp , int port , java.lang.String ticket ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.startSpice ( vdsIp , port , ticket ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.PrepareImageReturnForXmlRpc prepareImage ( java.lang.String spID , java.lang.String sdID , java.lang.String imageID , java.lang.String volumeID , boolean allowIllegal ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.prepareImage ( sdID , spID , imageID , volumeID , allowIllegal ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.PrepareImageReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.PrepareImageReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
Source:
public void getGlusterVolumeSnapshotsForVolume ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid volumeId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery asyncQuery ) { return source != null ? source : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeSnapshotEntity > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterVolumeSnapshotsByVolumeId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( volumeId ) , aQuery ) ; }

Target:
public void getNetworkConnectivityCheckTimeoutInSeconds ( org.ovirt.engine.ui.frontend.AsyncQuery < java.lang.Integer > aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.DefaultValueConverter < > ( 120 ) ; getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.NetworkConnectivityCheckTimeoutInSeconds , getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
public void addDiskImageWithNoVmDevice ( org.ovirt.engine.core.common.businessentities.storage.DiskImage image ) { addDiskImageWithNoVmDevice ( image , image.getActive ( ) , new org.ovirt.engine.core.common.businessentities.storage.ImageStorageDomainMap ( image.getImageId ( ) , image.getStorageIds ( ) . get ( 0 ) , image.getQuotaId ( ) , image.getDiskProfileId ( ) ) ) ; }

Target:
public static void addDiskImage ( org.ovirt.engine.core.common.businessentities.storage.DiskImage image , org.ovirt.engine.core.compat.Guid vmId ) { org.ovirt.engine.core.bll.storage.disk.image.ImagesHandler.addDiskImage ( image , image.getActive ( ) , new org.ovirt.engine.core.common.businessentities.storage.ImageStorageDomainMap ( image.getImageId ( ) , image.getStorageIds ( ) . get ( 0 ) , image.getQuotaId ( ) , image.getDiskProfileId ( ) ) , vmId ) ; }
Source:
public org.ovirt.engine.core.bll.ValidationResult vnicProfileNameNotUsed ( ) { for ( org.ovirt.engine.core.common.businessentities.network.VnicProfile profile : getVnicProfiles ( ) ) { if ( ( profile.getName ( ) . equals ( vnicProfile.getName ( ) ) ) && ( ! ( profile.getId ( ) . equals ( vnicProfile.getId ( ) ) ) ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.ACTION_TYPE_FAILED_VNIC_PROFILE_NAME_IN_USE ) ; } } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult vnicProfileNameNotUsed ( ) { for ( org.ovirt.engine.core.common.businessentities.network.VnicProfile profile : getVnicProfiles ( ) ) { if ( ( profile.getName ( ) . equals ( vnicProfile.getName ( ) ) ) && ( ! ( profile.getId ( ) . equals ( vnicProfile.getId ( ) ) ) ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_VNIC_PROFILE_NAME_IN_USE ) ; } } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }
Source:
public void nonMixedClusterServiceSupported ( ) { mockConfigRule.mockConfigValue ( ConfigValues.AllowClusterWithVirtGlusterEnabled , false ) ; org.mockito.Mockito.when ( cluster.supportsGlusterService ( ) ) . thenReturn ( true ) ; org.mockito.Mockito.when ( cluster.supportsVirtService ( ) ) . thenReturn ( false ) ; validator = new org.ovirt.engine.core.bll.validator.ClusterValidator ( dbFacade , cluster ) ; org.junit.Assert.assertThat ( validator.mixedClusterServicesSupported ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }

Target:
public void mixedClusterServicesSupported ( ) { mockConfigRule.mockConfigValue ( ConfigValues.AllowClusterWithVirtGlusterEnabled , true ) ; org.mockito.Mockito.when ( cluster.supportsGlusterService ( ) ) . thenReturn ( true ) ; org.mockito.Mockito.when ( cluster.supportsVirtService ( ) ) . thenReturn ( true ) ; validator = new org.ovirt.engine.core.bll.validator.ClusterValidator ( dbFacade , cluster , cpuFlagsManagerHandler ) ; org.junit.Assert.assertThat ( validator.mixedClusterServicesSupported ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }
Source:
public static void isMTUOverrideSupported ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String version ) { 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.Boolean ) ( source ) ) . booleanValue ( ) : true ; } } ; org.ovirt.engine.core.common.queries.GetConfigurationValueParameters tempVar = new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.MTUOverrideSupported ) ; tempVar.setVersion ( version ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigFromCache ( tempVar , aQuery ) ; }

Target:
public static boolean isSpiceCopyPasteToggleSupported ( java.lang.String version ) { return ( ( java.lang.Boolean ) ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigValuePreConverted ( ConfigurationValues.SpiceCopyPasteToggleSupported , version ) ) ) ; }
Source:
public void getTemplateDiskList ( 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 ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.DiskImage > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmTemplatesDisks , new org.ovirt.engine.core.common.queries.IdQueryParameters ( templateId ) , aQuery ) ; }

Target:
public void getLabelList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Label > list = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Label > ) ( source ) ) ; java.util.Collections.sort ( list , new org.ovirt.engine.core.common.businessentities.comparators.NameableComparator ( ) ) ; return list ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Label > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllLabels , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }
Source:
private void UpdateDestinationVdsThreaded ( org.ovirt.engine.core.compat.Guid dstVdsId , org.ovirt.engine.core.common.businessentities.VM vm ) { org.ovirt.engine.core.vdsbroker.VdsManager vdsManager = org.ovirt.engine.core.vdsbroker.ResourceManager.getInstance ( ) . GetVdsManager ( dstVdsId ) ; if ( vdsManager != null ) { java.lang.Class < ? > [ ] inputTypes = new java.lang.Class [ ] { org.ovirt.engine.core.vdsbroker.VdsManager.class , org.ovirt.engine.core.common.businessentities.VM.class } ; java.lang.Object [ ] inputParams = new java.lang.Object [ ] { vdsManager , vm } ; org.ovirt.engine.core.utils.timer.SchedulerUtilQuartzImpl.getInstance ( ) . scheduleAOneTimeJob ( this , "UpdateDestinationVdsOnTimer" , inputTypes , inputParams , 0 , java.util.concurrent.TimeUnit.MILLISECONDS ) ; } }

Target:
private void updateDestinationVdsThreaded ( org.ovirt.engine.core.compat.Guid dstVdsId , final org.ovirt.engine.core.common.businessentities.VM vm ) { final org.ovirt.engine.core.vdsbroker.VdsManager vdsManager = org.ovirt.engine.core.vdsbroker.ResourceManager.getInstance ( ) . GetVdsManager ( dstVdsId ) ; if ( vdsManager != null ) { org.ovirt.engine.core.utils.threadpool.ThreadPoolUtil.execute ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { updateDestinationVdsOnTimer ( vdsManager , vm ) ; } } ) ; } }
Source:
public void testGetNotFound ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpEntityQueryExpectations ( VdcQueryType.GetAllDisksByVmId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.AbstractBackendDisksResourceTest.PARENT_ID } , new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.DiskImage > ( ) ) ; control.replay ( ) ; try { resource.get ( ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }

Target:
public void testGet ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpEntityQueryExpectations ( 1 ) ; control.replay ( ) ; org.ovirt.engine.api.model.Disk disk = resource.get ( ) ; org.ovirt.engine.api.restapi.resource.BackendVmDiskResourceTest.verifyModelSpecific ( disk , 1 ) ; verifyLinks ( disk ) ; }
Source:
private void doQueryExecute ( org.ovirt.engine.api.extensions.ExtMap input , org.ovirt.engine.api.extensions.ExtMap output ) { org.ovirt.engine.extensions.aaa.builtin.internal.InternalAuthz.Opaque opaque = input.get ( Authz.InvokeKeys.QUERY_OPAQUE ) ; output.put ( Authz.InvokeKeys.QUERY_RESULT , ( ( opaque.firstCall ) && ( opaque.found ) ? java.util.Arrays.asList ( adminUser ) : null ) ) ; opaque.firstCall = false ; }

Target:
private void doQueryExecute ( org.ovirt.engine.api.extensions.ExtMap input , org.ovirt.engine.api.extensions.ExtMap output ) { org.ovirt.engine.extensions.aaa.builtin.internal.InternalAuthz.Opaque opaque = input.get ( Authz.InvokeKeys.QUERY_OPAQUE ) ; output.put ( Authz.InvokeKeys.QUERY_RESULT , ( ( opaque.firstCall ) && ( opaque.found ) ? java.util.Collections.singletonList ( adminUser ) : null ) ) ; opaque.firstCall = false ; }