auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void testGetNotFound ( ) { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpEntityQueryExpectations ( QueryType.GetVmTemplatesDisks , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendTemplateDiskResourceTest.TEMPLATE_ID } , new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.DiskImage > ( ) ) ; try { resource.get ( ) ; org.junit.Assert.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }

Target:
public void testGetNotFound ( ) { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpEntityQueryExpectations ( QueryType.GetVmTemplatesDisks , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendTemplateDiskResourceTest.TEMPLATE_ID } , new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.DiskImage > ( ) ) ; try { resource.get ( ) ; org.junit.jupiter.api.Assertions.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }
Source:
private void retryCall ( final org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request , final org.ovirt.vdsm.jsonrpc.client.internal.JsonRpcCall call ) throws org.ovirt.vdsm.jsonrpc.client.ClientConnectionException { org.ovirt.vdsm.jsonrpc.client.utils.ResponseTracking tracking = new org.ovirt.vdsm.jsonrpc.client.utils.ResponseTracking ( request , call , new org.ovirt.vdsm.jsonrpc.client.utils.retry.RetryContext ( policy ) , getTimeout ( this . policy.getRetryTimeOut ( ) , this . policy.getTimeUnit ( ) ) ) ; this . map.put ( request.getId ( ) , tracking ) ; this . queue.add ( request.getId ( ) ) ; }

Target:
private void retryCall ( final org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request , final org.ovirt.vdsm.jsonrpc.client.internal.JsonRpcCall call ) throws org.ovirt.vdsm.jsonrpc.client.ClientConnectionException { org.ovirt.vdsm.jsonrpc.client.utils.ResponseTracking tracking = new org.ovirt.vdsm.jsonrpc.client.utils.ResponseTracking ( request , call , new org.ovirt.vdsm.jsonrpc.client.utils.retry.RetryContext ( policy ) , org.ovirt.vdsm.jsonrpc.client.utils.JsonUtils.getTimeout ( this . policy.getRetryTimeOut ( ) , this . policy.getTimeUnit ( ) ) , client ) ; this . tracker.registerTrackingRequest ( request , tracking ) ; }
Source:
public java.util.Set < java.lang.String > computeSelecetedLabels ( ) { java.util.Set < java.lang.String > selectedLabels = new java.util.HashSet < > ( ) ; selectedLabels.clear ( ) ; for ( org.ovirt.engine.ui.uicommonweb.models.ListModel < java.lang.String > labelModel : getItems ( ) ) { selectedLabels.add ( labelModel.getSelectedItem ( ) ) ; } return selectedLabels ; }

Target:
public java.util.Set < java.lang.String > computeSelectedLabels ( ) { java.util.Set < java.lang.String > selectedLabels = new java.util.HashSet < > ( ) ; selectedLabels.clear ( ) ; for ( org.ovirt.engine.ui.uicommonweb.models.ListModel < java.lang.String > labelModel : getItems ( ) ) { selectedLabels.add ( labelModel.getSelectedItem ( ) ) ; } return selectedLabels ; }
Source:
private void optimizationCustomFormatter ( org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterModel object ) { if ( ( ( object.getOptimizationCustom ( ) ) != null ) && ( ( object.getOptimizationCustom ( ) . getEntity ( ) ) != null ) ) { optimizationCustomEditor.setLabel ( messages.clusterPopupMemoryOptimizationCustomLabel ( java.lang.String.valueOf ( object.getMemoryOverCommit ( ) ) ) ) ; } }

Target:
private void optimizationCustomFormatter ( org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterModel object ) { if ( ( ( object.getOptimizationCustom ( ) ) != null ) && ( ( object.getOptimizationCustom ( ) . getEntity ( ) ) != null ) ) { optimizationCustomEditor.asRadioButton ( ) . setHTML ( templates.radioButtonLabel ( messages.clusterPopupMemoryOptimizationCustomLabel ( java.lang.String.valueOf ( object.getMemoryOverCommit ( ) ) ) ) ) ; } }
Source:
public static boolean IsWindowsOsType ( org.ovirt.engine.core.common.businessentities.VmOsType osType ) { if ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetWindowsOsTypes ( ) . contains ( osType ) ) { return true ; } return false ; }

Target:
public static void GetAllProvidersByType ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.common.businessentities.ProviderType providerType ) { 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.Provider > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllProviders , new org.ovirt.engine.core.common.queries.GetAllProvidersParameters ( providerType ) , aQuery ) ; }
Source:
public org.ovirt.engine.sdk.decorators.Event add ( org.ovirt.engine.sdk.decorators.Event event , java.lang.String expect , java.lang.String correlationId ) throws java.io.IOException , org.apache.http.client.ClientProtocolException , org.ovirt.engine.sdk.exceptions.ServerException { java.lang.String url = ( SLASH ) + ( getName ( ) ) ; java.util.List < org.apache.http.Header > headers = new org.ovirt.engine.sdk.utils.HttpHeaderBuilder ( ) . add ( "Expect" , expect ) . add ( "Correlation-Id" , correlationId ) . build ( ) ; url = new org.ovirt.engine.sdk.utils.UrlBuilder ( url ) . build ( ) ; return getProxy ( ) . add ( url , event , org.ovirt.engine.sdk.entities.Event.class , org.ovirt.engine.sdk.decorators.Event.class , headers ) ; }

Target:
public org.ovirt.engine.sdk.decorators.Event add ( org.ovirt.engine.sdk.decorators.Event event ) throws java.io.IOException , org.apache.http.client.ClientProtocolException , org.ovirt.engine.sdk.exceptions.ServerException { java.lang.String url = ( SLASH ) + ( getName ( ) ) ; org.ovirt.engine.sdk.utils.HttpHeaderBuilder headersBuilder = new org.ovirt.engine.sdk.utils.HttpHeaderBuilder ( ) ; java.util.List < org.apache.http.Header > headers = headersBuilder.build ( ) ; org.ovirt.engine.sdk.utils.UrlBuilder urlBuilder = new org.ovirt.engine.sdk.utils.UrlBuilder ( url ) ; url = urlBuilder.build ( ) ; return getProxy ( ) . add ( url , event , org.ovirt.engine.sdk.entities.Event.class , org.ovirt.engine.sdk.decorators.Event.class , headers ) ; }
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 getClusterGlusterServices ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.core.common.queries.gluster.GlusterVolumeAdvancedDetailsParameters parameters = new org.ovirt.engine.core.common.queries.gluster.GlusterVolumeAdvancedDetailsParameters ( clusterId , null , null , false ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetGlusterVolumeAdvancedDetails , parameters , aQuery ) ; }
Source:
private void doTestBadRemove ( boolean valid , boolean success , java.lang.String detail ) throws java.lang.Exception { setUriInfo ( setUpActionExpectations ( ActionType.UnlabelNetwork , org.ovirt.engine.core.common.action.UnlabelNetworkParameters.class , new java.lang.String [ ] { "NetworkId" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendNetworkLabelResourceTest.NETWORK_ID } , valid , success ) ) ; try { resource.remove ( ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , detail ) ; } }

Target:
private void doTestBadRemove ( boolean valid , boolean success , java.lang.String detail ) throws java.lang.Exception { setUriInfo ( setUpActionExpectations ( ActionType.UnlabelNetwork , org.ovirt.engine.core.common.action.UnlabelNetworkParameters.class , new java.lang.String [ ] { "NetworkId" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendNetworkLabelResourceTest.NETWORK_ID } , valid , success ) ) ; try { resource.remove ( ) ; org.junit.Assert.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , detail ) ; } }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc startSpice ( java.lang.String vdsIp , int port , java.lang.String ticket ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.startSpice ( vdsIp , port , ticket ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.BooleanReturnForXmlRpc glusterVolumeEmptyCheck ( java.lang.String volumeName ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.glusterVolumeEmptyCheck ( volumeName ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.BooleanReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.BooleanReturnForXmlRpc ( xmlRpcReturnValue , "volumeEmptyCheck" ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
Source:
public void getVnicProfilesByNetworkId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid networkId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VnicProfileView > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVnicProfilesByNetworkId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( networkId ) , aQuery ) ; }

Target:
public void getClusterFeaturesByVersionAndCategory ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Version version , org.ovirt.engine.core.common.mode.ApplicationMode category ) { 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.Set < org.ovirt.engine.core.common.businessentities.AdditionalFeature > ) ( source ) ) : new java.util.HashSet < org.ovirt.engine.core.common.businessentities.AdditionalFeature > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetClusterFeaturesByVersionAndCategory , new org.ovirt.engine.core.common.queries.GetClusterFeaturesByVersionAndCategoryParameters ( version , category ) , aQuery ) ; }
Source:
public void composeObjectIdForAnEmptyAuditLog ( ) throws java.lang.Exception { java.lang.String composedObjectId = org.ovirt.engine.core.dal.dbbroker.auditloghandling.EventKeyComposer.composeObjectId ( new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) , AuditLogType.UNASSIGNED ) ; org.junit.Assert.assertEquals ( ( "type=UNASSIGNED," + ( ( ( ( ( ( ( "sd=," + "dc=," ) + "user=00000000-0000-0000-0000-000000000000," ) + "cluster=00000000-0000-0000-0000-000000000000," ) + "vds=00000000-0000-0000-0000-000000000000," ) + "vm=," ) + "template=," ) + "customId=" ) ) , composedObjectId ) ; }

Target:
private void composeObjectIdForAnEmptyAuditLog ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogable logable ) { java.lang.String composedObjectId = org.ovirt.engine.core.dal.dbbroker.auditloghandling.EventKeyComposer.composeObjectId ( logable , AuditLogType.UNASSIGNED ) ; org.junit.Assert.assertEquals ( ( "type=UNASSIGNED," + ( ( ( ( ( ( ( "sd=," + "dc=," ) + "user=," ) + "cluster=," ) + "vds=," ) + "vm=," ) + "template=," ) + "customId=" ) ) , composedObjectId ) ; }
Source:
protected java.util.List < D > getImportEntities ( ) { java.util.List < D > entities = new java.util.ArrayList < > ( ) ; for ( T item : org.ovirt.engine.ui.uicommonweb.models.storage.StorageRegisterEntityListModel.getSelectedItems ( ) ) { entities.add ( createImportEntityData ( item ) ) ; } java.util.Collections.sort ( entities , new org.ovirt.engine.ui.uicommonweb.Linq.ImportEntityComparator < T > ( ) ) ; return entities ; }

Target:
protected java.util.List < D > getImportEntities ( ) { java.util.List < D > entities = new java.util.ArrayList < > ( ) ; for ( T item : org.ovirt.engine.ui.uicommonweb.models.storage.StorageRegisterEntityListModel.getSelectedItems ( ) ) { entities.add ( createImportEntityData ( item ) ) ; } java.util.Collections.sort ( entities , java.util.Comparator.comparing ( ImportEntityData :: getName , new org.ovirt.engine.core.common.businessentities.comparators.LexoNumericComparator ( ) ) ) ; return entities ; }
Source:
public static org.ovirt.engine.api.model.MemoryPolicy map ( org.ovirt.engine.core.common.businessentities.VDSGroup entity , org.ovirt.engine.api.model.MemoryPolicy template ) { org.ovirt.engine.api.model.MemoryPolicy model = ( template != null ) ? template : new org.ovirt.engine.api.model.MemoryPolicy ( ) ; model.setOverCommit ( new org.ovirt.engine.api.model.MemoryOverCommit ( ) ) ; model.getOverCommit ( ) . setPercent ( entity.getmax_vds_memory_over_commit ( ) ) ; model.setTransparentHugepages ( new org.ovirt.engine.api.model.TransparentHugePages ( ) ) ; model.getTransparentHugepages ( ) . setEnabled ( entity.getTransparentHugepages ( ) ) ; return model ; }

Target:
public static org.ovirt.engine.api.model.MemoryPolicy map ( org.ovirt.engine.core.common.businessentities.VDSGroup entity , org.ovirt.engine.api.model.MemoryPolicy template ) { org.ovirt.engine.api.model.MemoryPolicy model = ( template != null ) ? template : new org.ovirt.engine.api.model.MemoryPolicy ( ) ; model.setOverCommit ( new org.ovirt.engine.api.model.MemoryOverCommit ( ) ) ; model.getOverCommit ( ) . setPercent ( entity.getMaxVdsMemoryOverCommit ( ) ) ; model.setTransparentHugepages ( new org.ovirt.engine.api.model.TransparentHugePages ( ) ) ; model.getTransparentHugepages ( ) . setEnabled ( entity.getTransparentHugepages ( ) ) ; return model ; }
Source:
private void assertGeneratesWithQuestionMarksCorrect ( int maxNameLength , int poolNameLength , int numberOfQuestionMarks , int expectedMaxNumOfVms ) { org.ovirt.engine.ui.uicommonweb.validation.ExistingPoolNameLengthValidation validation = new org.ovirt.engine.ui.uicommonweb.validation.ExistingPoolNameLengthValidation ( "" , 0 , org.ovirt.engine.core.common.osinfo.OsRepository.DEFAULT_X86_OS ) ; int res = validation.doGenerateMaxNumOfVmsWithQuestionMark ( maxNameLength , poolNameLength , numberOfQuestionMarks ) ; org.junit.Assert.assertThat ( res , org.hamcrest.core.Is.is ( org.hamcrest.core.IsEqual.equalTo ( expectedMaxNumOfVms ) ) ) ; }

Target:
private void assertGeneratesWithQuestionMarksCorrect ( int maxNameLength , int poolNameLength , int numberOfQuestionMarks , int expectedMaxNumOfVms ) { org.ovirt.engine.ui.uicommonweb.validation.ExistingPoolNameLengthValidation validation = new org.ovirt.engine.ui.uicommonweb.validation.ExistingPoolNameLengthValidation ( "" , 0 , org.ovirt.engine.core.common.osinfo.OsRepository.DEFAULT_X86_OS ) ; int res = validation.doGenerateMaxNumOfVmsWithQuestionMark ( maxNameLength , poolNameLength , numberOfQuestionMarks ) ; org.hamcrest.MatcherAssert.assertThat ( res , org.hamcrest.core.Is.is ( org.hamcrest.core.IsEqual.equalTo ( expectedMaxNumOfVms ) ) ) ; }
Source:
public org.ovirt.engine.core.bll.ValidationResult call ( ) { for ( org.ovirt.engine.core.common.businessentities.storage.CinderDisk disk : cinderDisks ) { org.ovirt.engine.core.common.businessentities.storage.Disk diskFromDB = getDiskDao ( ) . get ( disk.getId ( ) ) ; if ( diskFromDB != null ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.CINDER_DISK_ALREADY_REGISTERED , java.lang.String.format ( "$diskAlias %s" , diskFromDB.getDiskAlias ( ) ) ) ; } } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult validateCinderDisksAlreadyRegistered ( ) { return validate ( ( ) -> { for ( org.ovirt.engine.core.common.businessentities.storage.CinderDisk disk : cinderDisks ) { org.ovirt.engine.core.common.businessentities.storage.Disk diskFromDB = getDiskDao ( ) . get ( disk.getId ( ) ) ; if ( diskFromDB != null ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.CINDER_DISK_ALREADY_REGISTERED , java.lang.String.format ( "$diskAlias %s" , diskFromDB.getDiskAlias ( ) ) ) ; } } return org.ovirt.engine.core.bll.ValidationResult.VALID ; } ) ; }
Source:
private static void getVirtualCpuMemCount ( org.ovirt.engine.ui.frontend.server.dashboard.GlobalUtilizationResourceSummary cpuSummary , org.ovirt.engine.ui.frontend.server.dashboard.GlobalUtilizationResourceSummary memSummary , javax.sql.DataSource dwhDataSource ) throws java.sql.SQLException , org.ovirt.engine.ui.frontend.server.dashboard.DashboardDataException { org.ovirt.engine.ui.frontend.server.dashboard.dao.VmDwhDAO dao = new org.ovirt.engine.ui.frontend.server.dashboard.dao.VmDwhDAO ( dwhDataSource ) ; org.ovirt.engine.ui.frontend.server.dashboard.models.ResourcesTotal resourcesTotal = dao.getVirtualCpuMemCount ( ) ; cpuSummary.setVirtualTotal ( resourcesTotal.getCpuTotal ( ) ) ; cpuSummary.setVirtualUsed ( resourcesTotal.getCpuUsed ( ) ) ; memSummary.setVirtualTotal ( resourcesTotal.getMemTotal ( ) ) ; memSummary.setVirtualUsed ( resourcesTotal.getMemUsed ( ) ) ; }

Target:
private static void getVirtualCpuMemCount ( org.ovirt.engine.ui.frontend.server.dashboard.GlobalUtilizationResourceSummary cpuSummary , org.ovirt.engine.ui.frontend.server.dashboard.GlobalUtilizationResourceSummary memSummary , javax.sql.DataSource dwhDataSource ) throws org.ovirt.engine.ui.frontend.server.dashboard.DashboardDataException { org.ovirt.engine.ui.frontend.server.dashboard.dao.VmDwhDao dao = new org.ovirt.engine.ui.frontend.server.dashboard.dao.VmDwhDao ( dwhDataSource ) ; org.ovirt.engine.ui.frontend.server.dashboard.models.ResourcesTotal resourcesTotal = dao.getVirtualCpuMemCount ( ) ; cpuSummary.setVirtualTotal ( resourcesTotal.getCpuTotal ( ) ) ; cpuSummary.setVirtualUsed ( resourcesTotal.getCpuUsed ( ) ) ; memSummary.setVirtualTotal ( resourcesTotal.getMemTotal ( ) ) ; memSummary.setVirtualUsed ( resourcesTotal.getMemUsed ( ) ) ; }
Source:
public static void getHostFingerprint ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String hostAddress ) { 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 ( ) . runQuery ( VdcQueryType.GetServerSSHKeyFingerprint , new org.ovirt.engine.core.common.queries.ServerParameters ( hostAddress ) , 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:
protected void ExecuteVdsIdCommand ( ) { if ( ( _vdsManager ) != null ) { org.ovirt.engine.core.vdsbroker.UpdateVdsVMsClearedVDSCommand.getVds ( ) . setVmCount ( 0 ) ; org.ovirt.engine.core.vdsbroker.UpdateVdsVMsClearedVDSCommand.getVds ( ) . setVmsCoresCount ( 0 ) ; org.ovirt.engine.core.vdsbroker.UpdateVdsVMsClearedVDSCommand.getVds ( ) . setVmActive ( 0 ) ; org.ovirt.engine.core.vdsbroker.UpdateVdsVMsClearedVDSCommand.getVds ( ) . setVmMigrating ( 0 ) ; _vdsManager.UpdateDynamicData ( org.ovirt.engine.core.vdsbroker.UpdateVdsVMsClearedVDSCommand.getVds ( ) . getDynamicData ( ) ) ; } else { org.ovirt.engine.core.vdsbroker.UpdateVdsVMsClearedVDSCommand.getVDSReturnValue ( ) . setSucceeded ( false ) ; } }

Target:
protected void executeVdsIdCommand ( ) { if ( ( _vdsManager ) != null ) { org.ovirt.engine.core.vdsbroker.UpdateVdsVMsClearedVDSCommand.getVds ( ) . setVmCount ( 0 ) ; org.ovirt.engine.core.vdsbroker.UpdateVdsVMsClearedVDSCommand.getVds ( ) . setVmsCoresCount ( 0 ) ; org.ovirt.engine.core.vdsbroker.UpdateVdsVMsClearedVDSCommand.getVds ( ) . setVmActive ( 0 ) ; org.ovirt.engine.core.vdsbroker.UpdateVdsVMsClearedVDSCommand.getVds ( ) . setVmMigrating ( 0 ) ; _vdsManager.UpdateDynamicData ( org.ovirt.engine.core.vdsbroker.UpdateVdsVMsClearedVDSCommand.getVds ( ) . getDynamicData ( ) ) ; } else { org.ovirt.engine.core.vdsbroker.UpdateVdsVMsClearedVDSCommand.getVDSReturnValue ( ) . setSucceeded ( false ) ; } }
Source:
protected void executeCommand ( ) { org.ovirt.engine.core.common.businessentities.VmStatic vmStatic = org.ovirt.engine.core.bll.AddVmAndAttachToPoolCommand.getParameters ( ) . getVmStaticData ( ) ; org.ovirt.engine.core.common.action.VdcActionType action = ( VmTemplateHandler.BLANK_VM_TEMPLATE_ID.equals ( vmStatic.getVmtGuid ( ) ) ) ? org.ovirt.engine.core.common.action.VdcActionType.AddVmFromScratch : org.ovirt.engine.core.common.action.VdcActionType.AddVm ; org.ovirt.engine.core.common.action.VdcReturnValueBase returnValueFromAddVm = runInternalActionWithTasksContext ( action , buildAddVmParameters ( action ) ) ; if ( returnValueFromAddVm.getSucceeded ( ) ) { org.ovirt.engine.core.bll.AddVmAndAttachToPoolCommand.getTaskIdList ( ) . addAll ( returnValueFromAddVm.getInternalVdsmTaskIdList ( ) ) ; addVmToPool ( vmStatic ) ; } }

Target:
protected void executeCommand ( ) { org.ovirt.engine.core.common.businessentities.VmStatic vmStatic = org.ovirt.engine.core.bll.AddVmAndAttachToPoolCommand.getParameters ( ) . getVmStaticData ( ) ; org.ovirt.engine.core.common.action.VdcReturnValueBase returnValueFromAddVm = runInternalActionWithTasksContext ( VdcActionType.AddVm , buildAddVmParameters ( ) ) ; if ( returnValueFromAddVm.getSucceeded ( ) ) { org.ovirt.engine.core.bll.AddVmAndAttachToPoolCommand.getTaskIdList ( ) . addAll ( returnValueFromAddVm.getInternalVdsmTaskIdList ( ) ) ; addVmToPool ( vmStatic ) ; } }
Source:
public void UpdateMinAllocatedMemory ( ) { org.ovirt.engine.core.common.businessentities.VDSGroup cluster = ( ( org.ovirt.engine.core.common.businessentities.VDSGroup ) ( getModel ( ) . getCluster ( ) . getSelectedItem ( ) ) ) ; if ( cluster == null ) { return ; } double overCommitFactor = 100.0 / ( cluster.getmax_vds_memory_over_commit ( ) ) ; getModel ( ) . getMinAllocatedMemory ( ) . setEntity ( ( ( int ) ( ( ( java.lang.Integer ) ( getModel ( ) . getMemSize ( ) . getEntity ( ) ) ) * overCommitFactor ) ) ) ; }

Target:
public void updateMinAllocatedMemory ( ) { org.ovirt.engine.core.common.businessentities.VDSGroup cluster = ( ( org.ovirt.engine.core.common.businessentities.VDSGroup ) ( getModel ( ) . getSelectedCluster ( ) ) ) ; if ( cluster == null ) { return ; } double overCommitFactor = 100.0 / ( cluster.getmax_vds_memory_over_commit ( ) ) ; getModel ( ) . getMinAllocatedMemory ( ) . setEntity ( ( ( int ) ( ( ( java.lang.Integer ) ( getModel ( ) . getMemSize ( ) . getEntity ( ) ) ) * overCommitFactor ) ) ) ; }
Source:
public void getClustersHavingHosts ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Cluster > list = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Cluster > ) ( source ) ) ; java.util.Collections.sort ( list , new org.ovirt.engine.core.common.businessentities.comparators.NameableComparator ( ) ) ; return list ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Cluster > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllClustersHavingHosts , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }

Target:
public void getPermittedStorageDomainsByStoragePoolId ( org.ovirt.engine.ui.frontend.AsyncQuery < java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > > aQuery , org.ovirt.engine.core.compat.Guid dataCenterId , org.ovirt.engine.core.common.businessentities.ActionGroup actionGroup ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.ListConverter < > ( ) ; org.ovirt.engine.core.common.queries.GetPermittedStorageDomainsByStoragePoolIdParameters params = new org.ovirt.engine.core.common.queries.GetPermittedStorageDomainsByStoragePoolIdParameters ( ) ; params.setStoragePoolId ( dataCenterId ) ; params.setActionGroup ( actionGroup ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetPermittedStorageDomainsByStoragePoolId , params , aQuery ) ; }
Source:
private void passthroughProfileContainsSupportedPropertiesTest ( boolean passthrough , boolean portMirroring , org.ovirt.engine.core.compat.Guid qosId ) { org.mockito.Mockito.when ( vnicProfile.isPassthrough ( ) ) . thenReturn ( passthrough ) ; org.mockito.Mockito.when ( vnicProfile.isPortMirroring ( ) ) . thenReturn ( portMirroring ) ; org.mockito.Mockito.when ( vnicProfile.getNetworkQosId ( ) ) . thenReturn ( qosId ) ; }

Target:
private void passthroughProfileContainsSupportedPropertiesTest ( boolean passthrough , boolean portMirroring , org.ovirt.engine.core.compat.Guid qosId , org.ovirt.engine.core.compat.Guid networkFilterId ) { org.mockito.Mockito.when ( vnicProfile.isPassthrough ( ) ) . thenReturn ( passthrough ) ; org.mockito.Mockito.when ( vnicProfile.isPortMirroring ( ) ) . thenReturn ( portMirroring ) ; org.mockito.Mockito.when ( vnicProfile.getNetworkQosId ( ) ) . thenReturn ( qosId ) ; org.mockito.Mockito.when ( vnicProfile.getNetworkFilterId ( ) ) . thenReturn ( networkFilterId ) ; }
Source:
public void poolHasDefaultCluster ( ) { org.ovirt.engine.core.bll.storage.pool.UpdateStoragePoolCommandTest.mcr.mockConfigValue ( ConfigValues.AutoRegistrationDefaultVdsGroupID , org.ovirt.engine.core.bll.storage.pool.UpdateStoragePoolCommandTest.DEFAULT_VDS_GROUP_ID ) ; addDefaultClusterToPool ( ) ; storagePoolWithLocalFS ( ) ; org.mockito.Mockito.doReturn ( new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_STORAGE_POOL_WITH_DEFAULT_VDS_GROUP_CANNOT_BE_LOCALFS ) ) . when ( poolValidator ) . isNotLocalfsWithDefaultCluster ( ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( cmd , EngineMessage.ACTION_TYPE_FAILED_STORAGE_POOL_WITH_DEFAULT_VDS_GROUP_CANNOT_BE_LOCALFS ) ; }

Target:
public void poolHasDefaultCluster ( ) { org.ovirt.engine.core.bll.storage.pool.UpdateStoragePoolCommandTest.mcr.mockConfigValue ( ConfigValues.AutoRegistrationDefaultClusterID , org.ovirt.engine.core.bll.storage.pool.UpdateStoragePoolCommandTest.DEFAULT_CLUSTER_ID ) ; addDefaultClusterToPool ( ) ; storagePoolWithLocalFS ( ) ; org.mockito.Mockito.doReturn ( new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_STORAGE_POOL_WITH_DEFAULT_CLUSTER_CANNOT_BE_LOCALFS ) ) . when ( poolValidator ) . isNotLocalfsWithDefaultCluster ( ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( cmd , EngineMessage.ACTION_TYPE_FAILED_STORAGE_POOL_WITH_DEFAULT_CLUSTER_CANNOT_BE_LOCALFS ) ; }
Source:
public void testSimpleUpdate ( ) { org.ovirt.engine.core.common.scheduling.AffinityGroup existing = dao.get ( FixturesTool.EXISTING_AFFINITY_GROUP_ID ) ; existing.setName ( "my_new_name" ) ; existing.setPositive ( false ) ; existing.setEnforcing ( true ) ; dao.update ( existing ) ; org.ovirt.engine.core.common.scheduling.AffinityGroup fetched = dao.get ( existing.getId ( ) ) ; org.junit.Assert.assertEquals ( existing , fetched ) ; }

Target:
public void testSimpleUpdate ( ) { org.ovirt.engine.core.common.scheduling.AffinityGroup existing = dao.get ( FixturesTool.EXISTING_AFFINITY_GROUP_ID ) ; existing.setName ( "my_new_name" ) ; existing.setVmAffinityRule ( EntityAffinityRule.NEGATIVE ) ; existing.setVmEnforcing ( true ) ; dao.update ( existing ) ; org.ovirt.engine.core.common.scheduling.AffinityGroup fetched = dao.get ( existing.getId ( ) ) ; org.junit.Assert.assertTrue ( equals ( existing , fetched ) ) ; }
Source:
public 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.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterHooks , new org.ovirt.engine.core.common.queries.gluster.GlusterParameters ( clusterId ) , aQuery ) ; }

Target:
public void getGlusterHostsNewlyAdded ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId , boolean isFingerprintRequired ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAddedGlusterServers , new org.ovirt.engine.core.common.queries.gluster.AddedGlusterServersParameters ( clusterId , isFingerprintRequired ) , aQuery ) ; }
Source:
private void mockVdsGroup ( ) { vdsGroup = new org.ovirt.engine.core.common.businessentities.VDSGroup ( ) ; vdsGroup.setId ( clusterId ) ; vdsGroup.setStoragePoolId ( storagePoolId ) ; vdsGroup.setArchitecture ( ArchitectureType.x86_64 ) ; }

Target:
private void mockVdsGroup ( ) { vdsGroup = org.mockito.Mockito.mock ( org.ovirt.engine.core.common.businessentities.VDSGroup.class ) ; org.mockito.Mockito.doReturn ( clusterId ) . when ( vdsGroup ) . getId ( ) ; org.mockito.Mockito.doReturn ( storagePoolId ) . when ( vdsGroup ) . getStoragePoolId ( ) ; org.mockito.Mockito.doReturn ( ArchitectureType.x86_64 ) . when ( vdsGroup ) . getArchitecture ( ) ; org.mockito.Mockito.doReturn ( null ) . when ( vdsGroup ) . getcompatibility_version ( ) ; }
Source:
protected void executeQueryCommand ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.AuditLog > eventsList = org.ovirt.engine.core.bll.GetAllEventMessagesQuery.getDbFacade ( ) . getAuditLogDao ( ) . getAll ( org.ovirt.engine.core.bll.GetAllEventMessagesQuery.getUserID ( ) , org.ovirt.engine.core.bll.GetAllEventMessagesQuery.getParameters ( ) . isFiltered ( ) ) ; org.ovirt.engine.core.bll.GetAllEventMessagesQuery.getQueryReturnValue ( ) . setReturnValue ( eventsList ) ; }

Target:
protected void executeQueryCommand ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.AuditLog > eventsList = auditLogDao.getAll ( org.ovirt.engine.core.bll.GetAllEventMessagesQuery.getUserID ( ) , org.ovirt.engine.core.bll.GetAllEventMessagesQuery.getParameters ( ) . isFiltered ( ) ) ; org.ovirt.engine.core.bll.GetAllEventMessagesQuery.getQueryReturnValue ( ) . setReturnValue ( eventsList ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc fenceSpmStorage ( java.lang.String spUUID , int prevID , java.lang.String prevLVER ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.fenceSpmStorage ( spUUID , prevID , prevLVER ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }

Target:
public org.ovirt.engine.core.vdsbroker.gluster.GlusterHostsPubKeyReturnForXmlRpc glusterGeoRepKeysGet ( ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.glusterGeoRepKeysGet ( ) ; org.ovirt.engine.core.vdsbroker.gluster.GlusterHostsPubKeyReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.gluster.GlusterHostsPubKeyReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
Source:
public static void cancelRecoveryJob ( org.ovirt.engine.core.compat.Guid vdsId ) { java.lang.String jobId = org.ovirt.engine.core.vdsbroker.VdsManager.recoveringJobIdMap.remove ( vdsId ) ; if ( jobId != null ) { org.ovirt.engine.core.vdsbroker.VdsManager.log.infoFormat ( "Cancelling the recovery from crash timer for VDS {0} because vds started initializing" , vdsId ) ; try { org.ovirt.engine.core.utils.timer.SchedulerUtilQuartzImpl.getInstance ( ) . deleteJob ( jobId ) ; } catch ( java.lang.Exception e ) { org.ovirt.engine.core.vdsbroker.VdsManager.log.warnFormat ( "Failed deleting job {0} at cancelRecoveryJob" , jobId ) ; } } }

Target:
public static void cancelRecoveryJob ( org.ovirt.engine.core.compat.Guid vdsId ) { java.lang.String jobId = org.ovirt.engine.core.vdsbroker.VdsManager.recoveringJobIdMap.remove ( vdsId ) ; if ( jobId != null ) { org.ovirt.engine.core.vdsbroker.VdsManager.log.info ( "Cancelling the recovery from crash timer for VDS '{}' because vds started initializing" , vdsId ) ; try { org.ovirt.engine.core.utils.timer.SchedulerUtilQuartzImpl.getInstance ( ) . deleteJob ( jobId ) ; } catch ( java.lang.Exception e ) { org.ovirt.engine.core.vdsbroker.VdsManager.log.warn ( "Failed deleting job '{}' at cancelRecoveryJob: {}" , jobId , e.getMessage ( ) ) ; org.ovirt.engine.core.vdsbroker.VdsManager.log.debug ( "Exception" , e ) ; } } }
Source:
public static void getDefaultTimeZone ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.common.TimeZoneType timeZoneType ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { return source ; } return "" ; } } ; org.ovirt.engine.core.common.queries.TimeZoneQueryParams params = new org.ovirt.engine.core.common.queries.TimeZoneQueryParams ( ) ; params.setTimeZoneType ( timeZoneType ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetDefaultTimeZone , params , aQuery ) ; }

Target:
public void getAAAProfilesEntriesList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.Collection < org.ovirt.engine.core.aaa.ProfileEntry > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.aaa.ProfileEntry > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAAAProfileList , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }
Source:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs pcArgs = ( ( org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ) ( args ) ) ; if ( PropertyChangedEventArgs.Args.PROGRESS.toString ( ) . equals ( pcArgs.propertyName ) ) { if ( ( modelProvider.getModel ( ) . getProgress ( ) ) != null ) { if ( ( getTable ( ) ) != null ) { getTable ( ) . setLoadingState ( LoadingState.LOADING ) ; } } } }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs pcArgs = ( ( org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ) ( args ) ) ; if ( PropertyChangedEventArgs.PROGRESS.equals ( pcArgs.propertyName ) ) { if ( ( modelProvider.getModel ( ) . getProgress ( ) ) != null ) { com.google.gwt.core.client.Scheduler.get ( ) . scheduleDeferred ( new com.google.gwt.core.client.Scheduler.ScheduledCommand ( ) { @ java.lang.Override public void execute ( ) { if ( ( getTable ( ) ) != null ) { getTable ( ) . setLoadingState ( LoadingState.LOADING ) ; } } } ) ; } } }
Source:
protected void executeCommand ( ) { org.ovirt.engine.core.compat.Guid id = org.ovirt.engine.core.bll.aaa.RemoveGroupCommand.getParameters ( ) . getId ( ) ; for ( org.ovirt.engine.core.common.businessentities.Permission permission : permissionDao.getAllDirectPermissionsForAdElement ( id ) ) { org.ovirt.engine.core.common.action.PermissionsOperationsParameters param = new org.ovirt.engine.core.common.action.PermissionsOperationsParameters ( permission ) ; param.setSessionId ( org.ovirt.engine.core.bll.aaa.RemoveGroupCommand.getParameters ( ) . getSessionId ( ) ) ; runInternalActionWithTasksContext ( VdcActionType.RemovePermission , param ) ; } org.ovirt.engine.core.bll.aaa.RemoveGroupCommand.getAdGroupDao ( ) . remove ( id ) ; org.ovirt.engine.core.bll.aaa.RemoveGroupCommand.setSucceeded ( true ) ; }

Target:
protected void executeCommand ( ) { org.ovirt.engine.core.compat.Guid id = org.ovirt.engine.core.bll.aaa.RemoveGroupCommand.getParameters ( ) . getId ( ) ; for ( org.ovirt.engine.core.common.businessentities.Permission permission : permissionDao.getAllDirectPermissionsForAdElement ( id ) ) { org.ovirt.engine.core.common.action.PermissionsOperationsParameters param = new org.ovirt.engine.core.common.action.PermissionsOperationsParameters ( permission ) ; param.setSessionId ( org.ovirt.engine.core.bll.aaa.RemoveGroupCommand.getParameters ( ) . getSessionId ( ) ) ; runInternalActionWithTasksContext ( VdcActionType.RemovePermission , param ) ; } dbGroupDao.remove ( id ) ; org.ovirt.engine.core.bll.aaa.RemoveGroupCommand.setSucceeded ( true ) ; }
Source:
public void testEmptyVms ( ) { org.ovirt.engine.core.common.businessentities.VM srcVm = createEmptyVm ( ) ; org.ovirt.engine.core.common.businessentities.VM dstVm = createEmptyVm ( ) ; org.mockito.Mockito.when ( getQueryParameters ( ) . getOriginal ( ) ) . thenReturn ( srcVm ) ; org.mockito.Mockito.when ( getQueryParameters ( ) . getUpdated ( ) ) . thenReturn ( dstVm ) ; getQuery ( ) . executeQueryCommand ( ) ; org.junit.Assert.assertTrue ( ( ( java.util.List < java.lang.String > ) ( getQuery ( ) . getQueryReturnValue ( ) . getReturnValue ( ) ) ) . isEmpty ( ) ) ; }

Target:
public void testEmptyVms ( ) { org.ovirt.engine.core.common.businessentities.VM srcVm = createEmptyVm ( ) ; org.ovirt.engine.core.common.businessentities.VM dstVm = createEmptyVm ( ) ; org.mockito.Mockito.when ( getQueryParameters ( ) . getOriginal ( ) ) . thenReturn ( srcVm ) ; org.mockito.Mockito.when ( getQueryParameters ( ) . getUpdated ( ) ) . thenReturn ( dstVm ) ; getQuery ( ) . executeQueryCommand ( ) ; org.junit.jupiter.api.Assertions.assertTrue ( ( ( java.util.List < java.lang.String > ) ( getQuery ( ) . getQueryReturnValue ( ) . getReturnValue ( ) ) ) . isEmpty ( ) ) ; }
Source:
public java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.vms.ConsoleModel > GetConsoleModelsByVmGuid ( org.ovirt.engine.core.compat.Guid vmGuid ) { if ( ( ( cachedConsoleModels ) != null ) && ( cachedConsoleModels.containsKey ( vmGuid ) ) ) { return cachedConsoleModels.get ( vmGuid ) ; } return null ; }

Target:
private org.ovirt.engine.ui.uicommonweb.models.vms.ConsoleModel resolveUserSelectedConsoleModel ( org.ovirt.engine.core.compat.Guid vmId ) { if ( ! ( cachedConsoleModels.containsKey ( vmId ) ) ) { return null ; } for ( org.ovirt.engine.ui.uicommonweb.models.vms.ConsoleModel model : cachedConsoleModels.get ( vmId ) ) { if ( model.isUserSelected ( ) ) { return model ; } } return null ; }
Source:
public static void getVmList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String poolName ) { 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 ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VM > vms = org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.VM > cast ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.IVdcQueryable > ) ( source ) ) ) ; return vms ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( ( "Vms: pool=" + poolName ) , org.ovirt.engine.core.common.interfaces.SearchType.VM ) , aQuery ) ; }

Target:
public void getVmListByClusterName ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String clusterName ) { 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 ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VM > vms = org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.VM > cast ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.IVdcQueryable > ) ( source ) ) ) ; return vms ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( ( "Vms: cluster=" + clusterName ) , org.ovirt.engine.core.common.interfaces.SearchType.VM ) , aQuery ) ; }
Source:
private boolean isCopyCollapseDisabledWithSnapshots ( ) { return ( ( getParameters ( ) . getVm ( ) . getSnapshots ( ) . size ( ) ) > 1 ) && ( ! ( getParameters ( ) . getCopyCollapse ( ) ) ) ; }

Target:
private boolean isCopyCollapseDisabledWithSnapshotsOrWithTemplate ( ) { return ( ( ( getParameters ( ) . getVm ( ) . getSnapshots ( ) . size ( ) ) > 1 ) || ( ( ! ( VmTemplateHandler.BLANK_VM_TEMPLATE_ID.equals ( org.ovirt.engine.core.bll.ImportVmCommand.getVm ( ) . getVmtGuid ( ) ) ) ) && ( ( org.ovirt.engine.core.bll.ImportVmCommand.getVmTemplate ( ) ) != null ) ) ) && ( ! ( getParameters ( ) . getCopyCollapse ( ) ) ) ; }
Source:
public boolean hasSpiceSupport ( int osId , org.ovirt.engine.core.compat.Version version ) { java.util.List < org.ovirt.engine.core.common.businessentities.DisplayType > osDisplayTypes = getDisplayTypes ( osId , version ) ; return osDisplayTypes == null ? false : osDisplayTypes.contains ( DisplayType.qxl ) ; }

Target:
public boolean hasSpiceSupport ( int osId , org.ovirt.engine.core.compat.Version version ) { for ( org.ovirt.engine.core.common.utils.Pair < org.ovirt.engine.core.common.businessentities.GraphicsType , org.ovirt.engine.core.common.businessentities.DisplayType > graphicsDisplayPair : getGraphicsAndDisplays ( osId , version ) ) { if ( ( graphicsDisplayPair.getFirst ( ) ) == ( org.ovirt.engine.core.common.businessentities.GraphicsType.SPICE ) ) { return true ; } } return false ; }
Source:
private org.ovirt.engine.core.common.action.VdcReturnValueBase runAsyncTask ( org.ovirt.engine.core.common.action.VdcActionType taskType , org.ovirt.engine.core.common.action.ImagesContainterParametersBase params ) { org.ovirt.engine.core.common.action.VdcReturnValueBase returnValue ; params.setEntityInfo ( org.ovirt.engine.core.bll.RestoreAllSnapshotsCommand.getParameters ( ) . getEntityInfo ( ) ) ; params.setParentCommand ( org.ovirt.engine.core.bll.RestoreAllSnapshotsCommand.getActionType ( ) ) ; params.setParentParameters ( org.ovirt.engine.core.bll.RestoreAllSnapshotsCommand.getParameters ( ) ) ; params.setCommandType ( taskType ) ; returnValue = runInternalAction ( taskType , params , org.ovirt.engine.core.bll.job.ExecutionHandler.createDefaultContexForTasks ( org.ovirt.engine.core.bll.RestoreAllSnapshotsCommand.getExecutionContext ( ) ) ) ; org.ovirt.engine.core.bll.RestoreAllSnapshotsCommand.getTaskIdList ( ) . addAll ( returnValue.getInternalVdsmTaskIdList ( ) ) ; return returnValue ; }

Target:
private org.ovirt.engine.core.common.action.VdcReturnValueBase runAsyncTask ( org.ovirt.engine.core.common.action.VdcActionType taskType , org.ovirt.engine.core.common.action.ImagesContainterParametersBase params ) { org.ovirt.engine.core.common.action.VdcReturnValueBase returnValue ; params.setEntityInfo ( org.ovirt.engine.core.bll.RestoreAllSnapshotsCommand.getParameters ( ) . getEntityInfo ( ) ) ; params.setParentCommand ( org.ovirt.engine.core.bll.RestoreAllSnapshotsCommand.getActionType ( ) ) ; params.setParentParameters ( org.ovirt.engine.core.bll.RestoreAllSnapshotsCommand.getParameters ( ) ) ; params.setCommandType ( taskType ) ; returnValue = runInternalActionWithTasksContext ( taskType , params ) ; org.ovirt.engine.core.bll.RestoreAllSnapshotsCommand.getTaskIdList ( ) . addAll ( returnValue.getInternalVdsmTaskIdList ( ) ) ; return returnValue ; }