auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeGeoRepStatusDetailForXmlRpc glusterVolumeGeoRepSessionStatus ( java.lang.String volumeName , java.lang.String slaveHost , java.lang.String slaveVolumeName ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "GlusterVolume.geoRepSessionStatus" ) . withParameter ( "volName" , volumeName ) . withParameter ( "remoteHost" , slaveHost ) . withParameter ( "remoteVolName" , slaveVolumeName ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) . withIgnoreResponseKey ( ) ; return new org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeGeoRepStatusDetailForXmlRpc ( response ) ; }

Target:
public org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeGeoRepStatusDetailForXmlRpc glusterVolumeGeoRepSessionStatus ( java.lang.String volumeName , java.lang.String slaveHost , java.lang.String slaveVolumeName ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "GlusterVolume.geoRepSessionStatus" ) . withParameter ( "volumeName" , volumeName ) . withParameter ( "remoteHost" , slaveHost ) . withParameter ( "remoteVolumeName" , slaveVolumeName ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) . withIgnoreResponseKey ( ) ; return new org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeGeoRepStatusDetailForXmlRpc ( response ) ; }
Source:
protected void RemoveVmNetwork ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmNetworkInterface > interfaces = getVmNetworkInterfaceDAO ( ) . getAllForVm ( org.ovirt.engine.core.bll.VmCommand.getVmId ( ) ) ; if ( interfaces != null ) { for ( org.ovirt.engine.core.common.businessentities.VmNetworkInterface iface : interfaces ) { org.ovirt.engine.core.bll.MacPoolManager.getInstance ( ) . freeMac ( iface.getMacAddress ( ) ) ; } } }

Target:
protected void removeVmNetwork ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmNetworkInterface > interfaces = getVmNetworkInterfaceDAO ( ) . getAllForVm ( org.ovirt.engine.core.bll.VmCommand.getVmId ( ) ) ; if ( interfaces != null ) { for ( org.ovirt.engine.core.common.businessentities.VmNetworkInterface iface : interfaces ) { org.ovirt.engine.core.bll.MacPoolManager.getInstance ( ) . freeMac ( iface.getMacAddress ( ) ) ; } } }
Source:
public static void GetNextAvailableDiskAliasNameByVMId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid vmId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetNextAvailableDiskAliasNameByVMId , new org.ovirt.engine.core.common.queries.GetAllDisksByVmIdParameters ( vmId ) , aQuery ) ; }

Target:
public static void getUpHostListByCluster ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String clusterName ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > list = org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.VDS > cast ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.IVdcQueryable > ) ( source ) ) ) ; return list ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ( ) ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getUpHostListByCluster ( aQuery , clusterName , null ) ; }
Source:
public void canDoActionFailsOnServerNotUp ( ) { cmd = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.gluster.RemoveGlusterHookCommand ( new org.ovirt.engine.core.common.action.gluster.GlusterHookManageParameters ( HOOK_ID ) ) ) ; setUpMocksForRemove ( true , getHookEntity ( ) , VDSStatus.Down ) ; org.junit.Assert.assertFalse ( cmd.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( cmd.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( EngineMessage.ACTION_TYPE_FAILED_SERVER_STATUS_NOT_UP.toString ( ) ) ) ; }

Target:
public void validateFailsOnServerNotUp ( ) { cmd = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.gluster.RemoveGlusterHookCommand ( new org.ovirt.engine.core.common.action.gluster.GlusterHookManageParameters ( HOOK_ID ) ) ) ; setUpMocksForRemove ( true , getHookEntity ( ) , VDSStatus.Down ) ; org.junit.Assert.assertFalse ( cmd.validate ( ) ) ; org.junit.Assert.assertTrue ( cmd.getReturnValue ( ) . getValidationMessages ( ) . contains ( EngineMessage.ACTION_TYPE_FAILED_SERVER_STATUS_NOT_UP.toString ( ) ) ) ; }
Source:
protected org.ovirt.engine.core.vdsbroker.vdsbroker.entities.VmInternalData createVmInternalData ( java.util.Map < java.lang.String , java.lang.Object > xmlRpcStruct ) { org.ovirt.engine.core.common.businessentities.VmDynamic vmDynamic = new org.ovirt.engine.core.vdsbroker.vdsbroker.ExtendedVmDynamic ( org.ovirt.engine.core.vdsbroker.vdsbroker.VmStatsVdsBrokerCommand.getVds ( ) ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectsBuilder.updateVMDynamicData ( vmDynamic , xmlRpcStruct ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.entities.VmInternalData ( vmDynamic , org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectsBuilder.buildVMStatisticsData ( xmlRpcStruct ) , org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectsBuilder.buildVmGuestAgentInterfacesData ( vmDynamic.getId ( ) , xmlRpcStruct ) ) ; }

Target:
protected org.ovirt.engine.core.vdsbroker.vdsbroker.entities.VmInternalData createVmInternalData ( java.util.Map < java.lang.String , java.lang.Object > xmlRpcStruct ) { org.ovirt.engine.core.common.businessentities.VmDynamic vmDynamic = new org.ovirt.engine.core.vdsbroker.vdsbroker.ExtendedVmDynamic ( org.ovirt.engine.core.vdsbroker.vdsbroker.VmStatsVdsBrokerCommand.getVds ( ) ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectsBuilder.updateVMDynamicData ( vmDynamic , xmlRpcStruct ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.entities.VmInternalData ( vmDynamic , org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectsBuilder.buildVMStatisticsData ( xmlRpcStruct ) , org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectsBuilder.buildVmGuestAgentInterfacesData ( vmDynamic.getId ( ) , xmlRpcStruct ) , org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectsBuilder.buildVmLunDisksData ( xmlRpcStruct ) ) ; }
Source:
protected org.ovirt.engine.core.common.businessentities.storage_domains getVgEntity ( int index ) { org.ovirt.engine.core.common.businessentities.storage_domains entity = new org.ovirt.engine.core.common.businessentities.storage_domains ( ) ; entity.setstorage ( ( ( org.ovirt.engine.api.restapi.resource.BackendHostStorageResourceTest.VG_ID_PREFIX ) + ( GUIDS [ index ] . toString ( ) ) ) ) ; entity.setstorage_type ( org.ovirt.engine.core.common.businessentities.StorageType.ISCSI ) ; return entity ; }

Target:
protected org.ovirt.engine.core.common.businessentities.StorageDomain getVgEntity ( int index ) { org.ovirt.engine.api.restapi.resource.StorageDomain entity = new org.ovirt.engine.api.restapi.resource.StorageDomain ( ) ; entity.setstorage ( ( ( org.ovirt.engine.api.restapi.resource.BackendHostStorageResourceTest.VG_ID_PREFIX ) + ( GUIDS [ index ] . toString ( ) ) ) ) ; entity.setstorage_type ( org.ovirt.engine.core.common.businessentities.StorageType.ISCSI ) ; return entity ; }
Source:
protected void syncSearch ( ) { if ( ( getEntity ( ) ) == null ) { return ; } super . syncSearch ( ) ; org.ovirt.engine.core.common.queries.IdQueryParameters parameters = new org.ovirt.engine.core.common.queries.IdQueryParameters ( getEntity ( ) . getId ( ) ) ; parameters.setRefresh ( getIsQueryFirstTime ( ) ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllDiskSnapshotsByStorageDomainId , parameters , new org.ovirt.engine.ui.uicommonweb.models.storage.SetSortedItemsAsyncQuery ( java.util.Collections.reverseOrder ( new org.ovirt.engine.ui.uicommonweb.Linq.DiskImageByActualSizeComparer ( ) ) ) ) ; }

Target:
protected void syncSearch ( ) { if ( ( getEntity ( ) ) == null ) { return ; } super . syncSearch ( ) ; org.ovirt.engine.core.common.queries.IdQueryParameters parameters = new org.ovirt.engine.core.common.queries.IdQueryParameters ( getEntity ( ) . getId ( ) ) ; parameters.setRefresh ( getIsQueryFirstTime ( ) ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllDiskSnapshotsByStorageDomainId , parameters , new org.ovirt.engine.ui.uicommonweb.models.storage.SetSortedItemsAsyncQuery ( java.util.Comparator.comparingDouble ( DiskImage :: getActualSize ) . reversed ( ) ) ) ; }
Source:
public void getUsbPolicyUsbTypeNull31 ( ) { org.ovirt.engine.api.model.Usb usb = new org.ovirt.engine.api.model.Usb ( ) ; usb.setEnabled ( true ) ; org.ovirt.engine.core.common.businessentities.VDSGroup vdsGroup = new org.ovirt.engine.core.common.businessentities.VDSGroup ( ) ; vdsGroup.setcompatibility_version ( Version.v3_1 ) ; assertEquals ( org.ovirt.engine.api.restapi.types.VmMapper.getUsbPolicyOnCreate ( usb , vdsGroup.getcompatibility_version ( ) ) , UsbPolicy.ENABLED_NATIVE ) ; }

Target:
public void getUsbPolicyUsbTypeNative ( ) { org.ovirt.engine.api.model.Usb usb = new org.ovirt.engine.api.model.Usb ( ) ; usb.setEnabled ( true ) ; usb.setType ( "native" ) ; org.ovirt.engine.core.common.businessentities.VDSGroup vdsGroup = new org.ovirt.engine.core.common.businessentities.VDSGroup ( ) ; assertEquals ( org.ovirt.engine.api.restapi.types.VmMapper.getUsbPolicyOnCreate ( usb , vdsGroup.getCompatibilityVersion ( ) ) , UsbPolicy.ENABLED_NATIVE ) ; }
Source:
private void endDefaultOperations ( ) { endUnlockOps ( ) ; if ( ( org.ovirt.engine.core.bll.AddVmTemplateCommand.getParameters ( ) . getBaseTemplateId ( ) ) != null ) { java.lang.String jobId = org.ovirt.engine.core.utils.timer.SchedulerUtilQuartzImpl.getInstance ( ) . scheduleAOneTimeJob ( this , "onTimerHandleVdsRecovering" , new java.lang.Class [ 0 ] , new java.lang.Object [ 0 ] , 0 , java.util.concurrent.TimeUnit.SECONDS ) ; org.ovirt.engine.core.bll.AddVmTemplateCommand.updateVmsJobIdMap.put ( org.ovirt.engine.core.bll.AddVmTemplateCommand.getParameters ( ) . getBaseTemplateId ( ) , jobId ) ; } }

Target:
private void endDefaultOperations ( ) { endUnlockOps ( ) ; if ( isTemplateVersion ( ) ) { java.lang.String jobId = org.ovirt.engine.core.utils.timer.SchedulerUtilQuartzImpl.getInstance ( ) . scheduleAOneTimeJob ( this , "updateVmVersion" , new java.lang.Class [ 0 ] , new java.lang.Object [ 0 ] , 0 , java.util.concurrent.TimeUnit.SECONDS ) ; org.ovirt.engine.core.bll.AddVmTemplateCommand.updateVmsJobIdMap.put ( org.ovirt.engine.core.bll.AddVmTemplateCommand.getParameters ( ) . getBaseTemplateId ( ) , jobId ) ; } }
Source:
private void refreshAllVdssInPool ( ) { java.util.List < org.ovirt.engine.core.compat.Guid > vdsIdsToSetNonOperational = new java.util.ArrayList < org.ovirt.engine.core.compat.Guid > ( ) ; runSynchronizeOperation ( new org.ovirt.engine.core.bll.storage.RefreshPoolSingleAsyncOperationFactory ( ) , vdsIdsToSetNonOperational ) ; for ( org.ovirt.engine.core.compat.Guid vdsId : vdsIdsToSetNonOperational ) { org.ovirt.engine.core.common.action.SetNonOperationalVdsParameters tempVar = new org.ovirt.engine.core.common.action.SetNonOperationalVdsParameters ( vdsId , org.ovirt.engine.core.common.businessentities.NonOperationalReason.STORAGE_DOMAIN_UNREACHABLE ) ; tempVar.setStorageDomainId ( org.ovirt.engine.core.bll.storage.ActivateStorageDomainCommand.getStorageDomain ( ) . getId ( ) ) ; tempVar.setTransactionScopeOption ( TransactionScopeOption.RequiresNew ) ; org.ovirt.engine.core.bll.storage.ActivateStorageDomainCommand.getBackend ( ) . runInternalAction ( VdcActionType.SetNonOperationalVds , tempVar , org.ovirt.engine.core.bll.job.ExecutionHandler.createInternalJobContext ( ) ) ; } }

Target:
public org.ovirt.engine.core.common.eventqueue.EventResult call ( ) { runSynchronizeOperation ( new org.ovirt.engine.core.bll.storage.RefreshPoolSingleAsyncOperationFactory ( ) , vdsIdsToSetNonOperational ) ; return null ; }
Source:
public void failedFenceWithSameProxyRetry ( ) { org.ovirt.engine.core.common.businessentities.pm.FenceOperationResult fenceVdsResult1 = new org.ovirt.engine.core.common.businessentities.pm.FenceOperationResult ( org.ovirt.engine.core.common.businessentities.pm.FenceOperationResult.Status.ERROR ) ; org.ovirt.engine.core.common.businessentities.pm.FenceOperationResult fenceVdsResult2 = new org.ovirt.engine.core.common.businessentities.pm.FenceOperationResult ( org.ovirt.engine.core.common.businessentities.pm.FenceOperationResult.Status.ERROR ) ; mockFenceVdsResult ( fenceVdsResult1 , fenceVdsResult2 ) ; mockProxyHost ( false ) ; org.ovirt.engine.core.common.businessentities.pm.FenceOperationResult result = executor.fence ( FenceActionType.START , createAgent ( ) ) ; org.junit.Assert.assertEquals ( Status.ERROR , result.getStatus ( ) ) ; verifyAttemptToFindDifferentProxy ( ) ; verifyAuditFenceExecutionFailure ( 2 ) ; }

Target:
public void failedFenceWithSameProxyRetry ( ) { org.ovirt.engine.core.common.businessentities.pm.FenceOperationResult fenceVdsResult1 = new org.ovirt.engine.core.common.businessentities.pm.FenceOperationResult ( org.ovirt.engine.core.common.businessentities.pm.FenceOperationResult.Status.ERROR ) ; org.ovirt.engine.core.common.businessentities.pm.FenceOperationResult fenceVdsResult2 = new org.ovirt.engine.core.common.businessentities.pm.FenceOperationResult ( org.ovirt.engine.core.common.businessentities.pm.FenceOperationResult.Status.ERROR ) ; mockFenceVdsResult ( fenceVdsResult1 , fenceVdsResult2 ) ; mockProxyHost ( false ) ; org.ovirt.engine.core.common.businessentities.pm.FenceOperationResult result = executor.fence ( FenceActionType.START , createAgent ( ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( Status.ERROR , result.getStatus ( ) ) ; verifyAttemptToFindDifferentProxy ( ) ; verifyAuditFenceExecutionFailure ( 2 ) ; }
Source:
private void updateShareableDiskEnabled ( org.ovirt.engine.core.common.businessentities.StoragePool datacenter ) { boolean isShareableDiskEnabled = ( ( java.lang.Boolean ) ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigValuePreConverted ( ConfigurationValues.ShareableDiskEnabled , datacenter.getcompatibility_version ( ) . getValue ( ) ) ) ) ; getIsShareable ( ) . setChangeProhibitionReason ( org.ovirt.engine.ui.uicommonweb.models.vms.AbstractDiskModel.CONSTANTS.shareableDiskNotSupported ( ) ) ; getIsShareable ( ) . setIsChangable ( isShareableDiskEnabled ) ; }

Target:
private void updateShareable ( org.ovirt.engine.core.common.businessentities.VolumeType volumeType , org.ovirt.engine.core.common.businessentities.StorageType storageType ) { if ( ( storageType.isBlockDomain ( ) ) && ( volumeType == ( org.ovirt.engine.core.common.businessentities.VolumeType.Sparse ) ) ) { getIsShareable ( ) . setChangeProhibitionReason ( org.ovirt.engine.ui.uicommonweb.models.vms.AbstractDiskModel.CONSTANTS.shareableDiskNotSupportedByConfiguration ( ) ) ; getIsShareable ( ) . setIsChangable ( false ) ; getIsShareable ( ) . setEntity ( false ) ; } else { getIsShareable ( ) . setIsChangable ( ( ( ( getVm ( ) ) != null ) && ( getVm ( ) . isDown ( ) ) ) ) ; } }
Source:
public static void isClusterEmpty ( 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.Boolean > ( ) { @ java.lang.Override public java.lang.Boolean Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return ( ( java.lang.Boolean ) ( source ) ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.IsClusterEmpty , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }

Target:
public static void getPoolById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid poolId ) { 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.GetVmPoolById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( poolId ) , aQuery ) ; }
Source:
public static void getAllVnicProfiles ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VnicProfileView > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllVnicProfiles , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }

Target:
public static void getVnicProfilesByNetworkId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid networkId ) { 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.network.VnicProfileView > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVnicProfilesByNetworkId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( networkId ) , aQuery ) ; }
Source:
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 ; }

Target:
public void getSpiceUsbAutoShare ( 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.Boolean ) ( source ) ) ; } } ; getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.SpiceUsbAutoShare , getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
protected java.util.Map < java.lang.String , java.lang.Object > convertFencingPolicy ( ) { java.util.Map < java.lang.String , java.lang.Object > map = null ; if ( ( ( org.ovirt.engine.core.vdsbroker.vdsbroker.FenceVdsVDSCommand.getParameters ( ) . getFencingPolicy ( ) ) != null ) && ( org.ovirt.engine.core.common.utils.FencingPolicyHelper.isFencingPolicySupported ( getProxyVds ( ) . getSupportedClusterVersionsSet ( ) ) ) ) { map = new java.util.HashMap < > ( ) ; if ( org.ovirt.engine.core.vdsbroker.vdsbroker.FenceVdsVDSCommand.getParameters ( ) . getFencingPolicy ( ) . isSkipFencingIfSDActive ( ) ) { map.put ( VdsProperties.STORAGE_DOMAIN_HOST_ID_MAP , createStorageDomainHostIdMap ( ) ) ; } } return map ; }

Target:
protected void alertActionSkippedAlreadyInStatus ( ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase auditLogable = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; auditLogable.addCustomValue ( "HostName" , getTargetVds ( ) . getName ( ) ) ; auditLogable.addCustomValue ( "AgentStatus" , org.ovirt.engine.core.vdsbroker.vdsbroker.FenceVdsVDSCommand.getParameters ( ) . getAction ( ) . getValue ( ) ) ; auditLogable.addCustomValue ( "Operation" , org.ovirt.engine.core.vdsbroker.vdsbroker.FenceVdsVDSCommand.getParameters ( ) . getAction ( ) . toString ( ) ) ; auditLogDirector.log ( auditLogable , AuditLogType.VDS_ALREADY_IN_REQUESTED_STATUS ) ; }
Source:
private org.ovirt.engine.core.common.action.VdcReturnValueBase removeCinderDisk ( org.ovirt.engine.core.common.businessentities.storage.CinderDisk cinderDisk ) { java.util.concurrent.Future < org.ovirt.engine.core.common.action.VdcReturnValueBase > future = org.ovirt.engine.core.bll.tasks.CommandCoordinatorUtil.executeAsyncCommand ( VdcActionType.RemoveCinderDisk , buildChildCommandParameters ( cinderDisk ) , org.ovirt.engine.core.bll.storage.disk.cinder.RemoveAllVmCinderDisksCommand.cloneContextAndDetachFromParent ( ) ) ; try { return future.get ( ) ; } catch ( java.lang.InterruptedException | java.util.concurrent.ExecutionException e ) { log.error ( "Error removing Cinder disk" , e ) ; } return null ; }

Target:
private org.ovirt.engine.core.common.action.VdcReturnValueBase removeCinderDisk ( org.ovirt.engine.core.common.businessentities.storage.CinderDisk cinderDisk ) { java.util.concurrent.Future < org.ovirt.engine.core.common.action.VdcReturnValueBase > future = org.ovirt.engine.core.bll.tasks.CommandCoordinatorUtil.executeAsyncCommand ( ActionType.RemoveCinderDisk , buildChildCommandParameters ( cinderDisk ) , org.ovirt.engine.core.bll.storage.disk.cinder.RemoveAllVmCinderDisksCommand.cloneContextAndDetachFromParent ( ) ) ; try { return future.get ( ) ; } catch ( java.lang.InterruptedException | java.util.concurrent.ExecutionException e ) { log.error ( "Error removing Cinder disk" , e ) ; } return null ; }
Source:
public void setEmulatedMachine ( org.ovirt.engine.core.compat.Guid vdsGroupId , java.lang.String emulatedMachine ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) . addValue ( "vds_group_id" , vdsGroupId ) . addValue ( "emulated_machine" , emulatedMachine ) ; getCallsHandler ( ) . executeModification ( "UpdateVdsGroupEmulatedMachine" , parameterSource ) ; }

Target:
public void setEmulatedMachine ( org.ovirt.engine.core.compat.Guid vdsGroupId , java.lang.String emulatedMachine , boolean detectEmulatedMachine ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) . addValue ( "vds_group_id" , vdsGroupId ) . addValue ( "emulated_machine" , emulatedMachine ) . addValue ( "detect_emulated_machine" , detectEmulatedMachine ) ; getCallsHandler ( ) . executeModification ( "UpdateVdsGroupEmulatedMachine" , parameterSource ) ; }
Source:
public void isVmNameUnique ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String name , org.ovirt.engine.core.compat.Guid datacenterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ! ( ( ( java.lang.Boolean ) ( source ) ) . booleanValue ( ) ) : false ; } } ; org.ovirt.engine.core.common.queries.NameQueryParameters params = new org.ovirt.engine.core.common.queries.NameQueryParameters ( name ) ; params.setDatacenterId ( datacenterId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.IsVmWithSameNameExist , params , aQuery ) ; }

Target:
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 ) ; }
Source:
public void testUpdate ( ) { org.ovirt.engine.core.common.businessentities.network.VmNicFilterParameter updatedParameter = new org.ovirt.engine.core.common.businessentities.network.VmNicFilterParameter ( ) ; updatedParameter.setId ( FixturesTool.VM_NETWORK_FILTER_PARAMETER ) ; updatedParameter.setName ( "IP" ) ; updatedParameter.setValue ( "192.168.122.1" ) ; updatedParameter.setVmInterfaceId ( FixturesTool.VM_NETWORK_INTERFACE ) ; org.junit.Assert.assertNotEquals ( updatedParameter , dao.get ( FixturesTool.VM_NETWORK_FILTER_PARAMETER ) ) ; dao.update ( updatedParameter ) ; org.junit.Assert.assertEquals ( updatedParameter , dao.get ( FixturesTool.VM_NETWORK_FILTER_PARAMETER ) ) ; }

Target:
protected org.ovirt.engine.core.dao.network.VmNicFilterParameterDao prepareDao ( ) { return dao ; }
Source:
public N add ( N incoming ) { org.ovirt.engine.core.common.businessentities.Quota entity = getQuota ( ) ; performAction ( VdcActionType.UpdateQuota , getAddParametersProvider ( ) . getParameters ( incoming , entity ) ) ; entity = getQuota ( ) ; updateIncomingId ( incoming , entity ) ; N model = map ( entity , incoming ) ; return addLinks ( doPopulate ( model , entity ) ) ; }

Target:
public javax.ws.rs.core.Response add ( N incoming ) { org.ovirt.engine.core.common.businessentities.Quota entity = getQuota ( ) ; performAction ( VdcActionType.UpdateQuota , getAddParametersProvider ( ) . getParameters ( incoming , entity ) ) ; entity = getQuota ( ) ; updateIncomingId ( incoming , entity ) ; N model = map ( entity , incoming ) ; model = addLinks ( doPopulate ( model , entity ) ) ; return javax.ws.rs.core.Response.ok ( model ) . build ( ) ; }
Source:
public void testStorageLinks ( ) throws java.lang.Exception { org.ovirt.engine.api.model.HostStorage storage = new org.ovirt.engine.api.model.HostStorage ( ) ; storage.setId ( org.ovirt.engine.api.restapi.util.LinkHelperTest.STORAGE_ID ) ; storage.setHost ( new org.ovirt.engine.api.model.Host ( ) ) ; storage.getHost ( ) . setId ( org.ovirt.engine.api.restapi.util.LinkHelperTest.HOST_ID ) ; org.ovirt.engine.api.restapi.util.LinkHelper.addLinks ( storage ) ; assertEquals ( org.ovirt.engine.api.restapi.util.LinkHelperTest.STORAGE_HREF , storage.getHref ( ) ) ; assertEquals ( org.ovirt.engine.api.restapi.util.LinkHelperTest.HOST_HREF , storage.getHost ( ) . getHref ( ) ) ; }

Target:
public void testStorageLinks ( ) throws java.lang.Exception { org.ovirt.engine.api.model.HostStorage storage = new org.ovirt.engine.api.model.HostStorage ( ) ; storage.setId ( org.ovirt.engine.api.restapi.util.LinkHelperTest.STORAGE_ID ) ; storage.setHost ( new org.ovirt.engine.api.model.Host ( ) ) ; storage.getHost ( ) . setId ( org.ovirt.engine.api.restapi.util.LinkHelperTest.HOST_ID ) ; org.ovirt.engine.api.restapi.util.LinkHelper.addLinks ( storage ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.api.restapi.util.LinkHelperTest.STORAGE_HREF , storage.getHref ( ) ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.api.restapi.util.LinkHelperTest.HOST_HREF , storage.getHost ( ) . getHref ( ) ) ; }
Source:
public void getRoleActionGroupsByRoleId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid roleId ) { 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.ActionGroup > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ActionGroup > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetRoleActionGroupsByRoleId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( roleId ) , aQuery ) ; }

Target:
public void getGlusterSwiftServerServices ( 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.GlusterServerService > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterServerServicesByClusterId , new org.ovirt.engine.core.common.queries.gluster.GlusterServiceQueryParameters ( clusterId , org.ovirt.engine.core.common.businessentities.gluster.ServiceType.GLUSTER_SWIFT ) , aQuery ) ; }
Source:
public com.google.gwt.resources.client.ImageResource getValue ( org.ovirt.engine.ui.uicommonweb.models.EntityModel object ) { org.ovirt.engine.core.common.businessentities.Disk disk = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.DiskModel ) ( object.getEntity ( ) ) ) . getDisk ( ) ; setTitle ( ( disk.isShareable ( ) ? constants.shareable ( ) : null ) ) ; return disk.isShareable ( ) ? resources.shareableDiskIcon ( ) : null ; }

Target:
public com.google.gwt.safehtml.shared.SafeHtml getTooltip ( org.ovirt.engine.ui.uicommonweb.models.EntityModel object ) { org.ovirt.engine.core.common.businessentities.storage.Disk disk = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.DiskModel ) ( object.getEntity ( ) ) ) . getDisk ( ) ; if ( disk.isShareable ( ) ) { return com.google.gwt.safehtml.shared.SafeHtmlUtils.fromSafeConstant ( constants.shareable ( ) ) ; } return null ; }
Source:
protected void OnExecute ( ) { super . OnExecute ( ) ; org.ovirt.engine.ui.frontend.Frontend.RunMultipleAction ( getActionType ( ) , getParameters ( ) , new org.ovirt.engine.ui.uicompat.IFrontendMultipleActionAsyncCallback ( ) { @ java.lang.Override public void Executed ( org.ovirt.engine.ui.uicompat.FrontendMultipleActionAsyncResult result ) { org.ovirt.engine.ui.uicommonweb.models.templates.CopyDiskModel localModel = ( ( org.ovirt.engine.ui.uicommonweb.models.templates.CopyDiskModel ) ( result.getState ( ) ) ) ; localModel.StopProgress ( ) ; org.ovirt.engine.ui.uicommonweb.models.ListModel listModel = ( ( org.ovirt.engine.ui.uicommonweb.models.ListModel ) ( localModel.getEntity ( ) ) ) ; listModel.setWindow ( null ) ; } } , this ) ; }

Target:
protected void OnExecute ( ) { super . OnExecute ( ) ; java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > parameters = getParameters ( ) ; if ( parameters.isEmpty ( ) ) { cancel ( ) ; return ; } org.ovirt.engine.ui.frontend.Frontend.RunMultipleAction ( getActionType ( ) , parameters , new org.ovirt.engine.ui.uicompat.IFrontendMultipleActionAsyncCallback ( ) { @ java.lang.Override public void Executed ( org.ovirt.engine.ui.uicompat.FrontendMultipleActionAsyncResult result ) { org.ovirt.engine.ui.uicommonweb.models.templates.CopyDiskModel localModel = ( ( org.ovirt.engine.ui.uicommonweb.models.templates.CopyDiskModel ) ( result.getState ( ) ) ) ; localModel.cancel ( ) ; } } , this ) ; }
Source:
public void testGetVolumesByOption ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity > volumes = dao.getVolumesByOption ( org.ovirt.engine.core.dao.gluster.GlusterVolumeDaoTest.CLUSTER_ID , GlusterStatus.UP , "nfs.disable" , "off" ) ; org.junit.Assert.assertTrue ( ( volumes != null ) ) ; org.junit.Assert.assertTrue ( volumes.contains ( existingReplVol ) ) ; org.junit.Assert.assertTrue ( volumes.get ( 0 ) . isNfsEnabled ( ) ) ; }

Target:
public void testGetVolumesByOption ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity > volumes = dao.getVolumesByOption ( org.ovirt.engine.core.dao.gluster.GlusterVolumeDaoTest.CLUSTER_ID , GlusterStatus.UP , org.ovirt.engine.core.dao.gluster.GlusterVolumeDaoTest.OPTION_KEY_NFS_DISABLE , org.ovirt.engine.core.dao.gluster.GlusterVolumeDaoTest.OPTION_VALUE_OFF ) ; org.junit.Assert.assertTrue ( ( volumes != null ) ) ; org.junit.Assert.assertTrue ( volumes.contains ( existingReplVol ) ) ; org.junit.Assert.assertTrue ( volumes.get ( 0 ) . isNfsEnabled ( ) ) ; }
Source:
private void endCommand ( ) { if ( org.ovirt.engine.core.bll.RemoveImageCommand.getParameters ( ) . getRemoveFromDB ( ) ) { removeImageFromDB ( true ) ; } else { org.ovirt.engine.core.bll.RemoveImageCommand.getImageStorageDomainMapDao ( ) . remove ( new org.ovirt.engine.core.common.businessentities.ImageStorageDomainMapId ( org.ovirt.engine.core.bll.RemoveImageCommand.getParameters ( ) . getImageId ( ) , org.ovirt.engine.core.bll.RemoveImageCommand.getParameters ( ) . getStorageDomainId ( ) ) ) ; org.ovirt.engine.core.bll.RemoveImageCommand.unLockImage ( ) ; } org.ovirt.engine.core.bll.RemoveImageCommand.setSucceeded ( true ) ; }

Target:
private void endCommand ( ) { if ( ! ( org.ovirt.engine.core.bll.RemoveImageCommand.getParameters ( ) . isRemoveDuringExecution ( ) ) ) { if ( org.ovirt.engine.core.bll.RemoveImageCommand.getParameters ( ) . getRemoveFromDB ( ) ) { removeImageFromDB ( true ) ; } else { org.ovirt.engine.core.bll.RemoveImageCommand.getImageStorageDomainMapDao ( ) . remove ( new org.ovirt.engine.core.common.businessentities.ImageStorageDomainMapId ( org.ovirt.engine.core.bll.RemoveImageCommand.getParameters ( ) . getImageId ( ) , org.ovirt.engine.core.bll.RemoveImageCommand.getParameters ( ) . getStorageDomainId ( ) ) ) ; org.ovirt.engine.core.bll.RemoveImageCommand.unLockImage ( ) ; } } org.ovirt.engine.core.bll.RemoveImageCommand.setSucceeded ( true ) ; }
Source:
public boolean Match ( org.ovirt.engine.ui.uicommonweb.models.storage.SanTargetModel source ) { return ( ( org.ovirt.engine.core.compat.StringHelper.stringsEqual ( source.getName ( ) , target.getName ( ) ) ) && ( org.ovirt.engine.core.compat.StringHelper.stringsEqual ( source.getAddress ( ) , target.getAddress ( ) ) ) ) && ( org.ovirt.engine.core.compat.StringHelper.stringsEqual ( source.getPort ( ) , target.getPort ( ) ) ) ; }

Target:
public boolean match ( org.ovirt.engine.ui.uicommonweb.models.storage.SanTargetModel source ) { return ( ( org.ovirt.engine.core.compat.StringHelper.stringsEqual ( source.getName ( ) , target.getName ( ) ) ) && ( org.ovirt.engine.core.compat.StringHelper.stringsEqual ( source.getAddress ( ) , target.getAddress ( ) ) ) ) && ( org.ovirt.engine.core.compat.StringHelper.stringsEqual ( source.getPort ( ) , target.getPort ( ) ) ) ; }
Source:
protected void EndMoveOrCopyCommand ( ) { EndActionOnAllImageGroups ( ) ; if ( ( org.ovirt.engine.core.bll.MoveOrCopyTemplateCommand.getVmTemplate ( ) ) != null ) { org.ovirt.engine.core.bll.VmTemplateHandler.UnLockVmTemplate ( org.ovirt.engine.core.bll.MoveOrCopyTemplateCommand.getVmTemplateId ( ) ) ; org.ovirt.engine.core.bll.utils.VmDeviceUtils.setVmDevices ( org.ovirt.engine.core.bll.MoveOrCopyTemplateCommand.getVmTemplate ( ) ) ; UpdateTemplateInSpm ( ) ; } else { org.ovirt.engine.core.bll.MoveOrCopyTemplateCommand.setCommandShouldBeLogged ( false ) ; log.warn ( "MoveOrCopyTemplateCommand::EndMoveOrCopyCommand: VmTemplate is null, not performing full EndAction" ) ; } org.ovirt.engine.core.bll.MoveOrCopyTemplateCommand.setSucceeded ( true ) ; }

Target:
protected void EndMoveOrCopyCommand ( ) { EndActionOnAllImageGroups ( ) ; endVmTemplateRelatedOps ( ) ; org.ovirt.engine.core.bll.MoveOrCopyTemplateCommand.setSucceeded ( true ) ; }
Source:
public void testGetQosWhenNetworkAttachmentDoesNotHaveOverriddenQos ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.HostNetworkQos hostNetworkQos = createHostNetworkQos ( ) ; org.ovirt.engine.core.common.businessentities.network.Network network = createNetworkWithQos ( hostNetworkQos ) ; org.ovirt.engine.core.common.businessentities.network.NetworkAttachment networkAttachment = createNetworkAttachmentWithoutOverriddenQos ( ) ; org.mockito.Mockito.when ( hostNetworkQosDao.get ( network.getQosId ( ) ) ) . thenReturn ( hostNetworkQos ) ; org.junit.Assert.assertThat ( effectiveHostNetworkQos.getQos ( networkAttachment , network ) , org.hamcrest.CoreMatchers.is ( hostNetworkQos ) ) ; org.mockito.Mockito.verify ( hostNetworkQosDao ) . get ( org.mockito.Matchers.eq ( network.getQosId ( ) ) ) ; org.mockito.Mockito.verifyNoMoreInteractions ( hostNetworkQosDao ) ; }

Target:
public void testGetQosWhenNetworkAttachmentDoesNotHaveOverriddenQos ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.HostNetworkQos hostNetworkQos = createHostNetworkQos ( ) ; org.ovirt.engine.core.common.businessentities.network.Network network = createNetworkWithQos ( hostNetworkQos ) ; org.ovirt.engine.core.common.businessentities.network.NetworkAttachment networkAttachment = createNetworkAttachmentWithoutOverriddenQos ( ) ; org.mockito.Mockito.when ( hostNetworkQosDao.get ( network.getQosId ( ) ) ) . thenReturn ( hostNetworkQos ) ; org.junit.Assert.assertThat ( effectiveHostNetworkQos.getQos ( networkAttachment , network ) , org.hamcrest.CoreMatchers.is ( hostNetworkQos ) ) ; org.mockito.Mockito.verify ( hostNetworkQosDao ) . get ( org.mockito.ArgumentMatchers.eq ( network.getQosId ( ) ) ) ; org.mockito.Mockito.verifyNoMoreInteractions ( hostNetworkQosDao ) ; }
Source:
private void checkTrustedService ( ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase logable = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; logable.addCustomValue ( "VmTemplateName" , getVmTemplateName ( ) ) ; if ( ( getVmTemplate ( ) . isTrustedService ( ) ) && ( ! ( getVdsGroup ( ) . supportsTrustedService ( ) ) ) ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.log ( logable , AuditLogType.IMPORTEXPORT_IMPORT_TEMPLATE_FROM_TRUSTED_TO_UNTRUSTED ) ; } else if ( ( ! ( getVmTemplate ( ) . isTrustedService ( ) ) ) && ( getVdsGroup ( ) . supportsTrustedService ( ) ) ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.log ( logable , AuditLogType.IMPORTEXPORT_IMPORT_TEMPLATE_FROM_UNTRUSTED_TO_TRUSTED ) ; } }

Target:
private void checkTrustedService ( ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase logable = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; logable.addCustomValue ( "VmTemplateName" , getVmTemplateName ( ) ) ; if ( ( getVmTemplate ( ) . isTrustedService ( ) ) && ( ! ( getVdsGroup ( ) . supportsTrustedService ( ) ) ) ) { auditLogDirector.log ( logable , AuditLogType.IMPORTEXPORT_IMPORT_TEMPLATE_FROM_TRUSTED_TO_UNTRUSTED ) ; } else if ( ( ! ( getVmTemplate ( ) . isTrustedService ( ) ) ) && ( getVdsGroup ( ) . supportsTrustedService ( ) ) ) { auditLogDirector.log ( logable , AuditLogType.IMPORTEXPORT_IMPORT_TEMPLATE_FROM_UNTRUSTED_TO_TRUSTED ) ; } }
Source:
public java.lang.Boolean runInTransaction ( ) { org.ovirt.engine.core.bll.Backend.getInstance ( ) . getResourceManager ( ) . RunVdsCommand ( VDSCommandType.CollectVdsNetworkData , new org.ovirt.engine.core.common.vdscommands.VdsIdAndVdsVDSCommandParametersBase ( bckndCmdParams.getVdsId ( ) ) ) ; for ( org.ovirt.engine.core.common.businessentities.Network net : getNetworks ( ) ) { org.ovirt.engine.core.bll.AttachNetworkToVdsGroupCommand.SetNetworkStatus ( getVdsGroupId ( ) , net ) ; } return java.lang.Boolean.TRUE ; }

Target:
public java.lang.Boolean runInTransaction ( ) { org.ovirt.engine.core.bll.Backend.getInstance ( ) . getResourceManager ( ) . RunVdsCommand ( VDSCommandType.CollectVdsNetworkData , new org.ovirt.engine.core.common.vdscommands.VdsIdAndVdsVDSCommandParametersBase ( bckndCmdParams.getVdsId ( ) ) ) ; for ( org.ovirt.engine.core.common.businessentities.Network net : getNetworks ( ) ) { org.ovirt.engine.core.bll.network.cluster.NetworkClusterHelper.setStatus ( getVdsGroupId ( ) , net ) ; } return java.lang.Boolean.TRUE ; }
Source:
public void testSaveWithEntities ( ) { org.ovirt.engine.core.compat.Guid storageId = org.ovirt.engine.core.compat.Guid.NewGuid ( ) ; dao.save ( newAsyncTask , VdcObjectType.Storage , storageId ) ; java.util.List < org.ovirt.engine.core.compat.Guid > asyncTasks = dao.getAsyncTaskIdsByEntity ( storageId ) ; org.junit.Assert.assertNotNull ( asyncTasks ) ; org.junit.Assert.assertEquals ( asyncTasks.size ( ) , 1 ) ; org.junit.Assert.assertEquals ( asyncTasks.get ( 0 ) , newAsyncTask.getTaskId ( ) ) ; }

Target:
public void testSaveWithEntities ( ) { org.ovirt.engine.core.compat.Guid storageId = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; dao.save ( newAsyncTask , VdcObjectType.Storage , storageId ) ; java.util.List < org.ovirt.engine.core.compat.Guid > asyncTasks = dao.getAsyncTaskIdsByEntity ( storageId ) ; org.junit.Assert.assertNotNull ( asyncTasks ) ; org.junit.Assert.assertEquals ( asyncTasks.size ( ) , 1 ) ; org.junit.Assert.assertEquals ( asyncTasks.get ( 0 ) , newAsyncTask.getTaskId ( ) ) ; }
Source:
public org.ovirt.engine.core.common.businessentities.StoragePoolIsoMap mapRow ( java.sql.ResultSet rs , int rowNum ) throws java.sql.SQLException { org.ovirt.engine.core.common.businessentities.StoragePoolIsoMap entity = new org.ovirt.engine.core.common.businessentities.StoragePoolIsoMap ( ) ; entity.setstorage_id ( org.ovirt.engine.core.compat.Guid.createGuidFromString ( rs.getString ( "storage_id" ) ) ) ; entity.setstorage_pool_id ( org.ovirt.engine.core.compat.NGuid.createGuidFromString ( rs.getString ( "storage_pool_id" ) ) ) ; entity.setstatus ( org.ovirt.engine.core.common.businessentities.StorageDomainStatus.forValue ( rs.getInt ( "status" ) ) ) ; entity.setowner ( org.ovirt.engine.core.common.businessentities.StorageDomainOwnerType.forValue ( rs.getInt ( "owner" ) ) ) ; return entity ; }

Target:
public java.util.List < org.ovirt.engine.core.common.businessentities.StoragePoolIsoMap > getAllForStorage ( org.ovirt.engine.core.compat.Guid isoId ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) . addValue ( "storage_id" , isoId ) ; return getCallsHandler ( ) . executeReadList ( "Getstorage_pool_iso_mapsBystorage_id" , org.ovirt.engine.core.dao.StoragePoolIsoMapDAODbFacadeImpl.StoragePoolIsoMapRowMapper.instance , parameterSource ) ; }
Source:
protected void addCommand ( org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkOperation operation , org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkCommand command ) { java.util.List < org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkCommand > menuItems = getItems ( operation ) ; menuItems.add ( command ) ; }

Target:
private void addToOperationMultiMap ( java.util.Map < org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkOperation , java.util.List < org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkCommand > > operationsMap , org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkOperation operation , org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkCommand command ) { java.util.List < org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkCommand > menuItems = operationsMap.get ( operation ) ; if ( menuItems == null ) { menuItems = new java.util.ArrayList < > ( ) ; operationsMap.put ( operation , menuItems ) ; } menuItems.add ( command ) ; }
Source:
protected void alertActionSkippedAlreadyInStatus ( ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase auditLogable = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; auditLogable.addCustomValue ( "HostName" , getTargetVds ( ) . getName ( ) ) ; auditLogable.addCustomValue ( "AgentStatus" , org.ovirt.engine.core.vdsbroker.vdsbroker.FenceVdsVDSCommand.getParameters ( ) . getAction ( ) . getValue ( ) ) ; auditLogable.addCustomValue ( "Operation" , org.ovirt.engine.core.vdsbroker.vdsbroker.FenceVdsVDSCommand.getParameters ( ) . getAction ( ) . toString ( ) ) ; auditLogDirector.log ( auditLogable , AuditLogType.VDS_ALREADY_IN_REQUESTED_STATUS ) ; }

Target:
protected void alertActionSkippedAlreadyInStatus ( ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase auditLogable = org.ovirt.engine.core.di.Injector.injectMembers ( new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ) ; auditLogable.addCustomValue ( "HostName" , getTargetVds ( ) . getName ( ) ) ; auditLogable.addCustomValue ( "AgentStatus" , org.ovirt.engine.core.vdsbroker.vdsbroker.FenceVdsVDSCommand.getParameters ( ) . getAction ( ) . getValue ( ) ) ; auditLogable.addCustomValue ( "Operation" , org.ovirt.engine.core.vdsbroker.vdsbroker.FenceVdsVDSCommand.getParameters ( ) . getAction ( ) . toString ( ) ) ; auditLogDirector.log ( auditLogable , AuditLogType.VDS_ALREADY_IN_REQUESTED_STATUS ) ; }
Source:
public void getVMProperties ( org.ovirt.engine.core.compat.Version version , java.util.Map < java.lang.String , java.lang.String > propertiesMap , java.lang.String vmPropertiesFieldValue ) { if ( org.ovirt.engine.core.compat.StringHelper.isNullOrEmpty ( vmPropertiesFieldValue ) ) { return ; } populateVMProperties ( version , vmPropertiesFieldValue , propertiesMap ) ; }

Target:
public java.util.Map < org.ovirt.engine.core.compat.Version , java.lang.String > getAllVmProperties ( ) { java.util.Map < org.ovirt.engine.core.compat.Version , java.lang.String > allVmPropertiesString = new java.util.HashMap < org.ovirt.engine.core.compat.Version , java.lang.String > ( ) ; for ( java.util.Map.Entry < org.ovirt.engine.core.compat.Version , java.util.Map < java.lang.String , java.lang.String > > entry : allVmProperties.entrySet ( ) ) { allVmPropertiesString.put ( entry.getKey ( ) , convertProperties ( entry.getValue ( ) ) ) ; } return allVmPropertiesString ; }
Source:
private boolean updateFileList ( org.ovirt.engine.core.compat.Guid storageDomainId , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.common.businessentities.storage.ImageFileType imageType ) { switch ( imageType ) { case All : return updateAllFileListFromVDSM ( storagePoolId , storageDomainId ) ; case ISO : return updateIsoListFromVDSM ( storagePoolId , storageDomainId ) ; case Floppy : return updateFloppyListFromVDSM ( storagePoolId , storageDomainId ) ; default : org.ovirt.engine.core.bll.IsoDomainListSyncronizer.log.warn ( "Refreshing Iso domain using unsupported imageType: {}" , imageType ) ; return false ; } }

Target:
private boolean updateFileList ( org.ovirt.engine.core.compat.Guid storageDomainId , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.common.businessentities.storage.ImageFileType imageType ) { switch ( imageType ) { case All : return updateAllFileListFromVDSM ( storagePoolId , storageDomainId ) ; case ISO : return updateIsoListFromVDSM ( storagePoolId , storageDomainId ) ; case Floppy : return updateFloppyListFromVDSM ( storagePoolId , storageDomainId ) ; case Unknown : return updateUnknownFileListFromVDSM ( storagePoolId , storageDomainId ) ; default : org.ovirt.engine.core.bll.IsoDomainListSyncronizer.log.warn ( "Refreshing Iso domain using unsupported imageType: {}" , imageType ) ; return false ; } }