auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private void doTestValidateModifiedBondSlaves ( org.ovirt.engine.core.common.businessentities.network.Bond bond , java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > existingInterfaces , org.ovirt.engine.core.bll.ValidationResult interfaceExistValidationResult , org.ovirt.engine.core.bll.ValidationResult interfaceIsValidSlaveValidationResult , boolean expectedValidationResult , org.ovirt.engine.core.common.errors.VdcBllMessages expectedViolation ) { doTestValidateModifiedBondSlaves ( bond , new org.ovirt.engine.core.common.action.HostSetupNetworksParameters ( host.getId ( ) ) , existingInterfaces , interfaceExistValidationResult , interfaceIsValidSlaveValidationResult , expectedValidationResult , expectedViolation ) ; }

Target:
public org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidatorTest.HostSetupNetworksValidatorBuilder setExistingInterfaces ( java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > existingInterfaces ) { this . existingInterfaces = existingInterfaces ; return this ; }
Source:
public void testUpdateStatus ( ) { org.ovirt.engine.core.common.businessentities.VmTemplate before = dao.get ( existingEntity.getId ( ) ) ; before.setStatus ( VmTemplateStatus.Locked ) ; dao.updateStatus ( existingEntity.getId ( ) , VmTemplateStatus.Locked ) ; org.ovirt.engine.core.common.businessentities.VmTemplate after = dao.get ( existingEntity.getId ( ) ) ; org.junit.Assert.assertEquals ( before , after ) ; }

Target:
public void testUpdateStatus ( ) { org.ovirt.engine.core.common.businessentities.VmTemplate before = dao.get ( existingEntity.getId ( ) ) ; before.setStatus ( VmTemplateStatus.Locked ) ; dao.updateStatus ( existingEntity.getId ( ) , VmTemplateStatus.Locked ) ; org.ovirt.engine.core.common.businessentities.VmTemplate after = dao.get ( existingEntity.getId ( ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( before , after ) ; }
Source:
protected void executeCommand ( ) { org.ovirt.engine.core.common.queries.VdcQueryReturnValue currentVmsInPoolQuery = runInternalQuery ( VdcQueryType.GetAllPoolVms , new org.ovirt.engine.core.common.queries.IdQueryParameters ( org.ovirt.engine.core.bll.UpdateVmPoolWithVmsCommand.getVmPool ( ) . getVmPoolId ( ) ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.VM > poolVmsBeforeAdd = ( currentVmsInPoolQuery.getSucceeded ( ) ) ? currentVmsInPoolQuery.< java.util.List < org.ovirt.engine.core.common.businessentities.VM > > getReturnValue ( ) : null ; super . executeCommand ( ) ; if ( org.ovirt.engine.core.bll.UpdateVmPoolWithVmsCommand.getSucceeded ( ) ) { updatePoolVms ( poolVmsBeforeAdd ) ; } vmPoolMonitor.triggerPoolMonitoringJob ( ) ; }

Target:
protected void executeCommand ( ) { org.ovirt.engine.core.common.queries.VdcQueryReturnValue currentVmsInPoolQuery = runInternalQuery ( VdcQueryType.GetAllPoolVms , new org.ovirt.engine.core.common.queries.IdQueryParameters ( org.ovirt.engine.core.bll.UpdateVmPoolWithVmsCommand.getVmPool ( ) . getVmPoolId ( ) ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.VM > poolVmsBeforeAdd = ( currentVmsInPoolQuery.getSucceeded ( ) ) ? currentVmsInPoolQuery.< java.util.List < org.ovirt.engine.core.common.businessentities.VM > > getReturnValue ( ) : null ; super . executeCommand ( ) ; org.ovirt.engine.core.bll.UpdateVmPoolWithVmsCommand.getCompensationContext ( ) . cleanupCompensationDataAfterSuccessfulCommand ( ) ; if ( org.ovirt.engine.core.bll.UpdateVmPoolWithVmsCommand.getSucceeded ( ) ) { updatePoolVms ( poolVmsBeforeAdd ) ; } vmPoolMonitor.triggerPoolMonitoringJob ( ) ; }
Source:
public int compareTo ( ovirt_engine_dwh.configurationsync_3_2.ConfigurationSync.delete_dc_storage_connectionStruct other ) { int returnValue = - 1 ; return returnValue ; }

Target:
public int compareTo ( ovirt_engine_dwh.configurationsync_3_2.ConfigurationSync.after_tJDBCInput_33Struct other ) { int returnValue = - 1 ; returnValue = checkNullsAndCompare ( this . storage_id , other.storage_id ) ; if ( returnValue != 0 ) { return returnValue ; } returnValue = checkNullsAndCompare ( this . storage_pool_id , other.storage_pool_id ) ; if ( returnValue != 0 ) { return returnValue ; } return returnValue ; }
Source:
void initUncaughtExceptionHandler ( final java.util.logging.Logger rootLogger , final java.util.logging.Logger remoteLogger ) { com.google.gwt.core.client.GWT.setUncaughtExceptionHandler ( new com.google.gwt.core.client.GWT.UncaughtExceptionHandler ( ) { @ java.lang.Override public void onUncaughtException ( java.lang.Throwable t ) { rootLogger.log ( java.util.logging.Level.SEVERE , "Uncaught exception: " , t ) ; remoteLogger.log ( java.util.logging.Level.SEVERE , "Uncaught exception: " , t ) ; if ( org.ovirt.engine.ui.common.DisplayUncaughtUIExceptions.getValue ( ) ) { alertManager.showUncaughtExceptionAlert ( t ) ; } } } ) ; }

Target:
void initUncaughtExceptionHandler ( ) { com.google.gwt.core.client.GWT.setUncaughtExceptionHandler ( new com.google.gwt.core.client.GWT.UncaughtExceptionHandler ( ) { @ java.lang.Override public void onUncaughtException ( java.lang.Throwable t ) { applicationLogManager.logUncaughtException ( t ) ; if ( org.ovirt.engine.ui.common.DisplayUncaughtUIExceptions.getValue ( ) ) { alertManager.showUncaughtExceptionAlert ( t ) ; } } } ) ; }
Source:
protected void OnEntityChanged ( ) { super . OnEntityChanged ( ) ; if ( ( getEntity ( ) ) != null ) { org.ovirt.engine.core.common.businessentities.VmTemplate template = ( ( org.ovirt.engine.core.common.businessentities.VmTemplate ) ( getEntity ( ) ) ) ; setItems ( template.getInterfaces ( ) ) ; } else { setItems ( null ) ; } }

Target:
protected void OnEntityChanged ( ) { super . OnEntityChanged ( ) ; if ( ( getEntity ( ) ) != null ) { org.ovirt.engine.core.common.businessentities.VmTemplate template = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.ImportTemplateData ) ( getEntity ( ) ) ) . getTemplate ( ) ; setItems ( template.getInterfaces ( ) ) ; } else { setItems ( null ) ; } }
Source:
public void testNetworkNotAttachedToHostWhenAttached ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.VDS host = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; host.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; org.mockito.Mockito.when ( vdsDaoMock.getAllForNetwork ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( java.util.Collections.singletonList ( host ) ) ; org.junit.Assert.assertThat ( new org.ovirt.engine.core.bll.validator.NetworkAttachmentValidator ( new org.ovirt.engine.core.common.businessentities.network.NetworkAttachment ( ) , host ) . networkNotAttachedToHost ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( VdcBllMessages.NETWORK_ALREADY_ATTACHED_TO_HOST ) ) ; }

Target:
public void testNetworkNotAttachedToHost ( ) throws java.lang.Exception { org.ovirt.engine.core.compat.Guid networkId = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; org.mockito.Mockito.when ( vdsDaoMock.getAllForNetwork ( org.mockito.Matchers.eq ( networkId ) ) ) . thenReturn ( java.util.Collections.< org.ovirt.engine.core.common.businessentities.VDS > emptyList ( ) ) ; org.ovirt.engine.core.common.businessentities.network.NetworkAttachment attachment = new org.ovirt.engine.core.common.businessentities.network.NetworkAttachment ( ) ; attachment.setNetworkId ( networkId ) ; org.junit.Assert.assertThat ( createNetworkAttachmentValidator ( attachment ) . networkNotAttachedToHost ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }
Source:
public void setSelectedItem ( java.lang.Integer value ) { if ( ! ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . osNameExists ( value ) ) ) { org.ovirt.engine.ui.uicommonweb.models.vms.DataCenterWithCluster dataCenterWithCluster = getDataCenterWithClustersList ( ) . getSelectedItem ( ) ; org.ovirt.engine.core.common.businessentities.Cluster cluster = ( dataCenterWithCluster == null ) ? null : dataCenterWithCluster.getCluster ( ) ; if ( cluster == null ) { return ; } super . setSelectedItem ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getDefaultOs ( cluster.getArchitecture ( ) ) ) ; } else { super . setSelectedItem ( value ) ; } }

Target:
public void executeCommand ( org.ovirt.engine.ui.uicommonweb.UICommand command ) { numaSupport ( ) ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object ReturnValue ) { org.ovirt.engine.ui.uicommonweb.models.users.AdElementListModel adElementListModel = ( ( org.ovirt.engine.ui.uicommonweb.models.users.AdElementListModel ) ( model ) ) ; org.ovirt.engine.core.common.queries.VdcQueryReturnValue queryReturnValue = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( ReturnValue ) ) ; if ( handleQueryError ( queryReturnValue , adElementListModel ) ) { return ; } setusers ( new java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.EntityModel > ( ) ) ; addUsersToModel ( queryReturnValue , getExcludeUsers ( ) ) ; onUserAndAdGroupsLoaded ( adElementListModel ) ; }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object result ) { populateRoles ( ( ( java.util.List < org.ovirt.engine.core.common.businessentities.Role > ) ( result ) ) ) ; }
Source:
public static void getDataCenterById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetStoragePoolById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) , aQuery ) ; }

Target:
public static void getClusterNetworkList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { if ( ( aQuery.converterCallback ) == null ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.Network > ( ) ; } return source ; } } ; } org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllNetworksByClusterId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( clusterId ) , aQuery ) ; }
Source:
protected void onExportChanged ( ) { boolean externalNetwork = getExport ( ) . getEntity ( ) ; getNetworkLabel ( ) . setIsChangable ( ( ! externalNetwork ) ) ; getNeutronPhysicalNetwork ( ) . setIsChangable ( externalNetwork ) ; getQos ( ) . setIsChangable ( ( ! externalNetwork ) ) ; getAddQosCommand ( ) . setIsExecutionAllowed ( ( ! externalNetwork ) ) ; updateMtuSelectorsChangeability ( ) ; }

Target:
protected void onExportChanged ( ) { boolean externalNetwork = getExport ( ) . getEntity ( ) ; getNetworkLabel ( ) . setIsChangeable ( ( ! externalNetwork ) ) ; getNeutronPhysicalNetwork ( ) . setIsChangeable ( externalNetwork ) ; getQos ( ) . setIsChangeable ( ( ! externalNetwork ) ) ; getAddQosCommand ( ) . setIsExecutionAllowed ( ( ! externalNetwork ) ) ; updateMtuSelectorsChangeability ( ) ; }
Source:
protected void executeCommand ( ) { org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInNewTransaction ( new org.ovirt.engine.core.utils.transaction.TransactionMethod < java.lang.Void > ( ) { @ java.lang.Override public java.lang.Void runInTransaction ( ) { getCompensationContext ( ) . snapshotEntity ( getVmPool ( ) ) ; setPoolBeingDestroyed ( ) ; setPrestartedToZero ( ) ; getCompensationContext ( ) . stateChanged ( ) ; return null ; } } ) ; org.ovirt.engine.core.bll.RemoveVmPoolCommand.setSucceeded ( ( ( ( stopVms ( ) ) && ( removeVmsInPool ( ) ) ) && ( removeVmPool ( ) ) ) ) ; }

Target:
protected void endSuccessfully ( ) { org.ovirt.engine.core.bll.RemoveVmPoolCommand.setSucceeded ( ( ( removeAllVmsInPool ( ) ) && ( removeVmPool ( ) ) ) ) ; org.ovirt.engine.core.bll.RemoveVmPoolCommand.log ( ) ; }
Source:
public void testSetStatusForNonRequiredNetworkUpdated ( ) { networkCluster.setRequired ( false ) ; networkCluster.setStatus ( NetworkStatus.NON_OPERATIONAL ) ; underTest.setStatus ( org.ovirt.engine.core.bll.network.cluster.NetworkClusterHelperTest.CLUSTER_ID , createNetwork ( org.ovirt.engine.core.bll.network.cluster.NetworkClusterHelperTest.NETWORK_ID , org.ovirt.engine.core.bll.network.cluster.NetworkClusterHelperTest.NETWORK_NAME ) ) ; org.mockito.Mockito.verify ( networkClusterDao ) . updateStatus ( org.mockito.Matchers.same ( networkCluster ) ) ; org.junit.Assert.assertThat ( networkCluster.getStatus ( ) , org.hamcrest.Matchers.is ( NetworkStatus.OPERATIONAL ) ) ; }

Target:
public void testSetStatusForRequiredNetworksAbsentOnHost ( ) { networkCluster.setStatus ( NetworkStatus.OPERATIONAL ) ; final java.util.List < org.ovirt.engine.core.common.businessentities.network.Network > networks = java.util.Arrays.asList ( createNetwork ( org.ovirt.engine.core.bll.network.cluster.NetworkClusterHelperTest.NETWORK_ID1 , org.ovirt.engine.core.bll.network.cluster.NetworkClusterHelperTest.NETWORK_NAME1 ) , createNetwork ( org.ovirt.engine.core.bll.network.cluster.NetworkClusterHelperTest.NETWORK_ID2 , org.ovirt.engine.core.bll.network.cluster.NetworkClusterHelperTest.NETWORK_NAME2 ) ) ; testSetStatusForRequiredNetwork ( networks , org.ovirt.engine.core.bll.network.cluster.NetworkClusterHelperTest.NETWORK_NAME2 ) ; org.mockito.Mockito.verify ( networkClusterDao ) . updateStatus ( org.mockito.Matchers.same ( networkCluster ) ) ; org.junit.Assert.assertThat ( networkCluster.getStatus ( ) , org.hamcrest.Matchers.is ( NetworkStatus.NON_OPERATIONAL ) ) ; }
Source:
protected org.ovirt.engine.core.bll.ValidationResult networkNotUsed ( java.util.List < ? extends org.ovirt.engine.core.common.businessentities.Nameable > entities , org.ovirt.engine.core.common.errors.VdcBllMessages entitiesReplacement ) { if ( entities.isEmpty ( ) ) { return org.ovirt.engine.core.bll.ValidationResult.VALID ; } java.util.Collection < java.lang.String > replacements = org.ovirt.engine.core.utils.ReplacementUtils.replaceWithNameable ( "ENTITIES_USING_NETWORK" , entities ) ; replacements.add ( entitiesReplacement.name ( ) ) ; return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.ACTION_TYPE_FAILED_NETWORK_IN_USE , replacements ) ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult notRemovingManagementNetwork ( ) { return isManagementNetwork ( ) ? new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.NETWORK_CANNOT_REMOVE_MANAGEMENT_NETWORK , getNetworkNameReplacement ( ) ) : org.ovirt.engine.core.bll.ValidationResult.VALID ; }
Source:
private static void doTestLocaleOverride ( java.lang.String name ) { org.ovirt.engine.core.common.interfaces.ErrorTranslator et = new org.ovirt.engine.core.utils.ErrorTranslatorImpl ( name ) ; java.util.List < java.lang.String > errors = et.TranslateErrorText ( java.util.Arrays.asList ( org.ovirt.engine.core.utils.ErrorTranslatorTest.TEST_KEY_NO_REPLACEMENT ) , java.util.Locale.ITALIAN ) ; assertEquals ( "Unexpected Size" , 1 , errors.size ( ) ) ; assertEquals ( "String should equal" , "Impossibile trovare il desktop" , errors.get ( 0 ) ) ; java.lang.String error = et.TranslateErrorTextSingle ( org.ovirt.engine.core.utils.ErrorTranslatorTest.TEST_KEY_NO_REPLACEMENT , java.util.Locale.ITALIAN ) ; assertEquals ( "String should equal" , "Impossibile trovare il desktop" , error ) ; }

Target:
private static void doTestLocaleOverride ( java.lang.String name ) { org.ovirt.engine.core.common.interfaces.ErrorTranslator et = new org.ovirt.engine.core.utils.ErrorTranslatorImpl ( name ) ; java.util.List < java.lang.String > errors = et.TranslateErrorText ( java.util.Arrays.asList ( org.ovirt.engine.core.utils.ErrorTranslatorTest.TEST_KEY_NO_REPLACEMENT ) , java.util.Locale.ITALIAN ) ; org.junit.Assert.assertEquals ( "Unexpected Size" , 1 , errors.size ( ) ) ; org.junit.Assert.assertEquals ( "String should equal" , "Impossibile trovare il desktop" , errors.get ( 0 ) ) ; java.lang.String error = et.TranslateErrorTextSingle ( org.ovirt.engine.core.utils.ErrorTranslatorTest.TEST_KEY_NO_REPLACEMENT , java.util.Locale.ITALIAN ) ; org.junit.Assert.assertEquals ( "String should equal" , "Impossibile trovare il desktop" , error ) ; }
Source:
public static void GetHighUtilizationForPowerSave ( 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.HighUtilizationForPowerSave , org.ovirt.engine.core.common.config.Config.DefaultConfigurationVersion ) , aQuery ) ; }

Target:
public static void GetLowUtilizationForPowerSave ( 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.LowUtilizationForPowerSave , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
public void testConvertStringToId ( ) { junit.framework.Assert.assertEquals ( "0" , completer.convertFieldEnumValueToActualValue ( "other" ) ) ; junit.framework.Assert.assertEquals ( "1" , completer.convertFieldEnumValueToActualValue ( "rhel_x" ) ) ; junit.framework.Assert.assertEquals ( "2" , completer.convertFieldEnumValueToActualValue ( "rhel_x_y" ) ) ; }

Target:
public void autoCompletedInputIsAlwaysValid ( java.util.Map.Entry < java.lang.Integer , java.lang.String > osCompletionEntry ) { java.lang.String reason = ( "input " + ( osCompletionEntry.getValue ( ) ) ) + " is invalid" ; org.junit.Assert.assertThat ( reason , true , org.hamcrest.core.Is.is ( completer.validate ( osCompletionEntry.getValue ( ) ) ) ) ; }
Source:
protected void postSaveAction ( boolean succeeded ) { if ( succeeded ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.NetworkQoS > qosItems = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.NetworkQoS > ( getQos ( ) . getItems ( ) ) ; qosItems.add ( 1 , networkQoS ) ; getQos ( ) . setItems ( qosItems ) ; getQos ( ) . setSelectedItem ( networkQoS ) ; } super . postSaveAction ( succeeded ) ; }

Target:
protected void postSaveAction ( boolean succeeded ) { if ( succeeded ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.HostNetworkQos > qosItems = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.HostNetworkQos > ( this . getQos ( ) . getItems ( ) ) ; qosItems.add ( 1 , getQos ( ) ) ; this . getQos ( ) . setItems ( qosItems ) ; this . getQos ( ) . setSelectedItem ( getQos ( ) ) ; } super . postSaveAction ( succeeded ) ; }
Source:
private void updateVdsData ( ) { org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInNewTransaction ( new org.ovirt.engine.core.utils.transaction.TransactionMethod < java.lang.Void > ( ) { @ java.lang.Override public java.lang.Void runInTransaction ( ) { getCompensationContext ( ) . snapshotEntity ( getVds ( ) . getStaticData ( ) ) ; org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVdsStaticDao ( ) . update ( getParameters ( ) . getVdsStaticData ( ) ) ; getCompensationContext ( ) . stateChanged ( ) ; return null ; } } ) ; }

Target:
private void updateFenceAgents ( ) { if ( ( getParameters ( ) . getFenceAgents ( ) ) != null ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getFenceAgentDao ( ) . removeByVdsId ( getVdsId ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.FenceAgent agent : getParameters ( ) . getFenceAgents ( ) ) { agent.setHostId ( getVdsId ( ) ) ; org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getFenceAgentDao ( ) . save ( agent ) ; } } }
Source:
public static java.util.List < org.ovirt.engine.core.aaa.DirectoryUser > mapPrincipalRecords ( final java.lang.String authzName , final java.util.List < org.ovirt.engine.api.extensions.ExtMap > users ) { java.util.List < org.ovirt.engine.core.aaa.DirectoryUser > results = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.api.extensions.ExtMap user : users ) { results.add ( org.ovirt.engine.core.aaa.DirectoryUtils.mapPrincipalRecord ( authzName , user ) ) ; } return results ; }

Target:
public static java.util.List < org.ovirt.engine.core.aaa.DirectoryUser > mapPrincipalRecordsToDirectoryUsers ( final java.lang.String authzName , final java.util.List < org.ovirt.engine.api.extensions.ExtMap > users ) { java.util.List < org.ovirt.engine.core.aaa.DirectoryUser > results = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.api.extensions.ExtMap user : users ) { results.add ( org.ovirt.engine.core.aaa.DirectoryUtils.mapPrincipalRecordToDirectoryUser ( authzName , user ) ) ; } return results ; }
Source:
public void getHostFingerprint ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String hostAddress ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.String ) ( source ) ) : "" ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetServerSSHKeyFingerprint , new org.ovirt.engine.core.common.queries.ServerParameters ( hostAddress ) , aQuery ) ; }

Target:
public void getHostPublicKey ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.String ) ( source ) ) : "" ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetServerSSHPublicKey , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }
Source:
protected org.ovirt.engine.api.model.GlusterBricks resolveCreatedList ( org.ovirt.engine.core.common.action.VdcReturnValueBase result , org.ovirt.engine.api.restapi.resource.gluster.EntityIdResolver entityResolver ) { try { org.ovirt.engine.api.model.GlusterBricks bricks = new org.ovirt.engine.api.model.GlusterBricks ( ) ; for ( org.ovirt.engine.core.compat.Guid id : ( ( java.util.List < org.ovirt.engine.core.compat.Guid > ) ( result.getActionReturnValue ( ) ) ) ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity created = entityResolver.resolve ( id ) ; bricks.getGlusterBricks ( ) . add ( addLinks ( populate ( map ( created ) , created ) ) ) ; } return bricks ; } catch ( java.lang.Exception e ) { e.printStackTrace ( ) ; return null ; } }

Target:
protected org.ovirt.engine.api.model.GlusterBricks resolveCreatedList ( org.ovirt.engine.core.common.action.VdcReturnValueBase result , org.ovirt.engine.api.restapi.resource.gluster.EntityIdResolver < org.ovirt.engine.core.compat.Guid > entityResolver ) { try { org.ovirt.engine.api.model.GlusterBricks bricks = new org.ovirt.engine.api.model.GlusterBricks ( ) ; for ( org.ovirt.engine.core.compat.Guid id : ( ( java.util.List < org.ovirt.engine.core.compat.Guid > ) ( result.getActionReturnValue ( ) ) ) ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity created = entityResolver.resolve ( id ) ; bricks.getGlusterBricks ( ) . add ( addLinks ( doPopulate ( map ( created ) , created ) ) ) ; } return bricks ; } catch ( java.lang.Exception e ) { e.printStackTrace ( ) ; return null ; } }
Source:
protected boolean isStorageDomainTypeCorrect ( org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain ) { if ( ( storageDomain.isLocal ( ) ) != ( org.ovirt.engine.core.bll.storage.StorageHandlingCommandBase.getStoragePool ( ) . isLocal ( ) ) ) { addCanDoActionMessage ( VdcBllMessages.ERROR_CANNOT_ATTACH_STORAGE_DOMAIN_STORAGE_TYPE_NOT_MATCH ) ; return false ; } return true ; }

Target:
protected boolean isStorageDomainTypeCorrect ( org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain ) { if ( ( ! ( isStorageDomainOfTypeIsoOrExport ( storageDomain ) ) ) && ( ( storageDomain.isLocal ( ) ) != ( org.ovirt.engine.core.bll.storage.StorageHandlingCommandBase.getStoragePool ( ) . isLocal ( ) ) ) ) { addCanDoActionMessage ( VdcBllMessages.ERROR_CANNOT_ATTACH_STORAGE_DOMAIN_STORAGE_TYPE_NOT_MATCH ) ; return false ; } return true ; }
Source:
public void testGetFileFromString_Happy ( ) { java.io.File file = new java.io.File ( "/etc" ) ; java.io.File testFile = org.ovirt.engine.core.utils.servlet.ServletUtils.makeFileFromSanePath ( "hosts" , file ) ; org.junit.Assert.assertEquals ( "new file should be same as old file" , new java.io.File ( "/etc/hosts" ) , testFile ) ; }

Target:
public void testGetFileFromString_Happy ( ) throws java.net.URISyntaxException { java.lang.String path = this . getClass ( ) . getResource ( "." ) . toURI ( ) . toASCIIString ( ) . replaceAll ( "file:" , "" ) ; java.io.File file = new java.io.File ( path ) ; java.io.File testFile = org.ovirt.engine.core.utils.servlet.ServletUtils.makeFileFromSanePath ( "small_file.txt" , file ) ; org.junit.Assert.assertEquals ( "new file should be same as old file" , new java.io.File ( canReadFileName ) , testFile ) ; }
Source:
private org.ovirt.engine.core.common.mode.ApplicationMode getApplicationMode ( ) { org.ovirt.engine.core.common.queries.VdcQueryReturnValue result = backend.RunPublicQuery ( VdcQueryType.GetConfigurationValue , new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.ApplicationMode , org.ovirt.engine.core.common.config.ConfigCommon.defaultConfigurationVersion ) ) ; org.ovirt.engine.core.common.mode.ApplicationMode appMode = null ; if ( result.getSucceeded ( ) ) { appMode = org.ovirt.engine.core.common.mode.ApplicationMode.from ( ( ( java.lang.Integer ) ( result.getReturnValue ( ) ) ) ) ; } else { appMode = org.ovirt.engine.core.common.mode.ApplicationMode.AllModes ; } return appMode ; }

Target:
private org.ovirt.engine.core.common.mode.ApplicationMode getApplicationMode ( ) { org.ovirt.engine.core.common.queries.VdcQueryReturnValue result = backend.runPublicQuery ( VdcQueryType.GetConfigurationValue , new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.ApplicationMode , org.ovirt.engine.core.common.config.ConfigCommon.defaultConfigurationVersion ) ) ; org.ovirt.engine.core.common.mode.ApplicationMode appMode = null ; if ( result.getSucceeded ( ) ) { appMode = org.ovirt.engine.core.common.mode.ApplicationMode.from ( ( ( java.lang.Integer ) ( result.getReturnValue ( ) ) ) ) ; } else { appMode = org.ovirt.engine.core.common.mode.ApplicationMode.AllModes ; } return appMode ; }
Source:
public org.ovirt.engine.ui.common.uicommon.model.SearchableDetailModelProvider < org.ovirt.engine.core.common.businessentities.VDSGroup , org.ovirt.engine.ui.uicommonweb.models.networks.NetworkListModel , org.ovirt.engine.ui.uicommonweb.models.networks.NetworkClusterListModel > getNetworkClusterListProvider ( org.ovirt.engine.ui.webadmin.gin.ClientGinjector ginjector ) { return new org.ovirt.engine.ui.common.uicommon.model.SearchableDetailTabModelProvider < org.ovirt.engine.core.common.businessentities.VDSGroup , org.ovirt.engine.ui.uicommonweb.models.networks.NetworkListModel , org.ovirt.engine.ui.uicommonweb.models.networks.NetworkClusterListModel > ( ginjector , org.ovirt.engine.ui.uicommonweb.models.networks.NetworkListModel.class , org.ovirt.engine.ui.uicommonweb.models.networks.NetworkClusterListModel.class ) ; }

Target:
public org.ovirt.engine.ui.common.presenter.AbstractModelBoundPopupPresenterWidget < ? extends org.ovirt.engine.ui.uicommonweb.models.Model , ? > getModelPopup ( org.ovirt.engine.ui.uicommonweb.models.networks.NetworkClusterListModel source , org.ovirt.engine.ui.uicommonweb.UICommand lastExecutedCommand , org.ovirt.engine.ui.uicommonweb.models.Model windowModel ) { if ( lastExecutedCommand == ( getModel ( ) . getManageCommand ( ) ) ) { return managePopupProvider.get ( ) ; } else { return super . getModelPopup ( source , lastExecutedCommand , windowModel ) ; } }
Source:
private void ensureStorageFormatInitialized ( ) { org.ovirt.engine.core.common.businessentities.StorageDomain sd = org.ovirt.engine.core.bll.storage.AddStorageDomainCommand.getStorageDomain ( ) ; if ( ( sd.getStorageFormat ( ) ) == null ) { if ( sd.getStorageDomainType ( ) . isDataDomain ( ) ) { org.ovirt.engine.core.common.businessentities.StoragePool sp = getTargetStoragePool ( ) ; if ( sp != null ) { sd.setStorageFormat ( org.ovirt.engine.core.common.utils.VersionStorageFormatUtil.getPreferredForVersion ( sp.getcompatibility_version ( ) , sd.getStorageType ( ) ) ) ; } } else { sd.setStorageFormat ( StorageFormatType.V1 ) ; } } }

Target:
private void ensureStorageFormatInitialized ( ) { org.ovirt.engine.core.common.businessentities.StorageDomain sd = org.ovirt.engine.core.bll.storage.AddStorageDomainCommand.getStorageDomain ( ) ; if ( ( sd.getStorageFormat ( ) ) == null ) { if ( sd.getStorageDomainType ( ) . isDataDomain ( ) ) { org.ovirt.engine.core.common.businessentities.StoragePool sp = getTargetStoragePool ( ) ; if ( sp != null ) { sd.setStorageFormat ( org.ovirt.engine.core.common.utils.VersionStorageFormatUtil.getPreferredForVersion ( sp.getCompatibilityVersion ( ) , sd.getStorageType ( ) ) ) ; } } else { sd.setStorageFormat ( StorageFormatType.V1 ) ; } } }
Source:
protected org.ovirt.engine.core.compat.Guid getClusterId ( org.ovirt.engine.api.model.VM vm ) { return isFiltered ( ) ? lookupClusterByName ( vm.getCluster ( ) . getName ( ) ) . getId ( ) : getEntity ( org.ovirt.engine.core.common.businessentities.VDSGroup.class , SearchType.Cluster , ( "Cluster: name=" + ( vm.getCluster ( ) . getName ( ) ) ) ) . getId ( ) ; }

Target:
protected org.ovirt.engine.core.compat.Guid getClusterId ( org.ovirt.engine.api.model.VM vm ) { return isFiltered ( ) ? lookupClusterByName ( vm.getCluster ( ) . getName ( ) ) . getId ( ) : getEntity ( org.ovirt.engine.core.common.businessentities.VDSGroup.class , VdcQueryType.GetVdsGroupByName , new org.ovirt.engine.core.common.queries.NameQueryParameters ( vm.getCluster ( ) . getName ( ) ) , ( "Cluster: name=" + ( vm.getCluster ( ) . getName ( ) ) ) ) . getId ( ) ; }
Source:
public void successfulConfFileConvertToMap ( ) throws java.io.IOException , java.net.URISyntaxException { givenListOfImagesAndVolumes ( ) ; givenTheWantedDiskImage ( ) ; mockVdcCommand ( ActionType.RetrieveImageData , successfulActionReturnValue ( load ( "hosted-engine-config.tar" ) ) ) ; java.util.Map < java.lang.String , java.lang.String > config = fetchConfig ( ) ; verifyCalled ( ActionType.RetrieveImageData , org.mockito.Mockito.times ( 1 ) ) ; org.junit.Assert.assertThat ( config , org.hamcrest.Matchers.hasKey ( "sdUUID" ) ) ; org.junit.Assert.assertThat ( config , org.hamcrest.Matchers.hasKey ( "host_id" ) ) ; }

Target:
public void successfulConfFileConvertToMap ( ) throws java.io.IOException , java.net.URISyntaxException { givenListOfImagesAndVolumes ( ) ; givenTheWantedDiskImage ( ) ; mockVdcCommand ( ActionType.RetrieveImageData , successfulActionReturnValue ( load ( "hosted-engine-config.tar" ) ) ) ; java.util.Map < java.lang.String , java.lang.String > config = fetchConfig ( ) ; verifyCalled ( ActionType.RetrieveImageData , org.mockito.Mockito.times ( 1 ) ) ; org.hamcrest.MatcherAssert.assertThat ( config , org.hamcrest.Matchers.hasKey ( "sdUUID" ) ) ; org.hamcrest.MatcherAssert.assertThat ( config , org.hamcrest.Matchers.hasKey ( "host_id" ) ) ; }
Source:
private void movePoolToProblematicInDB ( org.ovirt.engine.core.common.businessentities.StoragePool storagePool ) { org.ovirt.engine.core.vdsbroker.ResourceManager.getInstance ( ) . getEventListener ( ) . storagePoolStatusChange ( storagePool.getId ( ) , StoragePoolStatus.Problematic , AuditLogType.SYSTEM_CHANGE_STORAGE_POOL_STATUS_PROBLEMATIC , VdcBllErrors.ENGINE ) ; storagePool.setspm_vds_id ( null ) ; org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStoragePoolDao ( ) . update ( storagePool ) ; }

Target:
private void movePoolToProblematicInDB ( org.ovirt.engine.core.common.businessentities.StoragePool storagePool ) { org.ovirt.engine.core.vdsbroker.ResourceManager.getInstance ( ) . getEventListener ( ) . storagePoolStatusChange ( storagePool.getId ( ) , StoragePoolStatus.NonResponsive , AuditLogType.SYSTEM_CHANGE_STORAGE_POOL_STATUS_PROBLEMATIC , VdcBllErrors.ENGINE ) ; storagePool.setspm_vds_id ( null ) ; org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStoragePoolDao ( ) . update ( storagePool ) ; }
Source:
private void runActionExecutionFailed ( final org.ovirt.engine.core.common.action.VdcActionType actionType , final org.ovirt.engine.core.common.errors.VdcFault fault ) { if ( ( getEventsHandler ( ) ) != null ) { java.lang.String translatedMessage = translateVdcFault ( fault ) ; fault.setMessage ( translatedMessage ) ; getEventsHandler ( ) . runActionExecutionFailed ( actionType , fault ) ; } }

Target:
public void retrieveFromHttpSession ( final java.lang.String key , final org.ovirt.engine.ui.frontend.communication.StorageCallback callback ) { getOperationManager ( ) . retrieveFromHttpSession ( key , callback ) ; }
Source:
private boolean networkExists ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.NetworkCluster > networks = org.ovirt.engine.core.bll.network.cluster.AttachNetworkToVdsGroupCommand.getNetworkClusterDAO ( ) . getAllForCluster ( org.ovirt.engine.core.bll.network.cluster.AttachNetworkToVdsGroupCommand.getVdsGroupId ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.network.NetworkCluster networkCluster : networks ) { if ( networkCluster.getnetwork_id ( ) . equals ( getNetworkCluster ( ) . getnetwork_id ( ) ) ) { return true ; } } return false ; }

Target:
private boolean networkExists ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.NetworkCluster > networks = org.ovirt.engine.core.bll.network.cluster.AttachNetworkToVdsGroupCommand.getNetworkClusterDAO ( ) . getAllForCluster ( org.ovirt.engine.core.bll.network.cluster.AttachNetworkToVdsGroupCommand.getVdsGroupId ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.network.NetworkCluster networkCluster : networks ) { if ( networkCluster.getNetworkId ( ) . equals ( getNetworkCluster ( ) . getNetworkId ( ) ) ) { return true ; } } return false ; }
Source:
public javax.ws.rs.core.Response toResponse ( org.codehaus.jackson.JsonProcessingException exception ) { return javax.ws.rs.core.Response.status ( Status.BAD_REQUEST ) . entity ( new org.ovirt.engine.api.restapi.resource.validation.UsageFinder ( ) . getUsageMessage ( application , uriInfo , request ) ) . build ( ) ; }

Target:
public javax.ws.rs.core.Response toResponse ( org.codehaus.jackson.JsonProcessingException exception ) { try { return javax.ws.rs.core.Response.status ( Status.BAD_REQUEST ) . entity ( new org.ovirt.engine.api.restapi.resource.validation.UsageFinder ( ) . getUsageMessage ( application , uriInfo , request ) ) . build ( ) ; } catch ( java.lang.Exception e ) { throw new javax.ws.rs.WebApplicationException ( e , javax.ws.rs.core.Response.status ( Response.Status.INTERNAL_SERVER_ERROR ) . build ( ) ) ; } }
Source:
default void inputDetail ( ) { org.ovirt.api.metamodel.language.ApiLanguage.mandatory ( disk ( ) . provisionedSize ( ) ) ; org.ovirt.api.metamodel.language.ApiLanguage.optional ( disk ( ) . diskProfile ( ) . id ( ) ) ; org.ovirt.api.metamodel.language.ApiLanguage.optional ( disk ( ) . name ( ) ) ; org.ovirt.api.metamodel.language.ApiLanguage.optional ( disk ( ) . openstackVolumeType ( ) . name ( ) ) ; }

Target:
default void inputDetail ( ) { org.ovirt.api.metamodel.language.ApiLanguage.mandatory ( disk ( ) . provisionedSize ( ) ) ; org.ovirt.api.metamodel.language.ApiLanguage.or ( org.ovirt.api.metamodel.language.ApiLanguage.optional ( disk ( ) . storageDomains ( ) [ org.ovirt.api.metamodel.language.ApiLanguage.COLLECTION ] . id ( ) ) , org.ovirt.api.metamodel.language.ApiLanguage.optional ( disk ( ) . storageDomains ( ) [ org.ovirt.api.metamodel.language.ApiLanguage.COLLECTION ] . name ( ) ) ) ; org.ovirt.api.metamodel.language.ApiLanguage.optional ( disk ( ) . diskProfile ( ) . id ( ) ) ; org.ovirt.api.metamodel.language.ApiLanguage.optional ( disk ( ) . name ( ) ) ; org.ovirt.api.metamodel.language.ApiLanguage.optional ( disk ( ) . openstackVolumeType ( ) . name ( ) ) ; }
Source:
public void getAAAProfilesEntriesList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.Collection < org.ovirt.engine.core.aaa.ProfileEntry > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.aaa.ProfileEntry > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAAAProfileList , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }

Target:
public void getVmDiskList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid vmId , boolean isRefresh ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { return source ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > ( ) ; } } ; org.ovirt.engine.core.common.queries.IdQueryParameters params = new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) ; params.setRefresh ( isRefresh ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllDisksByVmId , params , aQuery ) ; }
Source:
public void addAttribute ( org.ovirt.api.metamodel.concepts.Attribute attribute ) { attributes.add ( attribute ) ; }

Target:
public java.util.List < org.ovirt.api.metamodel.concepts.Attribute > getAttributes ( ) { java.util.List < org.ovirt.api.metamodel.concepts.Attribute > result = new java.util.ArrayList ( attributes ) ; if ( ( ( base ) != null ) && ( ( base ) instanceof org.ovirt.api.metamodel.concepts.StructType ) ) { result.addAll ( ( ( org.ovirt.api.metamodel.concepts.StructType ) ( base ) ) . getAttributes ( ) ) ; } result.sort ( java.util.Comparator.comparing ( Attribute :: getName ) ) ; return result ; }
Source:
private static java.io.File [ ] getMessagesPropertiesFiles ( final java.io.File currentDir , final java.lang.String fileNamePrefix ) throws java.net.URISyntaxException { return currentDir.listFiles ( new java.io.FilenameFilter ( ) { @ java.lang.Override public boolean accept ( java.io.File dir , java.lang.String name ) { return ( name.startsWith ( fileNamePrefix ) ) && ( name.endsWith ( ".properties" ) ) ; } } ) ; }

Target:
private static java.io.File [ ] getMessagesLocalePropertiesFiles ( final java.io.File currentDir , final java.lang.String fileNamePrefix ) throws java.net.URISyntaxException { return currentDir.listFiles ( new java.io.FilenameFilter ( ) { @ java.lang.Override public boolean accept ( java.io.File dir , java.lang.String name ) { return name.matches ( ( ( "^" + fileNamePrefix ) + "_[a-zA-Z]{2}.*\\.properties$" ) ) ; } } ) ; }
Source:
public boolean equals ( java.lang.Object obj ) { if ( ( this ) == obj ) { return true ; } if ( ! ( obj instanceof org.ovirt.engine.core.common.ExternalVariable ) ) { return false ; } org.ovirt.engine.core.common.ExternalVariable other = ( ( org.ovirt.engine.core.common.ExternalVariable ) ( obj ) ) ; return ( org.ovirt.engine.core.common.utils.ObjectUtils.objectsEqual ( name , other.getName ( ) ) ) && ( org.ovirt.engine.core.common.utils.ObjectUtils.objectsEqual ( value , other.getValue ( ) ) ) ; }

Target:
public boolean equals ( java.lang.Object obj ) { if ( ( this ) == obj ) { return true ; } if ( ! ( obj instanceof org.ovirt.engine.core.common.ExternalVariable ) ) { return false ; } org.ovirt.engine.core.common.ExternalVariable other = ( ( org.ovirt.engine.core.common.ExternalVariable ) ( obj ) ) ; return ( java.util.Objects.equals ( name , other.getName ( ) ) ) && ( java.util.Objects.equals ( value , other.getValue ( ) ) ) ; }
Source:
public static void GetHostById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVdsByVdsId , new org.ovirt.engine.core.common.queries.GetVdsByVdsIdParameters ( id ) , aQuery ) ; }

Target:
public static void GetStorageDomainListByTemplate ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid templateId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage_domains > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetStorageDomainsByVmTemplateId , new org.ovirt.engine.core.common.queries.GetStorageDomainsByVmTemplateIdQueryParameters ( templateId ) , aQuery ) ; }
Source:
public static void RunMultipleActions ( final java.util.List < org.ovirt.engine.core.common.action.VdcActionType > actionTypes , final java.util.List < org.ovirt.engine.core.common.action.VdcActionParametersBase > parameters , final java.util.List < org.ovirt.engine.ui.uicompat.IFrontendActionAsyncCallback > callbacks , final org.ovirt.engine.ui.uicompat.IFrontendActionAsyncCallback failureCallback , final java.lang.Object state ) { org.ovirt.engine.ui.frontend.gwtservices.GenericApiGWTServiceAsync service = GenericApiGWTServiceAsync.Util.getInstance ( ) ; org.ovirt.engine.ui.frontend.Frontend.RunMultipleActions ( actionTypes , parameters , callbacks , failureCallback , state , service ) ; }

Target:
public static void RunAction ( final org.ovirt.engine.core.common.action.VdcActionType actionType , final org.ovirt.engine.core.common.action.VdcActionParametersBase parameters , final org.ovirt.engine.ui.uicompat.IFrontendActionAsyncCallback callback , final java.lang.Object state , final boolean showErrorDialog ) { org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runAction ( actionType , parameters , callback , state , showErrorDialog ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.HostJobsReturnForXmlRpc getHostJobs ( java.lang.String jobType , java.util.List < java.lang.String > jobIds ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "Host.getJobs" ) . withOptionalParameter ( "job_type" , jobType ) . withOptionalParameterAsList ( "job_ids" , jobIds ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) . withResponseKey ( "jobs" ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.HostJobsReturnForXmlRpc ( response ) ; }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.HostJobsReturn getHostJobs ( java.lang.String jobType , java.util.List < java.lang.String > jobIds ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "Host.getJobs" ) . withOptionalParameter ( "job_type" , jobType ) . withOptionalParameterAsList ( "job_ids" , jobIds ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) . withResponseKey ( "jobs" ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.HostJobsReturn ( response ) ; }
Source:
private boolean performStorageDomainsChecks ( org.ovirt.engine.core.common.action.LiveMigrateDiskParameters parameters ) { org.ovirt.engine.core.common.businessentities.StorageDomain sourceDomain = getImageSourceDomain ( parameters.getImageId ( ) ) ; org.ovirt.engine.core.common.businessentities.StorageDomain destDomain = getStorageDomainById ( parameters.getStorageDomainId ( ) , org.ovirt.engine.core.bll.lsm.LiveMigrateVmDisksCommand.getStoragePoolId ( ) ) ; return ( ( validateSourceStorageDomain ( sourceDomain ) ) && ( validateDestStorage ( destDomain ) ) ) && ( validateDestStorageAndSourceStorageOfSameTypes ( destDomain , sourceDomain ) ) ; }

Target:
private boolean performStorageDomainsChecks ( org.ovirt.engine.core.common.action.LiveMigrateDiskParameters parameters ) { org.ovirt.engine.core.common.businessentities.StorageDomain sourceDomain = getImageSourceDomain ( parameters.getImageId ( ) ) ; org.ovirt.engine.core.common.businessentities.StorageDomain destDomain = getStorageDomainById ( parameters.getTargetStorageDomainId ( ) , org.ovirt.engine.core.bll.lsm.LiveMigrateVmDisksCommand.getStoragePoolId ( ) ) ; return ( ( validateSourceStorageDomain ( sourceDomain ) ) && ( validateDestStorage ( destDomain ) ) ) && ( validateDestStorageAndSourceStorageOfSameTypes ( destDomain , sourceDomain ) ) ; }
Source:
private static void GetVlanParentInterface ( org.ovirt.engine.core.compat.Guid vdsID , org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface , 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 ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVlanParent , new org.ovirt.engine.core.common.queries.InterfaceAndIdQueryParameters ( vdsID , iface ) , aQuery ) ; }

Target:
private static void getVlanParentInterface ( org.ovirt.engine.core.compat.Guid vdsID , org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface , 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 ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVlanParent , new org.ovirt.engine.core.common.queries.InterfaceAndIdQueryParameters ( vdsID , iface ) , aQuery ) ; }