auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity getReplicatedVolume ( org.ovirt.engine.core.compat.Guid volumeId , int brickCount ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity volume = getVolume ( volumeId ) ; volume.setStatus ( GlusterVolumeStatus.UP ) ; volume.setBricks ( getBricks ( volumeId , brickCount ) ) ; volume.setVolumeType ( GlusterVolumeType.REPLICATE ) ; volume.setReplicaCount ( brickCount ) ; return volume ; }

Target:
private org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity getReplicatedVolume ( org.ovirt.engine.core.compat.Guid volumeId , int brickCount ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity volume = getVolume ( volumeId ) ; volume.setStatus ( GlusterVolumeStatus.UP ) ; volume.setBricks ( getBricks ( volumeId , brickCount ) ) ; volume.setVolumeType ( GlusterVolumeType.REPLICATE ) ; volume.setReplicaCount ( brickCount ) ; volume.setClusterId ( CLUSTER_ID ) ; return volume ; }
Source:
public java.util.List < org.ovirt.engine.core.common.businessentities.RepoFileMetaData > getUserRequestForStorageDomainRepoFileList ( org.ovirt.engine.core.compat.Guid storageDomainId , org.ovirt.engine.core.common.businessentities.ImageType imageType , boolean forceRefresh ) { java.util.List < org.ovirt.engine.core.common.businessentities.RepoFileMetaData > repoList = null ; if ( ! ( isStorageDomainValid ( storageDomainId , imageType , forceRefresh ) ) ) { return null ; } repoList = getCachedIsoListByDomainId ( storageDomainId , imageType ) ; return repoList ; }

Target:
public java.util.List < org.ovirt.engine.core.common.businessentities.RepoFileMetaData > getUserRequestForStorageDomainRepoFileList ( org.ovirt.engine.core.compat.Guid storageDomainId , org.ovirt.engine.core.common.businessentities.ImageFileType imageType , boolean forceRefresh ) { java.util.List < org.ovirt.engine.core.common.businessentities.RepoFileMetaData > repoList = null ; if ( ! ( isStorageDomainValid ( storageDomainId , imageType , forceRefresh ) ) ) { return null ; } repoList = getCachedIsoListByDomainId ( storageDomainId , imageType ) ; return repoList ; }
Source:
public org.ovirt.engine.core.bll.ValidationResult isCinderSupportedInDC ( ) { if ( ( ! ( getStoragePool ( ) . isLocal ( ) ) ) && ( ! ( org.ovirt.engine.core.common.FeatureSupported.cinderProviderSupported ( getStoragePool ( ) . getCompatibilityVersion ( ) ) ) ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.DATA_CENTER_CINDER_STORAGE_NOT_SUPPORTED_IN_CURRENT_VERSION ) ; } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult isCinderSupportedInDC ( ) { if ( ( ! ( getStoragePool ( ) . isLocal ( ) ) ) && ( ! ( org.ovirt.engine.core.common.FeatureSupported.cinderProviderSupported ( getStoragePool ( ) . getCompatibilityVersion ( ) ) ) ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.DATA_CENTER_CINDER_STORAGE_NOT_SUPPORTED_IN_CURRENT_VERSION ) ; } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }
Source:
public static void countAllTemplates ( 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 ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmTemplateCount , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }

Target:
public void getDataCenterById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStoragePoolById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) . withoutRefresh ( ) , aQuery ) ; }
Source:
private void handleFinalizingSuccess ( final org.ovirt.engine.core.bll.storage.disk.image.UploadImageCommand < T > . StateContext context ) { log.info ( "Finalizing successful upload to {}" , getUploadDescription ( ) ) ; stopImageTransferSession ( context.entity ) ; org.ovirt.engine.core.compat.Guid transferingVdsId = context.entity.getVdsId ( ) ; if ( verifyImage ( transferingVdsId ) ) { setVolumeLegalityInStorage ( transferingVdsId , true ) ; org.ovirt.engine.core.bll.storage.disk.image.UploadImageCommand.unLockImage ( ) ; updateEntityPhase ( ImageTransferPhase.FINISHED_SUCCESS ) ; } else { setImageStatus ( ImageStatus.ILLEGAL ) ; updateEntityPhase ( ImageTransferPhase.FINALIZING_FAILURE ) ; } }

Target:
private void handleFinalizingSuccess ( final org.ovirt.engine.core.bll.storage.disk.image.UploadImageCommand < T > . StateContext context ) { log.info ( "Finalizing successful upload to {}" , getUploadDescription ( ) ) ; if ( stopImageTransferSession ( context.entity ) ) { org.ovirt.engine.core.compat.Guid transferingVdsId = context.entity.getVdsId ( ) ; if ( verifyImage ( transferingVdsId ) ) { setVolumeLegalityInStorage ( org.ovirt.engine.core.bll.storage.disk.image.UploadImageCommand.LEGAL_IMAGE ) ; org.ovirt.engine.core.bll.storage.disk.image.UploadImageCommand.unLockImage ( ) ; updateEntityPhase ( ImageTransferPhase.FINISHED_SUCCESS ) ; } else { setImageStatus ( ImageStatus.ILLEGAL ) ; updateEntityPhase ( ImageTransferPhase.FINALIZING_FAILURE ) ; } } }
Source:
public static void GetAllAttachableDisks ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId ) { 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.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllAttachableDisks , new org.ovirt.engine.core.common.queries.GetAllAttachableDisks ( storagePoolId ) , aQuery ) ; }

Target:
public static void GetDiskList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > ( ) ; } } ; org.ovirt.engine.core.common.queries.SearchParameters searchParams = new org.ovirt.engine.core.common.queries.SearchParameters ( "Disks:" , org.ovirt.engine.core.common.interfaces.SearchType.Disk ) ; searchParams.setMaxCount ( 9999 ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.Search , searchParams , aQuery ) ; }
Source:
public static org.ovirt.engine.core.common.businessentities.storage.DiskImage createSnapshotMemoryDisk ( org.ovirt.engine.core.common.businessentities.VM vm , org.ovirt.engine.core.common.businessentities.storage.StorageType storageType , org.ovirt.engine.core.bll.utils.VmOverheadCalculator vmOverheadCalculator ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage image = org.ovirt.engine.core.bll.memory.MemoryUtils.createMemoryDisk ( vm , storageType , vmOverheadCalculator ) ; image.setDiskAlias ( org.ovirt.engine.core.bll.memory.MemoryUtils.VM_SNAPSHOT_MEMORY_DISK_ALIAS ) ; image.setDescription ( org.ovirt.engine.core.bll.memory.MemoryUtils.VM_SNAPSHOT_MEMORY_DISK_DESCRIPTION ) ; return image ; }

Target:
public static org.ovirt.engine.core.common.businessentities.storage.DiskImage createSnapshotMemoryDisk ( org.ovirt.engine.core.common.businessentities.VM vm , org.ovirt.engine.core.common.businessentities.storage.StorageType storageType , org.ovirt.engine.core.common.scheduling.VmOverheadCalculator vmOverheadCalculator , java.lang.String diskDescription ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage image = org.ovirt.engine.core.bll.memory.MemoryUtils.createMemoryDisk ( vm , storageType , vmOverheadCalculator , diskDescription ) ; image.setDiskAlias ( org.ovirt.engine.core.bll.memory.MemoryUtils.VM_SNAPSHOT_MEMORY_DISK_ALIAS ) ; return image ; }
Source:
private void setCookie ( final javax.servlet.http.HttpServletResponse response , final javax.servlet.ServletContext servletContext , final java.util.Locale userLocale ) { javax.servlet.http.Cookie cookie = new javax.servlet.http.Cookie ( org.ovirt.engine.core.utils.servlet.LocaleFilter.LOCALE , userLocale.toString ( ) ) ; cookie.setSecure ( true ) ; cookie.setPath ( org.ovirt.engine.core.utils.servlet.LocaleFilter.ROOT_PATH ) ; cookie.setMaxAge ( java.lang.Integer.MAX_VALUE ) ; cookie.setHttpOnly ( true ) ; response.addCookie ( cookie ) ; }

Target:
private void setCookie ( final javax.servlet.http.HttpServletRequest request , final javax.servlet.http.HttpServletResponse response , final java.util.Locale userLocale ) { javax.servlet.http.Cookie cookie = new javax.servlet.http.Cookie ( org.ovirt.engine.core.utils.servlet.LocaleFilter.LOCALE , userLocale.toString ( ) ) ; cookie.setSecure ( "https" . equalsIgnoreCase ( request.getScheme ( ) ) ) ; cookie.setPath ( org.ovirt.engine.core.utils.servlet.LocaleFilter.ROOT_PATH ) ; cookie.setMaxAge ( java.lang.Integer.MAX_VALUE ) ; cookie.setHttpOnly ( true ) ; response.addCookie ( cookie ) ; }
Source:
public void getStorageConnectionById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String id , boolean isRefresh ) { 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.StorageServerConnections ) ( source ) ) : null ; } } ; org.ovirt.engine.core.common.queries.StorageServerConnectionQueryParametersBase params = new org.ovirt.engine.core.common.queries.StorageServerConnectionQueryParametersBase ( id ) ; params.setRefresh ( isRefresh ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageServerConnectionById , params , aQuery ) ; }

Target:
public void getStorageConnectionById ( org.ovirt.engine.ui.frontend.AsyncQuery < org.ovirt.engine.core.common.businessentities.StorageServerConnections > aQuery , java.lang.String id , boolean isRefresh ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.Converter < org.ovirt.engine.core.common.businessentities.StorageServerConnections > ( ) { @ java.lang.Override public org.ovirt.engine.core.common.businessentities.StorageServerConnections convert ( java.lang.Object source ) { return source != null ? ( ( org.ovirt.engine.core.common.businessentities.StorageServerConnections ) ( source ) ) : null ; } } ; org.ovirt.engine.core.common.queries.StorageServerConnectionQueryParametersBase params = new org.ovirt.engine.core.common.queries.StorageServerConnectionQueryParametersBase ( id ) ; params.setRefresh ( isRefresh ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageServerConnectionById , params , aQuery ) ; }
Source:
public javax.ws.rs.core.Response add ( org.ovirt.engine.api.model.Permit permit ) { validateParameters ( permit , "name|id" ) ; java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ActionGroup > actionGroups = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ActionGroup > ( ) ; actionGroups.add ( map ( permit ) ) ; return performCreation ( VdcActionType.AttachActionGroupsToRole , new org.ovirt.engine.core.common.action.ActionGroupsToRoleParameter ( roleId , actionGroups ) , new org.ovirt.engine.api.restapi.resource.BackendPermitsResource.PermitIdResolver ( actionGroups.get ( 0 ) ) ) ; }

Target:
public javax.ws.rs.core.Response add ( org.ovirt.engine.api.model.Permit permit ) { validateParameters ( permit , "name|id" ) ; validateEnums ( org.ovirt.engine.api.model.Permit.class , permit ) ; java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ActionGroup > actionGroups = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ActionGroup > ( ) ; actionGroups.add ( map ( permit ) ) ; return performCreation ( VdcActionType.AttachActionGroupsToRole , new org.ovirt.engine.core.common.action.ActionGroupsToRoleParameter ( roleId , actionGroups ) , new org.ovirt.engine.api.restapi.resource.BackendPermitsResource.PermitIdResolver ( actionGroups.get ( 0 ) ) ) ; }
Source:
private org.ovirt.engine.core.common.vdscommands.HostSetupNetworksVdsCommandParameters createSetupNetworksParameters ( int timeout ) { final org.ovirt.engine.core.common.vdscommands.HostSetupNetworksVdsCommandParameters hostCmdParams = new org.ovirt.engine.core.common.vdscommands.HostSetupNetworksVdsCommandParameters ( org.ovirt.engine.core.bll.network.host.HostSetupNetworksCommand.getVds ( ) , getNetworks ( ) , getRemovedNetworks ( ) , org.ovirt.engine.core.bll.network.host.HostSetupNetworksCommand.getParameters ( ) . getBonds ( ) , getRemovedBonds ( ) ) ; hostCmdParams.setRollbackOnFailure ( org.ovirt.engine.core.bll.network.host.HostSetupNetworksCommand.getParameters ( ) . rollbackOnFailure ( ) ) ; hostCmdParams.setConectivityTimeout ( timeout ) ; boolean hostNetworkQosSupported = org.ovirt.engine.core.common.FeatureSupported.hostNetworkQos ( org.ovirt.engine.core.bll.network.host.HostSetupNetworksCommand.getVds ( ) . getVdsGroupCompatibilityVersion ( ) ) ; hostCmdParams.setHostNetworkQosSupported ( hostNetworkQosSupported ) ; return hostCmdParams ; }

Target:
private org.ovirt.engine.core.common.vdscommands.HostSetupNetworksVdsCommandParameters createSetupNetworksParameters ( int timeout ) { final org.ovirt.engine.core.common.vdscommands.HostSetupNetworksVdsCommandParameters hostCmdParams = new org.ovirt.engine.core.common.vdscommands.HostSetupNetworksVdsCommandParameters ( org.ovirt.engine.core.bll.network.host.HostSetupNetworksCommand.getVds ( ) , getNetworksToConfigure ( ) , getRemovedNetworks ( ) , org.ovirt.engine.core.bll.network.host.HostSetupNetworksCommand.getParameters ( ) . getBonds ( ) , getRemovedBondNames ( ) ) ; hostCmdParams.setRollbackOnFailure ( org.ovirt.engine.core.bll.network.host.HostSetupNetworksCommand.getParameters ( ) . rollbackOnFailure ( ) ) ; hostCmdParams.setConectivityTimeout ( timeout ) ; boolean hostNetworkQosSupported = org.ovirt.engine.core.common.FeatureSupported.hostNetworkQos ( org.ovirt.engine.core.bll.network.host.HostSetupNetworksCommand.getVds ( ) . getVdsGroupCompatibilityVersion ( ) ) ; hostCmdParams.setHostNetworkQosSupported ( hostNetworkQosSupported ) ; return hostCmdParams ; }
Source:
public static void GetRpmVersionViaPublic ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.String ) ( source ) ) : "" ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunPublicQuery ( VdcQueryType.GetConfigurationValue , new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.ProductRPMVersion , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public static void getHostFingerprint ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String hostAddress ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.String ) ( source ) ) : "" ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetServerSSHKeyFingerprint , new org.ovirt.engine.core.common.queries.ServerParameters ( hostAddress ) , aQuery ) ; }
Source:
protected void UpdateActionAvailability ( ) { super . UpdateActionAvailability ( ) ; getConnectCommand ( ) . setIsExecutionAllowed ( ( ( ( ( ( getConfigurator ( ) . IsDisplayTypeSupported ( DisplayType.qxl ) ) && ( ! ( getIsConnected ( ) ) ) ) && ( ( getEntity ( ) ) != null ) ) && ( ( getEntity ( ) . getDisplayType ( ) ) != ( org.ovirt.engine.core.common.businessentities.DisplayType.vnc ) ) ) && ( IsVmConnectReady ( ) ) ) ) ; }

Target:
protected void UpdateActionAvailability ( ) { super . UpdateActionAvailability ( ) ; getConnectCommand ( ) . setIsExecutionAllowed ( ( ( ( ( ( isSpiceSupportedByClient ( ) ) && ( ! ( getIsConnected ( ) ) ) ) && ( ( getEntity ( ) ) != null ) ) && ( ( getEntity ( ) . getDisplayType ( ) ) != ( org.ovirt.engine.core.common.businessentities.DisplayType.vnc ) ) ) && ( IsVmConnectReady ( ) ) ) ) ; }
Source:
public void testGetStorageDomainsWithAndWithoutStatusAreEqual ( ) { org.ovirt.engine.core.common.businessentities.StorageDomain resultWithoutStatus = dao.getStorageDomain ( FixturesTool.STORAGE_POOL_NFS_INACTIVE_ISO , StorageDomainType.ISO ) ; org.ovirt.engine.core.common.businessentities.StorageDomain resultWithStatus = dao.getStorageDomain ( FixturesTool.STORAGE_POOL_NFS_INACTIVE_ISO , StorageDomainType.ISO , null ) ; org.junit.Assert.assertNotNull ( resultWithoutStatus ) ; org.junit.Assert.assertNotNull ( resultWithStatus ) ; org.junit.Assert.assertEquals ( resultWithoutStatus , resultWithStatus ) ; }

Target:
public void testGetStorageDomainsWithAndWithoutStatusAreEqual ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > resultWithoutStatus = dao.getStorageDomains ( FixturesTool.STORAGE_POOL_NFS_INACTIVE_ISO , StorageDomainType.ISO ) ; java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > resultWithStatus = dao.getStorageDomains ( FixturesTool.STORAGE_POOL_NFS_INACTIVE_ISO , StorageDomainType.ISO , null ) ; org.junit.Assert.assertFalse ( resultWithoutStatus.isEmpty ( ) ) ; org.junit.Assert.assertFalse ( resultWithStatus.isEmpty ( ) ) ; org.junit.Assert.assertEquals ( resultWithoutStatus , resultWithStatus ) ; }
Source:
private void setUpGetVmOvfExpectations ( int ... idxs ) throws java.lang.Exception { for ( int i = 0 ; i < ( idxs.length ) ; i ++ ) { setUpGetEntityExpectations ( VdcQueryType.GetVmOvfByVmId , org.ovirt.engine.core.common.queries.GetVmOvfByVmIdParameters.class , new java.lang.String [ ] { "Id" , "RequiredGeneration" } , new java.lang.Object [ ] { GUIDS [ idxs [ i ] ] , 0L } , "configuration" ) ; } }

Target:
private void setUpGetVmOvfExpectations ( int ... idxs ) throws java.lang.Exception { for ( int i = 0 ; i < ( idxs.length ) ; i ++ ) { setUpGetEntityExpectations ( QueryType.GetVmOvfByVmId , org.ovirt.engine.core.common.queries.GetVmOvfByVmIdParameters.class , new java.lang.String [ ] { "Id" , "RequiredGeneration" } , new java.lang.Object [ ] { GUIDS [ idxs [ i ] ] , 0L } , "configuration" ) ; } }
Source:
protected org.ovirt.engine.api.model.QoS doPopulate ( org.ovirt.engine.api.model.QoS model , org.ovirt.engine.core.common.businessentities.qos.QosBase entity ) { return model ; }

Target:
private org.ovirt.engine.core.common.action.VdcActionType updateActionTypeForQosType ( org.ovirt.engine.core.common.businessentities.qos.QosType qosType ) { switch ( qosType ) { case STORAGE : return org.ovirt.engine.core.common.action.VdcActionType.UpdateStorageQos ; case CPU : return org.ovirt.engine.core.common.action.VdcActionType.UpdateCpuQos ; case NETWORK : return org.ovirt.engine.core.common.action.VdcActionType.UpdateNetworkQoS ; default : throw new java.lang.IllegalArgumentException ( ( ( "Unsupported QoS type \"" + qosType ) + "\"" ) ) ; } }
Source:
public void testRemove ( ) throws java.lang.Exception { setUpGetEntityExpectations ( ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.RemoveQuota , org.ovirt.engine.core.common.action.IdParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendQuotaResourceTest.QUOTA_ID } , true , true ) ) ; verifyRemove ( resource.remove ( ) ) ; }

Target:
public void testRemove ( ) throws java.lang.Exception { setUpGetEntityExpectations ( ) ; setUriInfo ( setUpActionExpectations ( ActionType.RemoveQuota , org.ovirt.engine.core.common.action.IdParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendQuotaResourceTest.QUOTA_ID } , true , true ) ) ; verifyRemove ( resource.remove ( ) ) ; }
Source:
public static void getGlusterVolumeOptionInfoList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetGlusterVolumeOptionsInfo , new org.ovirt.engine.core.common.queries.gluster.GlusterParameters ( clusterId ) , aQuery ) ; }

Target:
public static void getGlusterHooks ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? source : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterHooks , new org.ovirt.engine.core.common.queries.gluster.GlusterParameters ( clusterId ) , aQuery ) ; }
Source:
public java.util.concurrent.Future < org.ovirt.vdsm.jsonrpc.client.JsonRpcResponse > call ( org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest req ) throws org.ovirt.vdsm.jsonrpc.client.ClientConnectionException { final org.ovirt.vdsm.jsonrpc.client.internal.Call call = new org.ovirt.vdsm.jsonrpc.client.internal.Call ( req ) ; if ( ( this . runningCalls.putIfAbsent ( req.getId ( ) , call ) ) != null ) { throw new org.ovirt.vdsm.jsonrpc.client.RequestAlreadySentException ( ) ; } this . getClient ( ) . sendMessage ( org.ovirt.vdsm.jsonrpc.client.utils.JsonUtils.jsonToByteArray ( req.toJson ( ) , objectMapper ) ) ; retryCall ( req , call ) ; return call ; }

Target:
private void retryCall ( final org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request , final org.ovirt.vdsm.jsonrpc.client.internal.JsonRpcCall call ) throws org.ovirt.vdsm.jsonrpc.client.ClientConnectionException { org.ovirt.vdsm.jsonrpc.client.utils.ResponseTracking tracking = new org.ovirt.vdsm.jsonrpc.client.utils.ResponseTracking ( request , call , new org.ovirt.vdsm.jsonrpc.client.utils.retry.RetryContext ( policy ) , org.ovirt.vdsm.jsonrpc.client.utils.JsonUtils.getTimeout ( this . policy.getRetryTimeOut ( ) , this . policy.getTimeUnit ( ) ) , client ) ; this . tracker.registerTrackingRequest ( request , tracking ) ; }
Source:
public static void getGlusterVolumeOptionInfoList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetGlusterVolumeOptionsInfo , new org.ovirt.engine.core.common.queries.gluster.GlusterParameters ( clusterId ) , aQuery ) ; }

Target:
public static void getGlusterHook ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hookId , boolean includeServerHooks ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterHookById , new org.ovirt.engine.core.common.queries.gluster.GlusterHookQueryParameters ( hookId , includeServerHooks ) , aQuery ) ; }
Source:
public void onFailed ( org.ovirt.engine.core.compat.Guid cmdId , java.util.List < org.ovirt.engine.core.compat.Guid > childCmdIds ) { super . onFailed ( cmdId , childCmdIds ) ; log.error ( "Failed adding disk to Cinder. ID: {}" , getDiskId ( ) ) ; getCommand ( ) . endAction ( ) ; org.ovirt.engine.core.bll.tasks.CommandCoordinatorUtil.removeAllCommandsInHierarchy ( cmdId ) ; }

Target:
public void onFailed ( org.ovirt.engine.core.compat.Guid cmdId , java.util.List < org.ovirt.engine.core.compat.Guid > childCmdIds ) { super . onFailed ( cmdId , childCmdIds ) ; log.error ( "Failed adding disk to Cinder. ID: {}" , getDiskId ( ) ) ; getCommand ( ) . getParameters ( ) . setTaskGroupSuccess ( false ) ; getCommand ( ) . endAction ( ) ; org.ovirt.engine.core.bll.tasks.CommandCoordinatorUtil.removeAllCommandsInHierarchy ( cmdId ) ; }
Source:
protected void executeCommand ( ) { getQuotaDAO ( ) . remove ( getParameters ( ) . getQuotaId ( ) ) ; getQuotaManager ( ) . removeQuotaFromCache ( getQuota ( ) . getStoragePoolId ( ) , getParameters ( ) . getQuotaId ( ) ) ; getReturnValue ( ) . setSucceeded ( true ) ; }

Target:
protected void executeCommand ( ) { getQuotaDao ( ) . remove ( getParameters ( ) . getQuotaId ( ) ) ; getQuotaManager ( ) . removeQuotaFromCache ( getQuota ( ) . getStoragePoolId ( ) , getParameters ( ) . getQuotaId ( ) ) ; getReturnValue ( ) . setSucceeded ( true ) ; }
Source:
public void testValidateModifiedBondSlavesWhenSlaveInterfaceDoesNotExist ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.Bond bond = createBond ( ) ; bond.setSlaves ( java.util.Arrays.asList ( "slaveA" , "slaveB" ) ) ; doTestValidateModifiedBondSlaves ( new org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidatorTest.ParametersBuilder ( ) . addBonds ( bond ) . build ( ) , null , java.util.Collections.< org.ovirt.engine.core.common.businessentities.network.NetworkAttachment > emptyList ( ) , java.util.Collections.< org.ovirt.engine.core.common.businessentities.network.Network > emptyList ( ) , new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.HOST_NETWORK_INTERFACE_NOT_EXIST ) , ValidationResult.VALID , new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.HOST_NETWORK_INTERFACE_NOT_EXIST ) ) ; }

Target:
public void testValidateModifiedBondSlavesWhenSlaveInterfaceDoesNotExist ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.Bond bond = createBond ( ) ; bond.setSlaves ( java.util.Arrays.asList ( "slaveA" , "slaveB" ) ) ; org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidator validator = new org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidatorTest.HostSetupNetworksValidatorBuilder ( ) . setParams ( new org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidatorTest.ParametersBuilder ( ) . addBonds ( bond ) ) . build ( ) ; _doTestValidateModifiedBondSlaves ( org.mockito.Mockito.spy ( validator ) , new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.HOST_NETWORK_INTERFACE_NOT_EXIST ) , ValidationResult.VALID , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.HOST_NETWORK_INTERFACE_NOT_EXIST ) ) ; }
Source:
public void canDoActionFailsOnNullCluster ( ) { cmd = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.gluster.DisableGlusterHookCommand ( new org.ovirt.engine.core.common.action.gluster.GlusterHookParameters ( null , HOOK_ID ) ) ) ; setupMocks ( cmd ) ; org.junit.Assert.assertFalse ( cmd.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( cmd.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( VdcBllMessages.ACTION_TYPE_FAILED_CLUSTER_IS_NOT_VALID.toString ( ) ) ) ; }

Target:
public void canDoActionFailsOnNullCluster ( ) { cmd = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.gluster.DisableGlusterHookCommand ( new org.ovirt.engine.core.common.action.gluster.GlusterHookStatusChangeParameters ( null , HOOK_ID ) ) ) ; setupMocks ( cmd ) ; org.junit.Assert.assertFalse ( cmd.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( cmd.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( VdcBllMessages.ACTION_TYPE_FAILED_CLUSTER_IS_NOT_VALID.toString ( ) ) ) ; }
Source:
protected void executeQueryCommand ( ) { org.ovirt.engine.core.bll.GetAllRelevantQuotasForVdsGroupQuery.getQueryReturnValue ( ) . setReturnValue ( org.ovirt.engine.core.bll.GetAllRelevantQuotasForVdsGroupQuery.getDbFacade ( ) . getQuotaDAO ( ) . getAllRelevantQuotasForVdsGroup ( org.ovirt.engine.core.bll.GetAllRelevantQuotasForVdsGroupQuery.getParameters ( ) . getVdsGroupId ( ) ) ) ; }

Target:
protected void executeQueryCommand ( ) { org.ovirt.engine.core.bll.GetAllRelevantQuotasForVdsGroupQuery.getQueryReturnValue ( ) . setReturnValue ( org.ovirt.engine.core.bll.GetAllRelevantQuotasForVdsGroupQuery.getDbFacade ( ) . getQuotaDAO ( ) . getAllRelevantQuotasForVdsGroup ( org.ovirt.engine.core.bll.GetAllRelevantQuotasForVdsGroupQuery.getParameters ( ) . getVdsGroupId ( ) , org.ovirt.engine.core.bll.GetAllRelevantQuotasForVdsGroupQuery.getUserID ( ) , org.ovirt.engine.core.bll.GetAllRelevantQuotasForVdsGroupQuery.getParameters ( ) . isFiltered ( ) ) ) ; }
Source:
public void testLogReturnLogsWhenLogLevelActiveAndExpandReturnButNullReturn ( ) throws java.lang.Exception { java.lang.String id = "" ; org.slf4j.Logger log = org.mockito.Mockito.mock ( org.slf4j.Logger.class ) ; org.mockito.Mockito.when ( log.isDebugEnabled ( ) ) . thenReturn ( true ) ; org.ovirt.engine.core.utils.log.LoggedUtils.logReturn ( log , id , new org.ovirt.engine.core.utils.log.LoggedUtilsTest.LoggedOverridingSubclass ( ) , null ) ; org.mockito.Mockito.verify ( log ) . debug ( org.mockito.Matchers.eq ( LoggedUtils.EXIT_LOG_VOID ) , new java.lang.Object [ ] { org.mockito.Matchers.anyObject ( ) , org.mockito.Matchers.eq ( "" ) } ) ; }

Target:
public void testLogReturnLogsWhenLogLevelActiveAndExpandReturnButNullReturn ( ) throws java.lang.Exception { java.lang.String id = "" ; org.slf4j.Logger log = org.mockito.Mockito.mock ( org.slf4j.Logger.class ) ; org.mockito.Mockito.when ( log.isDebugEnabled ( ) ) . thenReturn ( true ) ; org.ovirt.engine.core.utils.log.LoggedUtils.logReturn ( log , id , new org.ovirt.engine.core.utils.log.LoggedUtilsTest.LoggedOverridingSubclass ( ) , null ) ; org.mockito.Mockito.verify ( log ) . debug ( org.mockito.ArgumentMatchers.eq ( LoggedUtils.EXIT_LOG_VOID ) , new java.lang.Object [ ] { org.mockito.ArgumentMatchers.anyObject ( ) , org.mockito.ArgumentMatchers.eq ( "" ) } ) ; }
Source:
private void saveLocalStorage ( ) { if ( ( getWindow ( ) . getProgress ( ) ) != null ) { return ; } getWindow ( ) . startProgress ( null ) ; org.ovirt.engine.ui.uicompat.Task.Create ( this , new java.util.ArrayList < java.lang.Object > ( java.util.Arrays.asList ( new java.lang.Object [ ] { "SaveLocal" } ) ) ) . Run ( ) ; }

Target:
private void saveLocalStorage ( ) { if ( ( getWindow ( ) . getProgress ( ) ) != null ) { return ; } getWindow ( ) . startProgress ( null ) ; org.ovirt.engine.ui.uicompat.Task.create ( this , new java.util.ArrayList < java.lang.Object > ( java.util.Arrays.asList ( new java.lang.Object [ ] { "SaveLocal" } ) ) ) . Run ( ) ; }
Source:
public void testUpdateNotFound ( ) { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpEntityQueryExpectations ( QueryType.GetAllNetworks , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.core.compat.Guid.Empty } , new java.util.ArrayList < org.ovirt.engine.api.model.Network > ( ) ) ; try { resource.update ( org.ovirt.engine.api.restapi.resource.AbstractBackendNetworksResourceTest.getModel ( 0 ) ) ; org.junit.Assert.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }

Target:
public void testUpdateNotFound ( ) { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpEntityQueryExpectations ( QueryType.GetAllNetworks , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.core.compat.Guid.Empty } , new java.util.ArrayList < org.ovirt.engine.api.model.Network > ( ) ) ; try { resource.update ( org.ovirt.engine.api.restapi.resource.AbstractBackendNetworksResourceTest.getModel ( 0 ) ) ; org.junit.jupiter.api.Assertions.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }
Source:
public static void GetVmSnapshotList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Snapshot > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Snapshot > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllVmSnapshotsByVmId , new org.ovirt.engine.core.common.queries.GetAllVmSnapshotsByVmIdParameters ( id ) , aQuery ) ; }

Target:
public static void GetDiskList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > ( ) ; } } ; org.ovirt.engine.core.common.queries.SearchParameters searchParams = new org.ovirt.engine.core.common.queries.SearchParameters ( "Disks:" , org.ovirt.engine.core.common.interfaces.SearchType.Disk ) ; searchParams.setMaxCount ( 9999 ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.Search , searchParams , aQuery ) ; }
Source:
public java.lang.Boolean runInTransaction ( ) { org.ovirt.engine.core.bll.Backend.getInstance ( ) . getResourceManager ( ) . RunVdsCommand ( VDSCommandType.CollectVdsNetworkData , new org.ovirt.engine.core.common.vdscommands.CollectHostNetworkDataVdsCommandParameters ( getVds ( ) , getInterfaces ( ) ) ) ; for ( org.ovirt.engine.core.common.businessentities.network.Network net : getNetworks ( ) ) { org.ovirt.engine.core.bll.network.cluster.NetworkClusterHelper.setStatus ( getVdsGroupId ( ) , net ) ; } return java.lang.Boolean.TRUE ; }

Target:
public java.lang.Boolean runInTransaction ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > ifaces = new java.util.ArrayList ( getInterfaces ( ) ) ; ifaces.addAll ( getRemovedBonds ( ) . values ( ) ) ; org.ovirt.engine.core.bll.Backend.getInstance ( ) . getResourceManager ( ) . RunVdsCommand ( VDSCommandType.CollectVdsNetworkData , new org.ovirt.engine.core.common.vdscommands.CollectHostNetworkDataVdsCommandParameters ( getVds ( ) , ifaces ) ) ; for ( org.ovirt.engine.core.common.businessentities.network.Network net : getNetworks ( ) ) { org.ovirt.engine.core.bll.network.cluster.NetworkClusterHelper.setStatus ( getVdsGroupId ( ) , net ) ; } return java.lang.Boolean.TRUE ; }
Source:
private void verifyInvalidValueException ( javax.ws.rs.WebApplicationException wae , java.lang.String value , java.lang.String typeName ) { assertEquals ( 400 , wae.getResponse ( ) . getStatus ( ) ) ; org.ovirt.engine.api.model.Fault fault = ( ( org.ovirt.engine.api.model.Fault ) ( wae.getResponse ( ) . getEntity ( ) ) ) ; assertNotNull ( fault ) ; assertEquals ( "Invalid value" , fault.getReason ( ) ) ; assertEquals ( ( ( ( value + " is not a member of " ) + typeName ) + ". Possible values for State are: new, runnable, blocked, waiting, timed_waiting, terminated" ) , fault.getDetail ( ) ) ; }

Target:
private void verifyInvalidValueException ( javax.ws.rs.WebApplicationException wae , java.lang.String value , java.lang.String typeName ) { org.junit.Assert.assertEquals ( 400 , wae.getResponse ( ) . getStatus ( ) ) ; org.ovirt.engine.api.model.Fault fault = ( ( org.ovirt.engine.api.model.Fault ) ( wae.getResponse ( ) . getEntity ( ) ) ) ; org.junit.Assert.assertNotNull ( fault ) ; org.junit.Assert.assertEquals ( "Invalid value" , fault.getReason ( ) ) ; org.junit.Assert.assertEquals ( ( ( ( value + " is not a member of " ) + typeName ) + ". Possible values for State are: new, runnable, blocked, waiting, timed_waiting, terminated" ) , fault.getDetail ( ) ) ; }
Source:
public java.util.List < org.ovirt.engine.core.common.businessentities.ServerCpu > getSupportedServerCpuList ( org.ovirt.engine.core.compat.Version ver , java.lang.String maxCpuName ) { final org.ovirt.engine.core.bll.CpuFlagsManagerHandler.CpuFlagsManager cpuFlagsManager = org.ovirt.engine.core.bll.CpuFlagsManagerHandler._managersDictionary.get ( ver ) ; if ( cpuFlagsManager != null ) { return cpuFlagsManager.getSupportedServerCpuList ( maxCpuName ) ; } return new java.util.ArrayList < > ( ) ; }

Target:
public java.util.List < org.ovirt.engine.core.common.businessentities.ServerCpu > getSupportedServerCpuList ( org.ovirt.engine.core.compat.Version ver , java.lang.String maxCpuName ) { final org.ovirt.engine.core.bll.CpuFlagsManagerHandler.CpuFlagsManager cpuFlagsManager = org.ovirt.engine.core.bll.CpuFlagsManagerHandler.managersDictionary.get ( ver ) ; return cpuFlagsManager != null ? cpuFlagsManager.getSupportedServerCpuList ( maxCpuName ) : new java.util.ArrayList < > ( ) ; }
Source:
private boolean networkMoved ( org.ovirt.engine.core.common.businessentities.network.NetworkAttachment updatedNetworkAttachment , org.ovirt.engine.core.common.businessentities.network.NetworkAttachment originalNetworkAttachment ) { return ( ! ( originalNetworkAttachment.getNicId ( ) . equals ( updatedNetworkAttachment.getNicId ( ) ) ) ) || ( ! ( originalNetworkAttachment.getNetworkId ( ) . equals ( updatedNetworkAttachment.getNetworkId ( ) ) ) ) ; }

Target:
private java.util.Set < java.lang.String > getRemovedBondNames ( ) { if ( ( removedBondNames ) == null ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > existingVdsInterfaceToBeRemoved = getRemovedBonds ( ) ; java.util.Set < java.lang.String > removedBondNames = new java.util.HashSet ( existingVdsInterfaceToBeRemoved.size ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface removedBondInterface : existingVdsInterfaceToBeRemoved ) { removedBondNames.add ( removedBondInterface.getName ( ) ) ; } this . removedBondNames = removedBondNames ; } return removedBondNames ; }
Source:
protected boolean validateQuota ( ) { getParameters ( ) . setQuotaId ( org.ovirt.engine.core.bll.QuotaHelper.getInstance ( ) . getQuotaIdToConsume ( getVmTemplate ( ) . getQuotaId ( ) , getStoragePool ( ) ) ) ; for ( org.ovirt.engine.core.common.businessentities.DiskImage di : getParameters ( ) . getImages ( ) ) { di.setQuotaId ( org.ovirt.engine.core.bll.QuotaHelper.getInstance ( ) . getQuotaIdToConsume ( getVmTemplate ( ) . getQuotaId ( ) , getStoragePool ( ) ) ) ; } return true ; }

Target:
public boolean validateAndSetQuota ( ) { if ( getQuotaManager ( ) . validateQuotaForStoragePool ( getStoragePool ( ) , getVdsGroupId ( ) , getParameters ( ) . getQuotaId ( ) , getReturnValue ( ) . getCanDoActionMessages ( ) ) ) { return getQuotaManager ( ) . validateAndSetStorageQuota ( getStoragePool ( ) , getStorageQuotaListParameters ( ) , getReturnValue ( ) . getCanDoActionMessages ( ) ) ; } return false ; }
Source:
public void getStorageDevices ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hostId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterStorageDevices , new org.ovirt.engine.core.common.queries.IdQueryParameters ( hostId ) , aQuery ) ; }

Target:
public void getUnusedBricksFromServer ( org.ovirt.engine.ui.frontend.AsyncQuery asyncQuery , org.ovirt.engine.core.compat.Guid hostId ) { asyncQuery.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.IdQueryParameters parameters = new org.ovirt.engine.core.common.queries.IdQueryParameters ( hostId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetUnusedGlusterBricks , parameters , asyncQuery ) ; }
Source:
public static void getPermissionsByAdElementId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid userId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Permissions > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Permissions > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetPermissionsByAdElementId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( userId ) , aQuery ) ; }

Target:
public void getVolumeSnapshotSchedule ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid volumeId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterVolumeSnapshotScheduleByVolumeId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( volumeId ) , aQuery ) ; }
Source:
protected void OnSelectedItemChanged ( ) { super . OnSelectedItemChanged ( ) ; UpdateActionAvailability ( ) ; if ( ( getSelectedItem ( ) ) != null ) { org.ovirt.engine.core.common.businessentities.Snapshot snapshot = ( ( org.ovirt.engine.core.common.businessentities.Snapshot ) ( getSelectedItem ( ) ) ) ; UpdateVmConfigurationBySnapshot ( snapshot.getId ( ) ) ; } }

Target:
protected void onSelectedItemChanged ( ) { super . onSelectedItemChanged ( ) ; UpdateActionAvailability ( ) ; if ( ( getSelectedItem ( ) ) != null ) { org.ovirt.engine.core.common.businessentities.Snapshot snapshot = ( ( org.ovirt.engine.core.common.businessentities.Snapshot ) ( getSelectedItem ( ) ) ) ; UpdateVmConfigurationBySnapshot ( snapshot.getId ( ) ) ; } }
Source:
private org.ovirt.engine.api.model.Action mapTargets ( org.ovirt.engine.api.model.Action action , java.util.List < org.ovirt.engine.core.common.businessentities.StorageServerConnections > targets ) { if ( targets != null ) { for ( org.ovirt.engine.core.common.businessentities.StorageServerConnections cnx : targets ) { action.getIscsiTargets ( ) . add ( map ( cnx ) . getTarget ( ) ) ; } } return action ; }

Target:
private org.ovirt.engine.api.model.Action mapTargets ( org.ovirt.engine.api.model.Action action , java.util.List < org.ovirt.engine.core.common.businessentities.StorageServerConnections > targets ) { if ( targets != null ) { org.ovirt.engine.api.model.Action.IscsiTargetsList iscsiTargets = new org.ovirt.engine.api.model.Action.IscsiTargetsList ( ) ; for ( org.ovirt.engine.core.common.businessentities.StorageServerConnections cnx : targets ) { iscsiTargets.getIscsiTargets ( ) . add ( map ( cnx ) . getTarget ( ) ) ; } action.setIscsiTargets ( iscsiTargets ) ; } return action ; }
Source:
protected void executeCommand ( ) { org.ovirt.engine.core.common.vdscommands.VDSReturnValue retVal = org.ovirt.engine.core.bll.Backend.getInstance ( ) . getResourceManager ( ) . RunVdsCommand ( VDSCommandType.SetSafeNetworkConfig , new org.ovirt.engine.core.common.vdscommands.VdsIdVDSCommandParametersBase ( org.ovirt.engine.core.bll.network.host.CommitNetworkChangesCommand.getParameters ( ) . getVdsId ( ) ) ) ; org.ovirt.engine.core.bll.network.host.CommitNetworkChangesCommand.getVds ( ) . setNetConfigDirty ( false ) ; org.ovirt.engine.core.bll.network.host.CommitNetworkChangesCommand.getDbFacade ( ) . getVdsDynamicDao ( ) . update ( org.ovirt.engine.core.bll.network.host.CommitNetworkChangesCommand.getVds ( ) . getDynamicData ( ) ) ; setSucceeded ( retVal.getSucceeded ( ) ) ; }

Target:
protected void executeCommand ( ) { org.ovirt.engine.core.common.vdscommands.VDSReturnValue retVal = runVdsCommand ( VDSCommandType.SetSafeNetworkConfig , new org.ovirt.engine.core.common.vdscommands.VdsIdVDSCommandParametersBase ( org.ovirt.engine.core.bll.network.host.CommitNetworkChangesCommand.getParameters ( ) . getVdsId ( ) ) ) ; org.ovirt.engine.core.bll.network.host.CommitNetworkChangesCommand.getDbFacade ( ) . getVdsDynamicDao ( ) . updateNetConfigDirty ( org.ovirt.engine.core.bll.network.host.CommitNetworkChangesCommand.getParameters ( ) . getVdsId ( ) , false ) ; setSucceeded ( retVal.getSucceeded ( ) ) ; }
Source:
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.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterVolumeAdvancedDetails , parameters , aQuery ) ; }

Target:
public void getHostPublicKey ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.String ) ( source ) ) : "" ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetServerSSHPublicKey , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }