auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private void addGraphicsDevice ( ) { for ( org.ovirt.engine.core.common.businessentities.GraphicsDevice graphicsDevice : org.ovirt.engine.core.bll.AddVmTemplateCommand.getParameters ( ) . getGraphicsDevices ( ) . values ( ) ) { if ( graphicsDevice == null ) { continue ; } graphicsDevice.setVmId ( org.ovirt.engine.core.bll.AddVmTemplateCommand.getVmTemplateId ( ) ) ; org.ovirt.engine.core.bll.GraphicsParameters parameters = new org.ovirt.engine.core.bll.GraphicsParameters ( graphicsDevice ) . setVm ( false ) ; org.ovirt.engine.core.bll.AddVmTemplateCommand.getBackend ( ) . runInternalAction ( VdcActionType.AddGraphicsDevice , parameters ) ; } }

Target:
private void addGraphicsDevice ( ) { for ( org.ovirt.engine.core.common.businessentities.GraphicsDevice graphicsDevice : org.ovirt.engine.core.bll.AddVmTemplateCommand.getParameters ( ) . getGraphicsDevices ( ) . values ( ) ) { if ( graphicsDevice == null ) { continue ; } graphicsDevice.setVmId ( org.ovirt.engine.core.bll.AddVmTemplateCommand.getVmTemplateId ( ) ) ; org.ovirt.engine.core.common.action.GraphicsParameters parameters = new org.ovirt.engine.core.common.action.GraphicsParameters ( graphicsDevice ) . setVm ( false ) ; org.ovirt.engine.core.bll.AddVmTemplateCommand.getBackend ( ) . runInternalAction ( VdcActionType.AddGraphicsDevice , parameters ) ; } }
Source:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { newModel.getName ( ) . setEntity ( getName ( ) . getEntity ( ) ) ; }

Target:
public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result1 ) { org.ovirt.engine.core.common.action.VdcReturnValueBase retVal = result1.getReturnValue ( ) ; boolean succeeded = false ; if ( ( retVal != null ) && ( retVal.getSucceeded ( ) ) ) { succeeded = true ; } postSaveAction ( ( succeeded ? ( ( org.ovirt.engine.core.compat.Guid ) ( retVal.getActionReturnValue ( ) ) ) : null ) , succeeded ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.irsbroker.FileStatsReturnForXmlRpc getIsoList ( java.lang.String spUUID ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.getIsoList ( spUUID ) ; org.ovirt.engine.core.vdsbroker.irsbroker.FileStatsReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.irsbroker.FileStatsReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.LUNListReturnForXmlRpc getDeviceList ( int storageType , java.lang.String [ ] devicesList , boolean checkStatus ) { try { java.lang.String [ ] idsList = ( devicesList == null ) ? new java.lang.String [ ] { } : devicesList ; java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.getDeviceList ( storageType , idsList , checkStatus ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.LUNListReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.LUNListReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
Source:
private org.ovirt.engine.core.common.businessentities.VmTemplate getTemplateByName ( org.ovirt.engine.api.model.VM vm ) { return isFiltered ( ) ? lookupTemplateByName ( vm.getTemplate ( ) . getName ( ) ) : getEntity ( org.ovirt.engine.core.common.businessentities.VmTemplate.class , SearchType.VmTemplate , ( "Template: name=" + ( vm.getTemplate ( ) . getName ( ) ) ) ) ; }

Target:
protected void setSoundcard ( org.ovirt.engine.api.model.VM model ) { model.setSoundcardEnabled ( ( ! ( org.ovirt.engine.api.restapi.util.VmHelper.getSoundDevicesForEntity ( this , new org.ovirt.engine.core.compat.Guid ( model.getId ( ) ) ) . isEmpty ( ) ) ) ) ; }
Source:
protected org.ovirt.engine.core.bll.ValidationResult networkNotUsed ( java.util.List < ? extends org.ovirt.engine.core.common.businessentities.Nameable > entities , org.ovirt.engine.core.common.errors.VdcBllMessages entitiesReplacement ) { if ( entities.isEmpty ( ) ) { return org.ovirt.engine.core.bll.ValidationResult.VALID ; } java.util.Collection < java.lang.String > replacements = org.ovirt.engine.core.utils.ReplacementUtils.replaceWithNameable ( "ENTITIES_USING_NETWORK" , entities ) ; replacements.add ( entitiesReplacement.name ( ) ) ; return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.ACTION_TYPE_FAILED_NETWORK_IN_USE , replacements ) ; }

Target:
private java.util.Collection < java.lang.String > getEntitiesNames ( java.util.List < ? extends org.ovirt.engine.core.common.businessentities.Nameable > entities ) { java.util.List < java.lang.String > result = new java.util.ArrayList < > ( entities.size ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.Nameable itemName : entities ) { result.add ( itemName.getName ( ) ) ; } return result ; }
Source:
public void newQos ( ) { if ( ( org.ovirt.engine.ui.uicommonweb.models.datacenters.qos.DataCenterQosListModel.getWindow ( ) ) != null ) { return ; } final org.ovirt.engine.ui.uicommonweb.models.datacenters.qos.NewQosModel < T , P > newQosModel = getNewQosModel ( ) ; setWindow ( newQosModel ) ; newQosModel.getDataCenters ( ) . setItems ( java.util.Arrays.asList ( getEntity ( ) ) , getEntity ( ) ) ; }

Target:
public void newQos ( ) { if ( ( org.ovirt.engine.ui.uicommonweb.models.datacenters.qos.DataCenterQosListModel.getWindow ( ) ) != null ) { return ; } final org.ovirt.engine.ui.uicommonweb.models.datacenters.qos.QosModel < T , P > newQosModel = getNewQosModel ( ) ; setWindow ( newQosModel ) ; newQosModel.getDataCenters ( ) . setItems ( java.util.Arrays.asList ( org.ovirt.engine.ui.uicommonweb.models.datacenters.qos.DataCenterQosListModel.getEntity ( ) ) , org.ovirt.engine.ui.uicommonweb.models.datacenters.qos.DataCenterQosListModel.getEntity ( ) ) ; }
Source:
protected void UpdateActionAvailability ( ) { super . UpdateActionAvailability ( ) ; getConnectCommand ( ) . setIsExecutionAllowed ( ( ( ( ( ! ( getIsConnected ( ) ) ) && ( ( getEntity ( ) ) != null ) ) && ( ( getEntity ( ) . getDisplayType ( ) ) == ( org.ovirt.engine.core.common.businessentities.DisplayType.qxl ) ) ) && ( IsVmConnectReady ( ) ) ) ) ; }

Target:
private void spice_Connected ( java.lang.Object sender ) { setIsConnected ( true ) ; updateActionAvailability ( ) ; }
Source:
public static 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 ) ; }

Target:
public 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.storage.DiskImage > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmTemplatesDisks , new org.ovirt.engine.core.common.queries.IdQueryParameters ( templateId ) , aQuery ) ; }
Source:
protected void initStorageDomainId ( ) { if ( ( ( ( org.ovirt.engine.core.bll.RemoveImageCommand.getParameters ( ) . getStorageDomainId ( ) ) == null ) || ( Guid.Empty.equals ( org.ovirt.engine.core.bll.RemoveImageCommand.getParameters ( ) . getStorageDomainId ( ) ) ) ) && ( ( org.ovirt.engine.core.bll.RemoveImageCommand.getDiskImage ( ) ) != null ) ) { setStorageDomainId ( org.ovirt.engine.core.bll.RemoveImageCommand.getDiskImage ( ) . getstorage_ids ( ) . get ( 0 ) ) ; } }

Target:
protected void initStorageDomainId ( ) { if ( ( ( ( org.ovirt.engine.core.bll.RemoveImageCommand.getParameters ( ) . getStorageDomainId ( ) ) == null ) || ( Guid.Empty.equals ( org.ovirt.engine.core.bll.RemoveImageCommand.getParameters ( ) . getStorageDomainId ( ) ) ) ) && ( ( org.ovirt.engine.core.bll.RemoveImageCommand.getDiskImage ( ) ) != null ) ) { setStorageDomainId ( org.ovirt.engine.core.bll.RemoveImageCommand.getDiskImage ( ) . getStorageIds ( ) . get ( 0 ) ) ; } }
Source:
public static void GetExistingStorageDomainList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hostId , org.ovirt.engine.core.common.businessentities.StorageDomainType domainType , java.lang.String path ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetExistingStorageDomainList , new org.ovirt.engine.core.common.queries.GetExistingStorageDomainListParameters ( hostId , org.ovirt.engine.core.common.businessentities.StorageType.NFS , domainType , path ) , aQuery ) ; }

Target:
public static void GetGlusterHostsNewlyAdded ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId , boolean isFingerprintRequired ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAddedGlusterServers , new org.ovirt.engine.core.common.queries.gluster.AddedGlusterServersParameters ( clusterId , isFingerprintRequired ) , aQuery ) ; }
Source:
protected void executeQueryCommand ( ) { org.ovirt.engine.core.bll.GetAllRelevantQuotasForStorageQuery.getQueryReturnValue ( ) . setReturnValue ( org.ovirt.engine.core.bll.GetAllRelevantQuotasForStorageQuery.getDbFacade ( ) . getQuotaDAO ( ) . getAllRelevantQuotasForStorage ( org.ovirt.engine.core.bll.GetAllRelevantQuotasForStorageQuery.getParameters ( ) . getStorageId ( ) , org.ovirt.engine.core.bll.GetAllRelevantQuotasForStorageQuery.getUserID ( ) , org.ovirt.engine.core.bll.GetAllRelevantQuotasForStorageQuery.getParameters ( ) . isFiltered ( ) ) ) ; }

Target:
protected void executeQueryCommand ( ) { org.ovirt.engine.core.bll.GetAllRelevantQuotasForStorageQuery.getQueryReturnValue ( ) . setReturnValue ( org.ovirt.engine.core.bll.GetAllRelevantQuotasForStorageQuery.getDbFacade ( ) . getQuotaDao ( ) . getAllRelevantQuotasForStorage ( org.ovirt.engine.core.bll.GetAllRelevantQuotasForStorageQuery.getParameters ( ) . getStorageId ( ) , org.ovirt.engine.core.bll.GetAllRelevantQuotasForStorageQuery.getUserID ( ) , org.ovirt.engine.core.bll.GetAllRelevantQuotasForStorageQuery.getParameters ( ) . isFiltered ( ) ) ) ; }
Source:
public static void getNetworkList ( 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 ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.Network > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.Network > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllNetworks , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) , aQuery ) ; }

Target:
public static void getDataCenterMaxNameLength ( 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 ( ) : 1 ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.StoragePoolNameSizeLimit , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
public void getHostPublicKey ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.String ) ( source ) ) : "" ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetServerSSHPublicKey , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }

Target:
public 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 ) ; }
Source:
private java.util.List < org.ovirt.engine.api.model.Network > getNetworks ( java.lang.String clusterId ) { org.ovirt.engine.core.compat.Guid dataCenterId = getEntity ( org.ovirt.engine.core.common.businessentities.VDSGroup.class , VdcQueryType.GetVdsGroupById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( asGuid ( clusterId ) ) , null ) . getStoragePoolId ( ) ; org.ovirt.engine.core.common.queries.IdQueryParameters params = new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) ; return getBackendCollection ( VdcQueryType.GetAllNetworks , params ) ; }

Target:
private java.util.List < org.ovirt.engine.api.model.Network > getNetworks ( java.lang.String clusterId ) { org.ovirt.engine.core.compat.Guid dataCenterId = getEntity ( org.ovirt.engine.core.common.businessentities.Cluster.class , VdcQueryType.GetClusterById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( asGuid ( clusterId ) ) , null ) . getStoragePoolId ( ) ; org.ovirt.engine.core.common.queries.IdQueryParameters params = new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) ; return getBackendCollection ( VdcQueryType.GetAllNetworks , params ) ; }
Source:
private static void updateAdditionalFeatures ( org.ovirt.engine.core.common.businessentities.VDS vds , java.util.Map < java.lang.String , java.lang.Object > xmlRpcStruct ) { java.lang.String [ ] addtionalFeaturesSupportedByHost = org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectsBuilder.AssignStringArrayValue ( xmlRpcStruct , VdsProperties.ADDITIONAL_FEATURES ) ; if ( addtionalFeaturesSupportedByHost != null ) { for ( java.lang.String feature : addtionalFeaturesSupportedByHost ) { vds.getAdditionalFeatures ( ) . add ( feature ) ; } } }

Target:
private static void updateAdditionalFeatures ( org.ovirt.engine.core.common.businessentities.VDS vds , java.util.Map < java.lang.String , java.lang.Object > xmlRpcStruct ) { java.lang.String [ ] addtionalFeaturesSupportedByHost = org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectsBuilder.assignStringArrayValue ( xmlRpcStruct , VdsProperties.ADDITIONAL_FEATURES ) ; if ( addtionalFeaturesSupportedByHost != null ) { for ( java.lang.String feature : addtionalFeaturesSupportedByHost ) { vds.getAdditionalFeatures ( ) . add ( feature ) ; } } }
Source:
protected void executeCommand ( ) { org.ovirt.engine.core.common.businessentities.StoragePoolIsoMap map = loadStoragePoolIsoMap ( ) ; changeDomainStatusWithCompensation ( map , StorageDomainStatus.Unknown , StorageDomainStatus.Locked , org.ovirt.engine.core.bll.storage.domain.DeactivateStorageDomainWithOvfUpdateCommand.getCompensationContext ( ) ) ; if ( shouldPerformOvfUpdate ( ) ) { org.ovirt.engine.core.common.action.ProcessOvfUpdateForStoragePoolParameters parameters = new org.ovirt.engine.core.common.action.ProcessOvfUpdateForStoragePoolParameters ( org.ovirt.engine.core.bll.storage.domain.DeactivateStorageDomainWithOvfUpdateCommand.getStoragePoolId ( ) ) ; parameters.setUpdateStorage ( false ) ; runInternalAction ( VdcActionType.ProcessOvfUpdateForStoragePool , parameters , null ) ; runInternalActionWithTasksContext ( VdcActionType.ProcessOvfUpdateForStorageDomain , createProcessOvfUpdateForDomainParams ( ) , null ) ; } if ( org.ovirt.engine.core.bll.storage.domain.DeactivateStorageDomainWithOvfUpdateCommand.noAsyncOperations ( ) ) { executeDeactivateCommand ( ) ; } org.ovirt.engine.core.bll.storage.domain.DeactivateStorageDomainWithOvfUpdateCommand.setSucceeded ( true ) ; }

Target:
public org.ovirt.engine.core.bll.tasks.interfaces.CommandCallback getCallback ( ) { return shouldUseCallback ( ) ? callbackProvider.get ( ) : null ; }
Source:
private static java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > createStorageDomains ( org.ovirt.engine.core.compat.Guid sdIdToBeSelected ) { org.ovirt.engine.core.common.businessentities.StorageDomain sd1 = org.ovirt.engine.core.bll.memory.MemoryStorageHandlerTest.createStorageDomain ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , StorageType.NFS , org.ovirt.engine.core.bll.memory.MemoryStorageHandlerTest.LOW_SPACE_IN_GB ) ; org.ovirt.engine.core.common.businessentities.StorageDomain sd2 = org.ovirt.engine.core.bll.memory.MemoryStorageHandlerTest.createStorageDomain ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , StorageType.NFS , org.ovirt.engine.core.bll.memory.MemoryStorageHandlerTest.LOW_SPACE_IN_GB ) ; org.ovirt.engine.core.common.businessentities.StorageDomain sd3 = org.ovirt.engine.core.bll.memory.MemoryStorageHandlerTest.createStorageDomain ( sdIdToBeSelected , StorageType.NFS , org.ovirt.engine.core.bll.memory.MemoryStorageHandlerTest.ENOUGH_SPACE_IN_GB ) ; java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > storageDomains = java.util.Arrays.asList ( sd1 , sd2 , sd3 ) ; return storageDomains ; }

Target:
private void initInvalidValidator ( org.ovirt.engine.core.bll.validator.storage.StorageDomainValidator invalidStorageDomainValidator ) { initStorageDomainValidator ( invalidStorageDomainValidator , new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.ACTION_TYPE_FAILED_DISK_SPACE_LOW_ON_STORAGE_DOMAIN ) ) ; }
Source:
protected boolean canDoAction ( ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity glusterVolume = getGlusterVolume ( ) ; if ( ! ( super . canDoAction ( ) ) ) { return false ; } boolean isVolumeDistributed = glusterVolume.getVolumeType ( ) . isDistributedType ( ) ; if ( ! isVolumeDistributed ) { return failCanDoAction ( VdcBllMessages.ACTION_TYPE_FAILED_GLUSTER_VOLUME_NOT_DISTRIBUTED ) ; } else if ( ( glusterVolume.getBricks ( ) . size ( ) ) == 1 ) { return failCanDoAction ( VdcBllMessages.ACTION_TYPE_FAILED_GLUSTER_VOLUME_DISTRIBUTED_AND_HAS_SINGLE_BRICK ) ; } org.ovirt.engine.core.bll.validator.gluster.GlusterBrickValidator brickValidator = new org.ovirt.engine.core.bll.validator.gluster.GlusterBrickValidator ( ) ; return validate ( brickValidator.canRebalance ( glusterVolume ) ) ; }

Target:
protected boolean canDoAction ( ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity glusterVolume = getGlusterVolume ( ) ; if ( ! ( super . canDoAction ( ) ) ) { return false ; } boolean isVolumeDistributed = glusterVolume.getVolumeType ( ) . isDistributedType ( ) ; if ( ! isVolumeDistributed ) { return failCanDoAction ( EngineMessage.ACTION_TYPE_FAILED_GLUSTER_VOLUME_NOT_DISTRIBUTED ) ; } else if ( ( glusterVolume.getBricks ( ) . size ( ) ) == 1 ) { return failCanDoAction ( EngineMessage.ACTION_TYPE_FAILED_GLUSTER_VOLUME_DISTRIBUTED_AND_HAS_SINGLE_BRICK ) ; } org.ovirt.engine.core.bll.validator.gluster.GlusterBrickValidator brickValidator = new org.ovirt.engine.core.bll.validator.gluster.GlusterBrickValidator ( ) ; return validate ( brickValidator.canRebalance ( glusterVolume ) ) ; }
Source:
protected boolean canDoAction ( ) { disk = org.ovirt.engine.core.bll.HotPlugDiskToVmCommand.getDiskDao ( ) . get ( org.ovirt.engine.core.bll.HotPlugDiskToVmCommand.getParameters ( ) . getDiskId ( ) ) ; return ( ( ( ( ( ( org.ovirt.engine.core.bll.HotPlugDiskToVmCommand.isVmExist ( ) ) && ( org.ovirt.engine.core.bll.HotPlugDiskToVmCommand.isVmInUpPausedDownStatus ( ) ) ) && ( org.ovirt.engine.core.bll.HotPlugDiskToVmCommand.canRunActionOnNonManagedVm ( ) ) ) && ( isDiskExist ( disk ) ) ) && ( checkCanPerformPlugUnPlugDisk ( ) ) ) && ( org.ovirt.engine.core.bll.HotPlugDiskToVmCommand.isVmNotInPreviewSnapshot ( ) ) ) && ( imageStorageValidation ( ) ) ; }

Target:
protected org.ovirt.engine.core.common.businessentities.Disk getDisk ( ) { if ( ( disk ) == null ) { disk = org.ovirt.engine.core.bll.HotPlugDiskToVmCommand.getDiskDao ( ) . get ( org.ovirt.engine.core.bll.HotPlugDiskToVmCommand.getParameters ( ) . getDiskId ( ) ) ; } return disk ; }
Source:
protected void expectGetIsoMap ( org.ovirt.engine.core.compat.Guid id ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage_pool_iso_map > ret = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage_pool_iso_map > ( ) ; org.ovirt.engine.core.dao.StoragePoolIsoMapDAO dao = org.mockito.Mockito.mock ( org.ovirt.engine.core.dao.StoragePoolIsoMapDAO.class ) ; org.mockito.Mockito.when ( db.getStoragePoolIsoMapDAO ( ) ) . thenReturn ( dao ) ; org.mockito.Mockito.when ( dao.getAllForStorage ( id ) ) . thenReturn ( ret ) ; }

Target:
protected void expectGetIsoMap ( org.ovirt.engine.core.compat.Guid id ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage_pool_iso_map > ret = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage_pool_iso_map > ( ) ; org.ovirt.engine.core.dao.StoragePoolIsoMapDAO dao = org.mockito.Mockito.mock ( org.ovirt.engine.core.dao.StoragePoolIsoMapDAO.class ) ; org.mockito.Mockito.when ( db.getStoragePoolIsoMapDao ( ) ) . thenReturn ( dao ) ; org.mockito.Mockito.when ( dao.getAllForStorage ( id ) ) . thenReturn ( ret ) ; }
Source:
public org.ovirt.engine.core.common.businessentities.VDS get ( org.ovirt.engine.core.compat.Guid id , org.ovirt.engine.core.compat.Guid userID , boolean isFiltered ) { return getCallsHandler ( ) . executeRead ( "GetVdsByVdsId" , org.ovirt.engine.core.dao.VdsDAODbFacadeImpl.VdsRowMapper.instance , getCustomMapSqlParameterSource ( ) . addValue ( "vds_id" , id ) . addValue ( "user_id" , userID ) . addValue ( "is_filtered" , isFiltered ) ) ; }

Target:
public org.ovirt.engine.core.common.businessentities.VDS get ( org.ovirt.engine.core.compat.Guid id , org.ovirt.engine.core.compat.Guid userID , boolean isFiltered ) { java.util.List < org.ovirt.engine.core.common.businessentities.VDS > vdsList = getCallsHandler ( ) . executeReadList ( "GetVdsByVdsId" , org.ovirt.engine.core.dao.VdsDAODbFacadeImpl.VdsRowMapper.instance , getCustomMapSqlParameterSource ( ) . addValue ( "vds_id" , id ) . addValue ( "user_id" , userID ) . addValue ( "is_filtered" , isFiltered ) ) ; return ( vdsList.size ( ) ) == 0 ? null : uniteAgentsSingleVds ( vdsList ) ; }
Source:
public void testChangeCaseDisplay ( ) { org.ovirt.engine.core.searchbackend.BaseAutoCompleter bac = new org.ovirt.engine.core.searchbackend.BaseAutoCompleter ( ) ; assertEquals ( "normal" , "jarjarbinks" , bac.changeCaseDisplay ( "JarJarBinks" ) ) ; assertEquals ( "dayOfWeek" , "Monday" , bac.changeCaseDisplay ( "Monday" ) ) ; assertEquals ( "dayOfWeek" , "monday" , bac.changeCaseDisplay ( "monday" ) ) ; }

Target:
public void testChangeCaseDisplay ( ) { org.ovirt.engine.core.searchbackend.BaseAutoCompleter bac = new org.ovirt.engine.core.searchbackend.BaseAutoCompleter ( ) ; org.junit.Assert.assertEquals ( "normal" , "jarjarbinks" , bac.changeCaseDisplay ( "JarJarBinks" ) ) ; org.junit.Assert.assertEquals ( "dayOfWeek" , "Monday" , bac.changeCaseDisplay ( "Monday" ) ) ; org.junit.Assert.assertEquals ( "dayOfWeek" , "monday" , bac.changeCaseDisplay ( "monday" ) ) ; }
Source:
private void validateDisksUsagesList ( org.ovirt.engine.core.common.businessentities.VmStatistics vmStatistics , java.lang.Object [ ] disksUsages , java.util.Map < java.lang.String , java.lang.Object > xml ) { vdsBrokerObjectsBuilder.updateVMStatisticsData ( vmStatistics , xml ) ; org.junit.Assert.assertEquals ( java.util.Arrays.asList ( disksUsages ) , new org.ovirt.engine.core.utils.serialization.json.JsonObjectDeserializer ( ) . deserializeUnformattedJson ( vmStatistics.getDisksUsage ( ) , java.util.ArrayList.class ) ) ; }

Target:
private void validateDisksUsagesList ( org.ovirt.engine.core.common.businessentities.VmStatistics vmStatistics , java.lang.Object [ ] disksUsages , java.util.Map < java.lang.String , java.lang.Object > xml ) { vdsBrokerObjectsBuilder.updateVMStatisticsData ( vmStatistics , xml ) ; org.junit.jupiter.api.Assertions.assertEquals ( java.util.Arrays.asList ( disksUsages ) , new org.ovirt.engine.core.utils.serialization.json.JsonObjectDeserializer ( ) . deserializeUnformattedJson ( vmStatistics.getDisksUsage ( ) , java.util.ArrayList.class ) ) ; }
Source:
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 ) ; }

Target:
public static void getVmNicList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ) ( source ) ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmInterfacesByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }
Source:
public static void Init ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage_pool > allPools = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStoragePoolDAO ( ) . getAll ( ) ; for ( org.ovirt.engine.core.common.businessentities.storage_pool pool : allPools ) { if ( ( pool.getstatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.StoragePoolStatus.NotOperational ) ) { org.ovirt.engine.core.bll.storage.StoragePoolStatusHandler.PoolStatusChanged ( pool.getId ( ) , StoragePoolStatus.NotOperational ) ; } } }

Target:
public static void Init ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage_pool > allPools = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStoragePoolDao ( ) . getAll ( ) ; for ( org.ovirt.engine.core.common.businessentities.storage_pool pool : allPools ) { if ( ( pool.getstatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.StoragePoolStatus.NotOperational ) ) { org.ovirt.engine.core.bll.storage.StoragePoolStatusHandler.PoolStatusChanged ( pool.getId ( ) , StoragePoolStatus.NotOperational ) ; } } }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc glusterVolumeSnapshotDelete ( java.lang.String snapshotName ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.glusterVolumeSnapshotDelete ( snapshotName ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.VMListReturnForXmlRpc getExternalVmList ( java.lang.String uri , java.lang.String username , java.lang.String password ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.getExternalVMs ( uri , username , password ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.VMListReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.VMListReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc setVmTicket ( java.lang.String vmId , java.lang.String otp64 , java.lang.String sec , java.lang.String connectionAction , java.util.Map < java.lang.String , java.lang.String > params ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.setVmTicket ( vmId , otp64 , sec , connectionAction , params ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.PrepareImageReturnForXmlRpc prepareImage ( java.lang.String spID , java.lang.String sdID , java.lang.String imageID , java.lang.String volumeID , boolean allowIllegal ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.prepareImage ( sdID , spID , imageID , volumeID , allowIllegal ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.PrepareImageReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.PrepareImageReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
Source:
public static void getDocumentationBaseURL ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.String ) ( source ) ) : "" ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.DocsURL , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

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:
protected void syncSearch ( ) { if ( ( getEntity ( ) ) == null ) { return ; } org.ovirt.engine.ui.frontend.AsyncQuery asyncQuery = new org.ovirt.engine.ui.frontend.AsyncQuery ( ) ; asyncQuery.setModel ( this ) ; asyncQuery.asyncCallback = new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override @ java.lang.SuppressWarnings ( value = "unchecked" ) public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.networks.NetworkExternalSubnetListModel.this . setItems ( ( ( java.util.List < org.ovirt.engine.core.common.businessentities.network.ExternalSubnet > ) ( returnValue ) ) ) ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getExternalSubnetsByNetworkId ( asyncQuery , getEntity ( ) . getId ( ) ) ; }

Target:
public void newSubnet ( ) { if ( ( getWindow ( ) ) != null ) { return ; } org.ovirt.engine.ui.uicommonweb.models.providers.NewExternalSubnetModel model = new org.ovirt.engine.ui.uicommonweb.models.providers.NewExternalSubnetModel ( getEntity ( ) , this ) ; setWindow ( model ) ; }
Source:
protected boolean isVmNameValidLength ( org.ovirt.engine.core.common.businessentities.VM vm ) { java.lang.String vmName = vm.getName ( ) ; int maxVmNameLengthWindows = org.ovirt.engine.core.common.config.Config.< java.lang.Integer > getValue ( ConfigValues.MaxVmNameLengthWindows ) ; int maxVmNameLengthNonWindows = org.ovirt.engine.core.common.config.Config.< java.lang.Integer > getValue ( ConfigValues.MaxVmNameLengthNonWindows ) ; int maxLength = ( osRepository.isWindows ( vm.getVmOsId ( ) ) ) ? maxVmNameLengthWindows : maxVmNameLengthNonWindows ; boolean nameLengthValid = ( vmName.length ( ) ) <= maxLength ; return nameLengthValid ; }

Target:
protected boolean isVmNameValidLength ( org.ovirt.engine.core.common.businessentities.VM vm ) { int maxLength = org.ovirt.engine.core.common.config.Config.< java.lang.Integer > getValue ( ConfigValues.MaxVmNameLength ) ; boolean nameLengthValid = ( vm.getName ( ) . length ( ) ) <= maxLength ; return nameLengthValid ; }
Source:
public void getVdsWithVds ( ) { final org.ovirt.engine.core.common.businessentities.VDS vds = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; final org.ovirt.engine.core.common.businessentities.VM vm = null ; final org.ovirt.engine.core.compat.Guid vdsId = null ; b.setVds ( vds ) ; b.setVdsId ( vdsId ) ; b.setVm ( vm ) ; final org.ovirt.engine.core.common.businessentities.VDS v = b.getVds ( ) ; org.junit.Assert.assertEquals ( vds , v ) ; }

Target:
public void getVdsWithVds ( ) { final org.ovirt.engine.core.common.businessentities.VDS vds = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; final org.ovirt.engine.core.common.businessentities.VM vm = null ; final org.ovirt.engine.core.compat.Guid vdsId = null ; b.setVds ( vds ) ; b.setVdsId ( vdsId ) ; b.setVm ( vm ) ; final org.ovirt.engine.core.common.businessentities.VDS v = b.getVds ( ) ; org.junit.jupiter.api.Assertions.assertEquals ( vds , v ) ; }
Source:
private void logNoProxyAvailable ( org.ovirt.engine.core.compat.Guid dataCenterId ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase logable = org.ovirt.engine.core.di.Injector.injectMembers ( new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ) ; java.lang.String dcName = storagePoolDao.get ( dataCenterId ) . getName ( ) ; logable.addCustomValue ( "StoragePoolName" , dcName ) ; auditLogDirector.log ( logable , AuditLogType.IMPORTEXPORT_NO_PROXY_HOST_AVAILABLE_IN_DC ) ; }

Target:
private void logNoProxyAvailable ( org.ovirt.engine.core.compat.Guid dataCenterId ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogable logable = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableImpl ( ) ; org.ovirt.engine.core.common.businessentities.StoragePool dataCenter = storagePoolDao.get ( dataCenterId ) ; logable.setStoragePoolId ( dataCenter.getId ( ) ) ; logable.setStoragePoolName ( dataCenter.getName ( ) ) ; logable.setUserName ( java.lang.String.format ( "%s@%s" , org.ovirt.engine.core.bll.GetVmsFromExternalProviderQuery.getUser ( ) . getLoginName ( ) , org.ovirt.engine.core.bll.GetVmsFromExternalProviderQuery.getUser ( ) . getDomain ( ) ) ) ; auditLogDirector.log ( logable , AuditLogType.IMPORTEXPORT_NO_PROXY_HOST_AVAILABLE_IN_DC ) ; }
Source:
protected void copyVmDevices ( ) { org.ovirt.engine.core.bll.utils.VmDeviceUtils.copyVmDevices ( org.ovirt.engine.core.bll.AddVmCommand.getVmTemplateId ( ) , org.ovirt.engine.core.bll.AddVmCommand.getVmId ( ) , getSrcDeviceIdToTargetDeviceIdMapping ( ) , org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . isSoundDeviceEnabled ( ) , org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . isConsoleEnabled ( ) , isVirtioScsiEnabled ( ) , false ) ; }

Target:
protected void copyVmDevices ( ) { org.ovirt.engine.core.bll.utils.VmDeviceUtils.copyVmDevices ( org.ovirt.engine.core.bll.AddVmCommand.getVmTemplateId ( ) , org.ovirt.engine.core.bll.AddVmCommand.getVmId ( ) , getSrcDeviceIdToTargetDeviceIdMapping ( ) , org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . isSoundDeviceEnabled ( ) , org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . isConsoleEnabled ( ) , isVirtioScsiEnabled ( ) , isBalloonEnabled ( ) , false ) ; }
Source:
public java.util.List < org.ovirt.engine.core.common.businessentities.RepoFileMetaData > getUserRequestForStoragePoolAndDomainRepoFileList ( org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.compat.Guid storageDomainId , org.ovirt.engine.core.common.businessentities.FileTypeExtension fileTypeExtension , boolean forceRefresh ) { java.util.List < org.ovirt.engine.core.common.businessentities.RepoFileMetaData > repoList = null ; if ( ! ( isStorageDomainValid ( storageDomainId , fileTypeExtension , forceRefresh ) ) ) { return null ; } repoList = getCachedIsoListByStoragePoolAndDomainId ( storagePoolId , storageDomainId , fileTypeExtension ) ; return repoList ; }

Target:
public java.util.List < org.ovirt.engine.core.common.businessentities.RepoFileMetaData > getUserRequestForStoragePoolAndDomainRepoFileList ( org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.compat.Guid storageDomainId , org.ovirt.engine.core.common.businessentities.ImageType imageType , boolean forceRefresh ) { java.util.List < org.ovirt.engine.core.common.businessentities.RepoFileMetaData > repoList = null ; if ( ! ( isStorageDomainValid ( storageDomainId , imageType , forceRefresh ) ) ) { return null ; } repoList = getCachedIsoListByStoragePoolAndDomainId ( storagePoolId , storageDomainId , imageType ) ; return repoList ; }
Source:
protected void syncSearch ( ) { if ( ( getEntity ( ) ) == null ) { setItems ( null ) ; return ; } super . syncSearch ( ) ; org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain = getEntity ( ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetEntitiesWithLeaseByStorageId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( storageDomain.getId ( ) ) , new org.ovirt.engine.ui.uicommonweb.models.storage.SetItemsAsyncQuery ( ) ) ; }

Target:
protected void syncSearch ( ) { if ( ( getEntity ( ) ) == null ) { setItems ( null ) ; return ; } super . syncSearch ( ) ; org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain = getEntity ( ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( QueryType.GetEntitiesWithLeaseByStorageId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( storageDomain.getId ( ) ) , new org.ovirt.engine.ui.uicommonweb.models.storage.SetItemsAsyncQuery ( ) ) ; }
Source:
private void localize ( org.ovirt.engine.ui.webadmin.ApplicationConstants constants ) { swiftStatusEditor.setLabel ( constants.clusterGlusterSwiftLabel ( ) ) ; startSwift.setLabel ( constants.startGlusterSwift ( ) ) ; stopSwift.setLabel ( constants.stopGlusterSwift ( ) ) ; restartSwift.setLabel ( constants.restartGlusterSwift ( ) ) ; manageSwiftServerLevel.setLabel ( constants.manageServerLevelGlusterSwift ( ) ) ; }

Target:
private void localize ( ) { swiftStatusEditor.setLabel ( org.ovirt.engine.ui.webadmin.section.main.view.popup.cluster.ManageGlusterSwiftPopupView.constants.clusterGlusterSwiftLabel ( ) ) ; startSwift.setLabel ( org.ovirt.engine.ui.webadmin.section.main.view.popup.cluster.ManageGlusterSwiftPopupView.constants.startGlusterSwift ( ) ) ; stopSwift.setLabel ( org.ovirt.engine.ui.webadmin.section.main.view.popup.cluster.ManageGlusterSwiftPopupView.constants.stopGlusterSwift ( ) ) ; restartSwift.setLabel ( org.ovirt.engine.ui.webadmin.section.main.view.popup.cluster.ManageGlusterSwiftPopupView.constants.restartGlusterSwift ( ) ) ; manageSwiftServerLevel.setLabel ( org.ovirt.engine.ui.webadmin.section.main.view.popup.cluster.ManageGlusterSwiftPopupView.constants.manageServerLevelGlusterSwift ( ) ) ; }
Source:
public void testGetDefaultQuotaToDCWithoutDefaultQuota ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.Quota quotaUnlimited = quotaHelper.getUnlimitedQuota ( mockStoragePool ( ) , true ) ; assertQuotaUnlimited ( quotaUnlimited ) ; assertQuotaUnlimitedName ( quotaUnlimited ) ; }

Target:
public void testGetDefaultQuotaForDCWithDefaultQuota ( ) throws java.lang.Exception { org.mockito.Mockito.when ( quotaDAO.getDefaultQuotaByStoragePoolId ( storagePoolUUID ) ) . thenReturn ( mockGeneralStorageQuota ( ) ) ; java.lang.String defaultQuotaName = quotaHelper.getDefaultQuotaName ( storagePool.getname ( ) ) ; org.mockito.Mockito.when ( quotaHelper.generateDefaultQuotaName ( storagePool ) ) . thenReturn ( defaultQuotaName ) ; org.ovirt.engine.core.common.businessentities.Quota quotaUnlimited = quotaHelper.getUnlimitedQuota ( mockStoragePool ( ) , true ) ; assertQuotaUnlimited ( quotaUnlimited ) ; assertQuotaUnlimitedName ( quotaUnlimited ) ; }
Source:
public boolean hasSpiceSupport ( int osId , org.ovirt.engine.core.compat.Version version ) { return getDisplayTypes ( osId , version ) . contains ( DisplayType.qxl ) ; }

Target:
public void getCinderVolumeTypesList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storageDomainId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter < java.util.List < org.ovirt.engine.core.common.businessentities.storage.CinderVolumeType > > ( ) { @ java.lang.Override public java.util.List < org.ovirt.engine.core.common.businessentities.storage.CinderVolumeType > Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return ( ( java.util.List < org.ovirt.engine.core.common.businessentities.storage.CinderVolumeType > ) ( source ) ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetCinderVolumeTypesByStorageDomainId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( storageDomainId ) , 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.RunQuery ( VdcQueryType.GetAllRoles , new org.ovirt.engine.core.common.queries.MultilevelAdministrationsQueriesParameters ( ) , aQuery ) ; }

Target:
public static void getHostListByDataCenter ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid spId ) { 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.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllVdsByStoragePool , new org.ovirt.engine.core.common.queries.IdQueryParameters ( spId ) , aQuery ) ; }
Source:
public static org.ovirt.engine.core.common.businessentities.storage.DiskImage createMemoryDisk ( org.ovirt.engine.core.common.businessentities.VM vm , org.ovirt.engine.core.common.businessentities.storage.StorageType storageType ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage image = new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ; image.setSize ( vm.getTotalMemorySizeInBytes ( ) ) ; image.setVolumeType ( org.ovirt.engine.core.bll.memory.MemoryUtils.storageTypeToMemoryVolumeType ( storageType ) ) ; image.setvolumeFormat ( VolumeFormat.RAW ) ; image.setDiskInterface ( DiskInterface.VirtIO ) ; return image ; }

Target:
public static org.ovirt.engine.core.common.businessentities.storage.DiskImage createMemoryDisk ( org.ovirt.engine.core.common.businessentities.VM vm , org.ovirt.engine.core.common.businessentities.storage.StorageType storageType ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage image = new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ; image.setSize ( org.ovirt.engine.core.bll.utils.VmUtils.getSnapshotMemorySizeInBytes ( vm ) ) ; image.setVolumeType ( org.ovirt.engine.core.bll.memory.MemoryUtils.storageTypeToMemoryVolumeType ( storageType ) ) ; image.setvolumeFormat ( VolumeFormat.RAW ) ; image.setDiskInterface ( DiskInterface.VirtIO ) ; return image ; }
Source:
protected void onFetchVms ( ) { if ( org.ovirt.engine.core.vdsbroker.monitoring.VmsStatisticsFetcher.log.isDebugEnabled ( ) ) { logBuilder = new java.lang.StringBuilder ( ) ; } super . onFetchVms ( ) ; org.ovirt.engine.core.vdsbroker.monitoring.VmsStatisticsFetcher.log.info ( "Fetched VMs from VDS '{}'" , vdsmVms.size ( ) , vdsManager.getVdsId ( ) ) ; if ( org.ovirt.engine.core.vdsbroker.monitoring.VmsStatisticsFetcher.log.isDebugEnabled ( ) ) { org.ovirt.engine.core.vdsbroker.monitoring.VmsStatisticsFetcher.log.debug ( logBuilder.toString ( ) ) ; } }

Target:
protected void onFetchVms ( ) { if ( org.ovirt.engine.core.vdsbroker.monitoring.VmsStatisticsFetcher.log.isDebugEnabled ( ) ) { logBuilder = new java.lang.StringBuilder ( ) ; } super . onFetchVms ( ) ; logNumOfVmsIfChanged ( ) ; if ( org.ovirt.engine.core.vdsbroker.monitoring.VmsStatisticsFetcher.log.isDebugEnabled ( ) ) { org.ovirt.engine.core.vdsbroker.monitoring.VmsStatisticsFetcher.log.debug ( logBuilder.toString ( ) ) ; } }