auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private org.ovirt.engine.core.bll.exportimport.ConvertVmCommand < ? extends org.ovirt.engine.core.common.action.ConvertVmParameters > getCommand ( ) { if ( ( cachedCommand ) == null ) { cachedCommand = org.ovirt.engine.core.bll.tasks.CommandCoordinatorUtil.retrieveCommand ( cmdId ) ; } return cachedCommand ; }

Target:
private org.ovirt.engine.core.bll.exportimport.ConvertVmCommand < ? extends org.ovirt.engine.core.common.action.ConvertVmParameters > getCommand ( ) { if ( ( cachedCommand ) == null ) { cachedCommand = commandCoordinatorUtil.retrieveCommand ( cmdId ) ; } return cachedCommand ; }
Source:
public void testAllLunsHaveDiscardZeroesTheDataSupportSucceeds ( ) { junit.framework.Assert.assertTrue ( discardHelper.allLunsHaveDiscardZeroesTheDataSupport ( java.util.Arrays.asList ( createLunWithDiscardFunctionality ( 1024L , true ) , createLunWithDiscardFunctionality ( 0L , true ) ) ) ) ; }

Target:
public void testAllLunsHaveDiscardZeroesTheDataSupportSucceeds ( ) { org.junit.Assert.assertTrue ( discardHelper.allLunsHaveDiscardZeroesTheDataSupport ( java.util.Arrays.asList ( createLunWithDiscardFunctionality ( 1024L , true ) , createLunWithDiscardFunctionality ( 0L , true ) ) ) ) ; }
Source:
public void setInterfaceStatistics ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > value ) { this . interfaceStatisticsField = value ; }

Target:
public void setInterfaceStatistics ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > interfaceStatistics ) { this . interfaceStatistics = interfaceStatistics ; }
Source:
public static void addPermissions ( org.ovirt.engine.core.compat.Guid userId , org.ovirt.engine.core.compat.Guid networkId , boolean publicUse ) { org.ovirt.engine.core.bll.network.cluster.NetworkHelper.addPermission ( userId , networkId , PredefinedRoles.NETWORK_ADMIN ) ; if ( publicUse ) { org.ovirt.engine.core.bll.network.cluster.NetworkHelper.addPermission ( MultiLevelAdministrationHandler.EVERYONE_OBJECT_ID , networkId , PredefinedRoles.NETWORK_USER ) ; } }

Target:
public static void addPermissionsOnNetwork ( org.ovirt.engine.core.compat.Guid userId , org.ovirt.engine.core.compat.Guid networkId ) { org.ovirt.engine.core.bll.network.cluster.NetworkHelper.addPermission ( userId , networkId , PredefinedRoles.NETWORK_ADMIN ) ; }
Source:
public void validateSucceeds ( ) { cmd.getParameters ( ) . setVolumeId ( startedVolumeId ) ; cmd.setGlusterVolumeId ( startedVolumeId ) ; cmd.getParameters ( ) . setGeoRepSessionId ( geoRepSessionId ) ; org.junit.Assert.assertTrue ( cmd.validate ( ) ) ; }

Target:
public void validateSucceeds ( ) { cmd.getParameters ( ) . setVolumeId ( startedVolumeId ) ; cmd.setGlusterVolumeId ( startedVolumeId ) ; cmd.getParameters ( ) . setGeoRepSessionId ( geoRepSessionId ) ; org.junit.jupiter.api.Assertions.assertTrue ( cmd.validate ( ) ) ; }
Source:
public int [ ] getDefaultTokens ( ) { return new int [ 0 ] ; }

Target:
public int [ ] getRequiredTokens ( ) { return new int [ 0 ] ; }
Source:
public static java.lang.String translateVdcFault ( org.ovirt.engine.core.common.errors.VdcFault fault ) { return org.ovirt.engine.ui.frontend.Frontend.vdsmErrorsTranslator.TranslateErrorTextSingle ( ( ( fault.getError ( ) ) == null ? fault.getMessage ( ) : fault.getError ( ) . toString ( ) ) ) ; }

Target:
public static java.lang.String translateVdcFault ( org.ovirt.engine.core.common.errors.VdcFault fault ) { return org.ovirt.engine.ui.frontend.Frontend.getVdsmErrorsTranslator ( ) . TranslateErrorTextSingle ( ( ( fault.getError ( ) ) == null ? fault.getMessage ( ) : fault.getError ( ) . toString ( ) ) ) ; }
Source:
private void attachManagementNetwork ( ) { final org.ovirt.engine.core.common.businessentities.network.NetworkCluster networkCluster = createManagementNetworkCluster ( ) ; networkCluster.setClusterId ( org.ovirt.engine.core.bll.AddVdsGroupCommand.getVdsGroupId ( ) ) ; networkClusterDao.save ( networkCluster ) ; }

Target:
private void attachManagementNetwork ( ) { final org.ovirt.engine.core.common.businessentities.network.NetworkCluster networkVdsGroup = createManagementNetworkCluster ( ) ; networkVdsGroup.setClusterId ( org.ovirt.engine.core.bll.AddVdsGroupCommand.getVdsGroupId ( ) ) ; networkClusterDao.save ( networkVdsGroup ) ; }
Source:
private java.util.List < org.ovirt.engine.core.common.businessentities.network.ExternalVnicProfileMapping > mapMultipleMappings ( org.ovirt.engine.api.model.VnicProfileMappings vnicProfileMappings ) { return vnicProfileMappings.getVnicProfileMappings ( ) . stream ( ) . map ( this :: mapSingleMappingEntry ) . collect ( java.util.stream.Collectors.toList ( ) ) ; }

Target:
private static java.util.List < org.ovirt.engine.core.common.businessentities.network.ExternalVnicProfileMapping > mapVnicProfileMappings ( org.ovirt.engine.api.model.VnicProfileMappings vnicProfileMappings ) { return vnicProfileMappings.getVnicProfileMappings ( ) . stream ( ) . map ( org.ovirt.engine.api.restapi.types.ExternalVnicProfileMappingMapper :: mapSingleMappingEntry ) . collect ( java.util.stream.Collectors.toList ( ) ) ; }
Source:
protected org.ovirt.engine.ui.uicommonweb.models.users.AdElementListModel doFlush ( ) { return org.ovirt.engine.ui.webadmin.section.main.view.popup.PermissionsPopupView.Driver.driver.flush ( ) ; }

Target:
protected org.ovirt.engine.ui.uicommonweb.models.users.AdElementListModel doFlush ( ) { return driver.flush ( ) ; }
Source:
public java.util.Map < java.lang.String , java.lang.Object > glusterVolumeGeoRepStatusDetail ( java.lang.String volumeName , java.lang.String slaveHost , java.lang.String slaveVolumeName ) ;

Target:
public java.util.Map < java.lang.String , java.lang.Object > glusterVolumeSnapshotConfigSet ( java.lang.String volumeName , java.lang.String cfgName , java.lang.String cfgValue ) ;
Source:
public void testValidModifiedBondsWhenAllOk ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.Bond bond = new org.ovirt.engine.core.common.businessentities.network.Bond ( ) ; bond.setSlaves ( java.util.Arrays.asList ( "slaveA" , "slaveB" ) ) ; doTestValidModifiedBonds ( bond , ValidationResult.VALID , ValidationResult.VALID , null , true , true ) ; }

Target:
public void testValidModifiedBondsFailsWhenBondIsUnnamed ( ) throws java.lang.Exception { doTestValidModifiedBonds ( new org.ovirt.engine.core.common.businessentities.network.Bond ( ) , new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.HOST_NETWORK_INTERFACE_NOT_EXIST ) , ValidationResult.VALID , new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.HOST_NETWORK_INTERFACE_NOT_EXIST ) , ValidationResult.VALID ) ; }
Source:
protected void executeCommand ( ) { if ( ( org.ovirt.engine.core.bll.InstallVdsCommand.getVds ( ) ) == null ) { return ; } if ( isOvirtReInstallOrUpgrade ( ) ) { reinstallOrUpgradeHost ( ) ; } else { installHost ( ) ; } }

Target:
protected void executeCommand ( ) { if ( ( org.ovirt.engine.core.bll.InstallVdsCommand.getVds ( ) ) == null ) { return ; } if ( isOvirtReInstallOrUpgrade ( ) ) { upgradeNode ( ) ; } else { installHost ( ) ; } }
Source:
public void eventRaised ( org.ovirt.engine.core.compat.Event ev , java.lang.Object sender , org.ovirt.engine.core.compat.EventArgs args ) { org.ovirt.engine.core.common.businessentities.Snapshot snapshot = ( ( org.ovirt.engine.core.common.businessentities.Snapshot ) ( vmSnapshotListModel.getSelectedItem ( ) ) ) ; updatePanel ( snapshot ) ; }

Target:
public void eventRaised ( org.ovirt.engine.core.compat.Event ev , java.lang.Object sender , org.ovirt.engine.core.compat.EventArgs args ) { updateTabsData ( snapshotModel ) ; }
Source:
public void validateWrongDiskImageTypeTemplate ( ) { initializeCommand ( new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ) ; initTemplateDiskImage ( ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( command , EngineMessage.ACTION_TYPE_FAILED_DISK_IS_NOT_VM_DISK ) ; }

Target:
public void validateImageNotFound ( ) { initializeCommand ( new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) , VmEntityType.VM ) ; org.mockito.Mockito.when ( diskValidator.isDiskExists ( ) ) . thenReturn ( new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_DISK_NOT_EXIST ) ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( command , EngineMessage.ACTION_TYPE_FAILED_DISK_NOT_EXIST ) ; }
Source:
public void setExceeded ( ) { percentageBarA.setStyleName ( style.percentageBarExceeded ( ) ) ; percentageLabelA.setStyleName ( style.percentageLabel ( ) ) ; percentageLabelA.setText ( "Exceeded" ) ; percentageBarB.setVisible ( false ) ; }

Target:
public void setExceeded ( ) { percentageBarA.setStyleName ( style.percentageBarExceeded ( ) ) ; percentageLabelA.setStyleName ( style.percentageLabel ( ) ) ; percentageLabelA.setText ( org.ovirt.engine.ui.userportal.widget.QuotaProgressBar.constants.exceededQuota ( ) ) ; percentageBarB.setVisible ( false ) ; }
Source:
public void testEmptyKeyVal ( ) { java.util.Map < java.lang.String , java.lang.String > map = org.ovirt.engine.core.utils.StringMapUtils.string2Map ( org.ovirt.engine.core.utils.StringMapUtilsTest.EMPTY_KEY_VAL ) ; org.junit.Assert.assertEquals ( 2 , map.size ( ) ) ; }

Target:
public void testEmptyKeyVal ( ) { java.util.Map < java.lang.String , java.lang.String > map = org.ovirt.engine.core.utils.StringMapUtils.string2Map ( org.ovirt.engine.core.utils.StringMapUtilsTest.EMPTY_KEY_VAL ) ; org.junit.jupiter.api.Assertions.assertEquals ( 2 , map.size ( ) ) ; }
Source:
private java.util.List < org.ovirt.engine.core.common.businessentities.gluster.BrickProfileDetails > getBrickProfileDetails ( ) { org.ovirt.engine.core.common.businessentities.gluster.BrickProfileDetails profileDetails = new org.ovirt.engine.core.common.businessentities.gluster.BrickProfileDetails ( ) ; profileDetails.setBrickId ( new org.ovirt.engine.core.compat.Guid ( ) ) ; profileDetails.setStatsInfo ( getStatsInfo ( ) ) ; return java.util.Collections.singletonList ( profileDetails ) ; }

Target:
private java.util.List < org.ovirt.engine.core.common.businessentities.gluster.BrickProfileDetails > getBrickProfileDetails ( ) { org.ovirt.engine.core.common.businessentities.gluster.BrickProfileDetails profileDetails = new org.ovirt.engine.core.common.businessentities.gluster.BrickProfileDetails ( ) ; profileDetails.setBrickId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; profileDetails.setStatsInfo ( getStatsInfo ( ) ) ; return java.util.Collections.singletonList ( profileDetails ) ; }
Source:
public void vmNotHavingPassthroughVnicsValid ( ) { vmNotHavingPassthroughVnicsCommon ( vm.getId ( ) , 0 , 2 ) ; assertThatVmNotHavingPassthroughVnics ( true ) ; }

Target:
private void mockVnics ( java.util.stream.Stream < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > vnics ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > vNics = vnics.collect ( java.util.stream.Collectors.toList ( ) ) ; org.mockito.Mockito.when ( vmNetworkInterfaceDao.getAllForVm ( vm.getId ( ) ) ) . thenReturn ( vNics ) ; }
Source:
public boolean Match ( org.ovirt.engine.core.common.businessentities.storage_pool source ) { return ( source.getstatus ( ) ) != ( status ) ; }

Target:
public boolean match ( org.ovirt.engine.core.common.businessentities.StoragePool source ) { return ( source.getstatus ( ) ) != ( status ) ; }
Source:
protected boolean isDiskExist ( org.ovirt.engine.core.common.businessentities.storage.Disk disk ) { if ( ( disk == null ) || ( ! ( isDiskExistInVm ( disk ) ) ) ) { addCanDoActionMessage ( VdcBllMessages.ACTION_TYPE_FAILED_DISK_NOT_EXIST ) ; return false ; } return true ; }

Target:
protected boolean isDiskExist ( org.ovirt.engine.core.common.businessentities.storage.Disk disk ) { if ( ( disk == null ) || ( ! ( isDiskExistInVm ( disk ) ) ) ) { addCanDoActionMessage ( EngineMessage.ACTION_TYPE_FAILED_DISK_NOT_EXIST ) ; return false ; } return true ; }
Source:
private org.ovirt.engine.core.bll.network.host.SetupNetworksHelper createHelper ( org.ovirt.engine.core.common.action.SetupNetworksParameters params ) { org.ovirt.engine.core.common.businessentities.VDS vds = org.mockito.Mockito.mock ( org.ovirt.engine.core.common.businessentities.VDS.class ) ; org.mockito.Mockito.when ( vds.getId ( ) ) . thenReturn ( Guid.Empty ) ; return createHelper ( params , vds ) ; }

Target:
private org.ovirt.engine.core.bll.network.host.SetupNetworksHelper createHelper ( org.ovirt.engine.core.common.action.SetupNetworksParameters params ) { return createHelper ( params , Version.v3_3 ) ; }
Source:
public java.lang.Integer getusage_mem_percent ( ) { return this . mVmStatistics.getusage_mem_percent ( ) ; }

Target:
public java.lang.Integer getUsageMemPercent ( ) { return this . vmStatistics.getusage_mem_percent ( ) ; }
Source:
public java.util.List < org.ovirt.engine.core.common.businessentities.VDS > getListForSpmSelection ( org.ovirt.engine.core.compat.Guid storagePoolId ) { return getCallsHandler ( ) . executeReadList ( "GetUpAndPrioritizedVds" , org.ovirt.engine.core.dao.VdsDAODbFacadeImpl.VdsRowMapper.instance , getCustomMapSqlParameterSource ( ) . addValue ( "storage_pool_id" , storagePoolId ) ) ; }

Target:
public java.util.List < org.ovirt.engine.core.common.businessentities.VDS > getListForSpmSelection ( org.ovirt.engine.core.compat.Guid storagePoolId ) { java.util.List < org.ovirt.engine.core.common.businessentities.VDS > vdsList = getCallsHandler ( ) . executeReadList ( "GetUpAndPrioritizedVds" , org.ovirt.engine.core.dao.VdsDAODbFacadeImpl.VdsRowMapper.instance , getCustomMapSqlParameterSource ( ) . addValue ( "storage_pool_id" , storagePoolId ) ) ; return uniteAgentsPreserveSpmPrioritySorting ( vdsList ) ; }
Source:
static com.gwtplatform.mvp.client.TabData getTabData ( org.ovirt.engine.ui.webadmin.ApplicationConstants applicationConstants , org.ovirt.engine.ui.common.uicommon.model.MainModelProvider < org.ovirt.engine.core.common.businessentities.StorageDomain , org.ovirt.engine.ui.uicommonweb.models.storage.StorageListModel > modelProvider ) { return new org.ovirt.engine.ui.common.widget.tab.ModelBoundTabData ( applicationConstants.storageMainTabLabel ( ) , 4 , modelProvider ) ; }

Target:
static com.gwtplatform.mvp.client.TabData getTabData ( org.ovirt.engine.ui.common.uicommon.model.MainModelProvider < org.ovirt.engine.core.common.businessentities.StorageDomain , org.ovirt.engine.ui.uicommonweb.models.storage.StorageListModel > modelProvider ) { return new org.ovirt.engine.ui.common.widget.tab.ModelBoundTabData ( org.ovirt.engine.ui.webadmin.section.main.presenter.tab.MainTabStoragePresenter.constants.storageMainTabLabel ( ) , 4 , modelProvider ) ; }
Source:
public void setvds_name ( java.lang.String value ) { this . vdsName = value ; }

Target:
public void setVdsName ( java.lang.String vdsName ) { this . vdsName = vdsName ; }
Source:
private org.ovirt.engine.core.common.job.Job makeExternalTestJob ( org.ovirt.engine.core.compat.Guid jobId ) { org.ovirt.engine.core.common.job.Job job = new org.ovirt.engine.core.common.job.Job ( ) ; job.setId ( jobId ) ; job.setDescription ( "Sample Job" ) ; job.setExternal ( true ) ; return job ; }

Target:
private org.ovirt.engine.core.common.job.Job makeExternalTestJob ( ) { org.ovirt.engine.core.common.job.Job job = new org.ovirt.engine.core.common.job.Job ( ) ; job.setId ( org.ovirt.engine.core.bll.EndExternalJobCommandTest.jobId ) ; job.setDescription ( "Sample Job" ) ; job.setExternal ( true ) ; return job ; }
Source:
public void emptyMacIsNotBad ( ) { vnic.setMacAddress ( null ) ; org.junit.Assert.assertFalse ( underTest.test ( vnic ) ) ; }

Target:
public void emptyMacIsNotBad ( ) { vnic.setMacAddress ( null ) ; org.junit.jupiter.api.Assertions.assertFalse ( underTest.test ( vnic ) ) ; }
Source:
public void HandleVdsFinishedInit ( org.ovirt.engine.core.compat.Guid vdsId ) { java.util.HashSet < org.ovirt.engine.core.compat.Guid > vms = vdsAndVmsList.get ( vdsId ) ; if ( vms != null ) { getEventListener ( ) . processOnVmStop ( vms ) ; vdsAndVmsList.remove ( vdsId ) ; } }

Target:
public void handleVmsFinishedInitOnVds ( org.ovirt.engine.core.compat.Guid vdsId ) { java.util.HashSet < org.ovirt.engine.core.compat.Guid > vms = vdsAndVmsList.get ( vdsId ) ; if ( vms != null ) { getEventListener ( ) . processOnVmStop ( vms ) ; vdsAndVmsList.remove ( vdsId ) ; } }
Source:
public void testCanDoActionCommand ( ) throws java.lang.Exception { org.ovirt.engine.core.bll.RemoveQuotaCommand removeQuotaCommand = createCommand ( ) ; org.junit.Assert.assertTrue ( removeQuotaCommand.canDoAction ( ) ) ; }

Target:
public void testValidateCommand ( ) throws java.lang.Exception { org.ovirt.engine.core.bll.RemoveQuotaCommand removeQuotaCommand = createCommand ( ) ; org.junit.Assert.assertTrue ( removeQuotaCommand.validate ( ) ) ; }
Source:
protected boolean verifyAddVM ( java.util.List < java.lang.String > reasons , int vmPriority ) { return org.ovirt.engine.core.bll.VmHandler.verifyAddVm ( reasons , getVmInterfaces ( ) . size ( ) , vmPriority ) ; }

Target:
protected boolean verifyAddVM ( java.util.List < java.lang.String > reasons , int vmPriority ) { return org.ovirt.engine.core.bll.VmHandler.verifyAddVm ( reasons , getVmInterfaces ( ) . size ( ) , vmPriority , org.ovirt.engine.core.bll.AddVmCommand.getMacPool ( ) ) ; }
Source:
protected void initializeStorageDomain ( ) { org.ovirt.engine.core.bll.storage.AddStorageDomainCommand.getStorageDomain ( ) . setId ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) ) ; }

Target:
protected void initializeStorageDomain ( ) { org.ovirt.engine.core.bll.storage.AddStorageDomainCommand.getStorageDomain ( ) . setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; }
Source:
boolean restartVds ( org.ovirt.engine.core.compat.Guid vdsId ) ;

Target:
void updateSchedulingStats ( org.ovirt.engine.core.common.businessentities.VDS vds ) ;
Source:
protected void removeCommand ( ) { org.ovirt.engine.core.bll.tasks.TaskManagerUtil.removeCommand ( getCommandId ( ) ) ; }

Target:
protected void removeCommand ( ) { javax.transaction.Transaction transaction = org.ovirt.engine.core.utils.transaction.TransactionSupport.suspend ( ) ; try { org.ovirt.engine.core.bll.tasks.TaskManagerUtil.removeCommand ( getCommandId ( ) ) ; } finally { org.ovirt.engine.core.utils.transaction.TransactionSupport.resume ( transaction ) ; } }
Source:
public void testPermissionSubjectOnNewImage ( ) { org.junit.Assert.assertEquals ( getCommand ( ) . getPermissionCheckSubjects ( ) . get ( 0 ) , new org.ovirt.engine.core.bll.utils.PermissionSubject ( getCommand ( ) . getParameters ( ) . getImageId ( ) , org.ovirt.engine.core.common.VdcObjectType.Storage , org.ovirt.engine.core.common.businessentities.ActionGroup.CREATE_DISK ) ) ; }

Target:
public void testPermissionSubjectOnNewImage ( ) { org.junit.Assert.assertEquals ( transferImageCommand.getPermissionCheckSubjects ( ) . get ( 0 ) , new org.ovirt.engine.core.bll.utils.PermissionSubject ( transferImageCommand.getParameters ( ) . getImageId ( ) , org.ovirt.engine.core.common.VdcObjectType.Storage , org.ovirt.engine.core.common.businessentities.ActionGroup.CREATE_DISK ) ) ; }
Source:
protected void unlockSnapshot ( ) { getSnapshotDao ( ) . updateStatus ( org.ovirt.engine.core.bll.AddVmTemplateFromSnapshotCommand.getParameters ( ) . getSourceSnapshotId ( ) , SnapshotStatus.OK ) ; }

Target:
protected void unlockSnapshot ( ) { org.ovirt.engine.core.bll.AddVmTemplateFromSnapshotCommand.getSnapshotDAO ( ) . updateStatus ( org.ovirt.engine.core.bll.AddVmTemplateFromSnapshotCommand.getParameters ( ) . getSourceSnapshotId ( ) , SnapshotStatus.OK ) ; }
Source:
public void canDisableVirtioScsiSuccess ( ) { org.ovirt.engine.core.common.businessentities.Disk disk = new org.ovirt.engine.core.common.businessentities.DiskImage ( ) ; disk.setDiskInterface ( DiskInterface.VirtIO ) ; org.junit.Assert.assertThat ( validator.canDisableVirtioScsi ( java.util.Collections.singletonList ( disk ) ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }

Target:
public void canDisableVirtioScsiSuccess ( ) { org.ovirt.engine.core.common.businessentities.storage.Disk disk = new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ; disk.setDiskInterface ( DiskInterface.VirtIO ) ; org.junit.Assert.assertThat ( validator.canDisableVirtioScsi ( java.util.Collections.singletonList ( disk ) ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }
Source:
private void Alert ( org.ovirt.engine.core.bll.AuditLogType logType , java.lang.String reason ) { org.ovirt.engine.core.bll.AuditLogableBase alert = new org.ovirt.engine.core.bll.AuditLogableBase ( ) ; alert.setVdsId ( getVdsId ( ) ) ; alert.addCustomValue ( "Reason" , reason ) ; org.ovirt.engine.core.bll.AlertDirector.Alert ( alert , logType ) ; }

Target:
private void Alert ( org.ovirt.engine.core.common.AuditLogType logType , java.lang.String reason ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase alert = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; alert.setVdsId ( getVdsId ( ) ) ; alert.addCustomValue ( "Reason" , reason ) ; org.ovirt.engine.core.dal.dbbroker.auditloghandling.AlertDirector.Alert ( alert , logType ) ; }
Source:
public java.lang.Void runInTransaction ( ) { getDbFacade ( ) . getVmDeviceDao ( ) . removeAll ( removedDeviceIds ) ; return null ; }

Target:
public java.lang.Void runInTransaction ( ) { getDbFacade ( ) . getVmDeviceDao ( ) . saveAll ( newVmDevices ) ; return null ; }
Source:
public void ExecuteCommand ( org.ovirt.engine.ui.uicommonweb.UICommand uiCommand ) { setVmTicket ( ) ; }

Target:
public void executeCommand ( org.ovirt.engine.ui.uicommonweb.UICommand uiCommand ) { setVmTicket ( ) ; }
Source:
public void poolUpdateOvfStoreOnAnyDomainUnsupported ( ) throws java.lang.Exception { org.mockito.Mockito.doReturn ( false ) . when ( ovfDataUpdater ) . ovfOnAnyDomainSupported ( org.mockito.Matchers.any ( org.ovirt.engine.core.common.businessentities.StoragePool.class ) ) ; ovfDataUpdater.ovfUpdate_timer ( ) ; verify ( java.lang.Boolean.FALSE ) ; }

Target:
public void poolUpdateOvfStoreOnAnyDomainUnsupported ( ) throws java.lang.Exception { org.mockito.Mockito.doReturn ( false ) . when ( ovfDataUpdater ) . ovfOnAnyDomainSupported ( org.mockito.Matchers.any ( org.ovirt.engine.core.common.businessentities.StoragePool.class ) ) ; ovfDataUpdater.ovfUpdateTimer ( ) ; verify ( java.lang.Boolean.FALSE ) ; }
Source:
public java.lang.String getText ( org.ovirt.engine.core.common.businessentities.gluster.ServiceInfo entity ) { if ( ( entity.getPort ( ) ) > 0 ) { return java.lang.String.valueOf ( entity.getPort ( ) ) ; } else { return constants.notAvailableLabel ( ) ; } }

Target:
public java.lang.String getText ( org.ovirt.engine.core.common.businessentities.gluster.GlusterServerService entity ) { if ( ( entity.getPort ( ) ) > 0 ) { return java.lang.String.valueOf ( entity.getPort ( ) ) ; } else { return constants.notAvailableLabel ( ) ; } }
Source:
public void shouldDetectCpuPinning ( ) { invalidVM.setCpuPinning ( "i am pinned" ) ; org.assertj.core.api.Assertions.assertThat ( validator.checkVmReadyForUpgrade ( invalidVM ) ) . contains ( UpgradeError.VM_CPUS_PINNED ) ; }

Target:
public void shouldDetectNonMigratableVMs ( ) { invalidVM.setMigrationSupport ( org.ovirt.engine.core.common.businessentities.MigrationSupport.PINNED_TO_HOST ) ; org.assertj.core.api.Assertions.assertThat ( validator.checkVmReadyForUpgrade ( invalidVM ) ) . contains ( EngineMessage.CLUSTER_UPGRADE_DETAIL_VM_NOT_MIGRATABLE.name ( ) ) ; }
Source:
private void Template_SelectedItemChanged ( java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { behavior.Template_SelectedItemChanged ( ) ; }

Target:
private void cluster_SelectedItemChanged ( java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { behavior.cluster_SelectedItemChanged ( ) ; updateMaximalVmMemSize ( ) ; }
Source:
public void testGetAll ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.AsyncTask > result = dao.getAll ( ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.core.dao.AsyncTaskDaoTest.TASK_COUNT , result.size ( ) ) ; }

Target:
public void testGetAll ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.AsyncTask > result = dao.getAll ( ) ; org.junit.jupiter.api.Assertions.assertEquals ( org.ovirt.engine.core.dao.AsyncTaskDaoTest.TASK_COUNT , result.size ( ) ) ; }
Source:
private java.util.List < org.ovirt.engine.core.common.businessentities.LdapGroup > getDomainGroups ( ) { return asCollection ( org.ovirt.engine.core.common.businessentities.LdapGroup.class , getEntity ( java.util.ArrayList.class , SearchType.AdGroup , getSearchPattern ( ) ) ) ; }

Target:
private java.util.List < org.ovirt.engine.core.authentication.DirectoryGroup > getDomainGroups ( ) { return asCollection ( org.ovirt.engine.core.authentication.DirectoryGroup.class , getEntity ( java.util.ArrayList.class , SearchType.DirectoryGroup , getSearchPattern ( ) ) ) ; }
Source:
public void unsupportedHostedEngineDeployWhenClusterLevelIsUnsupported ( ) { mockCluster ( Version.v3_6 ) ; org.mockito.Mockito.when ( host.getClusterId ( ) ) . thenReturn ( Guid.Empty ) ; org.junit.Assert.assertThat ( validator.supportsDeployingHostedEngine ( new org.ovirt.engine.core.common.businessentities.HostedEngineDeployConfiguration ( HostedEngineDeployConfiguration.Action.DEPLOY ) ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.ACTION_TYPE_FAILED_HOSTED_ENGINE_DEPLOYMENT_UNSUPPORTED ) ) ; }

Target:
public void supportsHostedEngineDeployInVersion36 ( ) { org.mockito.Mockito.when ( hostedEngineHelper.isVmManaged ( ) ) . thenReturn ( true ) ; mockCluster ( Version.v3_6 ) ; org.junit.Assert.assertThat ( validator.supportsDeployingHostedEngine ( new org.ovirt.engine.core.common.businessentities.HostedEngineDeployConfiguration ( HostedEngineDeployConfiguration.Action.DEPLOY ) ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }
Source:
private boolean HasTaskEndedInFailure ( ) { return ( ! ( getLastTaskStatus ( ) . getTaskIsRunning ( ) ) ) && ( ! ( getLastTaskStatus ( ) . getTaskEndedSuccessfully ( ) ) ) ; }

Target:
private boolean hasTaskEndedInFailure ( ) { return ( ! ( getLastTaskStatus ( ) . getTaskIsRunning ( ) ) ) && ( ! ( getLastTaskStatus ( ) . getTaskEndedSuccessfully ( ) ) ) ; }
Source:
public void testVms ( ) { testValidSql ( "Vms:" , "SELECT * FROM ((SELECT vms.* FROM vms ) ORDER BY vm_name ASC ) as T1 OFFSET (1 -1) LIMIT 0" ) ; testValidSql ( "Vms: storage.name = 111" , "SELECT * FROM (SELECT * FROM vms WHERE ( vm_guid IN (SELECT vms_with_tags.vm_guid FROM vms_with_tags LEFT OUTER JOIN storage_domains_with_hosts_view ON vms_with_tags.storage_id=storage_domains_with_hosts_view.id WHERE storage_domains_with_hosts_view.storage_name LIKE 111 )) ORDER BY vm_name ASC ) as T1 OFFSET (1 -1) LIMIT 0" ) ; }

Target:
public void testVms ( ) { testValidSql ( "Vms:" , "SELECT * FROM ((SELECT distinct vms.* FROM vms ) ORDER BY vm_name ASC ) as T1 OFFSET (1 -1) LIMIT 0" ) ; testValidSql ( "Vms: storage.name = 111" , "SELECT * FROM (SELECT * FROM vms WHERE ( vm_guid IN (SELECT distinct vms_with_tags.vm_guid FROM vms_with_tags LEFT OUTER JOIN storage_domains_with_hosts_view ON vms_with_tags.storage_id=storage_domains_with_hosts_view.id WHERE storage_domains_with_hosts_view.storage_name LIKE 111 )) ORDER BY vm_name ASC ) as T1 OFFSET (1 -1) LIMIT 0" ) ; testValidSql ( "Vm: template.name = temp1" , "SELECT * FROM ((SELECT distinct vms.* FROM vms LEFT OUTER JOIN vm_templates_storage_domain ON vms.vmt_guid=vm_templates_storage_domain.vmt_guid WHERE vm_templates_storage_domain.name LIKE temp1 ) ORDER BY vm_name ASC ) as T1 OFFSET (1 -1) LIMIT 0" ) ; }
Source:
public org.ovirt.engine.core.bll.ValidationResult nicExists ( ) { return org.ovirt.engine.core.bll.ValidationResult.failWith ( VdcBllMessages.HOST_NETWORK_INTERFACE_NOT_EXIST ) . when ( ( ( attachment.getNicName ( ) ) == null ) ) ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult nicExists ( ) { return org.ovirt.engine.core.bll.ValidationResult.failWith ( EngineMessage.HOST_NETWORK_INTERFACE_NOT_EXIST ) . when ( ( ( attachment.getNicName ( ) ) == null ) ) ; }
Source:
public void setLogo ( com.google.gwt.user.client.ui.Widget widget ) { logoPanel.setWidget ( widget ) ; }

Target:
public void setLogo ( com.google.gwt.user.client.ui.Widget widget ) { logoPanel.setWidget ( widget ) ; updateTitlePadding ( ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.VmTemplate createVmTemplate ( org.ovirt.engine.core.compat.Guid id , org.ovirt.engine.core.common.businessentities.VmTemplateStatus templateStatus ) { org.ovirt.engine.core.common.businessentities.VmTemplate template = new org.ovirt.engine.core.common.businessentities.VmTemplate ( ) ; template.setstatus ( templateStatus ) ; template.setDbGeneration ( 1L ) ; template.setId ( id ) ; return template ; }

Target:
private org.ovirt.engine.core.common.businessentities.VmTemplate createVmTemplate ( org.ovirt.engine.core.compat.Guid id , org.ovirt.engine.core.common.businessentities.VmTemplateStatus templateStatus ) { org.ovirt.engine.core.common.businessentities.VmTemplate template = new org.ovirt.engine.core.common.businessentities.VmTemplate ( ) ; template.setStatus ( templateStatus ) ; template.setDbGeneration ( 1L ) ; template.setId ( id ) ; return template ; }
Source:
void addDetail ( java.lang.String detailName , java.lang.String detailValue ) { org.ovirt.engine.core.utils.collections.MultiValueMapUtils.addToMap ( detailName , detailValue , details , new org.ovirt.engine.core.utils.collections.MultiValueMapUtils.LinkedHashSetCreator ( ) ) ; }

Target:
void addDetail ( java.lang.String detailName , java.lang.String detailValue ) { details.computeIfAbsent ( detailName , ( k ) -> new java.util.LinkedHashSet < > ( ) ) . add ( detailValue ) ; }
Source:
public void getHostFingerprint ( org.ovirt.engine.ui.frontend.AsyncQuery < java.lang.String > aQuery , java.lang.String hostAddress ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.StringConverter ( ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetServerSSHKeyFingerprint , new org.ovirt.engine.core.common.queries.ServerParameters ( hostAddress ) , aQuery ) ; }

Target:
public void getHostFingerprint ( org.ovirt.engine.ui.frontend.AsyncQuery < java.lang.String > aQuery , java.lang.String hostAddress , java.lang.Integer hostPort ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.StringConverter ( ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetServerSSHKeyFingerprint , new org.ovirt.engine.core.common.queries.ServerParameters ( hostAddress , hostPort ) , aQuery ) ; }
Source:
public void edit ( final org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel object ) { super . edit ( object ) ; disableAllTabs ( ) ; enableEditPoolFields ( ) ; }

Target:
public void eventRaised ( org.ovirt.engine.core.compat.Event ev , java.lang.Object sender , org.ovirt.engine.core.compat.EventArgs args ) { if ( ( object.getProgress ( ) ) == null ) { disableAllTabs ( ) ; enableEditPoolFields ( ) ; } }
Source:
public org.ovirt.engine.core.common.queries.VdcQueryReturnValue runInternalQuery ( org.ovirt.engine.core.common.queries.VdcQueryType actionType , org.ovirt.engine.core.common.queries.VdcQueryParametersBase parameters , org.ovirt.engine.core.bll.context.EngineContext engineContext ) { return runQueryImpl ( actionType , parameters , false , engineContext ) ; }

Target:
public org.ovirt.engine.core.common.queries.QueryReturnValue runQuery ( org.ovirt.engine.core.common.queries.QueryType actionType , org.ovirt.engine.core.common.queries.QueryParametersBase parameters ) { return runQueryImpl ( actionType , parameters , true , null ) ; }
Source:
public void shouldFailtWhenNoId ( ) { org.ovirt.engine.core.common.console.ConsoleOptions options = new org.ovirt.engine.core.common.console.ConsoleOptions ( org.ovirt.engine.core.common.businessentities.GraphicsType.SPICE ) ; org.ovirt.engine.core.bll.ConfigureConsoleOptionsQuery query = new org.ovirt.engine.core.bll.ConfigureConsoleOptionsQuery ( new org.ovirt.engine.core.common.queries.ConfigureConsoleOptionsParams ( options , false ) ) ; org.junit.Assert.assertFalse ( query.validateInputs ( ) ) ; }

Target:
public void shouldFailtWhenNoId ( ) { org.mockito.Mockito.when ( getQueryParameters ( ) . getOptions ( ) ) . thenReturn ( new org.ovirt.engine.core.common.console.ConsoleOptions ( org.ovirt.engine.core.common.businessentities.GraphicsType.SPICE ) ) ; org.junit.Assert.assertFalse ( getQuery ( ) . validateInputs ( ) ) ; }
Source:
protected org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface createNewInterface ( ) { org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface iface = new org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface ( ) ; iface.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; iface.setMacAddress ( org.ovirt.engine.core.utils.RandomUtils.instance ( ) . nextString ( 10 ) ) ; return iface ; }

Target:
protected org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface createNewViewableInterface ( ) { org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface iface = new org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface ( ) ; iface.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; iface.setMacAddress ( org.ovirt.engine.core.utils.RandomUtils.instance ( ) . nextString ( 10 ) ) ; return iface ; }
Source:
public void setkvm_enable ( java.lang.Boolean value ) { this . kvm_enable = value ; }

Target:
public org.ovirt.engine.core.common.businessentities.BootSequence getBootSequence ( ) { return this . bootSequence ; }
Source:
public static boolean isNonVmNonVlanNetwork ( org.ovirt.engine.core.common.businessentities.network.Network network ) { return ( ! ( network.isVmNetwork ( ) ) ) && ( ( network.getvlan_id ( ) ) == null ) ; }

Target:
public static boolean isNonVmNonVlanNetwork ( org.ovirt.engine.core.common.businessentities.network.Network network ) { return ( ! ( network.isVmNetwork ( ) ) ) && ( ( network.getVlanId ( ) ) == null ) ; }
Source:
protected void syncSearch ( ) { org.ovirt.engine.core.common.queries.SearchParameters tempVar = new org.ovirt.engine.core.common.queries.SearchParameters ( getSearchString ( ) , org.ovirt.engine.core.common.interfaces.SearchType.VmTemplate ) ; tempVar.setMaxCount ( getSearchPageSize ( ) ) ; super . syncSearch ( VdcQueryType.Search , tempVar ) ; }

Target:
protected void syncSearch ( ) { org.ovirt.engine.core.common.queries.SearchParameters tempVar = new org.ovirt.engine.core.common.queries.SearchParameters ( getSearchString ( ) , org.ovirt.engine.core.common.interfaces.SearchType.VmTemplate , isCaseSensitiveSearch ( ) ) ; tempVar.setMaxCount ( getSearchPageSize ( ) ) ; super . syncSearch ( VdcQueryType.Search , tempVar ) ; }
Source:
public void testQuery ( ) throws java.lang.Exception { javax.ws.rs.core.UriInfo uriInfo = setUpUriExpectations ( org.ovirt.engine.api.restapi.resource.QUERY ) ; setUpQueryExpectations ( org.ovirt.engine.api.restapi.resource.QUERY ) ; collection.setUriInfo ( uriInfo ) ; verifyCollection ( getCollection ( ) ) ; }

Target:
public void testQuery ( ) throws java.lang.Exception { javax.ws.rs.core.UriInfo uriInfo = setUpUriExpectations ( org.ovirt.engine.api.restapi.resource.QUERY ) ; setUpGetGraphicsExpectations ( 3 ) ; setUpQueryExpectations ( org.ovirt.engine.api.restapi.resource.QUERY ) ; collection.setUriInfo ( uriInfo ) ; verifyCollection ( getCollection ( ) ) ; }
Source:
private void buildImageReference ( ) { org.ovirt.engine.core.compat.backendcompat.XmlNodeList list = _document.SelectNodes ( "//*/File" , _xmlNS ) ; for ( org.ovirt.engine.core.compat.backendcompat.XmlNode node : list ) { org.ovirt.engine.core.common.businessentities.DiskImage image = new org.ovirt.engine.core.common.businessentities.DiskImage ( ) ; image.setImageId ( new org.ovirt.engine.core.compat.Guid ( node.Attributes.get ( "ovf:id" ) . getValue ( ) ) ) ; image.setId ( org.ovirt.engine.core.utils.ovf.OvfParser.GetImageGrupIdFromImageFile ( node.Attributes.get ( "ovf:href" ) . getValue ( ) ) ) ; image.setActive ( true ) ; image.setImageStatus ( ImageStatus.OK ) ; image.setDescription ( node.Attributes.get ( "ovf:description" ) . getValue ( ) ) ; _images.add ( image ) ; } }

Target:
private void buildImageReference ( ) { org.ovirt.engine.core.compat.backendcompat.XmlNodeList list = _document.SelectNodes ( "//*/File" , _xmlNS ) ; for ( org.ovirt.engine.core.compat.backendcompat.XmlNode node : list ) { org.ovirt.engine.core.common.businessentities.DiskImage image = new org.ovirt.engine.core.common.businessentities.DiskImage ( ) ; image.setImageId ( new org.ovirt.engine.core.compat.Guid ( node.attributes.get ( "ovf:id" ) . getValue ( ) ) ) ; image.setId ( org.ovirt.engine.core.utils.ovf.OvfParser.GetImageGrupIdFromImageFile ( node.attributes.get ( "ovf:href" ) . getValue ( ) ) ) ; image.setActive ( true ) ; image.setImageStatus ( ImageStatus.OK ) ; image.setDescription ( node.attributes.get ( "ovf:description" ) . getValue ( ) ) ; _images.add ( image ) ; } }
Source:
public com.google.gwt.safehtml.shared.SafeHtml getTooltip ( org.ovirt.engine.core.common.businessentities.AuditLog object ) { return com.google.gwt.safehtml.shared.SafeHtmlUtils.fromSafeConstant ( org.ovirt.engine.ui.webadmin.widget.footer.AlertsEventsFooterView.constants.dismissAlert ( ) ) ; }

Target:
public com.google.gwt.safehtml.shared.SafeHtml getTooltip ( org.ovirt.engine.core.common.businessentities.AuditLog object ) { return com.google.gwt.safehtml.shared.SafeHtmlUtils.fromSafeConstant ( org.ovirt.engine.ui.webadmin.widget.footer.AlertsEventsFooterView.constants.dismissEvent ( ) ) ; }
Source:
public static void adjustDisplayData ( org.ovirt.engine.api.restapi.resource.BackendResource res , org.ovirt.engine.api.model.Vm vm ) { org.ovirt.engine.api.restapi.util.DisplayHelper.adjustDisplayDataInternal ( res , vm ) ; }

Target:
public static void adjustDisplayData ( org.ovirt.engine.api.restapi.resource.BackendResource res , org.ovirt.engine.api.model.Vm vm , java.util.Map < org.ovirt.engine.core.compat.Guid , java.util.List < org.ovirt.engine.core.common.businessentities.GraphicsDevice > > vmsGraphicsDevices ) { org.ovirt.engine.api.restapi.util.DisplayHelper.adjustDisplayDataInternal ( res , vm , vmsGraphicsDevices ) ; }
Source:
public void testUrlWithEmptyFilter ( ) { org.ovirt.engine.core.common.queries.ErrataFilter errataFilter = new org.ovirt.engine.core.common.queries.ErrataFilter ( ) ; org.ovirt.engine.core.bll.host.provider.foreman.FilteredErrataRelativeUrlBuilder underTest = createFilteredErrataRelativeUrlBuilder ( errataFilter ) ; org.junit.Assert.assertEquals ( "/katello/api/v2/systems/xxx/errata" , underTest.build ( ) ) ; }

Target:
public void testUrlWithEmptyFilter ( ) { org.ovirt.engine.core.common.queries.ErrataFilter errataFilter = new org.ovirt.engine.core.common.queries.ErrataFilter ( ) ; org.ovirt.engine.core.bll.host.provider.foreman.FilteredErrataRelativeUrlBuilder underTest = createFilteredErrataRelativeUrlBuilder ( errataFilter ) ; org.junit.jupiter.api.Assertions.assertEquals ( "/katello/api/v2/systems/xxx/errata" , underTest.build ( ) ) ; }
Source:
protected org.ovirt.engine.api.model.CdRom getUpdate ( ) { org.ovirt.engine.api.model.CdRom update = new org.ovirt.engine.api.model.CdRom ( ) ; update.setFile ( new org.ovirt.engine.api.model.File ( ) ) ; update.getFile ( ) . setId ( org.ovirt.engine.api.restapi.resource.AbstractBackendCdRomsResourceTest.ISO_PATH ) ; return update ; }

Target:
protected org.ovirt.engine.api.model.Cdrom getUpdate ( ) { org.ovirt.engine.api.model.Cdrom update = new org.ovirt.engine.api.model.Cdrom ( ) ; update.setFile ( new org.ovirt.engine.api.model.File ( ) ) ; update.getFile ( ) . setId ( org.ovirt.engine.api.restapi.resource.AbstractBackendCdRomsResourceTest.ISO_PATH ) ; return update ; }
Source:
private void persistCommand ( org.ovirt.engine.core.common.businessentities.CommandEntity cmdEntity ) { this . persistCommand ( cmdEntity.getId ( ) , cmdEntity.getRootCommandId ( ) , cmdEntity.getCommandType ( ) , cmdEntity.getActionParameters ( ) , cmdEntity.getCommandStatus ( ) , cmdEntity.isEnableCallBack ( ) ) ; }

Target:
public void persistCommand ( org.ovirt.engine.core.common.businessentities.CommandEntity cmdEntity ) { commandsCache.put ( cmdEntity ) ; if ( cmdEntity.isCallBackEnabled ( ) ) { buildCmdHierarchy ( cmdEntity ) ; } }
Source:
protected org.ovirt.engine.core.common.vdscommands.VDSReturnValue poll ( ) { return getResourceManager ( ) . runVdsCommand ( VDSCommandType.GetAllVmStats , new org.ovirt.engine.core.common.vdscommands.VdsIdAndVdsVDSCommandParametersBase ( vdsManager.getCopyVds ( ) ) ) ; }

Target:
protected org.ovirt.engine.core.common.vdscommands.VDSReturnValue poll ( ) { return getResourceManager ( ) . runVdsCommand ( VDSCommandType.GetAllVmStats , new org.ovirt.engine.core.common.vdscommands.VdsIdVDSCommandParametersBase ( vdsManager.getVdsId ( ) ) ) ; }
Source:
public void notAllVfsAreFree ( ) { allVfsAreFreeTest ( false ) ; org.junit.Assert.assertThat ( validator.allVfsAreFree ( networkDeviceHelper ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.ACTION_TYPE_FAILED_NUM_OF_VFS_CANNOT_BE_CHANGED , java.lang.String.format ( VfsConfigValidator.NIC_NAME_REPLACEMENT , nic.getName ( ) ) ) ) ; }

Target:
public void notAllVfsAreFree ( ) { allVfsAreFreeTest ( false ) ; org.hamcrest.MatcherAssert.assertThat ( validator.allVfsAreFree ( networkDeviceHelper ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.ACTION_TYPE_FAILED_NUM_OF_VFS_CANNOT_BE_CHANGED , java.lang.String.format ( VfsConfigValidator.NIC_NAME_REPLACEMENT , nic.getName ( ) ) ) ) ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterGeoRepSession > geoRepSessions = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterGeoRepSession > ) ( returnValue ) ) ; java.util.Collections.sort ( geoRepSessions , new org.ovirt.engine.ui.uicommonweb.Linq.GlusterVolumeGeoRepSessionComparer ( ) ) ; setItems ( geoRepSessions ) ; }

Target:
protected void syncSearch ( ) { if ( ( getEntity ( ) ) == null ) { return ; } org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getGlusterVolumeGeoRepStatusForMasterVolume ( new org.ovirt.engine.ui.uicommonweb.models.gluster.SetSortedRawItemsAsyncQuery ( new org.ovirt.engine.ui.uicommonweb.Linq.GlusterVolumeGeoRepSessionComparer ( ) ) , getEntity ( ) . getId ( ) ) ; }
Source:
public void Executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { stopProgress ( result.getState ( ) ) ; }

Target:
public void Executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { stopProgress ( result.getState ( ) ) ; cancel ( ) ; }
Source:
public void onSuccess ( org.ovirt.engine.ui.frontend.communication.VdcOperation < org.ovirt.engine.core.common.queries.QueryType , org.ovirt.engine.core.common.queries.QueryParametersBase > operation , org.ovirt.engine.core.common.queries.QueryReturnValue result ) { org.junit.Assert.assertEquals ( "Test results should match" , testResult , result ) ; org.junit.Assert.assertEquals ( "Operations should match" , operationList.get ( 0 ) , operation ) ; }

Target:
public void onSuccess ( org.ovirt.engine.ui.frontend.communication.VdcOperation < org.ovirt.engine.core.common.queries.QueryType , org.ovirt.engine.core.common.queries.QueryParametersBase > operation , org.ovirt.engine.core.common.queries.QueryReturnValue result ) { org.junit.jupiter.api.Assertions.assertEquals ( testResult , result , "Test results should match" ) ; org.junit.jupiter.api.Assertions.assertEquals ( operationList.get ( 0 ) , operation , "Operations should match" ) ; }
Source:
public void canCreateLessNumaNodesAsVirtualCores ( ) { final org.ovirt.engine.core.bll.numa.vm.AddVmNumaNodesCommand command = mockedCommand ( ) ; vm.setNumOfSockets ( 1 ) ; vm.setCpuPerSocket ( 3 ) ; org.assertj.core.api.Assertions.assertThat ( command.canDoAction ( ) ) . isTrue ( ) ; }

Target:
public void failCreateMoreNumaNodesThanVirtualCoresWithVmFromDb ( ) { final org.ovirt.engine.core.bll.numa.vm.AddVmNumaNodesCommand command = mockedCommandWithVmFromDb ( ) ; vm.setNumOfSockets ( 1 ) ; vm.setCpuPerSocket ( 3 ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( command , EngineMessage.VM_NUMA_NODE_MORE_NODES_THAN_CPUS ) ; }
Source:
private void noIllegalStatusMessage ( ) { org.junit.Assert.assertFalse ( cmd.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_DOMAIN_STATUS_ILLEGAL2.toString ( ) ) ) ; }

Target:
private void noIllegalStatusMessage ( ) { org.junit.Assert.assertFalse ( cmd.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( EngineMessage.ACTION_TYPE_FAILED_STORAGE_DOMAIN_STATUS_ILLEGAL2.toString ( ) ) ) ; }
Source:
public void vnicCreated ( org.ovirt.engine.core.compat.Guid vmId ) { getWindow ( ) . stopProgress ( ) ; cancel ( ) ; updateActionAvailability ( ) ; }

Target:
public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { org.ovirt.engine.ui.uicommonweb.models.userportal.AttachCdModel attachCdModel = ( ( org.ovirt.engine.ui.uicommonweb.models.userportal.AttachCdModel ) ( result.getState ( ) ) ) ; attachCdModel.stopProgress ( ) ; cancel ( ) ; }
Source:
private void setIdIfNeeded ( org.ovirt.engine.core.common.businessentities.DbUser user ) { if ( org.ovirt.engine.core.compat.Guid.isNullOrEmpty ( user.getId ( ) ) ) { user.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; } }

Target:
private void setIdIfNeeded ( org.ovirt.engine.core.common.businessentities.aaa.DbUser user ) { if ( org.ovirt.engine.core.compat.Guid.isNullOrEmpty ( user.getId ( ) ) ) { user.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; } }
Source:
protected void updateVolumeType ( org.ovirt.engine.core.common.businessentities.StorageType storageType ) { }

Target:
protected void updateVolumeType ( org.ovirt.engine.core.common.businessentities.storage.StorageType storageType ) { }
Source:
public static void GetGlusterVolumeBrickDetails ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId , java.lang.String volume , java.lang.String brick ) { org.ovirt.engine.core.common.queries.gluster.GlusterVolumeAdvancedDetailsParameters parameters = new org.ovirt.engine.core.common.queries.gluster.GlusterVolumeAdvancedDetailsParameters ( clusterId , volume , brick , true ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetGlusterVolumeAdvancedDetails , parameters , aQuery ) ; }

Target:
public static void GetGlusterVolumeBrickDetails ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId , org.ovirt.engine.core.compat.Guid volumeId , org.ovirt.engine.core.compat.Guid brickId ) { org.ovirt.engine.core.common.queries.gluster.GlusterVolumeAdvancedDetailsParameters parameters = new org.ovirt.engine.core.common.queries.gluster.GlusterVolumeAdvancedDetailsParameters ( clusterId , volumeId , brickId , true ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetGlusterVolumeAdvancedDetails , parameters , aQuery ) ; }
Source:
public void setcpu_user ( java.lang.Double value ) { this . mVmStatistics.setcpu_user ( value ) ; }

Target:
public void setGuestAgentNicsHash ( int guestAgentNicsHash ) { vmDynamic.setGuestAgentNicsHash ( guestAgentNicsHash ) ; }
Source:
protected void syncSearch ( ) { if ( ( getEntity ( ) ) != null ) { } else { setItems ( null ) ; } }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterGeoRepSession > geoRepSessions = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterGeoRepSession > ) ( returnValue ) ) ; java.util.Collections.sort ( geoRepSessions , new org.ovirt.engine.ui.uicommonweb.Linq.GlusterVolumeGeoRepSessionComparer ( ) ) ; setItems ( geoRepSessions ) ; }