auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public org.ovirt.engine.core.common.businessentities.StorageDomain getStorageDomain ( org.ovirt.engine.core.compat.Guid poolId , org.ovirt.engine.core.common.businessentities.StorageDomainType type , org.ovirt.engine.core.common.businessentities.StorageDomainStatus status ) { java.lang.Integer statusNum = ( status == null ) ? null : status.getValue ( ) ; return getCallsHandler ( ) . executeRead ( "Getstorage_domain_by_type_storagePoolId_and_status" , org.ovirt.engine.core.dao.StorageDomainDaoImpl.StorageDomainRowMapper.instance , getCustomMapSqlParameterSource ( ) . addValue ( "storage_pool_id" , poolId ) . addValue ( "storage_domain_type" , type.getValue ( ) ) . addValue ( "status" , statusNum ) ) ; }

Target:
public java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > getStorageDomains ( org.ovirt.engine.core.compat.Guid poolId , org.ovirt.engine.core.common.businessentities.StorageDomainType type , org.ovirt.engine.core.common.businessentities.StorageDomainStatus status ) { java.lang.Integer statusNum = ( status == null ) ? null : status.getValue ( ) ; return getCallsHandler ( ) . executeReadList ( "Getstorage_domain_by_type_storagePoolId_and_status" , org.ovirt.engine.core.dao.StorageDomainDaoImpl.StorageDomainRowMapper.instance , getCustomMapSqlParameterSource ( ) . addValue ( "storage_pool_id" , poolId ) . addValue ( "storage_domain_type" , type.getValue ( ) ) . addValue ( "status" , statusNum ) ) ; }
Source:
protected void executeCommand ( ) { org.ovirt.engine.core.common.action.VdsActionParameters parameters = new org.ovirt.engine.core.common.action.VdsActionParameters ( getVdsId ( ) ) ; org.ovirt.engine.core.common.action.VdcReturnValueBase returnValue = runInternalAction ( VdcActionType.RefreshHostCapabilities , parameters ) ; if ( ! ( returnValue.getSucceeded ( ) ) ) { return ; } returnValue = runInternalAction ( VdcActionType.RefreshHostDevices , parameters ) ; if ( ! ( returnValue.getSucceeded ( ) ) ) { return ; } setSucceeded ( true ) ; }

Target:
protected void executeCommand ( ) { org.ovirt.engine.core.common.action.VdsActionParameters parameters = new org.ovirt.engine.core.common.action.VdsActionParameters ( getVdsId ( ) ) ; parameters.setLockProperties ( org.ovirt.engine.core.common.action.LockProperties.create ( LockProperties.Scope.Execution ) . withWait ( isInternalExecution ( ) ) ) ; org.ovirt.engine.core.common.action.VdcReturnValueBase returnValue = runInternalAction ( VdcActionType.RefreshHostCapabilities , parameters ) ; if ( ! ( returnValue.getSucceeded ( ) ) ) { return ; } returnValue = runInternalAction ( VdcActionType.RefreshHostDevices , parameters ) ; if ( ! ( returnValue.getSucceeded ( ) ) ) { return ; } setSucceeded ( true ) ; }
Source:
private void initFullList ( java.util.Map < java.lang.String , java.lang.Object > ... deviceInfos ) { org.ovirt.engine.core.common.vdscommands.VDSReturnValue returnValue = new org.ovirt.engine.core.common.vdscommands.VDSReturnValue ( ) ; returnValue.setReturnValue ( new java.util.Map [ ] { getFullList ( org.ovirt.engine.core.vdsbroker.monitoring.VmDevicesMonitoringTest.VM_ID , deviceInfos ) } ) ; returnValue.setSucceeded ( true ) ; org.mockito.Mockito.doReturn ( returnValue ) . when ( resourceManager ) . runVdsCommand ( org.mockito.ArgumentMatchers.eq ( VDSCommandType.FullList ) , org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.common.vdscommands.FullListVDSCommandParameters.class ) ) ; }

Target:
private void initDumpXmls ( java.util.Map < java.lang.String , java.lang.Object > ... deviceInfos ) { org.ovirt.engine.core.common.vdscommands.VDSReturnValue returnValue = new org.ovirt.engine.core.common.vdscommands.VDSReturnValue ( ) ; returnValue.setReturnValue ( new java.util.Map [ ] { getDumpXmls ( org.ovirt.engine.core.vdsbroker.monitoring.VmDevicesMonitoringTest.VM_ID , deviceInfos ) } ) ; returnValue.setSucceeded ( true ) ; org.mockito.Mockito.doReturn ( returnValue ) . when ( resourceManager ) . runVdsCommand ( org.mockito.ArgumentMatchers.eq ( VDSCommandType.DumpXmls ) , org.mockito.ArgumentMatchers.any ( DumpXmlsVDSCommand.Params.class ) ) ; }
Source:
public void testAddStorageConnectionToIscsiBond ( ) { dao.addStorageConnectionToIscsiBond ( FixturesTool.ISCSI_BOND_ID , FixturesTool.STORAGE_CONNECTION_ID ) ; java.util.List < java.lang.String > connections = dao.getStorageConnectionIdsByIscsiBondId ( FixturesTool.ISCSI_BOND_ID ) ; org.junit.Assert.assertEquals ( 3 , connections.size ( ) ) ; org.junit.Assert.assertTrue ( connections.contains ( FixturesTool.STORAGE_CONNECTION_ID ) ) ; }

Target:
public void testAddStorageConnectionToIscsiBond ( ) { dao.addStorageConnectionToIscsiBond ( FixturesTool.ISCSI_BOND_ID , FixturesTool.STORAGE_CONNECTION_ID ) ; java.util.List < java.lang.String > connections = dao.getStorageConnectionIdsByIscsiBondId ( FixturesTool.ISCSI_BOND_ID ) ; org.junit.jupiter.api.Assertions.assertEquals ( 3 , connections.size ( ) ) ; org.junit.jupiter.api.Assertions.assertTrue ( connections.contains ( FixturesTool.STORAGE_CONNECTION_ID ) ) ; }
Source:
private void testIsManagementNetworkNameInGivenClusterCommon ( java.lang.String networkName , org.ovirt.engine.core.compat.Guid clusterId , boolean expected ) { org.mockito.Mockito.when ( mockNetworkDao.getManagementNetwork ( org.ovirt.engine.core.bll.network.cluster.ManagementNetworkUtilImplTest.TEST_CLUSTER_ID ) ) . thenReturn ( mockNetwork ) ; org.mockito.Mockito.when ( mockNetwork.getName ( ) ) . thenReturn ( org.ovirt.engine.core.bll.network.cluster.ManagementNetworkUtilImplTest.TEST_NETWORK_NAME ) ; final boolean actual = underTest.isManagementNetwork ( networkName , clusterId ) ; org.mockito.Mockito.verify ( mockNetworkDao ) . getManagementNetwork ( clusterId ) ; org.junit.Assert.assertEquals ( expected , actual ) ; }

Target:
private void testIsManagementNetworkNameInGivenClusterCommon ( java.lang.String networkName , org.ovirt.engine.core.compat.Guid clusterId , boolean expected ) { org.mockito.Mockito.when ( mockNetworkDao.getManagementNetwork ( org.ovirt.engine.core.bll.network.cluster.ManagementNetworkUtilImplTest.TEST_CLUSTER_ID ) ) . thenReturn ( mockNetwork ) ; org.mockito.Mockito.when ( mockNetwork.getName ( ) ) . thenReturn ( org.ovirt.engine.core.bll.network.cluster.ManagementNetworkUtilImplTest.TEST_NETWORK_NAME ) ; final boolean actual = underTest.isManagementNetwork ( networkName , clusterId ) ; org.mockito.Mockito.verify ( mockNetworkDao ) . getManagementNetwork ( clusterId ) ; org.junit.jupiter.api.Assertions.assertEquals ( expected , actual ) ; }
Source:
private void storeVncData ( org.ovirt.engine.ui.uicommonweb.models.HasConsoleModel model , org.ovirt.engine.ui.common.utils.ConsoleOptionsFrontendPersisterImpl.KeyMaker keyMaker ) { org.ovirt.engine.ui.uicommonweb.models.vms.VncConsoleModel consoleModel = asVncConsoleModel ( model ) ; if ( consoleModel != null ) { clientStorage.setLocalItem ( keyMaker.make ( org.ovirt.engine.ui.common.utils.ConsoleOptionsFrontendPersisterImpl.VNC_CLIENT_MODE ) , consoleModel.getClientConsoleMode ( ) . toString ( ) ) ; } }

Target:
private void storeVncData ( org.ovirt.engine.ui.uicommonweb.models.VmConsoles vmConsoles , org.ovirt.engine.ui.common.utils.ConsoleOptionsFrontendPersisterImpl.KeyMaker keyMaker ) { org.ovirt.engine.ui.uicommonweb.models.vms.VncConsoleModel consoleModel = vmConsoles.getConsoleModel ( org.ovirt.engine.ui.uicommonweb.models.vms.VncConsoleModel.class ) ; if ( consoleModel != null ) { clientStorage.setLocalItem ( keyMaker.make ( org.ovirt.engine.ui.common.utils.ConsoleOptionsFrontendPersisterImpl.VNC_CLIENT_MODE ) , consoleModel.getClientConsoleMode ( ) . toString ( ) ) ; storeBool ( keyMaker.make ( org.ovirt.engine.ui.common.utils.ConsoleOptionsFrontendPersisterImpl.REMAP_CAD_VNC ) , consoleModel.getVncImpl ( ) . isRemapCtrlAltDelete ( ) ) ; } }
Source:
public java.util.List < org.ovirt.engine.core.common.businessentities.RepoImage > getCachedIsoListByDomainId ( org.ovirt.engine.core.compat.Guid isoStorageDomainId , org.ovirt.engine.core.common.businessentities.ImageFileType imageType ) { java.util.List < org.ovirt.engine.core.common.businessentities.RepoImage > fileListMD = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.RepoImage > ( ) ; if ( isoStorageDomainId != null ) { fileListMD = repoStorageDom.getRepoListForStorageDomain ( isoStorageDomainId , imageType ) ; } return fileListMD ; }

Target:
public java.util.List < org.ovirt.engine.core.common.businessentities.storage.RepoImage > getCachedIsoListByDomainId ( org.ovirt.engine.core.compat.Guid isoStorageDomainId , org.ovirt.engine.core.common.businessentities.storage.ImageFileType imageType ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.RepoImage > fileListMD = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.RepoImage > ( ) ; if ( isoStorageDomainId != null ) { fileListMD = repoStorageDom.getRepoListForStorageDomain ( isoStorageDomainId , imageType ) ; } return fileListMD ; }
Source:
public void update ( int index , java.lang.Object model , java.lang.Boolean value ) { ( ( org.ovirt.engine.ui.uicommonweb.models.vms.ImportVmData ) ( model ) ) . getCollapseSnapshots ( ) . setEntity ( value ) ; customSelectionCellFormatType.setEnabledWithToolTip ( value , constants.importAllocationModifiedCollapse ( ) ) ; diskTable.asEditor ( ) . edit ( importModel.getImportDiskListModel ( ) ) ; }

Target:
public void update ( int index , java.lang.Object model , java.lang.Boolean value ) { ( ( org.ovirt.engine.ui.uicommonweb.models.vms.ImportVmData ) ( model ) ) . getCollapseSnapshots ( ) . setEntity ( value ) ; customSelectionCellFormatType.setEnabledWithToolTip ( value , org.ovirt.engine.ui.webadmin.section.main.view.popup.storage.backup.ImportVmFromExportDomainPopupView.constants.importAllocationModifiedCollapse ( ) ) ; diskTable.asEditor ( ) . edit ( importModel.getImportDiskListModel ( ) ) ; }
Source:
public void testRefreshUserSession ( ) { container.getData ( org.ovirt.engine.core.bll.aaa.SessionDataContainerTest.TEST_SESSION_ID , org.ovirt.engine.core.bll.aaa.SessionDataContainerTest.USER , true ) ; container.cleanExpiredUsersSessions ( ) ; java.lang.Object obj = container.getData ( org.ovirt.engine.core.bll.aaa.SessionDataContainerTest.TEST_SESSION_ID , org.ovirt.engine.core.bll.aaa.SessionDataContainerTest.USER , false ) ; org.junit.Assert.assertNotNull ( "Get should return null since the session wasn't refresh" , container.getData ( org.ovirt.engine.core.bll.aaa.SessionDataContainerTest.TEST_SESSION_ID , org.ovirt.engine.core.bll.aaa.SessionDataContainerTest.USER , false ) ) ; clearSession ( ) ; }

Target:
public void testRefreshUserSession ( ) { container.getData ( org.ovirt.engine.core.bll.aaa.SessionDataContainerTest.TEST_SESSION_ID , org.ovirt.engine.core.bll.aaa.SessionDataContainerTest.USER , true ) ; container.cleanExpiredUsersSessions ( ) ; java.lang.Object obj = container.getData ( org.ovirt.engine.core.bll.aaa.SessionDataContainerTest.TEST_SESSION_ID , org.ovirt.engine.core.bll.aaa.SessionDataContainerTest.USER , false ) ; org.junit.jupiter.api.Assertions.assertNotNull ( container.getData ( org.ovirt.engine.core.bll.aaa.SessionDataContainerTest.TEST_SESSION_ID , org.ovirt.engine.core.bll.aaa.SessionDataContainerTest.USER , false ) , "Get should return null since the session wasn't refresh" ) ; clearSession ( ) ; }
Source:
private static boolean isDiskOrInterface ( org.ovirt.engine.core.common.businessentities.VmDevice vmDevice ) { return ( org.ovirt.engine.core.common.utils.VmDeviceCommonUtils.isDisk ( vmDevice ) ) || ( ( vmDevice.getDevice ( ) . equals ( VmDeviceType.BRIDGE.getName ( ) ) ) && ( ( vmDevice.getType ( ) ) == ( org.ovirt.engine.core.common.businessentities.VmDeviceGeneralType.INTERFACE ) ) ) ; }

Target:
public static java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > getVirtioScsiControllers ( org.ovirt.engine.core.compat.Guid vmId , org.ovirt.engine.core.compat.Guid userID , boolean isFiltered ) { return org.ovirt.engine.core.bll.utils.VmDeviceUtils.dao.getVmDeviceByVmIdTypeAndDevice ( vmId , VmDeviceGeneralType.CONTROLLER , VmDeviceType.VIRTIOSCSI.getName ( ) , userID , isFiltered ) ; }
Source:
private void updateInfoPanel ( ) { org.ovirt.engine.core.common.businessentities.VmNetworkInterface vmNetworkInterface = ( ( org.ovirt.engine.core.common.businessentities.VmNetworkInterface ) ( getModel ( ) . getSelectedItem ( ) ) ) ; if ( ( vmNetworkInterface != null ) && ( ! ( getTable ( ) . getSelectionModel ( ) . isSelected ( vmNetworkInterface ) ) ) ) { getTable ( ) . getSelectionModel ( ) . setSelected ( vmNetworkInterface , true ) ; } vmInterfaceInfoPanel.updatePanel ( vmNetworkInterface ) ; }

Target:
private void updateInfoPanel ( ) { org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface vmNetworkInterface = ( ( org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface ) ( getModel ( ) . getSelectedItem ( ) ) ) ; if ( ( vmNetworkInterface != null ) && ( ! ( getTable ( ) . getSelectionModel ( ) . isSelected ( vmNetworkInterface ) ) ) ) { getTable ( ) . getSelectionModel ( ) . setSelected ( vmNetworkInterface , true ) ; } vmInterfaceInfoPanel.updatePanel ( vmNetworkInterface ) ; }
Source:
public org.ovirt.engine.core.bll.ValidationResult statusSupportedForHostInstallation ( ) { return org.ovirt.engine.core.bll.ValidationResult.failWith ( VdcBllMessages.VDS_CANNOT_INSTALL_STATUS_ILLEGAL ) . when ( ( ( ( ( ( installHost ) && ( ( oldHost.getStatus ( ) ) != ( org.ovirt.engine.core.common.businessentities.VDSStatus.Maintenance ) ) ) && ( ( oldHost.getStatus ( ) ) != ( org.ovirt.engine.core.common.businessentities.VDSStatus.NonOperational ) ) ) && ( ( oldHost.getStatus ( ) ) != ( org.ovirt.engine.core.common.businessentities.VDSStatus.InstallFailed ) ) ) && ( ( oldHost.getStatus ( ) ) != ( org.ovirt.engine.core.common.businessentities.VDSStatus.InstallingOS ) ) ) ) ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult statusSupportedForHostInstallation ( ) { return org.ovirt.engine.core.bll.ValidationResult.failWith ( EngineMessage.VDS_CANNOT_INSTALL_STATUS_ILLEGAL ) . when ( ( ( ( ( ( installHost ) && ( ( oldHost.getStatus ( ) ) != ( org.ovirt.engine.core.common.businessentities.VDSStatus.Maintenance ) ) ) && ( ( oldHost.getStatus ( ) ) != ( org.ovirt.engine.core.common.businessentities.VDSStatus.NonOperational ) ) ) && ( ( oldHost.getStatus ( ) ) != ( org.ovirt.engine.core.common.businessentities.VDSStatus.InstallFailed ) ) ) && ( ( oldHost.getStatus ( ) ) != ( org.ovirt.engine.core.common.businessentities.VDSStatus.InstallingOS ) ) ) ) ; }
Source:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.datacenters.DataCenterGuideModel dataCenterGuideModel = ( ( org.ovirt.engine.ui.uicommonweb.models.datacenters.DataCenterGuideModel ) ( target ) ) ; java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > hosts = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ) ( returnValue ) ) ; dataCenterGuideModel.allHosts = hosts ; dataCenterGuideModel.UpdateOptionsNonLocalFS ( ) ; }

Target:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.datacenters.DataCenterGuideModel dataCenterGuideModel = ( ( org.ovirt.engine.ui.uicommonweb.models.datacenters.DataCenterGuideModel ) ( target ) ) ; java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > hosts = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ) ( returnValue ) ) ; dataCenterGuideModel.allHosts = hosts ; dataCenterGuideModel.updateOptionsNonLocalFS ( ) ; }
Source:
public void validateBondOptionsForNewAttachementWithOutOfSyncVmNetworOverridden ( ) { validateValidBondsForAllBondModes ( false , true , false , true ) ; }

Target:
public void validateBondOptionsForNewAttachementWithOutOfSyncVmNetworOverridden ( ) { org.ovirt.engine.core.common.businessentities.network.NetworkAttachment modifiedAttachment = createNetworkAttachment ( new org.ovirt.engine.core.common.businessentities.network.Network ( ) ) ; org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidator validator = new org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidatorTest.HostSetupNetworksValidatorBuilder ( ) . setParams ( new org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidatorTest.ParametersBuilder ( ) . addRemovedNetworkAttachments ( modifiedAttachment ) ) . build ( ) ; org.junit.Assert.assertThat ( validator.modifiedAttachmentNotRemoved ( modifiedAttachment ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.NETWORK_ATTACHMENT_IN_BOTH_LISTS , org.ovirt.engine.core.utils.ReplacementUtils.createSetVariableString ( "NETWORK_ATTACHMENT_IN_BOTH_LISTS_ENTITY" , modifiedAttachment.getId ( ) . toString ( ) ) ) ) ; }
Source:
public org.ovirt.engine.core.bll.provider.ProviderProxy create ( org.ovirt.engine.core.common.businessentities.Provider provider ) { throw new java.lang.UnsupportedOperationException ( ) ; }

Target:
public < P extends org.ovirt.engine.core.bll.provider.ProviderProxy > P create ( org.ovirt.engine.core.common.businessentities.Provider < ? > provider ) { switch ( provider.getType ( ) ) { case FOREMAN : return ( ( P ) ( new org.ovirt.engine.core.bll.host.provider.foreman.ForemanHostProviderProxy ( provider ) ) ) ; case OPENSTACK_NETWORK : return ( ( P ) ( new org.ovirt.engine.core.bll.provider.network.openstack.OpenstackNetworkProviderProxy ( ( ( org.ovirt.engine.core.common.businessentities.Provider < org.ovirt.engine.core.common.businessentities.OpenstackNetworkProviderProperties > ) ( provider ) ) ) ) ) ; default : return null ; } }
Source:
public void getTemplateDiskList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid templateId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmTemplatesDisks , new org.ovirt.engine.core.common.queries.IdQueryParameters ( templateId ) , aQuery ) ; }

Target:
public void getDataCenterListByName ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String name ) { 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.StoragePool > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( ( ( "DataCenter: name=" + name ) + " sortby name" ) , org.ovirt.engine.core.common.interfaces.SearchType.StoragePool ) , aQuery ) ; }
Source:
public void ExecuteCommand ( org.ovirt.engine.ui.uicommonweb.UICommand command ) { super . ExecuteCommand ( command ) ; if ( command == ( getLoginCommand ( ) ) ) { Login ( ) ; } else if ( org.ovirt.engine.core.compat.StringHelper.stringsEqual ( command.getName ( ) , "Cancel" ) ) { Cancel ( ) ; } }

Target:
public void executeCommand ( org.ovirt.engine.ui.uicommonweb.UICommand command ) { super . executeCommand ( command ) ; if ( command == ( getLoginCommand ( ) ) ) { Login ( ) ; } else if ( org.ovirt.engine.core.compat.StringHelper.stringsEqual ( command.getName ( ) , "Cancel" ) ) { Cancel ( ) ; } }
Source:
public java.lang.String toString ( ) { return ( ( ( ( ( ( ( "Event [eventType=" + ( eventType ) ) + ", storagePoolId=" ) + ( storagePoolId ) ) + ", domainId=" ) + ( domainId ) ) + ", vdsId=" ) + ( vdsId ) ) + "]" ; }

Target:
public java.lang.String toString ( ) { return ( ( ( ( ( ( ( ( ( "Event [eventType=" + ( eventType ) ) + ", storagePoolId=" ) + ( storagePoolId ) ) + ", domainId=" ) + ( domainId ) ) + ", vdsId=" ) + ( vdsId ) ) + ", description=" ) + ( description ) ) + "]" ; }
Source:
public void save ( org.ovirt.engine.core.common.businessentities.StoragePoolIsoMap map ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) . addValue ( "storage_id" , map.getstorage_id ( ) ) . addValue ( "storage_pool_id" , map.getstorage_pool_id ( ) ) . addValue ( "status" , map.getStatus ( ) ) ; getCallsHandler ( ) . executeModification ( "Insertstorage_pool_iso_map" , parameterSource ) ; }

Target:
public void save ( org.ovirt.engine.core.common.businessentities.StoragePoolIsoMap map ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) . addValue ( "storage_id" , map.getStorageId ( ) ) . addValue ( "storage_pool_id" , map.getStoragePoolId ( ) ) . addValue ( "status" , map.getStatus ( ) ) ; getCallsHandler ( ) . executeModification ( "Insertstorage_pool_iso_map" , parameterSource ) ; }
Source:
public org.ovirt.engine.api.model.Vms list ( ) { if ( isFiltered ( ) ) { return mapCollection ( getBackendCollection ( QueryType.GetAllVms , new org.ovirt.engine.core.common.queries.QueryParametersBase ( ) , SearchType.VM ) , true ) ; } else { return mapCollection ( getBackendCollection ( SearchType.VM ) , false ) ; } }

Target:
public org.ovirt.engine.api.model.Vms list ( ) { if ( isFiltered ( ) ) { if ( isSortedAndMaxResults ( ) ) { return getVmsFilteredAndSorted ( ) ; } else { return mapCollection ( getBackendCollection ( QueryType.GetAllVms , new org.ovirt.engine.core.common.queries.QueryParametersBase ( ) , SearchType.VM ) ) ; } } else { return mapCollection ( getBackendCollection ( SearchType.VM ) ) ; } }
Source:
public void customPropertiesNoNetwork ( ) { mockExistingNetworks ( ) ; org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface = createNic ( "eth0" , null ) ; mockExistingIfaces ( iface ) ; iface.setCustomProperties ( createCustomProperties ( ) ) ; org.ovirt.engine.core.bll.network.host.SetupNetworksHelper helper = createHelper ( createParametersForNics ( iface ) , Version.v3_5 ) ; validateAndExpectViolation ( helper , VdcBllMessages.ACTION_TYPE_FAILED_NETWORK_CUSTOM_PROPERTIES_NO_NETWORK , iface.getName ( ) ) ; }

Target:
public void customPropertiesNoNetwork ( ) { mockExistingNetworks ( ) ; org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface = createNic ( "eth0" , null ) ; mockExistingIfaces ( iface ) ; iface.setCustomProperties ( createCustomProperties ( ) ) ; org.ovirt.engine.core.bll.network.host.SetupNetworksHelper helper = createHelper ( createParametersForNics ( iface ) , Version.v3_5 ) ; validateAndAssertNoChanges ( helper ) ; }
Source:
public static void getTemplateById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid templateId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVmTemplate , new org.ovirt.engine.core.common.queries.GetVmTemplateParameters ( templateId ) , aQuery ) ; }

Target:
public static void getRoleList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Role > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Role > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllRoles , new org.ovirt.engine.core.common.queries.MultilevelAdministrationsQueriesParameters ( ) , aQuery ) ; }
Source:
private void setUpDisks ( ) { com.woorea.openstack.cinder.model.Volume existingVolume = volumes.get ( 1 ) ; java.util.List < org.ovirt.engine.core.common.businessentities.storage.Disk > existingDisks = new java.util.ArrayList ( org.ovirt.engine.core.bll.storage.disk.cinder.CinderBroker.volumesToCinderDisks ( java.util.Collections.singletonList ( existingVolume ) , getQueryParameters ( ) . getId ( ) ) ) ; org.mockito.Mockito.when ( diskDao.getAllFromDisksByDiskStorageType ( DiskStorageType.CINDER , null , false ) ) . thenReturn ( existingDisks ) ; org.mockito.Mockito.when ( getDbFacadeMockInstance ( ) . getDiskDao ( ) ) . thenReturn ( diskDao ) ; }

Target:
private void setUpDisks ( ) { com.woorea.openstack.cinder.model.Volume existingVolume = volumes.get ( 1 ) ; java.util.List < org.ovirt.engine.core.common.businessentities.storage.Disk > existingDisks = new java.util.ArrayList ( org.ovirt.engine.core.bll.storage.disk.cinder.CinderBroker.volumesToCinderDisks ( java.util.Collections.singletonList ( existingVolume ) , getQueryParameters ( ) . getId ( ) ) ) ; org.mockito.Mockito.when ( diskDao.getAllFromDisksByDiskStorageType ( DiskStorageType.CINDER , getUser ( ) . getId ( ) , false ) ) . thenReturn ( existingDisks ) ; org.mockito.Mockito.when ( getDbFacadeMockInstance ( ) . getDiskDao ( ) ) . thenReturn ( diskDao ) ; }
Source:
private org.ovirt.engine.ui.frontend.server.dashboard.Dashboard getDashboardFromCache ( ) throws org.ovirt.engine.ui.frontend.server.dashboard.DashboardDataException { org.ovirt.engine.ui.frontend.server.dashboard.Dashboard dashboard ; org.ovirt.engine.ui.frontend.server.dashboard.Inventory inventory ; synchronized ( org.ovirt.engine.ui.frontend.server.dashboard.DashboardDataServlet.UTILIZATION_LOCK ) { dashboard = org.ovirt.engine.ui.frontend.server.dashboard.DashboardDataServlet.dashboardCache.get ( org.ovirt.engine.ui.frontend.server.dashboard.DashboardDataServlet.UTILIZATION_KEY ) ; if ( dashboard == null ) { dashboard = populateUtilizationCache ( ) ; } inventory = org.ovirt.engine.ui.frontend.server.dashboard.DashboardDataServlet.inventoryCache.get ( org.ovirt.engine.ui.frontend.server.dashboard.DashboardDataServlet.INVENTORY_KEY ) ; if ( inventory == null ) { inventory = populateInventoryCache ( ) ; } } dashboard.setInventory ( inventory ) ; return dashboard ; }

Target:
private org.ovirt.engine.ui.frontend.server.dashboard.Dashboard populateUtilizationCache ( ) throws org.ovirt.engine.ui.frontend.server.dashboard.DashboardDataException { long startTime = java.lang.System.currentTimeMillis ( ) ; org.ovirt.engine.ui.frontend.server.dashboard.Dashboard dashboard = getDashboard ( ) ; long endTime = java.lang.System.currentTimeMillis ( ) ; if ( enableBackgroundCacheUpdate ) { dashboardCache.put ( org.ovirt.engine.ui.frontend.server.dashboard.DashboardDataServlet.UTILIZATION_KEY , dashboard ) ; } else { dashboardCache.put ( org.ovirt.engine.ui.frontend.server.dashboard.DashboardDataServlet.UTILIZATION_KEY , dashboard , org.ovirt.engine.ui.frontend.server.dashboard.DashboardDataServlet.UTILIZATION_CACHE_UPDATE_INTERVAL , java.util.concurrent.TimeUnit.SECONDS ) ; } org.ovirt.engine.ui.frontend.server.dashboard.DashboardDataServlet.log.debug ( "Dashboard utilization cache updated in {}ms" , ( endTime - startTime ) ) ; return dashboard ; }
Source:
public void testGetAllForImage ( ) { java.util.Map < java.lang.Boolean , java.util.List < org.ovirt.engine.core.common.businessentities.VmTemplate > > result = dao.getAllForImage ( FixturesTool.TEMPLATE_IMAGE_ID ) ; org.junit.Assert.assertEquals ( "Wrong number of keys" , 1 , result.size ( ) ) ; for ( java.util.List < org.ovirt.engine.core.common.businessentities.VmTemplate > templates : result.values ( ) ) { org.junit.Assert.assertEquals ( "Wrong number of templates" , 1 , templates.size ( ) ) ; } }

Target:
public void testGetAllForImage ( ) { java.util.Map < java.lang.Boolean , org.ovirt.engine.core.common.businessentities.VmTemplate > result = dao.getAllForImage ( FixturesTool.TEMPLATE_IMAGE_ID ) ; org.junit.Assert.assertEquals ( "Wrong number of keys" , 1 , result.size ( ) ) ; org.junit.Assert.assertNotNull ( result.values ( ) ) ; }
Source:
private void endCommand ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VM > listVms = getVmsForDiskId ( ) ; org.ovirt.engine.core.bll.Backend.getInstance ( ) . EndAction ( VdcActionType.RemoveImage , org.ovirt.engine.core.bll.RemoveDiskCommand.getParameters ( ) . getImagesParameters ( ) . get ( 0 ) ) ; org.ovirt.engine.core.bll.VmCommand.updateVmInSpm ( org.ovirt.engine.core.bll.RemoveDiskCommand.getStoragePoolId ( ) . getValue ( ) , listVms ) ; org.ovirt.engine.core.bll.RemoveDiskCommand.setSucceeded ( true ) ; }

Target:
private void endCommand ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VM > listVms = getVmsForDiskId ( ) ; for ( org.ovirt.engine.core.common.businessentities.VM vm : listVms ) { org.ovirt.engine.core.bll.RemoveDiskCommand.getVmStaticDAO ( ) . incrementDbGeneration ( vm.getId ( ) ) ; } org.ovirt.engine.core.bll.Backend.getInstance ( ) . EndAction ( VdcActionType.RemoveImage , org.ovirt.engine.core.bll.RemoveDiskCommand.getParameters ( ) . getImagesParameters ( ) . get ( 0 ) ) ; org.ovirt.engine.core.bll.RemoveDiskCommand.setSucceeded ( true ) ; }
Source:
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 ) ; }

Target:
public void getGlusterHookContent ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hookId , org.ovirt.engine.core.compat.Guid serverId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? source : "" ; } } ; org.ovirt.engine.core.common.queries.gluster.GlusterHookContentQueryParameters parameters = new org.ovirt.engine.core.common.queries.gluster.GlusterHookContentQueryParameters ( hookId ) ; parameters.setGlusterServerId ( serverId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterHookContent , parameters , aQuery ) ; }
Source:
protected void setUpEntityQueryExpectations ( int times , java.lang.Object failure ) throws java.lang.Exception { while ( ( times -- ) > 0 ) { setUpEntityQueryExpectations ( VdcQueryType.GetAllNetworksByClusterId , org.ovirt.engine.core.common.queries.VdsGroupQueryParamenters.class , new java.lang.String [ ] { "VdsGroupId" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendClusterNetworksResourceTest.CLUSTER_ID } , getEntityList ( ) , failure ) ; } }

Target:
protected void setUpEntityQueryExpectations ( int times , java.lang.Object failure ) throws java.lang.Exception { while ( ( times -- ) > 0 ) { setUpEntityQueryExpectations ( VdcQueryType.GetAllNetworksByClusterId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendClusterNetworksResourceTest.CLUSTER_ID } , getEntityList ( ) , failure ) ; } }
Source:
protected void updateStoragePoolInDiffTransaction ( ) { executeInScope ( TransactionScopeOption.Suppress , new org.ovirt.engine.core.utils.transaction.TransactionMethod < java.lang.Object > ( ) { @ java.lang.Override public java.lang.Object runInTransaction ( ) { getStoragePoolDAO ( ) . update ( getStoragePool ( ) ) ; return null ; } } ) ; }

Target:
protected void updateStoragePoolMasterDomainVersionInDiffTransaction ( ) { executeInScope ( TransactionScopeOption.Suppress , new org.ovirt.engine.core.utils.transaction.TransactionMethod < java.lang.Void > ( ) { @ java.lang.Override public java.lang.Void runInTransaction ( ) { int master_domain_version = getStoragePoolDAO ( ) . increaseStoragePoolMasterVersion ( getStoragePool ( ) . getId ( ) ) ; getStoragePool ( ) . setmaster_domain_version ( master_domain_version ) ; return null ; } } ) ; }
Source:
public void canDoActionThinProvisioningSpaceCheckSucceeds ( ) throws java.lang.Exception { final int availableSize = 6 ; final int usedSize = 4 ; org.ovirt.engine.core.compat.Guid sdid = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; initializeCommand ( sdid , VolumeType.Sparse ) ; mockVm ( ) ; mockStorageDomain ( sdid , availableSize , usedSize ) ; mockStoragePoolIsoMap ( ) ; org.junit.Assert.assertTrue ( command.canDoAction ( ) ) ; }

Target:
public void canDoActionSpaceValidationFails ( ) { org.ovirt.engine.core.compat.Guid storageId = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; initializeCommand ( storageId , VolumeType.Sparse ) ; mockVm ( ) ; mockStorageDomain ( storageId ) ; mockStoragePoolIsoMap ( ) ; mockMaxPciSlots ( ) ; org.mockito.Mockito.doReturn ( org.ovirt.engine.core.bll.AddDiskToVmCommandTest.mockStorageDomainValidatorWithoutSpace ( ) ) . when ( command ) . createStorageDomainValidator ( ) ; org.junit.Assert.assertFalse ( command.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( command.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( VdcBllMessages.ACTION_TYPE_FAILED_DISK_SPACE_LOW_ON_TARGET_STORAGE_DOMAIN.toString ( ) ) ) ; }
Source:
private void storageDomain_SelectedItemChanged ( ) { org.ovirt.engine.core.common.businessentities.StorageDomain selectedStorage = ( ( org.ovirt.engine.core.common.businessentities.StorageDomain ) ( getStorageDomain ( ) . getSelectedItem ( ) ) ) ; if ( ( selectedStorage != null ) && ( getIsNew ( ) ) ) { setDefaultVolumeType ( selectedStorage.getStorageType ( ) ) ; } updateQuota ( ( ( org.ovirt.engine.core.common.businessentities.StoragePool ) ( getDataCenter ( ) . getSelectedItem ( ) ) ) ) ; }

Target:
private void storageDomain_SelectedItemChanged ( ) { org.ovirt.engine.core.common.businessentities.StorageDomain selectedStorage = ( ( org.ovirt.engine.core.common.businessentities.StorageDomain ) ( getStorageDomain ( ) . getSelectedItem ( ) ) ) ; if ( selectedStorage != null ) { updateVolumeType ( selectedStorage.getStorageType ( ) ) ; } updateQuota ( ( ( org.ovirt.engine.core.common.businessentities.StoragePool ) ( getDataCenter ( ) . getSelectedItem ( ) ) ) ) ; }
Source:
void onPanelDragDrop ( com.google.gwt.event.dom.client.DropEvent event ) { org.ovirt.engine.core.compat.Guid vmGuid = org.ovirt.engine.core.compat.Guid.createGuidFromString ( event.getData ( "VM_GID" ) ) ; boolean pinned = java.lang.Boolean.valueOf ( event.getData ( "PINNED" ) ) ; int vNumaNodeIndex = java.lang.Integer.valueOf ( event.getData ( "INDEX" ) ) ; container.removeStyleName ( style.dragOver ( ) ) ; event.preventDefault ( ) ; org.ovirt.engine.ui.common.presenter.popup.numa.UpdatedVnumaEvent.fire ( this , vmGuid , pinned , vNumaNodeIndex , pNumaNodeIndex ) ; }

Target:
void onPanelDragDrop ( com.google.gwt.event.dom.client.DropEvent event ) { org.ovirt.engine.core.compat.Guid vmGuid = org.ovirt.engine.core.compat.Guid.createGuidFromString ( event.getData ( "VM_GID" ) ) ; boolean pinned = java.lang.Boolean.valueOf ( event.getData ( "PINNED" ) ) ; int vNumaNodeIndex = java.lang.Integer.parseInt ( event.getData ( "INDEX" ) ) ; container.removeStyleName ( style.dragOver ( ) ) ; event.preventDefault ( ) ; org.ovirt.engine.ui.common.presenter.popup.numa.UpdatedVnumaEvent.fire ( this , vmGuid , pinned , vNumaNodeIndex , pNumaNodeIndex ) ; }
Source:
public void getClusterNetworkList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { if ( ( aQuery.converterCallback ) == null ) { 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.Network > ( ) ; } return source ; } } ; } org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllNetworksByClusterId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( clusterId ) , aQuery ) ; }

Target:
public void getHostListByDataCenter ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid spId ) { 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 org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.VDS > cast ( ( ( java.util.List < ? > ) ( source ) ) ) ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllVdsByStoragePool , new org.ovirt.engine.core.common.queries.IdQueryParameters ( spId ) , aQuery ) ; }
Source:
public void unmanagedVlanAddedToNic ( ) { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nic = createNic ( "nic0" , null ) ; mockExistingIfaces ( nic ) ; java.lang.String networkName = "net" ; org.ovirt.engine.core.bll.network.host.SetupNetworksHelper helper = createHelper ( createParametersForNics ( nic , createVlan ( nic.getName ( ) , 100 , networkName ) ) ) ; validateAndExpectViolation ( helper , VdcBllMessages.NETWORKS_DONT_EXIST_IN_CLUSTER , networkName ) ; }

Target:
public void vlanBondNameMismatch ( ) { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface bond = createBond ( org.ovirt.engine.core.bll.network.host.SetupNetworksHelperTest.BOND_NAME , null ) ; java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > ifacesToBond = createNics ( null ) ; org.ovirt.engine.core.common.action.SetupNetworksParameters parameters = createParametersForBond ( bond , ifacesToBond ) ; java.lang.String ifaceName = ( bond.getName ( ) ) + "1" ; parameters.getInterfaces ( ) . add ( createVlan ( ifaceName , 100 , "net" ) ) ; mockExistingIfacesWithBond ( bond , ifacesToBond ) ; org.ovirt.engine.core.bll.network.host.SetupNetworksHelper helper = createHelper ( parameters ) ; validateAndExpectViolation ( helper , VdcBllMessages.NETWORK_INTERFACES_DONT_EXIST , ifaceName ) ; }
Source:
public void testUnknownTypeLunCantBeAdded ( ) { org.ovirt.engine.core.common.businessentities.storage.LunDisk disk = org.ovirt.engine.core.bll.AddDiskCommandTest.createISCSILunDisk ( ) ; org.ovirt.engine.core.common.action.AddDiskParameters parameters = org.ovirt.engine.core.bll.AddDiskCommandTest.createParameters ( ) ; parameters.setDiskInfo ( disk ) ; initializeCommand ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , parameters ) ; disk.getLun ( ) . setLunType ( StorageType.UNKNOWN ) ; org.junit.Assert.assertFalse ( "checkIfLunDiskCanBeAdded() succeded for LUN with UNKNOWN type" , command.checkIfLunDiskCanBeAdded ( spyDiskValidator ( disk ) ) ) ; org.junit.Assert.assertTrue ( "checkIfLunDiskCanBeAdded() failed but correct can do action hasn't been added to the return response" , verifyCanDoActionMessagesContainMessage ( VdcBllMessages.ACTION_TYPE_FAILED_DISK_LUN_HAS_NO_VALID_TYPE ) ) ; }

Target:
public void testUnknownTypeLunCantBeAdded ( ) { org.ovirt.engine.core.common.businessentities.storage.LunDisk disk = org.ovirt.engine.core.bll.AddDiskCommandTest.createISCSILunDisk ( ) ; org.ovirt.engine.core.common.action.AddDiskParameters parameters = org.ovirt.engine.core.bll.AddDiskCommandTest.createParameters ( ) ; parameters.setDiskInfo ( disk ) ; initializeCommand ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , parameters ) ; disk.getLun ( ) . setLunType ( StorageType.UNKNOWN ) ; org.junit.Assert.assertFalse ( "checkIfLunDiskCanBeAdded() succeded for LUN with UNKNOWN type" , command.checkIfLunDiskCanBeAdded ( spyDiskValidator ( disk ) ) ) ; org.junit.Assert.assertTrue ( "checkIfLunDiskCanBeAdded() failed but correct can do action hasn't been added to the return response" , verifyCanDoActionMessagesContainMessage ( EngineMessage.ACTION_TYPE_FAILED_DISK_LUN_HAS_NO_VALID_TYPE ) ) ; }
Source:
public void testGetAllStoragePoolIsoMapsForIso ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.StoragePoolIsoMap > result = dao.getAllForStorage ( org.ovirt.engine.core.dao.StoragePoolIsoMapDaoTest.EXISTING_ISO_ID ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertFalse ( result.isEmpty ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.StoragePoolIsoMap mapping : result ) { org.junit.Assert.assertEquals ( org.ovirt.engine.core.dao.StoragePoolIsoMapDaoTest.EXISTING_ISO_ID , mapping.getStorageId ( ) ) ; } }

Target:
public void testGetAllStoragePoolIsoMapsForIso ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.StoragePoolIsoMap > result = dao.getAllForStorage ( FixturesTool.STORAGE_DOMAIN_SCALE_SD5 ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertFalse ( result.isEmpty ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.StoragePoolIsoMap mapping : result ) { org.junit.Assert.assertEquals ( FixturesTool.STORAGE_DOMAIN_SCALE_SD5 , mapping.getStorageId ( ) ) ; } }
Source:
void localize ( org.ovirt.engine.ui.webadmin.ApplicationConstants constants ) { titleLabel.setText ( constants.configurePopupTitle ( ) ) ; closeButton.setText ( constants.closeButtonLabel ( ) ) ; rolesTab.setLabel ( constants.configureRoleTabLabel ( ) ) ; clusterPoliciesTab.setLabel ( constants.configureClusterPolicyTabLabel ( ) ) ; systemPermissionsTab.setLabel ( constants.configureSystemPermissionTabLabel ( ) ) ; instanceTypesTab.setLabel ( constants.instanceTypes ( ) ) ; }

Target:
void localize ( org.ovirt.engine.ui.webadmin.ApplicationConstants constants ) { titleLabel.setText ( constants.configurePopupTitle ( ) ) ; closeButton.setText ( constants.closeButtonLabel ( ) ) ; rolesTab.setLabel ( constants.configureRoleTabLabel ( ) ) ; clusterPoliciesTab.setLabel ( constants.configureClusterPolicyTabLabel ( ) ) ; systemPermissionsTab.setLabel ( constants.configureSystemPermissionTabLabel ( ) ) ; instanceTypesTab.setLabel ( constants.instanceTypes ( ) ) ; macPoolsTab.setLabel ( constants.configureMacPoolsTabLabel ( ) ) ; }
Source:
public org.ovirt.engine.api.model.Hosts list ( ) { org.ovirt.engine.core.common.mode.ApplicationMode appMode = getCurrent ( ) . get ( org.ovirt.engine.core.common.mode.ApplicationMode.class ) ; if ( appMode == ( org.ovirt.engine.core.common.mode.ApplicationMode.GlusterOnly ) ) { return listGlusterOnly ( ) ; } else { return listAll ( ) ; } }

Target:
public org.ovirt.engine.api.model.Hosts list ( ) { if ( isFiltered ( ) ) { throw new javax.ws.rs.WebApplicationException ( Response.Status.FORBIDDEN ) ; } org.ovirt.engine.core.common.mode.ApplicationMode appMode = getCurrent ( ) . get ( org.ovirt.engine.core.common.mode.ApplicationMode.class ) ; if ( appMode == ( org.ovirt.engine.core.common.mode.ApplicationMode.GlusterOnly ) ) { return listGlusterOnly ( ) ; } else { return listAll ( ) ; } }
Source:
public static void getGlusterHooks ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? source : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterHooks , new org.ovirt.engine.core.common.queries.gluster.GlusterParameters ( clusterId ) , aQuery ) ; }

Target:
public static void getGlusterSwiftServices ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid serverId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? source : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterServerService > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterServerServicesByServerId , new org.ovirt.engine.core.common.queries.gluster.GlusterServiceQueryParameters ( serverId , org.ovirt.engine.core.common.businessentities.gluster.ServiceType.GLUSTER_SWIFT ) , aQuery ) ; }
Source:
private boolean vmDeviceChanged ( org.ovirt.engine.core.common.businessentities.VmDeviceGeneralType deviceType , java.lang.String device , boolean deviceEnabled ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > vmDevices = org.ovirt.engine.core.bll.UpdateVmCommand.getVmDeviceDao ( ) . getVmDeviceByVmIdTypeAndDevice ( org.ovirt.engine.core.bll.UpdateVmCommand.getParameters ( ) . getVmId ( ) , deviceType , device ) ; return deviceEnabled == ( vmDevices.isEmpty ( ) ) ; }

Target:
protected boolean isBalloonEnabled ( ) { java.lang.Boolean balloonEnabled = org.ovirt.engine.core.bll.UpdateVmCommand.getParameters ( ) . isBalloonEnabled ( ) ; return balloonEnabled != null ? balloonEnabled : org.ovirt.engine.core.bll.utils.VmDeviceUtils.isBalloonEnabled ( getVmId ( ) ) ; }
Source:
private void MoveVMsToUnknown ( ) { addMigratedVmsNotUpYet ( ) ; for ( org.ovirt.engine.core.common.businessentities.VM vm : org.ovirt.engine.core.bll.VdsNotRespondingTreatmentCommand.getVmList ( ) ) { destroyVmOnDestination ( vm ) ; org.ovirt.engine.core.bll.Backend.getInstance ( ) . getResourceManager ( ) . RunVdsCommand ( VDSCommandType.SetVmStatus , new org.ovirt.engine.core.common.vdscommands.SetVmStatusVDSCommandParameters ( vm.getId ( ) , org.ovirt.engine.core.common.businessentities.VMStatus.Unknown ) ) ; org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase logable = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; logable.setVmId ( vm.getId ( ) ) ; org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.log ( logable , AuditLogType.VM_SET_TO_UNKNOWN_STATUS ) ; } }

Target:
protected org.ovirt.engine.core.common.action.LockProperties applyLockProperties ( org.ovirt.engine.core.common.action.LockProperties lockProperties ) { return lockProperties.withScope ( Scope.Execution ) ; }