auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void updateSession ( org.ovirt.engine.core.common.businessentities.gluster.GlusterGeoRepSession geoRepSession ) { getCallsHandler ( ) . executeModification ( "UpdateGlusterGeoRepSessionStatus" , createIdParameterMapper ( geoRepSession.getId ( ) ) . addValue ( "status" , geoRepSession.getStatus ( ) ) ) ; }

Target:
public void updateSession ( org.ovirt.engine.core.common.businessentities.gluster.GlusterGeoRepSession geoRepSession ) { getCallsHandler ( ) . executeModification ( "UpdateGlusterGeoRepSession" , createIdParameterMapper ( geoRepSession.getId ( ) ) . addValue ( "status" , org.ovirt.engine.core.common.utils.EnumUtils.nameOrNull ( geoRepSession.getStatus ( ) ) ) . addValue ( "slave_host_uuid" , geoRepSession.getSlaveNodeUuid ( ) ) . addValue ( "slave_volume_id" , geoRepSession.getSlaveVolumeId ( ) ) ) ; }
Source:
protected boolean canDoAction ( ) { if ( ! ( super . canDoAction ( ) ) ) { return false ; } oldPool = org.ovirt.engine.core.bll.UpdateVmPoolWithVmsCommand.getVmPoolDAO ( ) . get ( org.ovirt.engine.core.bll.UpdateVmPoolWithVmsCommand.getVmPool ( ) . getVmPoolId ( ) ) ; if ( ( oldPool ) == null ) { return failCanDoAction ( VdcBllMessages.VM_POOL_CANNOT_UPDATE_POOL_NOT_FOUND ) ; } if ( ( org.ovirt.engine.core.bll.UpdateVmPoolWithVmsCommand.getParameters ( ) . getVmsCount ( ) ) < 0 ) { return failCanDoAction ( VdcBllMessages.VM_POOL_CANNOT_DECREASE_VMS_FROM_POOL ) ; } return true ; }

Target:
protected boolean canDoAction ( ) { if ( ! ( super . canDoAction ( ) ) ) { return false ; } oldPool = org.ovirt.engine.core.bll.UpdateVmPoolWithVmsCommand.getVmPoolDao ( ) . get ( org.ovirt.engine.core.bll.UpdateVmPoolWithVmsCommand.getVmPool ( ) . getVmPoolId ( ) ) ; if ( ( oldPool ) == null ) { return failCanDoAction ( VdcBllMessages.VM_POOL_CANNOT_UPDATE_POOL_NOT_FOUND ) ; } if ( ( org.ovirt.engine.core.bll.UpdateVmPoolWithVmsCommand.getParameters ( ) . getVmsCount ( ) ) < 0 ) { return failCanDoAction ( VdcBllMessages.VM_POOL_CANNOT_DECREASE_VMS_FROM_POOL ) ; } return true ; }
Source:
public static org.ovirt.engine.api.model.CdRom map ( org.ovirt.engine.core.common.businessentities.VM entity , org.ovirt.engine.api.model.CdRom template ) { org.ovirt.engine.api.model.CdRom model = ( template != null ) ? template : new org.ovirt.engine.api.model.CdRom ( ) ; model.setId ( org.ovirt.engine.api.restapi.types.CdRomMapper.CDROM_ID.toString ( ) ) ; if ( ! ( org.ovirt.engine.core.compat.StringHelper.isNullOrEmpty ( entity.getStaticData ( ) . getiso_path ( ) ) ) ) { model.setFile ( new org.ovirt.engine.api.model.File ( ) ) ; model.getFile ( ) . setId ( entity.getStaticData ( ) . getiso_path ( ) ) ; } return model ; }

Target:
public static org.ovirt.engine.api.model.CdRom map ( org.ovirt.engine.core.common.businessentities.VM entity , org.ovirt.engine.api.model.CdRom template ) { org.ovirt.engine.api.model.CdRom model = ( template != null ) ? template : new org.ovirt.engine.api.model.CdRom ( ) ; model.setId ( org.ovirt.engine.api.restapi.types.CdRomMapper.CDROM_ID.toString ( ) ) ; if ( ! ( org.ovirt.engine.core.compat.StringHelper.isNullOrEmpty ( entity.getStaticData ( ) . getIsoPath ( ) ) ) ) { model.setFile ( new org.ovirt.engine.api.model.File ( ) ) ; model.getFile ( ) . setId ( entity.getStaticData ( ) . getIsoPath ( ) ) ; } return model ; }
Source:
protected void executeCommand ( ) { org.ovirt.engine.core.bll.VdsKdumpDetectionCommand.setVds ( null ) ; if ( ( org.ovirt.engine.core.bll.VdsKdumpDetectionCommand.getVds ( ) ) == null ) { org.ovirt.engine.core.bll.VdsKdumpDetectionCommand.setCommandShouldBeLogged ( false ) ; log.infoFormat ( "Kdump detection will not be executed on host {0}({1}) since it doesn't exist anymore." , org.ovirt.engine.core.bll.VdsKdumpDetectionCommand.getVdsName ( ) , org.ovirt.engine.core.bll.VdsKdumpDetectionCommand.getVdsId ( ) ) ; org.ovirt.engine.core.bll.VdsKdumpDetectionCommand.getReturnValue ( ) . setSucceeded ( false ) ; return ; } kdumpDetectionResult = detectHostKdumping ( ) ; org.ovirt.engine.core.bll.VdsKdumpDetectionCommand.getReturnValue ( ) . setSucceeded ( ( ( kdumpDetectionResult ) == ( org.ovirt.engine.core.bll.VdsKdumpDetectionCommand.KdumpDetectionResult.KDUMP_FINISHED ) ) ) ; }

Target:
protected void executeCommand ( ) { org.ovirt.engine.core.bll.VdsKdumpDetectionCommand.setVds ( null ) ; if ( ( org.ovirt.engine.core.bll.VdsKdumpDetectionCommand.getVds ( ) ) == null ) { org.ovirt.engine.core.bll.VdsKdumpDetectionCommand.setCommandShouldBeLogged ( false ) ; log.info ( "Kdump detection will not be executed on host '{}' ({}) since it doesn't exist anymore." , org.ovirt.engine.core.bll.VdsKdumpDetectionCommand.getVdsName ( ) , org.ovirt.engine.core.bll.VdsKdumpDetectionCommand.getVdsId ( ) ) ; org.ovirt.engine.core.bll.VdsKdumpDetectionCommand.getReturnValue ( ) . setSucceeded ( false ) ; return ; } kdumpDetectionResult = detectHostKdumping ( ) ; org.ovirt.engine.core.bll.VdsKdumpDetectionCommand.getReturnValue ( ) . setSucceeded ( ( ( kdumpDetectionResult ) == ( org.ovirt.engine.core.bll.VdsKdumpDetectionCommand.KdumpDetectionResult.KDUMP_FINISHED ) ) ) ; }
Source:
public void edit ( final org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel object ) { org.ovirt.engine.ui.common.view.popup.DefaultConfirmationPopupView.Driver.driver.edit ( object ) ; object.getItemsChangedEvent ( ) . addListener ( new org.ovirt.engine.core.compat.IEventListener ( ) { @ java.lang.SuppressWarnings ( value = "unchecked" ) @ java.lang.Override public void eventRaised ( org.ovirt.engine.core.compat.Event ev , java.lang.Object sender , org.ovirt.engine.core.compat.EventArgs args ) { java.util.ArrayList < java.lang.String > items = ( ( java.util.ArrayList < java.lang.String > ) ( object.getItems ( ) ) ) ; for ( java.lang.String item : items ) { descriptionPanel.add ( new com.google.gwt.user.client.ui.Label ( item ) ) ; } } } ) ; }

Target:
public void edit ( final org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel object ) { org.ovirt.engine.ui.common.view.popup.DefaultConfirmationPopupView.Driver.driver.edit ( object ) ; object.getItemsChangedEvent ( ) . addListener ( new org.ovirt.engine.ui.uicompat.IEventListener ( ) { @ java.lang.SuppressWarnings ( value = "unchecked" ) @ java.lang.Override public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { java.util.ArrayList < java.lang.String > items = ( ( java.util.ArrayList < java.lang.String > ) ( object.getItems ( ) ) ) ; for ( java.lang.String item : items ) { descriptionPanel.add ( new com.google.gwt.user.client.ui.Label ( item ) ) ; } } } ) ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object ReturnValue ) { org.ovirt.engine.core.common.businessentities.StorageServerConnections connection = ( ( org.ovirt.engine.core.common.businessentities.StorageServerConnections ) ( ReturnValue ) ) ; setExportPath ( ( connection == null ? null : connection.getconnection ( ) ) ) ; getVmsFromExportDomain ( dataCenter.getId ( ) , exportDomain.getId ( ) ) ; }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object ReturnValue ) { org.ovirt.engine.core.common.businessentities.StorageServerConnections connection = ( ( org.ovirt.engine.core.common.businessentities.StorageServerConnections ) ( ReturnValue ) ) ; setExportPath ( ( connection == null ? null : connection.getconnection ( ) ) ) ; stopProgress ( ) ; }
Source:
public void onTimer ( ) { manager.onTimer ( ) ; org.mockito.Mockito.verify ( backendMock , org.mockito.Mockito.times ( vdss.size ( ) ) ) . runInternalAction ( org.mockito.Matchers.eq ( VdcActionType.ActivateVds ) , org.mockito.Matchers.any ( org.ovirt.engine.core.common.action.VdcActionParametersBase.class ) ) ; org.mockito.Mockito.verify ( backendMock , org.mockito.Mockito.times ( storageDomains.size ( ) ) ) . runInternalAction ( org.mockito.Matchers.eq ( VdcActionType.ActivateStorageDomain ) , org.mockito.Matchers.any ( org.ovirt.engine.core.common.action.VdcActionParametersBase.class ) ) ; }

Target:
public void onTimerNoConfig ( ) { manager.onTimer ( ) ; org.mockito.Mockito.verify ( backendMock , org.mockito.Mockito.times ( vdss.size ( ) ) ) . runInternalAction ( org.mockito.Matchers.eq ( VdcActionType.ActivateVds ) , org.mockito.Matchers.any ( org.ovirt.engine.core.common.action.VdcActionParametersBase.class ) ) ; org.mockito.Mockito.verify ( backendMock , org.mockito.Mockito.times ( storageDomains.size ( ) ) ) . runInternalAction ( org.mockito.Matchers.eq ( VdcActionType.ActivateStorageDomain ) , org.mockito.Matchers.any ( org.ovirt.engine.core.common.action.VdcActionParametersBase.class ) ) ; }
Source:
protected boolean canDoAction ( ) { if ( ! ( org.ovirt.engine.core.common.FeatureSupported.isIscsiMultipathingSupported ( org.ovirt.engine.core.bll.storage.AddIscsiBondCommand.getStoragePool ( ) . getCompatibilityVersion ( ) ) ) ) { return failCanDoAction ( VdcBllMessages.ISCSI_BOND_NOT_SUPPORTED ) ; } org.ovirt.engine.core.bll.validator.IscsiBondValidator validator = new org.ovirt.engine.core.bll.validator.IscsiBondValidator ( ) ; return ( ( validate ( validator.iscsiBondWithTheSameNameExistInDataCenter ( getIscsiBond ( ) ) ) ) && ( validate ( validator.validateAddedLogicalNetworks ( getIscsiBond ( ) ) ) ) ) && ( validate ( validator.validateAddedStorageConnections ( getIscsiBond ( ) ) ) ) ; }

Target:
protected boolean canDoAction ( ) { if ( ! ( org.ovirt.engine.core.common.FeatureSupported.isIscsiMultipathingSupported ( org.ovirt.engine.core.bll.storage.AddIscsiBondCommand.getStoragePool ( ) . getCompatibilityVersion ( ) ) ) ) { return failCanDoAction ( EngineMessage.ISCSI_BOND_NOT_SUPPORTED ) ; } org.ovirt.engine.core.bll.validator.IscsiBondValidator validator = new org.ovirt.engine.core.bll.validator.IscsiBondValidator ( ) ; return ( ( validate ( validator.iscsiBondWithTheSameNameExistInDataCenter ( getIscsiBond ( ) ) ) ) && ( validate ( validator.validateAddedLogicalNetworks ( getIscsiBond ( ) ) ) ) ) && ( validate ( validator.validateAddedStorageConnections ( getIscsiBond ( ) ) ) ) ; }
Source:
public static org.w3c.dom.Document loadXmlDoc ( java.lang.String xmlString ) throws java.io.IOException , javax.xml.parsers.ParserConfigurationException , org.xml.sax.SAXException { javax.xml.parsers.DocumentBuilderFactory docBuilderFactory = javax.xml.parsers.DocumentBuilderFactory.newInstance ( ) ; javax.xml.parsers.DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder ( ) ; org.xml.sax.InputSource is = new org.xml.sax.InputSource ( new java.io.StringReader ( xmlString ) ) ; org.w3c.dom.Document doc = docBuilder.parse ( is ) ; doc.getDocumentElement ( ) . normalize ( ) ; return doc ; }

Target:
public static org.w3c.dom.Document loadXmlDoc ( java.lang.String xmlString ) throws java.io.IOException , javax.xml.parsers.ParserConfigurationException , org.xml.sax.SAXException { javax.xml.parsers.DocumentBuilderFactory docBuilderFactory = org.ovirt.engine.core.uutils.xml.SecureDocumentBuilderFactory.newDocumentBuilderFactory ( ) ; javax.xml.parsers.DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder ( ) ; org.xml.sax.InputSource is = new org.xml.sax.InputSource ( new java.io.StringReader ( xmlString ) ) ; org.w3c.dom.Document doc = docBuilder.parse ( is ) ; doc.getDocumentElement ( ) . normalize ( ) ; return doc ; }
Source:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { java.lang.Object [ ] array = ( ( java.lang.Object [ ] ) ( target ) ) ; org.ovirt.engine.ui.uicommonweb.models.vms.NewVmModelBehavior behavior = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.NewVmModelBehavior ) ( array [ 0 ] ) ) ; org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel ) ( array [ 1 ] ) ) ; java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > clusters = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ) ( returnValue ) ) ; model.setClusters ( model , clusters , null ) ; behavior.initTemplate ( ) ; behavior.initCdImage ( ) ; }

Target:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel ) ( target ) ) ; model.setDataCentersAndClusters ( model , dataCenters , ( ( java.util.List < org.ovirt.engine.core.common.businessentities.VDSGroup > ) ( returnValue ) ) , null ) ; initCdImage ( ) ; }
Source:
public static void getGlusterHooks ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? source : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetGlusterHooks , new org.ovirt.engine.core.common.queries.gluster.GlusterParameters ( clusterId ) , aQuery ) ; }

Target:
public static void getGlusterVolumeOptionInfoList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterVolumeOptionsInfo , new org.ovirt.engine.core.common.queries.gluster.GlusterParameters ( clusterId ) , aQuery ) ; }
Source:
public static void getRpmVersionViaPublic ( 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.RunPublicQuery ( VdcQueryType.GetConfigurationValue , new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.ProductRPMVersion , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public static void getGlusterRemoveBricksStatus ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId , org.ovirt.engine.core.compat.Guid volumeId , java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity > bricks ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter < org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeTaskStatusEntity > ( ) { @ java.lang.Override public org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeTaskStatusEntity Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return ( ( org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeTaskStatusEntity ) ( source ) ) ; } } ; org.ovirt.engine.core.common.action.gluster.GlusterVolumeRemoveBricksQueriesParameters parameters = new org.ovirt.engine.core.common.action.gluster.GlusterVolumeRemoveBricksQueriesParameters ( clusterId , volumeId , bricks ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetGlusterVolumeRemoveBricksStatus , parameters , aQuery ) ; }
Source:
protected org.ovirt.engine.core.common.businessentities.storage.DiskImage getImageInfo ( final org.ovirt.engine.core.compat.Guid storagePoolId , final org.ovirt.engine.core.compat.Guid storageId , final org.ovirt.engine.core.compat.Guid diskId , final org.ovirt.engine.core.compat.Guid imageId ) { org.ovirt.engine.core.common.vdscommands.VDSReturnValue ret = runVdsCommand ( VDSCommandType.GetImageInfo , new org.ovirt.engine.core.common.vdscommands.GetImageInfoVDSCommandParameters ( storagePoolId , storageId , diskId , imageId ) ) ; return ( ( org.ovirt.engine.core.common.businessentities.storage.DiskImage ) ( ret.getReturnValue ( ) ) ) ; }

Target:
protected void updateDiskImageDynamic ( final org.ovirt.engine.core.common.businessentities.storage.DiskImage imageFromVdsm , final org.ovirt.engine.core.common.businessentities.storage.DiskImage targetImage ) { if ( imageFromVdsm != null ) { completeImageData ( imageFromVdsm ) ; } else { log.warn ( "Could not update DiskImage's size with ID '{}'" , targetImage.getImageId ( ) ) ; } }
Source:
public void canDoActionFailedShareableDiskVolumeFormatUnsupported ( ) throws java.lang.Exception { org.ovirt.engine.core.common.action.UpdateVmDiskParameters parameters = createParameters ( ) ; org.ovirt.engine.core.common.businessentities.DiskImage disk = createShareableDisk ( VolumeFormat.COW ) ; org.ovirt.engine.core.common.businessentities.StorageDomain storage = addNewStorageDomainToDisk ( disk , StorageType.NFS ) ; parameters.setDiskInfo ( disk ) ; org.mockito.Mockito.when ( diskDao.get ( diskImageGuid ) ) . thenReturn ( createDiskImage ( ) ) ; org.mockito.Mockito.when ( storageDomainStaticDao.get ( storage.getId ( ) ) ) . thenReturn ( storage.getStorageStaticData ( ) ) ; initializeCommand ( parameters ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( command , VdcBllMessages.SHAREABLE_DISK_IS_NOT_SUPPORTED_BY_VOLUME_FORMAT ) ; }

Target:
public void canDoActionFailedShareableDiskVolumeFormatUnsupported ( ) throws java.lang.Exception { org.ovirt.engine.core.common.action.UpdateVmDiskParameters parameters = createParameters ( ) ; org.ovirt.engine.core.common.businessentities.storage.DiskImage disk = createShareableDisk ( VolumeFormat.COW ) ; org.ovirt.engine.core.common.businessentities.StorageDomain storage = addNewStorageDomainToDisk ( disk , StorageType.NFS ) ; parameters.setDiskInfo ( disk ) ; org.mockito.Mockito.when ( diskDao.get ( diskImageGuid ) ) . thenReturn ( createDiskImage ( ) ) ; org.mockito.Mockito.when ( storageDomainStaticDao.get ( storage.getId ( ) ) ) . thenReturn ( storage.getStorageStaticData ( ) ) ; initializeCommand ( parameters ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( command , VdcBllMessages.SHAREABLE_DISK_IS_NOT_SUPPORTED_BY_VOLUME_FORMAT ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeAdvancedDetails fetchAdvancedDetails ( java.lang.String volumeName ) { org.ovirt.engine.core.common.vdscommands.VDSReturnValue returnValue = runVdsCommand ( VDSCommandType.GetGlusterVolumeAdvancedDetails , new org.ovirt.engine.core.common.vdscommands.gluster.GlusterVolumeAdvancedDetailsVDSParameters ( getUpServerId ( org.ovirt.engine.core.bll.gluster.GetGlusterVolumeAdvancedDetailsQuery.getParameters ( ) . getClusterId ( ) ) , org.ovirt.engine.core.bll.gluster.GetGlusterVolumeAdvancedDetailsQuery.getParameters ( ) . getClusterId ( ) , volumeName , org.ovirt.engine.core.bll.gluster.GetGlusterVolumeAdvancedDetailsQuery.getParameters ( ) . getBrickName ( ) , org.ovirt.engine.core.bll.gluster.GetGlusterVolumeAdvancedDetailsQuery.getParameters ( ) . isDetailRequired ( ) ) ) ; return ( ( org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeAdvancedDetails ) ( returnValue.getReturnValue ( ) ) ) ; }

Target:
private org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeAdvancedDetails fetchAdvancedDetails ( java.lang.String volumeName ) { org.ovirt.engine.core.common.vdscommands.VDSReturnValue returnValue = runVdsCommand ( VDSCommandType.GetGlusterVolumeAdvancedDetails , new org.ovirt.engine.core.common.vdscommands.gluster.GlusterVolumeAdvancedDetailsVDSParameters ( getUpServerId ( ) , clusterId , volumeName , ( ( brick ) == null ? null : brick.getQualifiedName ( ) ) , detailRequired ) ) ; return ( ( org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeAdvancedDetails ) ( returnValue.getReturnValue ( ) ) ) ; }
Source:
protected void revertTasks ( ) { org.ovirt.engine.core.bll.tasks.TaskManagerUtil.revertTasks ( this ) ; }

Target:
public org.ovirt.engine.core.bll.SPMAsyncTask concreteCreateTask ( 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.asynctasks.AsyncTaskParameters p = new org.ovirt.engine.core.common.asynctasks.AsyncTaskParameters ( asyncTaskCreationInfo , getAsyncTask ( taskId , asyncTaskCreationInfo , parentCommand ) ) ; p.setEntityId ( getParameters ( ) . getEntityId ( ) ) ; return CreateTask ( internalGetTaskType ( ) , p ) ; }
Source:
public void testCloneTag ( ) { org.ovirt.engine.core.common.businessentities.tags tag = createTag ( "a" , "b" ) ; org.ovirt.engine.core.common.businessentities.tags tag2 = createTag ( "c" , "d" ) ; tag.getChildren ( ) . add ( tag2 ) ; tag2.setparent_id ( tag.gettag_id ( ) ) ; org.apache.commons.collections.Transformer cloner = org.apache.commons.collections.TransformerUtils.cloneTransformer ( ) ; org.ovirt.engine.core.common.businessentities.tags newTag = ( ( org.ovirt.engine.core.common.businessentities.tags ) ( cloner.transform ( tag ) ) ) ; org.junit.Assert.assertEquals ( 1 , newTag.getChildren ( ) . size ( ) ) ; }

Target:
public void testCloneTag ( ) { org.ovirt.engine.core.common.businessentities.Tags tag = createTag ( "a" , "b" ) ; org.ovirt.engine.core.common.businessentities.Tags tag2 = createTag ( "c" , "d" ) ; tag.getChildren ( ) . add ( tag2 ) ; tag2.setparent_id ( tag.gettag_id ( ) ) ; org.apache.commons.collections.Transformer cloner = org.apache.commons.collections.TransformerUtils.cloneTransformer ( ) ; org.ovirt.engine.core.common.businessentities.Tags newTag = ( ( org.ovirt.engine.core.common.businessentities.Tags ) ( cloner.transform ( tag ) ) ) ; org.junit.Assert.assertEquals ( 1 , newTag.getChildren ( ) . size ( ) ) ; }
Source:
protected boolean canDoAction ( ) { if ( ! ( org.ovirt.engine.core.bll.ChangeVMClusterCommand.canRunActionOnNonManagedVm ( ) ) ) { return false ; } if ( ( ! ( org.ovirt.engine.core.bll.ChangeVMClusterCommand.isInternalExecution ( ) ) ) && ( ! ( org.ovirt.engine.core.utils.ObjectIdentityChecker.CanUpdateField ( org.ovirt.engine.core.bll.ChangeVMClusterCommand.getVm ( ) , "vdsGroupId" , org.ovirt.engine.core.bll.ChangeVMClusterCommand.getVm ( ) . getStatus ( ) ) ) ) ) { addCanDoActionMessage ( VdcBllMessages.VM_STATUS_NOT_VALID_FOR_UPDATE ) ; return false ; } org.ovirt.engine.core.bll.ChangeVmClusterValidator validator = new org.ovirt.engine.core.bll.ChangeVmClusterValidator ( this , org.ovirt.engine.core.bll.ChangeVMClusterCommand.getParameters ( ) . getClusterId ( ) ) ; return validator.validate ( ) ; }

Target:
protected boolean canDoAction ( ) { if ( ! ( org.ovirt.engine.core.bll.ChangeVMClusterCommand.canRunActionOnNonManagedVm ( ) ) ) { return false ; } if ( ( ! ( org.ovirt.engine.core.bll.ChangeVMClusterCommand.isInternalExecution ( ) ) ) && ( ! ( org.ovirt.engine.core.utils.ObjectIdentityChecker.CanUpdateField ( org.ovirt.engine.core.bll.ChangeVMClusterCommand.getVm ( ) , "vdsGroupId" , org.ovirt.engine.core.bll.ChangeVMClusterCommand.getVm ( ) . getStatus ( ) ) ) ) ) { addCanDoActionMessage ( EngineMessage.VM_STATUS_NOT_VALID_FOR_UPDATE ) ; return false ; } org.ovirt.engine.core.bll.ChangeVmClusterValidator validator = new org.ovirt.engine.core.bll.ChangeVmClusterValidator ( this , org.ovirt.engine.core.bll.ChangeVMClusterCommand.getParameters ( ) . getClusterId ( ) ) ; return validator.validate ( ) ; }
Source:
public void OnSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.datacenters.DataCenterGuideModel dataCenterGuideModel = ( ( org.ovirt.engine.ui.uicommonweb.models.datacenters.DataCenterGuideModel ) ( target ) ) ; org.ovirt.engine.core.common.businessentities.VDS localStorageHost = ( ( org.ovirt.engine.core.common.businessentities.VDS ) ( returnValue ) ) ; dataCenterGuideModel.localStorageHost = localStorageHost ; dataCenterGuideModel.UpdateOptionsLocalFS ( ) ; }

Target:
public void OnSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.datacenters.DataCenterGuideModel dataCenterGuideModel = ( ( org.ovirt.engine.ui.uicommonweb.models.datacenters.DataCenterGuideModel ) ( target ) ) ; if ( returnValue != null ) { org.ovirt.engine.core.common.businessentities.VDS localStorageHost = ( ( org.ovirt.engine.core.common.businessentities.VDS ) ( returnValue ) ) ; dataCenterGuideModel.localStorageHost = localStorageHost ; } else { noLocalStorageHost = true ; } dataCenterGuideModel.UpdateOptionsLocalFS ( ) ; }
Source:
protected javax.ws.rs.core.Response performNonBlockingAction ( org.ovirt.engine.core.common.action.ActionType task , org.ovirt.engine.core.common.action.VdcActionParametersBase params , org.ovirt.engine.api.model.Action action ) { try { doNonBlockingAction ( task , params ) ; if ( action != null ) { action.setStatus ( CreationStatus.IN_PROGRESS.value ( ) ) ; return javax.ws.rs.core.Response.status ( Response.Status.ACCEPTED ) . entity ( action ) . build ( ) ; } else { return javax.ws.rs.core.Response.status ( Response.Status.ACCEPTED ) . build ( ) ; } } catch ( java.lang.Exception e ) { return handleError ( javax.ws.rs.core.Response.class , e , false ) ; } }

Target:
protected javax.ws.rs.core.Response performNonBlockingAction ( org.ovirt.engine.core.common.action.ActionType task , org.ovirt.engine.core.common.action.ActionParametersBase params , org.ovirt.engine.api.model.Action action ) { try { doNonBlockingAction ( task , params ) ; if ( action != null ) { action.setStatus ( CreationStatus.IN_PROGRESS.value ( ) ) ; return javax.ws.rs.core.Response.status ( Response.Status.ACCEPTED ) . entity ( action ) . build ( ) ; } else { return javax.ws.rs.core.Response.status ( Response.Status.ACCEPTED ) . build ( ) ; } } catch ( java.lang.Exception e ) { return handleError ( javax.ws.rs.core.Response.class , e , false ) ; } }
Source:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel ) ( target ) ) ; org.ovirt.engine.core.common.businessentities.StoragePool dataCenter = ( ( org.ovirt.engine.core.common.businessentities.StoragePool ) ( returnValue ) ) ; model.setDataCenter ( model , new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StoragePool > ( java.util.Arrays.asList ( new org.ovirt.engine.core.common.businessentities.StoragePool [ ] { dataCenter } ) ) ) ; model.getDataCenter ( ) . setIsChangable ( false ) ; }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { getModel ( ) . getIsSoundcardEnabled ( ) . setEntity ( returnValue ) ; initTemplate ( ) ; initCdImage ( ) ; }
Source:
public void mockDbFacadeAndDao ( ) { vdsDao = org.mockito.Mockito.mock ( org.ovirt.engine.core.dao.VdsDAO.class ) ; org.mockito.Mockito.when ( vdsDao.getAllForVdsGroupWithStatus ( CLUSTER_ID , VDSStatus.Up ) ) . thenReturn ( mockGetAllVdsForwithStatus ( VDSStatus.Up ) ) ; clusterUtils = org.mockito.Mockito.spy ( org.ovirt.engine.core.bll.utils.ClusterUtils.getInstance ( ) ) ; org.mockito.Mockito.doReturn ( vdsDao ) . when ( clusterUtils ) . getVdsDao ( ) ; }

Target:
public void mockDbFacadeAndDao ( ) { vdsDao = org.mockito.Mockito.mock ( org.ovirt.engine.core.dao.VdsDao.class ) ; org.mockito.Mockito.when ( vdsDao.getAllForVdsGroupWithStatus ( CLUSTER_ID , VDSStatus.Up ) ) . thenReturn ( mockGetAllVdsForwithStatus ( VDSStatus.Up ) ) ; clusterUtils = org.mockito.Mockito.spy ( org.ovirt.engine.core.bll.utils.ClusterUtils.getInstance ( ) ) ; org.mockito.Mockito.doReturn ( vdsDao ) . when ( clusterUtils ) . getVdsDao ( ) ; }
Source:
protected void endWithFailure ( ) { org.ovirt.engine.core.common.businessentities.storage.CinderDisk cinderVolume = org.ovirt.engine.core.bll.storage.RemoveCinderDiskCommand.getParameters ( ) . getRemovedVolume ( ) ; org.ovirt.engine.core.bll.storage.RemoveCinderDiskCommand.log.error ( "Could not volume id from Cinder which is related to disk {}" , cinderVolume.getDiskAlias ( ) , cinderVolume.getImageId ( ) ) ; if ( org.ovirt.engine.core.bll.storage.RemoveCinderDiskCommand.getParameters ( ) . isFaultTolerant ( ) ) { endRemoveCinderDisk ( cinderVolume ) ; } else { auditLogFailureWithImageDeletion ( cinderVolume.getImageId ( ) ) ; org.ovirt.engine.core.bll.ImagesHandler.updateImageStatus ( getDisk ( ) . getId ( ) , ImageStatus.ILLEGAL ) ; } }

Target:
public java.lang.Object runInTransaction ( ) { removeDiskFromDb ( cinderVolume , updated ) ; return null ; }
Source:
public void testStaticBarToFooClassMapper ( ) { org.ovirt.engine.api.restapi.types.Mapper < org.ovirt.engine.api.restapi.test.mappers.impl.BarImpl , org.ovirt.engine.api.restapi.test.mappers.impl.FooImpl > mapper = mappingLocator.getMapper ( org.ovirt.engine.api.restapi.test.mappers.impl.BarImpl.class , org.ovirt.engine.api.restapi.test.mappers.impl.FooImpl.class ) ; assertNotNull ( mapper ) ; org.ovirt.engine.api.restapi.test.mappers.api.IFoo foo = mapper.map ( new org.ovirt.engine.api.restapi.test.mappers.impl.BarImpl ( "bar" ) , null ) ; assertEquals ( "bar" , foo.get ( ) ) ; }

Target:
public void testStaticBarToFooClassMapper ( ) { org.ovirt.engine.api.restapi.types.Mapper < org.ovirt.engine.api.restapi.test.mappers.impl.BarImpl , org.ovirt.engine.api.restapi.test.mappers.impl.FooImpl > mapper = mappingLocator.getMapper ( org.ovirt.engine.api.restapi.test.mappers.impl.BarImpl.class , org.ovirt.engine.api.restapi.test.mappers.impl.FooImpl.class ) ; org.junit.Assert.assertNotNull ( mapper ) ; org.ovirt.engine.api.restapi.test.mappers.api.IFoo foo = mapper.map ( new org.ovirt.engine.api.restapi.test.mappers.impl.BarImpl ( "bar" ) , null ) ; org.junit.Assert.assertEquals ( "bar" , foo.get ( ) ) ; }
Source:
public void testNested ( ) { org.ovirt.engine.api.types.V4Vm object = objectFromXml ( ( "<vm>" + ( "<cpu><mode>mymode</mode></cpu>" + "</vm>" ) ) ) ; org.junit.Assert.assertNotNull ( object.getCpu ( ) ) ; org.junit.Assert.assertEquals ( "mymode" , object.getCpu ( ) . getMode ( ) ) ; }

Target:
public void testNested ( ) { org.ovirt.engine.api.types.V4Vm object = objectFromXml ( ( "<vm>" + ( "<cpu><mode>mymode</mode></cpu>" + "</vm>" ) ) ) ; org.junit.Assert.assertNotNull ( object.cpu ( ) ) ; org.junit.Assert.assertEquals ( "mymode" , object.cpu ( ) . mode ( ) ) ; }
Source:
public void testFaultyResize ( ) { org.mockito.Mockito.when ( diskDao.get ( diskImageGuid ) ) . thenReturn ( createDiskImage ( ) ) ; org.ovirt.engine.core.common.action.UpdateVmDiskParameters parameters = createParameters ( ) ; ( ( org.ovirt.engine.core.common.businessentities.DiskImage ) ( parameters.getDiskInfo ( ) ) ) . setSize ( ( ( parameters.getDiskInfo ( ) . getSize ( ) ) / 2 ) ) ; initializeCommand ( parameters ) ; org.junit.Assert.assertFalse ( command.validateCanResizeDisk ( ) ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.assertCanDoActionMessages ( "wrong failure" , command , VdcBllMessages.ACTION_TYPE_FAILED_REQUESTED_DISK_SIZE_IS_TOO_SMALL ) ; }

Target:
public void testFaultyResize ( ) { org.mockito.Mockito.when ( diskDao.get ( diskImageGuid ) ) . thenReturn ( createDiskImage ( ) ) ; org.ovirt.engine.core.common.action.UpdateVmDiskParameters parameters = createParameters ( ) ; ( ( org.ovirt.engine.core.common.businessentities.storage.DiskImage ) ( parameters.getDiskInfo ( ) ) ) . setSize ( ( ( parameters.getDiskInfo ( ) . getSize ( ) ) / 2 ) ) ; initializeCommand ( parameters ) ; org.junit.Assert.assertFalse ( command.validateCanResizeDisk ( ) ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.assertCanDoActionMessages ( "wrong failure" , command , VdcBllMessages.ACTION_TYPE_FAILED_REQUESTED_DISK_SIZE_IS_TOO_SMALL ) ; }
Source:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; dao = dbFacade.getRoleDao ( ) ; existingRole = dao.get ( new org.ovirt.engine.core.compat.Guid ( "f5972bfa-7102-4d33-ad22-9dd421bfba78" ) ) ; newRole = new org.ovirt.engine.core.common.businessentities.Role ( ) ; newRole.setName ( "new role" ) ; newRole.setDescription ( "This is a new role." ) ; newRole.setType ( RoleType.USER ) ; newRole.setAllowsViewingChildren ( false ) ; newRole.setAppMode ( ApplicationMode.AllModes ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; dao = dbFacade.getRoleDao ( ) ; existingRole = dao.get ( FixturesTool.ROLE_ID ) ; newRole = new org.ovirt.engine.core.common.businessentities.Role ( ) ; newRole.setName ( "new role" ) ; newRole.setDescription ( "This is a new role." ) ; newRole.setType ( RoleType.USER ) ; newRole.setAllowsViewingChildren ( false ) ; newRole.setAppMode ( ApplicationMode.AllModes ) ; }
Source:
private static void handleErrorLog ( org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.compat.Guid storageDomainId , org.ovirt.engine.core.common.businessentities.storage.ImageFileType imageType ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.RepoImage > tempProblematicRepoFileList = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.RepoImage > ( ) ; org.ovirt.engine.core.common.businessentities.storage.RepoImage repoImage = new org.ovirt.engine.core.common.businessentities.storage.RepoImage ( ) ; repoImage.setStoragePoolId ( storagePoolId ) ; repoImage.setRepoDomainId ( storageDomainId ) ; repoImage.setFileType ( imageType ) ; tempProblematicRepoFileList.add ( repoImage ) ; org.ovirt.engine.core.bll.IsoDomainListSyncronizer.handleErrorLog ( tempProblematicRepoFileList ) ; }

Target:
private static org.ovirt.engine.core.common.businessentities.storage.RepoImage createMockRepositoryFileMetaData ( org.ovirt.engine.core.compat.Guid storageDomainId , org.ovirt.engine.core.common.businessentities.storage.ImageFileType imageType , org.ovirt.engine.core.compat.Guid storagePoolId ) { org.ovirt.engine.core.common.businessentities.storage.RepoImage repoImage = new org.ovirt.engine.core.common.businessentities.storage.RepoImage ( ) ; repoImage.setStoragePoolId ( storagePoolId ) ; repoImage.setRepoDomainId ( storageDomainId ) ; repoImage.setFileType ( imageType ) ; return repoImage ; }
Source:
private void Commit ( ) { org.ovirt.engine.core.common.businessentities.VM vm = ( ( org.ovirt.engine.core.common.businessentities.VM ) ( getEntity ( ) ) ) ; if ( vm != null ) { org.ovirt.engine.core.common.businessentities.Snapshot snapshot = getInPreview ( ) ; org.ovirt.engine.ui.frontend.Frontend.RunAction ( VdcActionType.RestoreAllSnapshots , new org.ovirt.engine.core.common.action.RestoreAllSnapshotsParameters ( vm.getId ( ) , snapshot.getId ( ) ) , new org.ovirt.engine.ui.uicompat.IFrontendActionAsyncCallback ( ) { @ java.lang.Override public void Executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { } } , null ) ; } }

Target:
private void Preview ( ) { org.ovirt.engine.core.common.businessentities.VM vm = ( ( org.ovirt.engine.core.common.businessentities.VM ) ( getEntity ( ) ) ) ; if ( vm != null ) { org.ovirt.engine.core.common.businessentities.Snapshot snapshot = ( ( org.ovirt.engine.core.common.businessentities.Snapshot ) ( getSelectedItem ( ) ) ) ; org.ovirt.engine.ui.frontend.Frontend.RunAction ( VdcActionType.TryBackToAllSnapshotsOfVm , new org.ovirt.engine.core.common.action.TryBackToAllSnapshotsOfVmParameters ( vm.getId ( ) , snapshot.getId ( ) ) , null , null ) ; } }
Source:
public static void getVmsRunningOnOrMigratingToVds ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VM > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVmsRunningOnOrMigratingToVds , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }

Target:
public static void getVmSnapshotList ( 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 ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Snapshot > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Snapshot > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllVmSnapshotsByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }
Source:
public void storagePoolStatusChange ( org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.common.businessentities.StoragePoolStatus status , org.ovirt.engine.core.common.AuditLogType auditLogType , org.ovirt.engine.core.common.errors.VdcBllErrors error , org.ovirt.engine.core.compat.TransactionScopeOption transactionScopeOption ) { org.ovirt.engine.core.common.action.SetStoragePoolStatusParameters tempVar = new org.ovirt.engine.core.common.action.SetStoragePoolStatusParameters ( storagePoolId , status , auditLogType ) ; tempVar.setError ( error ) ; if ( transactionScopeOption != null ) { tempVar.setTransactionScopeOption ( transactionScopeOption ) ; } org.ovirt.engine.core.bll.Backend.getInstance ( ) . runInternalAction ( VdcActionType.SetStoragePoolStatus , tempVar ) ; }

Target:
public void storagePoolStatusChange ( org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.common.businessentities.StoragePoolStatus status , org.ovirt.engine.core.common.AuditLogType auditLogType , org.ovirt.engine.core.common.errors.EngineError error , org.ovirt.engine.core.compat.TransactionScopeOption transactionScopeOption ) { org.ovirt.engine.core.common.action.SetStoragePoolStatusParameters tempVar = new org.ovirt.engine.core.common.action.SetStoragePoolStatusParameters ( storagePoolId , status , auditLogType ) ; tempVar.setError ( error ) ; if ( transactionScopeOption != null ) { tempVar.setTransactionScopeOption ( transactionScopeOption ) ; } backend.runInternalAction ( VdcActionType.SetStoragePoolStatus , tempVar ) ; }
Source:
private void UpdateReportCommandAvailability ( org.ovirt.engine.ui.uicommonweb.ReportCommand reportCommand , java.util.List < ? > selectedItems ) { reportCommand.setIsExecutionAllowed ( ( ( ( ! ( reportCommand.isMultiple ( ) ) ) && ( ( selectedItems.size ( ) ) == 1 ) ) || ( ( reportCommand.isMultiple ( ) ) && ( ( selectedItems.size ( ) ) > 1 ) ) ) ) ; }

Target:
private void updateReportCommandAvailability ( org.ovirt.engine.ui.uicommonweb.ReportCommand reportCommand , java.util.List < ? > selectedItems ) { reportCommand.setIsExecutionAllowed ( ( ( ( ! ( reportCommand.isMultiple ( ) ) ) && ( ( selectedItems.size ( ) ) == 1 ) ) || ( ( reportCommand.isMultiple ( ) ) && ( ( selectedItems.size ( ) ) > 1 ) ) ) ) ; }
Source:
public static void IsDirectLunDiskEnabled ( 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 params = new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.DirectLUNDiskEnabled ) ; params.setVersion ( version ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( params , aQuery ) ; }

Target:
public static void GetDocumentationBaseURL ( 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.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.DocsURL , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
public void testAddingNewUnsuccessfulBackupEvent ( ) { org.ovirt.engine.core.common.businessentities.EngineBackupLog engineBackupLog = new org.ovirt.engine.core.common.businessentities.EngineBackupLog ( ) ; engineBackupLog.setDbName ( org.ovirt.engine.core.dao.EngineBackupLogDaoTest.DB_NAME ) ; engineBackupLog.setDoneAt ( java.util.Calendar.getInstance ( ) . getTime ( ) ) ; engineBackupLog.setPassed ( false ) ; engineBackupLog.setOutputMessage ( "backup failed" ) ; dao.save ( engineBackupLog ) ; org.ovirt.engine.core.common.businessentities.EngineBackupLog entry = dao.getLastSuccessfulEngineBackup ( org.ovirt.engine.core.dao.EngineBackupLogDaoTest.DB_NAME ) ; org.junit.Assert.assertNotNull ( entry ) ; org.junit.Assert.assertEquals ( entry , existingEngineBackupLog ) ; }

Target:
public void testGetLastSuccessfulEngineBackupWithWrongDbName ( ) { existingEngineBackupLog = dao.getLastSuccessfulEngineBackup ( org.ovirt.engine.core.dao.EngineBackupLogDaoTest.NON_EXISTING_SCOPE ) ; org.junit.Assert.assertNull ( existingEngineBackupLog ) ; }
Source:
private void runOnce ( ) { org.ovirt.engine.core.common.businessentities.VM vm = ( ( org.ovirt.engine.core.common.businessentities.VM ) ( getSelectedItem ( ) ) ) ; org.ovirt.engine.ui.uicommonweb.models.vms.RunOnceModel model = new org.ovirt.engine.ui.uicommonweb.models.vms.WebadminRunOnceModel ( vm , getCustomPropertiesKeysList ( ) . get ( vm.getVdsGroupCompatibilityVersion ( ) ) , this ) ; setWindow ( model ) ; model.init ( ) ; }

Target:
private void createSnapshot ( ) { org.ovirt.engine.core.common.businessentities.VM vm = ( ( org.ovirt.engine.core.common.businessentities.VM ) ( getSelectedItem ( ) ) ) ; if ( ( vm == null ) || ( ( getWindow ( ) ) != null ) ) { return ; } org.ovirt.engine.ui.uicommonweb.models.vms.SnapshotModel model = org.ovirt.engine.ui.uicommonweb.models.vms.SnapshotModel.createNewSnapshotModel ( this ) ; model.setValidateByVmSnapshots ( true ) ; setWindow ( model ) ; model.setVm ( vm ) ; model.initialize ( ) ; }
Source:
private void filter ( ) { java.lang.String [ ] ids = this . getParsedId ( ) ; this . filteredId = new java.util.ArrayList < > ( ) ; for ( java.lang.String id : ids ) { if ( ! ( org.ovirt.vdsm.jsonrpc.client.utils.JsonUtils.ALL.equals ( id ) ) ) { this . filteredId.add ( id ) ; } } }

Target:
private void filter ( ) { java.lang.String [ ] ids = this . getParsedId ( ) ; this . filteredId = java.util.Arrays.asList ( ids ) . stream ( ) . filter ( ( id ) -> ! ( org.ovirt.vdsm.jsonrpc.client.utils.JsonUtils.ALL.equals ( id ) ) ) . collect ( java.util.stream.Collectors.toList ( ) ) ; }
Source:
public void validateFailsWithDuplicateVolumeName ( ) { cmd = org.mockito.Mockito.spy ( createTestCommand ( getVolume ( 2 , false ) ) ) ; prepareMocks ( cmd ) ; org.mockito.Mockito.doReturn ( getVolume ( 2 , false ) ) . when ( volumeDao ) . getByName ( clusterId , "vol1" ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( cmd , EngineMessage.ACTION_TYPE_FAILED_GLUSTER_VOLUME_NAME_ALREADY_EXISTS ) ; }

Target:
public void validateFailsWithClusterDoesNotSupportGluster ( ) { org.mockito.Mockito.doReturn ( getCluster ( false , Version.v4_1 ) ) . when ( clusterDao ) . get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( cmd , EngineMessage.ACTION_TYPE_FAILED_CLUSTER_DOES_NOT_SUPPORT_GLUSTER ) ; }
Source:
public com.google.gwt.resources.client.ImageResource getValue ( org.ovirt.engine.core.common.businessentities.Quota quota ) { if ( ( quota.getQuotaEnforcementType ( ) ) == null ) { return getApplicationResources ( ) . iconDisable ( ) ; } setEnumTitle ( quota.getQuotaEnforcementType ( ) ) ; switch ( quota.getQuotaEnforcementType ( ) ) { case HARD_ENFORCEMENT : return getApplicationResources ( ) . iconEnforce ( ) ; case SOFT_ENFORCEMENT : return getApplicationResources ( ) . iconAudit ( ) ; case DISABLED : return getApplicationResources ( ) . iconDisable ( ) ; default : return getApplicationResources ( ) . iconDisable ( ) ; } }

Target:
public com.google.gwt.safehtml.shared.SafeHtml getTooltip ( org.ovirt.engine.core.common.businessentities.Quota quota ) { java.lang.String tooltipContent = org.ovirt.engine.ui.uicompat.EnumTranslator.getInstance ( ) . translate ( quota.getQuotaEnforcementType ( ) ) ; return com.google.gwt.safehtml.shared.SafeHtmlUtils.fromString ( tooltipContent ) ; }
Source:
protected void verifyBuiltVmBase ( org.ovirt.engine.core.common.businessentities.VmBase vm ) { verifyBuiltCommonVm ( vm ) ; verifyBuiltKernelOptions ( vm ) ; verifyBuiltMigrationOptions ( vm ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.ui.uicommonweb.models.pools.BaseVmListModelTest.HOST_ID , vm.getDedicatedVmForVds ( ) ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.ui.uicommonweb.models.pools.BaseVmListModelTest.VM_NAME , vm.getName ( ) ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.ui.uicommonweb.models.pools.BaseVmListModelTest.DESCRIPTION , vm.getDescription ( ) ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.ui.uicommonweb.models.pools.BaseVmListModelTest.COMMENT , vm.getComment ( ) ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.ui.uicommonweb.models.pools.BaseVmListModelTest.USB_POLICY , vm.getUsbPolicy ( ) ) ; }

Target:
protected void verifyBuiltCommonVm ( org.ovirt.engine.core.common.businessentities.VmBase vm ) { verifyBuiltCoreVm ( vm ) ; org.junit.Assert.assertTrue ( vm.isStateless ( ) ) ; org.junit.Assert.assertTrue ( vm.isRunAndPause ( ) ) ; org.junit.Assert.assertTrue ( vm.isAutoStartup ( ) ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.ui.uicommonweb.models.pools.BaseVmListModelTest.QUOTA_ID , vm.getQuotaId ( ) ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.ui.uicommonweb.models.pools.BaseVmListModelTest.PRIORITY , vm.getPriority ( ) ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.ui.uicommonweb.models.pools.BaseVmListModelTest.DESCRIPTION , vm.getDescription ( ) ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.ui.uicommonweb.models.pools.BaseVmListModelTest.COMMENT , vm.getComment ( ) ) ; }
Source:
private java.util.List < org.ovirt.engine.ui.uicompat.IFrontendActionAsyncCallback > verfifyRunAction ( int exepectedNumOfRunActionExecutions , boolean showErrorDialog ) { org.mockito.Mockito.verify ( frontend , org.mockito.Mockito.times ( exepectedNumOfRunActionExecutions ) ) . runAction ( org.mockito.Matchers.eq ( org.ovirt.engine.ui.uicommonweb.action.ACTION_TYPE ) , org.mockito.Matchers.any ( org.ovirt.engine.core.common.action.VdcActionParametersBase.class ) , callbackCaptor.capture ( ) , org.mockito.Matchers.eq ( showErrorDialog ) ) ; java.util.List < org.ovirt.engine.ui.uicompat.IFrontendActionAsyncCallback > callbacks = callbackCaptor.getAllValues ( ) ; return callbacks ; }

Target:
private java.util.List < org.ovirt.engine.ui.uicompat.IFrontendActionAsyncCallback > verfifyRunAction ( int exepectedNumOfRunActionExecutions , boolean showErrorDialog ) { org.mockito.Mockito.verify ( frontend , org.mockito.Mockito.times ( exepectedNumOfRunActionExecutions ) ) . runAction ( org.mockito.ArgumentMatchers.eq ( org.ovirt.engine.ui.uicommonweb.action.ACTION_TYPE ) , org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.common.action.VdcActionParametersBase.class ) , callbackCaptor.capture ( ) , org.mockito.ArgumentMatchers.eq ( showErrorDialog ) ) ; java.util.List < org.ovirt.engine.ui.uicompat.IFrontendActionAsyncCallback > callbacks = callbackCaptor.getAllValues ( ) ; return callbacks ; }