auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void CreateADSyntaxChecker ( ) { org.ovirt.engine.core.searchbackend.ISyntaxChecker checker = org.ovirt.engine.core.searchbackend.SyntaxCheckerFactory.CreateADSyntaxChecker ( "foo" ) ; junit.framework.Assert.assertNotNull ( checker ) ; junit.framework.Assert.assertEquals ( checker , org.ovirt.engine.core.searchbackend.SyntaxCheckerFactory.CreateADSyntaxChecker ( "foo" ) ) ; junit.framework.Assert.assertEquals ( "foo" , org.ovirt.engine.core.searchbackend.SyntaxCheckerFactory.getConfigAuthenticationMethod ( ) ) ; }

Target:
public void CreateADSyntaxChecker ( ) { org.ovirt.engine.core.searchbackend.ISyntaxChecker checker = org.ovirt.engine.core.searchbackend.SyntaxCheckerFactory.createADSyntaxChecker ( "foo" ) ; junit.framework.Assert.assertNotNull ( checker ) ; junit.framework.Assert.assertEquals ( checker , org.ovirt.engine.core.searchbackend.SyntaxCheckerFactory.createADSyntaxChecker ( "foo" ) ) ; junit.framework.Assert.assertEquals ( "foo" , org.ovirt.engine.core.searchbackend.SyntaxCheckerFactory.getConfigAuthenticationMethod ( ) ) ; }
Source:
public void canDoActionFailedShareableDiskVolumeFormatUnsupported ( ) throws java.lang.Exception { org.ovirt.engine.core.common.action.UpdateVmDiskParameters parameters = createParameters ( ) ; parameters.setDiskInfo ( createShareableDisk ( VolumeFormat.COW ) ) ; org.mockito.Mockito.when ( diskDao.get ( diskImageGuid ) ) . thenReturn ( createDiskImage ( ) ) ; initializeCommand ( parameters ) ; mockVmStatusDown ( ) ; org.junit.Assert.assertFalse ( command.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( command.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( VdcBllMessages.SHAREABLE_DISK_IS_NOT_SUPPORTED_BY_VOLUME_FORMAT.toString ( ) ) ) ; }

Target:
public void canDoActionFailedVMHasNotDisk ( ) throws java.lang.Exception { initializeCommand ( ) ; mockVmStatusDown ( ) ; createNullDisk ( ) ; org.junit.Assert.assertFalse ( command.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( command.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( VdcBllMessages.ACTION_TYPE_FAILED_DISK_NOT_EXIST.toString ( ) ) ) ; }
Source:
public void testInterfaceIsValidSlaveWhenInterfaceIsVlan ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface vdsNetworkInterface = createVdsNetworkInterfaceWithName ( ) ; vdsNetworkInterface.setVlanId ( 1 ) ; org.hamcrest.Matcher < org.ovirt.engine.core.bll.ValidationResult > matcher = org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.NETWORK_INTERFACE_BOND_OR_VLAN_CANNOT_BE_SLAVE , org.ovirt.engine.core.utils.ReplacementUtils.createSetVariableString ( HostInterfaceValidator.VAR_INTERFACE_NAME , vdsNetworkInterface.getName ( ) ) ) ; org.junit.Assert.assertThat ( new org.ovirt.engine.core.bll.validator.HostInterfaceValidator ( vdsNetworkInterface ) . interfaceIsValidSlave ( ) , matcher ) ; }

Target:
public void testInterfaceIsValidSlaveWhenInterfaceIsVlan ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface vdsNetworkInterface = createVdsNetworkInterfaceWithName ( ) ; vdsNetworkInterface.setVlanId ( 1 ) ; org.hamcrest.Matcher < org.ovirt.engine.core.bll.ValidationResult > matcher = org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.NETWORK_INTERFACE_BOND_OR_VLAN_CANNOT_BE_SLAVE , org.ovirt.engine.core.utils.ReplacementUtils.createSetVariableString ( HostInterfaceValidator.VAR_NIC_NAME , vdsNetworkInterface.getName ( ) ) ) ; org.junit.Assert.assertThat ( new org.ovirt.engine.core.bll.validator.HostInterfaceValidator ( vdsNetworkInterface ) . interfaceIsValidSlave ( ) , matcher ) ; }
Source:
public void initOvfDataUpdater ( ) { org.ovirt.engine.core.utils.timer.SchedulerUtil scheduler = org.ovirt.engine.core.di.Injector.get ( org.ovirt.engine.core.utils.timer.SchedulerUtilQuartzImpl.class ) ; scheduler.scheduleAFixedDelayJob ( this , "ovfUpdate_timer" , new java.lang.Class [ ] { } , new java.lang.Object [ ] { } , org.ovirt.engine.core.common.config.Config.< java.lang.Integer > getValue ( ConfigValues.OvfUpdateIntervalInMinutes ) , org.ovirt.engine.core.common.config.Config.< java.lang.Integer > getValue ( ConfigValues.OvfUpdateIntervalInMinutes ) , java.util.concurrent.TimeUnit.MINUTES ) ; org.ovirt.engine.core.bll.storage.ovfstore.OvfDataUpdater.log.info ( "Initialization of OvfDataUpdater completed successfully." ) ; }

Target:
public void initOvfDataUpdater ( ) { org.ovirt.engine.core.utils.timer.SchedulerUtil scheduler = org.ovirt.engine.core.di.Injector.get ( org.ovirt.engine.core.utils.timer.SchedulerUtilQuartzImpl.class ) ; scheduler.scheduleAFixedDelayJob ( this , "ovfUpdateTimer" , new java.lang.Class [ ] { } , new java.lang.Object [ ] { } , org.ovirt.engine.core.common.config.Config.< java.lang.Integer > getValue ( ConfigValues.OvfUpdateIntervalInMinutes ) , org.ovirt.engine.core.common.config.Config.< java.lang.Integer > getValue ( ConfigValues.OvfUpdateIntervalInMinutes ) , java.util.concurrent.TimeUnit.MINUTES ) ; org.ovirt.engine.core.bll.storage.ovfstore.OvfDataUpdater.log.info ( "Initialization of OvfDataUpdater completed successfully." ) ; }
Source:
public javax.ws.rs.core.Response add ( org.ovirt.engine.api.model.Job job ) { validateParameters ( job , "description" ) ; return performCreate ( ActionType.AddExternalJob , new org.ovirt.engine.core.common.action.AddExternalJobParameters ( job.getDescription ( ) , ( job.isSetAutoCleared ( ) ? job.isAutoCleared ( ) : false ) ) , new org.ovirt.engine.api.restapi.resource.QueryIdResolver < org.ovirt.engine.core.compat.Guid > ( org.ovirt.engine.core.common.queries.VdcQueryType.GetJobByJobId , org.ovirt.engine.core.common.queries.IdQueryParameters.class ) ) ; }

Target:
public javax.ws.rs.core.Response add ( org.ovirt.engine.api.model.Job job ) { validateParameters ( job , "description" ) ; return performCreate ( ActionType.AddExternalJob , new org.ovirt.engine.core.common.action.AddExternalJobParameters ( job.getDescription ( ) , ( job.isSetAutoCleared ( ) ? job.isAutoCleared ( ) : false ) ) , new org.ovirt.engine.api.restapi.resource.QueryIdResolver < org.ovirt.engine.core.compat.Guid > ( org.ovirt.engine.core.common.queries.QueryType.GetJobByJobId , org.ovirt.engine.core.common.queries.IdQueryParameters.class ) ) ; }
Source:
public int hashCode ( ) { final int prime = 31 ; int result = 1 ; result = ( prime * result ) + ( ( operationType ) == null ? 0 : operationType.hashCode ( ) ) ; result = ( prime * result ) + ( ( parameter ) == null ? 0 : parameter.hashCode ( ) ) ; return result ; }

Target:
public boolean equals ( final java.lang.Object obj ) { if ( ( this ) == obj ) { return true ; } if ( ! ( obj instanceof org.ovirt.engine.ui.frontend.communication.VdcOperation ) ) { return false ; } @ java.lang.SuppressWarnings ( value = "unchecked" ) org.ovirt.engine.ui.frontend.communication.VdcOperation < T , P > other = ( ( org.ovirt.engine.ui.frontend.communication.VdcOperation < T , P > ) ( obj ) ) ; return ( java.util.Objects.equals ( operationType , other.operationType ) ) && ( java.util.Objects.equals ( parameter , other.parameter ) ) ; }
Source:
public void endWithFailure ( ) { super . endWithFailure ( ) ; getEnclosingCommand ( ) . getParameters ( ) . getDiskImage ( ) . setImageStatus ( ImageStatus.ILLEGAL ) ; org.ovirt.engine.core.bll.ImagesHandler.updateImageStatus ( getEnclosingCommand ( ) . getParameters ( ) . getDiskImage ( ) . getImageId ( ) , ImageStatus.ILLEGAL ) ; }

Target:
public void endWithFailure ( ) { super . endWithFailure ( ) ; getEnclosingCommand ( ) . getParameters ( ) . getDiskImage ( ) . setImageStatus ( ImageStatus.ILLEGAL ) ; org.ovirt.engine.core.bll.ImagesHandler.updateImageStatus ( getEnclosingCommand ( ) . getParameters ( ) . getDestinationImageId ( ) , ImageStatus.ILLEGAL ) ; }
Source:
public org.ovirt.engine.core.common.businessentities.image_storage_domain_map mapRow ( java.sql.ResultSet rs , int rowNum ) throws java.sql.SQLException { org.ovirt.engine.core.common.businessentities.image_storage_domain_map entity = new org.ovirt.engine.core.common.businessentities.image_storage_domain_map ( ) ; entity.setimage_id ( getGuidDefaultEmpty ( rs , "image_id" ) ) ; entity.setstorage_domain_id ( getGuidDefaultEmpty ( rs , "storage_domain_id" ) ) ; entity.setQuotaId ( getGuid ( rs , "quota_id" ) ) ; entity.setDiskProfileId ( getGuid ( rs , "disk_profile_id" ) ) ; return entity ; }

Target:
public org.ovirt.engine.core.common.businessentities.storage.image_storage_domain_map mapRow ( java.sql.ResultSet rs , int rowNum ) throws java.sql.SQLException { org.ovirt.engine.core.common.businessentities.storage.image_storage_domain_map entity = new org.ovirt.engine.core.common.businessentities.storage.image_storage_domain_map ( ) ; entity.setimage_id ( getGuidDefaultEmpty ( rs , "image_id" ) ) ; entity.setstorage_domain_id ( getGuidDefaultEmpty ( rs , "storage_domain_id" ) ) ; entity.setQuotaId ( getGuid ( rs , "quota_id" ) ) ; entity.setDiskProfileId ( getGuid ( rs , "disk_profile_id" ) ) ; return entity ; }
Source:
public void testUpdateFieldsIsQuotaDefault ( ) { org.ovirt.engine.core.common.businessentities.VmTemplate src = new org.ovirt.engine.core.common.businessentities.VmTemplate ( ) ; src.setQuotaDefault ( true ) ; org.ovirt.engine.core.common.businessentities.VmTemplate dest = new org.ovirt.engine.core.common.businessentities.VmTemplate ( ) ; dest.setQuotaDefault ( false ) ; org.junit.Assert.assertTrue ( "Update should be valid for different quota default statuses" , VmTemplateHandler.mUpdateVmTemplate.IsUpdateValid ( src , dest ) ) ; }

Target:
public void testUpdateFieldsIsQuotaDefault ( ) { org.ovirt.engine.core.common.businessentities.VmTemplate src = new org.ovirt.engine.core.common.businessentities.VmTemplate ( ) ; src.setQuotaDefault ( true ) ; org.ovirt.engine.core.common.businessentities.VmTemplate dest = new org.ovirt.engine.core.common.businessentities.VmTemplate ( ) ; dest.setQuotaDefault ( false ) ; org.junit.Assert.assertTrue ( "Update should be valid for different quota default statuses" , org.ovirt.engine.core.bll.VmTemplateHandler.isUpdateValid ( src , dest ) ) ; }
Source:
public void getConfigurationValueBoolean ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.common.queries.ConfigurationValues configVal ) { 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 ( ) : true ; } } ; getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( configVal , getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public void getConfigurationValueBoolean ( org.ovirt.engine.ui.frontend.AsyncQuery < java.lang.Boolean > aQuery , org.ovirt.engine.core.common.queries.ConfigurationValues configVal ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.DefaultValueConverter < > ( java.lang.Boolean.TRUE ) ; getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( configVal , getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
public void onSuccess ( final org.ovirt.engine.core.common.users.VdcUser result ) { org.ovirt.engine.ui.frontend.Frontend.logger.finer ( "Sucessfully executed sync getIsUserLoggedIn!" ) ; callback.onSuccess ( result ) ; }

Target:
public void onFailure ( final java.lang.Throwable caught ) { if ( org.ovirt.engine.ui.frontend.Frontend.ignoreFailure ( caught ) ) { return ; } org.ovirt.engine.ui.frontend.Frontend.logger.log ( java.util.logging.Level.SEVERE , ( "Failed to execute RunQuery: " + caught ) , caught ) ; org.ovirt.engine.ui.frontend.Frontend.getEventsHandler ( ) . runQueryFailed ( null ) ; org.ovirt.engine.ui.frontend.Frontend.failureEventHandler ( caught ) ; if ( callback.isHandleFailure ( ) ) { org.ovirt.engine.ui.frontend.Frontend.clearLoggedInUser ( ) ; callback.getDel ( ) . onSuccess ( callback.getModel ( ) , null ) ; } }
Source:
protected void EndActionOnDisks ( ) { for ( org.ovirt.engine.core.common.action.VdcActionParametersBase p : org.ovirt.engine.core.bll.VmCommand.getParameters ( ) . getImagesParameters ( ) ) { if ( overrideChildCommandSuccess ( ) ) { p.setTaskGroupSuccess ( org.ovirt.engine.core.bll.VmCommand.getParameters ( ) . getTaskGroupSuccess ( ) ) ; } org.ovirt.engine.core.bll.Backend.getInstance ( ) . EndAction ( ( ( p.getCommandType ( ) ) == ( org.ovirt.engine.core.common.action.VdcActionType.Unknown ) ? getChildActionType ( ) : p.getCommandType ( ) ) , p ) ; } }

Target:
protected void EndActionOnDisks ( ) { for ( org.ovirt.engine.core.common.action.VdcActionParametersBase p : org.ovirt.engine.core.bll.VmCommand.getParameters ( ) . getImagesParameters ( ) ) { if ( overrideChildCommandSuccess ( ) ) { p.setTaskGroupSuccess ( org.ovirt.engine.core.bll.VmCommand.getParameters ( ) . getTaskGroupSuccess ( ) ) ; } org.ovirt.engine.core.bll.VmCommand.getBackend ( ) . EndAction ( ( ( p.getCommandType ( ) ) == ( org.ovirt.engine.core.common.action.VdcActionType.Unknown ) ? getChildActionType ( ) : p.getCommandType ( ) ) , p ) ; } }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc glusterVolumeBrickAdd ( java.lang.String volumeName , java.lang.String [ ] bricks , int replicaCount , int stripeCount ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.glusterVolumeBrickAdd ( volumeName , bricks , replicaCount , stripeCount ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc glusterVolumeReplaceBrickCommitForce ( java.lang.String volumeName , java.lang.String existingBrickDir , java.lang.String newBrickDir ) { try { return new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( vdsServer.glusterVolumeReplaceBrickCommitForce ( volumeName , existingBrickDir , newBrickDir ) ) ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
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.ArgumentMatchers.same ( networkCluster ) ) ; org.junit.Assert.assertThat ( networkCluster.getStatus ( ) , org.hamcrest.Matchers.is ( NetworkStatus.OPERATIONAL ) ) ; }

Target:
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_ID1 , org.ovirt.engine.core.bll.network.cluster.NetworkClusterHelperTest.NETWORK_NAME1 ) ) ; org.mockito.Mockito.verify ( networkClusterDao ) . updateStatus ( org.mockito.ArgumentMatchers.same ( networkCluster ) ) ; org.junit.Assert.assertThat ( networkCluster.getStatus ( ) , org.hamcrest.Matchers.is ( NetworkStatus.OPERATIONAL ) ) ; }
Source:
protected boolean setUpPasswordlessSSH ( org.ovirt.engine.core.compat.Guid masterUpServerId , java.util.Set < org.ovirt.engine.core.compat.Guid > remoteServerSet , java.lang.String userName ) { java.util.List < java.lang.String > pubKeys = readPubKey ( masterUpServerId ) ; boolean canProceed = ( pubKeys != null ) && ( ( pubKeys.size ( ) ) > 0 ) ; if ( canProceed ) { canProceed = updatePubKeysToRemoteHosts ( pubKeys , remoteServerSet , userName ) ; } return canProceed ; }

Target:
protected boolean setUpPasswordlessSSH ( org.ovirt.engine.core.compat.Guid masterUpServerId , java.util.Set < org.ovirt.engine.core.compat.Guid > remoteServerSet , java.lang.String userName ) { java.util.List < java.lang.String > pubKeys = readPubKey ( masterUpServerId ) ; boolean canProceed = ( pubKeys != null ) && ( ( pubKeys.size ( ) ) > 0 ) ; if ( canProceed ) { canProceed = evaluateReturnValues ( AuditLogType.GLUSTER_GEOREP_PUBLIC_KEY_WRITE_FAILED , updatePubKeysToRemoteHosts ( pubKeys , remoteServerSet , userName ) ) ; } return canProceed ; }
Source:
private void waitForConnect ( ) throws org.ovirt.vdsm.jsonrpc.client.ClientConnectionException { try { this . connected.await ( policy.getRetryTimeOut ( ) , policy.getTimeUnit ( ) ) ; } catch ( java.lang.InterruptedException e ) { disconnect ( "Waiting for connect interrupted" ) ; throw new java.lang.IllegalStateException ( "Communication interrupted" ) ; } }

Target:
private void waitForConnect ( ) throws org.ovirt.vdsm.jsonrpc.client.ClientConnectionException { try { this . connected.await ( policy.getRetryTimeOut ( ) , policy.getTimeUnit ( ) ) ; } catch ( java.lang.InterruptedException e ) { log.error ( e.getMessage ( ) , e ) ; disconnect ( "Waiting for connect interrupted" ) ; throw new java.lang.IllegalStateException ( "Communication interrupted" ) ; } }
Source:
protected boolean setAndValidateCpuProfile ( ) { org.ovirt.engine.core.bll.ImportVmCommandBase.getVm ( ) . getStaticData ( ) . setVdsGroupId ( org.ovirt.engine.core.bll.ImportVmCommandBase.getVdsGroupId ( ) ) ; org.ovirt.engine.core.bll.ImportVmCommandBase.getVm ( ) . getStaticData ( ) . setCpuProfileId ( org.ovirt.engine.core.bll.ImportVmCommandBase.getParameters ( ) . getCpuProfileId ( ) ) ; return validate ( org.ovirt.engine.core.bll.profiles.CpuProfileHelper.setAndValidateCpuProfile ( org.ovirt.engine.core.bll.ImportVmCommandBase.getVm ( ) . getStaticData ( ) , org.ovirt.engine.core.bll.ImportVmCommandBase.getVdsGroup ( ) . getCompatibilityVersion ( ) ) ) ; }

Target:
protected boolean setAndValidateCpuProfile ( ) { org.ovirt.engine.core.bll.ImportVmCommandBase.getVm ( ) . getStaticData ( ) . setVdsGroupId ( org.ovirt.engine.core.bll.ImportVmCommandBase.getVdsGroupId ( ) ) ; org.ovirt.engine.core.bll.ImportVmCommandBase.getVm ( ) . getStaticData ( ) . setCpuProfileId ( org.ovirt.engine.core.bll.ImportVmCommandBase.getParameters ( ) . getCpuProfileId ( ) ) ; return validate ( org.ovirt.engine.core.bll.profiles.CpuProfileHelper.setAndValidateCpuProfile ( org.ovirt.engine.core.bll.ImportVmCommandBase.getVm ( ) . getStaticData ( ) , getEffectiveCompatibilityVersion ( ) ) ) ; }
Source:
public static void getDataCenterMaxNameLength ( 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.StoragePoolNameSizeLimit , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public void getDataCentersByStorageDomain ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storageDomainId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StoragePool > ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStoragePoolsByStorageDomainId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( storageDomainId ) , aQuery ) ; }
Source:
private void updateActionAvailability ( ) { java.util.List < org.ovirt.engine.core.common.utils.PairQueryable < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface , org.ovirt.engine.core.common.businessentities.VDS > > selectedItems = ( ( getSelectedItems ( ) ) != null ) ? getSelectedItems ( ) : new java.util.ArrayList ( ) ; getSetupNetworksCommand ( ) . setIsExecutionAllowed ( ( ( ( selectedItems.size ( ) ) == 1 ) && ( ( selectedItems.get ( 0 ) . getSecond ( ) . getVdsGroupCompatibilityVersion ( ) . compareTo ( Version.v3_1 ) ) >= 0 ) ) ) ; }

Target:
private void updateActionAvailability ( ) { java.util.Collection < org.ovirt.engine.core.common.utils.PairQueryable < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface , org.ovirt.engine.core.common.businessentities.VDS > > selectedItems = ( ( getSelectedItems ( ) ) != null ) ? getSelectedItems ( ) : new java.util.ArrayList ( ) ; getSetupNetworksCommand ( ) . setIsExecutionAllowed ( ( ( ( selectedItems.size ( ) ) == 1 ) && ( ( selectedItems.iterator ( ) . next ( ) . getSecond ( ) . getVdsGroupCompatibilityVersion ( ) . compareTo ( Version.v3_1 ) ) >= 0 ) ) ) ; }
Source:
public java.lang.String getJavaMemberStyleName ( org.ovirt.api.metamodel.concepts.Name name ) { java.lang.StringBuilder buffer = new java.lang.StringBuilder ( ) ; name.words ( ) . findFirst ( ) . map ( java.lang.String :: toLowerCase ) . ifPresent ( buffer :: append ) ; name.words ( ) . skip ( 1 ) . map ( words :: capitalize ) . forEach ( buffer :: append ) ; return buffer.toString ( ) ; }

Target:
public java.lang.String getJavaMemberStyleName ( org.ovirt.api.metamodel.concepts.Name name ) { java.lang.StringBuilder buffer = new java.lang.StringBuilder ( ) ; name.words ( ) . findFirst ( ) . map ( java.lang.String :: toLowerCase ) . ifPresent ( buffer :: append ) ; name.words ( ) . skip ( 1 ) . map ( words :: capitalize ) . forEach ( buffer :: append ) ; java.lang.String result = buffer.toString ( ) ; if ( javaReservedWords.contains ( result ) ) { result = result + "_" ; } return result ; }
Source:
public static boolean interfaceHasVlan ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface , java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > allIfaces ) { for ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface i : allIfaces ) { if ( ( org.ovirt.engine.core.utils.NetworkUtils.isVlan ( i ) ) && ( org.ovirt.engine.core.utils.NetworkUtils.interfaceBasedOn ( i , iface.getName ( ) ) ) ) { return true ; } } return false ; }

Target:
public static boolean interfaceHasVlan ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface , java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > allIfaces ) { for ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface i : allIfaces ) { if ( ( org.ovirt.engine.core.common.utils.NetworkCommonUtils.isVlan ( i ) ) && ( org.ovirt.engine.core.utils.NetworkUtils.interfaceBasedOn ( i , iface.getName ( ) ) ) ) { return true ; } } return false ; }
Source:
public int compare ( org.ovirt.engine.api.model.Network n1 , org.ovirt.engine.api.model.Network n2 ) { if ( n1.getId ( ) . equals ( n2.getId ( ) ) ) { return 0 ; } else { return n1.getId ( ) . compareTo ( n2.getId ( ) ) ; } }

Target:
private org.ovirt.engine.api.model.Network getModel ( int index ) { org.ovirt.engine.api.model.Network model = new org.ovirt.engine.api.model.Network ( ) ; model.setId ( GUIDS [ 0 ] . toString ( ) ) ; model.setName ( NAMES [ index ] ) ; model.setDescription ( DESCRIPTIONS [ index ] ) ; return model ; }
Source:
private void assertExecuteActionFailure ( ) { try { command.executeCommand ( ) ; } catch ( java.lang.Exception expected ) { } org.junit.Assert.assertFalse ( command.getReturnValue ( ) . getSucceeded ( ) ) ; org.junit.Assert.assertEquals ( AuditLogType.UPDATE_HOST_NIC_VFS_CONFIG_FAILED , command.getAuditLogTypeValue ( ) ) ; }

Target:
private void assertExecuteActionFailure ( ) { try { command.executeCommand ( ) ; } catch ( java.lang.Exception expected ) { } org.junit.jupiter.api.Assertions.assertFalse ( command.getReturnValue ( ) . getSucceeded ( ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( AuditLogType.UPDATE_HOST_NIC_VFS_CONFIG_FAILED , command.getAuditLogTypeValue ( ) ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.storage.DiskImage getDiskImageByImageId ( org.ovirt.engine.core.compat.Guid imageId ) { if ( diskImagesMap.containsKey ( imageId ) ) { return diskImagesMap.get ( imageId ) ; } org.ovirt.engine.core.common.businessentities.storage.DiskImage diskImage = org.ovirt.engine.core.bll.storage.lsm.LiveMigrateVmDisksCommand.getDiskImageDao ( ) . get ( imageId ) ; diskImagesMap.put ( imageId , diskImage ) ; return diskImage ; }

Target:
private org.ovirt.engine.core.common.businessentities.storage.DiskImage getDiskImageByImageId ( org.ovirt.engine.core.compat.Guid imageId ) { if ( diskImagesMap.containsKey ( imageId ) ) { return diskImagesMap.get ( imageId ) ; } org.ovirt.engine.core.common.businessentities.storage.DiskImage diskImage = diskImageDao.get ( imageId ) ; diskImagesMap.put ( imageId , diskImage ) ; return diskImage ; }
Source:
public static void getStorageDomainById ( 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 ? ( ( org.ovirt.engine.core.common.businessentities.StorageDomain ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageDomainById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( storageDomainId ) , aQuery ) ; }

Target:
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.getInstance ( ) . runQuery ( VdcQueryType.GetStoragePoolById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) . withoutRefresh ( ) , aQuery ) ; }
Source:
public static java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmOsType > Get64bitOsTypes ( ) { if ( ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.x64OsTypes ) != null ) { return org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.x64OsTypes ; } org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.x64OsTypes = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmOsType > ( java.util.Arrays.asList ( new org.ovirt.engine.core.common.businessentities.VmOsType [ ] { org.ovirt.engine.core.common.businessentities.VmOsType.RHEL3x64 , org.ovirt.engine.core.common.businessentities.VmOsType.RHEL4x64 , org.ovirt.engine.core.common.businessentities.VmOsType.RHEL5x64 , org.ovirt.engine.core.common.businessentities.VmOsType.RHEL6x64 , org.ovirt.engine.core.common.businessentities.VmOsType.Windows2003x64 , org.ovirt.engine.core.common.businessentities.VmOsType.Windows2008R2x64 , org.ovirt.engine.core.common.businessentities.VmOsType.Windows2008x64 , org.ovirt.engine.core.common.businessentities.VmOsType.Windows7x64 } ) ) ; return org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.x64OsTypes ; }

Target:
public int compare ( java.lang.Integer o1 , java.lang.Integer o2 ) { return org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.osNames.get ( o1 ) . compareTo ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.osNames.get ( o2 ) ) ; }
Source:
public void setClientPolicy ( org.ovirt.vdsm.jsonrpc.client.internal.ClientPolicy policy ) { this . policy = policy ; this . validate ( ) ; if ( isOpen ( ) ) { disconnect ( "Policy reset" ) ; } }

Target:
public void setClientPolicy ( org.ovirt.vdsm.jsonrpc.client.internal.ClientPolicy policy ) { this . policy = policy ; this . validate ( ) ; if ( ! ( isOpen ( ) ) ) { return ; } try ( org.ovirt.vdsm.jsonrpc.client.utils.LockWrapper wrapper = new org.ovirt.vdsm.jsonrpc.client.utils.LockWrapper ( this . lock ) ) { if ( ( isOpen ( ) ) && ( ! ( this . closing.get ( ) ) ) ) { scheduleClose ( "Policy reset" ) ; this . closing.set ( true ) ; } } }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { dcLabels = ( ( java.util.SortedSet < java.lang.String > ) ( returnValue ) ) ; initLabelModels ( ) ; queryNetworks ( ) ; }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { allBonds = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ; initNetworkModels ( ) ; initDcNetworkParams ( ) ; initNicModels ( ) ; hostSetupNetworksParametersData.allNics = allNics ; hostSetupNetworksParametersData.existingNetworkAttachments = existingNetworkAttachments ; stopProgress ( ) ; }
Source:
private javax.ws.rs.core.Response attachDiskToVm ( org.ovirt.engine.api.model.Disk disk ) { org.ovirt.engine.core.common.action.AttachDettachVmDiskParameters params ; if ( disk.isSetActive ( ) ) { params = new org.ovirt.engine.core.common.action.AttachDettachVmDiskParameters ( parentId , org.ovirt.engine.core.compat.Guid.createGuidFromString ( disk.getId ( ) ) , disk.isActive ( ) ) ; } else { params = new org.ovirt.engine.core.common.action.AttachDettachVmDiskParameters ( parentId , org.ovirt.engine.core.compat.Guid.createGuidFromString ( disk.getId ( ) ) ) ; } return performAction ( VdcActionType.AttachDiskToVm , params ) ; }

Target:
private javax.ws.rs.core.Response attachDiskToVm ( org.ovirt.engine.api.model.Disk disk ) { boolean isDiskActive = ( disk.isSetActive ( ) ) ? disk.isActive ( ) : false ; org.ovirt.engine.core.common.action.AttachDettachVmDiskParameters params = new org.ovirt.engine.core.common.action.AttachDettachVmDiskParameters ( parentId , org.ovirt.engine.core.compat.Guid.createGuidFromString ( disk.getId ( ) ) , isDiskActive ) ; return performAction ( VdcActionType.AttachDiskToVm , params ) ; }
Source:
public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result1 ) { org.ovirt.engine.ui.uicommonweb.models.vms.VmListModel vmListModel1 = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.VmListModel ) ( result1.getState ( ) ) ) ; vmListModel1.getWindow ( ) . StopProgress ( ) ; org.ovirt.engine.core.common.action.VdcReturnValueBase retVal = result1.getReturnValue ( ) ; if ( ( retVal != null ) && ( retVal.getSucceeded ( ) ) ) { vmListModel1.cancel ( ) ; } }

Target:
public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result1 ) { org.ovirt.engine.ui.uicommonweb.models.vms.VmListModel vmListModel1 = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.VmListModel ) ( result1.getState ( ) ) ) ; vmListModel1.getWindow ( ) . stopProgress ( ) ; org.ovirt.engine.core.common.action.VdcReturnValueBase retVal = result1.getReturnValue ( ) ; if ( ( retVal != null ) && ( retVal.getSucceeded ( ) ) ) { vmListModel1.cancel ( ) ; } }
Source:
private void Preset_SelectedItemChanged ( ) { org.ovirt.engine.core.common.businessentities.DiskImageBase preset = ( ( ( org.ovirt.engine.core.common.businessentities.DiskImageBase ) ( getPreset ( ) . getSelectedItem ( ) ) ) != null ) ? ( ( org.ovirt.engine.core.common.businessentities.DiskImageBase ) ( getPreset ( ) . getSelectedItem ( ) ) ) : ( ( org.ovirt.engine.core.common.businessentities.DiskImageBase ) ( org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.DiskImageBase > FirstOrDefault ( getPreset ( ) . getItems ( ) ) ) ) ; setVolumeFormat ( preset.getVolumeFormat ( ) ) ; getVolumeType ( ) . setSelectedItem ( preset.getVolumeType ( ) ) ; }

Target:
private void WipeAfterDelete_EntityChanged ( org.ovirt.engine.ui.uicompat.EventArgs e ) { if ( ( ! ( getIsWipeAfterDelete ( ) . getIsChangable ( ) ) ) && ( ( java.lang.Boolean ) ( getIsWipeAfterDelete ( ) . getEntity ( ) ) ) ) { getIsWipeAfterDelete ( ) . setEntity ( false ) ; } }
Source:
public org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface.NetworkImplementationDetails getNetworkImplementationDetails ( ) { if ( ! ( isAttached ( ) ) ) { return null ; } org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nic = ( hasVlan ( ) ) ? getVlanNicModel ( ) . getIface ( ) : getAttachedToNic ( ) . getIface ( ) ; return nic.getNetworkImplementationDetails ( ) ; }

Target:
public org.ovirt.engine.core.common.businessentities.network.ReportedConfigurations getReportedConfigurations ( ) { org.ovirt.engine.core.common.businessentities.network.NetworkAttachment networkAttachment = getNetworkAttachment ( ) ; return networkAttachment == null ? null : networkAttachment.getReportedConfigurations ( ) ; }
Source:
public java.util.Map < java.lang.String , java.lang.String > getCustomValues ( ) { if ( ( clusterId ) != null ) { addCustomValue ( GlusterConstants.SERVICE_GROUP_TYPE , GlusterConstants.SERVICE_GROUP_TYPE_CLUSTER ) ; addCustomValue ( GlusterConstants.SERVICE_GROUP_NAME , getVdsGroupName ( ) ) ; } else if ( ( serverId ) != null ) { addCustomValue ( GlusterConstants.SERVICE_GROUP_TYPE , GlusterConstants.SERVICE_GROUP_TYPE_SERVER ) ; addCustomValue ( GlusterConstants.SERVICE_GROUP_NAME , getVdsName ( ) ) ; } return super . getCustomValues ( ) ; }

Target:
protected void executeCommand ( ) { if ( ! ( org.ovirt.engine.core.compat.Guid.isNullOrEmpty ( serverId ) ) ) { performActionForServicesOfServer ( ) ; } else if ( ! ( org.ovirt.engine.core.compat.Guid.isNullOrEmpty ( clusterId ) ) ) { performActionForServicesOfCluster ( ) ; } addCustomValue ( GlusterConstants.SERVICE_TYPE , getParameters ( ) . getServiceType ( ) . name ( ) ) ; }
Source:
public void updateVmTag ( ) { existingVmTag.setDefaultDisplayType ( ( ( existingVmTag.getDefaultDisplayType ( ) ) + 1 ) ) ; dao.updateDefaultDisplayForVmTag ( existingVmTag ) ; org.ovirt.engine.core.common.businessentities.tags_vm_map result = dao.getTagVmByTagIdAndByVmId ( existingVmTag.gettag_id ( ) , existingVmTag.getvm_id ( ) ) ; assertNotNull ( result ) ; assertEqualsTagsVmMap ( existingVmTag , result ) ; }

Target:
public void updateVmTag ( ) { existingVmTag.setDefaultDisplayType ( ( ( existingVmTag.getDefaultDisplayType ( ) ) + 1 ) ) ; dao.updateDefaultDisplayForVmTag ( existingVmTag ) ; org.ovirt.engine.core.common.businessentities.TagsVmMap result = dao.getTagVmByTagIdAndByVmId ( existingVmTag.gettag_id ( ) , existingVmTag.getvm_id ( ) ) ; assertNotNull ( result ) ; assertEqualsTagsVmMap ( existingVmTag , result ) ; }
Source:
public void getFreeVfNotSriovNic ( ) { commonIsSriovDevice ( false ) ; try { hostNicVfsConfigHelper.getFreeVf ( nic ) ; } catch ( java.lang.Exception exception ) { org.junit.Assert.assertTrue ( ( exception instanceof java.lang.UnsupportedOperationException ) ) ; } }

Target:
public void getFreeVfMoreThanOneFreeVf ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.HostDevice > freeVfs = freeVfCommon ( 5 , 2 , 2 , 2 , 2 ) ; org.junit.Assert.assertEquals ( 5 , freeVfs.size ( ) ) ; org.junit.Assert.assertTrue ( freeVfs.contains ( hostNicVfsConfigHelper.getFreeVf ( nic , null ) ) ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface getVlanDevice ( final org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface baseNic , final java.lang.Integer vlanId ) { if ( vlanId == null ) { return null ; } return org.ovirt.engine.core.utils.linq.LinqUtils.firstOrNull ( getNics ( ) , new org.ovirt.engine.core.utils.linq.Predicate < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > ( ) { @ java.lang.Override public boolean eval ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface t ) { return ( baseNic.getName ( ) . equals ( t.getBaseInterface ( ) ) ) && ( org.ovirt.engine.core.common.utils.ObjectUtils.objectsEqual ( t.getVlanId ( ) , vlanId ) ) ; } } ) ; }

Target:
protected org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface getVlanDevice ( final org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface baseNic , final java.lang.Integer vlanId ) { if ( vlanId == null ) { return null ; } return org.ovirt.engine.core.utils.linq.LinqUtils.firstOrNull ( getNics ( baseNic.getVdsId ( ) ) , new org.ovirt.engine.core.utils.linq.Predicate < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > ( ) { @ java.lang.Override public boolean eval ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface t ) { return ( baseNic.getName ( ) . equals ( t.getBaseInterface ( ) ) ) && ( java.util.Objects.equals ( t.getVlanId ( ) , vlanId ) ) ; } } ) ; }
Source:
private static java.util.List < org.ovirt.engine.core.aaa.DirectoryGroup > queryGroups ( final org.ovirt.engine.core.extensions.mgr.ExtensionProxy extension , final java.lang.String namespace , final org.ovirt.engine.api.extensions.ExtMap filter ) { return org.ovirt.engine.core.aaa.AuthzUtils.populateGroups ( extension , namespace , new org.ovirt.engine.api.extensions.ExtMap ( ) . mput ( Authz.InvokeKeys.QUERY_ENTITY , Authz.QueryEntity.GROUP ) . mput ( Authz.InvokeKeys.QUERY_FILTER , filter ) ) ; }

Target:
private static java.util.List < org.ovirt.engine.core.aaa.DirectoryGroup > queryGroups ( final org.ovirt.engine.core.extensions.mgr.ExtensionProxy extension , final java.lang.String namespace , final org.ovirt.engine.api.extensions.ExtMap filter , boolean resolveGroups , boolean recursiveGroupResolving ) { return org.ovirt.engine.core.aaa.AuthzUtils.populateGroups ( extension , namespace , new org.ovirt.engine.api.extensions.ExtMap ( ) . mput ( Authz.InvokeKeys.QUERY_ENTITY , Authz.QueryEntity.GROUP ) . mput ( Authz.InvokeKeys.QUERY_FILTER , filter ) . mput ( Authz.InvokeKeys.QUERY_FLAGS , org.ovirt.engine.core.aaa.AuthzUtils.queryFlagValue ( resolveGroups , recursiveGroupResolving ) ) ) ; }
Source:
public void validateFailsForNoStorageDevice ( ) { org.mockito.Mockito.doReturn ( new org.ovirt.engine.core.common.action.gluster.CreateBrickParameters ( HOST_ID , "brick1" , "/gluster-bricks/brick1" , org.ovirt.engine.core.common.businessentities.RaidType.RAID0 , null , null , java.util.Collections.emptyList ( ) , getStorageDevice ( "sdd" ) , org.ovirt.engine.core.common.businessentities.CacheModeType.writethrough , 10 ) ) . when ( cmd ) . getParameters ( ) ; prepareMocks ( VDSStatus.Up ) ; org.junit.Assert.assertFalse ( cmd.validate ( ) ) ; }

Target:
public void validateFailsForNoStorageDevice ( ) { org.mockito.Mockito.doReturn ( new org.ovirt.engine.core.common.action.gluster.CreateBrickParameters ( HOST_ID , "brick1" , "/gluster-bricks/brick1" , org.ovirt.engine.core.common.businessentities.RaidType.RAID0 , null , null , java.util.Collections.emptyList ( ) , getStorageDevice ( "sdd" ) , org.ovirt.engine.core.common.businessentities.CacheModeType.writethrough , 10 ) ) . when ( cmd ) . getParameters ( ) ; prepareMocks ( VDSStatus.Up ) ; org.junit.jupiter.api.Assertions.assertFalse ( cmd.validate ( ) ) ; }
Source:
public void updateAllInBatch ( java.lang.String procedureName , java.util.Collection < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > paramValues , org.ovirt.engine.core.dal.dbbroker.MapSqlParameterMapper < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > mapper ) { for ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface entity : paramValues ) { persistQosChanges ( entity ) ; } getCallsHandler ( ) . executeStoredProcAsBatch ( procedureName , paramValues , mapper ) ; }

Target:
public void updateAllInBatch ( java.lang.String procedureName , java.util.Collection < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > paramValues , org.ovirt.engine.core.dal.dbbroker.MapSqlParameterMapper < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > mapper ) { for ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface entity : paramValues ) { hostNetworkQosDao.persistQosChanges ( entity.getId ( ) , entity.getQos ( ) ) ; } getCallsHandler ( ) . executeStoredProcAsBatch ( procedureName , paramValues , mapper ) ; }
Source:
private void mockVmWithDisk ( org.ovirt.engine.core.compat.Guid storageId ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage image = new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ; image.setStorageIds ( new java.util.ArrayList ( java.util.Arrays.asList ( storageId ) ) ) ; mockVm ( ) . getDiskMap ( ) . put ( image.getId ( ) , image ) ; }

Target:
private void mockVmWithDisk ( org.ovirt.engine.core.compat.Guid storageId ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage image = new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ; image.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; image.setStorageIds ( new java.util.ArrayList ( java.util.Arrays.asList ( storageId ) ) ) ; org.ovirt.engine.core.common.businessentities.storage.DiskVmElement dve = new org.ovirt.engine.core.common.businessentities.storage.DiskVmElement ( image.getId ( ) , org.ovirt.engine.core.bll.storage.disk.AddDiskCommandTest.vmId ) ; image.setDiskVmElements ( java.util.Collections.singletonList ( dve ) ) ; mockVm ( ) . getDiskMap ( ) . put ( image.getId ( ) , image ) ; }
Source:
public static java.util.Map < org.ovirt.engine.core.compat.Guid , java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > > getImagesLeaf ( java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > images ) { java.util.Map < org.ovirt.engine.core.compat.Guid , java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > > retVal = new java.util.HashMap < org.ovirt.engine.core.compat.Guid , java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > > ( ) ; for ( org.ovirt.engine.core.common.businessentities.DiskImage image : images ) { org.ovirt.engine.core.utils.MultiValueMapUtils.addToMap ( image.getId ( ) , image , retVal ) ; } for ( org.ovirt.engine.core.compat.Guid key : retVal.keySet ( ) ) { org.ovirt.engine.core.bll.ImportVmCommand.sortImageList ( retVal.get ( key ) ) ; } return retVal ; }

Target:
public static java.util.Map < org.ovirt.engine.core.compat.Guid , java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > > getImagesLeaf ( java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > images ) { java.util.Map < org.ovirt.engine.core.compat.Guid , java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > > retVal = new java.util.HashMap < org.ovirt.engine.core.compat.Guid , java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > > ( ) ; for ( org.ovirt.engine.core.common.businessentities.DiskImage image : images ) { org.ovirt.engine.core.utils.MultiValueMapUtils.addToMap ( image.getId ( ) , image , retVal ) ; } for ( java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > list : retVal.values ( ) ) { org.ovirt.engine.core.bll.ImportVmCommand.sortImageList ( list ) ; } return retVal ; }
Source:
public java.util.List < org.ovirt.engine.core.common.businessentities.EventNotificationMethod > getAllEventNotificationMethods ( ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) ; org.springframework.jdbc.core.simple.ParameterizedRowMapper < org.ovirt.engine.core.common.businessentities.EventNotificationMethod > mapper = new org.springframework.jdbc.core.simple.ParameterizedRowMapper < org.ovirt.engine.core.common.businessentities.EventNotificationMethod > ( ) { @ java.lang.Override public org.ovirt.engine.core.common.businessentities.EventNotificationMethod mapRow ( java.sql.ResultSet rs , int rowNum ) throws java.sql.SQLException { org.ovirt.engine.core.common.businessentities.EventNotificationMethod entity = new org.ovirt.engine.core.common.businessentities.EventNotificationMethod ( ) ; entity.setmethod_id ( rs.getInt ( "method_id" ) ) ; entity.setmethod_type ( EventNotificationMethods.EMAIL ) ; return entity ; } } ; return getCallsHandler ( ) . executeReadList ( "GetAllFromevent_notification_methods" , mapper , parameterSource ) ; }

Target:
public java.util.List < org.ovirt.engine.core.common.businessentities.event_subscriber > getAll ( ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) ; return getCallsHandler ( ) . executeReadList ( "GetAllFromevent_subscriber" , org.ovirt.engine.core.dao.EventDAODbFacadeImpl.EventSubscriberRowMapper.instance , parameterSource ) ; }
Source:
protected void setUpEntityQueryExpectations ( int times ) throws java.lang.Exception { while ( ( times -- ) > 0 ) { setUpEntityQueryExpectations ( VdcQueryType.GetVmGuestAgentInterfacesByVmId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendVmReportedDeviceResourceTest.VM_ID } , getEntityList ( ) ) ; } }

Target:
protected void setUpEntityQueryExpectations ( int times ) throws java.lang.Exception { while ( ( times -- ) > 0 ) { setUpEntityQueryExpectations ( QueryType.GetVmGuestAgentInterfacesByVmId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendVmReportedDeviceResourceTest.VM_ID } , getEntityList ( ) ) ; } }
Source:
protected void init ( ) { super . init ( ) ; initResource ( resource.getParent ( ) ) ; resource.getParent ( ) . setBackend ( backend ) ; resource.getParent ( ) . setMappingLocator ( mapperLocator ) ; resource.getParent ( ) . setSessionHelper ( sessionHelper ) ; resource.getParent ( ) . setMessageBundle ( messageBundle ) ; resource.getParent ( ) . setHttpHeaders ( httpHeaders ) ; }

Target:
protected void init ( ) { super . init ( ) ; initResource ( resource.getParent ( ) ) ; resource.getParent ( ) . setBackend ( backend ) ; resource.getParent ( ) . setMappingLocator ( mapperLocator ) ; resource.getParent ( ) . setValidatorLocator ( validatorLocator ) ; resource.getParent ( ) . setSessionHelper ( sessionHelper ) ; resource.getParent ( ) . setMessageBundle ( messageBundle ) ; resource.getParent ( ) . setHttpHeaders ( httpHeaders ) ; }
Source:
public static boolean isLiveMergeSupported ( org.ovirt.engine.core.common.businessentities.VM vm ) { return ( vm != null ) && ( ( java.lang.Boolean ) ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigValuePreConverted ( ConfigurationValues.LiveMergeSupported , vm.getVdsGroupCompatibilityVersion ( ) . toString ( ) ) ) ) ; }

Target:
public boolean isMemorySnapshotSupported ( org.ovirt.engine.core.common.businessentities.VM vm ) { if ( vm == null ) { return false ; } boolean archMemorySnapshotSupported = isMemorySnapshotSupportedByArchitecture ( vm.getClusterArch ( ) , vm.getVdsGroupCompatibilityVersion ( ) ) ; return ( ( java.lang.Boolean ) ( getConfigValuePreConverted ( ConfigurationValues.MemorySnapshotSupported , vm.getVdsGroupCompatibilityVersion ( ) . toString ( ) ) ) ) && archMemorySnapshotSupported ; }