auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public java.lang.String render ( T size ) { if ( isUnavailable ( size ) ) { return org.ovirt.engine.ui.common.widget.renderer.DiskSizeRenderer.CONSTANTS.unAvailablePropertyLabel ( ) ; } switch ( format ) { case GIGABYTE : return renderGigabyteSize ( size.longValue ( ) ) ; case HUMAN_READABLE : return renderHumanReadableSize ( size.longValue ( ) ) ; default : throw new java.lang.RuntimeException ( ( ( "Format '" + ( format ) ) + "' is not supported!" ) ) ; } }

Target:
public java.lang.String render ( T size ) { if ( isUnavailable ( size ) ) { return org.ovirt.engine.ui.common.widget.renderer.DiskSizeRenderer.constants.unAvailablePropertyLabel ( ) ; } switch ( format ) { case GIGABYTE : return renderGigabyteSize ( size.longValue ( ) ) ; case HUMAN_READABLE : return renderHumanReadableSize ( size.longValue ( ) ) ; default : throw new java.lang.RuntimeException ( ( ( "Format '" + ( format ) ) + "' is not supported!" ) ) ; } }
Source:
public void testGetAllOfTypes ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VDS > result = dao.getAllOfTypes ( new org.ovirt.engine.core.common.businessentities.VDSType [ ] { org.ovirt.engine.core.common.businessentities.VDSType.VDS } ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertFalse ( result.isEmpty ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.VDS vds : result ) { org.junit.Assert.assertEquals ( VDSType.VDS , vds.getVdsType ( ) ) ; } }

Target:
public void testGetAllOfTypes ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VDS > result = dao.getAllOfTypes ( new org.ovirt.engine.core.common.businessentities.VDSType [ ] { org.ovirt.engine.core.common.businessentities.VDSType.VDS } ) ; org.junit.jupiter.api.Assertions.assertNotNull ( result ) ; org.junit.jupiter.api.Assertions.assertFalse ( result.isEmpty ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.VDS vds : result ) { org.junit.jupiter.api.Assertions.assertEquals ( VDSType.VDS , vds.getVdsType ( ) ) ; } }
Source:
public static boolean setDiskAlias ( org.ovirt.engine.core.common.businessentities.BaseDisk disk , org.ovirt.engine.core.common.businessentities.VM vm ) { if ( disk != null ) { java.lang.String vmName = "" ; if ( vm != null ) { vmName = vm.getvm_name ( ) ; } disk.setDiskAlias ( org.ovirt.engine.core.bll.ImagesHandler.getSuggestedDiskAlias ( disk , vmName ) ) ; return true ; } else { org.ovirt.engine.core.bll.ImagesHandler.log.errorFormat ( "Disk object is null" ) ; return false ; } }

Target:
public static boolean setDiskAlias ( org.ovirt.engine.core.common.businessentities.BaseDisk disk , org.ovirt.engine.core.common.businessentities.VM vm ) { if ( disk != null ) { java.lang.String vmName = "" ; int count = 1 ; if ( vm != null ) { vmName = vm.getvm_name ( ) ; count = ( vm.getDiskMapCount ( ) ) + 1 ; } disk.setDiskAlias ( org.ovirt.engine.core.bll.ImagesHandler.getSuggestedDiskAlias ( disk , vmName , count ) ) ; return true ; } else { org.ovirt.engine.core.bll.ImagesHandler.log.errorFormat ( "Disk object is null" ) ; return false ; } }
Source:
public java.lang.Object runInTransaction ( ) { getCompensationContext ( ) . snapshotEntityStatus ( getVm ( ) . getDynamicData ( ) ) ; getVm ( ) . setStatus ( VMStatus.PreparingForHibernate ) ; org.ovirt.engine.core.bll.Backend.getInstance ( ) . getResourceManager ( ) . RunVdsCommand ( VDSCommandType.UpdateVmDynamicData , new org.ovirt.engine.core.common.vdscommands.UpdateVmDynamicDataVDSCommandParameters ( getVdsId ( ) , getVm ( ) . getDynamicData ( ) ) ) ; getCompensationContext ( ) . stateChanged ( ) ; return null ; }

Target:
public java.lang.Object runInTransaction ( ) { getCompensationContext ( ) . snapshotEntityStatus ( getVm ( ) . getDynamicData ( ) ) ; getVm ( ) . setStatus ( VMStatus.PreparingForHibernate ) ; runVdsCommand ( VDSCommandType.UpdateVmDynamicData , new org.ovirt.engine.core.common.vdscommands.UpdateVmDynamicDataVDSCommandParameters ( getVdsId ( ) , getVm ( ) . getDynamicData ( ) ) ) ; getCompensationContext ( ) . stateChanged ( ) ; return null ; }
Source:
public static 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.RunQuery ( VdcQueryType.GetLunsByVgId , params , aQuery ) ; }

Target:
public static void getAllAttachableDisks ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.compat.Guid vmId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ( ) ; } } ; org.ovirt.engine.core.common.queries.GetAllAttachableDisks params = new org.ovirt.engine.core.common.queries.GetAllAttachableDisks ( storagePoolId ) ; params.setVmId ( vmId ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllAttachableDisks , params , aQuery ) ; }
Source:
public static void UpdateVdsDomainsData ( org.ovirt.engine.core.common.businessentities.VDS vds , org.ovirt.engine.core.compat.Guid storagePoolId , java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSDomainsData > vdsDomainData ) { if ( ( vds.getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VDSStatus.Up ) ) { org.ovirt.engine.core.vdsbroker.irsbroker.IrsBrokerCommand.IrsProxyData proxy = org.ovirt.engine.core.vdsbroker.irsbroker.IrsBrokerCommand._irsProxyData.get ( storagePoolId ) ; if ( proxy != null ) { proxy.UpdateVdsDomainsData ( vds.getId ( ) , vds.getName ( ) , vdsDomainData ) ; } } }

Target:
public static void updateVdsDomainsData ( org.ovirt.engine.core.common.businessentities.VDS vds , org.ovirt.engine.core.compat.Guid storagePoolId , java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSDomainsData > vdsDomainData ) { if ( ( vds.getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VDSStatus.Up ) ) { org.ovirt.engine.core.vdsbroker.irsbroker.IrsBrokerCommand.IrsProxyData proxy = org.ovirt.engine.core.vdsbroker.irsbroker.IrsBrokerCommand._irsProxyData.get ( storagePoolId ) ; if ( proxy != null ) { proxy.updateVdsDomainsData ( vds.getId ( ) , vds.getName ( ) , vdsDomainData ) ; } } }
Source:
public java.util.List < java.lang.String > allocateMacAddresses ( int numberOfAddresses ) { java.util.List < java.lang.Long > macs = macsStorage.allocateAvailableMacs ( numberOfAddresses ) ; java.util.Collections.sort ( macs ) ; logWhenMacPoolIsEmpty ( ) ; return org.ovirt.engine.core.utils.MacAddressRangeUtils.macAddressesToStrings ( macs ) ; }

Target:
public java.util.List < java.lang.String > allocateMacAddresses ( int numberOfAddresses ) { org.ovirt.engine.core.bll.network.macpool.MacPoolUsingRanges.log.debug ( "Allocating mac addresses from {}." , numberOfAddresses , this ) ; java.util.List < java.lang.Long > macs = macsStorage.allocateAvailableMacs ( numberOfAddresses ) ; java.util.List < java.lang.String > result = org.ovirt.engine.core.utils.MacAddressRangeUtils.macAddressesToStrings ( macs ) ; org.ovirt.engine.core.bll.network.macpool.MacPoolUsingRanges.log.debug ( "Allocated mac addresses: from {}." , result , this ) ; java.util.Collections.sort ( result ) ; logWhenMacPoolIsEmpty ( ) ; return result ; }
Source:
public void setConsoleAddressPartiallyOverridden ( java.lang.Boolean consoleAddressPartiallyOverridden ) { if ( ( this . consoleAddressPartiallyOverridden ) != consoleAddressPartiallyOverridden ) { this . consoleAddressPartiallyOverridden = consoleAddressPartiallyOverridden ; onPropertyChanged ( new org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ( "consoleAddressPartiallyOverridden" ) ) ; } }

Target:
public void setConsoleAddressPartiallyOverridden ( java.lang.Boolean consoleAddressPartiallyOverridden ) { if ( ( ( this . consoleAddressPartiallyOverridden ) == null ? false : this . consoleAddressPartiallyOverridden.booleanValue ( ) ) != ( consoleAddressPartiallyOverridden == null ? false : consoleAddressPartiallyOverridden.booleanValue ( ) ) ) { this . consoleAddressPartiallyOverridden = consoleAddressPartiallyOverridden ; onPropertyChanged ( new org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ( "consoleAddressPartiallyOverridden" ) ) ; } }
Source:
public org.ovirt.engine.core.bll.SPMAsyncTask concreteCreateTask ( org.ovirt.engine.core.compat.Guid taskId , org.ovirt.engine.core.common.asynctasks.AsyncTaskCreationInfo asyncTaskCreationInfo , org.ovirt.engine.core.common.action.VdcActionType parentCommand ) { org.ovirt.engine.core.common.asynctasks.AsyncTaskParameters p = new org.ovirt.engine.core.common.asynctasks.AsyncTaskParameters ( asyncTaskCreationInfo , getAsyncTask ( taskId , asyncTaskCreationInfo , parentCommand ) ) ; p.setEntityInfo ( getParameters ( ) . getEntityInfo ( ) ) ; return createTask ( internalGetTaskType ( ) , p ) ; }

Target:
private java.lang.String getFieldName ( java.lang.String methodName ) { java.lang.String GET_ROOT = "get" ; java.lang.String IS_ROOT = "is" ; return methodName.startsWith ( GET_ROOT ) ? methodName.substring ( GET_ROOT.length ( ) ) : methodName.substring ( IS_ROOT.length ( ) ) ; }
Source:
public void testRemoveNonExistant ( ) throws java.lang.Exception { setUpGetEntityExpectations ( QueryType.GetVmTemplate , org.ovirt.engine.core.common.queries.GetVmTemplateParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , null ) ; try { resource.remove ( ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { assertNotNull ( wae.getResponse ( ) ) ; assertEquals ( 404 , wae.getResponse ( ) . getStatus ( ) ) ; } }

Target:
public void testRemoveNonExistant ( ) throws java.lang.Exception { setUpGetEntityExpectations ( QueryType.GetVmTemplate , org.ovirt.engine.core.common.queries.GetVmTemplateParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , null ) ; try { resource.remove ( ) ; org.junit.Assert.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { org.junit.Assert.assertNotNull ( wae.getResponse ( ) ) ; org.junit.Assert.assertEquals ( 404 , wae.getResponse ( ) . getStatus ( ) ) ; } }
Source:
public void testAddIncompleteParameters ( ) throws java.lang.Exception { org.ovirt.engine.api.model.Disk model = new org.ovirt.engine.api.model.Disk ( ) ; model.setName ( NAMES [ 0 ] ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; control.replay ( ) ; try { collection.add ( model ) ; fail ( "expected WebApplicationException on incomplete parameters" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyIncompleteException ( wae , "Disk" , "add" , "provisionedSize|size" , "format" , "interface" ) ; } }

Target:
private void doTestBadAddDisk ( boolean canDo , boolean success , java.lang.String detail ) throws java.lang.Exception { setUriInfo ( setUpActionExpectations ( VdcActionType.AddDisk , org.ovirt.engine.core.common.action.AddDiskParameters.class , new java.lang.String [ ] { "VmId" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.AbstractBackendDisksResourceTest.PARENT_ID } , canDo , success ) ) ; org.ovirt.engine.api.model.Disk model = getModel ( 0 ) ; model.setSize ( ( 1024 * 1024L ) ) ; try { collection.add ( model ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , detail ) ; } }
Source:
protected boolean canDoAction ( ) { org.ovirt.engine.core.common.businessentities.VDSGroup cluster = org.ovirt.engine.core.bll.gluster.SyncStorageDevicesCommand.getVdsGroup ( ) ; if ( ( ! ( cluster.supportsGlusterService ( ) ) ) || ( ! ( getGlusterUtil ( ) . isGlusterBrickProvisioningSupported ( cluster.getCompatibilityVersion ( ) , org.ovirt.engine.core.bll.gluster.SyncStorageDevicesCommand.getVdsGroup ( ) . getId ( ) ) ) ) ) { return failCanDoAction ( VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_PROVISIONING_NOT_SUPPORTED_BY_CLUSTER ) ; } org.ovirt.engine.core.bll.VdsValidator validator = new org.ovirt.engine.core.bll.VdsValidator ( org.ovirt.engine.core.bll.gluster.SyncStorageDevicesCommand.getVds ( ) ) ; return validate ( validator.isUp ( ) ) ; }

Target:
protected boolean canDoAction ( ) { org.ovirt.engine.core.common.businessentities.VDSGroup cluster = org.ovirt.engine.core.bll.gluster.SyncStorageDevicesCommand.getVdsGroup ( ) ; if ( ( ! ( cluster.supportsGlusterService ( ) ) ) || ( ! ( getGlusterUtil ( ) . isGlusterBrickProvisioningSupported ( cluster.getCompatibilityVersion ( ) , org.ovirt.engine.core.bll.gluster.SyncStorageDevicesCommand.getVdsGroup ( ) . getId ( ) ) ) ) ) { return failCanDoAction ( EngineMessage.ACTION_TYPE_FAILED_STORAGE_PROVISIONING_NOT_SUPPORTED_BY_CLUSTER ) ; } org.ovirt.engine.core.bll.validator.HostValidator validator = new org.ovirt.engine.core.bll.validator.HostValidator ( org.ovirt.engine.core.bll.gluster.SyncStorageDevicesCommand.getVds ( ) ) ; return validate ( validator.isUp ( ) ) ; }
Source:
private boolean canRemoveVmWithDetachDisks ( ) { if ( ! ( Guid.Empty.equals ( org.ovirt.engine.core.bll.RemoveVmCommand.getVm ( ) . getVmtGuid ( ) ) ) ) { return failCanDoAction ( VdcBllMessages.VM_CANNOT_REMOVE_WITH_DETACH_DISKS_BASED_ON_TEMPLATE ) ; } for ( org.ovirt.engine.core.common.businessentities.Disk disk : org.ovirt.engine.core.bll.RemoveVmCommand.getVm ( ) . getDiskList ( ) ) { java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > diskImageList = org.ovirt.engine.core.bll.RemoveVmCommand.getDiskImageDao ( ) . getAllSnapshotsForImageGroup ( disk.getId ( ) ) ; if ( ( diskImageList.size ( ) ) > 1 ) { return failCanDoAction ( VdcBllMessages.VM_CANNOT_REMOVE_WITH_DETACH_DISKS_SNAPSHOTS_EXIST ) ; } } return true ; }

Target:
private boolean canRemoveVmWithDetachDisks ( ) { if ( ! ( Guid.Empty.equals ( org.ovirt.engine.core.bll.RemoveVmCommand.getVm ( ) . getVmtGuid ( ) ) ) ) { return failCanDoAction ( VdcBllMessages.VM_CANNOT_REMOVE_WITH_DETACH_DISKS_BASED_ON_TEMPLATE ) ; } for ( org.ovirt.engine.core.common.businessentities.storage.Disk disk : org.ovirt.engine.core.bll.RemoveVmCommand.getVm ( ) . getDiskList ( ) ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > diskImageList = org.ovirt.engine.core.bll.RemoveVmCommand.getDiskImageDao ( ) . getAllSnapshotsForImageGroup ( disk.getId ( ) ) ; if ( ( diskImageList.size ( ) ) > 1 ) { return failCanDoAction ( VdcBllMessages.VM_CANNOT_REMOVE_WITH_DETACH_DISKS_SNAPSHOTS_EXIST ) ; } } return true ; }
Source:
public java.lang.String getValue ( org.ovirt.engine.core.common.businessentities.DiskImage disk ) { org.ovirt.engine.ui.uicommonweb.models.vms.ImportDiskData importData = importModel.getDiskImportData ( disk.getId ( ) ) ; if ( importData == null ) { return "" ; } return new org.ovirt.engine.ui.common.widget.renderer.EnumRenderer < org.ovirt.engine.core.common.businessentities.VolumeType > ( ) . render ( org.ovirt.engine.core.common.businessentities.VolumeType.forValue ( importData.getSelectedVolumeType ( ) . getValue ( ) ) ) ; }

Target:
public java.lang.String getValue ( org.ovirt.engine.core.common.businessentities.storage.DiskImage disk ) { org.ovirt.engine.ui.uicommonweb.models.vms.ImportDiskData importData = importModel.getDiskImportData ( disk.getId ( ) ) ; if ( importData == null ) { return "" ; } return new org.ovirt.engine.ui.common.widget.renderer.EnumRenderer < org.ovirt.engine.core.common.businessentities.storage.VolumeType > ( ) . render ( org.ovirt.engine.core.common.businessentities.storage.VolumeType.forValue ( importData.getSelectedVolumeType ( ) . getValue ( ) ) ) ; }
Source:
public java.lang.String disableEffectsAsString ( ) { java.lang.StringBuffer disableEffectsBuffer = new java.lang.StringBuffer ( "" ) ; int countdown = getWanDisableEffects ( ) . size ( ) ; for ( org.ovirt.engine.core.common.console.ConsoleOptions.WanDisableEffects disabledEffect : getWanDisableEffects ( ) ) { disableEffectsBuffer.append ( disabledEffect.asString ( ) ) ; if ( countdown != 1 ) { disableEffectsBuffer.append ( ", " ) ; } countdown -- ; } return disableEffectsBuffer.toString ( ) ; }

Target:
public java.lang.String disableEffectsAsString ( ) { java.lang.StringBuilder disableEffectsBuffer = new java.lang.StringBuilder ( ) ; int countdown = getWanDisableEffects ( ) . size ( ) ; for ( org.ovirt.engine.core.common.console.ConsoleOptions.WanDisableEffects disabledEffect : getWanDisableEffects ( ) ) { disableEffectsBuffer.append ( disabledEffect.asString ( ) ) ; if ( countdown != 1 ) { disableEffectsBuffer.append ( ", " ) ; } countdown -- ; } return disableEffectsBuffer.toString ( ) ; }
Source:
private void initiateLockEndAction ( ) { if ( ( context.getLock ( ) ) == null ) { org.ovirt.engine.core.bll.LockIdNameAttribute annotation = getClass ( ) . getAnnotation ( org.ovirt.engine.core.bll.LockIdNameAttribute.class ) ; if ( ( annotation != null ) && ( ! ( annotation.isReleaseAtEndOfExecute ( ) ) ) ) { context.withLock ( buildLock ( ) ) ; } } }

Target:
private boolean isCanDoActionSupportsTransaction ( ) { return getClass ( ) . isAnnotationPresent ( org.ovirt.engine.core.bll.CanDoActionSupportsTransaction.class ) ; }
Source:
public static java.lang.String map ( org.ovirt.engine.api.model.StorageDomainType storageDomainType , java.lang.String template ) { switch ( storageDomainType ) { case Master : return StorageDomainType.DATA.value ( ) ; case Data : return StorageDomainType.DATA.value ( ) ; case ISO : return StorageDomainType.ISO.value ( ) ; case ImportExport : return StorageDomainType.EXPORT.value ( ) ; case Unknown : default : return null ; } }

Target:
public static java.lang.String map ( org.ovirt.engine.api.model.StorageDomainType storageDomainType , java.lang.String template ) { switch ( storageDomainType ) { case Master : return StorageDomainType.DATA.value ( ) ; case Data : return StorageDomainType.DATA.value ( ) ; case ISO : return StorageDomainType.ISO.value ( ) ; case ImportExport : return StorageDomainType.EXPORT.value ( ) ; case Image : return StorageDomainType.IMAGE.value ( ) ; case Unknown : default : return null ; } }
Source:
public void testNoDiskBootFromIsoDomain ( ) { org.ovirt.engine.core.common.businessentities.VM vm = new org.ovirt.engine.core.common.businessentities.VM ( ) ; org.ovirt.engine.core.bll.validator.RunVmValidator mock = new org.ovirt.engine.core.bll.validator.RunVmValidator ( ) { @ java.lang.Override protected org.ovirt.engine.core.bll.IsoDomainListSyncronizer getIsoDomainListSyncronizer ( ) { return new org.ovirt.engine.core.bll.IsoDomainListSyncronizer ( ) { @ java.lang.Override protected void init ( ) { } @ java.lang.Override public org.ovirt.engine.core.compat.Guid findActiveISODomain ( org.ovirt.engine.core.compat.Guid storagePoolId ) { return new org.ovirt.engine.core.compat.Guid ( ) ; } } ; } } ; org.ovirt.engine.core.bll.validator.RunVmValidatorTest.validateResult ( mock.validateBootSequence ( vm , BootSequence.CD , new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ( ) ) , true , null ) ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult hasSpaceForSnapshots ( org.ovirt.engine.core.common.businessentities.VM vm , java.util.List < org.ovirt.engine.core.common.businessentities.Disk > plugDisks ) { return org.ovirt.engine.core.bll.ValidationResult.VALID ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StoragePool > pools = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StoragePool > ) ( returnValue ) ) ; org.ovirt.engine.core.common.businessentities.StoragePool pool = pools.get ( 0 ) ; if ( pool != null ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getStorageDomainList ( ( ( org.ovirt.engine.ui.frontend.AsyncQuery ) ( model ) ) , pool.getId ( ) ) ; } }

Target:
public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ExternalComputeResource > ( ) ; } return source ; }
Source:
public org.ovirt.engine.core.vdsbroker.irsbroker.GlusterVolumeStatusReturnForXmlRpc glusterVolumeStatus ( org.ovirt.engine.core.compat.Guid clusterId , java.lang.String volumeName , java.lang.String brickName , java.lang.String volumeStatusOption ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.glusterVolumeStatus ( volumeName , brickName , volumeStatusOption ) ; org.ovirt.engine.core.vdsbroker.irsbroker.GlusterVolumeStatusReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.irsbroker.GlusterVolumeStatusReturnForXmlRpc ( clusterId , 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.gluster.GlusterVolumeStatusReturnForXmlRpc glusterVolumeStatus ( org.ovirt.engine.core.compat.Guid clusterId , java.lang.String volumeName , java.lang.String brickName , java.lang.String volumeStatusOption ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.glusterVolumeStatus ( volumeName , brickName , volumeStatusOption ) ; org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeStatusReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeStatusReturnForXmlRpc ( clusterId , xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
Source:
public static org.ovirt.engine.api.model.Role map ( org.ovirt.engine.core.common.businessentities.Permissions entity , org.ovirt.engine.api.model.Role template ) { org.ovirt.engine.api.model.Role model = ( template != null ) ? template : new org.ovirt.engine.api.model.Role ( ) ; model.setName ( entity.getRoleName ( ) ) ; model.setId ( entity.getrole_id ( ) . toString ( ) ) ; return model ; }

Target:
public static org.ovirt.engine.api.model.Role map ( org.ovirt.engine.core.common.businessentities.Permissions entity , org.ovirt.engine.api.model.Role template ) { org.ovirt.engine.api.model.Role model = ( template != null ) ? template : new org.ovirt.engine.api.model.Role ( ) ; model.setName ( entity.getRoleName ( ) ) ; model.setId ( entity.getRoleId ( ) . toString ( ) ) ; return model ; }
Source:
protected boolean canDoAction ( ) { super . canDoAction ( ) ; addCanDoActionMessage ( VdcBllMessages.VAR__ACTION__ACTIVATE ) ; boolean returnValue = ( ( ( ( org.ovirt.engine.core.bll.storage.ActivateStorageDomainCommand.checkStoragePool ( ) ) && ( CheckStoragePoolStatusNotEqual ( StoragePoolStatus.Uninitialized , VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_POOL_STATUS_ILLEGAL ) ) ) && ( org.ovirt.engine.core.bll.storage.ActivateStorageDomainCommand.CheckStorageDomain ( ) ) ) && ( storageDomainStatusIsValid ( ) ) ) && ( ( ( org.ovirt.engine.core.bll.storage.ActivateStorageDomainCommand.getStorageDomain ( ) . getstorage_domain_type ( ) ) == ( org.ovirt.engine.core.common.businessentities.StorageDomainType.Master ) ) || ( org.ovirt.engine.core.bll.storage.ActivateStorageDomainCommand.CheckMasterDomainIsUp ( ) ) ) ; return returnValue ; }

Target:
protected void setActionMessageParameters ( ) { addCanDoActionMessage ( VdcBllMessages.VAR__TYPE__STORAGE__DOMAIN ) ; addCanDoActionMessage ( VdcBllMessages.VAR__ACTION__ACTIVATE ) ; }
Source:
public void testGetEntityNameByIdAndTypeForQuota ( ) { org.ovirt.engine.core.common.businessentities.Quota quota = dbFacade.getQuotaDAO ( ) . getById ( org.ovirt.engine.core.dao.DbFacadeDAOTest.QUOTA_ID ) ; org.junit.Assert.assertNotNull ( quota ) ; java.lang.String name = quota.getQuotaName ( ) ; org.junit.Assert.assertTrue ( name.equals ( dbFacade.getEntityNameByIdAndType ( org.ovirt.engine.core.dao.DbFacadeDAOTest.QUOTA_ID , VdcObjectType.Quota ) ) ) ; }

Target:
public void testGetEntityNameByIdAndTypeForQuota ( ) { org.ovirt.engine.core.common.businessentities.Quota quota = dbFacade.getQuotaDao ( ) . getById ( org.ovirt.engine.core.dao.DbFacadeDAOTest.QUOTA_ID ) ; org.junit.Assert.assertNotNull ( quota ) ; java.lang.String name = quota.getQuotaName ( ) ; org.junit.Assert.assertTrue ( name.equals ( dbFacade.getEntityNameByIdAndType ( org.ovirt.engine.core.dao.DbFacadeDAOTest.QUOTA_ID , VdcObjectType.Quota ) ) ) ; }
Source:
public void MoveItemDown ( ) { if ( ( getSelectedItemIndex ( ) ) < ( ( getItems ( ) . size ( ) ) - 1 ) ) { getItems ( ) . Move ( getSelectedItemIndex ( ) , ( ( getSelectedItemIndex ( ) ) + 1 ) ) ; } }

Target:
public void moveItemDown ( ) { if ( ( getSelectedItemIndex ( ) ) < ( ( getItems ( ) . size ( ) ) - 1 ) ) { getItems ( ) . Move ( getSelectedItemIndex ( ) , ( ( getSelectedItemIndex ( ) ) + 1 ) ) ; } }
Source:
public void testRemove ( ) throws java.lang.Exception { setUpGetGraphicsExpectations ( 1 ) ; setUpGetEntityExpectations ( 1 ) ; setUpGetBallooningExpectations ( ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.RemoveVmTemplate , org.ovirt.engine.core.common.action.VmTemplateParametersBase.class , new java.lang.String [ ] { "VmTemplateId" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , true , true ) ) ; javax.ws.rs.core.Response response = resource.remove ( ) ; verifyRemove ( response ) ; }

Target:
public void testGetNotFound ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpGetEntityExpectations ( 1 , true ) ; control.replay ( ) ; try { resource.get ( ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }
Source:
protected javax.ws.rs.core.Response createDisk ( org.ovirt.engine.api.restapi.resource.AbstractBackendCollectionResource resource , org.ovirt.engine.api.model.DiskAttachment attachment , org.ovirt.engine.api.restapi.resource.IResolver entityResolver ) { org.ovirt.engine.api.model.Disk disk = attachment.getDisk ( ) ; validateDiskForCreation ( disk ) ; updateStorageTypeForDisk ( disk ) ; return resource.performCreate ( VdcActionType.AddDisk , getAddParameters ( attachment , org.ovirt.engine.api.restapi.types.DiskMapper.map ( disk , null ) , disk ) , entityResolver ) ; }

Target:
protected javax.ws.rs.core.Response createDisk ( org.ovirt.engine.api.restapi.resource.AbstractBackendCollectionResource resource , org.ovirt.engine.api.model.DiskAttachment attachment , org.ovirt.engine.api.restapi.resource.IResolver entityResolver ) { org.ovirt.engine.api.model.Disk disk = attachment.getDisk ( ) ; validateDiskForCreation ( disk ) ; updateStorageTypeForDisk ( disk ) ; return resource.performCreate ( ActionType.AddDisk , getAddParameters ( attachment , org.ovirt.engine.api.restapi.types.DiskMapper.map ( disk , null ) , disk ) , entityResolver ) ; }
Source:
private static void toStringBuilder ( java.lang.Iterable iterable , java.lang.StringBuilder builder ) { builder.append ( "[" ) ; java.util.Iterator < java.lang.Object > iterator = iterable.iterator ( ) ; while ( iterator.hasNext ( ) ) { org.ovirt.engine.core.vdsbroker.ObjectDescriptor.toStringBuilder ( iterator.next ( ) , builder ) ; if ( iterator.hasNext ( ) ) { builder.append ( ", " ) ; } } builder.append ( "]" ) ; }

Target:
private static void toStringBuilder ( java.lang.Iterable iterable , java.lang.StringBuilder builder ) { builder.append ( "[" ) ; java.util.Iterator < java.lang.Object > iterator = iterable.iterator ( ) ; while ( iterator.hasNext ( ) ) { org.ovirt.engine.core.utils.ObjectDescriptor.toStringBuilder ( iterator.next ( ) , builder ) ; if ( iterator.hasNext ( ) ) { builder.append ( ", " ) ; } } builder.append ( "]" ) ; }
Source:
public void glusterServiceNotRequired ( ) { org.mockito.Mockito.when ( cluster.getCompatibilityVersion ( ) ) . thenReturn ( org.mockito.Mockito.mock ( org.ovirt.engine.core.compat.Version.class ) ) ; org.mockito.Mockito.when ( cluster.supportsGlusterService ( ) ) . thenReturn ( false ) ; validator = new org.ovirt.engine.core.bll.validator.ClusterValidator ( dbFacade , cluster ) ; org.junit.Assert.assertThat ( validator.glusterServiceSupported ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }

Target:
public void glusterServiceSupported ( ) { org.mockito.Mockito.when ( cluster.getCompatibilityVersion ( ) ) . thenReturn ( org.mockito.Mockito.mock ( org.ovirt.engine.core.compat.Version.class ) ) ; org.mockito.Mockito.when ( cluster.supportsGlusterService ( ) ) . thenReturn ( true ) ; validator = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.validator.ClusterValidator ( dbFacade , cluster , cpuFlagsManagerHandler ) ) ; org.mockito.Mockito.doReturn ( true ) . when ( validator ) . glusterFeatureEnabled ( ) ; org.junit.Assert.assertThat ( validator.glusterServiceSupported ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }
Source:
public java.util.List < org.ovirt.engine.core.common.action.VdcReturnValueBase > runMultipleActions ( org.ovirt.engine.core.common.action.VdcActionType actionType , java.util.List < org.ovirt.engine.core.common.action.VdcActionParametersBase > parameters , boolean isRunOnlyIfAllValidationPass , boolean waitForResult ) { org.ovirt.engine.core.common.action.VdcReturnValueBase returnValue = notAllowToRunAction ( actionType ) ; if ( returnValue != null ) { java.util.List < org.ovirt.engine.core.common.action.VdcReturnValueBase > list = new java.util.ArrayList < > ( ) ; list.add ( returnValue ) ; return list ; } else { return runMultipleActionsImpl ( actionType , parameters , false , isRunOnlyIfAllValidationPass , waitForResult , null ) ; } }

Target:
public java.util.List < org.ovirt.engine.core.common.action.VdcReturnValueBase > runMultipleActions ( org.ovirt.engine.core.common.action.ActionType actionType , java.util.List < org.ovirt.engine.core.common.action.VdcActionParametersBase > parameters , boolean isRunOnlyIfAllValidationPass , boolean waitForResult ) { org.ovirt.engine.core.common.action.VdcReturnValueBase returnValue = notAllowToRunAction ( actionType ) ; if ( returnValue != null ) { java.util.List < org.ovirt.engine.core.common.action.VdcReturnValueBase > list = new java.util.ArrayList < > ( ) ; list.add ( returnValue ) ; return list ; } else { return runMultipleActionsImpl ( actionType , parameters , false , isRunOnlyIfAllValidationPass , waitForResult , null ) ; } }
Source:
private java.util.List < org.ovirt.engine.core.bll.quota.StorageQuotaValidationParameter > getStorageQuotaListParameters ( ) { java.util.List < org.ovirt.engine.core.bll.quota.StorageQuotaValidationParameter > list = new java.util.ArrayList < org.ovirt.engine.core.bll.quota.StorageQuotaValidationParameter > ( ) ; list.add ( new org.ovirt.engine.core.bll.quota.StorageQuotaValidationParameter ( getQuotaId ( ) , getStorageDomainId ( ) . getValue ( ) , getRequestDiskSpace ( ) ) ) ; return list ; }

Target:
public java.util.List < org.ovirt.engine.core.bll.quota.QuotaConsumptionParameter > getQuotaStorageConsumptionParameters ( ) { java.util.List < org.ovirt.engine.core.bll.quota.QuotaConsumptionParameter > list = new java.util.ArrayList < org.ovirt.engine.core.bll.quota.QuotaConsumptionParameter > ( ) ; if ( ( org.ovirt.engine.core.bll.AddDiskCommand.getParameters ( ) . getDiskInfo ( ) . getDiskStorageType ( ) ) == ( org.ovirt.engine.core.common.businessentities.Disk.DiskStorageType.IMAGE ) ) { list.add ( new org.ovirt.engine.core.bll.quota.QuotaStorageConsumptionParameter ( getQuotaId ( ) , null , QuotaConsumptionParameter.QuotaAction.CONSUME , getStorageDomainId ( ) . getValue ( ) , getRequestDiskSpace ( ) ) ) ; } return list ; }
Source:
public boolean equals ( java.lang.Object obj ) { if ( ! ( obj instanceof org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeOptionInfo ) ) { return false ; } org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeOptionInfo option = ( ( org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeOptionInfo ) ( obj ) ) ; return ( java.util.Objects.equals ( option.getKey ( ) , key ) ) && ( java.util.Objects.equals ( option.getDefaultValue ( ) , defaultValue ) ) ; }

Target:
public boolean equals ( java.lang.Object obj ) { if ( ( this ) == obj ) { return true ; } if ( ! ( obj instanceof org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeOptionInfo ) ) { return false ; } org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeOptionInfo other = ( ( org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeOptionInfo ) ( obj ) ) ; return ( java.util.Objects.equals ( other.key , key ) ) && ( java.util.Objects.equals ( other.defaultValue , defaultValue ) ) ; }
Source:
protected java.lang.String getHiddenColumnWidthKey ( com.google.gwt.user.cellview.client.Column < T , ? > column ) { if ( columnResizePersistenceEnabled ) { return ( ( ( ( ( ( org.ovirt.engine.ui.common.widget.table.ColumnResizeCellTable.GRID_HIDDEN ) + "_" ) + ( org.ovirt.engine.ui.common.widget.table.ColumnResizeCellTable.GRID_COLUMN_WIDTH_PREFIX ) ) + "_" ) + ( getGridElementId ( ) ) ) + "_" ) + ( getColumnIndex ( column ) ) ; } return null ; }

Target:
protected java.lang.String getHiddenColumnWidthKey ( com.google.gwt.user.cellview.client.Column < T , ? > column ) { if ( columnResizePersistenceEnabled ) { return ( ( ( ( ( ( org.ovirt.engine.ui.common.widget.table.ColumnResizeCellTable.GRID_HIDDEN ) + "_" ) + ( org.ovirt.engine.ui.common.widget.table.ColumnResizeCellTable.GRID_COLUMN_WIDTH_PREFIX ) ) + "_" ) + ( getGridElementId ( ) ) ) + "_" ) + ( determineOriginalIndex ( getColumnIndex ( column ) ) ) ; } return null ; }
Source:
public void eventRaised ( org.ovirt.engine.core.compat.Event ev , java.lang.Object sender , org.ovirt.engine.core.compat.EventArgs args ) { super . eventRaised ( ev , sender , args ) ; if ( ( ev.equals ( ListModel.SelectedItemChangedEventDefinition ) ) && ( sender == ( getNetwork ( ) ) ) ) { Network_SelectedItemChanged ( null ) ; } }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { super . eventRaised ( ev , sender , args ) ; if ( ( ev.matchesDefinition ( ListModel.SelectedItemChangedEventDefinition ) ) && ( sender == ( getNetwork ( ) ) ) ) { Network_SelectedItemChanged ( null ) ; } }
Source:
public void onValueChange ( com.google.gwt.event.logical.shared.ValueChangeEvent < java.lang.Boolean > event ) { getView ( ) . spiceSelected ( event.getValue ( ) ) ; getView ( ) . rdpSelected ( ( ! ( event.getValue ( ) ) ) ) ; }

Target:
public void onValueChange ( com.google.gwt.event.logical.shared.ValueChangeEvent < java.lang.Boolean > event ) { getView ( ) . spiceSelected ( event.getValue ( ) ) ; getView ( ) . setWanOptionsVisible ( ( ( wanOptionsAvailable ) && ( event.getValue ( ) ) ) ) ; getView ( ) . rdpSelected ( ( ! ( event.getValue ( ) ) ) ) ; }
Source:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { java.lang.Boolean entity = getOptimizeForSpeed ( ) . getEntity ( ) ; if ( entity ) { getGuarantyResources ( ) . setEntity ( true ) ; } getAllowOverbooking ( ) . setIsChangable ( ( ! entity ) ) ; }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { java.lang.Boolean entity = getAllowOverbooking ( ) . getEntity ( ) ; if ( entity ) { getOptimizeForUtilization ( ) . setEntity ( true ) ; } getOptimizeForSpeed ( ) . setIsChangable ( ( ! entity ) ) ; }
Source:
protected void render ( java.lang.String value , boolean fireEvents ) { boolean isEmptyReplace = ( org.ovirt.engine.ui.uicompat.external.StringUtils.isEmpty ( value ) ) || ( value.equals ( nullReplacementText ) ) ; asSuggestBox ( ) . setValue ( ( isEmptyReplace ? nullReplacementText : value ) , fireEvents ) ; grayOutPlaceholderText ( isEmptyReplace ) ; }

Target:
protected void render ( java.lang.String value , boolean fireEvents ) { boolean isEmptyReplace = ( org.ovirt.engine.core.compat.StringHelper.isNullOrEmpty ( value ) ) || ( value.equals ( nullReplacementText ) ) ; asSuggestBox ( ) . setValue ( ( isEmptyReplace ? nullReplacementText : value ) , fireEvents ) ; grayOutPlaceholderText ( isEmptyReplace ) ; }
Source:
private boolean isNetworkMtuInSync ( ) { boolean networkValueSetToDefaultMtu = ( network.getMtu ( ) ) == 0 ; boolean ifaceValueSetToDefaultMtu = ( iface.getMtu ( ) ) == ( org.ovirt.engine.core.utils.NetworkUtils.getDefaultMtu ( ) ) ; boolean bothUsesDefaultValue = networkValueSetToDefaultMtu && ifaceValueSetToDefaultMtu ; return bothUsesDefaultValue || ( ( iface.getMtu ( ) ) == ( network.getMtu ( ) ) ) ; }

Target:
private boolean isNetworkMtuInSync ( ) { boolean ifaceValueSetToDefaultMtu = ( iface.getMtu ( ) ) == ( org.ovirt.engine.core.utils.NetworkUtils.getDefaultMtu ( ) ) ; boolean bothUsesDefaultValue = ( network.isDefaultMtu ( ) ) && ifaceValueSetToDefaultMtu ; return bothUsesDefaultValue || ( ( iface.getMtu ( ) ) == ( network.getMtu ( ) ) ) ; }
Source:
private void setUpAddUserExpectations ( java.lang.String query ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpGetEntityExpectations ( query , SearchType.AdUser , getAdUser ( 0 ) ) ; setUpCreationExpectations ( VdcActionType.AddUser , org.ovirt.engine.core.common.action.AddUserParameters.class , new java.lang.String [ ] { "AdUser.UserId" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , true , true , null , VdcQueryType.GetDbUserByUserId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , getEntity ( 0 ) ) ; }

Target:
private void setUpAddUserExpectations ( java.lang.String query ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpGetEntityExpectations ( query , SearchType.AdUser , getAdUser ( 0 ) ) ; setUpCreationExpectations ( VdcActionType.AddUser , org.ovirt.engine.core.common.action.DirectoryIdParameters.class , new java.lang.String [ ] { "Directory" , "Id" } , new java.lang.Object [ ] { DOMAIN , GUIDS [ 0 ] } , true , true , null , VdcQueryType.GetDbUserByUserId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , getEntity ( 0 ) ) ; }
Source:
public static void getRoleList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Role > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Role > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllRoles , new org.ovirt.engine.core.common.queries.MultilevelAdministrationsQueriesParameters ( ) , aQuery ) ; }

Target:
public static void getGlusterHookContent ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hookId , org.ovirt.engine.core.compat.Guid serverId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? source : "" ; } } ; org.ovirt.engine.core.common.queries.gluster.GlusterHookContentQueryParameters parameters = new org.ovirt.engine.core.common.queries.gluster.GlusterHookContentQueryParameters ( hookId ) ; parameters.setGlusterServerId ( serverId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterHookContent , parameters , aQuery ) ; }
Source:
public static void getStorageDomainListByTemplate ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid templateId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageDomainsByVmTemplateId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( templateId ) , aQuery ) ; }

Target:
public void initBalloonSupportMap ( ) { org.ovirt.engine.ui.frontend.AsyncQuery callback = new org.ovirt.engine.ui.frontend.AsyncQuery ( ) ; callback.asyncCallback = new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { balloonSupportMap = ( ( java.util.Map < java.lang.Integer , java.util.Map < org.ovirt.engine.core.compat.Version , java.lang.Boolean > > ) ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ) ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.OsRepository , new org.ovirt.engine.core.common.queries.OsQueryParameters ( org.ovirt.engine.core.common.queries.OsQueryParameters.OsRepositoryVerb.GetBalloonSupportMap ) , callback ) ; }
Source:
protected void onEntityChanged ( ) { super . onEntityChanged ( ) ; if ( ( getEntity ( ) ) != null ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity glusterVolumeEntity = ( ( org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity ) ( getEntity ( ) ) ) ; setItems ( glusterVolumeEntity.getBricks ( ) ) ; } else { setItems ( null ) ; } }

Target:
protected void onEntityChanged ( ) { super . onEntityChanged ( ) ; getSearchCommand ( ) . execute ( ) ; }
Source:
public static void GetVmConfigurationBySnapshot ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid snapshotSourceId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( org.ovirt.engine.core.common.businessentities.VM ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVmConfigurationBySnapshot , new org.ovirt.engine.core.common.queries.GetVmConfigurationBySnapshotQueryParams ( snapshotSourceId ) , aQuery ) ; }

Target:
public static void IsDirectLunDiskEnabled ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String version ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Boolean ) ( source ) ) . booleanValue ( ) : true ; } } ; org.ovirt.engine.core.common.queries.GetConfigurationValueParameters params = new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.DirectLUNDiskEnabled ) ; params.setVersion ( version ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( params , aQuery ) ; }
Source:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; dao = prepareDAO ( dbFacade.getVmPoolDAO ( ) ) ; existingVmPool = dao.get ( org.ovirt.engine.core.dao.VmPoolDAOTest.EXISTING_VM_POOL_ID ) ; deletableVmPool = dao.get ( org.ovirt.engine.core.dao.VmPoolDAOTest.DELETABLE_VM_POOL_ID ) ; newVmPool = new org.ovirt.engine.core.common.businessentities.vm_pools ( ) ; newVmPool.setvm_pool_name ( "New VM Pool" ) ; newVmPool.setvm_pool_description ( "This is a new VM pool." ) ; newVmPool.setvds_group_id ( org.ovirt.engine.core.dao.VmPoolDAOTest.VDS_GROUP_ID ) ; existingVmPoolMap = dao.getVmPoolMapByVmGuid ( new org.ovirt.engine.core.compat.Guid ( "77296e00-0cad-4e5a-9299-008a7b6f4355" ) ) ; newVmPoolMap = new org.ovirt.engine.core.common.businessentities.vm_pool_map ( org.ovirt.engine.core.dao.VmPoolDAOTest.FREE_VM_ID , existingVmPool.getvm_pool_id ( ) ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; dao = prepareDAO ( dbFacade.getVmPoolDao ( ) ) ; existingVmPool = dao.get ( org.ovirt.engine.core.dao.VmPoolDAOTest.EXISTING_VM_POOL_ID ) ; deletableVmPool = dao.get ( org.ovirt.engine.core.dao.VmPoolDAOTest.DELETABLE_VM_POOL_ID ) ; newVmPool = new org.ovirt.engine.core.common.businessentities.vm_pools ( ) ; newVmPool.setvm_pool_name ( "New VM Pool" ) ; newVmPool.setvm_pool_description ( "This is a new VM pool." ) ; newVmPool.setvds_group_id ( org.ovirt.engine.core.dao.VmPoolDAOTest.VDS_GROUP_ID ) ; existingVmPoolMap = dao.getVmPoolMapByVmGuid ( new org.ovirt.engine.core.compat.Guid ( "77296e00-0cad-4e5a-9299-008a7b6f4355" ) ) ; newVmPoolMap = new org.ovirt.engine.core.common.businessentities.vm_pool_map ( org.ovirt.engine.core.dao.VmPoolDAOTest.FREE_VM_ID , existingVmPool.getvm_pool_id ( ) ) ; }
Source:
public void testDiskLinks ( ) throws java.lang.Exception { org.ovirt.engine.api.model.Disk disk = new org.ovirt.engine.api.model.Disk ( ) ; disk.setId ( org.ovirt.engine.api.common.util.LinkHelperTest.DISK_ID ) ; disk.setVm ( new org.ovirt.engine.api.model.VM ( ) ) ; disk.getVm ( ) . setId ( org.ovirt.engine.api.common.util.LinkHelperTest.VM_ID ) ; org.ovirt.engine.api.utils.LinkHelper.addLinks ( setUpUriExpectations ( ) , disk ) ; assertEquals ( org.ovirt.engine.api.common.util.LinkHelperTest.DISK_HREF , disk.getHref ( ) ) ; }

Target:
public void testDiskLinks ( ) throws java.lang.Exception { org.ovirt.engine.api.model.Disk disk = new org.ovirt.engine.api.model.Disk ( ) ; disk.setId ( org.ovirt.engine.api.common.util.LinkHelperTest.DISK_ID ) ; disk.setVm ( new org.ovirt.engine.api.model.Vm ( ) ) ; disk.getVm ( ) . setId ( org.ovirt.engine.api.common.util.LinkHelperTest.VM_ID ) ; org.ovirt.engine.api.utils.LinkHelper.addLinks ( setUpUriExpectations ( ) , disk ) ; assertEquals ( org.ovirt.engine.api.common.util.LinkHelperTest.DISK_HREF , disk.getHref ( ) ) ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { final org.ovirt.engine.core.common.businessentities.network.Network defaultManagementNetwork = ( ( org.ovirt.engine.core.common.businessentities.network.Network ) ( returnValue ) ) ; defaultManagementNetworkCache.put ( dataCenterId , defaultManagementNetwork ) ; setSelectedDefaultManagementNetwork ( clusterModel , defaultManagementNetwork ) ; }

Target:
public void onSuccess ( java.lang.Boolean isEmpty ) { if ( isEmpty ) { populateCPUList ( cpus , true ) ; } else { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ServerCpu > filteredCpus = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.ServerCpu cpu : cpus ) { if ( ( cpu.getArchitecture ( ) ) == ( getEntity ( ) . getArchitecture ( ) ) ) { filteredCpus.add ( cpu ) ; } } populateCPUList ( filteredCpus , false ) ; } }