auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
protected org.ovirt.engine.core.common.businessentities.DbUser getEntity ( int index ) { org.ovirt.engine.core.common.businessentities.DbUser entity = new org.ovirt.engine.core.common.businessentities.DbUser ( ) ; entity.setId ( GUIDS [ index ] ) ; entity.setExternalId ( EXTERNAL_IDS [ index ] ) ; entity.setFirstName ( NAMES [ index ] ) ; entity.setGroupNames ( new java.util.HashSet < java.lang.String > ( java.util.Arrays.asList ( org.ovirt.engine.api.restapi.resource.BackendUsersResourceTest.GROUPS.split ( "," ) ) ) ) ; entity.setDomain ( org.ovirt.engine.api.restapi.resource.DOMAIN ) ; return entity ; }

Target:
protected org.ovirt.engine.core.common.businessentities.aaa.DbUser getEntity ( int index ) { org.ovirt.engine.core.common.businessentities.aaa.DbUser entity = new org.ovirt.engine.core.common.businessentities.aaa.DbUser ( ) ; entity.setId ( GUIDS [ index ] ) ; entity.setExternalId ( EXTERNAL_IDS [ index ] ) ; entity.setFirstName ( NAMES [ index ] ) ; entity.setGroupNames ( new java.util.HashSet < java.lang.String > ( java.util.Arrays.asList ( org.ovirt.engine.api.restapi.resource.BackendUsersResourceTest.GROUPS.split ( "," ) ) ) ) ; entity.setDomain ( org.ovirt.engine.api.restapi.resource.DOMAIN ) ; return entity ; }
Source:
private org.ovirt.engine.core.common.businessentities.StorageDomain initStorageDomain ( org.ovirt.engine.core.compat.Guid storageDomainId ) { org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain = new org.ovirt.engine.core.common.businessentities.StorageDomain ( ) ; storageDomain.setId ( storageDomainId ) ; storageDomain.setStoragePoolId ( storagePoolId ) ; command.setStorageDomain ( storageDomain ) ; org.mockito.Mockito.when ( storageDomainDao.get ( org.mockito.ArgumentMatchers.any ( ) ) ) . thenReturn ( storageDomain ) ; org.mockito.Mockito.when ( storageDomainDao.getForStoragePool ( storageDomainId , storagePoolId ) ) . thenReturn ( storageDomain ) ; return storageDomain ; }

Target:
private org.ovirt.engine.core.common.businessentities.StorageDomain initStorageDomain ( org.ovirt.engine.core.compat.Guid storageDomainId ) { org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain = new org.ovirt.engine.core.common.businessentities.StorageDomain ( ) ; storageDomain.setId ( storageDomainId ) ; storageDomain.setStoragePoolId ( storagePoolId ) ; storageDomain.setStatus ( StorageDomainStatus.Active ) ; command.setStorageDomain ( storageDomain ) ; org.mockito.Mockito.when ( storageDomainDao.get ( org.mockito.ArgumentMatchers.any ( ) ) ) . thenReturn ( storageDomain ) ; org.mockito.Mockito.when ( storageDomainDao.getForStoragePool ( storageDomainId , storagePoolId ) ) . thenReturn ( storageDomain ) ; return storageDomain ; }
Source:
public boolean validateAndSetQuota ( ) { boolean quotaAcc = super . validateAndSetQuota ( ) ; if ( ! quotaAcc ) { return false ; } if ( ! ( org.ovirt.engine.core.bll.RunVmOnceCommand.getParameters ( ) . getRunAsStateless ( ) ) ) { return quotaAcc ; } return org.ovirt.engine.core.bll.quota.QuotaManager.getInstance ( ) . validateAndSetStorageQuota ( org.ovirt.engine.core.bll.RunVmOnceCommand.getStoragePool ( ) , getStorageQuotaListParameters ( ) , org.ovirt.engine.core.bll.RunVmOnceCommand.getReturnValue ( ) . getCanDoActionMessages ( ) ) ; }

Target:
public boolean validateAndSetQuota ( ) { if ( org.ovirt.engine.core.bll.RunVmOnceCommand.isInternalExecution ( ) ) { return true ; } boolean quotaAcc = super . validateAndSetQuota ( ) ; if ( ! quotaAcc ) { return false ; } if ( ! ( org.ovirt.engine.core.bll.RunVmOnceCommand.getParameters ( ) . getRunAsStateless ( ) ) ) { return quotaAcc ; } return org.ovirt.engine.core.bll.quota.QuotaManager.getInstance ( ) . validateAndSetStorageQuota ( org.ovirt.engine.core.bll.RunVmOnceCommand.getStoragePool ( ) , getStorageQuotaListParameters ( ) , org.ovirt.engine.core.bll.RunVmOnceCommand.getReturnValue ( ) . getCanDoActionMessages ( ) ) ; }
Source:
public void testRefreshLightWeightFor33 ( ) throws java.lang.Exception { createCluster ( Version.v3_3 ) ; setupMocks ( ) ; org.mockito.Mockito.doReturn ( getGlusterServer ( ) ) . when ( glusterServerDao ) . getByServerId ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ; glusterManager.refreshLightWeightData ( ) ; verifyMocksForLightWeight ( ) ; }

Target:
public void testRefreshLightWeight ( ) throws java.lang.Exception { createCluster ( ) ; setupMocks ( ) ; org.mockito.Mockito.doReturn ( getGlusterServer ( ) ) . when ( glusterServerDao ) . getByServerId ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ; glusterManager.refreshLightWeightData ( ) ; verifyMocksForLightWeight ( ) ; }
Source:
private void initCommandExecutor ( ) { if ( ! ( cmdExecutorInitialized ) ) { for ( org.ovirt.engine.core.common.businessentities.CommandEntity cmdEntity : coco.getCommandsWithCallBackEnabled ( ) ) { if ( ! ( cmdEntity.isCallBackNotified ( ) ) ) { addToCallBackMap ( cmdEntity ) ; } } cmdExecutorInitialized = true ; } }

Target:
private void initCommandExecutor ( ) { if ( ! ( cmdExecutorInitialized ) ) { for ( org.ovirt.engine.core.common.businessentities.CommandEntity cmdEntity : coco.getCommandsWithCallBackEnabled ( ) ) { switch ( cmdEntity.getCommandStatus ( ) ) { case ACTIVE_SYNC : case NOT_STARTED : coco.retrieveCommand ( cmdEntity.getId ( ) ) . setCommandStatus ( CommandStatus.FAILED_RESTARTED ) ; break ; default : if ( ! ( cmdEntity.isCallBackNotified ( ) ) ) { addToCallBackMap ( cmdEntity ) ; } break ; } } cmdExecutorInitialized = true ; } }
Source:
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 ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.prepareImage ( sdID , spID , imageID , volumeID ) ; 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 ) ; } }

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 java.util.Date readDate ( ) { java.lang.String image = readString ( ) ; try { return org.ovirt.api.metamodel.runtime.xml.XmlReader.DATE_FORMAT.get ( ) . parse ( image ) ; } catch ( java.text.ParseException exception ) { throw new org.ovirt.api.metamodel.runtime.xml.XmlException ( ( ( "The text \"" + image ) + "\" isn\'t a valid date value" ) ) ; } }

Target:
public java.util.Date parseDate ( java.lang.String image ) { try { return org.ovirt.api.metamodel.runtime.xml.XmlReader.DATE_FORMAT.get ( ) . parse ( image ) ; } catch ( java.text.ParseException exception ) { throw new org.ovirt.api.metamodel.runtime.xml.XmlException ( ( ( "The text \"" + image ) + "\" isn\'t a valid date value" ) ) ; } }
Source:
private void initEditors ( ) { volumeTypeEditor = new org.ovirt.engine.ui.common.widget.editor.EntityModelLabelEditor ( new org.ovirt.engine.ui.common.widget.renderer.EnumRenderer ( ) , new org.ovirt.engine.ui.common.widget.parser.EntityModelParser ( ) ) ; forceEditor = new org.ovirt.engine.ui.common.widget.editor.EntityModelCheckBoxEditor ( org.ovirt.engine.ui.common.widget.Align.RIGHT ) ; serverEditor = new org.ovirt.engine.ui.common.widget.editor.ListModelListBoxEditor < java.lang.Object > ( new org.ovirt.engine.ui.common.widget.renderer.NullSafeRenderer < java.lang.Object > ( ) { @ java.lang.Override public java.lang.String renderNullSafe ( java.lang.Object object ) { return ( ( org.ovirt.engine.core.common.businessentities.VDS ) ( object ) ) . getHostName ( ) ; } } ) ; }

Target:
public org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeType parse ( java.lang.CharSequence text ) throws java.text.ParseException { return org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeType.valueOf ( text.toString ( ) . toUpperCase ( ) ) ; }
Source:
public void testValidateModifiedBondSlavesWhenSlaveInterfaceDoesNotExist ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.Bond bond = createBond ( ) ; bond.setSlaves ( java.util.Arrays.asList ( "slaveA" , "slaveB" ) ) ; org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidator validator = new org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidatorTest.HostSetupNetworksValidatorBuilder ( ) . setParams ( new org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidatorTest.ParametersBuilder ( ) . addBonds ( bond ) ) . build ( ) ; doTestValidateModifiedBondSlaves ( org.mockito.Mockito.spy ( validator ) , new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.HOST_NETWORK_INTERFACE_NOT_EXIST ) , ValidationResult.VALID , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.HOST_NETWORK_INTERFACE_NOT_EXIST ) ) ; }

Target:
public void testValidateModifiedBondSlavesWhenSlaveInterfaceDoesNotExist ( ) throws java.lang.Exception { org.ovirt.engine.core.common.action.CreateOrUpdateBond createOrUpdateBond = createNewCreateOrUpdateBond ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , "bond1" , "slaveA" , "slaveB" ) ; org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidator validator = new org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidatorTest.HostSetupNetworksValidatorBuilder ( ) . setParams ( new org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidatorTest.ParametersBuilder ( ) . addBonds ( createOrUpdateBond ) ) . build ( ) ; doTestValidateModifiedBondSlaves ( org.mockito.Mockito.spy ( validator ) , new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.HOST_NETWORK_INTERFACE_NOT_EXIST ) , ValidationResult.VALID , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.HOST_NETWORK_INTERFACE_NOT_EXIST ) ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc createVolumeContainer ( java.lang.String sdUUID , java.lang.String imgGUID , java.lang.String size , int volFormat , int diskType , java.lang.String volUUID , java.lang.String descr , java.lang.String srcImgGUID , java.lang.String srcVolUUID ) { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.createVolumeContainer ( sdUUID , imgGUID , size , volFormat , diskType , volUUID , descr , srcImgGUID , srcVolUUID ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.VMListReturnForXmlRpc fullList ( java.util.List < java.lang.String > vmIds ) { try { java.lang.String [ ] vmIdsArray = vmIds.toArray ( new java.lang.String [ vmIds.size ( ) ] ) ; java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.list ( java.lang.Boolean.TRUE.toString ( ) , vmIdsArray ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.VMListReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.VMListReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
Source:
public void edit ( org.ovirt.engine.ui.uicommonweb.models.users.EventNotificationModel object ) { org.ovirt.engine.ui.webadmin.section.main.view.popup.user.ManageEventsPopupView.Driver.driver.edit ( object ) ; object.getPropertyChangedEvent ( ) . addListener ( new org.ovirt.engine.core.compat.IEventListener ( ) { @ java.lang.Override public void eventRaised ( org.ovirt.engine.core.compat.Event ev , java.lang.Object sender , org.ovirt.engine.core.compat.EventArgs args ) { org.ovirt.engine.ui.uicommonweb.models.users.EventNotificationModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.users.EventNotificationModel ) ( sender ) ) ; java.lang.String propertyName = ( ( org.ovirt.engine.core.compat.PropertyChangedEventArgs ) ( args ) ) . PropertyName ; if ( "EventGroupModels" . equals ( propertyName ) ) { updateTree ( model ) ; } } } ) ; }

Target:
public void edit ( org.ovirt.engine.ui.uicommonweb.models.users.EventNotificationModel object ) { org.ovirt.engine.ui.webadmin.section.main.view.popup.user.ManageEventsPopupView.Driver.driver.edit ( object ) ; object.getPropertyChangedEvent ( ) . addListener ( new org.ovirt.engine.ui.uicompat.IEventListener ( ) { @ java.lang.Override 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.users.EventNotificationModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.users.EventNotificationModel ) ( sender ) ) ; java.lang.String propertyName = ( ( org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ) ( args ) ) . PropertyName ; if ( "EventGroupModels" . equals ( propertyName ) ) { updateTree ( model ) ; } } } ) ; }
Source:
protected org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkOperationCommandTarget getTarget ( ) { return new org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkOperationCommandTarget ( ) { @ java.lang.Override protected void executeNetworkCommand ( org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkItemModel < ? > op1 , org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkItemModel < ? > op2 , java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > allNics , java.lang.Object ... params ) { org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkOperation.DETACH_NETWORK.getCommand ( op1 , op2 , allNics ) . execute ( ) ; } } ; }

Target:
private void addLabelToAddedRemovedSets ( org.ovirt.engine.ui.uicommonweb.models.hosts.network.DataFromHostSetupNetworksModel dataFromHostSetupNetworksModel , java.lang.String label , org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface ) { org.ovirt.engine.ui.uicommonweb.models.hosts.network.DataFromHostSetupNetworksModel.LabelOnNic labelOnNic = new org.ovirt.engine.ui.uicommonweb.models.hosts.network.DataFromHostSetupNetworksModel.LabelOnNic ( iface.getId ( ) , iface.getName ( ) , label ) ; if ( dataFromHostSetupNetworksModel.removedLabels.contains ( labelOnNic ) ) { dataFromHostSetupNetworksModel.removedLabels.remove ( labelOnNic ) ; } else { dataFromHostSetupNetworksModel.addedLabels.add ( labelOnNic ) ; } }
Source:
public static 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 < org.ovirt.engine.core.common.businessentities.VmDevice > ) ( source ) ) . size ( ) ) > 0 ; } return false ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVirtioScsiControllers , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) , aQuery ) ; }

Target:
private static void initSuspendSupportMap ( ) { org.ovirt.engine.ui.frontend.AsyncQuery callback = new org.ovirt.engine.ui.frontend.AsyncQuery ( ) ; callback.asyncCallback = new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.suspendSupport = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetArchitectureCapabilities , new org.ovirt.engine.core.common.queries.ArchCapabilitiesParameters ( org.ovirt.engine.core.common.queries.ArchCapabilitiesParameters.ArchCapabilitiesVerb.GetSuspendSupport ) , callback ) ; }
Source:
private void setUpGetEntityExpectations ( ) throws java.lang.Exception { setUpGetEntityExpectations ( VdcQueryType.GetVmByVmId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , new org.ovirt.engine.api.model.VM ( ) ) ; }

Target:
public void testRemoveNonExistant ( ) throws java.lang.Exception { setUpGetEntityExpectations ( VdcQueryType.GetVmByVmId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , null ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; control.replay ( ) ; try { resource.remove ( ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { assertNotNull ( wae.getResponse ( ) ) ; assertEquals ( 404 , wae.getResponse ( ) . getStatus ( ) ) ; } }
Source:
protected boolean canDoAction ( ) { parameters = getParameters ( ) ; if ( ! ( super . canDoAction ( ) ) ) { return false ; } if ( getGeoRepSession ( ) . getStatus ( ) . equals ( GeoRepSessionStatus.ACTIVE ) ) { addCanDoActionMessage ( EngineMessage.ACTION_TYPE_FAILED_GEOREP_SESSION_ALREADY_RESUMED ) ; return false ; } return true ; }

Target:
protected boolean validate ( ) { parameters = getParameters ( ) ; if ( ! ( super . validate ( ) ) ) { return false ; } if ( getGeoRepSession ( ) . getStatus ( ) . equals ( GeoRepSessionStatus.ACTIVE ) ) { addValidationMessage ( EngineMessage.ACTION_TYPE_FAILED_GEOREP_SESSION_ALREADY_RESUMED ) ; return false ; } return true ; }
Source:
protected void copyVmDevices ( ) { org.ovirt.engine.core.bll.utils.VmDeviceUtils.copyVmDevices ( vmDevicesSourceId , org.ovirt.engine.core.bll.AddVmCommand.getVmId ( ) , getSrcDeviceIdToTargetDeviceIdMapping ( ) , org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . isSoundDeviceEnabled ( ) , org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . isConsoleEnabled ( ) , isVirtioScsiEnabled ( ) , isBalloonEnabled ( ) , org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . getGraphicsDevices ( ) . keySet ( ) , false ) ; if ( ( org.ovirt.engine.core.bll.AddVmCommand.getInstanceTypeId ( ) ) != null ) { copyDiskDevicesFromTemplate ( ) ; } }

Target:
protected boolean isSoundDeviceEnabled ( ) { java.lang.Boolean soundDeviceEnabled = org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . isSoundDeviceEnabled ( ) ; return soundDeviceEnabled != null ? soundDeviceEnabled : osRepository.isSoundDeviceEnabled ( org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . getVmStaticData ( ) . getOsId ( ) , org.ovirt.engine.core.bll.AddVmCommand.getVdsGroup ( ) . getCompatibilityVersion ( ) ) ; }
Source:
public void getVmNicList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ) ( source ) ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmInterfacesByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }

Target:
public void getAllTemplatesFromExportDomain ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.compat.Guid storageDomainId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? source : new java.util.HashMap < org.ovirt.engine.core.common.businessentities.VmTemplate , java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > > ( ) ; } } ; org.ovirt.engine.core.common.queries.GetAllFromExportDomainQueryParameters getAllFromExportDomainQueryParamenters = new org.ovirt.engine.core.common.queries.GetAllFromExportDomainQueryParameters ( storagePoolId , storageDomainId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetTemplatesFromExportDomain , getAllFromExportDomainQueryParamenters , aQuery ) ; }
Source:
private boolean slaveUsedByRemovedBond ( java.lang.String slaveBondName ) { for ( org.ovirt.engine.core.common.businessentities.network.Bond removedBond : params.getRemovedBonds ( ) ) { if ( slaveBondName.equals ( removedBond.getName ( ) ) ) { return true ; } } return false ; }

Target:
private boolean bondIsUpdatedAndDoesNotContainCertainSlave ( java.lang.String slaveName , java.lang.String bondName ) { for ( org.ovirt.engine.core.common.businessentities.network.Bond bond : params.getBonds ( ) ) { boolean isRequiredBond = bond.getName ( ) . equals ( bondName ) ; if ( isRequiredBond ) { boolean updatedBondDoesNotContainGivenSlave = ! ( bond.getSlaves ( ) . contains ( slaveName ) ) ; return updatedBondDoesNotContainGivenSlave ; } } return false ; }
Source:
private org.ovirt.engine.core.common.businessentities.DiskImage getDiskForVolumeInfo ( org.ovirt.engine.core.common.businessentities.DiskImage disk ) { if ( org.ovirt.engine.core.bll.ExportVmCommand.getParameters ( ) . getCopyCollapse ( ) ) { org.ovirt.engine.core.common.businessentities.DiskImage ancestor = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getDiskImageDAO ( ) . getAncestor ( disk.getImageId ( ) ) ; if ( ancestor == null ) { log.warnFormat ( "Can't find ancestor of Disk with ID {0}, using original disk for volume info." , disk.getImageId ( ) ) ; ancestor = disk ; } return ancestor ; } else { return disk ; } }

Target:
private org.ovirt.engine.core.common.businessentities.DiskImage getDiskForVolumeInfo ( org.ovirt.engine.core.common.businessentities.DiskImage disk ) { if ( org.ovirt.engine.core.bll.ExportVmCommand.getParameters ( ) . getCopyCollapse ( ) ) { org.ovirt.engine.core.common.businessentities.DiskImage ancestor = org.ovirt.engine.core.bll.ExportVmCommand.getDiskImageDao ( ) . getAncestor ( disk.getImageId ( ) ) ; if ( ancestor == null ) { log.warnFormat ( "Can't find ancestor of Disk with ID {0}, using original disk for volume info." , disk.getImageId ( ) ) ; ancestor = disk ; } return ancestor ; } else { return disk ; } }
Source:
public org.ovirt.engine.core.bll.tasks.SPMAsyncTask concreteCreateTask ( org.ovirt.engine.core.compat.Guid taskId , org.ovirt.engine.core.bll.CommandBase command , org.ovirt.engine.core.common.asynctasks.AsyncTaskCreationInfo asyncTaskCreationInfo , org.ovirt.engine.core.common.action.VdcActionType parentCommand ) { org.ovirt.engine.core.common.asynctasks.AsyncTaskParameters p = new org.ovirt.engine.core.common.asynctasks.AsyncTaskParameters ( asyncTaskCreationInfo , getAsyncTask ( taskId , command , asyncTaskCreationInfo , parentCommand ) ) ; p.setEntityInfo ( command.getParameters ( ) . getEntityInfo ( ) ) ; return createTask ( internalGetTaskType ( command ) , p ) ; }

Target:
public org.ovirt.engine.core.bll.tasks.SPMAsyncTask concreteCreateTask ( org.ovirt.engine.core.compat.Guid taskId , org.ovirt.engine.core.bll.CommandBase command , org.ovirt.engine.core.common.asynctasks.AsyncTaskCreationInfo asyncTaskCreationInfo , org.ovirt.engine.core.common.action.VdcActionType parentCommand ) { return coCoAsyncTaskHelper.concreteCreateTask ( taskId , command , asyncTaskCreationInfo , parentCommand ) ; }
Source:
protected void doTestBadRemove ( boolean valid , boolean success , java.lang.String detail ) { setUpGetEntityExpectations ( ) ; setUriInfo ( setUpActionExpectations ( ActionType.RemoveRole , org.ovirt.engine.core.common.action.RolesParameterBase.class , new java.lang.String [ ] { "RoleId" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , valid , success ) ) ; try { resource.remove ( ) ; org.junit.Assert.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , detail ) ; } }

Target:
protected void doTestBadRemove ( boolean valid , boolean success , java.lang.String detail ) { setUpGetEntityExpectations ( ) ; setUriInfo ( setUpActionExpectations ( ActionType.RemoveRole , org.ovirt.engine.core.common.action.RolesParameterBase.class , new java.lang.String [ ] { "RoleId" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , valid , success ) ) ; try { resource.remove ( ) ; org.junit.jupiter.api.Assertions.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , detail ) ; } }
Source:
public void updateDocumentationBaseURL ( ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetDocumentationBaseURL ( new org.ovirt.engine.ui.frontend.AsyncQuery ( this , new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void OnSuccess ( java.lang.Object target , java.lang.Object returnValue ) { java.lang.String documentationBaseURL = ( ( java.lang.String ) ( returnValue ) ) ; boolean isDocumentationAvailable = ! ( documentationBaseURL.equals ( "" ) ) ; setDocumentationAvailable ( isDocumentationAvailable ) ; setDocumentationBasePath ( documentationBaseURL ) ; onUpdateDocumentationBaseURL ( ) ; } } ) ) ; }

Target:
public void updateDocumentationBaseURL ( ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDocumentationBaseURL ( new org.ovirt.engine.ui.frontend.AsyncQuery ( this , new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { java.lang.String documentationBaseURL = ( ( java.lang.String ) ( returnValue ) ) ; boolean isDocumentationAvailable = ! ( documentationBaseURL.equals ( "" ) ) ; setDocumentationAvailable ( isDocumentationAvailable ) ; setDocumentationBasePath ( documentationBaseURL ) ; onUpdateDocumentationBaseURL ( ) ; } } ) ) ; }
Source:
public void executed ( org.ovirt.engine.ui.uicompat.FrontendMultipleActionAsyncResult result ) { org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel localModel = ( ( org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel ) ( result.getState ( ) ) ) ; localModel.stopProgress ( ) ; cancel ( ) ; }

Target:
public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel localModel = ( ( org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel ) ( getConfirmWindow ( ) ) ) ; localModel.stopProgress ( ) ; setConfirmWindow ( null ) ; if ( result.getReturnValue ( ) . getSucceeded ( ) ) { showRebalanceStatus ( ) ; } }
Source:
public void diskImagesExist ( ) { org.mockito.Mockito.doReturn ( true ) . when ( baseDiskDao ) . exists ( disk1 ) ; org.mockito.Mockito.doReturn ( true ) . when ( baseDiskDao ) . exists ( disk2 ) ; org.junit.Assert.assertThat ( diskExistenceValidator.disksNotExist ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }

Target:
public void diskImagesExist ( ) { org.mockito.Mockito.doReturn ( true ) . when ( baseDiskDao ) . exists ( disk1 ) ; org.mockito.Mockito.doReturn ( true ) . when ( baseDiskDao ) . exists ( disk2 ) ; org.hamcrest.MatcherAssert.assertThat ( diskExistenceValidator.disksNotExist ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }
Source:
public void getCinderVolumeTypesList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storageDomainId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter < java.util.List < org.ovirt.engine.core.common.businessentities.storage.CinderVolumeType > > ( ) { @ java.lang.Override public java.util.List < org.ovirt.engine.core.common.businessentities.storage.CinderVolumeType > Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return ( ( java.util.List < org.ovirt.engine.core.common.businessentities.storage.CinderVolumeType > ) ( source ) ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetCinderVolumeTypesByStorageDomainId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( storageDomainId ) , aQuery ) ; }

Target:
public java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.LibvirtSecretUsageType > getLibvirtSecretUsageTypeList ( ) { return new java.util.ArrayList ( java.util.Arrays.asList ( org.ovirt.engine.core.common.businessentities.storage.LibvirtSecretUsageType.values ( ) ) ) ; }
Source:
public void testGet ( ) throws java.lang.Exception { org.ovirt.engine.api.resource.StorageResource subresource = collection.getStorageSubResource ( GUIDS [ org.ovirt.engine.api.restapi.resource.BackendHostStorageResourceTest.SINGLE_STORAGE_IDX ] . toString ( ) ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpQueryExpectations ( "" , null , false ) ; verifyModel ( subresource.get ( ) , org.ovirt.engine.api.restapi.resource.BackendHostStorageResourceTest.SINGLE_STORAGE_IDX ) ; }

Target:
public void testGet ( ) throws java.lang.Exception { org.ovirt.engine.api.resource.StorageResource subresource = collection.getStorageResource ( GUIDS [ org.ovirt.engine.api.restapi.resource.BackendHostStorageResourceTest.SINGLE_STORAGE_IDX ] . toString ( ) ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpQueryExpectations ( "" , null , false ) ; verifyModel ( subresource.get ( ) , org.ovirt.engine.api.restapi.resource.BackendHostStorageResourceTest.SINGLE_STORAGE_IDX ) ; }
Source:
private boolean isDiskLocked ( org.ovirt.engine.core.common.businessentities.storage.Disk disk ) { return ( ( disk != null ) && ( ( disk.getDiskStorageType ( ) ) == ( org.ovirt.engine.core.common.businessentities.storage.DiskStorageType.IMAGE ) ) ) && ( ( ( ( org.ovirt.engine.core.common.businessentities.storage.DiskImage ) ( disk ) ) . getImageStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.storage.ImageStatus.LOCKED ) ) ; }

Target:
private boolean isDiskLocked ( org.ovirt.engine.core.common.businessentities.storage.Disk disk ) { switch ( disk.getDiskStorageType ( ) ) { case IMAGE : return ( ( ( org.ovirt.engine.core.common.businessentities.storage.DiskImage ) ( disk ) ) . getImageStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.storage.ImageStatus.LOCKED ) ; case CINDER : return ( ( ( org.ovirt.engine.core.common.businessentities.storage.CinderDisk ) ( disk ) ) . getImageStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.storage.ImageStatus.LOCKED ) ; } return false ; }
Source:
private com.woorea.openstack.glance.Glance getClient ( ) { if ( ( client ) == null ) { client = new com.woorea.openstack.glance.Glance ( ( ( getProvider ( ) . getUrl ( ) ) + ( org.ovirt.engine.core.bll.provider.OpenstackImageProviderProxy.API_VERSION ) ) ) ; client.setTokenProvider ( getTokenProvider ( ) ) ; } return client ; }

Target:
private com.woorea.openstack.glance.Glance getClient ( ) { if ( ( client ) == null ) { client = new com.woorea.openstack.glance.Glance ( ( ( getProvider ( ) . getUrl ( ) ) + ( org.ovirt.engine.core.bll.provider.OpenStackImageProviderProxy.API_VERSION ) ) ) ; client.setTokenProvider ( getTokenProvider ( ) ) ; } return client ; }
Source:
protected boolean setAndValidateDiskProfiles ( ) { java.util.Map < org.ovirt.engine.core.common.businessentities.DiskImage , org.ovirt.engine.core.compat.Guid > map = new java.util.HashMap < > ( ) ; for ( org.ovirt.engine.core.common.action.LiveMigrateDiskParameters parameters : getParameters ( ) . getParametersList ( ) ) { org.ovirt.engine.core.common.businessentities.DiskImage diskImage = getDiskImageByImageId ( parameters.getImageId ( ) ) ; map.put ( diskImage , diskImage.getStorageIds ( ) . get ( 0 ) ) ; } return validate ( org.ovirt.engine.core.bll.profiles.DiskProfileHelper.setAndValidateDiskProfiles ( map , org.ovirt.engine.core.bll.lsm.LiveMigrateVmDisksCommand.getStoragePool ( ) . getcompatibility_version ( ) ) ) ; }

Target:
protected boolean setAndValidateDiskProfiles ( ) { java.util.Map < org.ovirt.engine.core.common.businessentities.DiskImage , org.ovirt.engine.core.compat.Guid > map = new java.util.HashMap < > ( ) ; for ( org.ovirt.engine.core.common.action.LiveMigrateDiskParameters parameters : getParameters ( ) . getParametersList ( ) ) { org.ovirt.engine.core.common.businessentities.DiskImage diskImage = getDiskImageByImageId ( parameters.getImageId ( ) ) ; map.put ( diskImage , diskImage.getStorageIds ( ) . get ( 0 ) ) ; } return validate ( org.ovirt.engine.core.bll.profiles.DiskProfileHelper.setAndValidateDiskProfiles ( map , org.ovirt.engine.core.bll.lsm.LiveMigrateVmDisksCommand.getStoragePool ( ) . getCompatibilityVersion ( ) ) ) ; }
Source:
public final void reportCompleted ( ) { try { decreasePendingVms ( ) ; org.ovirt.engine.core.bll.job.ExecutionContext executionContext = org.ovirt.engine.core.bll.RunVmCommandBase.getExecutionContext ( ) ; if ( ( ( executionContext != null ) && ( executionContext.isMonitored ( ) ) ) && ( ! ( executionContext.isCompleted ( ) ) ) ) { endExecutionMonitoring ( ) ; } } finally { org.ovirt.engine.core.bll.RunVmCommandBase.freeLock ( ) ; } }

Target:
public final void reportCompleted ( ) { try { decreasePendingVm ( ) ; org.ovirt.engine.core.bll.job.ExecutionContext executionContext = org.ovirt.engine.core.bll.RunVmCommandBase.getExecutionContext ( ) ; if ( ( ( executionContext != null ) && ( executionContext.isMonitored ( ) ) ) && ( ! ( executionContext.isCompleted ( ) ) ) ) { endExecutionMonitoring ( ) ; } } finally { org.ovirt.engine.core.bll.RunVmCommandBase.freeLock ( ) ; } }
Source:
public org.ovirt.engine.core.bll.ValidationResult qosBaloonSupported ( ) { org.ovirt.engine.core.compat.Version version = cluster.getcompatibility_version ( ) ; return org.ovirt.engine.core.bll.ValidationResult.failWith ( VdcBllMessages.QOS_BALLOON_NOT_SUPPORTED ) . when ( ( ( ( version != null ) && ( ( Version.v3_3.compareTo ( version ) ) > 0 ) ) && ( cluster.isEnableBallooning ( ) ) ) ) ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult qosBaloonSupported ( ) { org.ovirt.engine.core.compat.Version version = cluster.getCompatibilityVersion ( ) ; return org.ovirt.engine.core.bll.ValidationResult.failWith ( VdcBllMessages.QOS_BALLOON_NOT_SUPPORTED ) . when ( ( ( ( version != null ) && ( ( Version.v3_3.compareTo ( version ) ) > 0 ) ) && ( cluster.isEnableBallooning ( ) ) ) ) ; }
Source:
public java.util.Map < java.lang.String , java.lang.String > getVMProperties ( org.ovirt.engine.core.compat.Version version , org.ovirt.engine.core.common.businessentities.VmStatic vmStatic ) { separeteCustomPropertiesToUserAndPredefined ( version , vmStatic ) ; java.util.Map < java.lang.String , java.lang.String > map = new java.util.HashMap < java.lang.String , java.lang.String > ( ) ; getPredefinedProperties ( version , vmStatic , map ) ; getUserDefinedProperties ( version , vmStatic , map ) ; return map ; }

Target:
public java.util.Map < java.lang.String , java.lang.String > getVMProperties ( org.ovirt.engine.core.compat.Version version , org.ovirt.engine.core.common.businessentities.VmStatic vmStatic ) { separateCustomPropertiesToUserAndPredefined ( version , vmStatic ) ; java.util.Map < java.lang.String , java.lang.String > map = new java.util.HashMap < java.lang.String , java.lang.String > ( ) ; getPredefinedProperties ( version , vmStatic , map ) ; getUserDefinedProperties ( version , vmStatic , map ) ; return map ; }
Source:
public 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 void getUserMessageOfTheDayViaPublic ( 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.ui.frontend.Frontend.getInstance ( ) . runPublicQuery ( VdcQueryType.GetConfigurationValue , new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.UserMessageOfTheDay , getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
public void testEmptyDomainList ( ) { org.ovirt.engine.core.common.action.StoragePoolParametersBase param = new org.ovirt.engine.core.common.action.StoragePoolParametersBase ( ) ; org.ovirt.engine.core.bll.storage.pool.RemoveStoragePoolCommand < org.ovirt.engine.core.common.action.StoragePoolParametersBase > cmd = org.ovirt.engine.core.bll.storage.pool.RemoveStoragePoolCommandTest.createCommand ( param ) ; java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > domainsList = new java.util.ArrayList < > ( ) ; java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > listReturned = cmd.getActiveOrLockedDomainList ( domainsList ) ; org.junit.Assert.assertTrue ( listReturned.isEmpty ( ) ) ; }

Target:
public void testEmptyDomainList ( ) { org.ovirt.engine.core.common.action.StoragePoolParametersBase param = new org.ovirt.engine.core.common.action.StoragePoolParametersBase ( ) ; org.ovirt.engine.core.bll.storage.pool.RemoveStoragePoolCommand < org.ovirt.engine.core.common.action.StoragePoolParametersBase > cmd = org.ovirt.engine.core.bll.storage.pool.RemoveStoragePoolCommandTest.createCommand ( param ) ; java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > domainsList = new java.util.ArrayList < > ( ) ; org.junit.Assert.assertTrue ( cmd.validateDomainsInMaintenance ( domainsList ) ) ; }
Source:
public void testGetLunsToUpdateInDbSameLunIdDiffPvId ( ) { org.ovirt.engine.core.compat.Guid lunId = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; java.util.List < org.ovirt.engine.core.common.businessentities.storage.LUNs > existingLunsToUpdateInDb = getLunsToUpdateInDb ( lunId , lunId , org.ovirt.engine.core.compat.Guid.newGuid ( ) , org.ovirt.engine.core.compat.Guid.newGuid ( ) ) . get ( command.updateLunsHandler ) ; assertLunIdInList ( existingLunsToUpdateInDb , lunId ) ; }

Target:
public void testGetLunsToUpdateInDbSameLunIdDiffPvId ( ) { org.ovirt.engine.core.compat.Guid lunId = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; java.util.Map < org.ovirt.engine.core.bll.storage.domain.SyncLunsInfoForBlockStorageDomainCommand.LunHandler , java.util.List < org.ovirt.engine.core.common.businessentities.storage.LUNs > > lunsToUpdateInDb = getLunsToUpdateInDb ( lunId , lunId , org.ovirt.engine.core.compat.Guid.newGuid ( ) , org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.storage.LUNs > existingLunsToUpdateInDb = lunsToUpdateInDb.get ( command.updateLunsHandler ) ; org.junit.Assert.assertEquals ( java.util.Collections.singleton ( command.updateLunsHandler ) , lunsToUpdateInDb.keySet ( ) ) ; assertLunIdInList ( existingLunsToUpdateInDb , lunId ) ; }
Source:
void initListBoxEditors ( ) { isoEditor = new org.ovirt.engine.ui.common.widget.editor.ListModelListBoxEditor < java.lang.Object > ( new org.ovirt.engine.ui.common.widget.renderer.NullSafeRenderer < java.lang.Object > ( ) { @ java.lang.Override public java.lang.String renderNullSafe ( java.lang.Object object ) { org.ovirt.engine.core.compat.RpmVersion version = ( ( org.ovirt.engine.core.compat.RpmVersion ) ( object ) ) ; return version.getRpmName ( ) ; } } ) ; }

Target:
void initListBoxEditors ( ) { isoEditor = new org.ovirt.engine.ui.common.widget.editor.ListModelListBoxEditor < java.lang.Object > ( new org.ovirt.engine.ui.common.widget.renderer.NullSafeRenderer < java.lang.Object > ( ) { @ java.lang.Override public java.lang.String renderNullSafe ( java.lang.Object object ) { org.ovirt.engine.core.compat.RpmVersion version = ( ( org.ovirt.engine.core.compat.RpmVersion ) ( object ) ) ; return version.getRpmName ( ) ; } } ) ; rbPassword = new com.google.gwt.user.client.ui.RadioButton ( "1" ) ; rbPublicKey = new com.google.gwt.user.client.ui.RadioButton ( "1" ) ; publicKeyEditor = new org.ovirt.engine.ui.common.widget.editor.EntityModelTextAreaLabelEditor ( true , true ) ; }
Source:
public static void getCPUList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Version 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.util.ArrayList < org.ovirt.engine.core.common.businessentities.ServerCpu > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ServerCpu > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllServerCpuList , new org.ovirt.engine.core.common.queries.GetAllServerCpuListParameters ( version ) , aQuery ) ; }

Target:
public static void getClusterDesktopMemoryOverCommit ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Integer ) ( source ) ) . intValue ( ) : 0 ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.MaxVdsMemOverCommit , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
private static void testFingerprintString ( final java.lang.String keyEncoding , final java.lang.String goodFingerprintString , java.lang.String algo ) throws java.lang.Exception { final java.security.PublicKey key = org.ovirt.engine.core.uutils.ssh.OpenSSHUtilsTest.decodeKey ( keyEncoding ) ; final java.lang.String fingerprintString = org.ovirt.engine.core.uutils.ssh.OpenSSHUtils.getKeyFingerprint ( key , algo ) ; org.junit.Assert.assertEquals ( goodFingerprintString , fingerprintString ) ; java.lang.StringBuilder actual = new java.lang.StringBuilder ( ) ; org.junit.Assert.assertTrue ( org.ovirt.engine.core.uutils.ssh.OpenSSHUtils.checkKeyFingerprint ( goodFingerprintString , key , actual ) ) ; org.junit.Assert.assertEquals ( goodFingerprintString , actual.toString ( ) ) ; }

Target:
private static void testFingerprintString ( final java.lang.String keyEncoding , final java.lang.String goodFingerprintString , java.lang.String algo ) throws java.lang.Exception { final java.security.PublicKey key = org.ovirt.engine.core.uutils.ssh.OpenSSHUtilsTest.decodeKey ( keyEncoding ) ; final java.lang.String fingerprintString = org.ovirt.engine.core.uutils.ssh.OpenSSHUtils.getKeyFingerprint ( key , algo ) ; org.junit.jupiter.api.Assertions.assertEquals ( goodFingerprintString , fingerprintString ) ; java.lang.StringBuilder actual = new java.lang.StringBuilder ( ) ; org.junit.jupiter.api.Assertions.assertTrue ( org.ovirt.engine.core.uutils.ssh.OpenSSHUtils.checkKeyFingerprint ( goodFingerprintString , key , actual ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( goodFingerprintString , actual.toString ( ) ) ; }
Source:
public void createCommand ( ) { org.ovirt.engine.core.common.action.AttachNetworkToVdsGroupParameter param = new org.ovirt.engine.core.common.action.AttachNetworkToVdsGroupParameter ( getExistingVdsGroupId ( ) , getNetwork ( ) ) ; command = new org.ovirt.engine.core.bll.AttachNetworkToVdsGroupCommand < org.ovirt.engine.core.common.action.AttachNetworkToVdsGroupParameter > ( param ) { @ java.lang.Override public org.ovirt.engine.core.dao.VdsGroupDAO getVdsGroupDAO ( ) { return vdsGroupDAO ; } @ java.lang.Override protected org.ovirt.engine.core.dao.NetworkClusterDAO getNetworkClusterDAO ( ) { return networkClusterDAO ; } } ; }

Target:
protected org.ovirt.engine.core.dao.NetworkDAO getNetworkDAO ( ) { return networkDao ; }
Source:
public void diskImagesHasDerivedDisksOnStorageDomain ( ) { org.ovirt.engine.core.compat.Guid storageDomainId = org.ovirt.engine.core.compat.Guid.Empty ; disk1.setVmEntityType ( VmEntityType.TEMPLATE ) ; java.util.ArrayList < org.ovirt.engine.core.compat.Guid > storageDomainIds = new java.util.ArrayList < > ( ) ; storageDomainIds.add ( storageDomainId ) ; disk2.setStorageIds ( storageDomainIds ) ; org.mockito.Mockito.when ( diskImageDao.getAllSnapshotsForParent ( disk1.getImageId ( ) ) ) . thenReturn ( java.util.Arrays.asList ( disk2 ) ) ; org.junit.Assert.assertThat ( validator.diskImagesHaveNoDerivedDisks ( storageDomainId ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( VdcBllMessages.ACTION_TYPE_FAILED_DETECTED_DERIVED_DISKS ) ) ; }

Target:
public void diskImagesHasDerivedDisksOnStorageDomain ( ) { org.ovirt.engine.core.compat.Guid storageDomainId = org.ovirt.engine.core.compat.Guid.Empty ; disk1.setVmEntityType ( VmEntityType.TEMPLATE ) ; java.util.ArrayList < org.ovirt.engine.core.compat.Guid > storageDomainIds = new java.util.ArrayList < > ( ) ; storageDomainIds.add ( storageDomainId ) ; disk2.setStorageIds ( storageDomainIds ) ; org.mockito.Mockito.when ( diskImageDao.getAllSnapshotsForParent ( disk1.getImageId ( ) ) ) . thenReturn ( java.util.Arrays.asList ( disk2 ) ) ; org.junit.Assert.assertThat ( validator.diskImagesHaveNoDerivedDisks ( storageDomainId ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.ACTION_TYPE_FAILED_DETECTED_DERIVED_DISKS ) ) ; }
Source:
private void refreshAllVdssInPool ( ) { java.util.List < org.ovirt.engine.core.compat.Guid > vdsIdsToSetNonOperational = new java.util.ArrayList < org.ovirt.engine.core.compat.Guid > ( ) ; runSynchronizeOperation ( new org.ovirt.engine.core.bll.storage.RefreshPoolSingleAsyncOperationFactory ( ) , vdsIdsToSetNonOperational ) ; for ( org.ovirt.engine.core.compat.Guid vdsId : vdsIdsToSetNonOperational ) { org.ovirt.engine.core.common.action.SetNonOperationalVdsParameters tempVar = new org.ovirt.engine.core.common.action.SetNonOperationalVdsParameters ( vdsId , org.ovirt.engine.core.common.businessentities.NonOperationalReason.STORAGE_DOMAIN_UNREACHABLE ) ; tempVar.setSaveToDb ( true ) ; tempVar.setStorageDomainId ( org.ovirt.engine.core.bll.storage.ActivateStorageDomainCommand.getStorageDomain ( ) . getId ( ) ) ; tempVar.setTransactionScopeOption ( TransactionScopeOption.RequiresNew ) ; org.ovirt.engine.core.bll.storage.ActivateStorageDomainCommand.getBackend ( ) . runInternalAction ( VdcActionType.SetNonOperationalVds , tempVar , org.ovirt.engine.core.bll.job.ExecutionHandler.createInternalJobContext ( ) ) ; } }

Target:
public org.ovirt.engine.core.common.eventqueue.EventResult call ( ) { runSynchronizeOperation ( new org.ovirt.engine.core.bll.storage.RefreshPoolSingleAsyncOperationFactory ( ) , vdsIdsToSetNonOperational ) ; return null ; }