auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
protected void handleError ( java.lang.Exception e , org.ovirt.engine.core.common.businessentities.VDSStatus status ) { log.errorFormat ( "Host installation failed for host {0}, {1}." , org.ovirt.engine.core.bll.VdsCommand.getVds ( ) . getId ( ) , org.ovirt.engine.core.bll.VdsCommand.getVds ( ) . getName ( ) , e ) ; setVdsStatus ( status ) ; org.ovirt.engine.core.bll.VdsCommand.setSucceeded ( false ) ; _failureMessage = e.getMessage ( ) ; }

Target:
protected void handleError ( java.lang.Exception e , org.ovirt.engine.core.common.businessentities.VDSStatus status ) { log.error ( "Host installation failed for host '{}', '{}': {}" , org.ovirt.engine.core.bll.VdsCommand.getVds ( ) . getId ( ) , org.ovirt.engine.core.bll.VdsCommand.getVds ( ) . getName ( ) , e.getMessage ( ) ) ; log.debug ( "Exception" , e ) ; setVdsStatus ( status ) ; org.ovirt.engine.core.bll.VdsCommand.setSucceeded ( false ) ; _failureMessage = e.getMessage ( ) ; }
Source:
public void testValidateNoVM ( ) { org.ovirt.engine.core.common.action.WatchdogParameters params = new org.ovirt.engine.core.common.action.WatchdogParameters ( ) ; params.setId ( new org.ovirt.engine.core.compat.Guid ( "a09f57b1-5739-4352-bf88-a6f834ed46db" ) ) ; params.setAction ( VmWatchdogAction.PAUSE ) ; params.setModel ( vmWatchdogType ) ; final org.ovirt.engine.core.dao.VmDao vmDaoMock = org.mockito.Mockito.mock ( org.ovirt.engine.core.dao.VmDao.class ) ; org.ovirt.engine.core.bll.UpdateWatchdogCommand command = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.UpdateWatchdogCommand ( params , null ) ) ; org.mockito.Mockito.doReturn ( vmDaoMock ) . when ( command ) . getVmDao ( ) ; org.junit.Assert.assertFalse ( command.validate ( ) ) ; }

Target:
public static void setUpOsRepository ( ) { org.ovirt.engine.core.common.osinfo.OsRepository osRepository = org.mockito.Mockito.mock ( org.ovirt.engine.core.common.osinfo.OsRepository.class ) ; org.ovirt.engine.core.common.utils.SimpleDependencyInjector.getInstance ( ) . bind ( org.ovirt.engine.core.common.osinfo.OsRepository.class , osRepository ) ; org.mockito.Mockito.when ( osRepository.getVmWatchdogTypes ( org.mockito.Matchers.any ( java.lang.Integer.class ) , org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Version.class ) ) ) . thenReturn ( org.ovirt.engine.core.bll.UpdateWatchdogCommandTest.WATCHDOG_MODELS ) ; }
Source:
public void copyDataTo ( ovirt_engine_dwh.configurationsync_3_5.ConfigurationSync.delete_usersStruct other ) { other.user_join_id = this . user_join_id ; other.first_name = this . first_name ; other.last_name = this . last_name ; other.domain = this . domain ; other.username = this . username ; other.department = this . department ; other.user_role_title = this . user_role_title ; other.email = this . email ; other.external_id = this . external_id ; other.active = this . active ; other.create_date = this . create_date ; other.update_date = this . update_date ; other.delete_date = this . delete_date ; }

Target:
public void copyDataTo ( ovirt_engine_dwh.configurationsync_3_5.ConfigurationSync.delete_usersStruct other ) { other.user_id = this . user_id ; other.first_name = this . first_name ; other.last_name = this . last_name ; other.domain = this . domain ; other.username = this . username ; other.department = this . department ; other.user_role_title = this . user_role_title ; other.email = this . email ; other.external_id = this . external_id ; other.active = this . active ; other.create_date = this . create_date ; other.update_date = this . update_date ; other.delete_date = this . delete_date ; }
Source:
protected void ExecuteQuery ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.AdUser > results = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.AdUser > ( ) ; for ( org.ovirt.engine.core.compat.Guid guid : getUserIds ( ) ) { org.ovirt.engine.core.common.businessentities.AdUser user = org.ovirt.engine.core.bll.adbroker.InternalBrokerUtils.getUserByUserGuid ( guid ) ; if ( user != null ) { results.add ( user ) ; } } setReturnValue ( results ) ; setSucceeded ( true ) ; }

Target:
protected void ExecuteQuery ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.LdapUser > results = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.LdapUser > ( ) ; for ( org.ovirt.engine.core.compat.Guid guid : getUserIds ( ) ) { org.ovirt.engine.core.common.businessentities.LdapUser user = org.ovirt.engine.core.bll.adbroker.InternalBrokerUtils.getUserByUserGuid ( guid ) ; if ( user != null ) { results.add ( user ) ; } } setReturnValue ( results ) ; setSucceeded ( true ) ; }
Source:
public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmTemplate > list = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmTemplate > ( ) ; if ( source != null ) { for ( org.ovirt.engine.core.common.businessentities.VmTemplate template : ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmTemplate > ) ( source ) ) ) { if ( ( template.getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VmTemplateStatus.OK ) ) { list.add ( template ) ; } } java.util.Collections.sort ( list , new org.ovirt.engine.core.common.businessentities.comparators.NameableComparator ( ) ) ; } return list ; }

Target:
public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmTemplate > list = new java.util.ArrayList < > ( ) ; if ( source != null ) { for ( org.ovirt.engine.core.common.businessentities.VmTemplate template : ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmTemplate > ) ( source ) ) ) { if ( ( template.getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VmTemplateStatus.OK ) ) { list.add ( template ) ; } } java.util.Collections.sort ( list , new org.ovirt.engine.core.common.businessentities.comparators.NameableComparator ( ) ) ; } return list ; }
Source:
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.VDSGroup > list = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ) ( source ) ) ; java.util.Collections.sort ( list , new org.ovirt.engine.core.common.businessentities.comparators.NameableComparator ( ) ) ; return list ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ( ) ; }

Target:
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 ; }
Source:
protected boolean validateSuffix ( java.lang.String suffix , org.ovirt.engine.ui.uicommonweb.models.EntityModel entityModel ) { for ( java.lang.Object object : objectsInSetupMap.values ( ) ) { org.ovirt.engine.core.common.businessentities.VM vm = ( ( org.ovirt.engine.core.common.businessentities.VM ) ( object ) ) ; if ( ! ( validateName ( ( ( vm.getvm_name ( ) ) + suffix ) , vm , entityModel ) ) ) { return false ; } } return true ; }

Target:
protected boolean validateSuffix ( java.lang.String suffix , org.ovirt.engine.ui.uicommonweb.models.EntityModel entityModel ) { for ( java.lang.Object object : objectsInSetupMap.values ( ) ) { org.ovirt.engine.core.common.businessentities.VM vm = ( ( org.ovirt.engine.core.common.businessentities.VM ) ( object ) ) ; if ( ! ( validateName ( ( ( vm.getVmName ( ) ) + suffix ) , vm , entityModel ) ) ) { return false ; } } return true ; }
Source:
public void testValidateNotRemovingUsedNetworkByVmsWhenNotUsedByVms ( ) throws java.lang.Exception { org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidator validator = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidatorTest.HostSetupNetworksValidatorBuilder ( ) . build ( ) ) ; org.mockito.Mockito.when ( findActiveVmsUsingNetwork.findNamesOfActiveVmsUsingNetworks ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) , org.mockito.Matchers.any ( java.util.Collection.class ) ) ) . thenReturn ( java.util.Collections.< java.lang.String > emptyList ( ) ) ; org.junit.Assert.assertThat ( validator.validateNotRemovingUsedNetworkByVms ( "removedNet" ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }

Target:
public void testValidateNotRemovingUsedNetworkByVmsWhenNotUsedByVms ( ) throws java.lang.Exception { org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidator validator = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidatorTest.HostSetupNetworksValidatorBuilder ( ) . build ( ) ) ; org.mockito.Mockito.when ( findActiveVmsUsingNetwork.findNamesOfActiveVmsUsingNetworks ( org.mockito.ArgumentMatchers.any ( ) , org.mockito.ArgumentMatchers.anyCollection ( ) ) ) . thenReturn ( java.util.Collections.emptyList ( ) ) ; org.junit.Assert.assertThat ( validator.validateNotRemovingUsedNetworkByVms ( "removedNet" ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }
Source:
public void setup ( ) { org.mockito.Mockito.doReturn ( proxyLocator ) . when ( validator ) . getProxyLocator ( org.mockito.Mockito.any ( ) ) ; org.mockito.Mockito.doReturn ( backend ) . when ( validator ) . getBackend ( ) ; }

Target:
public void setup ( ) { org.mockito.Mockito.when ( dbFacade.getFenceAgentDao ( ) ) . thenReturn ( fenceAgentDao ) ; org.mockito.Mockito.doReturn ( dbFacade ) . when ( validator ) . getDbFacade ( ) ; org.mockito.Mockito.doReturn ( proxyLocator ) . when ( validator ) . getProxyLocator ( org.mockito.Mockito.any ( ) ) ; org.mockito.Mockito.doReturn ( backend ) . when ( validator ) . getBackend ( ) ; }
Source:
public org.ovirt.engine.core.common.AuditLogType getAuditLogTypeValue ( ) { switch ( org.ovirt.engine.core.bll.network.dc.UpdateNetworkCommand.getActionState ( ) ) { case EXECUTE : return org.ovirt.engine.core.bll.network.dc.UpdateNetworkCommand.getSucceeded ( ) ? org.ovirt.engine.core.common.AuditLogType.NETWORK_UPDATE_NETWORK_STARTED : org.ovirt.engine.core.common.AuditLogType.NETWORK_UPDATE_NETWORK_FAILED ; case END_FAILURE : return hasChildCommands ( ) ? org.ovirt.engine.core.common.AuditLogType.UPDATE_NETWORK_ON_HOSTS_FAILED : super . getAuditLogTypeValue ( ) ; case END_SUCCESS : return org.ovirt.engine.core.common.AuditLogType.NETWORK_UPDATE_NETWORK_FINISHED ; } return super . getAuditLogTypeValue ( ) ; }

Target:
public org.ovirt.engine.core.common.AuditLogType getAuditLogTypeValue ( ) { return org.ovirt.engine.core.bll.network.dc.UpdateNetworkCommand.getSucceeded ( ) ? org.ovirt.engine.core.common.AuditLogType.NETWORK_UPDATE_NETWORK : org.ovirt.engine.core.common.AuditLogType.NETWORK_UPDATE_NETWORK_FAILED ; }
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.RunQuery ( VdcQueryType.GetGlusterHooks , new org.ovirt.engine.core.common.queries.gluster.GlusterParameters ( clusterId ) , aQuery ) ; }

Target:
public static void getAllAttachableDisks ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , 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 != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ( ) ; } } ; org.ovirt.engine.core.common.queries.GetAllAttachableDisks params = new org.ovirt.engine.core.common.queries.GetAllAttachableDisks ( storagePoolId ) ; params.setVmId ( vmId ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllAttachableDisks , params , aQuery ) ; }
Source:
public org.ovirt.engine.core.common.queries.VdcQueryReturnValue runPublicQuery ( org.ovirt.engine.core.common.queries.QueryType queryType , org.ovirt.engine.core.common.queries.VdcQueryParametersBase params ) { org.ovirt.engine.ui.frontend.server.gwt.GenericApiGWTServiceImpl.log.debug ( "Server: runPublicQuery invoked! '{}'" , queryType ) ; if ( ( params.getCorrelationId ( ) ) == null ) { params.setCorrelationId ( org.ovirt.engine.core.utils.CorrelationIdTracker.getCorrelationId ( ) ) ; } debugQuery ( queryType , params ) ; return getBackend ( ) . runPublicQuery ( queryType , params ) ; }

Target:
public org.ovirt.engine.core.common.queries.VdcQueryReturnValue runPublicQuery ( org.ovirt.engine.core.common.queries.QueryType queryType , org.ovirt.engine.core.common.queries.QueryParametersBase params ) { org.ovirt.engine.ui.frontend.server.gwt.GenericApiGWTServiceImpl.log.debug ( "Server: runPublicQuery invoked! '{}'" , queryType ) ; if ( ( params.getCorrelationId ( ) ) == null ) { params.setCorrelationId ( org.ovirt.engine.core.utils.CorrelationIdTracker.getCorrelationId ( ) ) ; } debugQuery ( queryType , params ) ; return getBackend ( ) . runPublicQuery ( queryType , params ) ; }
Source:
public static void mockAsyncDataProvider ( ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider adp = org.ovirt.engine.ui.uicommonweb.models.vms.BaseVmTest.setup.getMocks ( ) . asyncDataProvider ( ) ; org.mockito.Mockito.when ( adp.getConfigValuePreConverted ( ConfigurationValues.VncKeyboardLayoutValidValues ) ) . thenReturn ( java.util.Collections.emptyList ( ) ) ; org.mockito.Mockito.when ( adp.osNameExists ( org.ovirt.engine.ui.uicommonweb.models.vms.BaseVmTest.OS_TYPE ) ) . thenReturn ( true ) ; org.mockito.Mockito.when ( adp.getMaxVmNameLengthWin ( ) ) . thenReturn ( 15 ) ; }

Target:
public static void mockAsyncDataProvider ( ) { org.ovirt.engine.ui.uicommonweb.models.vms.BaseVmTest.adp = org.ovirt.engine.ui.uicommonweb.models.vms.BaseVmTest.setup.getMocks ( ) . asyncDataProvider ( ) ; org.mockito.Mockito.when ( org.ovirt.engine.ui.uicommonweb.models.vms.BaseVmTest.adp.getConfigValuePreConverted ( ConfigurationValues.VncKeyboardLayoutValidValues ) ) . thenReturn ( java.util.Collections.emptyList ( ) ) ; org.mockito.Mockito.when ( org.ovirt.engine.ui.uicommonweb.models.vms.BaseVmTest.adp.osNameExists ( org.ovirt.engine.ui.uicommonweb.models.vms.BaseVmTest.OS_TYPE ) ) . thenReturn ( true ) ; org.mockito.Mockito.when ( org.ovirt.engine.ui.uicommonweb.models.vms.BaseVmTest.adp.getMaxVmNameLengthWin ( ) ) . thenReturn ( 15 ) ; }
Source:
public static void redirectToErrorPage ( javax.servlet.http.HttpServletRequest request , javax.servlet.http.HttpServletResponse response , org.ovirt.engine.core.sso.utils.OAuthException ex ) { org.ovirt.engine.core.sso.utils.SSOUtils.log.error ( "OAuthException {}: {}" , ex.getCode ( ) , ex.getMessage ( ) ) ; org.ovirt.engine.core.sso.utils.SSOUtils.log.debug ( "OAuthException:" , ex ) ; org.ovirt.engine.core.sso.utils.SSOUtils.redirectToErrorPageImpl ( request , response , ex ) ; }

Target:
public static void redirectToErrorPage ( javax.servlet.http.HttpServletRequest request , javax.servlet.http.HttpServletResponse response , org.ovirt.engine.core.sso.utils.OAuthException ex ) { org.ovirt.engine.core.sso.utils.SSOUtils.log.error ( "OAuthException {}: {}" , ex.getCode ( ) , ex.getMessage ( ) ) ; org.ovirt.engine.core.sso.utils.SSOUtils.log.debug ( "Exception" , ex ) ; org.ovirt.engine.core.sso.utils.SSOUtils.redirectToErrorPageImpl ( request , response , ex ) ; }
Source:
public void setChildren ( java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.common.SelectionTreeNodeModel > value ) { if ( ( ( ( children ) == null ) && ( value != null ) ) || ( ( ( children ) != null ) && ( ! ( children.equals ( value ) ) ) ) ) { children = value ; OnPropertyChanged ( new org.ovirt.engine.core.compat.PropertyChangedEventArgs ( "Children" ) ) ; } }

Target:
public void setChildren ( java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.common.SelectionTreeNodeModel > value ) { if ( ( ( ( children ) == null ) && ( value != null ) ) || ( ( ( children ) != null ) && ( ! ( children.equals ( value ) ) ) ) ) { children = value ; OnPropertyChanged ( new org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ( "Children" ) ) ; } }
Source:
public void mockConfig ( ) { org.mockito.Mockito.when ( host.getVdsGroupCompatibilityVersion ( ) ) . thenReturn ( version ) ; configRule.mockConfigValue ( ConfigValues.DefaultRouteSupported , version , java.lang.Boolean.FALSE ) ; }

Target:
public void mockConfig ( ) { java.util.HashSet < org.ovirt.engine.core.compat.Version > supportedClusters = new java.util.HashSet < > ( ) ; supportedClusters.add ( version ) ; org.mockito.Mockito.when ( host.getSupportedClusterVersionsSet ( ) ) . thenReturn ( supportedClusters ) ; org.mockito.Mockito.when ( host.getVdsGroupCompatibilityVersion ( ) ) . thenReturn ( version ) ; configRule.mockConfigValue ( ConfigValues.DefaultRouteSupported , version , java.lang.Boolean.FALSE ) ; }
Source:
public static boolean vmDeviceChanged ( org.ovirt.engine.core.compat.Guid vmId , org.ovirt.engine.core.common.businessentities.VmDeviceGeneralType deviceGeneralType , java.lang.String deviceTypeName , boolean deviceEnabled ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > vmDevices = ( deviceTypeName != null ) ? org.ovirt.engine.core.bll.utils.VmDeviceUtils.dao.getVmDeviceByVmIdTypeAndDevice ( vmId , deviceGeneralType , deviceTypeName ) : org.ovirt.engine.core.bll.utils.VmDeviceUtils.dao.getVmDeviceByVmIdAndType ( vmId , deviceGeneralType ) ; return deviceEnabled == ( vmDevices.isEmpty ( ) ) ; }

Target:
public static boolean vmDeviceChanged ( org.ovirt.engine.core.compat.Guid vmId , org.ovirt.engine.core.common.businessentities.VmDeviceGeneralType deviceGeneralType , java.lang.String deviceTypeName , boolean deviceEnabled ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > vmDevices = ( deviceTypeName != null ) ? org.ovirt.engine.core.bll.utils.VmDeviceUtils.vmDeviceDao.getVmDeviceByVmIdTypeAndDevice ( vmId , deviceGeneralType , deviceTypeName ) : org.ovirt.engine.core.bll.utils.VmDeviceUtils.vmDeviceDao.getVmDeviceByVmIdAndType ( vmId , deviceGeneralType ) ; return deviceEnabled == ( vmDevices.isEmpty ( ) ) ; }
Source:
private org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidator createValidatorForTestingValidateQosOverridden ( org.ovirt.engine.core.common.businessentities.network.Network network ) { org.ovirt.engine.core.common.businessentities.network.NetworkAttachment networkAttachment = new org.ovirt.engine.core.common.businessentities.network.NetworkAttachment ( ) ; networkAttachment.setNetworkId ( network.getId ( ) ) ; networkAttachment.setHostNetworkQos ( new org.ovirt.engine.core.common.businessentities.network.HostNetworkQos ( ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.network.NetworkAttachment > networkAttachments = java.util.Collections.singletonList ( networkAttachment ) ; org.ovirt.engine.core.common.action.HostSetupNetworksParameters params = new org.ovirt.engine.core.common.action.HostSetupNetworksParameters ( host.getId ( ) ) ; params.setNetworkAttachments ( networkAttachments ) ; return new org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidatorTest.HostSetupNetworksValidatorBuilder ( ) . setHost ( host ) . setParams ( params ) . addNetworks ( network ) . build ( ) ; }

Target:
private org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidator createValidatorForTestingValidateQosOverridden ( org.ovirt.engine.core.common.businessentities.network.Network network ) { org.ovirt.engine.core.common.businessentities.network.NetworkAttachment networkAttachment = new org.ovirt.engine.core.common.businessentities.network.NetworkAttachment ( ) ; networkAttachment.setNetworkId ( network.getId ( ) ) ; networkAttachment.setHostNetworkQos ( new org.ovirt.engine.core.common.businessentities.network.HostNetworkQos ( ) ) ; return new org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidatorTest.HostSetupNetworksValidatorBuilder ( ) . setParams ( new org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidatorTest.ParametersBuilder ( ) . addNetworkAttachments ( networkAttachment ) ) . addNetworks ( network ) . build ( ) ; }
Source:
public static void getMinimalVmMemSize ( 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 ( ) : 1 ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.VMMinMemorySizeInMB , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
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.getInstance ( ) . runQuery ( VdcQueryType.GetVmByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) , aQuery ) ; }
Source:
private void updateActionAvailability ( ) { if ( ( ( getEntity ( ) ) == null ) || ( ( getEntity ( ) . getIsGroup ( ) ) == true ) ) { getManageEventsCommand ( ) . setIsExecutionAllowed ( false ) ; } else { getManageEventsCommand ( ) . setIsExecutionAllowed ( true ) ; } }

Target:
private void updateActionAvailability ( ) { if ( ( ( getEntity ( ) ) == null ) || ( ( getEntity ( ) . isGroup ( ) ) == true ) ) { getManageEventsCommand ( ) . setIsExecutionAllowed ( false ) ; } else { getManageEventsCommand ( ) . setIsExecutionAllowed ( true ) ; } }
Source:
public void getUsbPolicyOnUpdateCurrentlyDisabledGotEnabledPolicyNotSetUsbOnPost3_0Cluster ( ) { org.ovirt.engine.api.model.Usb usb = new org.ovirt.engine.api.model.Usb ( ) ; usb.setEnabled ( true ) ; org.ovirt.engine.core.common.businessentities.VDSGroup vdsGroup = new org.ovirt.engine.core.common.businessentities.VDSGroup ( ) ; vdsGroup.setCompatibilityVersion ( Version.v3_1 ) ; assertEquals ( org.ovirt.engine.api.restapi.types.VmMapper.getUsbPolicyOnUpdate ( usb , UsbPolicy.DISABLED , vdsGroup.getCompatibilityVersion ( ) ) , UsbPolicy.ENABLED_NATIVE ) ; }

Target:
public void getUsbPolicyOnUpdateCurrentlyNativeGotEnabledNativePolicyUsb ( ) { org.ovirt.engine.api.model.Usb usb = new org.ovirt.engine.api.model.Usb ( ) ; usb.setEnabled ( true ) ; usb.setType ( "native" ) ; assertEquals ( org.ovirt.engine.api.restapi.types.VmMapper.getUsbPolicyOnUpdate ( usb , UsbPolicy.ENABLED_NATIVE ) , UsbPolicy.ENABLED_NATIVE ) ; }
Source:
public org.ovirt.engine.core.common.businessentities.DbUser addUserToThreadContext ( java.lang.String sessionId , boolean refresh ) { org.ovirt.engine.core.common.businessentities.DbUser dbUser = org.ovirt.engine.core.utils.ThreadLocalParamsContainer.getUser ( ) ; if ( dbUser == null ) { if ( ! ( org.apache.commons.lang.StringUtils.isEmpty ( sessionId ) ) ) { dbUser = getUser ( sessionId , refresh ) ; org.ovirt.engine.core.utils.ThreadLocalParamsContainer.setHttpSessionId ( sessionId ) ; } else { dbUser = getUser ( refresh ) ; } org.ovirt.engine.core.utils.ThreadLocalParamsContainer.setUser ( dbUser ) ; } return dbUser ; }

Target:
public final void setSoftLimit ( java.lang.String sessionId , java.util.Date softLimit ) { setData ( sessionId , org.ovirt.engine.core.bll.session.SessionDataContainer.SOFT_LIMIT_PARAMETER_NAME , softLimit ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.storage.ImageStatus checkImageStatus ( org.ovirt.engine.core.common.businessentities.storage.CinderDisk removedVolume ) { try { return getCinderBroker ( ) . getImageStatusByClassificationType ( removedVolume ) ; } catch ( com.woorea.openstack.base.client.OpenStackResponseException ex ) { if ( ( ex.getStatus ( ) ) == ( org.apache.commons.httpclient.HttpStatus.SC_NOT_FOUND ) ) { log.info ( "Image status could not be provided since the cinder image might have already been removed from Cinder." ) ; return org.ovirt.engine.core.common.businessentities.storage.ImageStatus.OK ; } logError ( removedVolume , ex ) ; } catch ( java.lang.Exception e ) { logError ( removedVolume , e ) ; } return org.ovirt.engine.core.common.businessentities.storage.ImageStatus.ILLEGAL ; }

Target:
private org.ovirt.engine.core.common.businessentities.storage.ImageStatus checkImageStatus ( org.ovirt.engine.core.common.businessentities.storage.CinderDisk removedVolume , org.ovirt.engine.core.bll.storage.disk.cinder.RemoveCinderDiskVolumeCommand removeCinderDiskVolumeCommand ) { try { return removeCinderDiskVolumeCommand.getCinderBroker ( ) . getImageStatusByClassificationType ( removedVolume ) ; } catch ( com.woorea.openstack.base.client.OpenStackResponseException ex ) { if ( ( ex.getStatus ( ) ) == ( org.apache.commons.httpclient.HttpStatus.SC_NOT_FOUND ) ) { log.info ( "Image status could not be provided since the cinder image might have already been removed from Cinder." ) ; return org.ovirt.engine.core.common.businessentities.storage.ImageStatus.OK ; } logError ( removedVolume , ex ) ; } catch ( java.lang.Exception e ) { logError ( removedVolume , e ) ; } return org.ovirt.engine.core.common.businessentities.storage.ImageStatus.ILLEGAL ; }
Source:
public java.util.Map < java.lang.String , java.lang.String > getJobMessageProperties ( ) { if ( ( jobProperties ) == null ) { jobProperties = super . getJobMessageProperties ( ) ; if ( ( getGlusterHook ( ) ) != null ) { jobProperties.put ( GlusterConstants.HOOK_NAME , getGlusterHook ( ) . getName ( ) ) ; } } return jobProperties ; }

Target:
public java.util.Map < java.lang.String , java.lang.String > getJobMessageProperties ( ) { if ( ( jobProperties ) == null ) { jobProperties = super . getJobMessageProperties ( ) ; if ( ( org.ovirt.engine.core.bll.gluster.GlusterHookStatusChangeCommand.getGlusterHook ( ) ) != null ) { jobProperties.put ( GlusterConstants.HOOK_NAME , org.ovirt.engine.core.bll.gluster.GlusterHookStatusChangeCommand.getGlusterHook ( ) . getName ( ) ) ; } } return jobProperties ; }
Source:
private static java.util.Map < java.lang.String , java.lang.Object > setDisksInXmlRpc ( java.util.Map < java.lang.String , java.util.Map < java.lang.String , java.lang.Object > > disksData ) { java.util.Map < java.lang.String , java.lang.Object > map = new java.util.HashMap < > ( ) ; map.put ( VdsProperties.vm_disks , disksData ) ; return map ; }

Target:
private static java.util.Map < java.lang.String , java.lang.Object > setDisks ( java.util.Map < java.lang.String , java.util.Map < java.lang.String , java.lang.Object > > disksData ) { java.util.Map < java.lang.String , java.lang.Object > map = new java.util.HashMap < > ( ) ; map.put ( VdsProperties.vm_disks , disksData ) ; return map ; }
Source:
public static void IsUSBEnabledByDefault ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Boolean ) ( source ) ) . booleanValue ( ) : false ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.EnableUSBAsDefault , org.ovirt.engine.core.common.config.Config.DefaultConfigurationVersion ) , aQuery ) ; }

Target:
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.storage_pool > ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetStoragePoolsByStorageDomainId , new org.ovirt.engine.core.common.queries.StorageDomainQueryParametersBase ( storageDomainId ) , aQuery ) ; }
Source:
public void setup ( ) { org.ovirt.engine.core.common.utils.SimpleDependencyInjector.getInstance ( ) . bind ( org.ovirt.engine.core.common.osinfo.OsRepository.class , osRepository ) ; initVm ( ) ; images = new java.util.ArrayList < > ( ) ; emulatedMachine = "pc" ; cpuId = "SandyBridge" ; underTest = new org.ovirt.engine.core.utils.ovf.HostedEngineOvfWriter ( vm , images , version , emulatedMachine , cpuId , osRepository ) ; }

Target:
public void setup ( ) { initVm ( ) ; images = new java.util.ArrayList < > ( ) ; luns = java.util.Collections.EMPTY_LIST ; emulatedMachine = "pc" ; cpuId = "SandyBridge" ; underTest = new org.ovirt.engine.core.utils.ovf.HostedEngineOvfWriter ( vm , images , luns , version , emulatedMachine , cpuId , osRepository ) ; }
Source:
public static void removeImage ( org.ovirt.engine.core.common.businessentities.storage.DiskImage diskImage ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getImageStorageDomainMapDao ( ) . remove ( diskImage.getImageId ( ) ) ; org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getDiskImageDynamicDao ( ) . remove ( diskImage.getImageId ( ) ) ; org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getImageDao ( ) . remove ( diskImage.getImageId ( ) ) ; }

Target:
public void removeImage ( org.ovirt.engine.core.common.businessentities.storage.DiskImage diskImage ) { imageStorageDomainMapDao.remove ( diskImage.getImageId ( ) ) ; diskImageDynamicDao.remove ( diskImage.getImageId ( ) ) ; imageDao.remove ( diskImage.getImageId ( ) ) ; }
Source:
protected org.ovirt.engine.core.common.action.VdcReturnValueBase checkAndPerformRollbackUsingCommand ( org.ovirt.engine.core.common.action.VdcActionType commandType , org.ovirt.engine.core.common.action.VdcActionParametersBase params ) { return attemptRollback ( commandType , params ) ; }

Target:
private void initCommandBase ( ) { initUser ( ) ; org.ovirt.engine.core.bll.job.ExecutionContext executionContext = context.getExecutionContext ( ) ; if ( ( executionContext.getJob ( ) ) != null ) { setJobId ( executionContext.getJob ( ) . getId ( ) ) ; } else if ( ( executionContext.getStep ( ) ) != null ) { setJobId ( executionContext.getStep ( ) . getJobId ( ) ) ; } setCorrelationId ( _parameters.getCorrelationId ( ) ) ; }
Source:
private < T extends org.ovirt.engine.core.common.businessentities.BusinessEntity < org.ovirt.engine.core.compat.Guid > & org.ovirt.engine.core.common.businessentities.Nameable > org.ovirt.engine.core.bll.ValidationResult validateCoherentIdentification ( java.lang.String violatingEntityId , org.ovirt.engine.core.compat.Guid referringId , java.lang.String referringName , org.ovirt.engine.core.common.errors.EngineMessage message , org.ovirt.engine.core.common.businessentities.BusinessEntityMap < T > map ) { boolean bothIdentificationSet = ( referringId != null ) && ( referringName != null ) ; java.lang.String [ ] replacements = createIncoherentIdentificationErrorReplacements ( violatingEntityId , referringId , referringName ) ; return org.ovirt.engine.core.bll.ValidationResult.failWith ( message , replacements ) . when ( ( bothIdentificationSet && ( isNameAndIdIncoherent ( referringId , referringName , map ) ) ) ) ; }

Target:
private boolean isNicActuallyExistsOrReferencesNewBond ( java.lang.String nicName , org.ovirt.engine.core.compat.Guid nicId ) { return hostSetupNetworksValidatorHelper.isNicActuallyExistsOrReferencesNewBond ( existingInterfacesMap , bondsMap , nicName , nicId ) ; }
Source:
protected org.ovirt.engine.core.common.action.ImportVmParameters createParameters ( ) { final org.ovirt.engine.core.common.businessentities.VM vm = createVmWithSnapshots ( ) ; vm.setName ( "testVm" ) ; org.ovirt.engine.core.compat.Guid clusterId = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; vm.setClusterId ( clusterId ) ; return new org.ovirt.engine.core.common.action.ImportVmParameters ( vm , org.ovirt.engine.core.compat.Guid.newGuid ( ) , org.ovirt.engine.core.compat.Guid.newGuid ( ) , org.ovirt.engine.core.compat.Guid.newGuid ( ) , clusterId ) ; }

Target:
protected org.ovirt.engine.core.common.action.ImportVmParameters createParameters ( ) { final org.ovirt.engine.core.common.businessentities.VM vm = createVmWithSnapshots ( ) ; vm.setName ( "testVm" ) ; org.ovirt.engine.core.compat.Guid clusterId = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; vm.setClusterId ( clusterId ) ; org.ovirt.engine.core.compat.Guid spId = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; return new org.ovirt.engine.core.common.action.ImportVmParameters ( vm , org.ovirt.engine.core.compat.Guid.newGuid ( ) , org.ovirt.engine.core.compat.Guid.newGuid ( ) , spId , clusterId ) ; }
Source:
private java.lang.String updateFreeVf ( ) { java.lang.String vfToUse = vfScheduler.findFreeVfForVnic ( org.ovirt.engine.core.bll.network.vm.ActivateDeactivateVmNicCommand.getVdsId ( ) , getNetwork ( ) ) ; if ( vfToUse == null ) { failValidation ( EngineMessage.CANNOT_PLUG_PASSTHROUGH_VNIC_NO_SUITABLE_VF , java.lang.String.format ( "$vnicName %1$s" , getInterfaceName ( ) ) ) ; } return vfToUse ; }

Target:
private java.lang.String updateFreeVf ( ) { java.lang.String vfToUse = vfScheduler.findFreeVfForVnic ( org.ovirt.engine.core.bll.network.vm.ActivateDeactivateVmNicCommand.getVdsId ( ) , getNetwork ( ) , org.ovirt.engine.core.bll.network.vm.ActivateDeactivateVmNicCommand.getVmId ( ) ) ; if ( vfToUse == null ) { failValidation ( EngineMessage.CANNOT_PLUG_PASSTHROUGH_VNIC_NO_SUITABLE_VF , java.lang.String.format ( "$vnicName %1$s" , getInterfaceName ( ) ) ) ; } return vfToUse ; }
Source:
public static org.ovirt.engine.core.common.businessentities.network.IpConfiguration createDefaultIpConfiguration ( ) { org.ovirt.engine.core.common.businessentities.network.IpConfiguration output = new org.ovirt.engine.core.common.businessentities.network.IpConfiguration ( ) ; org.ovirt.engine.core.common.businessentities.network.IPv4Address iPv4Address = org.ovirt.engine.core.common.utils.NetworkCommonUtils.createDefaultIpAddress ( ) ; output.getIPv4Addresses ( ) . add ( iPv4Address ) ; return output ; }

Target:
public static org.ovirt.engine.core.common.businessentities.network.IpConfiguration createDefaultIpConfiguration ( ) { org.ovirt.engine.core.common.businessentities.network.IpConfiguration ipConfiguration = new org.ovirt.engine.core.common.businessentities.network.IpConfiguration ( ) ; org.ovirt.engine.core.common.businessentities.network.IPv4Address iPv4Address = org.ovirt.engine.core.common.utils.NetworkCommonUtils.createDefaultIpv4Address ( ) ; ipConfiguration.getIPv4Addresses ( ) . add ( iPv4Address ) ; org.ovirt.engine.core.common.businessentities.network.IpV6Address ipv6Address = org.ovirt.engine.core.common.utils.NetworkCommonUtils.createDefaultIpv6Address ( ) ; ipConfiguration.getIpV6Addresses ( ) . add ( ipv6Address ) ; return ipConfiguration ; }
Source:
protected void decreasePendingVms ( org.ovirt.engine.core.compat.Guid vdsId ) { org.ovirt.engine.core.common.businessentities.VM vm = org.ovirt.engine.core.bll.RunVmCommandBase.getVm ( ) ; decreasePendingVms ( vdsId , vm.getNumOfCpus ( ) , vm.getMinAllocatedMem ( ) , vm.getName ( ) ) ; }

Target:
private void decreasePendingVms ( org.ovirt.engine.core.compat.Guid vdsId ) { if ( ( vdsId == null ) || ( vdsId.equals ( lastDecreasedVds ) ) ) { return ; } org.ovirt.engine.core.common.businessentities.VM vm = org.ovirt.engine.core.bll.RunVmCommandBase.getVm ( ) ; decreasePendingVms ( vdsId , vm.getNumOfCpus ( ) , vm.getMinAllocatedMem ( ) , vm.getName ( ) ) ; }
Source:
private void DiskInterface_SelectedItemChanged ( ) { boolean isLunDisk = ( getDiskStorageType ( ) . getEntity ( ) ) == ( org.ovirt.engine.core.common.businessentities.Disk.DiskStorageType.LUN ) ; org.ovirt.engine.core.common.businessentities.DiskInterface diskInterface = getDiskInterface ( ) . getSelectedItem ( ) ; getIsSgIoUnfiltered ( ) . setIsAvailable ( ( isLunDisk && ( DiskInterface.VirtIO_SCSI.equals ( diskInterface ) ) ) ) ; getIsScsiPassthrough ( ) . setIsAvailable ( ( isLunDisk && ( DiskInterface.VirtIO_SCSI.equals ( diskInterface ) ) ) ) ; updateScsiPassthroguhChangeability ( ) ; updateReadOnlyChangeability ( ) ; updatePlugChangeability ( ) ; }

Target:
protected void updateSgIoUnfilteredChangeability ( ) { if ( ! ( getIsScsiPassthrough ( ) . getEntity ( ) ) ) { getIsSgIoUnfiltered ( ) . setChangeProhibitionReason ( org.ovirt.engine.ui.uicommonweb.models.vms.AbstractDiskModel.constants.cannotEnableSgioWhenScsiPassthroughDisabled ( ) ) ; getIsSgIoUnfiltered ( ) . setIsChangable ( false ) ; getIsSgIoUnfiltered ( ) . setEntity ( false ) ; return ; } getIsSgIoUnfiltered ( ) . setIsChangable ( isEditEnabled ( ) ) ; }
Source:
public javax.ws.rs.core.Response add ( org.ovirt.engine.api.model.ImageTransfer imageTransfer ) { org.ovirt.engine.core.common.action.TransferDiskImageParameters params = new org.ovirt.engine.core.common.action.TransferDiskImageParameters ( ) ; if ( ( imageTransfer.isSetDirection ( ) ) && ( ( imageTransfer.getDirection ( ) ) == ( org.ovirt.engine.api.model.ImageTransferDirection.DOWNLOAD ) ) ) { params.setTransferType ( TransferType.Download ) ; } params.setImageId ( org.ovirt.engine.api.restapi.utils.GuidUtils.asGuid ( imageTransfer.getImage ( ) . getId ( ) ) ) ; return performCreate ( ActionType.TransferDiskImage , params , new org.ovirt.engine.api.restapi.resource.QueryIdResolver < org.ovirt.engine.core.compat.Guid > ( org.ovirt.engine.core.common.queries.QueryType.GetImageTransferById , org.ovirt.engine.core.common.queries.IdQueryParameters.class ) ) ; }

Target:
private void updateTransferType ( org.ovirt.engine.api.model.ImageTransfer imageTransfer , org.ovirt.engine.core.common.action.TransferDiskImageParameters params ) { if ( ( imageTransfer.isSetDirection ( ) ) && ( ( imageTransfer.getDirection ( ) ) == ( org.ovirt.engine.api.model.ImageTransferDirection.DOWNLOAD ) ) ) { params.setTransferType ( TransferType.Download ) ; } }
Source:
public void testMissingParameterSpecificReason ( ) { org.ovirt.engine.api.model.Vm vm = new org.ovirt.engine.api.model.Vm ( ) ; vm.setDescription ( "incomplete" ) ; try { org.ovirt.engine.api.common.util.CompletenessAssertor.validateParameters ( "Missing stuff" , "{0} {1} required for {2}" , vm , "status" ) ; org.junit.Assert.fail ( "expected WebApplicationException on incomplete model" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyIncompleteException ( "Missing stuff" , wae , "Vm" , "status" ) ; } }

Target:
public void testMissingParameterSpecificReason ( ) { org.ovirt.engine.api.model.Vm vm = new org.ovirt.engine.api.model.Vm ( ) ; vm.setDescription ( "incomplete" ) ; try { org.ovirt.engine.api.common.util.CompletenessAssertor.validateParameters ( "Missing stuff" , "{0} {1} required for {2}" , vm , "status" ) ; org.junit.jupiter.api.Assertions.fail ( "expected WebApplicationException on incomplete model" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyIncompleteException ( "Missing stuff" , wae , "Vm" , "status" ) ; } }
Source:
public java.util.List < org.ovirt.engine.core.bll.quota.QuotaConsumptionParameter > getQuotaStorageConsumptionParameters ( ) { java.util.List < org.ovirt.engine.core.bll.quota.QuotaConsumptionParameter > list = new java.util.ArrayList < org.ovirt.engine.core.bll.quota.QuotaConsumptionParameter > ( ) ; for ( org.ovirt.engine.core.common.businessentities.DiskImage disk : getParameters ( ) . getVmTemplate ( ) . getDiskList ( ) ) { list.add ( new org.ovirt.engine.core.bll.quota.QuotaStorageConsumptionParameter ( disk.getQuotaId ( ) , null , QuotaConsumptionParameter.QuotaAction.CONSUME , imageToDestinationDomainMap.get ( disk.getId ( ) ) , ( ( double ) ( disk.getSizeInGigabytes ( ) ) ) ) ) ; } return list ; }

Target:
public java.util.List < org.ovirt.engine.core.bll.quota.QuotaConsumptionParameter > getQuotaStorageConsumptionParameters ( ) { java.util.List < org.ovirt.engine.core.bll.quota.QuotaConsumptionParameter > list = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.storage.DiskImage disk : getParameters ( ) . getVmTemplate ( ) . getDiskList ( ) ) { list.add ( new org.ovirt.engine.core.bll.quota.QuotaStorageConsumptionParameter ( disk.getQuotaId ( ) , null , QuotaConsumptionParameter.QuotaAction.CONSUME , imageToDestinationDomainMap.get ( disk.getId ( ) ) , ( ( double ) ( disk.getSizeInGigabytes ( ) ) ) ) ) ; } return list ; }
Source:
public int hashCode ( ) { return java.util.Objects.hash ( super . hashCode ( ) , ipv4Address , ipv6Address , bondName , bondOptions , bondType , bonded , ipv4BootProtocol , ipv6BootProtocol , networkName , bridged , ipv4Gateway , ipv6Gateway , mtu , ipv4Subnet , ipv6Prefix , vdsId , baseInterface , vlanId , qos , labels ) ; }

Target:
public int hashCode ( ) { return java.util.Objects.hash ( super . hashCode ( ) , ipv4Address , ipv6Address , bondName , bondOptions , bondType , bonded , ipv4BootProtocol , ipv6BootProtocol , reportedSwitchType , networkName , bridged , ipv4Gateway , ipv6Gateway , mtu , ipv4Subnet , ipv6Prefix , vdsId , baseInterface , vlanId , qos , labels , adPartnerMac ) ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object ReturnValue ) { java.util.List < T > entities = ( ( java.util.ArrayList < T > ) ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( ReturnValue ) ) . getReturnValue ( ) ) ) ; java.util.Collections.sort ( entities , comparator ) ; setItems ( entities ) ; }

Target:
protected void syncSearch ( org.ovirt.engine.core.common.queries.VdcQueryType vdcQueryType , final java.util.Comparator < ? super T > comparator ) { if ( ( org.ovirt.engine.ui.uicommonweb.models.storage.StorageRegisterEntityListModel.getEntity ( ) ) == null ) { return ; } org.ovirt.engine.core.common.queries.IdQueryParameters parameters = new org.ovirt.engine.core.common.queries.IdQueryParameters ( org.ovirt.engine.ui.uicommonweb.models.storage.StorageRegisterEntityListModel.getEntity ( ) . getId ( ) ) ; parameters.setRefresh ( org.ovirt.engine.ui.uicommonweb.models.storage.StorageRegisterEntityListModel.getIsQueryFirstTime ( ) ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( vdcQueryType , parameters , new org.ovirt.engine.ui.uicommonweb.models.storage.SetSortedItemsAsyncQuery ( comparator ) ) ; }
Source:
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.RunQuery ( VdcQueryType.GetGlusterServerServicesByServerId , new org.ovirt.engine.core.common.queries.gluster.GlusterServiceQueryParameters ( serverId , org.ovirt.engine.core.common.businessentities.gluster.ServiceType.GLUSTER_SWIFT ) , aQuery ) ; }

Target:
public static void getGlusterHooks ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? source : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetGlusterHooks , new org.ovirt.engine.core.common.queries.gluster.GlusterParameters ( clusterId ) , aQuery ) ; }
Source:
protected void onExportChanged ( ) { super . onExportChanged ( ) ; if ( getExport ( ) . getEntity ( ) ) { getHasVLanTag ( ) . setIsChangable ( false ) ; getVLanTag ( ) . setIsChangable ( false ) ; getIsVmNetwork ( ) . setIsChangable ( false ) ; getNetworkLabel ( ) . setIsChangable ( false ) ; getNeutronPhysicalNetwork ( ) . setIsChangable ( false ) ; } }

Target:
protected void onExportChanged ( ) { super . onExportChanged ( ) ; if ( getExport ( ) . getEntity ( ) ) { getHasVLanTag ( ) . setIsChangeable ( false ) ; getVLanTag ( ) . setIsChangeable ( false ) ; getIsVmNetwork ( ) . setIsChangeable ( false ) ; getNetworkLabel ( ) . setIsChangeable ( false ) ; getNeutronPhysicalNetwork ( ) . setIsChangeable ( false ) ; } }
Source:
public void getRedirectServletReportsPage ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.String ) ( source ) ) : "" ; } } ; getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.RedirectServletReportsPage , getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public void isClusterEmpty ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { runQueryByIdParameter ( VdcQueryType.IsClusterEmpty , aQuery , clusterId ) ; }
Source:
protected void readOsSection ( org.ovirt.engine.core.compat.backendcompat.XmlNode section ) { _vmTemplate.setId ( new org.ovirt.engine.core.compat.Guid ( section.attributes.get ( "ovf:id" ) . getValue ( ) ) ) ; org.ovirt.engine.core.compat.backendcompat.XmlNode node = section.SelectSingleNode ( "Description" ) ; if ( node != null ) { int osId = osRepository.getOsIdByUniqueName ( node.innerText ) ; _vmTemplate.setOsId ( osId ) ; _vmTemplate.setClusterArch ( osRepository.getArchitectureFromOS ( osId ) ) ; } else { _vmTemplate.setClusterArch ( ArchitectureType.undefined ) ; } }

Target:
protected void readOsSection ( org.ovirt.engine.core.utils.ovf.xml.XmlNode section ) { _vmTemplate.setId ( new org.ovirt.engine.core.compat.Guid ( section.attributes.get ( "ovf:id" ) . getValue ( ) ) ) ; org.ovirt.engine.core.utils.ovf.xml.XmlNode node = section.SelectSingleNode ( "Description" ) ; if ( node != null ) { int osId = osRepository.getOsIdByUniqueName ( node.innerText ) ; _vmTemplate.setOsId ( osId ) ; _vmTemplate.setClusterArch ( osRepository.getArchitectureFromOS ( osId ) ) ; } else { _vmTemplate.setClusterArch ( ArchitectureType.undefined ) ; } }