auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void testGetBrandingThemes ( ) { java.util.List < org.ovirt.engine.core.branding.BrandingTheme > result = testManager.getBrandingThemes ( ) ; org.junit.Assert.assertNotNull ( "There should be a result" , result ) ; org.junit.Assert.assertEquals ( "There should be five active themes" , 5 , result.size ( ) ) ; java.util.List < org.ovirt.engine.core.branding.BrandingTheme > result2 = testManager.getBrandingThemes ( ) ; org.junit.Assert.assertNotNull ( "There should be a result" , result2 ) ; org.junit.Assert.assertEquals ( "There should be five active themes" , 5 , result2.size ( ) ) ; org.junit.Assert.assertSame ( "The result are not the same object" , result , result2 ) ; }

Target:
public void testGetBrandingThemes ( ) { java.util.List < org.ovirt.engine.core.branding.BrandingTheme > result = testManager.getBrandingThemes ( ) ; org.junit.jupiter.api.Assertions.assertNotNull ( result , "There should be a result" ) ; org.junit.jupiter.api.Assertions.assertEquals ( 5 , result.size ( ) , "There should be five active themes" ) ; java.util.List < org.ovirt.engine.core.branding.BrandingTheme > result2 = testManager.getBrandingThemes ( ) ; org.junit.jupiter.api.Assertions.assertNotNull ( result2 , "There should be a result" ) ; org.junit.jupiter.api.Assertions.assertEquals ( 5 , result2.size ( ) , "There should be five active themes" ) ; org.junit.jupiter.api.Assertions.assertSame ( result , result2 , "The result are not the same object" ) ; }
Source:
private void mockDiskVmElementValidatorPassDiscardValidation ( org.ovirt.engine.core.common.businessentities.storage.Disk disk , org.ovirt.engine.core.common.businessentities.storage.DiskVmElement diskVmElement , org.ovirt.engine.core.bll.ValidationResult validationResult ) { org.ovirt.engine.core.bll.validator.storage.DiskVmElementValidator diskVmElementValidator = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.validator.storage.DiskVmElementValidator ( disk , diskVmElement ) ) ; org.mockito.Mockito.doReturn ( diskVmElementValidator ) . when ( multipleDiskVmElementValidator ) . createDiskVmElementValidator ( disk , diskVmElement ) ; org.mockito.Mockito.doReturn ( validationResult ) . when ( diskVmElementValidator ) . isPassDiscardSupported ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ; }

Target:
private void mockDiskVmElementValidatorPassDiscardValidation ( org.ovirt.engine.core.common.businessentities.storage.Disk disk , org.ovirt.engine.core.common.businessentities.storage.DiskVmElement diskVmElement , org.ovirt.engine.core.bll.ValidationResult validationResult ) { org.ovirt.engine.core.bll.validator.storage.DiskVmElementValidator diskVmElementValidator = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.validator.storage.DiskVmElementValidator ( disk , diskVmElement ) ) ; org.mockito.Mockito.doReturn ( diskVmElementValidator ) . when ( multipleDiskVmElementValidator ) . createDiskVmElementValidator ( disk , diskVmElement ) ; org.mockito.Mockito.doReturn ( validationResult ) . when ( diskVmElementValidator ) . isPassDiscardSupported ( org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ; }
Source:
private void mockVdsWithOsVersion ( java.lang.String osVersion ) { org.ovirt.engine.core.common.businessentities.VDS vds = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; vds.setVdsType ( VDSType.oVirtVintageNode ) ; vds.setHostOs ( osVersion ) ; org.mockito.Mockito.when ( vdsDao.get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( vds ) ; }

Target:
private void mockVdsWithOsVersion ( java.lang.String osVersion ) { org.ovirt.engine.core.common.businessentities.VDS vds = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; vds.setVdsType ( VDSType.oVirtVintageNode ) ; vds.setHostOs ( osVersion ) ; org.mockito.Mockito.when ( vdsDao.get ( org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( vds ) ; }
Source:
public void setVolumeType ( org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeType volumeType ) { this . volumeType = volumeType ; switch ( volumeType ) { case DISTRIBUTE : setReplicaCount ( 0 ) ; setStripeCount ( 0 ) ; break ; case REPLICATE : case DISTRIBUTED_REPLICATE : setStripeCount ( 0 ) ; break ; case STRIPE : case DISTRIBUTED_STRIPE : setReplicaCount ( 0 ) ; break ; } }

Target:
public void setVolumeType ( org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeType volumeType ) { this . volumeType = volumeType ; if ( ! ( volumeType.isReplicatedType ( ) ) ) { setReplicaCount ( 0 ) ; } if ( ! ( volumeType.isStripedType ( ) ) ) { setStripeCount ( 0 ) ; } }
Source:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { java.lang.String propName = ( ( org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ) ( args ) ) . PropertyName ; if ( "IsHostAvailable" . equals ( propName ) ) { setupHostTabAvailability ( object ) ; } else if ( "IsHostTabValid" . equals ( propName ) ) { if ( object.getIsHostTabValid ( ) ) { hostTab.markAsValid ( ) ; } else { hostTab.markAsInvalid ( null ) ; } } }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { java.lang.String propName = ( ( org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ) ( args ) ) . PropertyName ; if ( "IsHostAvailable" . equals ( propName ) ) { setupHostTabAvailability ( object ) ; } else if ( "IsHostTabValid" . equals ( propName ) ) { if ( object.getIsHostTabValid ( ) ) { hostTab.markAsValid ( ) ; } else { hostTab.markAsInvalid ( null ) ; } } else if ( "IsCustomPropertiesTabAvailable" . equals ( propName ) ) { setupCustomPropertiesAvailability ( object ) ; } }
Source:
public boolean validate ( ) { getName ( ) . validateEntity ( new org.ovirt.engine.ui.uicommonweb.validation.IValidation [ ] { new org.ovirt.engine.ui.uicommonweb.validation.NotEmptyValidation ( ) , new org.ovirt.engine.ui.uicommonweb.validation.AsciiNameValidation ( ) } ) ; return ( getName ( ) . getIsValid ( ) ) && ( getCustomPropertySheet ( ) . validate ( ) ) ; }

Target:
public boolean validate ( ) { getName ( ) . validateEntity ( new org.ovirt.engine.ui.uicommonweb.validation.IValidation [ ] { new org.ovirt.engine.ui.uicommonweb.validation.NotEmptyValidation ( ) , new org.ovirt.engine.ui.uicommonweb.validation.LengthValidation ( org.ovirt.engine.core.common.businessentities.BusinessEntitiesDefinitions.NETWORK_NAME_SIZE ) } ) ; return ( getName ( ) . getIsValid ( ) ) && ( getCustomPropertySheet ( ) . validate ( ) ) ; }
Source:
protected boolean canDoAction ( ) { if ( ! ( super . canDoAction ( ) ) ) { return false ; } oldMacPool = getMacPoolDao ( ) . get ( getParameters ( ) . getMacPoolId ( ) ) ; final org.ovirt.engine.core.bll.MacPoolValidator validator = new org.ovirt.engine.core.bll.MacPoolValidator ( oldMacPool , null ) ; return ( ( validate ( validator.macPoolExists ( ) ) ) && ( validate ( validator.isNotUsed ( ) ) ) ) && ( validate ( validator.oldMacPoolIsNotDefault ( ) ) ) ; }

Target:
public java.lang.String getMacPoolName ( ) { return oldMacPool.getName ( ) ; }
Source:
private void applyNetworkChangesToHosts ( ) { org.ovirt.engine.core.bll.network.dc.UpdateNetworkCommand < T > . SyncNetworkParametersBuilder builder = new SyncNetworkParametersBuilder ( ) ; java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > parameters = builder.buildParameters ( org.ovirt.engine.core.bll.network.dc.UpdateNetworkCommand.getNetwork ( ) , getOldNetwork ( ) ) ; if ( ! ( parameters.isEmpty ( ) ) ) { org.ovirt.engine.core.bll.network.dc.UpdateNetworkCommand.getBackend ( ) . runInternalMultipleActions ( VdcActionType.PersistentSetupNetworks , parameters ) ; } }

Target:
private void applyNetworkChangesToHosts ( ) { org.ovirt.engine.core.bll.network.dc.UpdateNetworkCommand < T > . SyncNetworkParametersBuilder builder = new SyncNetworkParametersBuilder ( ) ; java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > parameters = builder.buildParameters ( org.ovirt.engine.core.bll.network.dc.UpdateNetworkCommand.getNetwork ( ) , getOldNetwork ( ) ) ; if ( ! ( parameters.isEmpty ( ) ) ) { org.ovirt.engine.core.bll.network.NetworkParametersBuilder.updateParametersSequencing ( parameters ) ; org.ovirt.engine.core.bll.network.dc.UpdateNetworkCommand.getBackend ( ) . runInternalMultipleActions ( VdcActionType.PersistentSetupNetworks , parameters ) ; } }
Source:
protected void executeQueryCommand ( ) { org.ovirt.engine.core.bll.GetHostsByClusterIdQuery.getQueryReturnValue ( ) . setReturnValue ( org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVdsDao ( ) . getAllForCluster ( org.ovirt.engine.core.bll.GetHostsByClusterIdQuery.getParameters ( ) . getId ( ) , org.ovirt.engine.core.bll.GetHostsByClusterIdQuery.getUserID ( ) , org.ovirt.engine.core.bll.GetHostsByClusterIdQuery.getParameters ( ) . isFiltered ( ) ) ) ; }

Target:
protected void executeQueryCommand ( ) { org.ovirt.engine.core.bll.GetHostsByClusterIdQuery.getQueryReturnValue ( ) . setReturnValue ( vdsDao.getAllForCluster ( org.ovirt.engine.core.bll.GetHostsByClusterIdQuery.getParameters ( ) . getId ( ) , org.ovirt.engine.core.bll.GetHostsByClusterIdQuery.getUserID ( ) , org.ovirt.engine.core.bll.GetHostsByClusterIdQuery.getParameters ( ) . isFiltered ( ) ) ) ; }
Source:
public static java.util.ArrayList < org.ovirt.engine.core.common.EventNotificationEntity > GetEventNotificationTypeList ( ) { java.util.ArrayList < org.ovirt.engine.core.common.EventNotificationEntity > ret = new java.util.ArrayList < org.ovirt.engine.core.common.EventNotificationEntity > ( ) ; for ( org.ovirt.engine.core.common.EventNotificationEntity entity : org.ovirt.engine.core.compat.EnumCompat.GetValues ( org.ovirt.engine.core.common.EventNotificationEntity.class ) ) { if ( entity != ( org.ovirt.engine.core.common.EventNotificationEntity.UNKNOWN ) ) { ret.add ( entity ) ; } } return ret ; }

Target:
public static java.util.ArrayList < org.ovirt.engine.core.common.EventNotificationEntity > GetEventNotificationTypeList ( ) { java.util.ArrayList < org.ovirt.engine.core.common.EventNotificationEntity > ret = new java.util.ArrayList < org.ovirt.engine.core.common.EventNotificationEntity > ( ) ; for ( org.ovirt.engine.core.common.EventNotificationEntity entity : org.ovirt.engine.core.common.EventNotificationEntity.values ( ) ) { if ( entity != ( org.ovirt.engine.core.common.EventNotificationEntity.UNKNOWN ) ) { ret.add ( entity ) ; } } return ret ; }
Source:
public org.ovirt.engine.core.bll.ValidationResult isReadOnlyPropertyCompatibleWithInterface ( ) { if ( java.lang.Boolean.TRUE.equals ( disk.getReadOnly ( ) ) ) { org.ovirt.engine.core.common.businessentities.DiskInterface diskInterface = disk.getDiskInterface ( ) ; if ( ( diskInterface == ( org.ovirt.engine.core.common.businessentities.DiskInterface.IDE ) ) || ( ( diskInterface == ( org.ovirt.engine.core.common.businessentities.DiskInterface.VirtIO_SCSI ) ) && ( ( disk.getDiskStorageType ( ) ) == ( org.ovirt.engine.core.common.businessentities.Disk.DiskStorageType.LUN ) ) ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.ACTION_TYPE_FAILED_INTERFACE_DOES_NOT_SUPPORT_READ_ONLY_ATTR , java.lang.String.format ( "$interface %1$s" , diskInterface ) ) ; } } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult isReadOnlyPropertyCompatibleWithInterface ( ) { if ( java.lang.Boolean.TRUE.equals ( disk.getReadOnly ( ) ) ) { org.ovirt.engine.core.common.businessentities.DiskInterface diskInterface = disk.getDiskInterface ( ) ; if ( diskInterface == ( org.ovirt.engine.core.common.businessentities.DiskInterface.IDE ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.ACTION_TYPE_FAILED_INTERFACE_DOES_NOT_SUPPORT_READ_ONLY_ATTR , java.lang.String.format ( "$interface %1$s" , diskInterface ) ) ; } if ( disk.isScsiPassthrough ( ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.SCSI_PASSTHROUGH_IS_NOT_SUPPORTED_FOR_READ_ONLY_DISK ) ; } } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }
Source:
public static void getVmById ( 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.getInstance ( ) . runQuery ( VdcQueryType.GetVmByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) , aQuery ) ; }

Target:
public static void getClusterById ( 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 ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVdsGroupById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }
Source:
private org.ovirt.engine.core.bll.provider.network.NetworkProviderProxy getProviderProxy ( ) { if ( ( providerProxy ) == null ) { org.ovirt.engine.core.common.businessentities.Provider < ? > provider = providerDao.get ( getNetwork ( ) . getProvidedBy ( ) . getProviderId ( ) ) ; providerProxy = org.ovirt.engine.core.bll.provider.ProviderProxyFactory.getInstance ( ) . create ( provider ) ; } return providerProxy ; }

Target:
private org.ovirt.engine.core.bll.provider.network.NetworkProviderProxy getProviderProxy ( ) { if ( ( providerProxy ) == null ) { org.ovirt.engine.core.common.businessentities.Provider < ? > provider = providerDao.get ( getNetwork ( ) . getProvidedBy ( ) . getProviderId ( ) ) ; providerProxy = providerProxyFactory.create ( provider ) ; } return providerProxy ; }
Source:
protected void raiseLoggedInEvent ( ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.CacheConfigValues ( new org.ovirt.engine.ui.frontend.AsyncQuery ( this , new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void OnSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.LoginModel loginModel = ( ( org.ovirt.engine.ui.uicommonweb.models.LoginModel ) ( target ) ) ; loginModel.getLoggedInEvent ( ) . raise ( this , EventArgs.Empty ) ; } } ) ) ; }

Target:
protected void raiseLoggedInEvent ( ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.initCache ( this ) ; }
Source:
public static void GetDiskMaxSize ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Integer ) ( source ) ) . intValue ( ) : 0 ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.MaxBlockDiskSize , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public static void GetUpHostListByCluster ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String clusterName ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > list = org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.VDS > Cast ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.IVdcQueryable > ) ( source ) ) ) ; return list ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ( ) ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetUpHostListByCluster ( aQuery , clusterName , null ) ; }
Source:
private void syncDbRecordsMergeFailure ( ) { org.ovirt.engine.core.common.businessentities.DiskImage curr = org.ovirt.engine.core.bll.RemoveSnapshotSingleDiskLiveCommand.getDestinationDiskImage ( ) ; while ( ! ( curr.getImageId ( ) . equals ( org.ovirt.engine.core.bll.RemoveSnapshotSingleDiskLiveCommand.getDiskImage ( ) . getImageId ( ) ) ) ) { curr = org.ovirt.engine.core.bll.RemoveSnapshotSingleDiskLiveCommand.getDbFacade ( ) . getDiskImageDao ( ) . getSnapshotById ( curr.getParentId ( ) ) ; org.ovirt.engine.core.bll.RemoveSnapshotSingleDiskLiveCommand.getImageDao ( ) . updateStatus ( curr.getImageId ( ) , ImageStatus.ILLEGAL ) ; } }

Target:
private void syncDbRecordsMergeFailure ( ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage curr = org.ovirt.engine.core.bll.RemoveSnapshotSingleDiskLiveCommand.getDestinationDiskImage ( ) ; while ( ! ( curr.getImageId ( ) . equals ( org.ovirt.engine.core.bll.RemoveSnapshotSingleDiskLiveCommand.getDiskImage ( ) . getImageId ( ) ) ) ) { curr = org.ovirt.engine.core.bll.RemoveSnapshotSingleDiskLiveCommand.getDbFacade ( ) . getDiskImageDao ( ) . getSnapshotById ( curr.getParentId ( ) ) ; org.ovirt.engine.core.bll.RemoveSnapshotSingleDiskLiveCommand.getImageDao ( ) . updateStatus ( curr.getImageId ( ) , ImageStatus.ILLEGAL ) ; } }
Source:
private static int getNextImage ( java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > images , org.ovirt.engine.core.common.businessentities.DiskImage curr ) { for ( int i = 0 ; i < ( images.size ( ) ) ; i ++ ) { if ( images.get ( i ) . getParentId ( ) . equals ( curr.getImageId ( ) ) ) { return i ; } } return - 1 ; }

Target:
public org.ovirt.engine.core.common.action.VdcReturnValueBase getReturnValue ( ) { return super . getReturnValue ( ) ; }
Source:
public static void getVmConfigurationBySnapshot ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid snapshotSourceId ) { 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.VM ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmConfigurationBySnapshot , new org.ovirt.engine.core.common.queries.IdQueryParameters ( snapshotSourceId ) . withoutRefresh ( ) , aQuery ) ; }

Target:
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.getInstance ( ) . runQuery ( VdcQueryType.GetNextAvailableDiskAliasNameByVMId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) , aQuery ) ; }
Source:
protected void showErrataListWithDetailsPopup ( ) { if ( ( getWindow ( ) ) != null ) { return ; } org.ovirt.engine.ui.uicommonweb.models.HostErrataCountModel transferObj = new org.ovirt.engine.ui.uicommonweb.models.HostErrataCountModel ( ) ; transferObj.setTitle ( org.ovirt.engine.ui.uicommonweb.models.HostErrataCountModel.messages.errataForHost ( getName ( ) ) ) ; transferObj.setGuid ( getGuid ( ) ) ; transferObj.setName ( getName ( ) ) ; setWindow ( transferObj ) ; initCommands ( transferObj ) ; }

Target:
protected void showErrataListWithDetailsPopup ( java.lang.String filterCommand ) { super . showErrataListWithDetailsPopup ( filterCommand , org.ovirt.engine.ui.uicommonweb.models.HostErrataCountModel.messages.errataForHost ( getEntity ( ) . getName ( ) ) ) ; }
Source:
public static int GetMinimalVmMemSize ( ) { org.ovirt.engine.core.common.queries.VdcQueryReturnValue returnValue = org.ovirt.engine.ui.uicommonweb.DataProvider.GetConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.VMMinMemorySizeInMB ) ) ; if ( ( ( returnValue != null ) && ( returnValue.getSucceeded ( ) ) ) && ( ( returnValue.getReturnValue ( ) ) != null ) ) { return ( ( java.lang.Integer ) ( returnValue.getReturnValue ( ) ) ) ; } return 1 ; }

Target:
public static int GetMinimalVmMemSize ( ) { org.ovirt.engine.core.common.queries.VdcQueryReturnValue returnValue = org.ovirt.engine.ui.uicommonweb.DataProvider.GetConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.VMMinMemorySizeInMB , org.ovirt.engine.core.common.config.Config.DefaultConfigurationVersion ) ) ; if ( ( ( returnValue != null ) && ( returnValue.getSucceeded ( ) ) ) && ( ( returnValue.getReturnValue ( ) ) != null ) ) { return ( ( java.lang.Integer ) ( returnValue.getReturnValue ( ) ) ) ; } return 1 ; }
Source:
protected java.util.List < Q > getBackendCollection ( org.ovirt.engine.core.common.queries.VdcQueryType query , org.ovirt.engine.core.common.queries.VdcQueryParametersBase queryParams , org.ovirt.engine.core.common.interfaces.SearchType searchType ) { java.util.List < Q > filteredList = getBackendCollection ( entityType , query , queryParams ) ; java.lang.String search = org.ovirt.engine.api.restapi.util.ParametersHelper.getParameter ( httpHeaders , uriInfo , QueryHelper.CONSTRAINT_PARAMETER ) ; if ( search != null ) { java.util.List < Q > searchList = getBackendCollection ( searchType ) ; return ( ( java.util.List < Q > ) ( org.apache.commons.collections.CollectionUtils.intersection ( filteredList , searchList ) ) ) ; } else { return filteredList ; } }

Target:
protected java.util.List < Q > getBackendCollection ( org.ovirt.engine.core.common.queries.VdcQueryType query , org.ovirt.engine.core.common.queries.VdcQueryParametersBase queryParams , org.ovirt.engine.core.common.interfaces.SearchType searchType ) { java.util.List < Q > filteredList = getBackendCollection ( entityType , query , queryParams ) ; java.lang.String search = org.ovirt.engine.api.restapi.util.ParametersHelper.getParameter ( httpHeaders , uriInfo , QueryHelper.CONSTRAINT_PARAMETER ) ; if ( search != null ) { java.util.List < Q > searchList = getBackendCollection ( searchType ) ; return safeIntersection ( searchList , filteredList ) ; } else { return filteredList ; } }
Source:
public java.lang.String [ ] getFilteredLocaleNames ( java.util.List < java.lang.String > allLocaleNames ) { java.util.List < java.lang.String > result = new java.util.ArrayList < java.lang.String > ( allLocaleNames ) ; java.util.List < java.lang.String > hiddenList = new java.util.ArrayList < java.lang.String > ( allLocaleNames ) ; hiddenList.removeAll ( getVisibleList ( ) ) ; result.removeAll ( hiddenList ) ; java.util.Collections.sort ( result ) ; return result.toArray ( new java.lang.String [ result.size ( ) ] ) ; }

Target:
public static java.lang.String [ ] getFilteredLocaleNames ( java.util.List < java.lang.String > allLocaleNames ) { java.util.List < java.lang.String > result = new java.util.ArrayList < java.lang.String > ( allLocaleNames ) ; java.util.List < java.lang.String > hiddenList = new java.util.ArrayList < java.lang.String > ( allLocaleNames ) ; hiddenList.removeAll ( org.ovirt.engine.ui.common.utils.VisibleLocalesInfoData.getVisibleList ( ) ) ; result.removeAll ( hiddenList ) ; java.util.Collections.sort ( result ) ; return result.toArray ( new java.lang.String [ result.size ( ) ] ) ; }
Source:
public boolean storageDomainRemoved ( org.ovirt.engine.core.common.businessentities.StorageDomainStatic storageDomain ) { org.ovirt.engine.core.common.businessentities.StorageServerConnections connection = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStorageServerConnectionDao ( ) . get ( storageDomain.getstorage ( ) ) ; if ( connection != null ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStorageServerConnectionDao ( ) . remove ( connection.getid ( ) ) ; } return true ; }

Target:
public boolean storageDomainRemoved ( org.ovirt.engine.core.common.businessentities.StorageDomainStatic storageDomain ) { org.ovirt.engine.core.common.businessentities.StorageServerConnections connection = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStorageServerConnectionDao ( ) . get ( storageDomain.getStorage ( ) ) ; if ( connection != null ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStorageServerConnectionDao ( ) . remove ( connection.getid ( ) ) ; } return true ; }
Source:
public void testUpdate ( ) throws java.lang.Exception { setUpGetEntityExpectations ( 1 ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.UpdateVmNicFilterParameter , org.ovirt.engine.core.common.action.VmNicFilterParameterParameters.class , new java.lang.String [ ] { "VmId" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendVmNicFilterParameterResourceTest.VM_ID } , true , true ) ) ; org.ovirt.engine.api.model.NetworkFilterParameter parameter = resource.update ( getParameter ( ) ) ; assertNotNull ( parameter ) ; }

Target:
public void testUpdate ( ) throws java.lang.Exception { setUpGetEntityExpectations ( 1 ) ; setUriInfo ( setUpActionExpectations ( ActionType.UpdateVmNicFilterParameter , org.ovirt.engine.core.common.action.VmNicFilterParameterParameters.class , new java.lang.String [ ] { "VmId" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendVmNicFilterParameterResourceTest.VM_ID } , true , true ) ) ; org.ovirt.engine.api.model.NetworkFilterParameter parameter = resource.update ( getParameter ( ) ) ; assertNotNull ( parameter ) ; }
Source:
public void testMissingSubFieldAlternatives ( ) throws java.lang.Exception { org.ovirt.engine.api.model.VM vm = new org.ovirt.engine.api.model.VM ( ) ; vm.setDescription ( "incomplete" ) ; vm.setHost ( new org.ovirt.engine.api.model.Host ( ) ) ; try { org.ovirt.engine.api.common.util.CompletenessAssertor.validateParameters ( vm , "host.id|name" ) ; fail ( "expected WebApplicationException on incomplete model" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyIncompleteException ( wae , "VM" , "host.id|name" ) ; } }

Target:
public void testMissingSubFieldAlternatives ( ) throws java.lang.Exception { org.ovirt.engine.api.model.Vm vm = new org.ovirt.engine.api.model.Vm ( ) ; vm.setDescription ( "incomplete" ) ; vm.setHost ( new org.ovirt.engine.api.model.Host ( ) ) ; try { org.ovirt.engine.api.common.util.CompletenessAssertor.validateParameters ( vm , "host.id|name" ) ; fail ( "expected WebApplicationException on incomplete model" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyIncompleteException ( wae , "Vm" , "host.id|name" ) ; } }
Source:
public void getPermissionsByAdElementId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid userId ) { 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.Permission > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Permission > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetPermissionsByAdElementId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( userId ) , 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 ) ) ) ; } } ; 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 static void getTemplateDiskList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid templateId ) { 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.DiskImage > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVmTemplatesDisks , new org.ovirt.engine.core.common.queries.GetVmTemplatesDisksParameters ( templateId ) , aQuery ) ; }

Target:
public static void getStorageDomainListByTemplate ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid templateId ) { 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.RunQuery ( VdcQueryType.GetStorageDomainsByVmTemplateId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( templateId ) , aQuery ) ; }
Source:
protected void setClientTokenProvider ( com.woorea.openstack.quantum.Quantum client ) { if ( org.apache.commons.lang.StringUtils.isEmpty ( provider.getAdditionalProperties ( ) . getTenantName ( ) ) ) { com.woorea.openstack.base.client.OpenStackTokenProvider tokenProvider = new org.ovirt.engine.core.bll.provider.network.openstack.ExternalNetworkTokenProvider ( provider ) ; client.setTokenProvider ( tokenProvider ) ; } else { super . setClientTokenProvider ( client ) ; } }

Target:
protected void setClientTokenProvider ( com.woorea.openstack.quantum.Quantum client ) { if ( org.apache.commons.lang.StringUtils.isEmpty ( getProvider ( ) . getAdditionalProperties ( ) . getTenantName ( ) ) ) { com.woorea.openstack.base.client.OpenStackTokenProvider tokenProvider = new org.ovirt.engine.core.bll.provider.network.openstack.ExternalNetworkTokenProvider ( getProvider ( ) ) ; client.setTokenProvider ( tokenProvider ) ; } else { super . setClientTokenProvider ( client ) ; } }
Source:
public void setUp ( ) { initializeOsRepository ( DiskInterface.VirtIO ) ; disk = new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ; dve = new org.ovirt.engine.core.common.businessentities.storage.DiskVmElement ( ) ; validator = new org.ovirt.engine.core.bll.validator.storage.DiskVmElementValidator ( disk , dve ) ; }

Target:
public void setUp ( ) { org.ovirt.engine.core.common.utils.SimpleDependencyInjector.getInstance ( ) . bind ( org.ovirt.engine.core.common.osinfo.OsRepository.class , osRepository ) ; initializeInterfaceValidation ( DiskInterface.VirtIO ) ; disk = new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ; dve = new org.ovirt.engine.core.common.businessentities.storage.DiskVmElement ( ) ; validator = new org.ovirt.engine.core.bll.validator.storage.DiskVmElementValidator ( disk , dve ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeGeoRepStatusForXmlRpc glusterVolumeGeoRepStatus ( ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "GlusterVolume.geoRepStatus" ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) . withIgnoreResponseKey ( ) ; return new org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeGeoRepStatusForXmlRpc ( response ) ; }

Target:
public org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeGeoRepStatusForXmlRpc glusterVolumeGeoRepSessionList ( java.lang.String volumeName , java.lang.String slaveHost , java.lang.String slaveVolumeName , java.lang.String userName ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "GlusterVolume.geoRepSessionList" ) . withParameter ( "volumeName" , volumeName ) . withParameter ( "remoteHost" , slaveHost ) . withParameter ( "remoteVolumeName" , slaveVolumeName ) . withOptionalParameter ( "remoteUserName" , userName ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) . withIgnoreResponseKey ( ) ; return new org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeGeoRepStatusForXmlRpc ( response ) ; }
Source:
private static boolean validateQuotaStorageLimitation ( org.ovirt.engine.core.common.businessentities.Quota quota , java.util.List < java.lang.String > messages ) { boolean isValid = true ; java.util.List < org.ovirt.engine.core.common.businessentities.QuotaStorage > quotaStorageList = quota.getQuotaStorages ( ) ; if ( ( quota.isGlobalStorageQuota ( ) ) && ( ( quotaStorageList != null ) && ( ! ( quotaStorageList.isEmpty ( ) ) ) ) ) { messages.add ( EngineMessage.ACTION_TYPE_FAILED_QUOTA_LIMIT_IS_SPECIFIC_AND_GENERAL.toString ( ) ) ; isValid = false ; } return isValid ; }

Target:
private boolean validateQuotaStorageLimitation ( org.ovirt.engine.core.common.businessentities.Quota quota ) { boolean isValid = true ; java.util.List < org.ovirt.engine.core.common.businessentities.QuotaStorage > quotaStorageList = quota.getQuotaStorages ( ) ; if ( ( quota.isGlobalStorageQuota ( ) ) && ( ( quotaStorageList != null ) && ( ! ( quotaStorageList.isEmpty ( ) ) ) ) ) { addValidationMessage ( EngineMessage.ACTION_TYPE_FAILED_QUOTA_LIMIT_IS_SPECIFIC_AND_GENERAL ) ; isValid = false ; } return isValid ; }
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.storage_pool > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.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 static void GetDataCenterListByName ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String name ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage_pool > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( ( ( "DataCenter: name=" + name ) + " sortby name" ) , org.ovirt.engine.core.common.interfaces.SearchType.StoragePool ) , aQuery ) ; }
Source:
public void canDoActionDiskIsLocked ( ) throws java.lang.Exception { initializeCommand ( ImageOperation.Move ) ; initVmDiskImage ( ) ; initVmForFail ( ) ; command.getImage ( ) . setImageStatus ( ImageStatus.LOCKED ) ; org.mockito.Mockito.doReturn ( vmDeviceDao ) . when ( command ) . getVmDeviceDAO ( ) ; org.junit.Assert.assertFalse ( command.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( command.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( VdcBllMessages.ACTION_TYPE_FAILED_DISKS_LOCKED.toString ( ) ) ) ; }

Target:
public void canDoActionSameSourceAndDest ( ) throws java.lang.Exception { destStorageId = srcStorageId ; initializeCommand ( ImageOperation.Move ) ; initVmDiskImage ( false ) ; mockGetVmsListForDisk ( ) ; initSrcStorageDomain ( ) ; org.junit.Assert.assertFalse ( command.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( command.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( VdcBllMessages.ACTION_TYPE_FAILED_SOURCE_AND_TARGET_SAME.toString ( ) ) ) ; }
Source:
public void canDoActionVmShareableDisk ( ) { createParameters ( ) ; org.ovirt.engine.core.common.businessentities.DiskImage diskImage = initDiskImage ( diskImageGroupId , diskImageId ) ; diskImage.setShareable ( true ) ; initVm ( VMStatus.Up , org.ovirt.engine.core.compat.Guid.newGuid ( ) , diskImageGroupId ) ; org.junit.Assert.assertFalse ( command.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( command.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( VdcBllMessages.ACTION_TYPE_FAILED_SHAREABLE_DISK_NOT_SUPPORTED.toString ( ) ) ) ; }

Target:
public void canDoActionVmShareableDisk ( ) { createParameters ( ) ; org.ovirt.engine.core.common.businessentities.storage.DiskImage diskImage = initDiskImage ( diskImageGroupId , diskImageId ) ; diskImage.setShareable ( true ) ; initVm ( VMStatus.Up , org.ovirt.engine.core.compat.Guid.newGuid ( ) , diskImageGroupId ) ; org.junit.Assert.assertFalse ( command.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( command.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( VdcBllMessages.ACTION_TYPE_FAILED_SHAREABLE_DISK_NOT_SUPPORTED.toString ( ) ) ) ; }
Source:
private org.ovirt.engine.sdk.entities.RSDL loadRsdl ( java.lang.String rsdlPath ) throws java.io.IOException , javax.xml.bind.JAXBException { javax.xml.bind.JAXBContext context = javax.xml.bind.JAXBContext.newInstance ( org.ovirt.engine.sdk.entities.RSDL.class ) ; javax.xml.bind.Unmarshaller unmarshaller = context.createUnmarshaller ( ) ; javax.xml.transform.Source source = new javax.xml.transform.stream.StreamSource ( new java.io.File ( rsdlPath ) ) ; javax.xml.bind.JAXBElement < org.ovirt.engine.sdk.entities.RSDL > element = unmarshaller.unmarshal ( source , org.ovirt.engine.sdk.entities.RSDL.class ) ; return element.getValue ( ) ; }

Target:
private org.ovirt.engine.sdk.entities.RSDL loadRsdl ( java.lang.String rsdlPath ) throws java.io.IOException { try { javax.xml.bind.JAXBContext context = javax.xml.bind.JAXBContext.newInstance ( org.ovirt.engine.sdk.entities.RSDL.class ) ; javax.xml.bind.Unmarshaller unmarshaller = context.createUnmarshaller ( ) ; javax.xml.transform.Source source = new javax.xml.transform.stream.StreamSource ( new java.io.File ( rsdlPath ) ) ; javax.xml.bind.JAXBElement < org.ovirt.engine.sdk.entities.RSDL > element = unmarshaller.unmarshal ( source , org.ovirt.engine.sdk.entities.RSDL.class ) ; return element.getValue ( ) ; } catch ( javax.xml.bind.JAXBException exception ) { throw new java.io.IOException ( exception ) ; } }
Source:
private org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity getVolume ( int brickCount , boolean withDuplicateBricks ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity volumeEntity = new org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity ( ) ; volumeEntity.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; volumeEntity.setClusterId ( clusterId ) ; volumeEntity.setName ( "vol1" ) ; volumeEntity.setVolumeType ( GlusterVolumeType.DISTRIBUTE ) ; volumeEntity.setBricks ( getBricks ( volumeEntity.getId ( ) , brickCount , withDuplicateBricks ) ) ; return volumeEntity ; }

Target:
private org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity getVolume ( int brickCount , boolean withDuplicateBricks , org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeType volumeType , int replicaCount , boolean isArbiter ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity volumeEntity = new org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity ( ) ; volumeEntity.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; volumeEntity.setClusterId ( org.ovirt.engine.core.bll.gluster.CreateGlusterVolumeCommandTest.clusterId ) ; volumeEntity.setName ( "vol1" ) ; volumeEntity.setVolumeType ( volumeType ) ; volumeEntity.setBricks ( getBricks ( volumeEntity.getId ( ) , brickCount , withDuplicateBricks ) ) ; volumeEntity.setReplicaCount ( replicaCount ) ; volumeEntity.setIsArbiter ( isArbiter ) ; return volumeEntity ; }
Source:
public void getUpHostListByCluster ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String clusterName ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > list = org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.VDS > cast ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.IVdcQueryable > ) ( source ) ) ) ; return list ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ( ) ; } } ; getUpHostListByCluster ( aQuery , clusterName , null ) ; }

Target:
public void getMaxSpmPriority ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Integer ) ( source ) ) . intValue ( ) : 0 ; } } ; aQuery.asyncCallback.onSuccess ( aQuery.getModel ( ) , 10 ) ; }
Source:
protected void localize ( org.ovirt.engine.ui.webadmin.ApplicationConstants constants ) { dataCenterEditor.setLabel ( constants.networkPopupDataCenterLabel ( ) ) ; assignLabel.setText ( constants.networkPopupAssignLabel ( ) ) ; nameEditor.setLabel ( constants.nameLabel ( ) ) ; descriptionEditor.setLabel ( constants.descriptionLabel ( ) ) ; isVmNetworkEditor.setLabel ( constants.vmNetworkLabel ( ) ) ; vlanTagging.setLabel ( constants.enableVlanTagLabel ( ) ) ; hasMtuEditor.setLabel ( constants.overrideMtuLabel ( ) ) ; }

Target:
protected void localize ( org.ovirt.engine.ui.webadmin.ApplicationConstants constants ) { dataCenterEditor.setLabel ( constants.networkPopupDataCenterLabel ( ) ) ; assignLabel.setText ( constants.networkPopupAssignLabel ( ) ) ; nameEditor.setLabel ( constants.nameLabel ( ) ) ; descriptionEditor.setLabel ( constants.descriptionLabel ( ) ) ; isVmNetworkEditor.setLabel ( constants.vmNetworkLabel ( ) ) ; vlanTagging.setLabel ( constants.enableVlanTagLabel ( ) ) ; hasMtuEditor.setLabel ( constants.overrideMtuLabel ( ) ) ; publicUseEditor.setLabel ( constants.networkPublicUseLabel ( ) ) ; }
Source:
public static void getStorageDomainList ( 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.StorageDomain > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ( ) ; } } ; org.ovirt.engine.core.common.queries.SearchParameters searchParams = new org.ovirt.engine.core.common.queries.SearchParameters ( "Storage:" , org.ovirt.engine.core.common.interfaces.SearchType.StorageDomain ) ; searchParams.setMaxCount ( 9999 ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.Search , searchParams , aQuery ) ; }

Target:
public static void getVmTemplatesWithPermittedAction ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.common.businessentities.ActionGroup actionGroup ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.TemplateConverter ( ) ; org.ovirt.engine.core.common.queries.GetEntitiesWithPermittedActionParameters getEntitiesWithPermittedActionParameters = new org.ovirt.engine.core.common.queries.GetEntitiesWithPermittedActionParameters ( ) ; getEntitiesWithPermittedActionParameters.setActionGroup ( actionGroup ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmTemplatesWithPermittedAction , getEntitiesWithPermittedActionParameters , aQuery ) ; }
Source:
public static void getDomainList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , boolean filterInternalDomain ) { 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.lang.String > ( ( ( java.util.ArrayList < java.lang.String > ) ( source ) ) ) : new java.util.ArrayList < java.lang.String > ( ) ; } } ; org.ovirt.engine.core.common.queries.GetDomainListParameters tempVar = new org.ovirt.engine.core.common.queries.GetDomainListParameters ( ) ; tempVar.setFilterInternalDomain ( filterInternalDomain ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetDomainList , tempVar , 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:
public org.ovirt.engine.core.bll.ValidationResult vmNotRunningStateless ( ) { for ( org.ovirt.engine.core.common.businessentities.VM vm : vms ) { if ( org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getSnapshotDao ( ) . exists ( vm.getId ( ) , SnapshotType.STATELESS ) ) { org.ovirt.engine.core.common.errors.VdcBllMessages message = ( vm.isRunning ( ) ) ? org.ovirt.engine.core.common.errors.VdcBllMessages.ACTION_TYPE_FAILED_VM_RUNNING_STATELESS : org.ovirt.engine.core.common.errors.VdcBllMessages.ACTION_TYPE_FAILED_VM_HAS_STATELESS_SNAPSHOT_LEFTOVER ; return new org.ovirt.engine.core.bll.ValidationResult ( message ) ; } } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult vmNotRunningStateless ( ) { for ( org.ovirt.engine.core.common.businessentities.VM vm : vms ) { if ( org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getSnapshotDao ( ) . exists ( vm.getId ( ) , SnapshotType.STATELESS ) ) { org.ovirt.engine.core.common.errors.EngineMessage message = ( vm.isRunning ( ) ) ? org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_VM_RUNNING_STATELESS : org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_VM_HAS_STATELESS_SNAPSHOT_LEFTOVER ; return new org.ovirt.engine.core.bll.ValidationResult ( message ) ; } } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }