auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void edit ( org.ovirt.engine.ui.uicommonweb.models.hosts.MultipleHostsModel object ) { hostsTable.asEditor ( ) . edit ( object.getHosts ( ) ) ; driver.edit ( object ) ; applyPasswordButton.setCommand ( object.getApplyPasswordCommand ( ) ) ; }

Target:
public void edit ( final org.ovirt.engine.ui.uicommonweb.models.hosts.MultipleHostsModel object ) { hostsTable.asEditor ( ) . edit ( object.getHosts ( ) ) ; driver.edit ( object ) ; applyPasswordButton.setCommand ( object.getApplyPasswordCommand ( ) ) ; configureFirewallEditor.asCheckBox ( ) . setChecked ( true ) ; configureFirewallEditor.asCheckBox ( ) . addClickListener ( new com.google.gwt.user.client.ui.ClickListener ( ) { @ java.lang.Override public void onClick ( com.google.gwt.user.client.ui.Widget sender ) { object.setConfigureFirewall ( configureFirewallEditor.asCheckBox ( ) . isChecked ( ) ) ; } } ) ; }
Source:
protected void perform ( ) { org.ovirt.engine.core.compat.Guid dumpDiskId = createMemoryDumpDisk ( ) ; org.ovirt.engine.core.compat.Guid metadataDiskId = createMemoryMetadataDisk ( ) ; org.ovirt.engine.core.common.businessentities.DiskImage dumpDisk = getDisk ( dumpDiskId ) ; org.ovirt.engine.core.common.businessentities.DiskImage metadataDisk = getDisk ( metadataDiskId ) ; org.ovirt.engine.core.bll.HibernateVmCommand.getSnapshotDAO ( ) . updateHibernationMemory ( org.ovirt.engine.core.bll.HibernateVmCommand.getVmId ( ) , org.ovirt.engine.core.bll.memory.MemoryUtils.createMemoryStateString ( getStorageDomainId ( ) , org.ovirt.engine.core.bll.HibernateVmCommand.getStoragePoolId ( ) , dumpDisk.getId ( ) , dumpDisk.getImageId ( ) , metadataDisk.getId ( ) , metadataDisk.getImageId ( ) ) ) ; org.ovirt.engine.core.bll.HibernateVmCommand.setSucceeded ( true ) ; }

Target:
private void addDisk ( org.ovirt.engine.core.common.businessentities.storage.DiskImage disk ) { org.ovirt.engine.core.common.action.VdcReturnValueBase returnValue = runInternalActionWithTasksContext ( VdcActionType.AddDisk , buildAddDiskParameters ( disk ) ) ; if ( ! ( returnValue.getSucceeded ( ) ) ) { throw new org.ovirt.engine.core.common.errors.EngineException ( returnValue.getFault ( ) . getError ( ) , java.lang.String.format ( "Failed to create disk! %s" , disk.getDiskAlias ( ) ) ) ; } org.ovirt.engine.core.bll.HibernateVmCommand.getTaskIdList ( ) . addAll ( returnValue.getInternalVdsmTaskIdList ( ) ) ; }
Source:
public org.ovirt.engine.core.common.queries.VdcQueryReturnValue runQuery ( org.ovirt.engine.core.common.queries.VdcQueryType search , org.ovirt.engine.core.common.queries.VdcQueryParametersBase searchParameters ) { org.ovirt.engine.ui.frontend.server.gwt.GenericApiGWTServiceImpl.log.debug ( "Server: RunQuery invoked!" ) ; debugQuery ( search , searchParameters ) ; searchParameters.setSessionId ( getEngineSessionId ( ) ) ; if ( ( searchParameters.getCorrelationId ( ) ) == null ) { searchParameters.setCorrelationId ( org.ovirt.engine.core.utils.CorrelationIdTracker.getCorrelationId ( ) ) ; } return getBackend ( ) . runQuery ( search , searchParameters ) ; }

Target:
public org.ovirt.engine.core.common.queries.VdcQueryReturnValue runQuery ( org.ovirt.engine.core.common.queries.QueryType search , org.ovirt.engine.core.common.queries.VdcQueryParametersBase searchParameters ) { org.ovirt.engine.ui.frontend.server.gwt.GenericApiGWTServiceImpl.log.debug ( "Server: RunQuery invoked!" ) ; debugQuery ( search , searchParameters ) ; searchParameters.setSessionId ( getEngineSessionId ( ) ) ; if ( ( searchParameters.getCorrelationId ( ) ) == null ) { searchParameters.setCorrelationId ( org.ovirt.engine.core.utils.CorrelationIdTracker.getCorrelationId ( ) ) ; } return getBackend ( ) . runQuery ( search , searchParameters ) ; }
Source:
private java.util.Map.Entry < java.lang.String , java.lang.String > getTimezoneEntryByKey ( java.lang.String key , java.lang.Iterable < java.util.Map.Entry < java.lang.String , java.lang.String > > timeZones ) { if ( key == null ) { return null ; } for ( java.util.Map.Entry < java.lang.String , java.lang.String > entry : timeZones ) { if ( key.equals ( entry.getKey ( ) ) ) { return entry ; } } return null ; }

Target:
private java.util.Map.Entry < java.lang.String , java.lang.String > getTimezoneEntryByKey ( java.lang.String key , java.lang.Iterable < java.util.Map.Entry < java.lang.String , java.lang.String > > timeZones ) { for ( java.util.Map.Entry < java.lang.String , java.lang.String > entry : timeZones ) { if ( org.ovirt.engine.core.compat.StringHelper.stringsEqual ( key , entry.getKey ( ) ) ) { return entry ; } } return null ; }
Source:
public void getFCStorageTypeForLun ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.LUNs lun = new org.ovirt.engine.core.common.businessentities.LUNs ( ) ; java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageServerConnections > connections = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageServerConnections > ( ) ; lun.setLunConnections ( connections ) ; org.ovirt.engine.core.common.businessentities.StorageType storageType = command.getLUNStorageType ( lun ) ; org.junit.Assert.assertEquals ( "Lun disk should be of FC storage type since it does not had connections" , StorageType.FCP , storageType ) ; }

Target:
public void getFCStorageTypeForLun ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.storage.LUNs lun = new org.ovirt.engine.core.common.businessentities.storage.LUNs ( ) ; java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageServerConnections > connections = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageServerConnections > ( ) ; lun.setLunConnections ( connections ) ; org.ovirt.engine.core.common.businessentities.storage.StorageType storageType = command.getLUNStorageType ( lun ) ; org.junit.Assert.assertEquals ( "Lun disk should be of FC storage type since it does not had connections" , StorageType.FCP , storageType ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.BusinessEntityMap < org.ovirt.engine.core.common.businessentities.network.Network > getNetworkBusinessEntityMap ( ) { if ( ( networkBusinessEntityMap ) == null ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.Network > networks = org.ovirt.engine.core.bll.network.host.HostSetupNetworksCommand.getNetworkDAO ( ) . getAllForCluster ( org.ovirt.engine.core.bll.network.host.HostSetupNetworksCommand.getVdsGroupId ( ) ) ; networkBusinessEntityMap = new org.ovirt.engine.core.common.businessentities.BusinessEntityMap ( networks ) ; } return networkBusinessEntityMap ; }

Target:
private org.ovirt.engine.core.common.businessentities.BusinessEntityMap < org.ovirt.engine.core.common.businessentities.network.Network > getNetworkBusinessEntityMap ( ) { if ( ( networkBusinessEntityMap ) == null ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.Network > networks = org.ovirt.engine.core.bll.network.host.HostSetupNetworksCommand.getNetworkDao ( ) . getAllForCluster ( org.ovirt.engine.core.bll.network.host.HostSetupNetworksCommand.getVdsGroupId ( ) ) ; networkBusinessEntityMap = new org.ovirt.engine.core.common.businessentities.BusinessEntityMap ( networks ) ; } return networkBusinessEntityMap ; }
Source:
protected boolean checkTemplateImages ( java.util.List < java.lang.String > reasons ) { return true ; }

Target:
protected void lockEntities ( ) { org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInNewTransaction ( new org.ovirt.engine.core.utils.transaction.TransactionMethod < java.lang.Void > ( ) { @ java.lang.Override public java.lang.Void runInTransaction ( ) { getCompensationContext ( ) . snapshotEntityStatus ( getSnapshot ( ) ) ; getSnapshotDao ( ) . updateStatus ( sourceSnapshotId , SnapshotStatus.LOCKED ) ; lockVmWithCompensationIfNeeded ( ) ; getCompensationContext ( ) . stateChanged ( ) ; return null ; } } ) ; org.ovirt.engine.core.bll.AddVmFromSnapshotCommand.freeLock ( ) ; }
Source:
public void getClusterById ( 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 ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVdsGroupById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }

Target:
public void getClusterById ( 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 ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetClusterById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }
Source:
private org.ovirt.engine.core.common.action.RemoveSnapshotSingleDiskLiveStep getInitialMergeStepForImage ( org.ovirt.engine.core.compat.Guid imageId ) { org.ovirt.engine.core.common.businessentities.Image image = org.ovirt.engine.core.bll.RemoveSnapshotSingleDiskLiveCommand.getImageDao ( ) . get ( imageId ) ; if ( ( ( image.getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.ImageStatus.ILLEGAL ) ) && ( image.getParentId ( ) . equals ( Guid.Empty ) ) ) { java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > children = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getDiskImageDao ( ) . getAllSnapshotsForParent ( imageId ) ; if ( children.isEmpty ( ) ) { org.ovirt.engine.core.bll.RemoveSnapshotSingleDiskLiveCommand.log.info ( "Image has been previously merged, proceeding with deletion" ) ; return org.ovirt.engine.core.common.action.RemoveSnapshotSingleDiskLiveStep.DESTROY_IMAGE ; } } return org.ovirt.engine.core.common.action.RemoveSnapshotSingleDiskLiveStep.MERGE ; }

Target:
private org.ovirt.engine.core.common.action.RemoveSnapshotSingleDiskLiveStep getInitialMergeStepForImage ( org.ovirt.engine.core.compat.Guid imageId ) { org.ovirt.engine.core.common.businessentities.Image image = org.ovirt.engine.core.bll.RemoveSnapshotSingleDiskLiveCommand.getImageDao ( ) . get ( imageId ) ; if ( ( ( image.getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.ImageStatus.ILLEGAL ) ) && ( image.getParentId ( ) . equals ( Guid.Empty ) ) ) { java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > children = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getDiskImageDao ( ) . getAllSnapshotsForParent ( imageId ) ; if ( children.isEmpty ( ) ) { org.ovirt.engine.core.bll.RemoveSnapshotSingleDiskLiveCommand.log.info ( "Image has been previously merged, proceeding with deletion" ) ; return org.ovirt.engine.core.common.action.RemoveSnapshotSingleDiskLiveStep.DESTROY_IMAGE ; } } return org.ovirt.engine.core.common.action.RemoveSnapshotSingleDiskLiveStep.EXTEND ; }
Source:
public static void LockVm ( final org.ovirt.engine.core.common.businessentities.VmDynamic vm , final org.ovirt.engine.core.bll.context.CompensationContext compensationContext ) { org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInNewTransaction ( new org.ovirt.engine.core.utils.transaction.TransactionMethod < java.lang.Void > ( ) { @ java.lang.Override public java.lang.Void runInTransaction ( ) { compensationContext.snapshotEntityStatus ( vm ) ; org.ovirt.engine.core.bll.VmHandler.LockVm ( vm.getId ( ) ) ; compensationContext.stateChanged ( ) ; return null ; } } ) ; }

Target:
public static void lockVm ( final org.ovirt.engine.core.common.businessentities.VmDynamic vm , final org.ovirt.engine.core.bll.context.CompensationContext compensationContext ) { org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInNewTransaction ( new org.ovirt.engine.core.utils.transaction.TransactionMethod < java.lang.Void > ( ) { @ java.lang.Override public java.lang.Void runInTransaction ( ) { compensationContext.snapshotEntityStatus ( vm ) ; org.ovirt.engine.core.bll.VmHandler.lockVm ( vm.getId ( ) ) ; compensationContext.stateChanged ( ) ; return null ; } } ) ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { org.ovirt.engine.core.common.queries.VdcQueryReturnValue queryRetVal = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) ; java.lang.String signature = ( ( java.lang.String ) ( queryRetVal.getReturnValue ( ) ) ) ; setConnectionTicket ( signature ) ; invokeClientNative ( ) ; }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { org.ovirt.engine.core.common.queries.VdcQueryReturnValue queryRetVal = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) ; java.lang.String signature = ( ( java.lang.String ) ( queryRetVal.getReturnValue ( ) ) ) ; org.ovirt.engine.ui.common.uicommon.WebClientConsoleInvoker invoker = new org.ovirt.engine.ui.common.uicommon.WebClientConsoleInvoker ( signature , getTicket ( ) , getClientUrl ( ) ) ; invoker.invokeClientNative ( ) ; }
Source:
protected static org.ovirt.engine.core.common.businessentities.storage.ImageStatus mapCinderVolumeStatusToImageStatus ( org.ovirt.engine.core.common.businessentities.storage.CinderVolumeStatus cinderVolumeStatus ) { switch ( cinderVolumeStatus ) { case Available : return org.ovirt.engine.core.common.businessentities.storage.ImageStatus.OK ; case Creating : case Deleting : case Extending : return org.ovirt.engine.core.common.businessentities.storage.ImageStatus.LOCKED ; case Error : case ErrorDeleting : return org.ovirt.engine.core.common.businessentities.storage.ImageStatus.ILLEGAL ; default : return null ; } }

Target:
protected static org.ovirt.engine.core.common.businessentities.storage.ImageStatus mapCinderVolumeStatusToImageStatus ( org.ovirt.engine.core.common.businessentities.storage.CinderVolumeStatus cinderVolumeStatus ) { switch ( cinderVolumeStatus ) { case Available : return org.ovirt.engine.core.common.businessentities.storage.ImageStatus.OK ; case Creating : case Deleting : case Extending : return org.ovirt.engine.core.common.businessentities.storage.ImageStatus.LOCKED ; case Error : case ErrorDeleting : case ErrorExtending : return org.ovirt.engine.core.common.businessentities.storage.ImageStatus.ILLEGAL ; default : return null ; } }
Source:
protected boolean isOsSupportingHotPlug ( ) { int vmOs = org.ovirt.engine.core.bll.VmCommand.getVm ( ) . getOs ( ) ; java.lang.String [ ] unsupportedOSs = org.ovirt.engine.core.common.config.Config.< java.lang.String > GetValue ( ConfigValues.HotPlugUnsupportedOsList ) . split ( "," ) ; for ( java.lang.String os : unsupportedOSs ) { if ( os.equalsIgnoreCase ( osRepository.getOsName ( vmOs ) ) ) { addCanDoActionMessage ( VdcBllMessages.ACTION_TYPE_FAILED_GUEST_OS_VERSION_IS_NOT_SUPPORTED ) ; return false ; } } return true ; }

Target:
protected java.util.List < org.ovirt.engine.core.common.businessentities.network.VmNic > getInterfaces ( ) { if ( ( interfaces ) == null ) { interfaces = getVmNicDao ( ) . getAllForVm ( org.ovirt.engine.core.bll.VmCommand.getVmId ( ) ) ; } return interfaces ; }
Source:
protected void executeCommand ( ) { org.ovirt.engine.core.bll.memory.MemoryImageRemoverOnDataDomain memoryImageRemover = new org.ovirt.engine.core.bll.memory.MemoryImageRemoverOnDataDomain ( org.ovirt.engine.core.bll.RemoveMemoryVolumesCommand.getParameters ( ) . getVmId ( ) , this ) ; setSucceeded ( memoryImageRemover.remove ( java.util.Collections.singleton ( org.ovirt.engine.core.bll.RemoveMemoryVolumesCommand.getParameters ( ) . getMemoryVolumes ( ) ) ) ) ; }

Target:
protected void executeCommand ( ) { if ( isMemoryRemovable ( ) ) { java.util.List < org.ovirt.engine.core.compat.Guid > guids = org.ovirt.engine.core.utils.GuidUtils.getGuidListFromString ( org.ovirt.engine.core.bll.RemoveMemoryVolumesCommand.getParameters ( ) . getMemoryVolumes ( ) ) ; org.ovirt.engine.core.common.action.RemoveDiskParameters removeMemoryDumpDiskParameters = new org.ovirt.engine.core.common.action.RemoveDiskParameters ( guids.get ( 2 ) ) ; removeMemoryDumpDiskParameters.setShouldBeLogged ( false ) ; runInternalAction ( VdcActionType.RemoveDisk , removeMemoryDumpDiskParameters ) ; org.ovirt.engine.core.common.action.RemoveDiskParameters removeMemoryMetadataDiskParameters = new org.ovirt.engine.core.common.action.RemoveDiskParameters ( guids.get ( 4 ) ) ; removeMemoryMetadataDiskParameters.setShouldBeLogged ( false ) ; runInternalAction ( VdcActionType.RemoveDisk , removeMemoryMetadataDiskParameters ) ; } org.ovirt.engine.core.bll.RemoveMemoryVolumesCommand.setSucceeded ( true ) ; }
Source:
protected boolean attachUserToSession ( ) { boolean authenticated = true ; if ( ! ( org.ovirt.engine.core.compat.StringHelper.isNullOrEmpty ( org.ovirt.engine.core.bll.LoginBaseCommand.getParameters ( ) . getSessionId ( ) ) ) ) { org.ovirt.engine.core.bll.session.SessionDataContainer.getInstance ( ) . setUser ( org.ovirt.engine.core.bll.LoginBaseCommand.getParameters ( ) . getSessionId ( ) , org.ovirt.engine.core.bll.LoginBaseCommand.getCurrentUser ( ) ) ; } else if ( ! ( org.ovirt.engine.core.bll.session.SessionDataContainer.getInstance ( ) . setUser ( org.ovirt.engine.core.bll.LoginBaseCommand.getCurrentUser ( ) ) ) ) { addCanDoActionMessage ( VdcBllMessages.USER_CANNOT_LOGIN_SESSION_MISSING ) ; authenticated = false ; } return authenticated ; }

Target:
protected boolean attachUserToSession ( ) { boolean authenticated = true ; if ( ! ( org.apache.commons.lang.StringUtils.isEmpty ( org.ovirt.engine.core.bll.LoginBaseCommand.getParameters ( ) . getSessionId ( ) ) ) ) { org.ovirt.engine.core.bll.session.SessionDataContainer.getInstance ( ) . setUser ( org.ovirt.engine.core.bll.LoginBaseCommand.getParameters ( ) . getSessionId ( ) , org.ovirt.engine.core.bll.LoginBaseCommand.getCurrentUser ( ) ) ; } else if ( ! ( org.ovirt.engine.core.bll.session.SessionDataContainer.getInstance ( ) . setUser ( org.ovirt.engine.core.bll.LoginBaseCommand.getCurrentUser ( ) ) ) ) { addCanDoActionMessage ( VdcBllMessages.USER_CANNOT_LOGIN_SESSION_MISSING ) ; authenticated = false ; } return authenticated ; }
Source:
public void edit ( org.ovirt.engine.ui.uicommonweb.models.quota.QuotaModel object ) { this . model = object ; if ( ! ( firstTime ) ) { registerHandlers ( ) ; firstTime = true ; updateSliders ( ) ; } quotaClusterTable.edit ( object.getQuotaClusters ( ) ) ; quotaStorageTable.edit ( object.getQuotaStorages ( ) ) ; driver.edit ( object ) ; }

Target:
public void edit ( org.ovirt.engine.ui.uicommonweb.models.quota.QuotaModel object ) { this . model = object ; if ( ! ( firstTime ) ) { registerHandlers ( ) ; firstTime = true ; updateSliders ( ) ; } quotaClusterTable.asEditor ( ) . edit ( object.getQuotaClusters ( ) ) ; quotaStorageTable.asEditor ( ) . edit ( object.getQuotaStorages ( ) ) ; driver.edit ( object ) ; }
Source:
public static java.util.Map < org.ovirt.engine.core.common.businessentities.StorageType , java.util.List < org.ovirt.engine.core.common.businessentities.StorageServerConnections > > filterConnectionsByStorageType ( org.ovirt.engine.core.common.businessentities.LUNs lun ) { java.util.Map < org.ovirt.engine.core.common.businessentities.StorageType , java.util.List < org.ovirt.engine.core.common.businessentities.StorageServerConnections > > storageConnectionsForStorageTypeMap = new java.util.EnumMap < org.ovirt.engine.core.common.businessentities.StorageType , java.util.List < org.ovirt.engine.core.common.businessentities.StorageServerConnections > > ( org.ovirt.engine.core.common.businessentities.StorageType.class ) ; for ( org.ovirt.engine.core.common.businessentities.StorageServerConnections lunConnections : lun.getLunConnections ( ) ) { org.ovirt.engine.core.utils.collections.MultiValueMapUtils.addToMap ( lunConnections.getstorage_type ( ) , lunConnections , storageConnectionsForStorageTypeMap ) ; } return storageConnectionsForStorageTypeMap ; }

Target:
public static java.util.Map < org.ovirt.engine.core.common.businessentities.storage.StorageType , java.util.List < org.ovirt.engine.core.common.businessentities.StorageServerConnections > > filterConnectionsByStorageType ( org.ovirt.engine.core.common.businessentities.storage.LUNs lun ) { java.util.Map < org.ovirt.engine.core.common.businessentities.storage.StorageType , java.util.List < org.ovirt.engine.core.common.businessentities.StorageServerConnections > > storageConnectionsForStorageTypeMap = new java.util.EnumMap < org.ovirt.engine.core.common.businessentities.storage.StorageType , java.util.List < org.ovirt.engine.core.common.businessentities.StorageServerConnections > > ( org.ovirt.engine.core.common.businessentities.storage.StorageType.class ) ; for ( org.ovirt.engine.core.common.businessentities.StorageServerConnections lunConnections : lun.getLunConnections ( ) ) { org.ovirt.engine.core.utils.collections.MultiValueMapUtils.addToMap ( lunConnections.getstorage_type ( ) , lunConnections , storageConnectionsForStorageTypeMap ) ; } return storageConnectionsForStorageTypeMap ; }
Source:
protected void setUpQueryExpectations ( java.lang.String query , java.lang.Object failure ) throws java.lang.Exception { assertEquals ( "" , query ) ; setUpEntityQueryExpectations ( QueryType.GetRoleActionGroupsByRoleId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ 1 ] } , org.ovirt.engine.api.restapi.resource.BackendPermitsResourceTest.setUpActionGroups ( ) , failure ) ; }

Target:
protected void setUpQueryExpectations ( java.lang.String query , java.lang.Object failure ) throws java.lang.Exception { org.junit.Assert.assertEquals ( "" , query ) ; setUpEntityQueryExpectations ( QueryType.GetRoleActionGroupsByRoleId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ 1 ] } , org.ovirt.engine.api.restapi.resource.BackendPermitsResourceTest.setUpActionGroups ( ) , failure ) ; }
Source:
public void testNonExistingStorageDomain ( ) { org.mockito.Mockito.when ( command.getStorageDomainStaticDAO ( ) . get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( null ) ; org.mockito.Mockito.doReturn ( null ) . when ( command ) . executeHSMGetStorageDomainInfo ( org.mockito.Matchers.any ( org.ovirt.engine.core.common.vdscommands.HSMGetStorageDomainInfoVDSCommandParameters.class ) ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( command , VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_DOMAIN_NOT_EXIST ) ; }

Target:
public void testNonExistingStorageDomain ( ) { org.mockito.Mockito.when ( command.getStorageDomainStaticDao ( ) . get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( null ) ; org.mockito.Mockito.doReturn ( null ) . when ( command ) . executeHSMGetStorageDomainInfo ( org.mockito.Matchers.any ( org.ovirt.engine.core.common.vdscommands.HSMGetStorageDomainInfoVDSCommandParameters.class ) ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( command , VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_DOMAIN_NOT_EXIST ) ; }
Source:
public void externalVMWhenMissingInDb ( org.ovirt.engine.core.vdsbroker.monitoring.VmTestPairs data ) { initMocks ( data , false ) ; mockVmStatic ( false ) ; mockVmNotInDb ( data ) ; org.junit.Assume.assumeTrue ( ( ( data.dbVm ( ) ) == null ) ) ; org.junit.Assume.assumeTrue ( ( ( data.vdsmVm ( ) ) != null ) ) ; vmAnalyzer.analyze ( ) ; org.junit.Assert.assertTrue ( vmAnalyzer.isExternalVm ( ) ) ; }

Target:
public void externalVMWhenMissingInDb ( org.ovirt.engine.core.vdsbroker.monitoring.VmTestPairs data ) { initMocks ( data , false ) ; mockVmStatic ( false ) ; mockVmNotInDb ( data ) ; org.junit.Assume.assumeTrue ( ( ( data.dbVm ( ) ) == null ) ) ; org.junit.Assume.assumeTrue ( ( ( data.vdsmVm ( ) ) != null ) ) ; vmAnalyzer.analyze ( ) ; org.junit.Assert.assertTrue ( vmAnalyzer.isUnmanagedVm ( ) ) ; }
Source:
protected org.ovirt.engine.ui.common.uicommon.WebsocketProxyConfig getConfig ( ) { if ( ( config ) == null ) { config = new org.ovirt.engine.ui.common.uicommon.WebsocketProxyConfig ( ( ( java.lang.String ) ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getConfigValuePreConverted ( ConfigurationValues.WebSocketProxy ) ) ) , getOptions ( ) . getHost ( ) ) ; } return config ; }

Target:
protected org.ovirt.engine.ui.common.uicommon.WebsocketProxyConfig getConfig ( ) { if ( ( config ) == null ) { config = new org.ovirt.engine.ui.common.uicommon.WebsocketProxyConfig ( ( ( java.lang.String ) ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getConfigValuePreConverted ( ConfigValues.WebSocketProxy ) ) ) , getOptions ( ) . getHost ( ) ) ; } return config ; }
Source:
public boolean RunForSingleConnectionInHost ( org.ovirt.engine.core.common.businessentities.storage_domains storageDomain , org.ovirt.engine.core.compat.Guid storagePoolId , int type ) { boolean returnValue = false ; org.ovirt.engine.core.common.businessentities.storage_pool pool = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStoragePoolDAO ( ) . get ( storagePoolId ) ; org.ovirt.engine.core.compat.Guid vdsId = ( ( pool.getspm_vds_id ( ) ) != null ) ? pool.getspm_vds_id ( ) . getValue ( ) : org.ovirt.engine.core.compat.Guid.Empty ; if ( ! ( vdsId.equals ( Guid.Empty ) ) ) { returnValue = RunConnectionStorageToDomain ( storageDomain , vdsId , type ) ; } return returnValue ; }

Target:
public boolean RunForSingleConnectionInHost ( org.ovirt.engine.core.common.businessentities.storage_domains storageDomain , org.ovirt.engine.core.compat.Guid storagePoolId , int type ) { boolean returnValue = false ; org.ovirt.engine.core.common.businessentities.storage_pool pool = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStoragePoolDao ( ) . get ( storagePoolId ) ; org.ovirt.engine.core.compat.Guid vdsId = ( ( pool.getspm_vds_id ( ) ) != null ) ? pool.getspm_vds_id ( ) . getValue ( ) : org.ovirt.engine.core.compat.Guid.Empty ; if ( ! ( vdsId.equals ( Guid.Empty ) ) ) { returnValue = RunConnectionStorageToDomain ( storageDomain , vdsId , type ) ; } return returnValue ; }
Source:
public static void GetSANWipeAfterDelete ( 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 ) ) . booleanValue ( ) : false ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.SANWipeAfterDelete , org.ovirt.engine.core.common.config.Config.DefaultConfigurationVersion ) , aQuery ) ; }

Target:
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 ) ; }
Source:
protected void verifyModel ( org.ovirt.engine.api.model.KatelloErratum model , int index ) { assertEquals ( GUIDS [ index ] . toString ( ) , org.ovirt.engine.api.restapi.utils.HexUtils.hex2string ( model.getId ( ) ) ) ; assertEquals ( DESCRIPTIONS [ index ] , model.getDescription ( ) ) ; verifyLinks ( model ) ; }

Target:
protected void verifyModel ( org.ovirt.engine.api.model.KatelloErratum model , int index ) { org.junit.Assert.assertEquals ( GUIDS [ index ] . toString ( ) , org.ovirt.engine.api.restapi.utils.HexUtils.hex2string ( model.getId ( ) ) ) ; org.junit.Assert.assertEquals ( DESCRIPTIONS [ index ] , model.getDescription ( ) ) ; verifyLinks ( model ) ; }
Source:
public void testGetLunsToUpdateInDbSameLunIdDiffPvId ( ) { org.ovirt.engine.core.compat.Guid lunId = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; java.util.List < org.ovirt.engine.core.common.businessentities.storage.LUNs > existingLunsToUpdateInDb = getLunsToUpdateInDb ( lunId , lunId , org.ovirt.engine.core.compat.Guid.newGuid ( ) , org.ovirt.engine.core.compat.Guid.newGuid ( ) ) . get ( command.updateExistingLuns ) ; assertLunIdInList ( existingLunsToUpdateInDb , lunId ) ; }

Target:
public void testGetLunsToUpdateInDbSameLunIdDiffPvId ( ) { org.ovirt.engine.core.compat.Guid lunId = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; java.util.List < org.ovirt.engine.core.common.businessentities.storage.LUNs > existingLunsToUpdateInDb = getLunsToUpdateInDb ( lunId , lunId , org.ovirt.engine.core.compat.Guid.newGuid ( ) , org.ovirt.engine.core.compat.Guid.newGuid ( ) ) . get ( command.updateLunsHandler ) ; assertLunIdInList ( existingLunsToUpdateInDb , lunId ) ; }
Source:
public void testGet ( ) { org.ovirt.engine.core.common.businessentities.VdsNetworkInterface result = dao.get ( existingVdsInterface.getId ( ) ) ; org.junit.Assert.assertEquals ( existingVdsInterface , result ) ; }

Target:
public void testGet ( ) { newVdsInterface.setVdsId ( org.ovirt.engine.core.dao.InterfaceDAOTest.VDS_ID ) ; dao.saveInterfaceForVds ( newVdsInterface ) ; dao.saveStatisticsForVds ( newVdsInterface.getStatistics ( ) ) ; org.ovirt.engine.core.common.businessentities.VdsNetworkInterface result = dao.get ( newVdsInterface.getId ( ) ) ; org.junit.Assert.assertEquals ( newVdsInterface , result ) ; }
Source:
protected void endSuccessfully ( ) { endRemoveCinderDisk ( org.ovirt.engine.core.bll.storage.RemoveCinderDiskCommand.getParameters ( ) . getRemovedVolume ( ) ) ; }

Target:
protected void removeDiskFromDbCallBack ( final org.ovirt.engine.core.common.businessentities.storage.CinderDisk cinderVolume ) { final org.ovirt.engine.core.common.businessentities.Snapshot updated = getSnapshotWithoutCinderVolume ( cinderVolume ) ; org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInScope ( TransactionScopeOption.Required , new org.ovirt.engine.core.utils.transaction.TransactionMethod < java.lang.Object > ( ) { @ java.lang.Override public java.lang.Object runInTransaction ( ) { removeDiskFromDb ( cinderVolume , updated ) ; return null ; } } ) ; }
Source:
protected void updateHostPinning ( org.ovirt.engine.core.common.businessentities.MigrationSupport migrationSupport ) { getModel ( ) . getMigrationMode ( ) . setSelectedItem ( migrationSupport ) ; }

Target:
private void setSelectedOSTypeById ( int osId ) { for ( java.lang.Integer osIdList : getModel ( ) . getOSType ( ) . getItems ( ) ) { if ( ( osIdList.intValue ( ) ) == osId ) { getModel ( ) . getOSType ( ) . setSelectedItem ( osIdList ) ; break ; } } }
Source:
private void fetchImageTemplates ( ) { if ( ( imageTemplates ) == null ) { imageTemplates = org.ovirt.engine.core.bll.ImagesHandler.filterImageDisks ( org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getDiskDao ( ) . getAllForVm ( org.ovirt.engine.core.bll.RemoveVmTemplateCommand.getVmTemplateId ( ) ) , false , false , true ) ; } }

Target:
private void fetchImageTemplates ( ) { if ( ( imageTemplates ) == null ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.Disk > allImages = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getDiskDao ( ) . getAllForVm ( org.ovirt.engine.core.bll.RemoveVmTemplateCommand.getVmTemplateId ( ) ) ; imageTemplates = org.ovirt.engine.core.bll.ImagesHandler.filterImageDisks ( allImages , false , false , true ) ; imageTemplates.addAll ( org.ovirt.engine.core.bll.ImagesHandler.filterDisksBasedOnCinder ( allImages , true ) ) ; } }
Source:
public void testGetVmNumaNodeInfoByClusterId ( ) { org.ovirt.engine.core.compat.Guid clusterId = new org.ovirt.engine.core.compat.Guid ( "b399944a-81ab-4ec5-8266-e19ba7c3c9d1" ) ; java.util.List < org.ovirt.engine.core.common.utils.Pair < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.VmNumaNode > > result = vmNumaNodeDao.getVmNumaNodeInfoByClusterId ( clusterId ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertEquals ( 2 , result.size ( ) ) ; }

Target:
public void testGetVmNumaNodeInfoByBdsGroupId ( ) { org.ovirt.engine.core.compat.Guid vdsGroupId = new org.ovirt.engine.core.compat.Guid ( "b399944a-81ab-4ec5-8266-e19ba7c3c9d1" ) ; org.ovirt.engine.core.compat.Guid vmId = org.ovirt.engine.core.compat.Guid.createGuidFromString ( "77296e00-0cad-4e5a-9299-008a7b6f4354" ) ; java.util.Map < org.ovirt.engine.core.compat.Guid , java.util.List < org.ovirt.engine.core.common.businessentities.VmNumaNode > > result = vmNumaNodeDao.getVmNumaNodeInfoByClusterId ( vdsGroupId ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertEquals ( 1 , result.size ( ) ) ; org.junit.Assert.assertEquals ( 2 , result.get ( vmId ) . size ( ) ) ; }
Source:
private void memSize_EntityChanged ( java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { behavior.updateMinAllocatedMemory ( ) ; if ( ( getMemSize ( ) . getEntity ( ) ) != null ) { setNumaChanged ( true ) ; maxMemorySize.setEntity ( ( ( getMemSize ( ) . getEntity ( ) ) * ( org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel.DEFAULT_MAX_MEMORY_RATIO ) ) ) ; } }

Target:
private void memSize_EntityChanged ( java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { behavior.updateMinAllocatedMemory ( ) ; if ( ( getMemSize ( ) . getEntity ( ) ) != null ) { setNumaChanged ( true ) ; maxMemorySize.setEntity ( org.ovirt.engine.core.common.utils.VmCommonUtils.getMaxMemorySizeDefault ( getMemSize ( ) . getEntity ( ) ) ) ; } }
Source:
protected void handleAutoLogin ( org.ovirt.engine.ui.common.auth.AutoLoginData autoLoginData ) { final org.ovirt.engine.core.common.users.VdcUser vdcUser = autoLoginData.getVdcUser ( ) ; frontend.setLoggedInUser ( vdcUser ) ; com.google.gwt.core.client.Scheduler.get ( ) . scheduleDeferred ( new com.google.gwt.core.client.Scheduler.ScheduledCommand ( ) { @ java.lang.Override public void execute ( ) { lockInteractionManager.showLoadingIndicator ( ) ; getLoginModel ( ) . autoLogin ( vdcUser ) ; } } ) ; user.setAutoLogin ( true ) ; }

Target:
protected void handleAutoLogin ( org.ovirt.engine.ui.common.auth.AutoLoginData autoLoginData ) { final org.ovirt.engine.core.common.businessentities.DbUser loggedUser = autoLoginData.getDbUser ( ) ; com.google.gwt.core.client.Scheduler.get ( ) . scheduleDeferred ( new com.google.gwt.core.client.Scheduler.ScheduledCommand ( ) { @ java.lang.Override public void execute ( ) { lockInteractionManager.showLoadingIndicator ( ) ; getLoginModel ( ) . autoLogin ( loggedUser ) ; } } ) ; user.setAutoLogin ( true ) ; }
Source:
protected void updateSgIoUnfilteredChangeability ( ) { if ( ! ( getIsScsiPassthrough ( ) . getEntity ( ) ) ) { getIsSgIoUnfiltered ( ) . setChangeProhibitionReason ( org.ovirt.engine.ui.uicommonweb.models.vms.AbstractDiskModel.constants.cannotEnableSgioWhenScsiPassthroughDisabled ( ) ) ; getIsSgIoUnfiltered ( ) . setIsChangable ( false ) ; getIsSgIoUnfiltered ( ) . setEntity ( false ) ; return ; } getIsSgIoUnfiltered ( ) . setIsChangable ( isEditEnabled ( ) ) ; }

Target:
protected void updateSgIoUnfilteredChangeability ( ) { if ( ! ( getIsScsiPassthrough ( ) . getEntity ( ) ) ) { getIsSgIoUnfiltered ( ) . setChangeProhibitionReason ( org.ovirt.engine.ui.uicommonweb.models.vms.AbstractDiskModel.constants.cannotEnableSgioWhenScsiPassthroughDisabled ( ) ) ; getIsSgIoUnfiltered ( ) . setIsChangeable ( false ) ; getIsSgIoUnfiltered ( ) . setEntity ( false ) ; return ; } getIsSgIoUnfiltered ( ) . setIsChangeable ( isEditEnabled ( ) ) ; }
Source:
public void testDiskAttachedToAnyVM ( ) { org.mockito.Mockito.when ( vmDao.getVmsListForDisk ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) , org.mockito.Matchers.anyBoolean ( ) ) ) . thenReturn ( java.util.Collections.emptyList ( ) ) ; org.junit.Assert.assertThat ( validator.isDiskAttachedToAnyVm ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }

Target:
public void testDiskAttachedToVMFail ( ) { org.ovirt.engine.core.common.businessentities.VM vm = org.ovirt.engine.core.bll.validator.storage.DiskValidatorTest.createVM ( ) ; org.mockito.Mockito.when ( vmDao.getVmsListForDisk ( org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.compat.Guid.class ) , org.mockito.ArgumentMatchers.anyBoolean ( ) ) ) . thenReturn ( java.util.Collections.emptyList ( ) ) ; org.junit.Assert.assertThat ( validator.isDiskAttachedToVm ( vm ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.ACTION_TYPE_FAILED_DISK_NOT_ATTACHED_TO_VM ) ) ; }
Source:
public static java.lang.Integer getEffectiveCpuCores ( org.ovirt.engine.core.common.businessentities.VDS vds ) { org.ovirt.engine.core.common.businessentities.VDSGroup vdsGroup = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVdsGroupDao ( ) . get ( vds.getVdsGroupId ( ) ) ; if ( ( ( ( vds.getCpuThreads ( ) ) != null ) && ( vdsGroup != null ) ) && ( java.lang.Boolean.TRUE.equals ( vdsGroup.getCountThreadsAsCores ( ) ) ) ) { return vds.getCpuThreads ( ) ; } else { return vds.getCpuCores ( ) ; } }

Target:
public static java.lang.Integer getEffectiveCpuCores ( org.ovirt.engine.core.common.businessentities.VDS vds ) { org.ovirt.engine.core.common.businessentities.VDSGroup vdsGroup = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVdsGroupDao ( ) . get ( vds.getVdsGroupId ( ) ) ; return org.ovirt.engine.core.bll.scheduling.SlaValidator.getEffectiveCpuCores ( vds , ( vdsGroup != null ? vdsGroup.getCountThreadsAsCores ( ) : false ) ) ; }
Source:
public void setItems ( java.lang.Iterable value ) { if ( ( items ) != value ) { itemsChanging ( value , items ) ; items = value ; itemsChanged ( ) ; getItemsChangedEvent ( ) . raise ( this , EventArgs.EMPTY ) ; onPropertyChanged ( new org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ( "Items" ) ) ; } }

Target:
public void setItems ( java.util.Collection value ) { if ( ( items ) != value ) { itemsChanging ( value , items ) ; items = value ; itemsChanged ( ) ; getItemsChangedEvent ( ) . raise ( this , EventArgs.EMPTY ) ; onPropertyChanged ( new org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ( "Items" ) ) ; } }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc snapshot ( java.lang.String vmId , java.util.Map < java.lang.String , java.lang.String > [ ] snapParams ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.snapshot ( vmId , snapParams ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc snapshot ( java.lang.String vmId , java.util.Map < java.lang.String , java.lang.String > [ ] disks ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.snapshot ( vmId , disks ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
Source:
private void executeNotRespondingTreatment ( java.util.List < org.ovirt.engine.core.common.businessentities.VDS > hosts ) { for ( org.ovirt.engine.core.common.businessentities.VDS host : hosts ) { final org.ovirt.engine.core.common.action.FenceVdsActionParameters params = new org.ovirt.engine.core.common.action.FenceVdsActionParameters ( host.getId ( ) , org.ovirt.engine.core.common.businessentities.FenceActionType.Restart ) ; org.ovirt.engine.core.utils.threadpool.ThreadPoolUtil.execute ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { org.ovirt.engine.core.bll.Backend.getInstance ( ) . runInternalAction ( VdcActionType.VdsNotRespondingTreatment , params , org.ovirt.engine.core.bll.job.ExecutionHandler.createInternalJobContext ( ) ) ; } } ) ; } }

Target:
private void executeNotRespondingTreatment ( java.util.List < org.ovirt.engine.core.common.businessentities.VDS > hosts ) { for ( org.ovirt.engine.core.common.businessentities.VDS host : hosts ) { final org.ovirt.engine.core.common.action.FenceVdsActionParameters params = new org.ovirt.engine.core.common.action.FenceVdsActionParameters ( host.getId ( ) , org.ovirt.engine.core.common.businessentities.pm.FenceActionType.RESTART ) ; org.ovirt.engine.core.utils.threadpool.ThreadPoolUtil.execute ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { org.ovirt.engine.core.bll.Backend.getInstance ( ) . runInternalAction ( VdcActionType.VdsNotRespondingTreatment , params , org.ovirt.engine.core.bll.job.ExecutionHandler.createInternalJobContext ( ) ) ; } } ) ; } }
Source:
public void testRemoveByRemoveIsoDomain ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.RepoImage > listOfRepoFiles = repoFileMetaDataDao.getRepoListForStorageDomain ( FixturesTool.SHARED_ISO_STORAGE_DOAMIN_FOR_SP2_AND_SP3 , ImageFileType.ISO ) ; org.junit.Assert.assertNotNull ( listOfRepoFiles ) ; org.junit.Assert.assertFalse ( listOfRepoFiles.isEmpty ( ) ) ; org.ovirt.engine.core.dao.StorageDomainDao storageDomainDao = dbFacade.getStorageDomainDao ( ) ; storageDomainDao.remove ( FixturesTool.SHARED_ISO_STORAGE_DOAMIN_FOR_SP2_AND_SP3 ) ; listOfRepoFiles = getActiveIsoDomain ( ) ; org.junit.Assert.assertNotNull ( listOfRepoFiles ) ; org.junit.Assert.assertTrue ( listOfRepoFiles.isEmpty ( ) ) ; }

Target:
public void testRemoveByRemoveIsoDomain ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.RepoImage > listOfRepoFiles = repoFileMetaDataDao.getRepoListForStorageDomain ( FixturesTool.SHARED_ISO_STORAGE_DOMAIN_FOR_SP2_AND_SP3 , ImageFileType.ISO ) ; org.junit.Assert.assertNotNull ( listOfRepoFiles ) ; org.junit.Assert.assertFalse ( listOfRepoFiles.isEmpty ( ) ) ; org.ovirt.engine.core.dao.StorageDomainDao storageDomainDao = dbFacade.getStorageDomainDao ( ) ; storageDomainDao.remove ( FixturesTool.SHARED_ISO_STORAGE_DOMAIN_FOR_SP2_AND_SP3 ) ; listOfRepoFiles = getActiveIsoDomain ( ) ; org.junit.Assert.assertNotNull ( listOfRepoFiles ) ; org.junit.Assert.assertTrue ( listOfRepoFiles.isEmpty ( ) ) ; }
Source:
public void getLunsByVgId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String vgId , org.ovirt.engine.core.compat.Guid vdsId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.LUNs > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.LUNs > ( ) ; } } ; org.ovirt.engine.core.common.queries.GetLunsByVgIdParameters params = new org.ovirt.engine.core.common.queries.GetLunsByVgIdParameters ( vgId , vdsId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetLunsByVgId , params , aQuery ) ; }

Target:
public void isTemplateNameUnique ( org.ovirt.engine.ui.frontend.AsyncQuery < java.lang.Boolean > aQuery , java.lang.String templateName , org.ovirt.engine.core.compat.Guid datacenterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.Converter < java.lang.Boolean > ( ) { @ java.lang.Override public java.lang.Boolean convert ( java.lang.Object source ) { return ( source != null ) && ( ! ( ( java.lang.Boolean ) ( source ) ) ) ; } } ; org.ovirt.engine.core.common.queries.NameQueryParameters params = new org.ovirt.engine.core.common.queries.NameQueryParameters ( templateName ) ; params.setDatacenterId ( datacenterId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.IsVmTemlateWithSameNameExist , params , aQuery ) ; }
Source:
public void update ( org.ovirt.engine.core.common.businessentities.UserProfile profile ) { getCallsHandler ( ) . executeModification ( "UpdateUserProfile" , createIdParameterMapper ( profile.getId ( ) ) . addValue ( "user_id" , profile.getUserId ( ) ) . addValue ( "ssh_public_key" , profile.getSshPublicKey ( ) ) ) ; }

Target:
public void update ( org.ovirt.engine.core.common.businessentities.UserProfile profile ) { getCallsHandler ( ) . executeModification ( "UpdateUserProfile" , createIdParameterMapper ( profile.getId ( ) ) . addValue ( "user_id" , profile.getUserId ( ) ) . addValue ( "ssh_public_key_id" , profile.getSshPublicKeyId ( ) ) . addValue ( "ssh_public_key" , profile.getSshPublicKey ( ) ) ) ; }
Source:
private int calculateValue ( org.ovirt.engine.core.common.businessentities.network.NetworkCluster networkCluster ) { int res = 0 ; if ( networkCluster != null ) { if ( networkCluster.isDisplay ( ) ) { res += 2 ; } if ( networkCluster.isMigration ( ) ) { res += 1 ; } } return res ; }

Target:
private int calculateValue ( org.ovirt.engine.core.common.businessentities.network.NetworkCluster networkCluster ) { int res = 0 ; if ( networkCluster != null ) { if ( networkCluster.isDisplay ( ) ) { res += 4 ; } if ( networkCluster.isMigration ( ) ) { res += 2 ; } if ( networkCluster.isGluster ( ) ) { res += 1 ; } } return res ; }
Source:
public java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > getAllInterfacesByLabelForCluster ( org.ovirt.engine.core.compat.Guid clusterId , java.lang.String label ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > labelledNics = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nic : getAllInterfacesByClusterId ( clusterId ) ) { if ( ( ( nic.getLabels ( ) ) != null ) && ( nic.getLabels ( ) . contains ( label ) ) ) { labelledNics.add ( nic ) ; } } return labelledNics ; }

Target:
public java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > getAllInterfacesByLabelForCluster ( org.ovirt.engine.core.compat.Guid clusterId , java.lang.String label ) { return nicsContainingLabel ( getAllInterfacesByClusterId ( clusterId ) , label ) ; }