auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
protected final R performUpdate ( R incoming , Q entity , R model , org.ovirt.engine.api.restapi.resource.EntityIdResolver < org.ovirt.engine.core.compat.Guid > entityResolver , org.ovirt.engine.core.common.action.VdcActionType update , org.ovirt.engine.api.restapi.resource.AbstractBackendSubResource.ParametersProvider < R , Q > updateProvider ) { entity = doUpdate ( incoming , entity , model , entityResolver , update , updateProvider ) ; R model2 = org.ovirt.engine.api.restapi.resource.AbstractBackendSubResource.map ( entity ) ; org.ovirt.engine.api.restapi.resource.AbstractBackendSubResource.deprecatedPopulate ( model2 , entity ) ; return addLinks ( org.ovirt.engine.api.restapi.resource.AbstractBackendSubResource.doPopulate ( model2 , entity ) ) ; }

Target:
protected final < T > R performUpdate ( R incoming , Q entity , R model , org.ovirt.engine.api.restapi.resource.EntityIdResolver < T > entityResolver , org.ovirt.engine.core.common.action.VdcActionType update , org.ovirt.engine.api.restapi.resource.AbstractBackendSubResource.ParametersProvider < R , Q > updateProvider ) { entity = doUpdate ( incoming , entity , model , entityResolver , update , updateProvider ) ; R model2 = org.ovirt.engine.api.restapi.resource.AbstractBackendSubResource.map ( entity ) ; org.ovirt.engine.api.restapi.resource.AbstractBackendSubResource.deprecatedPopulate ( model2 , entity ) ; return addLinks ( org.ovirt.engine.api.restapi.resource.AbstractBackendSubResource.doPopulate ( model2 , entity ) ) ; }
Source:
public void testUpdateWrongPortMirroringNetwork ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpGetEntityExpectations ( 1 ) ; setGetVmQueryExpectations ( 1 ) ; setGetNetworksQueryExpectations ( 1 ) ; control.replay ( ) ; org.ovirt.engine.api.model.NIC nic = getNic ( false ) ; nic.getPortMirroring ( ) . getNetworks ( ) . getNetworks ( ) . get ( 0 ) . setId ( GUIDS [ 1 ] . toString ( ) ) ; nic = resource.update ( nic ) ; assertNotNull ( nic ) ; }

Target:
public void testGet ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setAllContentHeaderExpectation ( ) ; setUpEntityQueryExpectations ( 1 ) ; setGetGuestAgentQueryExpectations ( 1 ) ; control.replay ( ) ; org.ovirt.engine.api.model.NIC nic = resource.get ( ) ; org.ovirt.engine.api.restapi.resource.AbstractBackendNicsResourceTest.verifyModelSpecific ( nic , 1 ) ; verifyLinks ( nic ) ; }
Source:
protected void setVirtioScsiController ( org.ovirt.engine.api.model.VM model ) { if ( ! ( model.isSetVirtioScsi ( ) ) ) { model.setVirtioScsi ( new org.ovirt.engine.api.model.VirtIOSCSI ( ) ) ; } model.getVirtioScsi ( ) . setEnabled ( ( ! ( org.ovirt.engine.api.restapi.util.VmHelper.getVirtioScsiControllersForEntity ( this , new org.ovirt.engine.core.compat.Guid ( model.getId ( ) ) ) . isEmpty ( ) ) ) ) ; }

Target:
protected void setSoundcard ( org.ovirt.engine.api.model.Vm model ) { model.setSoundcardEnabled ( ( ! ( org.ovirt.engine.api.restapi.util.VmHelper.getSoundDevicesForEntity ( this , new org.ovirt.engine.core.compat.Guid ( model.getId ( ) ) ) . isEmpty ( ) ) ) ) ; }
Source:
public void testStoragePoolIsNotUp ( ) { org.mockito.Mockito.doReturn ( new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_IMAGE_REPOSITORY_NOT_FOUND ) ) . when ( storagePoolValidator ) . existsAndUp ( ) ; org.mockito.Mockito.doReturn ( org.ovirt.engine.core.bll.snapshots.CreateAllSnapshotsFromVmCommandTest.getEmptyDiskList ( ) ) . when ( cmd ) . getDisksList ( ) ; org.junit.Assert.assertFalse ( cmd.validate ( ) ) ; org.junit.Assert.assertTrue ( cmd.getReturnValue ( ) . getValidationMessages ( ) . contains ( EngineMessage.ACTION_TYPE_FAILED_IMAGE_REPOSITORY_NOT_FOUND.name ( ) ) ) ; }

Target:
public void testVmDuringSnaoshot ( ) { org.mockito.Mockito.doReturn ( new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_VM_IS_DURING_SNAPSHOT ) ) . when ( snapshotsValidator ) . vmNotDuringSnapshot ( org.mockito.ArgumentMatchers.any ( ) ) ; org.mockito.Mockito.doReturn ( org.ovirt.engine.core.bll.snapshots.CreateAllSnapshotsFromVmCommandTest.getEmptyDiskList ( ) ) . when ( cmd ) . getDisksList ( ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( cmd , EngineMessage.ACTION_TYPE_FAILED_VM_IS_DURING_SNAPSHOT ) ; }
Source:
void initEditors ( ) { selectHostAutomaticallyEditor = new org.ovirt.engine.ui.common.widget.editor.EntityModelRadioButtonEditor ( "1" ) ; selectDestinationHostEditor = new org.ovirt.engine.ui.common.widget.editor.EntityModelRadioButtonEditor ( "1" ) ; hostsListEditor = new org.ovirt.engine.ui.common.widget.editor.ListModelListBoxEditor < java.lang.Object > ( new org.ovirt.engine.ui.common.widget.renderer.NullSafeRenderer < java.lang.Object > ( ) { @ java.lang.Override public java.lang.String renderNullSafe ( java.lang.Object object ) { return ( ( org.ovirt.engine.core.common.businessentities.VDS ) ( object ) ) . getName ( ) ; } } ) ; }

Target:
void initEditors ( ) { selectHostAutomaticallyEditor = new org.ovirt.engine.ui.common.widget.editor.generic.EntityModelRadioButtonEditor ( "1" ) ; selectDestinationHostEditor = new org.ovirt.engine.ui.common.widget.editor.generic.EntityModelRadioButtonEditor ( "1" ) ; hostsListEditor = new org.ovirt.engine.ui.common.widget.editor.ListModelListBoxEditor < org.ovirt.engine.core.common.businessentities.VDS > ( new org.ovirt.engine.ui.common.widget.renderer.NullSafeRenderer < org.ovirt.engine.core.common.businessentities.VDS > ( ) { @ java.lang.Override public java.lang.String renderNullSafe ( org.ovirt.engine.core.common.businessentities.VDS vds ) { return vds.getName ( ) ; } } ) ; }
Source:
private boolean canRunOnDestinationVds ( java.util.List < java.lang.String > messages , boolean isMigrate ) { boolean returnValue = false ; if ( ( getDestinationVdsId ( ) ) != null ) { org.ovirt.engine.core.common.businessentities.VDS target_vds = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVdsDao ( ) . get ( getDestinationVdsId ( ) ) ; org.ovirt.engine.core.bll.VdsSelector.log.infoFormat ( "Checking for a specific VDS only - id:{0}, name:{1}, host_name(ip):{2}" , getDestinationVdsId ( ) , target_vds.getName ( ) , target_vds.getHostName ( ) ) ; returnValue = canFindVdsToRun ( messages , isMigrate , new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ( java.util.Arrays.asList ( target_vds ) ) ) ; } return returnValue ; }

Target:
private org.ovirt.engine.core.compat.Guid getVdsRunOnDestination ( boolean isMigrate ) { org.ovirt.engine.core.compat.Guid result = org.ovirt.engine.core.compat.Guid.Empty ; if ( ( getDestinationVdsId ( ) ) != null ) { org.ovirt.engine.core.common.businessentities.VDS target_vds = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVdsDao ( ) . get ( getDestinationVdsId ( ) ) ; org.ovirt.engine.core.bll.VdsSelector.log.infoFormat ( "Checking for a specific VDS only - id:{0}, name:{1}, host_name(ip):{2}" , getDestinationVdsId ( ) , target_vds.getName ( ) , target_vds.getHostName ( ) ) ; org.ovirt.engine.core.bll.VmHandler.UpdateVmGuestAgentVersion ( getVm ( ) ) ; result = getVdsToRunOn ( java.util.Arrays.asList ( target_vds ) , isMigrate ) ; } return result ; }
Source:
void initBootSequenceBox ( ) { bootSequenceBox = new com.google.gwt.user.client.ui.ListBox ( false ) ; bootSequenceBox.setWidth ( "370px" ) ; bootSequenceBox.setHeight ( "60px" ) ; com.google.gwt.user.client.ui.VerticalPanel boxPanel = new com.google.gwt.user.client.ui.VerticalPanel ( ) ; boxPanel.setWidth ( "100%" ) ; boxPanel.add ( bootSequenceBox ) ; bootSequencePanel.add ( boxPanel ) ; localizeBootSequenceButtons ( ) ; }

Target:
void initBootSequenceBox ( ) { bootSequenceBox = new com.google.gwt.user.client.ui.ListBox ( false ) ; bootSequenceBox.setWidth ( "475px" ) ; bootSequenceBox.setHeight ( "60px" ) ; com.google.gwt.user.client.ui.VerticalPanel boxPanel = new com.google.gwt.user.client.ui.VerticalPanel ( ) ; boxPanel.setWidth ( "100%" ) ; boxPanel.add ( bootSequenceBox ) ; bootSequencePanel.add ( boxPanel ) ; localizeBootSequenceButtons ( ) ; }
Source:
public static void getDataCentersByStorageDomain ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storageDomainId ) { 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.StoragePool > ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetStoragePoolsByStorageDomainId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( storageDomainId ) , aQuery ) ; }

Target:
public static void getClusterServerMemoryOverCommit ( 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.Integer ) ( source ) ) . intValue ( ) : 0 ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.MaxVdsMemOverCommitForServers , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
protected void setUpWindowsGetEntityExpectations ( int times , boolean notFound ) throws java.lang.Exception { setUpGetEntityExpectations ( times , notFound , new org.ovirt.engine.api.model.VM ( ) { { setId ( GUIDS [ 0 ] ) ; setVmOs ( OsRepository.DEFAULT_X86_OS ) ; } } ) ; }

Target:
public void testRemoveForced ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpGetEntityExpectations ( ) ; setUpGetPayloadExpectations ( 0 , 1 ) ; setUpGetBallooningExpectations ( ) ; setUpGetGraphicsExpectations ( 1 ) ; setUpActionExpectations ( VdcActionType.RemoveVm , org.ovirt.engine.core.common.action.RemoveVmParameters.class , new java.lang.String [ ] { "VmId" , "Force" } , new java.lang.Object [ ] { GUIDS [ 0 ] , java.lang.Boolean.TRUE } , true , true ) ; verifyRemove ( resource.remove ( new org.ovirt.engine.api.model.Action ( ) { { setForce ( true ) ; } } ) ) ; }
Source:
protected void executeQueryCommand ( ) { org.ovirt.engine.core.common.businessentities.VM vm = org.ovirt.engine.core.bll.GetVmByVmNameForDataCenterQuery.getDbFacade ( ) . getVmDao ( ) . getByNameForDataCenter ( org.ovirt.engine.core.bll.GetVmByVmNameForDataCenterQuery.getParameters ( ) . getDataCenterId ( ) , org.ovirt.engine.core.bll.GetVmByVmNameForDataCenterQuery.getParameters ( ) . getName ( ) , org.ovirt.engine.core.bll.GetVmByVmNameForDataCenterQuery.getUserID ( ) , org.ovirt.engine.core.bll.GetVmByVmNameForDataCenterQuery.getParameters ( ) . isFiltered ( ) ) ; if ( vm != null ) { updateVMDetails ( vm ) ; org.ovirt.engine.core.bll.GetVmByVmNameForDataCenterQuery.getQueryReturnValue ( ) . setReturnValue ( vm ) ; } }

Target:
protected void executeQueryCommand ( ) { org.ovirt.engine.core.common.businessentities.VM vm = vmDao.getByNameForDataCenter ( org.ovirt.engine.core.bll.GetVmByVmNameForDataCenterQuery.getParameters ( ) . getDataCenterId ( ) , org.ovirt.engine.core.bll.GetVmByVmNameForDataCenterQuery.getParameters ( ) . getName ( ) , org.ovirt.engine.core.bll.GetVmByVmNameForDataCenterQuery.getUserID ( ) , org.ovirt.engine.core.bll.GetVmByVmNameForDataCenterQuery.getParameters ( ) . isFiltered ( ) ) ; if ( vm != null ) { updateVMDetails ( vm ) ; org.ovirt.engine.core.bll.GetVmByVmNameForDataCenterQuery.getQueryReturnValue ( ) . setReturnValue ( vm ) ; } }
Source:
private org.ovirt.engine.core.common.businessentities.StorageServerConnections createIscsiConnection ( java.lang.String connection , org.ovirt.engine.core.common.businessentities.storage.StorageType type , java.lang.String iqn , java.lang.String userName , java.lang.String password , java.lang.String portal ) { org.ovirt.engine.core.compat.Guid id = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; org.ovirt.engine.core.common.businessentities.StorageServerConnections connectionDetails = populateBasicConnectionDetails ( id , connection , type ) ; connectionDetails.setiqn ( iqn ) ; connectionDetails.setuser_name ( userName ) ; connectionDetails.setpassword ( password ) ; connectionDetails.setportal ( portal ) ; return connectionDetails ; }

Target:
private org.ovirt.engine.core.common.businessentities.StorageServerConnections createIscsiConnection ( java.lang.String connection , org.ovirt.engine.core.common.businessentities.storage.StorageType type , java.lang.String iqn , java.lang.String userName , java.lang.String password , java.lang.String portal ) { org.ovirt.engine.core.compat.Guid id = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; org.ovirt.engine.core.common.businessentities.StorageServerConnections connectionDetails = populateBasicConnectionDetails ( id , connection , type ) ; connectionDetails.setIqn ( iqn ) ; connectionDetails.setUserName ( userName ) ; connectionDetails.setPassword ( password ) ; connectionDetails.setPortal ( portal ) ; return connectionDetails ; }
Source:
public void testSwitchStorageDomainType ( ) { org.ovirt.engine.core.common.businessentities.StorageDomainStatic sdStatic = command.getStorageDomain ( ) . getStorageStaticData ( ) ; org.mockito.Mockito.doReturn ( new org.ovirt.engine.core.common.utils.Pair ( sdStatic , sdStatic.getId ( ) ) ) . when ( command ) . executeHSMGetStorageDomainInfo ( org.mockito.Matchers.any ( org.ovirt.engine.core.common.vdscommands.HSMGetStorageDomainInfoVDSCommandParameters.class ) ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateSuccess ( command ) ; }

Target:
public void testSwitchStorageDomainType ( ) { org.ovirt.engine.core.common.businessentities.StorageDomainStatic sdStatic = command.getStorageDomain ( ) . getStorageStaticData ( ) ; org.mockito.Mockito.doReturn ( new org.ovirt.engine.core.common.utils.Pair ( sdStatic , sdStatic.getId ( ) ) ) . when ( command ) . executeHSMGetStorageDomainInfo ( org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.common.vdscommands.HSMGetStorageDomainInfoVDSCommandParameters.class ) ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateSuccess ( command ) ; }
Source:
public void setup ( ) { command.setCluster ( new org.ovirt.engine.core.common.businessentities.Cluster ( ) ) ; org.ovirt.engine.core.common.businessentities.VmStatic vmStatic = new org.ovirt.engine.core.common.businessentities.VmStatic ( ) ; vmStatic.setClusterId ( clusterId ) ; org.mockito.Mockito.doReturn ( vmStatic ) . when ( vmStaticDao ) . get ( org.mockito.ArgumentMatchers.any ( ) ) ; }

Target:
public void setup ( ) { command.setCluster ( new org.ovirt.engine.core.common.businessentities.Cluster ( ) ) ; org.ovirt.engine.core.common.businessentities.VmStatic vmStatic = new org.ovirt.engine.core.common.businessentities.VmStatic ( ) ; vmStatic.setClusterId ( clusterId ) ; vmStatic.setId ( vmId ) ; org.mockito.Mockito.doReturn ( java.util.Collections.singletonList ( vmStatic ) ) . when ( vmStaticDao ) . getByIds ( org.mockito.ArgumentMatchers.any ( ) ) ; }
Source:
private static void setNewIdInImportedCollections ( org.ovirt.engine.core.common.businessentities.VmBase entity ) { for ( org.ovirt.engine.core.common.businessentities.VmDevice managedDevice : entity.getManagedDeviceMap ( ) . values ( ) ) { if ( ! ( org.ovirt.engine.core.bll.utils.VmDeviceUtils.isDiskOrInterface ( managedDevice ) ) ) { managedDevice.setId ( new org.ovirt.engine.core.common.businessentities.VmDeviceId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , entity.getId ( ) ) ) ; } } for ( org.ovirt.engine.core.common.businessentities.VmDevice unMnagedDevice : entity.getUnmanagedDeviceList ( ) ) { unMnagedDevice.setId ( new org.ovirt.engine.core.common.businessentities.VmDeviceId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , entity.getId ( ) ) ) ; } }

Target:
private static void setNewIdInImportedCollections ( org.ovirt.engine.core.common.businessentities.VmBase vmBase ) { for ( org.ovirt.engine.core.common.businessentities.VmDevice managedDevice : vmBase.getManagedDeviceMap ( ) . values ( ) ) { if ( ! ( org.ovirt.engine.core.bll.utils.VmDeviceUtils.isDiskOrInterface ( managedDevice ) ) ) { managedDevice.setId ( new org.ovirt.engine.core.common.businessentities.VmDeviceId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , vmBase.getId ( ) ) ) ; } } for ( org.ovirt.engine.core.common.businessentities.VmDevice unmanagedDevice : vmBase.getUnmanagedDeviceList ( ) ) { unmanagedDevice.setId ( new org.ovirt.engine.core.common.businessentities.VmDeviceId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , vmBase.getId ( ) ) ) ; } }
Source:
private boolean containsDefaultCluster ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VDSGroup > clusters = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVdsGroupDAO ( ) . getAllForStoragePool ( org.ovirt.engine.core.bll.storage.UpdateStoragePoolCommand.getStoragePool ( ) . getId ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.VDSGroup cluster : clusters ) { if ( cluster.getId ( ) . equals ( VDSGroup.DEFAULT_VDS_GROUP_ID ) ) { return true ; } } return false ; }

Target:
protected boolean isStoragePoolVersionSupported ( ) { return org.ovirt.engine.core.bll.utils.VersionSupport.checkVersionSupported ( org.ovirt.engine.core.bll.storage.UpdateStoragePoolCommand.getStoragePool ( ) . getcompatibility_version ( ) ) ; }
Source:
public void testUpdateConfig ( ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterGeoRepSessionConfiguration sessionConfig = getGlusterGeoRepSessionConfig ( ) ; dao.saveConfig ( sessionConfig ) ; sessionConfig.setValue ( "NEW_VAL" ) ; dao.updateConfig ( sessionConfig ) ; java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterGeoRepSessionConfiguration > fetchedSessionConfig = dao.getGeoRepSessionConfig ( FixturesTool.GLUSTER_GEOREP_SESSION_ID ) ; org.junit.Assert.assertEquals ( "NEW_VAL" , fetchedSessionConfig.get ( 0 ) . getValue ( ) ) ; }

Target:
public void testUpdateConfig ( ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterGeoRepSessionConfiguration sessionConfig = getGlusterGeoRepSessionConfig ( ) ; dao.saveConfig ( sessionConfig ) ; sessionConfig.setValue ( "NEW_VAL" ) ; dao.updateConfig ( sessionConfig ) ; java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterGeoRepSessionConfiguration > fetchedSessionConfig = dao.getGeoRepSessionConfig ( FixturesTool.GLUSTER_GEOREP_SESSION_ID ) ; org.junit.jupiter.api.Assertions.assertEquals ( "NEW_VAL" , fetchedSessionConfig.get ( 0 ) . getValue ( ) ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc desktopLock ( java.lang.String vmId ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.desktopLock ( vmId ) ; 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 hotPlugNic ( java.util.Map info ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.hotplugNic ( info ) ; 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:
public void testExportWithStorageDomainName ( ) throws java.lang.Exception { setUpGetEntityExpectations ( ( "Storage: name=" + ( NAMES [ 2 ] ) ) , SearchType.StorageDomain , getStorageDomain ( 2 ) ) ; org.ovirt.engine.api.model.StorageDomain storageDomain = new org.ovirt.engine.api.model.StorageDomain ( ) ; storageDomain.setName ( NAMES [ 2 ] ) ; doTestExport ( storageDomain , false , false ) ; }

Target:
public void testMoveWithStorageDomainName ( ) throws java.lang.Exception { setUpEntityQueryExpectations ( VdcQueryType.GetStorageDomainByName , org.ovirt.engine.core.common.queries.NameQueryParameters.class , new java.lang.String [ ] { "Name" } , new java.lang.Object [ ] { NAMES [ 2 ] } , getStorageDomainStatic ( 2 ) ) ; org.ovirt.engine.api.model.StorageDomain storageDomain = new org.ovirt.engine.api.model.StorageDomain ( ) ; storageDomain.setName ( NAMES [ 2 ] ) ; doTestMove ( storageDomain ) ; }
Source:
public org.ovirt.engine.core.bll.ValidationResult interfaceIsBondOrNull ( ) { java.lang.String ifaceName = ( ( iface ) == null ) ? "null" : iface.getName ( ) ; return org.ovirt.engine.core.bll.ValidationResult.failWith ( EngineMessage.NETWORK_INTERFACE_IS_NOT_BOND , org.ovirt.engine.core.utils.ReplacementUtils.createSetVariableString ( org.ovirt.engine.core.bll.validator.HostInterfaceValidator.VAR_NETWORK_INTERFACE_IS_NOT_BOND_ENTITY , ifaceName ) ) . when ( ( ( ( iface ) != null ) && ( ! ( iface.isBond ( ) ) ) ) ) ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult interfaceIsBondOrNull ( ) { java.lang.String ifaceName = ( ( iface ) == null ) ? "null" : iface.getName ( ) ; final org.ovirt.engine.core.common.errors.EngineMessage engineMessage = org.ovirt.engine.core.common.errors.EngineMessage.NETWORK_INTERFACE_IS_NOT_BOND ; return org.ovirt.engine.core.bll.ValidationResult.failWith ( engineMessage , org.ovirt.engine.core.utils.ReplacementUtils.getVariableAssignmentString ( engineMessage , ifaceName ) ) . when ( ( ( ( iface ) != null ) && ( ! ( iface.isBond ( ) ) ) ) ) ; }
Source:
public void OnTimer ( ) { try { org.ovirt.engine.core.bll.AuditLogCleanupManager.log.info ( "Start deleteAgedOutAuditLogs" ) ; org.ovirt.engine.core.compat.DateTime latestTimeToKeep = org.ovirt.engine.core.compat.DateTime.getNow ( ) . AddDays ( ( ( org.ovirt.engine.core.common.config.Config.< java.lang.Integer > GetValue ( ConfigValues.AuditLogAgingThreshold ) ) * ( - 1 ) ) ) ; org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getAuditLogDao ( ) . removeAllBeforeDate ( latestTimeToKeep ) ; org.ovirt.engine.core.bll.AuditLogCleanupManager.log.info ( "Finished deleteAgedOutAuditLogs" ) ; } catch ( java.lang.RuntimeException e ) { org.ovirt.engine.core.bll.AuditLogCleanupManager.log.error ( "deleteAgedOutAuditLog failed with exception" , e ) ; } }

Target:
public void onTimer ( ) { try { org.ovirt.engine.core.bll.AuditLogCleanupManager.log.info ( "Start deleteAgedOutAuditLogs" ) ; org.ovirt.engine.core.compat.DateTime latestTimeToKeep = org.ovirt.engine.core.compat.DateTime.getNow ( ) . addDays ( ( ( org.ovirt.engine.core.common.config.Config.< java.lang.Integer > GetValue ( ConfigValues.AuditLogAgingThreshold ) ) * ( - 1 ) ) ) ; org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getAuditLogDao ( ) . removeAllBeforeDate ( latestTimeToKeep ) ; org.ovirt.engine.core.bll.AuditLogCleanupManager.log.info ( "Finished deleteAgedOutAuditLogs" ) ; } catch ( java.lang.RuntimeException e ) { org.ovirt.engine.core.bll.AuditLogCleanupManager.log.error ( "deleteAgedOutAuditLog failed with exception" , e ) ; } }
Source:
public void testRemoveVdsFromExistingAffinityGroup ( ) { org.ovirt.engine.core.common.scheduling.AffinityGroup existing = dao.get ( FixturesTool.EXISTING_AFFINITY_GROUP_ID ) ; org.junit.Assert.assertFalse ( existing.getVdsEntityNames ( ) . isEmpty ( ) ) ; existing.getVdsIds ( ) . clear ( ) ; dao.update ( existing ) ; org.ovirt.engine.core.common.scheduling.AffinityGroup fetched = dao.get ( existing.getId ( ) ) ; org.junit.Assert.assertTrue ( fetched.getVdsEntityNames ( ) . isEmpty ( ) ) ; }

Target:
public void testRemoveVdsFromExistingAffinityGroup ( ) { org.ovirt.engine.core.common.scheduling.AffinityGroup existing = dao.get ( FixturesTool.EXISTING_AFFINITY_GROUP_ID ) ; org.junit.jupiter.api.Assertions.assertFalse ( existing.getVdsEntityNames ( ) . isEmpty ( ) ) ; existing.getVdsIds ( ) . clear ( ) ; dao.update ( existing ) ; org.ovirt.engine.core.common.scheduling.AffinityGroup fetched = dao.get ( existing.getId ( ) ) ; org.junit.jupiter.api.Assertions.assertTrue ( fetched.getVdsEntityNames ( ) . isEmpty ( ) ) ; }
Source:
private void mockGetImageDomainsListVdsCommand ( ) { java.util.ArrayList < org.ovirt.engine.core.compat.Guid > guids = new java.util.ArrayList < org.ovirt.engine.core.compat.Guid > ( 1 ) ; guids.add ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; org.ovirt.engine.core.common.vdscommands.VDSReturnValue returnValue = new org.ovirt.engine.core.common.vdscommands.VDSReturnValue ( ) ; returnValue.setReturnValue ( guids ) ; org.mockito.Mockito.when ( vdsBrokerFrontend.RunVdsCommand ( org.mockito.Matchers.eq ( VDSCommandType.GetImageDomainsList ) , org.mockito.Matchers.< org.ovirt.engine.core.common.vdscommands.VDSParametersBase > any ( org.ovirt.engine.core.common.vdscommands.VDSParametersBase.class ) ) ) . thenReturn ( returnValue ) ; }

Target:
private org.ovirt.engine.core.common.businessentities.VDSGroup createVdsGroup ( ) { if ( ( vdsGroup ) == null ) { vdsGroup = new org.ovirt.engine.core.common.businessentities.VDSGroup ( ) ; vdsGroup.setvds_group_id ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; vdsGroup.setcompatibility_version ( Version.v3_3 ) ; vdsGroup.setcpu_name ( "Intel Conroe Family" ) ; vdsGroup.setArchitecture ( ArchitectureType.x86_64 ) ; } return vdsGroup ; }
Source:
protected org.ovirt.engine.api.model.StorageDomain populate ( org.ovirt.engine.api.model.StorageDomain model , org.ovirt.engine.core.common.businessentities.storage_domains entity ) { if ( StorageDomainSharedStatus.Unattached.equals ( entity.getstorage_domain_shared_status ( ) ) ) { model.setStatus ( org.ovirt.engine.api.common.util.StatusUtils.create ( StorageDomainStatus.UNATTACHED ) ) ; } else { model.setStatus ( null ) ; } return super . populate ( model , entity ) ; }

Target:
protected org.ovirt.engine.api.model.StorageDomain deprecatedPopulate ( org.ovirt.engine.api.model.StorageDomain model , org.ovirt.engine.api.model.StorageDomain entity ) { if ( StorageDomainSharedStatus.Unattached.equals ( entity.getStorageDomainSharedStatus ( ) ) ) { model.setStatus ( org.ovirt.engine.api.common.util.StatusUtils.create ( StorageDomainStatus.UNATTACHED ) ) ; } else { model.setStatus ( null ) ; } return super . deprecatedPopulate ( model , entity ) ; }
Source:
public static void GetVmById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid vmId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVmByVmId , new org.ovirt.engine.core.common.queries.GetVmByVmIdParameters ( vmId ) , aQuery ) ; }

Target:
public static java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VolumeType > GetVolumeTypeList ( ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VolumeType > ( java.util.Arrays.asList ( new org.ovirt.engine.core.common.businessentities.VolumeType [ ] { org.ovirt.engine.core.common.businessentities.VolumeType.Preallocated , org.ovirt.engine.core.common.businessentities.VolumeType.Sparse } ) ) ; }
Source:
public void liveMigrateDisk ( ) { command.getParameters ( ) . setParametersList ( createMoveDisksParameters ( ) ) ; initDiskImage ( diskImageId ) ; initVm ( VMStatus.Up , org.ovirt.engine.core.compat.Guid.newGuid ( ) , diskImageId ) ; org.junit.Assert.assertTrue ( command.canDoAction ( ) ) ; org.junit.Assert.assertFalse ( command.getLiveMigrateDisksParametersList ( ) . isEmpty ( ) ) ; }

Target:
public void liveMigrateDisk ( ) { command.getParameters ( ) . setParametersList ( createMoveDisksParameters ( ) ) ; initDiskImage ( diskImageId ) ; initVm ( VMStatus.Up , org.ovirt.engine.core.compat.Guid.newGuid ( ) , diskImageId ) ; command.updateParameters ( ) ; org.junit.Assert.assertTrue ( ( ( command.getLiveMigrateVmDisksParametersList ( ) . size ( ) ) == 1 ) ) ; }
Source:
public void testEvalDifferentName ( ) { org.mockito.Mockito.when ( mockOtherIface.getName ( ) ) . thenReturn ( ( "not" + ( org.ovirt.engine.core.vdsbroker.vdsbroker.predicates.DisplayInterfaceEqualityPredicateTest.TEST_INTERFACE_NAME ) ) ) ; org.mockito.Mockito.when ( mockOtherIface.getIpv4Address ( ) ) . thenReturn ( org.ovirt.engine.core.vdsbroker.vdsbroker.predicates.DisplayInterfaceEqualityPredicateTest.TEST_INTERFACE_ADDRESS ) ; org.junit.Assert.assertFalse ( underTest.test ( mockOtherIface ) ) ; }

Target:
public void testEvalDifferentName ( ) { org.mockito.Mockito.when ( mockOtherIface.getName ( ) ) . thenReturn ( ( "not" + ( org.ovirt.engine.core.vdsbroker.vdsbroker.predicates.DisplayInterfaceEqualityPredicateTest.TEST_INTERFACE_NAME ) ) ) ; org.mockito.Mockito.when ( mockOtherIface.getIpv4Address ( ) ) . thenReturn ( org.ovirt.engine.core.vdsbroker.vdsbroker.predicates.DisplayInterfaceEqualityPredicateTest.TEST_INTERFACE_ADDRESS ) ; org.junit.jupiter.api.Assertions.assertFalse ( underTest.test ( mockOtherIface ) ) ; }
Source:
public void getGlusterBricksForServer ( 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.GlusterBrickEntity > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterVolumeBricksByServerId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( serverId ) , aQuery ) ; }

Target:
public void getGlusterHostsNewlyAdded ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId , boolean isFingerprintRequired ) { 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.GetAddedGlusterServers , new org.ovirt.engine.core.common.queries.gluster.AddedGlusterServersParameters ( clusterId , isFingerprintRequired ) , aQuery ) ; }
Source:
public static void getUpHostListByCluster ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String clusterName ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > list = org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.VDS > cast ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.IVdcQueryable > ) ( source ) ) ) ; return list ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ( ) ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getUpHostListByCluster ( aQuery , clusterName , null ) ; }

Target:
public static void getStorageDomainsByConnection ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , java.lang.String connectionPath ) { 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.StorageDomain > ) ( source ) ) : null ; } } ; org.ovirt.engine.core.common.queries.GetStorageDomainsByConnectionParameters param = new org.ovirt.engine.core.common.queries.GetStorageDomainsByConnectionParameters ( ) ; param.setConnection ( connectionPath ) ; if ( storagePoolId != null ) { param.setStoragePoolId ( storagePoolId ) ; } org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageDomainsByConnection , param , aQuery ) ; }
Source:
public static void getVnicProfilesByDcId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dcId ) { 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.VnicProfileView > ( ) ; } return source ; } } ; } org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVnicProfilesByDataCenterId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dcId ) , aQuery ) ; }

Target:
public void getVmGuestAgentInterfacesByVmId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid vmId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmGuestAgentInterface > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmGuestAgentInterfacesByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) . withoutRefresh ( ) , aQuery ) ; }
Source:
protected void doTestBadRemove ( boolean valid , boolean success , java.lang.String detail ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpEntityQueryExpectations ( 1 ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.DetachDiskFromVm , org.ovirt.engine.core.common.action.AttachDetachVmDiskParameters.class , new java.lang.String [ ] { "VmId" , "EntityInfo" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendVmDiskResourceTest.VM_ID , new org.ovirt.engine.core.common.asynctasks.EntityInfo ( org.ovirt.engine.core.common.VdcObjectType.Disk , org.ovirt.engine.api.restapi.resource.BackendVmDiskResourceTest.DISK_ID ) } , valid , success ) ) ; try { resource.remove ( ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , detail ) ; } }

Target:
protected void doTestBadRemove ( boolean valid , boolean success , java.lang.String detail ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpEntityQueryExpectations ( 1 ) ; setUriInfo ( setUpActionExpectations ( ActionType.DetachDiskFromVm , org.ovirt.engine.core.common.action.AttachDetachVmDiskParameters.class , new java.lang.String [ ] { "VmId" , "EntityInfo" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendVmDiskResourceTest.VM_ID , new org.ovirt.engine.core.common.asynctasks.EntityInfo ( org.ovirt.engine.core.common.VdcObjectType.Disk , org.ovirt.engine.api.restapi.resource.BackendVmDiskResourceTest.DISK_ID ) } , valid , success ) ) ; try { resource.remove ( ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , detail ) ; } }
Source:
private boolean validateImageConfig ( java.util.List < java.lang.String > canDoActionMessages , java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.StorageDomain > domainsMap , org.ovirt.engine.core.common.businessentities.storage.DiskImage image ) { return org.ovirt.engine.core.bll.ImagesHandler.checkImageConfiguration ( domainsMap.get ( imageToDestinationDomainMap.get ( image.getId ( ) ) ) . getStorageStaticData ( ) , image , canDoActionMessages ) ; }

Target:
private boolean validateImageConfig ( java.util.List < java.lang.String > canDoActionMessages , java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.StorageDomain > domainsMap , org.ovirt.engine.core.common.businessentities.storage.DiskImage image ) { return org.ovirt.engine.core.bll.storage.disk.image.ImagesHandler.checkImageConfiguration ( domainsMap.get ( imageToDestinationDomainMap.get ( image.getId ( ) ) ) . getStorageStaticData ( ) , image , canDoActionMessages ) ; }
Source:
public void testConnection ( ) { org.ovirt.engine.core.common.queries.VdcQueryReturnValue retVal = org.ovirt.engine.core.bll.Backend.getInstance ( ) . runInternalQuery ( VdcQueryType.GetVmsFromExternalProvider , buildGetVmsFromExternalProviderQueryParameters ( ) ) ; if ( ! ( retVal.getSucceeded ( ) ) ) { throw new org.ovirt.engine.core.common.errors.EngineException ( org.ovirt.engine.core.common.errors.EngineError.PROVIDER_FAILURE , retVal.getExceptionString ( ) ) ; } }

Target:
public void testConnection ( ) { chooseDcForCheckingIfGetNamesFromExternalProviderSupported ( ) ; org.ovirt.engine.core.common.queries.VdcQueryReturnValue retVal = org.ovirt.engine.core.bll.Backend.getInstance ( ) . runInternalQuery ( VdcQueryType.GetVmsFromExternalProvider , buildGetVmsFromExternalProviderQueryParameters ( ) ) ; if ( ! ( retVal.getSucceeded ( ) ) ) { throw new org.ovirt.engine.core.common.errors.EngineException ( org.ovirt.engine.core.common.errors.EngineError.PROVIDER_FAILURE , retVal.getExceptionString ( ) ) ; } }
Source:
public static boolean interfaceHasVlan ( org.ovirt.engine.core.common.businessentities.VdsNetworkInterface iface , java.util.List < org.ovirt.engine.core.common.businessentities.VdsNetworkInterface > allIfaces ) { for ( org.ovirt.engine.core.common.businessentities.VdsNetworkInterface i : allIfaces ) { if ( ( ( i.getVlanId ( ) ) != null ) && ( org.ovirt.engine.core.utils.NetworkUtils.StripVlan ( i.getName ( ) ) . equals ( iface.getName ( ) ) ) ) { return true ; } } return false ; }

Target:
public static boolean interfaceHasVlan ( org.ovirt.engine.core.common.businessentities.VdsNetworkInterface iface , java.util.List < org.ovirt.engine.core.common.businessentities.VdsNetworkInterface > allIfaces ) { for ( org.ovirt.engine.core.common.businessentities.VdsNetworkInterface i : allIfaces ) { if ( ( ( i.getVlanId ( ) ) != null ) && ( org.ovirt.engine.core.utils.NetworkUtils.interfaceBasedOn ( i.getName ( ) , iface.getName ( ) ) ) ) { return true ; } } return false ; }
Source:
private void addStyles ( ) { overrideIpTablesEditor.addContentWidgetStyleName ( style.overrideIpStyle ( ) ) ; }

Target:
private void addStyles ( ) { overrideIpTablesEditor.addContentWidgetStyleName ( style.overrideIpStyle ( ) ) ; externalHostProviderEnabledEditor.addContentWidgetStyleName ( style.checkBox ( ) ) ; providerSearchFilterEditor.addContentWidgetStyleName ( style.searchFilter ( ) ) ; providerSearchFilterEditor.setStyleName ( style.searchFilterLabel ( ) ) ; providerSearchFilterEditor.setLabelStyleName ( style.emptyEditor ( ) ) ; providerSearchFilterLabel.addContentWidgetStyleName ( style.emptyEditor ( ) ) ; providerSearchFilterLabel.setStyleName ( style.searchFilterLabel ( ) ) ; }
Source:
public java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.VdcObjectType > getJobSubjectEntityByJobId ( org.ovirt.engine.core.compat.Guid jobId ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) . addValue ( "job_id" , jobId ) ; java.util.List < org.ovirt.engine.core.dao.JobSubjectEntityDaoFacadeImpl.JobSubjectEntity > list = getCallsHandler ( ) . executeReadList ( "GetJobSubjectEntityByJobId" , org.ovirt.engine.core.dao.JobSubjectEntityDaoFacadeImpl.jobSubjectEntityRowMapper , parameterSource ) ; java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.VdcObjectType > entityMap = new java.util.HashMap < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.VdcObjectType > ( ) ; for ( org.ovirt.engine.core.dao.JobSubjectEntityDaoFacadeImpl.JobSubjectEntity jobSubjectEntity : list ) { entityMap.put ( jobSubjectEntity.getEntityId ( ) , jobSubjectEntity.getEntityType ( ) ) ; } return entityMap ; }

Target:
public java.util.List < org.ovirt.engine.core.compat.Guid > getJobIdByEntityId ( org.ovirt.engine.core.compat.Guid entityId ) { return multipleResults ( entityManager.createNamedQuery ( "JobSubjectEntity.getJobIdByEntityId" ) . setParameter ( "entityId" , entityId ) ) ; }
Source:
public void edit ( org.ovirt.engine.ui.uicommonweb.models.storage.GlusterStorageModel object ) { org.ovirt.engine.ui.webadmin.section.main.view.popup.storage.GlusterStorageView.Driver.driver.edit ( object ) ; pathExampleLabel.setVisible ( ( ( object.getPath ( ) . getIsAvailable ( ) ) && ( object.getPath ( ) . getIsChangable ( ) ) ) ) ; StyleTextBoxEditor ( pathEditor , object.getPath ( ) ) ; StyleTextBoxEditor ( vfsTypeEditor , object.getVfsType ( ) ) ; StyleTextBoxEditor ( mountOptionsEditor , object.getMountOptions ( ) ) ; }

Target:
void localize ( ) { pathEditor.setLabel ( org.ovirt.engine.ui.webadmin.section.main.view.popup.storage.GlusterStorageView.constants.storagePopupPosixPathLabel ( ) ) ; pathExampleLabel.setText ( org.ovirt.engine.ui.webadmin.section.main.view.popup.storage.GlusterStorageView.constants.storagePopupGlusterPathExampleLabel ( ) ) ; vfsTypeEditor.setLabel ( org.ovirt.engine.ui.webadmin.section.main.view.popup.storage.GlusterStorageView.constants.storagePopupVfsTypeLabel ( ) ) ; mountOptionsEditor.setLabel ( org.ovirt.engine.ui.webadmin.section.main.view.popup.storage.GlusterStorageView.constants.storagePopupMountOptionsLabel ( ) ) ; }
Source:
protected boolean isNotLocalData ( final boolean isInternal ) { boolean returnValue = true ; if ( ( ( ( this . getStoragePool ( ) . getStorageType ( ) ) == ( org.ovirt.engine.core.common.businessentities.StorageType.LOCALFS ) ) && ( ( org.ovirt.engine.core.bll.storage.StorageDomainCommandBase.getStorageDomain ( ) . getStorageDomainType ( ) ) == ( org.ovirt.engine.core.common.businessentities.StorageDomainType.Data ) ) ) && ( ! isInternal ) ) { returnValue = false ; addCanDoActionMessage ( VdcBllMessages.VDS_GROUP_CANNOT_DETACH_DATA_DOMAIN_FROM_LOCAL_STORAGE ) ; } return returnValue ; }

Target:
protected boolean isNotLocalData ( final boolean isInternal ) { boolean returnValue = true ; if ( ( ( this . getStoragePool ( ) . isLocal ( ) ) && ( ( org.ovirt.engine.core.bll.storage.StorageDomainCommandBase.getStorageDomain ( ) . getStorageDomainType ( ) ) == ( org.ovirt.engine.core.common.businessentities.StorageDomainType.Data ) ) ) && ( ! isInternal ) ) { returnValue = false ; addCanDoActionMessage ( VdcBllMessages.VDS_GROUP_CANNOT_DETACH_DATA_DOMAIN_FROM_LOCAL_STORAGE ) ; } return returnValue ; }
Source:
private void logHostFailToResponde ( org.ovirt.engine.core.vdsbroker.vdsbroker.VDSNetworkException ex , long timeoutToFence ) { org.ovirt.engine.core.vdsbroker.VdsManager.log.info ( ( "Server failed to respond, vds_id='{}', vds_name='{}', vm_count={}, " + "spm_status='{}', non-responsive_timeout (seconds)={}, error: {}" ) , cachedVds.getId ( ) , cachedVds.getName ( ) , cachedVds.getVmCount ( ) , cachedVds.getSpmStatus ( ) , java.util.concurrent.TimeUnit.MILLISECONDS.toSeconds ( timeoutToFence ) , ex.getMessage ( ) ) ; org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase logable ; logable = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( cachedVds.getId ( ) ) ; logable.updateCallStackFromThrowable ( ex ) ; org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.log ( logable , AuditLogType.VDS_FAILURE ) ; }

Target:
private void logHostFailToRespond ( org.ovirt.engine.core.vdsbroker.vdsbroker.VDSNetworkException ex , long timeoutToFence ) { org.ovirt.engine.core.vdsbroker.VdsManager.log.info ( ( "Server failed to respond, vds_id='{}', vds_name='{}', vm_count={}, " + "spm_status='{}', non-responsive_timeout (seconds)={}, error: {}" ) , cachedVds.getId ( ) , cachedVds.getName ( ) , cachedVds.getVmCount ( ) , cachedVds.getSpmStatus ( ) , java.util.concurrent.TimeUnit.MILLISECONDS.toSeconds ( timeoutToFence ) , ex.getMessage ( ) ) ; org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase logable ; logable = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( cachedVds.getId ( ) ) ; logable.updateCallStackFromThrowable ( ex ) ; auditLogDirector.log ( logable , AuditLogType.VDS_FAILURE ) ; }
Source:
private org.ovirt.engine.ui.frontend.server.dashboard.Inventory populateInventoryCache ( ) throws org.ovirt.engine.ui.frontend.server.dashboard.DashboardDataException { long startTime = java.lang.System.currentTimeMillis ( ) ; org.ovirt.engine.ui.frontend.server.dashboard.Inventory inventory = lookupInventory ( ) ; long endTime = java.lang.System.currentTimeMillis ( ) ; org.ovirt.engine.ui.frontend.server.dashboard.DashboardDataServlet.inventoryCache.put ( org.ovirt.engine.ui.frontend.server.dashboard.DashboardDataServlet.INVENTORY_KEY , inventory , org.ovirt.engine.ui.frontend.server.dashboard.DashboardDataServlet.INVENTORY_CACHE_UPDATE_INTERVAL , java.util.concurrent.TimeUnit.SECONDS ) ; org.ovirt.engine.ui.frontend.server.dashboard.DashboardDataServlet.log.debug ( "Dashboard inventoy cache updated in {}ms" , ( endTime - startTime ) ) ; return inventory ; }

Target:
private org.ovirt.engine.ui.frontend.server.dashboard.Inventory populateInventoryCache ( ) throws org.ovirt.engine.ui.frontend.server.dashboard.DashboardDataException { long startTime = java.lang.System.currentTimeMillis ( ) ; org.ovirt.engine.ui.frontend.server.dashboard.Inventory inventory = lookupInventory ( ) ; long endTime = java.lang.System.currentTimeMillis ( ) ; if ( enableBackgroundCacheUpdate ) { inventoryCache.put ( org.ovirt.engine.ui.frontend.server.dashboard.DashboardDataServlet.INVENTORY_KEY , inventory ) ; } else { inventoryCache.put ( org.ovirt.engine.ui.frontend.server.dashboard.DashboardDataServlet.INVENTORY_KEY , inventory , org.ovirt.engine.ui.frontend.server.dashboard.DashboardDataServlet.INVENTORY_CACHE_UPDATE_INTERVAL , java.util.concurrent.TimeUnit.SECONDS ) ; } org.ovirt.engine.ui.frontend.server.dashboard.DashboardDataServlet.log.debug ( "Dashboard inventoy cache updated in {}ms" , ( endTime - startTime ) ) ; return inventory ; }
Source:
private void persistEngineSession ( java.lang.String sessionId ) { org.ovirt.engine.core.bll.aaa.SessionDataContainer.SessionInfo sessionInfo = getSessionInfo ( sessionId ) ; if ( sessionInfo != null ) { sessionInfo.contentOfSession.put ( org.ovirt.engine.core.bll.aaa.SessionDataContainer.ENGINE_SESSION_SEQ_ID , engineSessionDao.save ( new org.ovirt.engine.core.common.businessentities.EngineSession ( getUser ( sessionId , false ) , sessionId ) ) ) ; } }

Target:
private void persistEngineSession ( java.lang.String sessionId ) { org.ovirt.engine.core.bll.aaa.SessionDataContainer.SessionInfo sessionInfo = getSessionInfo ( sessionId ) ; if ( sessionInfo != null ) { sessionInfo.contentOfSession.put ( org.ovirt.engine.core.bll.aaa.SessionDataContainer.ENGINE_SESSION_SEQ_ID , engineSessionDao.save ( new org.ovirt.engine.core.common.businessentities.EngineSession ( getUser ( sessionId , false ) , sessionId , getSourceIp ( sessionId ) ) ) ) ; } }