auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public static void getStorageDomainsByConnection ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , java.lang.String connectionPath ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ) ( source ) ) : null ; } } ; org.ovirt.engine.core.common.queries.GetStorageDomainsByConnectionParameters param = new org.ovirt.engine.core.common.queries.GetStorageDomainsByConnectionParameters ( ) ; param.setConnection ( connectionPath ) ; if ( storagePoolId != null ) { param.setStoragePoolId ( storagePoolId ) ; } org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetStorageDomainsByConnection , param , aQuery ) ; }

Target:
public static void getStorageDomainMaxNameLength ( 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.StorageDomainNameSizeLimit , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.network.VmNicFilterParameter lookupParameter ( org.ovirt.engine.core.compat.Guid parameterId ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.VmNicFilterParameter > parameters = getBackendCollection ( org.ovirt.engine.core.common.businessentities.network.VmNicFilterParameter.class , VdcQueryType.GetVmInterfaceFilterParameterById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( guid ) ) ; for ( org.ovirt.engine.core.common.businessentities.network.VmNicFilterParameter parameter : parameters ) { if ( java.util.Objects.equals ( parameter.getId ( ) , parameterId ) ) { return parameter ; } } return null ; }

Target:
private org.ovirt.engine.core.common.businessentities.network.VmNicFilterParameter lookupParameter ( org.ovirt.engine.core.compat.Guid parameterId ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.VmNicFilterParameter > parameters = getBackendCollection ( org.ovirt.engine.core.common.businessentities.network.VmNicFilterParameter.class , QueryType.GetVmInterfaceFilterParameterById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( guid ) ) ; for ( org.ovirt.engine.core.common.businessentities.network.VmNicFilterParameter parameter : parameters ) { if ( java.util.Objects.equals ( parameter.getId ( ) , parameterId ) ) { return parameter ; } } return null ; }
Source:
public void getLunsByVgId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String vgId , org.ovirt.engine.core.compat.Guid vdsId ) { 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.LUNs > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.LUNs > ( ) ; } } ; org.ovirt.engine.core.common.queries.GetLunsByVgIdParameters params = new org.ovirt.engine.core.common.queries.GetLunsByVgIdParameters ( vgId , vdsId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetLunsByVgId , params , aQuery ) ; }

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:
public void getAAAProfilesEntriesList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.Collection < org.ovirt.engine.core.aaa.ProfileEntry > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.aaa.ProfileEntry > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAAAProfileList , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }

Target:
public void getAAANamespaces ( 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.HashMap < java.lang.String , java.util.List < java.lang.String > > ) ( source ) ) : new java.util.HashMap < java.lang.String , java.util.List < java.lang.String > > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAvailableNamespaces , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }
Source:
public org.ovirt.engine.core.common.action.VdcReturnValueBase RunAction ( org.ovirt.engine.core.common.action.VdcActionType actionType , org.ovirt.engine.core.common.action.VdcActionParametersBase params ) { org.ovirt.engine.ui.frontend.server.gwt.GenericApiGWTServiceImpl.log.debug ( "Server: RunAction invoked!" ) ; debugAction ( actionType , params ) ; params.setSessionId ( getSessionId ( ) ) ; if ( noBackend ) { org.ovirt.engine.core.common.action.VdcReturnValueBase rValue = new org.ovirt.engine.core.common.action.VdcReturnValueBase ( ) ; rValue.setSucceeded ( true ) ; return rValue ; } return getBackend ( ) . RunAction ( actionType , params ) ; }

Target:
public org.ovirt.engine.core.common.action.VdcReturnValueBase RunAction ( org.ovirt.engine.core.common.action.VdcActionType actionType , org.ovirt.engine.core.common.action.VdcActionParametersBase params ) { org.ovirt.engine.ui.frontend.server.gwt.GenericApiGWTServiceImpl.log.debug ( "Server: RunAction invoked!" ) ; debugAction ( actionType , params ) ; params.setSessionId ( getSessionId ( ) ) ; if ( noBackend ) { org.ovirt.engine.core.common.action.VdcReturnValueBase rValue = new org.ovirt.engine.core.common.action.VdcReturnValueBase ( ) ; rValue.setSucceeded ( true ) ; return rValue ; } return getBackend ( ) . runAction ( actionType , params ) ; }
Source:
public void testAddExistingBlockDomainWhenVgInfoReturnsEmptyLunList ( ) { org.mockito.Mockito.when ( command.getLUNsFromVgInfo ( parameters.getStorageDomain ( ) . getStorage ( ) ) ) . thenReturn ( java.util.Collections.< org.ovirt.engine.core.common.businessentities.storage.LUNs > emptyList ( ) ) ; org.junit.Assert.assertFalse ( "Could not connect to Storage Domain" , command.canAddDomain ( ) ) ; org.junit.Assert.assertTrue ( "Import block Storage Domain should have failed due to empty Lun list returned from VGInfo " , command.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( VdcBllMessages.ACTION_TYPE_FAILED_PROBLEM_WITH_CANDIDATE_INFO.toString ( ) ) ) ; }

Target:
public void testAddExistingBlockDomainWhenVgInfoReturnsEmptyLunList ( ) { org.mockito.Mockito.doReturn ( java.util.Collections.emptyList ( ) ) . when ( command ) . getLUNsFromVgInfo ( parameters.getStorageDomain ( ) . getStorage ( ) ) ; org.junit.Assert.assertFalse ( "Could not connect to Storage Domain" , command.canAddDomain ( ) ) ; org.junit.Assert.assertTrue ( "Import block Storage Domain should have failed due to empty Lun list returned from VGInfo " , command.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( VdcBllMessages.ACTION_TYPE_FAILED_PROBLEM_WITH_CANDIDATE_INFO.toString ( ) ) ) ; }
Source:
private org.ovirt.engine.core.common.action.ImagesContainterParametersBase buildChildCommandParameters ( org.ovirt.engine.core.common.businessentities.storage.DiskImage cinderDisk ) { org.ovirt.engine.core.common.action.ImagesContainterParametersBase createParams = new org.ovirt.engine.core.common.action.ImagesContainterParametersBase ( cinderDisk.getId ( ) ) ; createParams.setVmSnapshotId ( newActiveSnapshotId ) ; createParams.setParentHasTasks ( ( ! ( cachedImagesDisks.isEmpty ( ) ) ) ) ; return withRootCommandInfo ( createParams , getActionType ( ) ) ; }

Target:
private org.ovirt.engine.core.common.action.ImagesContainterParametersBase buildChildCommandParameters ( org.ovirt.engine.core.common.businessentities.storage.DiskImage cinderDisk ) { org.ovirt.engine.core.common.action.ImagesContainterParametersBase createParams = new org.ovirt.engine.core.common.action.ImagesContainterParametersBase ( cinderDisk.getId ( ) ) ; createParams.setVmSnapshotId ( newActiveSnapshotId ) ; createParams.setParentHasTasks ( ( ( ! ( cachedImagesDisks.isEmpty ( ) ) ) || ( getMemoryImageBuilder ( ) . isCreateTasks ( ) ) ) ) ; return withRootCommandInfo ( createParams , getActionType ( ) ) ; }
Source:
protected void proceedProxyReturnValue ( ) { org.ovirt.engine.core.common.errors.EngineError returnStatus = getReturnValueFromStatus ( org.ovirt.engine.core.vdsbroker.vdsbroker.DestroyVDSCommand.getReturnStatus ( ) ) ; switch ( returnStatus ) { case noVM : if ( org.ovirt.engine.core.vdsbroker.vdsbroker.DestroyVDSCommand.getParameters ( ) . isIgnoreNoVm ( ) ) { log.info ( "Destroy VM '{}' failed, VM does not exist on destination after Cancel Migration. VDSM message: {}" , org.ovirt.engine.core.vdsbroker.vdsbroker.DestroyVDSCommand.getParameters ( ) . getVmId ( ) , org.ovirt.engine.core.vdsbroker.vdsbroker.DestroyVDSCommand.getReturnStatus ( ) . message ) ; return ; } log.info ( ( "Destroy VM couldn't find VM '{}'. If after Cancel Migration and VM is UP on source, " + "ignore next error, it's just a clean-up call" ) , org.ovirt.engine.core.vdsbroker.vdsbroker.DestroyVDSCommand.getParameters ( ) . getVmId ( ) ) ; default : super . proceedProxyReturnValue ( ) ; } }

Target:
protected void proceedProxyReturnValue ( ) { org.ovirt.engine.core.common.errors.EngineError returnStatus = getReturnValueFromStatus ( org.ovirt.engine.core.vdsbroker.vdsbroker.DestroyVDSCommand.getReturnStatus ( ) ) ; switch ( returnStatus ) { case noVM : if ( org.ovirt.engine.core.vdsbroker.vdsbroker.DestroyVDSCommand.getParameters ( ) . isIgnoreNoVm ( ) ) { log.info ( "Failed to destroy VM '{}' because VM does not exist, ignoring" , org.ovirt.engine.core.vdsbroker.vdsbroker.DestroyVDSCommand.getParameters ( ) . getVmId ( ) ) ; return ; } log.info ( ( "Destroy VM couldn't find VM '{}'. If after Cancel Migration and VM is UP on source, " + "ignore next error, it's just a clean-up call" ) , org.ovirt.engine.core.vdsbroker.vdsbroker.DestroyVDSCommand.getParameters ( ) . getVmId ( ) ) ; default : super . proceedProxyReturnValue ( ) ; } }
Source:
protected java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > getDisksListForChecks ( ) { if ( getParameters ( ) . getDiskIdsToIgnoreInChecks ( ) . isEmpty ( ) ) { return getDisksList ( ) ; } java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > toReturn = new java.util.LinkedList < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.DiskImage diskImage : getDisksList ( ) ) { if ( ! ( getParameters ( ) . getDiskIdsToIgnoreInChecks ( ) . contains ( diskImage.getId ( ) ) ) ) { toReturn.add ( diskImage ) ; } } return toReturn ; }

Target:
private org.ovirt.engine.core.common.businessentities.Snapshot addSnapshotToDB ( org.ovirt.engine.core.compat.Guid snapshotId , org.ovirt.engine.core.bll.memory.MemoryImageBuilder memoryImageBuilder ) { boolean taskExists = ( ! ( getDisksList ( ) . isEmpty ( ) ) ) || ( memoryImageBuilder.isCreateTasks ( ) ) ; return new org.ovirt.engine.core.bll.snapshots.SnapshotsManager ( ) . addSnapshot ( snapshotId , getParameters ( ) . getDescription ( ) , ( taskExists ? org.ovirt.engine.core.common.businessentities.Snapshot.SnapshotStatus.LOCKED : org.ovirt.engine.core.common.businessentities.Snapshot.SnapshotStatus.OK ) , getParameters ( ) . getSnapshotType ( ) , org.ovirt.engine.core.bll.CreateAllSnapshotsFromVmCommand.getVm ( ) , true , memoryImageBuilder.getVolumeStringRepresentation ( ) , getDisksList ( ) , org.ovirt.engine.core.bll.CreateAllSnapshotsFromVmCommand.getCompensationContext ( ) ) ; }
Source:
protected boolean isStorageDomainFormatCorrectForDC ( org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain , org.ovirt.engine.core.common.businessentities.StoragePool storagePool ) { if ( storageDomain.getStorageDomainType ( ) . isIsoOrImportExportDomain ( ) ) { return true ; } java.util.Set < org.ovirt.engine.core.common.businessentities.StorageFormatType > supportedFormatsSet = getSupportedStorageFormatSet ( storagePool.getcompatibility_version ( ) ) ; if ( supportedFormatsSet.contains ( storageDomain.getStorageFormat ( ) ) ) { return true ; } addCanDoActionMessage ( VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_DOMAIN_FORMAT_ILLEGAL ) ; org.ovirt.engine.core.bll.storage.StorageHandlingCommandBase.getReturnValue ( ) . getCanDoActionMessages ( ) . add ( java.lang.String.format ( "$storageFormat %1$s" , storageDomain.getStorageFormat ( ) . toString ( ) ) ) ; return false ; }

Target:
protected boolean isStorageDomainFormatCorrectForDC ( org.ovirt.engine.core.common.businessentities.StorageDomainStatic domainStatic , org.ovirt.engine.core.common.businessentities.StoragePool storagePool ) { if ( domainStatic.getStorageDomainType ( ) . isIsoOrImportExportDomain ( ) ) { return true ; } if ( storagePool != null ) { if ( ( org.ovirt.engine.core.common.utils.VersionStorageFormatUtil.getPreferredForVersion ( storagePool.getcompatibility_version ( ) , domainStatic.getStorageType ( ) ) . compareTo ( domainStatic.getStorageFormat ( ) ) ) < 0 ) { return false ; } } return true ; }
Source:
public void testStoragePoolDoesntExist ( ) { final int domainSizeGB = 20 ; final int sizeRequired = 5 ; org.ovirt.engine.core.bll.AddVmCommand < org.ovirt.engine.core.common.action.AddVmParameters > cmd = setupCanAddVmTests ( domainSizeGB , sizeRequired ) ; org.mockito.Mockito.doReturn ( null ) . when ( cmd ) . getStoragePool ( ) ; org.junit.Assert.assertFalse ( cmd.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( cmd.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( EngineMessage.ACTION_TYPE_FAILED_STORAGE_POOL_NOT_EXIST.toString ( ) ) ) ; }

Target:
public void testBeanValidations ( ) { org.junit.Assert.assertTrue ( createCommand ( initializeMock ( 1 ) ) . validateInputs ( ) ) ; }
Source:
public java.lang.Long determineImageInitialSize ( org.ovirt.engine.core.common.businessentities.storage.Image sourceImage , org.ovirt.engine.core.common.businessentities.storage.VolumeFormat destFormat , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.compat.Guid srcDomain , org.ovirt.engine.core.compat.Guid dstDomain , org.ovirt.engine.core.compat.Guid imageGroupID ) { if ( isInitialSizeSupportedForFormat ( destFormat , dstDomain ) ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage imageInfoFromStorage = org.ovirt.engine.core.bll.storage.disk.image.ImagesHandler.getVolumeInfoFromVdsm ( storagePoolId , srcDomain , imageGroupID , sourceImage.getId ( ) ) ; return org.ovirt.engine.core.bll.storage.disk.image.ImagesHandler.computeCowImageNeededSize ( imageInfoFromStorage.getActualSizeInBytes ( ) ) ; } return null ; }

Target:
public java.lang.Long determineImageInitialSize ( org.ovirt.engine.core.common.businessentities.storage.Image sourceImage , org.ovirt.engine.core.common.businessentities.storage.VolumeFormat destFormat , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.compat.Guid srcDomain , org.ovirt.engine.core.compat.Guid dstDomain , org.ovirt.engine.core.compat.Guid imageGroupID ) { if ( isInitialSizeSupportedForFormat ( destFormat , dstDomain ) ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage imageInfoFromStorage = getVolumeInfoFromVdsm ( storagePoolId , srcDomain , imageGroupID , sourceImage.getId ( ) ) ; return org.ovirt.engine.core.bll.storage.disk.image.ImagesHandler.computeCowImageNeededSize ( sourceImage.getVolumeFormat ( ) , imageInfoFromStorage.getActualSizeInBytes ( ) ) ; } return null ; }
Source:
public void testCanDoActionVmUpLiveMergeSupported ( ) { prepareForVmValidatorTests ( ) ; cmd.getVm ( ) . setStatus ( VMStatus.Up ) ; org.mockito.Mockito.doReturn ( true ) . when ( cmd ) . isDiskPlugged ( ) ; org.mockito.Mockito.doReturn ( true ) . when ( cmd ) . isLiveMergeSupported ( ) ; org.mockito.Mockito.doReturn ( ValidationResult.VALID ) . when ( vmValidator ) . vmQualifiedForSnapshotMerge ( ) ; org.mockito.Mockito.doReturn ( ValidationResult.VALID ) . when ( vmValidator ) . vmHostCanLiveMerge ( ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionSuccess ( cmd ) ; }

Target:
public void testCanDoActionVmUpLiveMergeSupported ( ) { prepareForVmValidatorTests ( ) ; cmd.getVm ( ) . setStatus ( VMStatus.Up ) ; org.mockito.Mockito.doReturn ( true ) . when ( cmd ) . isDiskPlugged ( ) ; org.mockito.Mockito.doReturn ( true ) . when ( cmd ) . isLiveMergeSupported ( ) ; org.mockito.Mockito.doReturn ( ValidationResult.VALID ) . when ( vmValidator ) . vmQualifiedForSnapshotMerge ( ) ; org.mockito.Mockito.doReturn ( ValidationResult.VALID ) . when ( vmValidator ) . vmHostCanLiveMerge ( ) ; org.mockito.Mockito.doReturn ( true ) . when ( cmd ) . validateStorageDomainAvailableSpace ( ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionSuccess ( cmd ) ; }
Source:
public void save ( org.ovirt.engine.core.common.businessentities.AsyncTasks task ) { org.ovirt.engine.core.dao.AsyncTaskDAODbFacadeImpl.AsyncTaskParameterSource parameterSource = getTaskParameterSource ( task ) ; parameterSource.addValue ( "started_at" , task.getStartTime ( ) ) ; parameterSource.addValue ( "storage_pool_id" , task.getStoragePoolId ( ) ) ; parameterSource.addValue ( "async_task_type" , task.getTaskType ( ) ) ; getCallsHandler ( ) . executeModification ( "Insertasync_tasks" , parameterSource ) ; }

Target:
public void update ( org.ovirt.engine.core.common.businessentities.AsyncTask task ) { org.ovirt.engine.core.dao.AsyncTaskDAODbFacadeImpl.logNullParameters ( task ) ; org.ovirt.engine.core.dao.AsyncTaskDAODbFacadeImpl.AsyncTaskParameterSource parameterSource = getTaskParameterSource ( task ) ; parameterSource.addValue ( "storage_pool_id" , task.getStoragePoolId ( ) ) ; getCallsHandler ( ) . executeModification ( "Updateasync_tasks" , parameterSource ) ; }
Source:
public void onBrowserEvent ( org.ovirt.engine.ui.userportal.widget.extended.vm.Context context , com.google.gwt.dom.client.Element parent , T value , com.google.gwt.dom.client.NativeEvent event , com.google.gwt.cell.client.ValueUpdater < T > valueUpdater ) { super . onBrowserEvent ( context , parent , value , event , valueUpdater ) ; com.google.gwt.dom.client.EventTarget eventTarget = event.getEventTarget ( ) ; if ( ! ( com.google.gwt.dom.client.Element.is ( eventTarget ) ) ) { return ; } if ( ( BrowserEvents.CLICK.equals ( event.getType ( ) ) ) && ( isEnabled ( value ) ) ) { onClick ( value ) ; } }

Target:
public void onBrowserEvent ( org.ovirt.engine.ui.common.widget.table.cell.Context context , com.google.gwt.dom.client.Element parent , T value , com.google.gwt.safehtml.shared.SafeHtml tooltip , com.google.gwt.dom.client.NativeEvent event , com.google.gwt.cell.client.ValueUpdater < T > valueUpdater ) { super . onBrowserEvent ( context , parent , value , tooltip , event , valueUpdater ) ; com.google.gwt.dom.client.EventTarget eventTarget = event.getEventTarget ( ) ; if ( ! ( com.google.gwt.dom.client.Element.is ( eventTarget ) ) ) { return ; } if ( ( BrowserEvents.CLICK.equals ( event.getType ( ) ) ) && ( isEnabled ( value ) ) ) { onClick ( value ) ; } }
Source:
public static void getMaxVmMemSize ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , boolean is64 ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { return source ; } return 262144 ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( ( is64 ? org.ovirt.engine.core.common.queries.ConfigurationValues.VM64BitMaxMemorySizeInMB : org.ovirt.engine.core.common.queries.ConfigurationValues.VM32BitMaxMemorySizeInMB ) , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public static void getClusterList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > list = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ) ( source ) ) ; java.util.Collections.sort ( list , new org.ovirt.engine.core.common.businessentities.comparators.NameableComparator ( ) ) ; return list ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllVdsGroups , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }
Source:
public static void getGlusterHostsNewlyAdded ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId , boolean isFingerprintRequired ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAddedGlusterServers , new org.ovirt.engine.core.common.queries.gluster.AddedGlusterServersParameters ( clusterId , isFingerprintRequired ) , aQuery ) ; }

Target:
public static void getClusterGlusterServices ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.core.common.queries.gluster.GlusterVolumeAdvancedDetailsParameters parameters = new org.ovirt.engine.core.common.queries.gluster.GlusterVolumeAdvancedDetailsParameters ( clusterId , null , null , false ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetGlusterVolumeAdvancedDetails , parameters , aQuery ) ; }
Source:
private void updateStorageDomainData ( ) { org.ovirt.engine.core.common.vdscommands.VDSReturnValue returnValueUpdatedStorageDomain = getStatsForDomain ( ) ; org.ovirt.engine.core.common.businessentities.StorageDomain updatedStorageDomain = ( ( org.ovirt.engine.core.common.businessentities.StorageDomain ) ( returnValueUpdatedStorageDomain.getReturnValue ( ) ) ) ; updateStorageDomain ( updatedStorageDomain ) ; }

Target:
private void updateStorageDomainData ( ) { org.ovirt.engine.core.common.vdscommands.VDSReturnValue returnValueUpdatedStorageDomain = getStatsForDomain ( ) ; if ( returnValueUpdatedStorageDomain != null ) { org.ovirt.engine.core.common.businessentities.StorageDomain updatedStorageDomain = ( ( org.ovirt.engine.core.common.businessentities.StorageDomain ) ( returnValueUpdatedStorageDomain.getReturnValue ( ) ) ) ; updateStorageDomain ( updatedStorageDomain ) ; } else { log.error ( "Failed to update Storage Domain Data." ) ; } }
Source:
protected boolean canDoAction ( ) { if ( ! ( super . canDoAction ( ) ) ) { return false ; } final int nodeCount = ( org.ovirt.engine.core.bll.numa.vm.AddVmNumaNodesCommand.getParameters ( ) . getVmNumaNodeList ( ) . size ( ) ) + ( getExistingNumaNodes ( ) . size ( ) ) ; final int vmCpuCount = org.ovirt.engine.core.bll.numa.vm.AddVmNumaNodesCommand.getVm ( ) . getNumOfCpus ( ) ; return validate ( org.ovirt.engine.core.bll.VmHandler.checkVmNumaNodesIntegrity ( nodeCount , vmCpuCount ) ) ; }

Target:
protected void doInit ( ) { org.ovirt.engine.core.bll.numa.vm.AddVmNumaNodesCommand.getVmNumaNodesForValidation ( ) . addAll ( org.ovirt.engine.core.bll.numa.vm.AddVmNumaNodesCommand.getParameters ( ) . getVmNumaNodeList ( ) ) ; }
Source:
protected boolean validateNoDuplicateDiskImages ( java.lang.Iterable < org.ovirt.engine.core.common.businessentities.DiskImage > images ) { if ( ! ( getParameters ( ) . isImportAsNewEntity ( ) ) ) { org.ovirt.engine.core.bll.validator.DiskImagesValidator diskImagesValidator = new org.ovirt.engine.core.bll.validator.DiskImagesValidator ( images ) ; return validate ( diskImagesValidator.diskImagesAlreadyExist ( ) ) ; } return true ; }

Target:
protected boolean validateNoDuplicateDiskImages ( java.lang.Iterable < org.ovirt.engine.core.common.businessentities.storage.DiskImage > images ) { if ( ! ( getParameters ( ) . isImportAsNewEntity ( ) ) ) { org.ovirt.engine.core.bll.validator.storage.DiskImagesValidator diskImagesValidator = new org.ovirt.engine.core.bll.validator.storage.DiskImagesValidator ( images ) ; return validate ( diskImagesValidator.diskImagesAlreadyExist ( ) ) ; } return true ; }
Source:
private void doTestBadAddBookmark ( boolean valid , boolean success , java.lang.String detail ) { setUriInfo ( setUpActionExpectations ( ActionType.AddBookmark , org.ovirt.engine.core.common.action.BookmarksOperationParameters.class , new java.lang.String [ ] { "Bookmark.Name" , "Bookmark.Value" } , new java.lang.Object [ ] { NAMES [ 0 ] , org.ovirt.engine.api.restapi.resource.BackendBookmarksResourceTest.VALUES [ 0 ] } , valid , success ) ) ; try { collection.add ( org.ovirt.engine.api.restapi.resource.BackendBookmarksResourceTest.getModel ( 0 ) ) ; org.junit.Assert.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , detail ) ; } }

Target:
private void doTestBadAddBookmark ( boolean valid , boolean success , java.lang.String detail ) { setUriInfo ( setUpActionExpectations ( ActionType.AddBookmark , org.ovirt.engine.core.common.action.BookmarksOperationParameters.class , new java.lang.String [ ] { "Bookmark.Name" , "Bookmark.Value" } , new java.lang.Object [ ] { NAMES [ 0 ] , org.ovirt.engine.api.restapi.resource.BackendBookmarksResourceTest.VALUES [ 0 ] } , valid , success ) ) ; try { collection.add ( org.ovirt.engine.api.restapi.resource.BackendBookmarksResourceTest.getModel ( 0 ) ) ; org.junit.jupiter.api.Assertions.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , detail ) ; } }
Source:
private < T extends org.ovirt.engine.core.common.businessentities.BusinessEntity < org.ovirt.engine.core.compat.Guid > & org.ovirt.engine.core.common.businessentities.Nameable > org.ovirt.engine.core.bll.ValidationResult validateCoherentIdentification ( org.ovirt.engine.core.compat.Guid violatingEntityId , org.ovirt.engine.core.compat.Guid referringId , java.lang.String referringName , org.ovirt.engine.core.common.errors.EngineMessage message , org.ovirt.engine.core.common.businessentities.BusinessEntityMap < T > map ) { boolean bothIdentificationSet = ( referringId != null ) && ( referringName != null ) ; java.lang.String [ ] replacements = createIncoherentIdentificationErrorReplacements ( violatingEntityId , referringId , referringName ) ; return org.ovirt.engine.core.bll.ValidationResult.failWith ( message , replacements ) . when ( ( bothIdentificationSet && ( isNameAndIdIncoherent ( referringId , referringName , map ) ) ) ) ; }

Target:
private org.ovirt.engine.core.bll.ValidationResult validateCoherentNetworkIdentification ( org.ovirt.engine.core.common.businessentities.network.NetworkAttachment attachment ) { org.ovirt.engine.core.compat.Guid networkId = attachment.getNetworkId ( ) ; java.lang.String networkName = attachment.getNetworkName ( ) ; org.ovirt.engine.core.compat.Guid violatingEntityId = attachment.getId ( ) ; return hostSetupNetworksValidatorHelper.validateCoherentIdentification ( java.lang.String.valueOf ( violatingEntityId ) , networkId , networkName , EngineMessage.NETWORK_ATTACHMENT_REFERENCES_NETWORK_INCOHERENTLY , networkBusinessEntityMap ) ; }
Source:
protected void syncSearch ( ) { if ( ( getEntity ( ) ) == null ) { return ; } org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getGlusterHooks ( new org.ovirt.engine.ui.frontend.AsyncQuery ( this , new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity > glusterHooks = ( ( java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity > ) ( returnValue ) ) ; setItems ( glusterHooks ) ; } } ) , getEntity ( ) . getId ( ) ) ; }

Target:
public void search ( ) { if ( ( getEntity ( ) ) != null ) { super . search ( ) ; } }
Source:
public com.google.gwt.resources.client.ImageResource getValue ( IVdcQueryable quota ) { boolean quotaExceeded = false ; if ( quota instanceof org.ovirt.engine.core.common.businessentities.QuotaStorage ) { quotaExceeded = getQuotaExceeded ( ( ( org.ovirt.engine.core.common.businessentities.QuotaStorage ) ( quota ) ) ) ; } else if ( quota instanceof org.ovirt.engine.core.common.businessentities.QuotaVdsGroup ) { quotaExceeded = getQuotaExceeded ( ( ( org.ovirt.engine.core.common.businessentities.QuotaVdsGroup ) ( quota ) ) ) ; } else { return null ; } if ( quotaExceeded ) { setTitle ( org.ovirt.engine.ui.webadmin.widget.table.column.QuotaUtilizationStatusColumn.applicationConstants.quotaExceeded ( ) ) ; } return quotaExceeded ? getResources ( ) . alertImage ( ) : null ; }

Target:
public com.google.gwt.resources.client.ImageResource getValue ( IVdcQueryable quota ) { boolean quotaExceeded = false ; if ( quota instanceof org.ovirt.engine.core.common.businessentities.QuotaStorage ) { quotaExceeded = getQuotaExceeded ( ( ( org.ovirt.engine.core.common.businessentities.QuotaStorage ) ( quota ) ) ) ; } else if ( quota instanceof org.ovirt.engine.core.common.businessentities.QuotaVdsGroup ) { quotaExceeded = getQuotaExceeded ( ( ( org.ovirt.engine.core.common.businessentities.QuotaVdsGroup ) ( quota ) ) ) ; } else { return null ; } return quotaExceeded ? org.ovirt.engine.ui.webadmin.widget.table.column.QuotaUtilizationStatusColumn.resources.alertImage ( ) : null ; }
Source:
public javax.ws.rs.core.Response remove ( ) { org.ovirt.engine.core.common.scheduling.AffinityGroup group = getGroup ( ) ; if ( ( group == null ) || ( ! ( group.getVmIds ( ) . remove ( asGuid ( id ) ) ) ) ) { throw new javax.ws.rs.WebApplicationException ( Response.Status.NOT_FOUND ) ; } return performAction ( VdcActionType.EditAffinityGroup , new org.ovirt.engine.core.common.scheduling.parameters.AffinityGroupCRUDParameters ( groupId , group ) ) ; }

Target:
public javax.ws.rs.core.Response remove ( ) { org.ovirt.engine.core.common.scheduling.AffinityGroup group = getGroup ( ) ; if ( ( group == null ) || ( ! ( group.getVmIds ( ) . remove ( asGuid ( id ) ) ) ) ) { throw new javax.ws.rs.WebApplicationException ( Response.Status.NOT_FOUND ) ; } return performAction ( ActionType.EditAffinityGroup , new org.ovirt.engine.core.common.scheduling.parameters.AffinityGroupCRUDParameters ( groupId , group ) ) ; }
Source:
protected boolean checkImagesStatus ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > disksToCheck = org.ovirt.engine.core.bll.storage.disk.image.ImagesHandler.filterImageDisks ( org.ovirt.engine.core.bll.storage.lsm.LiveMigrateVmDisksCommand.getDiskDao ( ) . getAllForVm ( org.ovirt.engine.core.bll.storage.lsm.LiveMigrateVmDisksCommand.getVmId ( ) ) , true , false , true ) ; org.ovirt.engine.core.bll.validator.storage.DiskImagesValidator diskImagesValidator = new org.ovirt.engine.core.bll.validator.storage.DiskImagesValidator ( disksToCheck ) ; return validate ( diskImagesValidator.diskImagesNotLocked ( ) ) ; }

Target:
protected boolean checkImagesStatus ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > disksToCheck = org.ovirt.engine.core.bll.storage.disk.image.ImagesHandler.filterImageDisks ( org.ovirt.engine.core.bll.storage.lsm.LiveMigrateVmDisksCommand.getDiskDao ( ) . getAllForVm ( org.ovirt.engine.core.bll.storage.lsm.LiveMigrateVmDisksCommand.getVmId ( ) ) , true , false , true ) ; org.ovirt.engine.core.bll.validator.storage.DiskImagesValidator diskImagesValidator = new org.ovirt.engine.core.bll.validator.storage.DiskImagesValidator ( disksToCheck ) ; return ( validate ( diskImagesValidator.diskImagesNotLocked ( ) ) ) && ( validate ( diskImagesValidator.diskImagesHaveNotExceededMaxNumberOfVolumesInImageChain ( ) ) ) ; }
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 ( "IsLinux_Unassign_UnknownOS" . equals ( propName ) ) { linuxBootOptionsPanel.setVisible ( vm.getIsLinux_Unassign_UnknownOS ( ) ) ; } }

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 ( "IsLinuxOS" . equals ( propName ) ) { linuxBootOptionsPanel.setVisible ( vm.getIsLinuxOS ( ) ) ; } }
Source:
public void edit ( final org.ovirt.engine.ui.uicommonweb.models.storage.SanStorageModelBase object ) { driver.edit ( object ) ; initLists ( object ) ; object.getPropertyChangedEvent ( ) . addListener ( new org.ovirt.engine.ui.uicompat.IEventListener ( ) { @ java.lang.Override 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 ( propName.equals ( "IsValid" ) ) { onIsValidPropertyChange ( object ) ; } } } ) ; }

Target:
public void edit ( final org.ovirt.engine.ui.uicommonweb.models.storage.SanStorageModelBase object ) { driver.edit ( object ) ; initLists ( object ) ; object.getPropertyChangedEvent ( ) . addListener ( new org.ovirt.engine.ui.uicompat.IEventListener < org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs > ( ) { @ java.lang.Override public void eventRaised ( org.ovirt.engine.ui.uicompat.Event < ? extends org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs > ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs args ) { java.lang.String propName = args.propertyName ; if ( propName.equals ( "IsValid" ) ) { onIsValidPropertyChange ( object ) ; } } } ) ; }
Source:
public boolean getIsQxlSupported ( ) { boolean isLinux = getIsLinuxOS ( ) ; boolean isQxl = ( getDisplayType ( ) ) == ( org.ovirt.engine.core.common.businessentities.DisplayType.qxl ) ; boolean clusterSupportsSinglePci = ( ( getSelectedCluster ( ) ) != null ) && ( ( Version.v3_3.compareTo ( getSelectedCluster ( ) . getcompatibility_version ( ) ) ) <= 0 ) ; return ( isLinux && isQxl ) && clusterSupportsSinglePci ; }

Target:
private void updateNumOfMonitors ( ) { if ( ( getDisplayType ( ) . getSelectedItem ( ) ) == ( org.ovirt.engine.core.common.businessentities.DisplayType.qxl ) ) { getNumOfMonitors ( ) . setIsChangeable ( true ) ; } else { getNumOfMonitors ( ) . setSelectedItem ( 1 ) ; getNumOfMonitors ( ) . setIsChangeable ( false ) ; } }
Source:
public org.ovirt.engine.core.bll.ValidationResult addLabelToNicAndValidate ( java.lang.String label , java.util.List < java.lang.Class < ? > > commandValidationGroups ) { java.util.Set < java.lang.String > labels = iface.getLabels ( ) ; if ( labels == null ) { labels = new java.util.HashSet < > ( ) ; iface.setLabels ( labels ) ; } labels.add ( label ) ; java.util.List < java.lang.String > validationResult = org.ovirt.engine.core.common.utils.ValidationUtils.validateInputs ( commandValidationGroups , iface ) ; return org.ovirt.engine.core.bll.ValidationResult.failWith ( VdcBllMessages.IMPROPER_INTERFACE_IS_LABELED ) . when ( ( ! ( validationResult.isEmpty ( ) ) ) ) ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult interfaceIsBondOrNull ( ) { java.lang.String ifaceName = ( ( iface ) == null ) ? "null" : iface.getName ( ) ; return org.ovirt.engine.core.bll.ValidationResult.failWith ( EngineMessage.NETWORK_INTERFACE_IS_NOT_BOND , org.ovirt.engine.core.utils.ReplacementUtils.createSetVariableString ( org.ovirt.engine.core.bll.validator.HostInterfaceValidator.VAR_NETWORK_INTERFACE_IS_NOT_BOND_ENTITY , ifaceName ) ) . when ( ( ( ( iface ) != null ) && ( ! ( iface.isBond ( ) ) ) ) ) ; }
Source:
private void handleHostsWithVmsWithPluggedDiskSnapshots ( java.util.List < java.lang.String > hostsWithVmsWithPluggedDiskSnapshots ) { if ( ! ( hostsWithVmsWithPluggedDiskSnapshots.isEmpty ( ) ) ) { org.ovirt.engine.core.bll.MaintenanceNumberOfVdssCommand.getReturnValue ( ) . getCanDoActionMessages ( ) . add ( java.lang.String.format ( "$HostsList %1$s" , org.apache.commons.lang.StringUtils.join ( hostsWithVmsWithPluggedDiskSnapshots , "," ) ) ) ; } }

Target:
private void handleHostsWithVmsWithPluggedDiskSnapshots ( java.util.List < java.lang.String > hostsWithVmsWithPluggedDiskSnapshots ) { if ( ! ( hostsWithVmsWithPluggedDiskSnapshots.isEmpty ( ) ) ) { org.ovirt.engine.core.bll.MaintenanceNumberOfVdssCommand.getReturnValue ( ) . getValidationMessages ( ) . add ( java.lang.String.format ( "$HostsList %1$s" , org.apache.commons.lang.StringUtils.join ( hostsWithVmsWithPluggedDiskSnapshots , "," ) ) ) ; } }
Source:
public void createCpuProfileTest ( ) { org.ovirt.engine.core.common.businessentities.profiles.CpuProfile cpuProfile = org.ovirt.engine.core.bll.profiles.CpuProfileHelper.createCpuProfile ( org.ovirt.engine.core.bll.profiles.CpuProfileHelperTest.CLUSTER_ID , org.ovirt.engine.core.bll.profiles.CpuProfileHelperTest.CLUSTER_NAME ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.core.bll.profiles.CpuProfileHelperTest.CLUSTER_NAME , cpuProfile.getName ( ) ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.core.bll.profiles.CpuProfileHelperTest.CLUSTER_ID , cpuProfile.getClusterId ( ) ) ; org.junit.Assert.assertNotNull ( cpuProfile.getId ( ) ) ; org.junit.Assert.assertEquals ( ProfileType.CPU , cpuProfile.getProfileType ( ) ) ; }

Target:
public void createCpuProfileTest ( ) { org.ovirt.engine.core.common.businessentities.profiles.CpuProfile cpuProfile = org.ovirt.engine.core.bll.profiles.CpuProfileHelper.createCpuProfile ( org.ovirt.engine.core.bll.profiles.CpuProfileHelperTest.CLUSTER_ID , org.ovirt.engine.core.bll.profiles.CpuProfileHelperTest.CLUSTER_NAME ) ; org.junit.jupiter.api.Assertions.assertEquals ( org.ovirt.engine.core.bll.profiles.CpuProfileHelperTest.CLUSTER_NAME , cpuProfile.getName ( ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( org.ovirt.engine.core.bll.profiles.CpuProfileHelperTest.CLUSTER_ID , cpuProfile.getClusterId ( ) ) ; org.junit.jupiter.api.Assertions.assertNotNull ( cpuProfile.getId ( ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( ProfileType.CPU , cpuProfile.getProfileType ( ) ) ; }
Source:
public static org.ovirt.engine.core.common.businessentities.storage.ImageStatus map ( org.ovirt.engine.api.model.DiskStatus diskStatus ) { if ( diskStatus == null ) { return null ; } else { switch ( diskStatus ) { case ILLEGAL : return org.ovirt.engine.core.common.businessentities.storage.ImageStatus.ILLEGAL ; case LOCKED : return org.ovirt.engine.core.common.businessentities.storage.ImageStatus.LOCKED ; case OK : return org.ovirt.engine.core.common.businessentities.storage.ImageStatus.OK ; default : return null ; } } }

Target:
private static org.ovirt.engine.core.common.businessentities.storage.ImageStatus mapDiskStatus ( org.ovirt.engine.api.model.DiskStatus status ) { if ( status == null ) { return null ; } switch ( status ) { case ILLEGAL : return org.ovirt.engine.core.common.businessentities.storage.ImageStatus.ILLEGAL ; case LOCKED : return org.ovirt.engine.core.common.businessentities.storage.ImageStatus.LOCKED ; case OK : return org.ovirt.engine.core.common.businessentities.storage.ImageStatus.OK ; default : return null ; } }
Source:
public void getClusterList ( 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 ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > list = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ) ( source ) ) ; java.util.Collections.sort ( list , new org.ovirt.engine.core.common.businessentities.comparators.NameableComparator ( ) ) ; return list ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVdsGroupsByStoragePoolId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) , aQuery ) ; }

Target:
public void getClusterList ( 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 ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Cluster > list = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Cluster > ) ( source ) ) ; java.util.Collections.sort ( list , new org.ovirt.engine.core.common.businessentities.comparators.NameableComparator ( ) ) ; return list ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Cluster > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetClustersByStoragePoolId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) , aQuery ) ; }
Source:
public void setRowData ( int start , java.util.List < ? extends T > values ) { super . setRowData ( start , values ) ; selectionModel.resolveChanges ( ) ; if ( ( ( ( values.size ( ) ) == 1 ) && ( selectionModel.getSelectedList ( ) . isEmpty ( ) ) ) && ( doAutoSelect ) ) { selectionModel.setSelected ( values.get ( 0 ) , true ) ; doAutoSelect = false ; } updateTableControls ( ) ; }

Target:
public void execute ( ) { selectionModel.setSelected ( values.get ( 0 ) , true ) ; }
Source:
protected org.ovirt.engine.core.common.businessentities.qos.QosBase createQosEntity ( java.sql.ResultSet rs ) throws java.sql.SQLException { org.ovirt.engine.core.common.businessentities.qos.QosType qosType = org.ovirt.engine.core.common.businessentities.qos.QosType.forValue ( rs.getInt ( "qos_type" ) ) ; switch ( qosType ) { case STORAGE : return StorageQosDaoDbFacadeImpl.StorageDaoDbFacadaeImplMapper.MAPPER.createQosEntity ( rs ) ; case CPU : return CpuQosDaoDbFacadeImpl.CpuDaoDbFacadaeImplMapper.MAPPER.createQosEntity ( rs ) ; case NETWORK : return NetworkQoSDaoFacadeImpl.NetworkQosDaoDbFacadaeImplMapper.MAPPER.createQosEntity ( rs ) ; case HOSTNETWORK : return HostNetworkQosDaoDbFacadeImpl.HostNetworkQosDaoDbFacadaeImplMapper.MAPPER.createQosEntity ( rs ) ; default : org.ovirt.engine.core.dao.qos.AllQosBaseDaoFacadeImpl.log.debug ( "not handled/missing qos_type '{}'" , qosType ) ; break ; } return null ; }

Target:
protected org.ovirt.engine.core.common.businessentities.qos.QosBase createQosEntity ( java.sql.ResultSet rs ) throws java.sql.SQLException { org.ovirt.engine.core.common.businessentities.qos.QosType qosType = org.ovirt.engine.core.common.businessentities.qos.QosType.forValue ( rs.getInt ( "qos_type" ) ) ; switch ( qosType ) { case STORAGE : return StorageQosDaoImpl.StorageDaoDbFacadaeImplMapper.MAPPER.createQosEntity ( rs ) ; case CPU : return CpuQosDaoImpl.CpuDaoDbFacadaeImplMapper.MAPPER.createQosEntity ( rs ) ; case NETWORK : return NetworkQoSDaoFacadeImpl.NetworkQosDaoDbFacadaeImplMapper.MAPPER.createQosEntity ( rs ) ; case HOSTNETWORK : return HostNetworkQosDaoImpl.HostNetworkQosDaoDbFacadaeImplMapper.MAPPER.createQosEntity ( rs ) ; default : org.ovirt.engine.core.dao.qos.AllQosBaseDaoFacadeImpl.log.debug ( "not handled/missing qos_type '{}'" , qosType ) ; break ; } return null ; }
Source:
public void testGetAllForStorageDomainFull ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.profiles.DiskProfile > result = dao.getAllForStorageDomain ( FixturesTool.STORAGE_DOAMIN_SCALE_SD5 ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertEquals ( 2 , result.size ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.profiles.DiskProfile diskProfile : result ) { org.junit.Assert.assertEquals ( FixturesTool.STORAGE_DOAMIN_SCALE_SD5 , diskProfile.getStorageDomainId ( ) ) ; } }

Target:
public void testGetAllForStorageDomainFull ( ) { checkResults ( dao.getAllForStorageDomain ( FixturesTool.STORAGE_DOAMIN_SCALE_SD5 ) ) ; }
Source:
private javax.ws.rs.core.Response addSAN ( org.ovirt.engine.api.model.StorageDomain model , org.ovirt.engine.core.common.businessentities.StorageType storageType , org.ovirt.engine.core.common.businessentities.StorageDomainStatic entity , org.ovirt.engine.core.compat.Guid hostId ) { boolean overrideLuns = ( model.getStorage ( ) . isSetOverrideLuns ( ) ) ? model.getStorage ( ) . isOverrideLuns ( ) : false ; return performCreation ( VdcActionType.AddSANStorageDomain , getSanAddParams ( entity , hostId , getLunIds ( model.getStorage ( ) , storageType , hostId ) , overrideLuns ) , ID_RESOLVER ) ; }

Target:
private javax.ws.rs.core.Response addSAN ( org.ovirt.engine.api.model.StorageDomain model , org.ovirt.engine.core.common.businessentities.StorageType storageType , org.ovirt.engine.core.common.businessentities.StorageDomainStatic entity , org.ovirt.engine.core.compat.Guid hostId ) { boolean overrideLuns = ( model.getStorage ( ) . isSetOverrideLuns ( ) ) ? model.getStorage ( ) . isOverrideLuns ( ) : false ; return performCreate ( VdcActionType.AddSANStorageDomain , getSanAddParams ( entity , hostId , getLunIds ( model.getStorage ( ) , storageType , hostId ) , overrideLuns ) , ID_RESOLVER ) ; }