auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void updateJobLastUpdateTime ( org.ovirt.engine.core.compat.Guid jobId , java.util.Date lastUpdateTime ) { org.ovirt.engine.core.common.job.Job job = get ( jobId ) ; job.setLastUpdateTime ( lastUpdateTime ) ; update ( job ) ; }

Target:
public java.util.List < org.ovirt.engine.core.common.job.Job > getJobsByOffsetAndPageSize ( int offset , int pageSize ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) . addValue ( "position" , offset ) . addValue ( "page_size" , pageSize ) ; return getCallsHandler ( ) . executeReadList ( "GetJobsByOffsetAndPageSize" , createEntityRowMapper ( ) , parameterSource ) ; }
Source:
public static void GetClusterNetworkList ( 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 ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Network > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllNetworksByClusterId , new org.ovirt.engine.core.common.queries.VdsGroupQueryParamenters ( clusterId ) , aQuery ) ; }

Target:
public static void GetStorageDomainById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storageDomainId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( org.ovirt.engine.core.common.businessentities.storage_domains ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetStorageDomainById , new org.ovirt.engine.core.common.queries.StorageDomainQueryParametersBase ( storageDomainId ) , aQuery ) ; }
Source:
public void qosCommitmentMissingNicSpeed ( ) { org.ovirt.engine.core.bll.network.host.SetupNetworksHelper helper = qosCommitmentNicSetup ( ( ( org.ovirt.engine.core.bll.network.host.SetupNetworksHelperTest.DEFAULT_SPEED ) / 2 ) , null ) ; validateAndExpectViolation ( helper , EngineMessage.ACTION_TYPE_FAILED_HOST_NETWORK_QOS_INVALID_INTERFACE_SPEED , org.ovirt.engine.core.bll.network.host.SetupNetworksHelperTest.BOND_NAME ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { effectiveHostNetworkQos = new org.ovirt.engine.core.vdsbroker.EffectiveHostNetworkQos ( qosDao ) ; injectorRule.bind ( org.ovirt.engine.core.dao.network.NetworkDao.class , networkDao ) ; injectorRule.bind ( org.ovirt.engine.core.dao.network.NetworkAttachmentDao.class , networkAttachmentDao ) ; injectorRule.bind ( org.ovirt.engine.core.dao.network.InterfaceDao.class , interfaceDao ) ; injectorRule.bind ( org.ovirt.engine.core.dao.gluster.GlusterBrickDao.class , brickDao ) ; injectorRule.bind ( org.ovirt.engine.core.vdsbroker.EffectiveHostNetworkQos.class , effectiveHostNetworkQos ) ; injectorRule.bind ( org.ovirt.engine.core.vdsbroker.NetworkImplementationDetailsUtils.class , new org.ovirt.engine.core.vdsbroker.NetworkImplementationDetailsUtils ( effectiveHostNetworkQos , networkAttachmentDao , calculateBaseNic ) ) ; injectorRule.bind ( org.ovirt.engine.core.vdsbroker.CalculateBaseNic.class , calculateBaseNic ) ; }
Source:
private void mockVdsGroupDAO ( ) { org.mockito.Mockito.doReturn ( vdsGroupDAO ) . when ( command ) . getVdsGroupDAO ( ) ; org.mockito.Mockito.when ( vdsGroupDAO.get ( vdsGroupId ) ) . thenReturn ( vdsGroup ) ; }

Target:
private void mockVdsGroupDAO ( ) { org.mockito.Mockito.doReturn ( vdsGroupDAO ) . when ( command ) . getVdsGroupDAO ( ) ; org.mockito.Mockito.when ( vdsGroupDAO.get ( vdsGroupId ) ) . thenReturn ( vdsGroup ) ; org.mockito.Mockito.when ( vdsGroupDAO.getFromCache ( vdsGroupId ) ) . thenReturn ( vdsGroup ) ; }
Source:
protected void verify ( org.ovirt.engine.api.model.GlusterBrick model , org.ovirt.engine.api.model.GlusterBrick transform ) { assertNotNull ( transform ) ; assertNotNull ( transform.getServerId ( ) ) ; assertEquals ( model.getServerId ( ) , transform.getServerId ( ) ) ; assertNotNull ( transform.getBrickDir ( ) ) ; assertEquals ( model.getBrickDir ( ) , transform.getBrickDir ( ) ) ; }

Target:
protected void verify ( org.ovirt.engine.api.model.GlusterBrick model , org.ovirt.engine.api.model.GlusterBrick transform ) { org.junit.Assert.assertNotNull ( transform ) ; org.junit.Assert.assertNotNull ( transform.getServerId ( ) ) ; org.junit.Assert.assertEquals ( model.getServerId ( ) , transform.getServerId ( ) ) ; org.junit.Assert.assertNotNull ( transform.getBrickDir ( ) ) ; org.junit.Assert.assertEquals ( model.getBrickDir ( ) , transform.getBrickDir ( ) ) ; }
Source:
static java.util.function.Predicate < org.ovirt.api.metamodel.concepts.Named > named ( org.ovirt.api.metamodel.concepts.Name name ) { return ( x ) -> java.util.Objects.equals ( x.getName ( ) , name ) ; }

Target:
static boolean namesEqual ( org.ovirt.api.metamodel.concepts.Name name1 , org.ovirt.api.metamodel.concepts.Named name2 ) { if ( name1 != null ) { java.lang.String firstWord = name1.getWords ( ) . get ( 0 ) ; if ( firstWord.startsWith ( "_" ) ) { name1.setWord ( 0 , firstWord.substring ( 1 , firstWord.length ( ) ) ) ; } } return java.util.Objects.equals ( name2.getName ( ) , name1 ) ; }
Source:
protected org.ovirt.engine.core.common.vdscommands.VDSParametersBase getVDSParameters ( ) { return new org.ovirt.engine.core.common.vdscommands.DeleteImageGroupVDSCommandParameters ( getEnclosingCommand ( ) . getParameters ( ) . getStoragePoolId ( ) . getValue ( ) , getEnclosingCommand ( ) . getParameters ( ) . getSourceStorageDomainId ( ) , getEnclosingCommand ( ) . getParameters ( ) . getImageGroupID ( ) , org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getDiskImageDao ( ) . get ( getEnclosingCommand ( ) . getParameters ( ) . getImageGroupID ( ) ) . isWipeAfterDelete ( ) , getEnclosingCommand ( ) . getParameters ( ) . getForceDelete ( ) , null ) ; }

Target:
protected org.ovirt.engine.core.common.vdscommands.VDSParametersBase getVDSParameters ( ) { return new org.ovirt.engine.core.common.vdscommands.DeleteImageGroupVDSCommandParameters ( getEnclosingCommand ( ) . getParameters ( ) . getStoragePoolId ( ) . getValue ( ) , getEnclosingCommand ( ) . getParameters ( ) . getSourceStorageDomainId ( ) , getEnclosingCommand ( ) . getParameters ( ) . getImageGroupID ( ) , org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getDiskImageDao ( ) . get ( getEnclosingCommand ( ) . getParameters ( ) . getDestinationImageId ( ) ) . isWipeAfterDelete ( ) , getEnclosingCommand ( ) . getParameters ( ) . getForceDelete ( ) , null ) ; }
Source:
static org.ovirt.engine.core.common.businessentities.VM setUpStatisticalEntityExpectations ( org.ovirt.engine.api.restapi.resource.VM entity , org.ovirt.engine.core.common.businessentities.VmStatistics statistics ) { entity.setVmMemSizeMb ( 10 ) ; entity.setStatisticsData ( statistics ) ; statistics.setusage_mem_percent ( 20 ) ; statistics.setcpu_user ( 30.0 ) ; statistics.setcpu_sys ( 40.0 ) ; statistics.setusage_cpu_percent ( 50 ) ; entity.setMigrationProgressPercent ( 50 ) ; entity.setGuestMemoryFree ( 5120L ) ; entity.setGuestMemoryBuffered ( 2048L ) ; entity.setGuestMemoryCached ( 1024L ) ; return entity ; }

Target:
static org.ovirt.engine.core.common.businessentities.VM setUpStatisticalEntityExpectations ( org.ovirt.engine.api.restapi.resource.VM entity , org.ovirt.engine.core.common.businessentities.VmStatistics statistics ) { entity.setVmMemSizeMb ( 10 ) ; entity.setStatisticsData ( statistics ) ; statistics.setUsageMemPercent ( 20 ) ; statistics.setCpuUser ( 30.0 ) ; statistics.setCpuSys ( 40.0 ) ; statistics.setUsageCpuPercent ( 50 ) ; entity.setMigrationProgressPercent ( 50 ) ; entity.setGuestMemoryFree ( 5120L ) ; entity.setGuestMemoryBuffered ( 2048L ) ; entity.setGuestMemoryCached ( 1024L ) ; return entity ; }
Source:
protected org.ovirt.engine.core.common.businessentities.VmTemplate getVmTemplateEntity ( int index ) { org.ovirt.engine.core.common.businessentities.VmTemplate vm = org.ovirt.engine.api.restapi.resource.BackendTemplatesResourceTest.setUpEntityExpectations ( control.createMock ( org.ovirt.engine.core.common.businessentities.VmTemplate.class ) , index ) ; org.easymock.EasyMock.expect ( vm.getDiskMap ( ) ) . andReturn ( getDiskMap ( ) ) . anyTimes ( ) ; return vm ; }

Target:
protected org.ovirt.engine.core.common.businessentities.VmTemplate getVmTemplateEntity ( int index ) { org.ovirt.engine.core.common.businessentities.VmTemplate vm = org.ovirt.engine.api.restapi.resource.BackendTemplatesResourceTest.setUpEntityExpectations ( control.createMock ( org.ovirt.engine.core.common.businessentities.VmTemplate.class ) , index ) ; org.easymock.EasyMock.expect ( vm.getDiskTemplateMap ( ) ) . andReturn ( getDiskMap ( ) ) . anyTimes ( ) ; return vm ; }
Source:
public javax.ws.rs.core.Response add ( org.ovirt.engine.api.model.Vm vm ) { org.ovirt.engine.core.common.scheduling.AffinityGroup affinityGroup = getEntity ( ) ; affinityGroup.getEntityIds ( ) . add ( asGuid ( vm.getId ( ) ) ) ; return performAction ( VdcActionType.EditAffinityGroup , new org.ovirt.engine.core.common.scheduling.parameters.AffinityGroupCRUDParameters ( affinityGroup.getId ( ) , affinityGroup ) ) ; }

Target:
public javax.ws.rs.core.Response add ( org.ovirt.engine.api.model.Vm vm ) { org.ovirt.engine.core.common.scheduling.AffinityGroup affinityGroup = getEntity ( ) ; affinityGroup.getVmIds ( ) . add ( asGuid ( vm.getId ( ) ) ) ; return performAction ( VdcActionType.EditAffinityGroup , new org.ovirt.engine.core.common.scheduling.parameters.AffinityGroupCRUDParameters ( affinityGroup.getId ( ) , affinityGroup ) ) ; }
Source:
public void updateCommandStatus ( org.ovirt.engine.core.compat.Guid commandId , org.ovirt.engine.core.common.asynctasks.AsyncTaskType taskType , org.ovirt.engine.core.compat.CommandStatus status ) { org.ovirt.engine.core.common.businessentities.CommandEntity cmdEntity = get ( commandId ) ; if ( cmdEntity != null ) { cmdEntity.setCommandStatus ( status ) ; if ( taskType.equals ( AsyncTaskType.notsupported ) ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getCommandEntityDao ( ) . saveOrUpdate ( cmdEntity ) ; } } }

Target:
public void updateCommandStatus ( org.ovirt.engine.core.compat.Guid commandId , org.ovirt.engine.core.common.asynctasks.AsyncTaskType taskType , org.ovirt.engine.core.compat.CommandStatus status ) { org.ovirt.engine.core.common.businessentities.CommandEntity cmdEntity = get ( commandId ) ; if ( cmdEntity != null ) { cmdEntity.setCommandStatus ( status ) ; if ( taskType.equals ( AsyncTaskType.notSupported ) ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getCommandEntityDao ( ) . saveOrUpdate ( cmdEntity ) ; } } }
Source:
public javax.ws.rs.core.Response remove ( ) { org.ovirt.engine.api.model.StorageDomain storageDomain = get ( ) ; if ( storageDomain.getStorage ( ) . getType ( ) . equals ( StorageType.LOCALFS ) ) { org.ovirt.engine.core.common.action.RemoveStorageDomainParameters params = new org.ovirt.engine.core.common.action.RemoveStorageDomainParameters ( guid ) ; params.setDoFormat ( true ) ; return performAction ( VdcActionType.RemoveStorageDomain , params ) ; } else { org.ovirt.engine.core.common.action.DetachStorageDomainFromPoolParameters params = new org.ovirt.engine.core.common.action.DetachStorageDomainFromPoolParameters ( guid , dataCenterId ) ; return performAction ( VdcActionType.DetachStorageDomainFromPool , params ) ; } }

Target:
public javax.ws.rs.core.Response remove ( ) { org.ovirt.engine.api.model.StorageDomain storageDomain = get ( ) ; if ( storageDomain.getStorage ( ) . getType ( ) . equals ( StorageType.LOCALFS ) ) { org.ovirt.engine.core.common.action.RemoveStorageDomainParameters params = new org.ovirt.engine.core.common.action.RemoveStorageDomainParameters ( guid ) ; params.setDoFormat ( true ) ; return performAction ( ActionType.RemoveStorageDomain , params ) ; } else { org.ovirt.engine.core.common.action.DetachStorageDomainFromPoolParameters params = new org.ovirt.engine.core.common.action.DetachStorageDomainFromPoolParameters ( guid , dataCenterId ) ; return performAction ( ActionType.DetachStorageDomainFromPool , params ) ; } }
Source:
public void isVmNameUnique ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String name , org.ovirt.engine.core.compat.Guid datacenterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ! ( ( ( java.lang.Boolean ) ( source ) ) . booleanValue ( ) ) : false ; } } ; org.ovirt.engine.core.common.queries.NameQueryParameters params = new org.ovirt.engine.core.common.queries.NameQueryParameters ( name ) ; params.setDatacenterId ( datacenterId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.IsVmWithSameNameExist , params , aQuery ) ; }

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

Target:
public void getClusterList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , boolean doRefresh ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.SortListByNameConverter < > ( ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllClusters , ( doRefresh ? new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) : new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) . withoutRefresh ( ) ) , aQuery ) ; }
Source:
public static void enableLoadBalancer ( ) { if ( org.ovirt.engine.core.common.config.Config.< java.lang.Boolean > getValue ( ConfigValues.EnableVdsLoadBalancing ) ) { org.ovirt.engine.core.bll.scheduling.SchedulingManager.log.info ( "Start scheduling to enable vds load balancer" ) ; org.ovirt.engine.core.utils.timer.SchedulerUtilQuartzImpl.getInstance ( ) . scheduleAFixedDelayJob ( org.ovirt.engine.core.bll.scheduling.SchedulingManager.instance , "performLoadBalancing" , new java.lang.Class [ ] { } , new java.lang.Object [ ] { } , org.ovirt.engine.core.common.config.Config.< java.lang.Integer > getValue ( ConfigValues.VdsLoadBalancingIntervalInMinutes ) , org.ovirt.engine.core.common.config.Config.< java.lang.Integer > getValue ( ConfigValues.VdsLoadBalancingIntervalInMinutes ) , java.util.concurrent.TimeUnit.MINUTES ) ; org.ovirt.engine.core.bll.scheduling.SchedulingManager.log.info ( "Finished scheduling to enable vds load balancer" ) ; } }

Target:
public static void enableHaReservationCheck ( ) { if ( org.ovirt.engine.core.common.config.Config.< java.lang.Boolean > getValue ( ConfigValues.EnableVdsLoadBalancing ) ) { org.ovirt.engine.core.bll.scheduling.SchedulingManager.log.info ( "Start HA Reservation check" ) ; java.lang.Integer interval = org.ovirt.engine.core.common.config.Config.< java.lang.Integer > getValue ( ConfigValues.VdsHaReservationIntervalInMinutes ) ; org.ovirt.engine.core.di.Injector.get ( org.ovirt.engine.core.utils.timer.SchedulerUtilQuartzImpl.class ) . scheduleAFixedDelayJob ( org.ovirt.engine.core.bll.scheduling.SchedulingManager.instance , "performHaResevationCheck" , new java.lang.Class [ ] { } , new java.lang.Object [ ] { } , interval , interval , java.util.concurrent.TimeUnit.MINUTES ) ; org.ovirt.engine.core.bll.scheduling.SchedulingManager.log.info ( "Finished HA Reservation check" ) ; } }
Source:
public void eventRaised ( org.ovirt.engine.core.compat.Event ev , java.lang.Object sender , org.ovirt.engine.core.compat.EventArgs args ) { OnPropertyChanged ( new org.ovirt.engine.core.compat.PropertyChangedEventArgs ( org.ovirt.engine.ui.uicommonweb.models.vms.ImportVmModel.ON_DISK_LOAD ) ) ; }

Target:
protected void postInitDisks ( ) { onDataLoad ( ) ; checkDestFormatCompatibility ( ) ; StopProgress ( ) ; getStorage ( ) . getSelectedItemChangedEvent ( ) . addListener ( new org.ovirt.engine.core.compat.IEventListener ( ) { @ java.lang.Override public void eventRaised ( org.ovirt.engine.core.compat.Event ev , java.lang.Object sender , org.ovirt.engine.core.compat.EventArgs args ) { onDataLoad ( ) ; } } ) ; }
Source:
protected void setUpGetCertificateInfo ( ) throws java.lang.Exception { setUpGetEntityExpectations ( VdcQueryType.GetVdsCertificateSubjectByVdsId , org.ovirt.engine.core.common.queries.GetVdsByVdsIdParameters.class , new java.lang.String [ ] { "VdsId" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , BackendHostsResourceTest.CERTIFICATE_SUBJECT ) ; }

Target:
private void setUpGetEntityWithNoCertificateInfoExpectations ( int times , boolean notFound , org.ovirt.engine.core.common.businessentities.VDS entity ) throws java.lang.Exception { while ( ( times -- ) > 0 ) { setUpGetEntityExpectations ( VdcQueryType.GetVdsByVdsId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , ( notFound ? null : entity ) ) ; } }
Source:
public void testGetAllForCluster ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.VnicProfileView > result = dao.getAllForCluster ( FixturesTool.CLUSTER ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertFalse ( result.isEmpty ( ) ) ; final java.util.Set < org.ovirt.engine.core.compat.Guid > clusterNetworkIds = findClusterNetworkIds ( FixturesTool.CLUSTER ) ; for ( org.ovirt.engine.core.common.businessentities.network.VnicProfileView profile : result ) { org.junit.Assert.assertTrue ( clusterNetworkIds.contains ( profile.getNetworkId ( ) ) ) ; } }

Target:
public void testGetAllForCluster ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.VnicProfileView > result = dao.getAllForCluster ( FixturesTool.CLUSTER ) ; org.junit.jupiter.api.Assertions.assertNotNull ( result ) ; org.junit.jupiter.api.Assertions.assertFalse ( result.isEmpty ( ) ) ; final java.util.Set < org.ovirt.engine.core.compat.Guid > clusterNetworkIds = findClusterNetworkIds ( FixturesTool.CLUSTER ) ; for ( org.ovirt.engine.core.common.businessentities.network.VnicProfileView profile : result ) { org.junit.jupiter.api.Assertions.assertTrue ( clusterNetworkIds.contains ( profile.getNetworkId ( ) ) ) ; } }
Source:
public void postDataCenterWithClusterSelectedItemChanged ( ) { updateDefaultHost ( ) ; updateCustomPropertySheet ( ) ; updateNumOfSockets ( ) ; updateQuotaByCluster ( vm.getQuotaId ( ) , vm.getQuotaName ( ) ) ; updateCpuPinningVisibility ( ) ; initNetworkInterfaces ( ) ; }

Target:
public void postDataCenterWithClusterSelectedItemChanged ( ) { updateDefaultHost ( ) ; updateCustomPropertySheet ( ) ; updateNumOfSockets ( ) ; updateQuotaByCluster ( vm.getQuotaId ( ) , vm.getQuotaName ( ) ) ; updateCpuPinningVisibility ( ) ; updateMemoryBalloon ( ) ; updateCpuSharesAvailability ( ) ; updateNetworkInterfaces ( networkBehavior , networkInerfaces ) ; }
Source:
public static 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.RunQuery ( VdcQueryType.GetAddedGlusterServers , new org.ovirt.engine.core.common.queries.gluster.AddedGlusterServersParameters ( clusterId , isFingerprintRequired ) , aQuery ) ; }

Target:
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.core.common.config.Config.DefaultConfigurationVersion ) , aQuery ) ; }
Source:
public void testImplicitNoFilter ( ) { getQuery ( ) . executeQueryCommand ( ) ; org.junit.Assert.assertTrue ( "Wrong filtered domains" , org.apache.commons.collections.CollectionUtils.isEqualCollection ( ( ( java.util.Collection < java.lang.String > ) ( getQuery ( ) . getQueryReturnValue ( ) . getReturnValue ( ) ) ) , java.util.Arrays.asList ( "aaa" , "internal" , "zzz" ) ) ) ; }

Target:
public void test ( ) { getQuery ( ) . executeQueryCommand ( ) ; org.junit.Assert.assertTrue ( "Wrong filtered domains" , org.apache.commons.collections.CollectionUtils.isEqualCollection ( ( ( java.util.Collection < java.lang.String > ) ( getQuery ( ) . getQueryReturnValue ( ) . getReturnValue ( ) ) ) , java.util.Arrays.asList ( "aaa" , "internal" , "zzz" ) ) ) ; }
Source:
public void score ( ) throws org.apache.xmlrpc.XmlRpcException { java.lang.Object [ ] sentObject = new java.lang.Object [ 4 ] ; sentObject [ 0 ] = new java.lang.Object [ ] { new java.lang.Object [ ] { org.ovirt.schedulerproxy.SchedulerProxy.FILE_NAME , 2 } } ; sentObject [ 1 ] = org.ovirt.schedulerproxy.SchedulerProxy.HOSTS_EXAMPLE ; sentObject [ 2 ] = org.ovirt.schedulerproxy.SchedulerProxy.VM_EXAMPLE ; sentObject [ 3 ] = "" ; java.lang.Object execute = client.execute ( "runCostFunctions" , sentObject ) ; java.lang.System.out.println ( parseScoreResults ( execute ) ) ; }

Target:
public java.util.List < java.lang.String > filter ( java.lang.String [ ] filterNames , java.lang.String [ ] HostID , java.lang.String vmID , java.lang.String args ) throws org.apache.xmlrpc.XmlRpcException { java.lang.Object [ ] sentObject = new java.lang.Object [ 4 ] ; sentObject [ 0 ] = filterNames ; sentObject [ 1 ] = HostID ; sentObject [ 2 ] = vmID ; sentObject [ 3 ] = args ; java.lang.Object execute = client.execute ( "runFilters" , sentObject ) ; return parseFilterResult ( execute ) ; }
Source:
public void canDoActionFailsWithForceNotSupported ( ) { org.ovirt.engine.core.common.action.gluster.CreateGlusterVolumeParameters parameters = new org.ovirt.engine.core.common.action.gluster.CreateGlusterVolumeParameters ( getVolume ( 2 , true ) , true ) ; org.ovirt.engine.core.bll.gluster.CreateGlusterVolumeCommand command = new org.ovirt.engine.core.bll.gluster.CreateGlusterVolumeCommand ( parameters ) ; cmd = org.mockito.Mockito.spy ( command ) ; prepareMocks ( cmd ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( cmd , VdcBllMessages.ACTION_TYPE_FAILED_GLUSTER_VOLUME_ADD_BRICK_FORCE_NOT_SUPPORTED ) ; }

Target:
public void canDoActionFailsWithForceNotSupported ( ) { org.ovirt.engine.core.common.action.gluster.CreateGlusterVolumeParameters parameters = new org.ovirt.engine.core.common.action.gluster.CreateGlusterVolumeParameters ( getVolume ( 2 , true ) , true ) ; org.ovirt.engine.core.bll.gluster.CreateGlusterVolumeCommand command = new org.ovirt.engine.core.bll.gluster.CreateGlusterVolumeCommand ( parameters ) ; cmd = org.mockito.Mockito.spy ( command ) ; prepareMocks ( cmd ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( cmd , EngineMessage.ACTION_TYPE_FAILED_GLUSTER_VOLUME_ADD_BRICK_FORCE_NOT_SUPPORTED ) ; }
Source:
protected org.ovirt.engine.core.common.action.VdcReturnValueBase evaluateCorrelationId ( org.ovirt.engine.core.bll.CommandBase < ? > commandBase ) { org.ovirt.engine.core.common.action.VdcReturnValueBase returnValue = null ; returnValue = org.ovirt.engine.core.bll.job.ExecutionHandler.evaluateCorrelationId ( commandBase.getParameters ( ) ) ; if ( returnValue != null ) { org.ovirt.engine.core.bll.Backend.log.warnFormat ( "CanDoAction of action {0} failed. Reasons: {1}" , commandBase.getActionType ( ) , org.apache.commons.lang.StringUtils.join ( returnValue.getCanDoActionMessages ( ) , ',' ) ) ; } commandBase.setCorrelationId ( commandBase.getParameters ( ) . getCorrelationId ( ) ) ; return returnValue ; }

Target:
protected org.ovirt.engine.core.common.action.VdcReturnValueBase evaluateCorrelationId ( org.ovirt.engine.core.bll.CommandBase < ? > commandBase ) { org.ovirt.engine.core.common.action.VdcReturnValueBase returnValue = null ; returnValue = org.ovirt.engine.core.bll.job.ExecutionHandler.evaluateCorrelationId ( commandBase.getParameters ( ) ) ; if ( returnValue != null ) { org.ovirt.engine.core.bll.Backend.log.warn ( "CanDoAction of action '{}' failed. Reasons: {}" , commandBase.getActionType ( ) , org.apache.commons.lang.StringUtils.join ( returnValue.getCanDoActionMessages ( ) , ',' ) ) ; } commandBase.setCorrelationId ( commandBase.getParameters ( ) . getCorrelationId ( ) ) ; return returnValue ; }
Source:
public void render ( com.google.gwt.cell.client.Cell.Context context , com.google.gwt.safehtml.shared.SafeHtmlBuilder sb ) { super . render ( context , sb ) ; sb.append ( org.ovirt.engine.ui.webadmin.section.main.view.popup.provider.ImportNetworksPopupView.templates.tableHeaderInlineImage ( com.google.gwt.safehtml.shared.SafeHtmlUtils.fromTrustedString ( com.google.gwt.user.client.ui.AbstractImagePrototype.create ( org.ovirt.engine.ui.webadmin.section.main.view.popup.provider.ImportNetworksPopupView.resources.dialogIconHelp ( ) ) . getHTML ( ) ) ) ) ; }

Target:
public void render ( com.google.gwt.cell.client.Cell.Context context , com.google.gwt.safehtml.shared.SafeHtmlBuilder sb ) { super . render ( context , sb ) ; sb.append ( org.ovirt.engine.ui.webadmin.section.main.view.popup.provider.ImportNetworksPopupView.templates.tableHeaderInlineImage ( com.google.gwt.safehtml.shared.SafeHtmlUtils.fromTrustedString ( new org.ovirt.engine.ui.common.widget.dialog.InfoIcon ( com.google.gwt.safehtml.shared.SafeHtmlUtils.EMPTY_SAFE_HTML ) . toString ( ) ) ) ) ; }
Source:
public static void getStorageDomainsByConnection ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , java.lang.String connectionPath ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ) ( source ) ) : null ; } } ; org.ovirt.engine.core.common.queries.GetStorageDomainsByConnectionParameters param = new org.ovirt.engine.core.common.queries.GetStorageDomainsByConnectionParameters ( ) ; param.setConnection ( connectionPath ) ; if ( storagePoolId != null ) { param.setStoragePoolId ( storagePoolId ) ; } org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageDomainsByConnection , param , aQuery ) ; }

Target:
public void getExistingStorageDomainList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hostId , org.ovirt.engine.core.common.businessentities.StorageDomainType domainType , org.ovirt.engine.core.common.businessentities.StorageType storageType , java.lang.String path ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetExistingStorageDomainList , new org.ovirt.engine.core.common.queries.GetExistingStorageDomainListParameters ( hostId , storageType , domainType , path ) , aQuery ) ; }
Source:
public final void forceAddMac ( java.lang.String mac ) { super . forceAddMac ( mac ) ; getStrategyForMacAllocation ( ) . forEach ( ( e ) -> e.releaseMacsInCaseOfRollback ( java.util.Collections.singletonList ( mac ) ) ) ; }

Target:
public final boolean addMac ( java.lang.String mac ) { boolean added = super . addMac ( mac ) ; if ( added ) { getStrategyForMacAllocation ( ) . forEach ( ( e ) -> e.releaseMacsInCaseOfRollback ( java.util.Collections.singletonList ( mac ) ) ) ; } return added ; }
Source:
private void releaseExclusiveLock ( java.lang.String key ) { org.ovirt.engine.core.bll.lock.InMemoryLockManager.InternalLockView lock = locks.get ( key ) ; if ( ( lock != null ) && ( lock.getExclusive ( ) ) ) { locks.remove ( key ) ; org.ovirt.engine.core.bll.lock.InMemoryLockManager.log.debugFormat ( "The exclusive lock for key {0} is released and lock is removed from map" , key ) ; } else if ( lock == null ) { org.ovirt.engine.core.bll.lock.InMemoryLockManager.log.warnFormat ( "Trying to release exclusive lock which does not exist, lock key: {0}" , key ) ; } else { org.ovirt.engine.core.bll.lock.InMemoryLockManager.log.warnFormat ( "Trying to release exclusive lock but lock is not exclusive. lock key: {0}" , key ) ; } }

Target:
private void releaseExclusiveLock ( java.lang.String key ) { org.ovirt.engine.core.bll.lock.InMemoryLockManager.InternalLockView lock = locks.get ( key ) ; if ( ( lock != null ) && ( lock.getExclusive ( ) ) ) { locks.remove ( key ) ; org.ovirt.engine.core.bll.lock.InMemoryLockManager.log.debug ( "The exclusive lock for key '{}' is released and lock is removed from map" , key ) ; } else if ( lock == null ) { org.ovirt.engine.core.bll.lock.InMemoryLockManager.log.warn ( "Trying to release exclusive lock which does not exist, lock key: '{}'" , key ) ; } else { org.ovirt.engine.core.bll.lock.InMemoryLockManager.log.warn ( "Trying to release exclusive lock but lock is not exclusive. lock key: '{}'" , key ) ; } }
Source:
public static org.ovirt.engine.core.bll.CommandBase < ? extends org.ovirt.engine.core.common.action.VdcActionParametersBase > [ ] data ( ) { return new org.ovirt.engine.core.bll.CommandBase < ? > [ ] { new org.ovirt.engine.core.bll.CreateSnapshotCommand ( new org.ovirt.engine.core.common.action.ImagesActionsParametersBase ( ) ) , new org.ovirt.engine.core.bll.AddImageFromScratchCommand ( new org.ovirt.engine.core.common.action.AddImageFromScratchParameters ( ) ) , new org.ovirt.engine.core.bll.CreateImageTemplateCommand ( new org.ovirt.engine.core.common.action.CreateImageTemplateParameters ( ) ) , new org.ovirt.engine.core.bll.CreateCloneOfTemplateCommand ( new org.ovirt.engine.core.common.action.CreateCloneOfTemplateParameters ( ) ) } ; }

Target:
public static org.ovirt.engine.core.bll.CommandBase < ? extends org.ovirt.engine.core.common.action.VdcActionParametersBase > [ ] data ( ) { return new org.ovirt.engine.core.bll.CommandBase < ? > [ ] { new org.ovirt.engine.core.bll.CreateSnapshotCommand ( new org.ovirt.engine.core.common.action.ImagesActionsParametersBase ( ) ) , new org.ovirt.engine.core.bll.AddImageFromScratchCommand ( new org.ovirt.engine.core.common.action.AddImageFromScratchParameters ( ) ) , new org.ovirt.engine.core.bll.CreateImageTemplateCommand ( new org.ovirt.engine.core.common.action.CreateImageTemplateParameters ( ) ) , new org.ovirt.engine.core.bll.CreateCloneOfTemplateCommand ( new org.ovirt.engine.core.common.action.CreateCloneOfTemplateParameters ( ) ) , new org.ovirt.engine.core.bll.MoveOrCopyImageGroupCommand ( new org.ovirt.engine.core.common.action.MoveOrCopyImageGroupParameters ( ) ) { @ java.lang.Override protected void initContainerDetails ( org.ovirt.engine.core.common.action.ImagesContainterParametersBase parameters ) { } } } ; }
Source:
public void testQueryFailsIfServerExists ( ) { mockQueryParameters ( org.ovirt.engine.core.bll.gluster.GetGlusterServersForImportQueryTest.EXISTING_SERVER , org.ovirt.engine.core.bll.gluster.GetGlusterServersForImportQueryTest.PASSWORD ) ; try { getQuery ( ) . executeQueryCommand ( ) ; org.junit.Assert.fail ( "Query didn't fail when the server already exists!" ) ; } catch ( java.lang.RuntimeException e ) { org.junit.Assert.assertEquals ( VdcBllMessages.SERVER_ALREADY_EXISTS_IN_ANOTHER_CLUSTER.toString ( ) , e.getMessage ( ) ) ; } }

Target:
public void testQueryFailsIfServerExists ( ) { mockQueryParameters ( org.ovirt.engine.core.bll.gluster.GetGlusterServersForImportQueryTest.EXISTING_SERVER , org.ovirt.engine.core.bll.gluster.GetGlusterServersForImportQueryTest.PASSWORD ) ; try { getQuery ( ) . executeQueryCommand ( ) ; org.junit.Assert.fail ( "Query didn't fail when the server already exists!" ) ; } catch ( java.lang.RuntimeException e ) { org.junit.Assert.assertEquals ( EngineMessage.SERVER_ALREADY_EXISTS_IN_ANOTHER_CLUSTER.toString ( ) , e.getMessage ( ) ) ; } }
Source:
public com.google.gwt.safehtml.shared.SafeHtml getTooltip ( org.ovirt.engine.core.common.utils.Pair < org.ovirt.engine.core.common.businessentities.network_cluster , org.ovirt.engine.core.common.businessentities.VDSGroup > object ) { if ( object.getFirst ( ) . getis_display ( ) ) { return templates.imageTextSetupNetwork ( dispalyImage , constants.displayItemInfo ( ) ) ; } return com.google.gwt.safehtml.shared.SafeHtmlUtils.fromTrustedString ( "" ) ; }

Target:
public com.google.gwt.safehtml.shared.SafeHtml getTooltip ( org.ovirt.engine.core.common.utils.PairQueryable < org.ovirt.engine.core.common.businessentities.VDSGroup , org.ovirt.engine.core.common.businessentities.network_cluster > object ) { if ( ( ( object.getSecond ( ) ) != null ) && ( object.getSecond ( ) . getis_display ( ) ) ) { return templates.imageTextSetupNetwork ( dispalyImage , constants.displayItemInfo ( ) ) ; } return com.google.gwt.safehtml.shared.SafeHtmlUtils.fromTrustedString ( "" ) ; }
Source:
public org.ovirt.engine.api.model.Event lookupEvent ( java.lang.String id ) { try { java.lang.Long longId = java.lang.Long.valueOf ( id ) ; for ( org.ovirt.engine.core.common.businessentities.AuditLog auditLog : getBackendCollection ( ) ) { if ( ( auditLog.getAuditLogId ( ) ) == longId ) return addLinks ( map ( auditLog ) ) ; } return notFound ( ) ; } catch ( java.lang.NumberFormatException e ) { return notFound ( ) ; } }

Target:
public javax.ws.rs.core.Response add ( org.ovirt.engine.api.model.Event event ) { validateParameters ( event , "origin" , "severity" , "customId" , "description" ) ; validateEnums ( org.ovirt.engine.api.model.Event.class , event ) ; return performCreate ( VdcActionType.AddExternalEvent , getParameters ( event ) , new org.ovirt.engine.api.restapi.resource.QueryIdResolver < java.lang.Long > ( org.ovirt.engine.core.common.queries.VdcQueryType.GetAuditLogById , org.ovirt.engine.core.common.queries.GetAuditLogByIdParameters.class ) ) ; }
Source:
public org.ovirt.engine.api.model.MigrationOptions adapt ( org.ovirt.engine.api.v3.types.V3MigrationOptions from ) { org.ovirt.engine.api.model.MigrationOptions to = new org.ovirt.engine.api.model.MigrationOptions ( ) ; if ( from.isSetAutoConverge ( ) ) { to.setAutoConverge ( from.getAutoConverge ( ) ) ; } if ( from.isSetCompressed ( ) ) { to.setCompressed ( from.getCompressed ( ) ) ; } return to ; }

Target:
public org.ovirt.engine.api.model.MigrationOptions adapt ( org.ovirt.engine.api.v3.types.V3MigrationOptions from ) { org.ovirt.engine.api.model.MigrationOptions to = new org.ovirt.engine.api.model.MigrationOptions ( ) ; if ( from.isSetAutoConverge ( ) ) { to.setAutoConverge ( org.ovirt.engine.api.model.InheritableBoolean.valueOf ( from.getAutoConverge ( ) ) ) ; } if ( from.isSetCompressed ( ) ) { to.setCompressed ( org.ovirt.engine.api.model.InheritableBoolean.valueOf ( from.getCompressed ( ) ) ) ; } return to ; }
Source:
public void getStorageDomainDefaultWipeAfterDelete ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.common.businessentities.storage.StorageType storageType ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter < java.lang.Boolean > ( ) { @ java.lang.Override public java.lang.Boolean convert ( java.lang.Object returnValue , org.ovirt.engine.ui.frontend.AsyncQuery asyncQuery ) { return ( ( java.lang.Boolean ) ( returnValue ) ) ; } } ; org.ovirt.engine.core.common.queries.GetStorageDomainDefaultWipeAfterDeleteParameters params = new org.ovirt.engine.core.common.queries.GetStorageDomainDefaultWipeAfterDeleteParameters ( storageType ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageDomainDefaultWipeAfterDelete , params , aQuery ) ; }

Target:
public void getVmNicList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? new java.util.ArrayList < > ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ) ( source ) ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmInterfacesByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }
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.VmListModel vmListModel = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.VmListModel ) ( array [ 0 ] ) ) ; org.ovirt.engine.ui.uicommonweb.models.vms.ExportVmModel exportVmModel = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.ExportVmModel ) ( array [ 1 ] ) ) ; java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage_pool > storagePools = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage_pool > ) ( returnValue ) ) ; vmListModel.PostShowWarningOnExistingVms ( exportVmModel , storagePools ) ; }

Target:
protected java.lang.String extractNameFromEntity ( org.ovirt.engine.core.common.businessentities.VM entity ) { return entity.getvm_name ( ) ; }
Source:
public void getClusterFeaturesByClusterId ( 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 ? ( ( java.util.Set < org.ovirt.engine.core.common.businessentities.SupportedAdditionalClusterFeature > ) ( source ) ) : new java.util.HashSet < org.ovirt.engine.core.common.businessentities.SupportedAdditionalClusterFeature > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetClusterFeaturesByClusterId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( clusterId ) , aQuery ) ; }

Target:
public void getAuthzGroupsByUserId ( org.ovirt.engine.ui.frontend.AsyncQuery < java.util.List < org.ovirt.engine.core.common.businessentities.aaa.AuthzGroup > > aQuery , org.ovirt.engine.core.compat.Guid userId ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.CastingConverter < > ( ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAuthzGroupsByUserId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( userId ) , aQuery ) ; }
Source:
public void testGetAllForRoleAndAdElementAndObject ( ) { org.ovirt.engine.core.common.businessentities.Permission result = dao.getForRoleAndAdElementAndObject ( org.ovirt.engine.core.dao.PermissionDaoTest.ROLE_ID , org.ovirt.engine.core.dao.PermissionDaoTest.AD_ELEMENT_ID , org.ovirt.engine.core.dao.PermissionDaoTest.VM_ENTITY_ID ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.core.dao.PermissionDaoTest.ROLE_ID , result.getRoleId ( ) ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.core.dao.PermissionDaoTest.AD_ELEMENT_ID , result.getAdElementId ( ) ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.core.dao.PermissionDaoTest.VM_ENTITY_ID , result.getObjectId ( ) ) ; }

Target:
public void testGetAllForRoleAndAdElementAndObject ( ) { org.ovirt.engine.core.common.businessentities.Permission result = dao.getForRoleAndAdElementAndObject ( org.ovirt.engine.core.dao.PermissionDaoTest.ROLE_ID , org.ovirt.engine.core.dao.PermissionDaoTest.AD_ELEMENT_ID , org.ovirt.engine.core.dao.PermissionDaoTest.VM_ENTITY_ID ) ; org.junit.jupiter.api.Assertions.assertNotNull ( result ) ; org.junit.jupiter.api.Assertions.assertEquals ( org.ovirt.engine.core.dao.PermissionDaoTest.ROLE_ID , result.getRoleId ( ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( org.ovirt.engine.core.dao.PermissionDaoTest.AD_ELEMENT_ID , result.getAdElementId ( ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( org.ovirt.engine.core.dao.PermissionDaoTest.VM_ENTITY_ID , result.getObjectId ( ) ) ; }
Source:
public 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 ) ; }

Target:
public void getAllTemplatesFromExportDomain ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.compat.Guid storageDomainId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? source : new java.util.HashMap < org.ovirt.engine.core.common.businessentities.VmTemplate , java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > > ( ) ; } } ; org.ovirt.engine.core.common.queries.GetAllFromExportDomainQueryParameters getAllFromExportDomainQueryParamenters = new org.ovirt.engine.core.common.queries.GetAllFromExportDomainQueryParameters ( storagePoolId , storageDomainId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetTemplatesFromExportDomain , getAllFromExportDomainQueryParamenters , aQuery ) ; }
Source:
public void getPermittedStorageDomainsByStoragePoolId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId , org.ovirt.engine.core.common.businessentities.ActionGroup actionGroup ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ( ) ; } return source ; } } ; org.ovirt.engine.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 ) ; }

Target:
public void getDiskList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.DiskImage > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.DiskImage > ( ) ; } } ; org.ovirt.engine.core.common.queries.SearchParameters searchParams = new org.ovirt.engine.core.common.queries.SearchParameters ( "Disks:" , org.ovirt.engine.core.common.interfaces.SearchType.Disk ) ; searchParams.setMaxCount ( 9999 ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , searchParams , aQuery ) ; }
Source:
protected void executeQueryCommand ( ) { org.ovirt.engine.core.common.console.ConsoleOptions options = org.ovirt.engine.core.bll.ConfigureConsoleOptionsQuery.getParameters ( ) . getOptions ( ) ; fillCommonPart ( options ) ; if ( ( options.getGraphicsType ( ) ) == ( org.ovirt.engine.core.common.businessentities.GraphicsType.SPICE ) ) { fillSpice ( options ) ; } if ( org.ovirt.engine.core.bll.ConfigureConsoleOptionsQuery.getQueryReturnValue ( ) . getSucceeded ( ) ) { setReturnValue ( options ) ; } }

Target:
private void executeCommandQueryUnchecked ( ) { org.ovirt.engine.core.common.console.ConsoleOptions options = org.ovirt.engine.core.bll.ConfigureConsoleOptionsQuery.getParameters ( ) . getOptions ( ) ; fillCommonPart ( options ) ; if ( ( options.getGraphicsType ( ) ) == ( org.ovirt.engine.core.common.businessentities.GraphicsType.SPICE ) ) { fillSpice ( options ) ; } if ( org.ovirt.engine.core.bll.ConfigureConsoleOptionsQuery.getQueryReturnValue ( ) . getSucceeded ( ) ) { setReturnValue ( options ) ; } }
Source:
public void onSuccess ( final org.ovirt.engine.core.common.action.VdcReturnValueBase result ) { org.ovirt.engine.ui.frontend.Frontend.logger.finer ( "Succesful returned result from Logoff." ) ; callback.asyncCallback.onSuccess ( callback.getModel ( ) , result ) ; if ( ( org.ovirt.engine.ui.frontend.Frontend.getLoginHandler ( ) ) != null ) { org.ovirt.engine.ui.frontend.Frontend.getLoginHandler ( ) . onLogout ( ) ; } }

Target:
public void onFailure ( final java.lang.Throwable caught ) { if ( org.ovirt.engine.ui.frontend.Frontend.ignoreFailure ( caught ) ) { return ; } org.ovirt.engine.ui.frontend.Frontend.logger.log ( java.util.logging.Level.SEVERE , ( "Failed to execute RunQuery: " + caught ) , caught ) ; org.ovirt.engine.ui.frontend.Frontend.getEventsHandler ( ) . runQueryFailed ( null ) ; org.ovirt.engine.ui.frontend.Frontend.failureEventHandler ( caught ) ; if ( callback.isHandleFailure ( ) ) { org.ovirt.engine.ui.frontend.Frontend.clearLoggedInUser ( ) ; callback.getDel ( ) . onSuccess ( callback.getModel ( ) , null ) ; } }