auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void getExternalProviderComputeResourceList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.common.businessentities.Provider provider ) { 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.ExternalComputeResource > ( ) ; } return source ; } } ; org.ovirt.engine.core.common.queries.ProviderQueryParameters params = new org.ovirt.engine.core.common.queries.ProviderQueryParameters ( ) ; params.setProvider ( provider ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetComputeResourceFromExternalProvider , params , aQuery ) ; }

Target:
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 ) ; }
Source:
public void poll ( ) { if ( vdsManager.isMonitoringNeeded ( ) ) { org.ovirt.engine.core.vdsbroker.monitoring.VmsListFetcher fetcher = getVmsFetcher ( ) ; long fetchTime = java.lang.System.nanoTime ( ) ; if ( fetcher.fetch ( ) ) { getVmsMonitoring ( ) . perform ( fetcher.getChangedVms ( ) , fetchTime , vdsManager , isTimeToRefreshStatistics ( ) ) ; processDevices ( fetcher.getVdsmVms ( ) . stream ( ) , fetchTime ) ; } else { org.ovirt.engine.core.vdsbroker.monitoring.PollVmStatsRefresher.log.info ( "Failed to fetch vms info for host '{}' - skipping VMs monitoring." , vdsManager.getVdsName ( ) ) ; } } }

Target:
public void poll ( ) { if ( vdsManager.isMonitoringNeeded ( ) ) { org.ovirt.engine.core.vdsbroker.monitoring.VmsListFetcher fetcher = new org.ovirt.engine.core.vdsbroker.monitoring.VmsStatisticsFetcher ( vdsManager ) ; long fetchTime = java.lang.System.nanoTime ( ) ; if ( fetcher.fetch ( ) ) { getVmsMonitoring ( ) . perform ( fetcher.getChangedVms ( ) , fetchTime , vdsManager , true ) ; processDevices ( fetcher.getVdsmVms ( ) . stream ( ) , fetchTime ) ; } else { org.ovirt.engine.core.vdsbroker.monitoring.PollVmStatsRefresher.log.info ( "Failed to fetch vms info for host '{}' - skipping VMs monitoring." , vdsManager.getVdsName ( ) ) ; } } }
Source:
public static void getNextAvailableDiskAliasNameByVMId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid vmId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetNextAvailableDiskAliasNameByVMId , new org.ovirt.engine.core.common.queries.GetAllDisksByVmIdParameters ( vmId ) , aQuery ) ; }

Target:
public static void getVmsRunningOnOrMigratingToVds ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VM > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVmsRunningOnOrMigratingToVds , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }
Source:
public static org.ovirt.engine.core.common.businessentities.StoragePool buildStoragePool ( java.util.Map < java.lang.String , java.lang.Object > xmlRpcStruct ) { org.ovirt.engine.core.common.businessentities.StoragePool sPool = new org.ovirt.engine.core.common.businessentities.StoragePool ( ) ; if ( xmlRpcStruct.containsKey ( "type" ) ) { sPool.setstorage_pool_type ( org.ovirt.engine.core.common.businessentities.StorageType.valueOf ( xmlRpcStruct.get ( "type" ) . toString ( ) ) ) ; } sPool.setname ( org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectsBuilder.AssignStringValue ( xmlRpcStruct , "name" ) ) ; java.lang.Integer masterVersion = org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectsBuilder.AssignIntValue ( xmlRpcStruct , "master_ver" ) ; if ( masterVersion != null ) { sPool.setmaster_domain_version ( masterVersion ) ; } return sPool ; }

Target:
public static org.ovirt.engine.core.common.businessentities.StoragePool buildStoragePool ( java.util.Map < java.lang.String , java.lang.Object > xmlRpcStruct ) { org.ovirt.engine.core.common.businessentities.StoragePool sPool = new org.ovirt.engine.core.common.businessentities.StoragePool ( ) ; if ( xmlRpcStruct.containsKey ( "type" ) ) { sPool.setStorageType ( org.ovirt.engine.core.common.businessentities.StorageType.valueOf ( xmlRpcStruct.get ( "type" ) . toString ( ) ) ) ; } sPool.setName ( org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectsBuilder.AssignStringValue ( xmlRpcStruct , "name" ) ) ; java.lang.Integer masterVersion = org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectsBuilder.AssignIntValue ( xmlRpcStruct , "master_ver" ) ; if ( masterVersion != null ) { sPool.setmaster_domain_version ( masterVersion ) ; } return sPool ; }
Source:
protected void executeVdsBrokerCommand ( ) { status = org.ovirt.engine.core.vdsbroker.gluster.StopGlusterVolumeGeoRepSessionVDSCommand.getBroker ( ) . glusterVolumeGeoRepSessionStop ( org.ovirt.engine.core.vdsbroker.gluster.StopGlusterVolumeGeoRepSessionVDSCommand.getParameters ( ) . getVolumeName ( ) , org.ovirt.engine.core.vdsbroker.gluster.StopGlusterVolumeGeoRepSessionVDSCommand.getParameters ( ) . getSlaveHost ( ) , org.ovirt.engine.core.vdsbroker.gluster.StopGlusterVolumeGeoRepSessionVDSCommand.getParameters ( ) . getSlaveVolume ( ) , org.ovirt.engine.core.vdsbroker.gluster.StopGlusterVolumeGeoRepSessionVDSCommand.getParameters ( ) . getForce ( ) ) ; org.ovirt.engine.core.vdsbroker.gluster.StopGlusterVolumeGeoRepSessionVDSCommand.proceedProxyReturnValue ( ) ; }

Target:
protected void executeVdsBrokerCommand ( ) { status = org.ovirt.engine.core.vdsbroker.gluster.StopGlusterVolumeGeoRepSessionVDSCommand.getBroker ( ) . glusterVolumeGeoRepSessionStop ( org.ovirt.engine.core.vdsbroker.gluster.StopGlusterVolumeGeoRepSessionVDSCommand.getParameters ( ) . getVolumeName ( ) , org.ovirt.engine.core.vdsbroker.gluster.StopGlusterVolumeGeoRepSessionVDSCommand.getParameters ( ) . getSlaveHost ( ) , org.ovirt.engine.core.vdsbroker.gluster.StopGlusterVolumeGeoRepSessionVDSCommand.getParameters ( ) . getSlaveVolume ( ) , org.ovirt.engine.core.vdsbroker.gluster.StopGlusterVolumeGeoRepSessionVDSCommand.getParameters ( ) . getUserName ( ) , org.ovirt.engine.core.vdsbroker.gluster.StopGlusterVolumeGeoRepSessionVDSCommand.getParameters ( ) . getForce ( ) ) ; org.ovirt.engine.core.vdsbroker.gluster.StopGlusterVolumeGeoRepSessionVDSCommand.proceedProxyReturnValue ( ) ; }
Source:
public void canDoWithPinnedHostOnVm ( ) { final org.ovirt.engine.core.bll.numa.vm.AddVmNumaNodesCommand command = mockedCommand ( ) ; org.hamcrest.MatcherAssert.assertThat ( command.canDoAction ( ) , org.hamcrest.core.Is.is ( true ) ) ; }

Target:
public void canSetNumaConfigurationWithVmFromDb ( ) { final org.ovirt.engine.core.bll.numa.vm.AddVmNumaNodesCommand command = mockedCommandWithVmFromDb ( ) ; command.executeCommand ( ) ; org.mockito.Mockito.verify ( vmNumaNodeDao ) . massSaveNumaNode ( org.mockito.Matchers.eq ( org.ovirt.engine.core.bll.utils.NumaTestUtils.toVdsNumaNodes ( newNumaNodes ) ) , org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) , org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ; }
Source:
public org.ovirt.engine.core.common.businessentities.StoragePool getStoragePool ( ) { if ( ( cachedStoragePool ) == null ) { cachedStoragePool = getStoragePoolDao ( ) . get ( params.getStoragePoolId ( ) ) ; } return cachedStoragePool ; }

Target:
private void loadDc ( ) { if ( ( cachedStoragePool ) == null ) { final org.ovirt.engine.core.compat.Guid dcId = params.getStoragePoolId ( ) ; if ( org.ovirt.engine.core.compat.Guid.isNullOrEmpty ( dcId ) ) { cachedStoragePool = getStoragePoolDao ( ) . getForCluster ( params.getClusterId ( ) ) ; } else { cachedStoragePool = getStoragePoolDao ( ) . get ( dcId ) ; } } }
Source:
public org.ovirt.engine.core.common.queries.VdcQueryReturnValue runQuery ( org.ovirt.engine.core.common.queries.QueryType search , org.ovirt.engine.core.common.queries.VdcQueryParametersBase searchParameters ) { org.ovirt.engine.ui.frontend.server.gwt.GenericApiGWTServiceImpl.log.debug ( "Server: RunQuery invoked!" ) ; debugQuery ( search , searchParameters ) ; searchParameters.setSessionId ( getEngineSessionId ( ) ) ; if ( ( searchParameters.getCorrelationId ( ) ) == null ) { searchParameters.setCorrelationId ( org.ovirt.engine.core.utils.CorrelationIdTracker.getCorrelationId ( ) ) ; } return getBackend ( ) . runQuery ( search , searchParameters ) ; }

Target:
public org.ovirt.engine.core.common.queries.VdcQueryReturnValue runQuery ( org.ovirt.engine.core.common.queries.QueryType search , org.ovirt.engine.core.common.queries.QueryParametersBase searchParameters ) { org.ovirt.engine.ui.frontend.server.gwt.GenericApiGWTServiceImpl.log.debug ( "Server: RunQuery invoked!" ) ; debugQuery ( search , searchParameters ) ; searchParameters.setSessionId ( getEngineSessionId ( ) ) ; if ( ( searchParameters.getCorrelationId ( ) ) == null ) { searchParameters.setCorrelationId ( org.ovirt.engine.core.utils.CorrelationIdTracker.getCorrelationId ( ) ) ; } return getBackend ( ) . runQuery ( search , searchParameters ) ; }
Source:
protected void executeQueryCommand ( ) { java.lang.String [ ] names = new java.lang.String [ 0 ] ; org.ovirt.engine.core.common.vdscommands.GetLldpVDSCommandParameters lldpVDSCommandParameters = new org.ovirt.engine.core.common.vdscommands.GetLldpVDSCommandParameters ( org.ovirt.engine.core.bll.network.host.GetMultipleTlvsByHostIdQuery.getParameters ( ) . getId ( ) , names ) ; org.ovirt.engine.core.common.vdscommands.VDSReturnValue command = runVdsCommand ( VDSCommandType.GetLldp , lldpVDSCommandParameters ) ; org.ovirt.engine.core.bll.network.host.GetMultipleTlvsByHostIdQuery.getQueryReturnValue ( ) . setReturnValue ( command.getReturnValue ( ) ) ; }

Target:
protected void executeQueryCommand ( ) { java.lang.String [ ] names = new java.lang.String [ 0 ] ; org.ovirt.engine.core.bll.network.host.GetMultipleTlvsByHostIdQuery.setLldpVDSCommandParameters ( new org.ovirt.engine.core.common.vdscommands.GetLldpVDSCommandParameters ( getHostId ( ) , names ) ) ; super . executeQueryCommand ( ) ; }
Source:
public void getClusterNetworkList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { if ( ( aQuery.converterCallback ) == null ) { 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.Network > ( ) ; } return source ; } } ; } org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllNetworksByClusterId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( clusterId ) , aQuery ) ; }

Target:
public void getStorageDomainList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageDomainsByStoragePoolId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) , aQuery ) ; }
Source:
private int CalcSpmCpuConsumption ( org.ovirt.engine.core.common.businessentities.VDS vds ) { return ( vds.getspm_status ( ) ) == ( org.ovirt.engine.core.common.businessentities.VdsSpmStatus.None ) ? 0 : ( ( org.ovirt.engine.core.common.config.Config.< java.lang.Integer > GetValue ( ConfigValues.SpmVCpuConsumption ) ) * ( org.ovirt.engine.core.common.config.Config.< java.lang.Integer > GetValue ( ConfigValues.VcpuConsumptionPercentage ) ) ) / ( vds.getcpu_cores ( ) ) ; }

Target:
private int CalcSpmCpuConsumption ( org.ovirt.engine.core.common.businessentities.VDS vds ) { return ( vds.getSpmStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VdsSpmStatus.None ) ? 0 : ( ( org.ovirt.engine.core.common.config.Config.< java.lang.Integer > GetValue ( ConfigValues.SpmVCpuConsumption ) ) * ( org.ovirt.engine.core.common.config.Config.< java.lang.Integer > GetValue ( ConfigValues.VcpuConsumptionPercentage ) ) ) / ( vds.getCpuCores ( ) ) ; }
Source:
public org.ovirt.engine.sdk.decorators.StorageDomain add ( org.ovirt.engine.sdk.decorators.StorageDomain storagedomain ) 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 ( ) . build ( ) ; url = new org.ovirt.engine.sdk.utils.UrlBuilder ( url ) . build ( ) ; return getProxy ( ) . add ( url , storagedomain , org.ovirt.engine.sdk.entities.StorageDomain.class , org.ovirt.engine.sdk.decorators.StorageDomain.class , headers ) ; }

Target:
public org.ovirt.engine.sdk.decorators.StorageDomain add ( org.ovirt.engine.sdk.decorators.StorageDomain storagedomain ) 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 , storagedomain , org.ovirt.engine.sdk.entities.StorageDomain.class , org.ovirt.engine.sdk.decorators.StorageDomain.class , headers ) ; }
Source:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel ) ( target ) ) ; model.setDataCentersAndClusters ( model , dataCenters , ( ( java.util.List < org.ovirt.engine.core.common.businessentities.VDSGroup > ) ( returnValue ) ) , vm.getVdsGroupId ( ) ) ; initTemplate ( ) ; initCdImage ( ) ; initSoundCard ( vm.getId ( ) ) ; }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.ExistingVmModelBehavior existingVmModelBehavior = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.ExistingVmModelBehavior ) ( model ) ) ; runningOnHost = ( ( org.ovirt.engine.core.common.businessentities.VDS ) ( returnValue ) ) ; hostCpu = calculateHostCpus ( ) ; existingVmModelBehavior.updateNumOfSockets ( ) ; }
Source:
public void testGetExportNotFound ( ) throws java.lang.Exception { setUpGetStorageDomainExpectations ( StorageDomainType.ImportExport ) ; setUpGetEntityExpectations ( StorageDomainType.ImportExport , org.ovirt.engine.api.restapi.resource.BackendStorageDomainVmResourceTest.STORAGE_DOMAIN_ID , true ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; try { resource.get ( ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }

Target:
public void testGetExportNotFound ( ) throws java.lang.Exception { setUpGetStorageDomainExpectations ( StorageDomainType.ImportExport ) ; setUpGetEntityExpectations ( StorageDomainType.ImportExport , org.ovirt.engine.api.restapi.resource.BackendStorageDomainVmResourceTest.STORAGE_DOMAIN_ID , true ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; try { resource.get ( ) ; org.junit.Assert.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }
Source:
protected boolean isInterfaceSupportedForPlugUnPlug ( org.ovirt.engine.core.common.businessentities.Disk disk ) { if ( ! ( ( DiskInterface.VirtIO.equals ( disk.getDiskInterface ( ) ) ) || ( DiskInterface.VirtIO_SCSI.equals ( disk.getDiskInterface ( ) ) ) ) ) { addCanDoActionMessage ( VdcBllMessages.HOT_PLUG_DISK_IS_NOT_VIRTIO ) ; return false ; } return true ; }

Target:
protected org.ovirt.engine.core.common.businessentities.Disk loadDiskFromSnapshot ( org.ovirt.engine.core.compat.Guid diskId , org.ovirt.engine.core.compat.Guid snapshotId ) { return org.ovirt.engine.core.bll.AbstractDiskVmCommand.getDiskImageDao ( ) . getDiskSnapshotForVmSnapshot ( diskId , snapshotId ) ; }
Source:
public void validateFailsForNoStorageDevice ( ) { org.mockito.Mockito.doReturn ( new org.ovirt.engine.core.common.action.gluster.CreateBrickParameters ( HOST_ID , "brick1" , "/gluster-bricks/brick1" , org.ovirt.engine.core.common.businessentities.RaidType.RAID0 , null , null , java.util.Collections.emptyList ( ) ) ) . when ( cmd ) . getParameters ( ) ; prepareMocks ( VDSStatus.Up ) ; org.junit.Assert.assertFalse ( cmd.validate ( ) ) ; }

Target:
public void validateFailsForNoStorageDevice ( ) { org.mockito.Mockito.doReturn ( new org.ovirt.engine.core.common.action.gluster.CreateBrickParameters ( HOST_ID , "brick1" , "/gluster-bricks/brick1" , org.ovirt.engine.core.common.businessentities.RaidType.RAID0 , null , null , java.util.Collections.emptyList ( ) , getStorageDevice ( "sdd" ) , org.ovirt.engine.core.common.businessentities.CacheModeType.writethrough , 10 ) ) . when ( cmd ) . getParameters ( ) ; prepareMocks ( VDSStatus.Up ) ; org.junit.Assert.assertFalse ( cmd.validate ( ) ) ; }
Source:
protected com.google.gwt.resources.client.ImageResource getStatusImage ( ) { org.ovirt.engine.core.common.businessentities.network.NetworkStatus netStatus = ( ( org.ovirt.engine.ui.uicommonweb.models.hosts.network.LogicalNetworkModel ) ( item ) ) . getStatus ( ) ; if ( netStatus == ( org.ovirt.engine.core.common.businessentities.network.NetworkStatus.Operational ) ) { return resources.upImage ( ) ; } else if ( netStatus == ( org.ovirt.engine.core.common.businessentities.network.NetworkStatus.NonOperational ) ) { return resources.downImage ( ) ; } else { return resources.questionMarkImage ( ) ; } }

Target:
protected com.google.gwt.resources.client.ImageResource getStatusImage ( ) { org.ovirt.engine.core.common.businessentities.network.NetworkStatus netStatus = ( ( org.ovirt.engine.ui.uicommonweb.models.hosts.network.LogicalNetworkModel ) ( item ) ) . getStatus ( ) ; if ( netStatus == ( org.ovirt.engine.core.common.businessentities.network.NetworkStatus.OPERATIONAL ) ) { return resources.upImage ( ) ; } else if ( netStatus == ( org.ovirt.engine.core.common.businessentities.network.NetworkStatus.NON_OPERATIONAL ) ) { return resources.downImage ( ) ; } else { return resources.questionMarkImage ( ) ; } }
Source:
public static void getDataCenterList ( 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 ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StoragePool > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( "DataCenter: sortby name" , org.ovirt.engine.core.common.interfaces.SearchType.StoragePool ) , aQuery ) ; }

Target:
public void getClusterNetworkList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { if ( ( aQuery.converterCallback ) == null ) { 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.Network > ( ) ; } return source ; } } ; } org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllNetworksByClusterId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( clusterId ) , aQuery ) ; }
Source:
public static void getRoleList ( 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.Role > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Role > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllRoles , new org.ovirt.engine.core.common.queries.MultilevelAdministrationsQueriesParameters ( ) , 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 static 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.DiskImage > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > ( ) ; } } ; org.ovirt.engine.core.common.queries.SearchParameters searchParams = new org.ovirt.engine.core.common.queries.SearchParameters ( "Disks:" , org.ovirt.engine.core.common.interfaces.SearchType.Disk ) ; searchParams.setMaxCount ( 9999 ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , searchParams , aQuery ) ; }

Target:
public static void getRedirectServletReportsPage ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.String ) ( source ) ) : "" ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.RedirectServletReportsPage , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
public void updatePosixNonEmptyVFSType ( ) { org.ovirt.engine.core.common.businessentities.StorageServerConnections newPosixConnection = createPosixConnection ( "multipass.my.domain.tlv.company.com:/export/allstorage/data1" , StorageType.POSIXFS , "nfs" , "timeo=30" ) ; parameters.setStorageServerConnection ( newPosixConnection ) ; parameters.setVdsId ( Guid.Empty ) ; org.mockito.Mockito.doReturn ( true ) . when ( command ) . InitializeVds ( ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionSuccess ( command ) ; }

Target:
public void addPosixNonEmptyVFSType ( ) { org.ovirt.engine.core.common.businessentities.StorageServerConnections newPosixConnection = createPosixConnection ( "multipass.my.domain.tlv.company.com:/export/allstorage/data1" , StorageType.POSIXFS , "nfs" , "timeo=30" ) ; parameters.setStorageServerConnection ( newPosixConnection ) ; parameters.setVdsId ( Guid.Empty ) ; parameters.setStoragePoolId ( Guid.Empty ) ; org.mockito.Mockito.doReturn ( false ) . when ( command ) . isConnWithSameDetailsExists ( ) ; org.mockito.Mockito.doReturn ( true ) . when ( command ) . initializeVds ( ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionSuccess ( command ) ; }
Source:
protected void verifyModel ( org.ovirt.engine.api.model.Snapshot model , int index ) { org.junit.Assert.assertEquals ( GUIDS [ index ] . toString ( ) , model.getId ( ) ) ; org.junit.Assert.assertEquals ( DESCRIPTIONS [ index ] , model.getDescription ( ) ) ; verifyLinks ( model ) ; }

Target:
protected void verifyModel ( org.ovirt.engine.api.model.Snapshot model , int index ) { org.junit.jupiter.api.Assertions.assertEquals ( GUIDS [ index ] . toString ( ) , model.getId ( ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( DESCRIPTIONS [ index ] , model.getDescription ( ) ) ; verifyLinks ( model ) ; }
Source:
public void getGlusterSwiftServerServices ( 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.GlusterServerService > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterServerServicesByClusterId , new org.ovirt.engine.core.common.queries.gluster.GlusterServiceQueryParameters ( clusterId , org.ovirt.engine.core.common.businessentities.gluster.ServiceType.GLUSTER_SWIFT ) , aQuery ) ; }

Target:
public void getGlusterHookContent ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hookId , org.ovirt.engine.core.compat.Guid serverId ) { 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 : "" ; } } ; org.ovirt.engine.core.common.queries.gluster.GlusterHookContentQueryParameters parameters = new org.ovirt.engine.core.common.queries.gluster.GlusterHookContentQueryParameters ( hookId ) ; parameters.setGlusterServerId ( serverId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterHookContent , parameters , aQuery ) ; }
Source:
private void registerListeners ( org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel model ) { org.ovirt.engine.ui.uicommonweb.models.vms.instancetypes.InstanceTypeManager.ManagedFieldsManager managedFieldsManager = new org.ovirt.engine.ui.uicommonweb.models.vms.instancetypes.InstanceTypeManager.ManagedFieldsManager ( ) ; model.getInstanceTypes ( ) . getSelectedItemChangedEvent ( ) . addListener ( managedFieldsManager ) ; model.getTemplate ( ) . getSelectedItemChangedEvent ( ) . addListener ( managedFieldsManager ) ; model.getOSType ( ) . getSelectedItemChangedEvent ( ) . addListener ( new org.ovirt.engine.ui.uicompat.IEventListener < org.ovirt.engine.ui.uicompat.EventArgs > ( ) { @ java.lang.Override public void eventRaised ( org.ovirt.engine.ui.uicompat.Event < ? extends org.ovirt.engine.ui.uicompat.EventArgs > ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { } } ) ; }

Target:
private void registerListeners ( org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel model ) { org.ovirt.engine.ui.uicommonweb.models.vms.instancetypes.InstanceTypeManager.ManagedFieldsManager managedFieldsManager = new org.ovirt.engine.ui.uicommonweb.models.vms.instancetypes.InstanceTypeManager.ManagedFieldsManager ( ) ; model.getInstanceTypes ( ) . getSelectedItemChangedEvent ( ) . addListener ( managedFieldsManager ) ; model.getTemplateWithVersion ( ) . getSelectedItemChangedEvent ( ) . addListener ( managedFieldsManager ) ; model.getOSType ( ) . getSelectedItemChangedEvent ( ) . addListener ( new org.ovirt.engine.ui.uicompat.IEventListener < org.ovirt.engine.ui.uicompat.EventArgs > ( ) { @ java.lang.Override public void eventRaised ( org.ovirt.engine.ui.uicompat.Event < ? extends org.ovirt.engine.ui.uicompat.EventArgs > ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { } } ) ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { java.util.List < org.ovirt.engine.ui.uicommonweb.models.EntityModel < org.ovirt.engine.core.common.businessentities.VM > > externalVms = new java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.EntityModel < org.ovirt.engine.core.common.businessentities.VM > > ( ) ; for ( org.ovirt.engine.core.common.businessentities.VM vm : ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . < java.util.List < org.ovirt.engine.core.common.businessentities.VM > > getReturnValue ( ) ) { externalVms.add ( new org.ovirt.engine.ui.uicommonweb.models.EntityModel < org.ovirt.engine.core.common.businessentities.VM > ( vm ) ) ; } this . externalVmModels.setItems ( externalVms ) ; stopProgress ( ) ; }

Target:
public void loadVmsFromExportDomain ( ) { startProgress ( null ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmsFromExportDomain , new org.ovirt.engine.core.common.queries.GetAllFromExportDomainQueryParameters ( getDataCenters ( ) . getSelectedItem ( ) . getId ( ) , exportDomain.getId ( ) ) , new org.ovirt.engine.ui.frontend.AsyncQuery ( this , new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { updateVms ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . < java.util.List < org.ovirt.engine.core.common.businessentities.VM > > getReturnValue ( ) ) ; } } ) ) ; }
Source:
private void analyzeHostedEngineVm ( ) { if ( ( ( dbVm ) != null ) && ( ( dbVm.getOrigin ( ) ) == ( org.ovirt.engine.core.common.businessentities.OriginType.HOSTED_ENGINE ) ) ) { hostedEngineUnmanaged = true ; } }

Target:
private boolean isUnmanagedVm ( ) { externalVm = ( ( dbVm ) == null ) && ( ( getDbFacade ( ) . getVmStaticDao ( ) . get ( vdsmVm.getVmDynamic ( ) . getId ( ) ) ) == null ) ; hostedEngineUnmanaged = ( ( dbVm ) != null ) && ( ( dbVm.getOrigin ( ) ) == ( org.ovirt.engine.core.common.businessentities.OriginType.HOSTED_ENGINE ) ) ; return ( externalVm ) || ( hostedEngineUnmanaged ) ; }
Source:
public org.ovirt.engine.api.v3.types.V3NIC update ( org.ovirt.engine.api.v3.types.V3NIC v3Nic ) { org.ovirt.engine.api.model.Nic v4Nic = org.ovirt.engine.api.v3.adapters.V3InAdapters.adaptIn ( v3Nic ) ; org.ovirt.engine.api.v3.helpers.V3NICHelper.setVnicProfile ( vmId , v3Nic , v4Nic ) ; try { return org.ovirt.engine.api.v3.adapters.V3OutAdapters.adaptOut ( delegate.update ( v4Nic ) ) ; } catch ( javax.ws.rs.WebApplicationException exception ) { throw adaptException ( exception ) ; } }

Target:
public org.ovirt.engine.api.v3.types.V3NIC update ( org.ovirt.engine.api.v3.types.V3NIC v3Nic ) { org.ovirt.engine.api.model.Nic v4Nic = org.ovirt.engine.api.v3.adapters.V3InAdapters.adaptIn ( v3Nic ) ; org.ovirt.engine.api.v3.helpers.V3NICHelper.setVnicProfile ( vmId , v3Nic , v4Nic ) ; try { return org.ovirt.engine.api.v3.adapters.V3OutAdapters.adaptOut ( getDelegate ( ) . update ( v4Nic ) ) ; } catch ( javax.ws.rs.WebApplicationException exception ) { throw adaptException ( exception ) ; } }
Source:
public void testValidRemovedBondsWhenNotRemovingAnyBond ( ) throws java.lang.Exception { org.ovirt.engine.core.common.action.HostSetupNetworksParameters params = new org.ovirt.engine.core.common.action.HostSetupNetworksParameters ( host.getId ( ) ) ; params.setRemovedBonds ( java.util.Collections.< org.ovirt.engine.core.compat.Guid > emptySet ( ) ) ; org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidator validator = createHostSetupNetworksValidator ( params , null ) ; org.junit.Assert.assertThat ( validator.validRemovedBonds ( java.util.Collections.< org.ovirt.engine.core.common.businessentities.network.NetworkAttachment > emptyList ( ) ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }

Target:
public void testValidateBondOptionsForNewAttachementWithNonVmNetwork ( ) { validateValidBonds ( true , false , true , false ) ; }
Source:
public void getGlusterHookContent ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hookId , org.ovirt.engine.core.compat.Guid serverId ) { 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 : "" ; } } ; org.ovirt.engine.core.common.queries.gluster.GlusterHookContentQueryParameters parameters = new org.ovirt.engine.core.common.queries.gluster.GlusterHookContentQueryParameters ( hookId ) ; parameters.setGlusterServerId ( serverId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterHookContent , parameters , aQuery ) ; }

Target:
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 ) ; }
Source:
public static void isSoundcardEnabled ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid vmId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { return ( ( ( java.util.List < java.lang.String > ) ( source ) ) . size ( ) ) > 0 ; } return false ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetSoundDevices , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) , aQuery ) ; }

Target:
public static void isVirtioScsiEnabledForVm ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid vmId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { return ( ( ( java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > ) ( source ) ) . size ( ) ) > 0 ; } return false ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVirtioScsiControllers , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) , aQuery ) ; }
Source:
private void applyStyles ( ) { portMirroringEditor.addContentWidgetContainerStyleName ( style.portMirroringEditor ( ) ) ; publicUseEditor.addContentWidgetContainerStyleName ( style.publicUseEditor ( ) ) ; publicUseEditor.asCheckBox ( ) . addStyleName ( style.checkBox ( ) ) ; }

Target:
private void applyStyles ( ) { portMirroringEditor.addContentWidgetContainerStyleName ( style.checkboxEditor ( ) ) ; passthroughEditor.addContentWidgetContainerStyleName ( style.checkboxEditor ( ) ) ; publicUseEditor.addContentWidgetContainerStyleName ( style.publicUseEditor ( ) ) ; publicUseEditor.asCheckBox ( ) . addStyleName ( style.checkBox ( ) ) ; }
Source:
public java.lang.Void runInTransaction ( ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase logable = createAuditLog ( iface ) ; log ( logable , AuditLogType.MAC_ADDRESS_IS_IN_USE_UNPLUG ) ; log.warnFormat ( ( "Network Interface {0} has MAC address {1} which is in use, " + "therefore it is being unplugged from VM {2}." ) , iface.getName ( ) , iface.getMacAddress ( ) , iface.getVmId ( ) ) ; return null ; }

Target:
public java.lang.Void runInTransaction ( ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase logable = createAuditLog ( iface ) ; log ( logable , AuditLogType.MAC_ADDRESS_IS_IN_USE_UNPLUG ) ; log.warn ( ( "Network Interface '{}' has MAC address '{}' which is in use, " + "therefore it is being unplugged from VM '{}'." ) , iface.getName ( ) , iface.getMacAddress ( ) , iface.getVmId ( ) ) ; return null ; }
Source:
public static void GetGlusterVolumeBrickDetails ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId , java.lang.String volume , java.lang.String brick ) { 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 , volume , brick , true ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetGlusterVolumeAdvancedDetails , parameters , aQuery ) ; }

Target:
public static void GetSANWipeAfterDelete ( 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.Boolean ) ( source ) ) . booleanValue ( ) : false ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.SANWipeAfterDelete , org.ovirt.engine.core.common.config.Config.DefaultConfigurationVersion ) , aQuery ) ; }
Source:
public java.util.List < org.ovirt.engine.core.common.businessentities.VDS > filter ( java.util.List < org.ovirt.engine.core.common.businessentities.VDS > data ) { for ( org.ovirt.engine.core.common.businessentities.VDS vds : data ) { vds.setCpuName ( org.ovirt.engine.core.bll.CpuFlagsManagerHandler.findMaxServerCpuByFlags ( vds.getCpuFlags ( ) , vds.getVdsGroupCompatibilityVersion ( ) ) ) ; } return data ; }

Target:
public java.util.List < org.ovirt.engine.core.common.businessentities.VDS > filter ( java.util.List < org.ovirt.engine.core.common.businessentities.VDS > data ) { for ( org.ovirt.engine.core.common.businessentities.VDS vds : data ) { vds.setCpuName ( getCpuFlagsManagerHandler ( ) . findMaxServerCpuByFlags ( vds.getCpuFlags ( ) , vds.getVdsGroupCompatibilityVersion ( ) ) ) ; } return data ; }
Source:
public java.util.List < org.ovirt.engine.core.common.businessentities.storage.LUNStorageServerConnectionMap > getAll ( final java.lang.String lunId ) { return org.ovirt.engine.core.utils.linq.LinqUtils.filter ( getAll ( ) , new org.ovirt.engine.core.utils.linq.Predicate < org.ovirt.engine.core.common.businessentities.storage.LUNStorageServerConnectionMap > ( ) { @ java.lang.Override public boolean eval ( org.ovirt.engine.core.common.businessentities.storage.LUNStorageServerConnectionMap a ) { return a.getLunId ( ) . equals ( lunId ) ; } } ) ; }

Target:
public java.util.List < org.ovirt.engine.core.common.businessentities.storage.LUNStorageServerConnectionMap > getAll ( final java.lang.String lunId ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) . addValue ( "lun_id" , lunId ) ; return getCallsHandler ( ) . executeReadList ( "GetLUN_storage_server_connection_mapByLUN" , org.ovirt.engine.core.dao.StorageServerConnectionLunMapDaoImpl.StorageServerConnectionLunMapRowMapper.instance , parameterSource ) ; }
Source:
public void testUpdateWhenAbortedTasks ( ) { org.mockito.Mockito.doReturn ( getTasks ( JobExecutionStatus.ABORTED ) ) . when ( provider ) . getTaskListForCluster ( org.ovirt.engine.core.bll.gluster.GlusterTasksSyncJobTest.CLUSTER_GUIDS [ 1 ] ) ; prepareMocks ( ) ; tasksSyncJob.updateGlusterAsyncTasks ( ) ; org.mockito.Mockito.verify ( jobRepository , org.mockito.Mockito.times ( 0 ) ) . updateStep ( org.mockito.Matchers.any ( org.ovirt.engine.core.common.job.Step.class ) ) ; org.mockito.Mockito.verify ( taskUtils , org.mockito.Mockito.times ( 2 ) ) . endStepJob ( org.mockito.Matchers.any ( org.ovirt.engine.core.common.job.Step.class ) ) ; }

Target:
public void testUpdateWhenAbortedTasks ( ) { org.mockito.Mockito.doReturn ( getTasks ( JobExecutionStatus.ABORTED ) ) . when ( provider ) . getTaskListForCluster ( org.ovirt.engine.core.bll.gluster.GlusterTasksSyncJobTest.CLUSTER_GUIDS [ 1 ] ) ; prepareMocks ( ) ; tasksSyncJob.updateGlusterAsyncTasks ( ) ; org.mockito.Mockito.verify ( jobRepository , org.mockito.Mockito.times ( 0 ) ) . updateStep ( org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.common.job.Step.class ) ) ; org.mockito.Mockito.verify ( taskUtils , org.mockito.Mockito.times ( 2 ) ) . endStepJob ( org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.common.job.Step.class ) ) ; }
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 getHostListByDataCenter ( org.ovirt.engine.ui.frontend.AsyncQuery < java.util.List < org.ovirt.engine.core.common.businessentities.VDS > > aQuery , org.ovirt.engine.core.compat.Guid spId ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.ListConverter < > ( ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllVdsByStoragePool , new org.ovirt.engine.core.common.queries.IdQueryParameters ( spId ) , aQuery ) ; }
Source:
public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VM > ( ) ; } return source ; }

Target:
public void getVmsFromExternalServer ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId , org.ovirt.engine.core.compat.Guid vdsId , java.lang.String url , java.lang.String username , java.lang.String password , org.ovirt.engine.core.common.businessentities.OriginType originType , java.util.List < java.lang.String > vmsToImport ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.ListConverter < > ( ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmsFromExternalProvider , new org.ovirt.engine.core.common.queries.GetVmsFromExternalProviderQueryParameters ( url , username , password , originType , vdsId , dataCenterId , vmsToImport ) , aQuery ) ; }
Source:
private java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.api.model.Disk > queryVmDisksMap ( org.ovirt.engine.api.model.VM vm ) { java.util.List < org.ovirt.engine.api.model.Disk > vmDisks = getBackendCollection ( org.ovirt.engine.api.model.Disk.class , VdcQueryType.GetAllDisksByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( asGuid ( vm.getId ( ) ) ) ) ; return org.ovirt.engine.core.common.businessentities.Entities.businessEntitiesById ( vmDisks ) ; }

Target:
private java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.api.model.Disk > queryVmDisksMap ( org.ovirt.engine.api.model.Vm vm ) { java.util.List < org.ovirt.engine.api.model.Disk > vmDisks = getBackendCollection ( org.ovirt.engine.api.model.Disk.class , VdcQueryType.GetAllDisksByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( asGuid ( vm.getId ( ) ) ) ) ; return org.ovirt.engine.core.common.businessentities.Entities.businessEntitiesById ( vmDisks ) ; }
Source:
protected void expectGetLunsMap ( org.ovirt.engine.core.dao.StorageServerConnectionLunMapDao dao ) { for ( int i = 0 ; i < ( org.ovirt.engine.core.bll.GetLunsByVgIdTest.GUIDS.length ) ; i ++ ) { expectGetLunsMap ( dao , org.ovirt.engine.core.bll.GetLunsByVgIdTest.GUIDS [ i ] . toString ( ) , org.ovirt.engine.core.bll.GetLunsByVgIdTest.GUIDS [ i ] . toString ( ) ) ; } }

Target:
protected void expectGetLunsMap ( org.ovirt.engine.core.dao.StorageServerConnectionLunMapDao dao ) { for ( int i = 0 ; i < ( org.ovirt.engine.core.bll.GetLunsByVgIdQueryTest.GUIDS.length ) ; i ++ ) { expectGetLunsMap ( dao , org.ovirt.engine.core.bll.GetLunsByVgIdQueryTest.GUIDS [ i ] . toString ( ) , org.ovirt.engine.core.bll.GetLunsByVgIdQueryTest.GUIDS [ i ] . toString ( ) ) ; } }