auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void testValidName ( ) { prepareVmToPassCanDoAction ( ) ; boolean c = command.canDoAction ( ) ; junit.framework.Assert.assertTrue ( "canDoAction should have passed." , c ) ; }

Target:
public void testValidName ( ) { prepareVmToPassCanDoAction ( ) ; boolean c = command.canDoAction ( ) ; org.junit.Assert.assertTrue ( "canDoAction should have passed." , c ) ; }
Source:
public void verifyNoDomainForMemoryWhenDomainIsNotActive ( ) { for ( org.ovirt.engine.core.common.businessentities.StorageDomainStatus storageDomainStatus : org.ovirt.engine.core.common.businessentities.StorageDomainStatus.values ( ) ) { if ( storageDomainStatus != ( org.ovirt.engine.core.common.businessentities.StorageDomainStatus.Active ) ) { validStorageDomain.setStatus ( storageDomainStatus ) ; verifyNoDomainForMemory ( java.util.Arrays.asList ( validStorageDomain ) ) ; } } }

Target:
public void testFindStorageDomainForMemoryWithEmptyDomainsList ( ) { verifyNoDomainForMemory ( java.util.Collections.< org.ovirt.engine.core.common.businessentities.StorageDomain > emptyList ( ) ) ; }
Source:
public void releaseVolumeLock ( org.ovirt.engine.core.compat.Guid taskId ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity vol = getVolumeDao ( ) . getVolumeByGlusterTask ( taskId ) ; if ( vol != null ) { releaseLock ( vol.getId ( ) ) ; } else { org.ovirt.engine.core.bll.gluster.tasks.GlusterTaskUtils.log.debug ( "Did not find a volume associated with task '{}'" , taskId ) ; } }

Target:
public void releaseVolumeLock ( org.ovirt.engine.core.compat.Guid taskId ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity vol = volumeDao.getVolumeByGlusterTask ( taskId ) ; if ( vol != null ) { releaseLock ( vol.getId ( ) ) ; } else { org.ovirt.engine.core.bll.gluster.tasks.GlusterTaskUtils.log.debug ( "Did not find a volume associated with task '{}'" , taskId ) ; } }
Source:
public void testAllEmpty ( ) { java.lang.String command = createCommand ( new org.ovirt.engine.core.common.utils.ansible.AnsibleCommandBuilder ( ) . playbook ( org.ovirt.engine.core.common.utils.ansible.AnsibleCommandBuilderTest.ANSIBLE_PLAYBOOK ) ) ; org.junit.Assert.assertEquals ( join ( AnsibleCommandBuilder.ANSIBLE_COMMAND , org.ovirt.engine.core.common.utils.ansible.AnsibleCommandBuilderTest.IGNORE_SSH_CONFIG , org.ovirt.engine.core.common.utils.ansible.AnsibleCommandBuilderTest.ANSIBLE_LOG_LEVEL , org.ovirt.engine.core.common.utils.ansible.AnsibleCommandBuilderTest.PRIVATE_KEY , org.ovirt.engine.core.common.utils.ansible.AnsibleCommandBuilderTest.ANSIBLE_PLAYBOOK_FULL_PATH ) , command ) ; }

Target:
public void testAllEmpty ( ) { java.lang.String command = createCommand ( new org.ovirt.engine.core.common.utils.ansible.AnsibleCommandBuilder ( ) . playbook ( org.ovirt.engine.core.common.utils.ansible.AnsibleCommandBuilderTest.ANSIBLE_PLAYBOOK ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( join ( AnsibleCommandBuilder.ANSIBLE_COMMAND , org.ovirt.engine.core.common.utils.ansible.AnsibleCommandBuilderTest.IGNORE_SSH_CONFIG , org.ovirt.engine.core.common.utils.ansible.AnsibleCommandBuilderTest.ANSIBLE_LOG_LEVEL , org.ovirt.engine.core.common.utils.ansible.AnsibleCommandBuilderTest.PRIVATE_KEY , org.ovirt.engine.core.common.utils.ansible.AnsibleCommandBuilderTest.ANSIBLE_PLAYBOOK_FULL_PATH ) , command ) ; }
Source:
public java.lang.Boolean getacpi_enable ( ) { return this . mVmDynamic.getacpi_enable ( ) ; }

Target:
public java.lang.Integer getDisplay ( ) { return this . vmDynamic.getdisplay ( ) ; }
Source:
private void setUpGetNicsExpectations ( ) { setUpEntityQueryExpectations ( VdcQueryType.GetTemplateInterfacesByTemplateId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendTemplateNicResourceTest.TEMPLATE_ID } , setUpNicsExpectations ( ) ) ; }

Target:
private void setUpGetNicsExpectations ( ) { setUpEntityQueryExpectations ( QueryType.GetTemplateInterfacesByTemplateId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendTemplateNicResourceTest.TEMPLATE_ID } , setUpNicsExpectations ( ) ) ; }
Source:
public org.ovirt.engine.api.v3.types.V3Quota update ( org.ovirt.engine.api.v3.types.V3Quota quota ) { return adaptUpdate ( delegate :: update , quota ) ; }

Target:
public org.ovirt.engine.api.v3.types.V3Quota update ( org.ovirt.engine.api.v3.types.V3Quota quota ) { return adaptUpdate ( getDelegate ( ) :: update , quota ) ; }
Source:
protected org.ovirt.engine.core.common.businessentities.Snapshot addActiveSnapshot ( org.ovirt.engine.core.compat.Guid snapshotId ) { return new org.ovirt.engine.core.bll.snapshots.SnapshotsManager ( ) . addActiveSnapshot ( snapshotId , getVm ( ) , getMemoryVolumeForNewActiveSnapshot ( ) , getCompensationContext ( ) ) ; }

Target:
protected org.ovirt.engine.core.common.businessentities.Snapshot addActiveSnapshot ( org.ovirt.engine.core.compat.Guid snapshotId ) { return snapshotsManager.addActiveSnapshot ( snapshotId , getVm ( ) , getMemoryVolumeForNewActiveSnapshot ( ) , getCompensationContext ( ) ) ; }
Source:
private static org.ovirt.engine.core.common.businessentities.ArchitectureType getOsSection ( org.ovirt.engine.core.utils.ovf.xml.XmlDocument xmlDocument ) { org.ovirt.engine.core.common.businessentities.ArchitectureType archType = null ; org.ovirt.engine.core.utils.ovf.xml.XmlNode content = xmlDocument.SelectSingleNode ( "//*/Content" ) ; org.ovirt.engine.core.utils.ovf.xml.XmlNodeList nodeList = content.SelectNodes ( "Section" ) ; org.ovirt.engine.core.utils.ovf.xml.XmlNode selectedSection = null ; org.ovirt.engine.core.common.osinfo.OsRepository osRepository = org.ovirt.engine.core.common.utils.SimpleDependecyInjector.getInstance ( ) . get ( org.ovirt.engine.core.common.osinfo.OsRepository.class ) ; if ( nodeList != null ) { for ( org.ovirt.engine.core.utils.ovf.xml.XmlNode section : nodeList ) { java.lang.String value = section.attributes.get ( "xsi:type" ) . getValue ( ) ; if ( value.equals ( "ovf:OperatingSystemSection_Type" ) ) { selectedSection = section ; break ; } } if ( selectedSection != null ) { int osId = osRepository.getOsIdByUniqueName ( selectedSection.innerText ) ; archType = osRepository.getArchitectureFromOS ( osId ) ; } } return archType ; }

Target:
private static org.ovirt.engine.core.common.businessentities.ArchitectureType getOsSection ( org.ovirt.engine.core.utils.ovf.xml.XmlDocument xmlDocument ) { org.ovirt.engine.core.common.businessentities.ArchitectureType archType = null ; org.ovirt.engine.core.utils.ovf.xml.XmlNode content = xmlDocument.selectSingleNode ( "//*/Content" ) ; org.ovirt.engine.core.utils.ovf.xml.XmlNodeList nodeList = content.SelectNodes ( "Section" ) ; org.ovirt.engine.core.utils.ovf.xml.XmlNode selectedSection = null ; org.ovirt.engine.core.common.osinfo.OsRepository osRepository = org.ovirt.engine.core.common.utils.SimpleDependecyInjector.getInstance ( ) . get ( org.ovirt.engine.core.common.osinfo.OsRepository.class ) ; if ( nodeList != null ) { for ( org.ovirt.engine.core.utils.ovf.xml.XmlNode section : nodeList ) { java.lang.String value = section.attributes.get ( "xsi:type" ) . getValue ( ) ; if ( value.equals ( "ovf:OperatingSystemSection_Type" ) ) { selectedSection = section ; break ; } } if ( selectedSection != null ) { int osId = osRepository.getOsIdByUniqueName ( selectedSection.innerText ) ; archType = osRepository.getArchitectureFromOS ( osId ) ; } } return archType ; }
Source:
public org.ovirt.engine.ui.common.uicommon.model.SearchableDetailModelProvider < org.ovirt.engine.core.common.businessentities.VmTemplate , org.ovirt.engine.ui.uicommonweb.models.disks.DiskListModel , org.ovirt.engine.ui.uicommonweb.models.disks.DiskTemplateListModel > getDiskTemplateModelProvider ( org.ovirt.engine.ui.webadmin.gin.ClientGinjector ginjector ) { return new org.ovirt.engine.ui.common.uicommon.model.SearchableDetailTabModelProvider < org.ovirt.engine.core.common.businessentities.VmTemplate , org.ovirt.engine.ui.uicommonweb.models.disks.DiskListModel , org.ovirt.engine.ui.uicommonweb.models.disks.DiskTemplateListModel > ( ginjector , org.ovirt.engine.ui.uicommonweb.models.disks.DiskListModel.class , org.ovirt.engine.ui.uicommonweb.models.disks.DiskTemplateListModel.class ) ; }

Target:
public org.ovirt.engine.ui.common.uicommon.model.SearchableDetailModelProvider < org.ovirt.engine.core.common.businessentities.VmTemplate , org.ovirt.engine.ui.uicommonweb.models.disks.DiskListModel , org.ovirt.engine.ui.uicommonweb.models.disks.DiskTemplateListModel > getDiskTemplateModelProvider ( com.google.gwt.event.shared.EventBus eventBus , com.google.inject.Provider < org.ovirt.engine.ui.common.presenter.popup.DefaultConfirmationPopupPresenterWidget > defaultConfirmPopupProvider ) { return new org.ovirt.engine.ui.common.uicommon.model.SearchableDetailTabModelProvider < org.ovirt.engine.core.common.businessentities.VmTemplate , org.ovirt.engine.ui.uicommonweb.models.disks.DiskListModel , org.ovirt.engine.ui.uicommonweb.models.disks.DiskTemplateListModel > ( eventBus , defaultConfirmPopupProvider , org.ovirt.engine.ui.uicommonweb.models.disks.DiskListModel.class , org.ovirt.engine.ui.uicommonweb.models.disks.DiskTemplateListModel.class ) ; }
Source:
private void doTestNoStringSubstitution ( java.lang.String name ) { org.ovirt.engine.core.common.interfaces.ErrorTranslator et = new org.ovirt.engine.core.utils.ErrorTranslatorImpl ( name ) ; java.lang.String error = et.TranslateErrorTextSingle ( "DB_NO_SUCH_VM" ) ; assertEquals ( "String should equal" , "VM not found" , error ) ; }

Target:
private void doTestNoStringSubstitution ( java.lang.String name ) { org.ovirt.engine.core.common.interfaces.ErrorTranslator et = new org.ovirt.engine.core.utils.ErrorTranslatorImpl ( name ) ; java.lang.String error = et.TranslateErrorTextSingle ( org.ovirt.engine.core.utils.ErrorTranslatorTest.TEST_KEY_NO_REPLACEMENT ) ; assertEquals ( "String should equal" , "VM not found" , error ) ; }
Source:
public void getUserName ( ) { b.setUserName ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.NAME ) ; final java.lang.String n = b.getUserName ( ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.NAME , n ) ; }

Target:
public void getUserName ( ) { b.setUserName ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.NAME ) ; final java.lang.String n = b.getUserName ( ) ; org.junit.jupiter.api.Assertions.assertEquals ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.NAME , n ) ; }
Source:
protected void setActionMessageParameters ( ) { addCanDoActionMessage ( VdcBllMessages.VAR__ACTION__FORCE_SELECT ) ; addCanDoActionMessage ( VdcBllMessages.VAR__TYPE__SPM ) ; addCanDoActionMessageVariable ( "VdsName" , org.ovirt.engine.core.bll.ForceSelectSPMCommand.getVds ( ) . getName ( ) ) ; }

Target:
protected void setActionMessageParameters ( ) { addCanDoActionMessage ( EngineMessage.VAR__ACTION__FORCE_SELECT ) ; addCanDoActionMessage ( EngineMessage.VAR__TYPE__SPM ) ; addCanDoActionMessageVariable ( "VdsName" , org.ovirt.engine.core.bll.ForceSelectSPMCommand.getVds ( ) . getName ( ) ) ; }
Source:
public void terminate ( ) { org.ovirt.optimizer.service.ClusterOptimizer.log.info ( java.lang.String.format ( "Solver thread for %s was asked to terminate" , clusterId ) ) ; solver.terminateEarly ( ) ; }

Target:
public void terminate ( ) { org.ovirt.optimizer.service.ClusterOptimizer.log.info ( java.lang.String.format ( "Solver thread for %s was asked to terminate" , clusterId ) ) ; solver.terminateEarly ( ) ; updater.removeHandler ( updateHandler ) ; }
Source:
private void changeStatus ( org.ovirt.engine.core.common.vdscommands.DestroyVmVDSCommandParameters parameters , org.ovirt.engine.core.common.businessentities.VM curVm ) { if ( org.ovirt.engine.core.vdsbroker.DestroyVmVDSCommand.getParameters ( ) . getVdsId ( ) . equals ( curVm.getRunOnVds ( ) ) ) { resourceManager.InternalSetVmStatus ( curVm , VMStatus.PoweringDown ) ; } }

Target:
private void changeStatus ( org.ovirt.engine.core.common.vdscommands.DestroyVmVDSCommandParameters parameters , org.ovirt.engine.core.common.businessentities.VM curVm ) { if ( org.ovirt.engine.core.vdsbroker.DestroyVmVDSCommand.getParameters ( ) . getVdsId ( ) . equals ( curVm.getRunOnVds ( ) ) ) { resourceManager.internalSetVmStatus ( curVm , VMStatus.PoweringDown ) ; } }
Source:
protected void setErrorMessageLabel ( com.google.gwt.user.client.ui.Label errorMessage , java.lang.String text ) { errorMessage.getElement ( ) . setInnerHTML ( text ) ; }

Target:
com.google.gwt.safehtml.shared.SafeHtml anchor ( java.lang.String url , java.lang.String text ) ;
Source:
public void testGetAllForUserGroupWithInvalidUserGroup ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.tags > result = dao.getAllForUserGroups ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) . toString ( ) ) ; assertNotNull ( result ) ; assertTrue ( result.isEmpty ( ) ) ; }

Target:
public void testGetAllForUserGroupWithInvalidUserGroup ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.tags > result = dao.getAllForUserGroups ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) . toString ( ) ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertTrue ( result.isEmpty ( ) ) ; }
Source:
public static org.ovirt.engine.api.model.StorageDomainType map ( org.ovirt.engine.api.model.StorageDomainType storageDomainType , org.ovirt.engine.api.model.StorageDomainType template ) { switch ( storageDomainType ) { case DATA : return org.ovirt.engine.api.model.org.ovirt.engine.core.common.businessentities.StorageDomainType ; case ISO : return org.ovirt.engine.api.model.org.ovirt.engine.core.common.businessentities.StorageDomainType ; case EXPORT : return org.ovirt.engine.api.model.org.ovirt.engine.core.common.businessentities.StorageDomainType ; default : return null ; } }

Target:
public static org.ovirt.engine.api.model.StorageDomainType map ( org.ovirt.engine.api.model.StorageDomainType storageDomainType , org.ovirt.engine.api.model.StorageDomainType template ) { switch ( storageDomainType ) { case DATA : return org.ovirt.engine.api.model.org.ovirt.engine.core.common.businessentities.StorageDomainType ; case ISO : return org.ovirt.engine.api.model.org.ovirt.engine.core.common.businessentities.StorageDomainType ; case EXPORT : return org.ovirt.engine.api.model.org.ovirt.engine.core.common.businessentities.StorageDomainType ; case IMAGE : return org.ovirt.engine.api.model.org.ovirt.engine.core.common.businessentities.StorageDomainType ; default : return null ; } }
Source:
public void clusterEmulatedMachineIsNull ( ) { emulatedMachine = null ; org.assertj.core.api.Assertions.assertThatThrownBy ( ( ) -> new org.ovirt.engine.core.utils.ovf.HostedEngineOvfWriter ( vm , fullEntityOvfData , version , emulatedMachine , cpuId , osRepository ) ) . isInstanceOf ( java.lang.NullPointerException.class ) . hasMessageContaining ( "emulated machine" ) ; }

Target:
public void clusterEmulatedMachineIsNull ( ) { emulatedMachine = null ; org.assertj.core.api.Assertions.assertThatThrownBy ( ( ) -> new org.ovirt.engine.core.utils.ovf.HostedEngineOvfWriter ( vm , fullEntityOvfData , version , emulatedMachine , cpuId , osRepository , engineXml ) ) . isInstanceOf ( java.lang.NullPointerException.class ) . hasMessageContaining ( "emulated machine" ) ; }
Source:
public void testIsInStatusInvalid ( ) { org.junit.Assert.assertThat ( validator.isInStatus ( StoragePoolStatus.NonResponsive , StoragePoolStatus.NotOperational ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.ACTION_TYPE_FAILED_STORAGE_POOL_STATUS_ILLEGAL ) ) ; org.junit.Assert.assertThat ( validator.isNotInStatus ( StoragePoolStatus.NonResponsive , StoragePoolStatus.NotOperational ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }

Target:
public void testIsInStatusInvalid ( ) { org.hamcrest.MatcherAssert.assertThat ( validator.isInStatus ( StoragePoolStatus.NonResponsive , StoragePoolStatus.NotOperational ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.ACTION_TYPE_FAILED_STORAGE_POOL_STATUS_ILLEGAL ) ) ; org.hamcrest.MatcherAssert.assertThat ( validator.isNotInStatus ( StoragePoolStatus.NonResponsive , StoragePoolStatus.NotOperational ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }
Source:
public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? new java.util.ArrayList < > ( ( ( java.util.ArrayList < org.ovirt.engine.core.compat.RpmVersion > ) ( source ) ) ) : new java.util.ArrayList < org.ovirt.engine.core.compat.RpmVersion > ( ) ; }

Target:
public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Integer ) ( source ) ) . intValue ( ) : 0 ; }
Source:
protected void mockSingleAgentResult ( org.ovirt.engine.core.bll.pm.SingleAgentFenceActionExecutor executor , org.ovirt.engine.core.common.businessentities.pm.FenceOperationResult result ) { org.mockito.Mockito.doReturn ( result ) . when ( executor ) . fence ( org.mockito.Matchers.any ( org.ovirt.engine.core.common.businessentities.pm.FenceActionType.class ) ) ; }

Target:
protected void mockSingleAgentResult ( org.ovirt.engine.core.bll.pm.SingleAgentFenceActionExecutor executor , org.ovirt.engine.core.common.businessentities.pm.FenceOperationResult result ) { org.mockito.Mockito.doReturn ( result ) . when ( executor ) . fence ( org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.common.businessentities.pm.FenceActionType.class ) ) ; }
Source:
public void setlast_vds_run_on ( org.ovirt.engine.core.compat.NGuid value ) { this . mVmDynamic.setlast_vds_run_on ( value ) ; }

Target:
public java.lang.Double getElapsedTime ( ) { return this . vmStatistics.getelapsed_time ( ) ; }
Source:
public static org.ovirt.engine.ui.uicommonweb.models.Model createUpgradeModel ( final org.ovirt.engine.core.common.businessentities.VDS host ) { org.ovirt.engine.ui.uicommonweb.models.Model model ; if ( host.isOvirtNode ( ) ) { model = new org.ovirt.engine.ui.uicommonweb.models.hosts.UpgradeModel ( host ) ; } else { model = new org.ovirt.engine.ui.uicommonweb.models.hosts.UpgradeConfirmationModel ( host ) ; } return model ; }

Target:
public static org.ovirt.engine.ui.uicommonweb.models.Model createUpgradeModel ( final org.ovirt.engine.core.common.businessentities.VDS host ) { org.ovirt.engine.ui.uicommonweb.models.Model model ; if ( host.isOvirtVintageNode ( ) ) { model = new org.ovirt.engine.ui.uicommonweb.models.hosts.UpgradeModel ( host ) ; } else { model = new org.ovirt.engine.ui.uicommonweb.models.hosts.UpgradeConfirmationModel ( host ) ; } return model ; }
Source:
public static java.util.Set < java.util.Map.Entry < java.lang.Integer , java.lang.String > > data ( ) { return org.ovirt.engine.core.searchbackend.OsValueAutoCompleterTest.completionMap.entrySet ( ) ; }

Target:
public static java.util.stream.Stream < java.util.Map.Entry < java.lang.Integer , java.lang.String > > data ( ) { return org.ovirt.engine.core.searchbackend.OsValueAutoCompleterTest.completionMap.entrySet ( ) . stream ( ) ; }
Source:
private java.util.List < org.ovirt.engine.core.common.action.LiveMigrateDiskParameters > createLiveMigrateVmDisksParameters ( ) { return java.util.Arrays.asList ( new org.ovirt.engine.core.common.action.LiveMigrateDiskParameters ( diskImageId , srcStorageId , dstStorageId , vmId , quotaId , diskProfileId , diskImageGroupId ) ) ; }

Target:
private java.util.List < org.ovirt.engine.core.common.action.LiveMigrateDiskParameters > createLiveMigrateVmDisksParameters ( ) { return java.util.Collections.singletonList ( new org.ovirt.engine.core.common.action.LiveMigrateDiskParameters ( diskImageId , srcStorageId , dstStorageId , vmId , quotaId , diskProfileId , diskImageGroupId ) ) ; }
Source:
protected void initDriver ( ) { org.ovirt.engine.ui.webadmin.section.main.view.popup.PermissionsPopupView.Driver.driver.initialize ( this ) ; }

Target:
protected void initDriver ( ) { driver.initialize ( this ) ; }
Source:
public java.lang.Void runInTransaction ( ) { getCompensationContext ( ) . snapshotEntityStatus ( getSnapshot ( ) ) ; getSnapshotDao ( ) . updateStatus ( getParameters ( ) . getSourceSnapshotId ( ) , SnapshotStatus.LOCKED ) ; getCompensationContext ( ) . stateChanged ( ) ; return null ; }

Target:
public java.lang.Void runInTransaction ( ) { getCompensationContext ( ) . snapshotEntityStatus ( getSnapshot ( ) ) ; getSnapshotDAO ( ) . updateStatus ( getParameters ( ) . getSourceSnapshotId ( ) , SnapshotStatus.LOCKED ) ; getCompensationContext ( ) . stateChanged ( ) ; return null ; }
Source:
java.lang.String integerValidationNumberGreaterInvalidReason ( java.lang.String prefixMsg , int min ) ;

Target:
java.lang.String integerValidationNumberBetweenInvalidReason ( java.lang.String prefixMsg , int min , int max ) ;
Source:
public void canDoActionFailsOnNull ( ) { cmd = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.gluster.PauseGlusterVolumeGeoRepSessionCommand ( new org.ovirt.engine.core.common.action.gluster.GlusterVolumeGeoRepSessionParameters ( ) ) ) ; prepareMocks ( cmd ) ; org.junit.Assert.assertFalse ( cmd.canDoAction ( ) ) ; }

Target:
public void validateFailsOnNull ( ) { cmd = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.gluster.PauseGlusterVolumeGeoRepSessionCommand ( new org.ovirt.engine.core.common.action.gluster.GlusterVolumeGeoRepSessionParameters ( ) ) ) ; prepareMocks ( cmd ) ; org.junit.Assert.assertFalse ( cmd.validate ( ) ) ; }
Source:
protected void templateInited ( ) { super . templateInited ( ) ; setupWindowModelFrom ( pool.getStaticData ( ) ) ; }

Target:
protected void PostInitTemplate ( ) { setupWindowModelFrom ( pool.getStaticData ( ) ) ; getModel ( ) . setIsDisksAvailable ( true ) ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object ReturnValue ) { setItems ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ) ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( ReturnValue ) ) . getReturnValue ( ) ) ) ) ; }

Target:
public void executed ( org.ovirt.engine.ui.uicompat.FrontendMultipleActionAsyncResult result ) { confirmationModel.stopProgress ( ) ; setWindow ( null ) ; }
Source:
public void postModelEnabled ( boolean enabled ) { messageLabel.setVisible ( ( ! enabled ) ) ; }

Target:
public void postModelEnabled ( boolean enabled ) { messageLabel.setVisible ( ( ! enabled ) ) ; setApplyEnabled ( ( ! enabled ) ) ; }
Source:
protected java.lang.Integer getApplicationMode ( java.lang.String sessionId ) { return ( ( java.lang.Integer ) ( runPublicQuery ( VdcQueryType.GetConfigurationValue , new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.ApplicationMode , org.ovirt.engine.core.common.config.ConfigCommon.defaultConfigurationVersion ) , sessionId ) ) ) ; }

Target:
protected java.lang.Integer getApplicationMode ( java.lang.String sessionId ) { return ( ( java.lang.Integer ) ( runPublicQuery ( VdcQueryType.GetConfigurationValue , new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.config.ConfigValues.ApplicationMode , org.ovirt.engine.core.common.config.ConfigCommon.defaultConfigurationVersion ) , sessionId ) ) ) ; }
Source:
protected void SyncSearch ( ) { if ( ( getEntity ( ) ) == null ) { return ; } super . SyncSearch ( VdcQueryType.GetTemplateInterfacesByTemplateId , new org.ovirt.engine.core.common.queries.GetVmTemplateParameters ( getEntityStronglyTyped ( ) . getId ( ) ) ) ; }

Target:
protected void AsyncSearch ( ) { super . AsyncSearch ( ) ; setAsyncResult ( org.ovirt.engine.ui.frontend.Frontend.RegisterQuery ( VdcQueryType.GetTemplateInterfacesByTemplateId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( getEntityStronglyTyped ( ) . getId ( ) ) ) ) ; setItems ( getAsyncResult ( ) . getData ( ) ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.StorageDomain loadTargetedMasterDomain ( ) { return getStorageDomainDAO ( ) . get ( getNewMasterId ( false ) ) ; }

Target:
private org.ovirt.engine.core.common.businessentities.StorageDomain loadTargetedMasterDomain ( ) { return getStorageDomainDAO ( ) . get ( getParameters ( ) . getNewMasterDomainId ( ) ) ; }
Source:
org.ovirt.engine.core.common.businessentities.StorageDomain getStorageDomain ( org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.common.businessentities.StorageDomainType type , org.ovirt.engine.core.common.businessentities.StorageDomainStatus status ) ;

Target:
java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > getStorageDomains ( org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.common.businessentities.StorageDomainType type , org.ovirt.engine.core.common.businessentities.StorageDomainStatus status ) ;
Source:
public java.util.List < org.ovirt.engine.core.common.job.Job > getJobsByCorrelationId ( java.lang.String correlationId ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) . addValue ( "correlation_id" , correlationId ) ; return getCallsHandler ( ) . executeReadList ( "GetJobsByCorrelationId" , createEntityRowMapper ( ) , parameterSource ) ; }

Target:
public void deleteRunningJobsOfTasklessCommands ( ) { updateQueryGetResult ( entityManager.createNativeQuery ( "select cast(DeleteRunningJobsOfTasklessCommands as text) from DeleteRunningJobsOfTasklessCommands()" ) ) ; }
Source:
protected void removeVmStatic ( boolean removePermissions ) { org.ovirt.engine.core.bll.VmCommand.getVmStaticDao ( ) . remove ( org.ovirt.engine.core.bll.VmCommand.getVmId ( ) , removePermissions ) ; }

Target:
protected void removeVmStatic ( boolean removePermissions ) { vmStaticDao.remove ( org.ovirt.engine.core.bll.VmCommand.getVmId ( ) , removePermissions ) ; }
Source:
public com.google.gwt.safehtml.shared.SafeHtml getValue ( ) { return text ; }

Target:
public com.google.gwt.safehtml.shared.SafeHtml getValue ( ) { if ( text != null ) { return templates.nonResizeableColumnHeader ( text ) ; } return null ; }
Source:
private static void RefreshVdcOptionCache ( org.ovirt.engine.core.dal.dbbroker.DbFacade db ) { org.ovirt.engine.core.dal.dbbroker.generic.DBConfigUtils._vdcOptionCache.clear ( ) ; java.util.List < org.ovirt.engine.core.common.businessentities.VdcOption > list = db.getVdcOptionDAO ( ) . getAll ( ) ; for ( org.ovirt.engine.core.common.businessentities.VdcOption option : list ) { org.ovirt.engine.core.dal.dbbroker.generic.DBConfigUtils.updateOption ( option ) ; } }

Target:
private static void RefreshVdcOptionCache ( org.ovirt.engine.core.dal.dbbroker.DbFacade db ) { org.ovirt.engine.core.dal.dbbroker.generic.DBConfigUtils._vdcOptionCache.clear ( ) ; java.util.List < org.ovirt.engine.core.common.businessentities.VdcOption > list = db.getVdcOptionDao ( ) . getAll ( ) ; for ( org.ovirt.engine.core.common.businessentities.VdcOption option : list ) { org.ovirt.engine.core.dal.dbbroker.generic.DBConfigUtils.updateOption ( option ) ; } }
Source:
public void testGetDefaultQuotaForStoragePool ( ) { org.ovirt.engine.core.common.businessentities.Quota quota = dao.getDefaultQuotaForStoragePool ( FixturesTool.STORAGE_POOL_NFS ) ; org.junit.Assert.assertNotNull ( quota ) ; org.junit.Assert.assertEquals ( FixturesTool.STORAGE_POOL_NFS , quota.getStoragePoolId ( ) ) ; org.junit.Assert.assertTrue ( quota.isDefault ( ) ) ; }

Target:
public void testGetDefaultQuotaForStoragePool ( ) { org.ovirt.engine.core.common.businessentities.Quota quota = dao.getDefaultQuotaForStoragePool ( FixturesTool.STORAGE_POOL_NFS ) ; org.junit.jupiter.api.Assertions.assertNotNull ( quota ) ; org.junit.jupiter.api.Assertions.assertEquals ( FixturesTool.STORAGE_POOL_NFS , quota.getStoragePoolId ( ) ) ; org.junit.jupiter.api.Assertions.assertTrue ( quota.isDefault ( ) ) ; }
Source:
public void testCreateVmInfoBuilder ( ) { final org.ovirt.engine.core.vdsbroker.builder.vminfo.VmInfoBuilder actual = underTest.createVmInfoBuilder ( new org.ovirt.engine.core.common.businessentities.VM ( ) , org.ovirt.engine.core.compat.Guid.newGuid ( ) , new java.util.HashMap ( ) ) ; org.junit.Assert.assertThat ( actual , org.hamcrest.CoreMatchers.instanceOf ( org.ovirt.engine.core.vdsbroker.builder.vminfo.VmInfoBuilderImpl.class ) ) ; }

Target:
public void testCreateVmInfoBuilder ( ) { final org.ovirt.engine.core.vdsbroker.builder.vminfo.VmInfoBuilder actual = underTest.createVmInfoBuilder ( new org.ovirt.engine.core.common.businessentities.VM ( ) , org.ovirt.engine.core.compat.Guid.newGuid ( ) , new java.util.HashMap ( ) ) ; org.hamcrest.MatcherAssert.assertThat ( actual , org.hamcrest.CoreMatchers.instanceOf ( org.ovirt.engine.core.vdsbroker.builder.vminfo.VmInfoBuilderImpl.class ) ) ; }
Source:
public javax.ws.rs.core.Response remove ( ) { get ( ) ; return performAction ( VdcActionType.RemoveVmTemplate , new org.ovirt.engine.core.common.action.VmTemplateParametersBase ( guid ) ) ; }

Target:
public javax.ws.rs.core.Response remove ( ) { get ( ) ; return performAction ( VdcActionType.RemoveVmTemplate , new org.ovirt.engine.core.common.action.VmTemplateManagementParameters ( guid ) ) ; }
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 static void LogoffAsync ( org.ovirt.engine.core.common.users.VdcUser vdcUser , final org.ovirt.engine.ui.frontend.AsyncQuery callback ) { org.ovirt.engine.ui.frontend.gwtservices.GenericApiGWTServiceAsync service = GenericApiGWTServiceAsync.Util.getInstance ( ) ; org.ovirt.engine.ui.frontend.Frontend.LogoffAsync ( vdcUser , callback , service ) ; }
Source:
public void testExecuteGetAllEntitiesCommand ( ) { cmd.executeCommand ( ) ; org.junit.Assert.assertTrue ( "return value should be true" , cmd.getReturnValue ( ) . getSucceeded ( ) ) ; }

Target:
public void testExecuteGetAllEntitiesCommand ( ) { cmd.executeCommand ( ) ; org.junit.jupiter.api.Assertions.assertTrue ( cmd.getReturnValue ( ) . getSucceeded ( ) , "return value should be true" ) ; }
Source:
protected java.lang.String generateVmMetadata ( org.ovirt.engine.core.common.businessentities.VM vm , java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > AllVmImages ) { return ovfManager.ExportVm ( vm , AllVmImages ) ; }

Target:
protected java.lang.String generateVmMetadata ( org.ovirt.engine.core.common.businessentities.VM vm , java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > AllVmImages ) { return ovfManager.ExportVm ( vm , AllVmImages , org.ovirt.engine.core.bll.utils.ClusterUtils.getCompatilibilyVersion ( vm ) ) ; }
Source:
public org.ovirt.engine.api.resource.externalhostproviders.KatelloErratumResource getKatelloErratumResource ( java.lang.String id ) { return inject ( new org.ovirt.engine.api.restapi.resource.externalhostproviders.BackendSystemKatelloErratumResource ( id ) ) ; }

Target:
public org.ovirt.engine.api.resource.externalhostproviders.KatelloErratumResource getKatelloErratumResource ( java.lang.String id ) { return inject ( new org.ovirt.engine.api.restapi.resource.externalhostproviders.BackendEngineKatelloErratumResource ( id ) ) ; }
Source:
private void mockDaos ( ) { mockDiskImageDao ( ) ; mockStorageDomainDao ( ) ; mockDynamicVmDao ( ) ; org.mockito.Mockito.doReturn ( snapshotDao ) . when ( spyCommand ) . getSnapshotDao ( ) ; org.mockito.Mockito.doReturn ( vmNetworkInterfaceDAO ) . when ( spyCommand ) . getVmNetworkInterfaceDAO ( ) ; }

Target:
private void mockDaos ( ) { mockDiskImageDao ( ) ; mockStorageDomainDao ( ) ; mockDynamicVmDao ( ) ; org.mockito.Mockito.doReturn ( snapshotDao ) . when ( spyCommand ) . getSnapshotDao ( ) ; org.mockito.Mockito.doReturn ( vmNetworkInterfaceDAO ) . when ( spyCommand ) . getVmNetworkInterfaceDao ( ) ; }
Source:
public void UtcDateStringToLocaDate_nodep ( ) { java.util.Date date = org.ovirt.engine.core.utils.ovf.OvfParser.utcDateStringToLocaDate ( "1984/06/19 14:25:11" ) ; org.junit.Assert.assertEquals ( 456503111000L , date.getTime ( ) ) ; }

Target:
public void utcDateStringToLocaDateNoDep ( ) { java.util.Date date = org.ovirt.engine.core.utils.ovf.OvfParser.utcDateStringToLocaDate ( "1984/06/19 14:25:11" ) ; org.junit.Assert.assertEquals ( 456503111000L , date.getTime ( ) ) ; }
Source:
public void setVmMemSizeMb ( int value ) { this . vmStatic.setmem_size_mb ( value ) ; }

Target:
public java.lang.String getVmDomain ( ) { return this . vmStatic.getDomain ( ) ; }
Source:
public void parametersWithSecureDeletionAreNotFixedOnBlockDomainWhenPostZeroIsFalse ( ) { org.ovirt.engine.core.bll.storage.domain.PostDeleteActionHandlerTest.ParametersWithPostDeleteAction parameters = postDeleteActionHandler.fixParameters ( new org.ovirt.engine.core.bll.storage.domain.PostDeleteActionHandlerTest.ParametersWithPostDeleteAction ( false ) , false ) ; assertPostZeroValue ( parameters , false ) ; }

Target:
public void parametersWithSecureDeletionAreNotFixedOnBlockDomainWhenPostZeroIsFalse ( ) { org.ovirt.engine.core.bll.storage.domain.PostDeleteActionHandlerTest.ParametersWithPostDeleteAction parameters = postDeleteActionHandler.fixPostZeroField ( new org.ovirt.engine.core.bll.storage.domain.PostDeleteActionHandlerTest.ParametersWithPostDeleteAction ( false , false ) , false ) ; assertPostZeroValue ( parameters , false ) ; }
Source:
public void getForNonExistentVds ( ) { org.ovirt.engine.core.common.businessentities.VdsKdumpStatus found = dao.get ( new org.ovirt.engine.core.compat.Guid ( "11111111-2222-3333-4444-555555555555" ) ) ; org.junit.Assert.assertNull ( found ) ; }

Target:
public void getForNonExistentVds ( ) { org.ovirt.engine.core.common.businessentities.VdsKdumpStatus found = dao.get ( new org.ovirt.engine.core.compat.Guid ( "11111111-2222-3333-4444-555555555555" ) ) ; org.junit.jupiter.api.Assertions.assertNull ( found ) ; }
Source:
private org.ovirt.engine.core.bll.ValidationResult validateNetworkExclusiveOnNics ( java.util.Collection < org.ovirt.engine.core.common.businessentities.network.NetworkAttachment > attachmentsToConfigure ) { return new org.ovirt.engine.core.bll.validator.NetworkAttachmentsValidator ( attachmentsToConfigure , networkBusinessEntityMap ) . validateNetworkExclusiveOnNics ( ) ; }

Target:
private org.ovirt.engine.core.bll.ValidationResult attachmentsDontReferenceSameNetworkDuplicately ( java.util.Collection < org.ovirt.engine.core.common.businessentities.network.NetworkAttachment > attachments ) { return new org.ovirt.engine.core.bll.validator.NetworkAttachmentsValidator ( attachments , networkBusinessEntityMap , networkExclusivenessValidator ) . verifyUserAttachmentsDoesNotReferenceSameNetworkDuplicately ( ) ; }
Source:
private boolean isStorageDomainValid ( org.ovirt.engine.core.compat.Guid storageDomainId , org.ovirt.engine.core.common.businessentities.storage.ImageFileType imageType , boolean forceRefresh ) { if ( storageDomainId == null ) { org.ovirt.engine.core.bll.IsoDomainListSyncronizer.log.error ( "Storage domain ID received from command query is null." ) ; return false ; } if ( forceRefresh ) { return refreshRepos ( storageDomainId , imageType ) ; } return true ; }

Target:
private boolean isStorageDomainIdValid ( org.ovirt.engine.core.compat.Guid storageDomainId ) { if ( storageDomainId == null ) { org.ovirt.engine.core.bll.IsoDomainListSyncronizer.log.error ( "Storage domain ID received from command query is null." ) ; return false ; } return true ; }
Source:
public void removeStoragePoolFromCache ( org.ovirt.engine.core.compat.Guid storagePoolId ) { org.ovirt.engine.core.bll.quota.QuotaManager.lock.writeLock ( ) . lock ( ) ; try { org.ovirt.engine.core.bll.quota.QuotaManager.storagePoolQuotaMap.remove ( storagePoolId ) ; } finally { org.ovirt.engine.core.bll.quota.QuotaManager.lock.writeLock ( ) . unlock ( ) ; } }

Target:
public void removeStoragePoolFromCache ( org.ovirt.engine.core.compat.Guid storagePoolId ) { lock.writeLock ( ) . lock ( ) ; try { storagePoolQuotaMap.remove ( storagePoolId ) ; } finally { lock.writeLock ( ) . unlock ( ) ; } }
Source:
public java.lang.Void runInTransaction ( ) { getDbFacade ( ) . getVdsCpuStatisticsDAO ( ) . massUpdateCpuStatistics ( cpuStatisticsToSave , vds.getId ( ) ) ; return null ; }

Target:
public java.lang.Void runInTransaction ( ) { getDbFacade ( ) . getVdsCpuStatisticsDao ( ) . massUpdateCpuStatistics ( cpuStatisticsToSave , vds.getId ( ) ) ; return null ; }
Source:
public void setSearchStringPrefix ( java.lang.String value ) { if ( ! ( org.ovirt.engine.core.compat.StringHelper.stringsEqual ( searchStringPrefix , value ) ) ) { searchStringPrefix = value ; SearchStringPrefixChanged ( ) ; OnPropertyChanged ( new org.ovirt.engine.core.compat.PropertyChangedEventArgs ( "SearchStringPrefix" ) ) ; } }

Target:
private void setHasSearchStringPrefix ( boolean value ) { if ( ( hasSearchStringPrefix ) != value ) { hasSearchStringPrefix = value ; OnPropertyChanged ( new org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ( "HasSearchStringPrefix" ) ) ; } }
Source:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; dao = dbFacade.getGlusterBrickDao ( ) ; server = dbFacade.getVdsStaticDAO ( ) . get ( org.ovirt.engine.core.dao.gluster.GlusterBrickDaoTest.SERVER_ID ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; dao = dbFacade.getGlusterBrickDao ( ) ; server = dbFacade.getVdsStaticDao ( ) . get ( org.ovirt.engine.core.dao.gluster.GlusterBrickDaoTest.SERVER_ID ) ; }
Source:
java.lang.String numOfVmsInPoolInvalod ( int maxLength , int vmsInPool ) ;

Target:
java.lang.String poolNameWithQuestionMarksLengthInvalid ( int maxLength , int vmsInPool , int numberOfQuestionMarks ) ;
Source:
private static int calculateCpuUsage ( org.ovirt.engine.core.common.businessentities.VDS o1 ) { return ( ( o1.getUsageCpuPercent ( ) ) * ( org.ovirt.engine.core.bll.scheduling.SlaValidator.getEffectiveCpuCores ( o1 ) ) ) / ( o1.getVdsStrength ( ) ) ; }

Target:
private int calculateCpuUsage ( org.ovirt.engine.core.common.businessentities.VDS o1 ) { return ( ( o1.getUsageCpuPercent ( ) ) * ( org.ovirt.engine.core.bll.scheduling.SlaValidator.getEffectiveCpuCores ( o1 , countThreadsAsCores ) ) ) / ( o1.getVdsStrength ( ) ) ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object ReturnValue ) { }

Target:
public org.ovirt.engine.ui.uicommonweb.models.macpool.SharedMacPoolListModel getSharedMacPoolListModel ( ) { return sharedMacPoolListModel ; }
Source:
public boolean isClusterUpgradePolicy ( ) { return ( filters ) != null ? filters.contains ( org.ovirt.engine.core.common.scheduling.ClusterPolicy.UPGRADE_POLICY_UNIT_GUID ) : false ; }

Target:
public boolean isClusterUpgradePolicy ( ) { return org.ovirt.engine.core.common.scheduling.ClusterPolicy.UPGRADE_POLICY_GUID.equals ( id ) ; }
Source:
private org.ovirt.engine.core.bll.ValidationResult providerTypeNotChanged ( org.ovirt.engine.core.common.businessentities.Provider < ? > oldProvider , org.ovirt.engine.core.common.businessentities.Provider < ? > newProvider ) { return org.ovirt.engine.core.bll.ValidationResult.failWith ( VdcBllMessages.ACTION_TYPE_FAILED_CANNOT_CHANGE_PROVIDER_TYPE ) . when ( ( ( oldProvider.getType ( ) ) != ( newProvider.getType ( ) ) ) ) ; }

Target:
private org.ovirt.engine.core.bll.ValidationResult providerTypeNotChanged ( org.ovirt.engine.core.common.businessentities.Provider < ? > oldProvider , org.ovirt.engine.core.common.businessentities.Provider < ? > newProvider ) { return org.ovirt.engine.core.bll.ValidationResult.failWith ( EngineMessage.ACTION_TYPE_FAILED_CANNOT_CHANGE_PROVIDER_TYPE ) . when ( ( ( oldProvider.getType ( ) ) != ( newProvider.getType ( ) ) ) ) ; }
Source:
public void shouldElectActiveSharedDataDomain ( ) { final org.ovirt.engine.core.common.businessentities.StorageDomain domain = prepareSharedStorageDomainForElection ( StorageDomainStatus.Active ) ; org.junit.Assert.assertEquals ( domain , cmd.electNewMaster ( ) ) ; }

Target:
public void shouldElectActiveSharedDataDomain ( ) { final org.ovirt.engine.core.common.businessentities.StorageDomain domain = prepareSharedStorageDomainForElection ( StorageDomainStatus.Active ) ; org.junit.jupiter.api.Assertions.assertEquals ( domain , cmd.electNewMaster ( ) ) ; }
Source:
public void testGetAllFromDisksIncludingSnapshotsByDiskId ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.Disk > result = dao.getAllFromDisksIncludingSnapshotsByDiskId ( FixturesTool.IMAGE_GROUP_ID , null , false ) ; org.junit.Assert.assertEquals ( "wrong number of returned disks" , 4 , result.size ( ) ) ; }

Target:
public void testGetAllFromDisksIncludingSnapshotsByDiskId ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.Disk > result = dao.getAllFromDisksIncludingSnapshotsByDiskId ( FixturesTool.IMAGE_GROUP_ID , null , false ) ; org.junit.jupiter.api.Assertions.assertEquals ( 4 , result.size ( ) , "wrong number of returned disks" ) ; }
Source:
public void unsupportedHostedEngineDeployWhenNoHostedEngine ( ) { org.mockito.Mockito.when ( hostedEngineHelper.isVmManaged ( ) ) . thenReturn ( false ) ; 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_UNMANAGED_HOSTED_ENGINE ) ) ; }

Target:
public void unsupportedHostedEngineDeployWhenNoHostedEngine ( ) { org.mockito.Mockito.when ( hostedEngineHelper.isVmManaged ( ) ) . thenReturn ( false ) ; org.hamcrest.MatcherAssert.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_UNMANAGED_HOSTED_ENGINE ) ) ; }
Source:
protected boolean validateAndSetVmFromExportDomain ( ) { org.ovirt.engine.core.common.businessentities.VM vm = getVmFromExportDomain ( getParameters ( ) . getVmId ( ) ) ; if ( vm == null ) { return false ; } setVmFromExportDomain ( vm ) ; return true ; }

Target:
protected boolean validateAndSetVmFromExportDomain ( ) { org.ovirt.engine.core.common.businessentities.VM vm = getVmFromExportDomain ( org.ovirt.engine.core.bll.ImportVmCommand.getParameters ( ) . getVmId ( ) ) ; if ( vm == null ) { return false ; } setVmFromExportDomain ( vm ) ; return true ; }
Source:
public void finished ( org.junit.runners.model.FrameworkMethod method ) { org.ovirt.engine.core.utils.ejb.EjbUtils.setStrategy ( origStrategy ) ; }

Target:
public void finished ( org.junit.runner.Description description ) { org.ovirt.engine.core.utils.ejb.EjbUtils.setStrategy ( origStrategy ) ; }
Source:
void markHostDevicesUsedByVmId ( org.ovirt.engine.core.compat.Guid vmId ) ;

Target:
void markHostDevicesUsedByVmId ( org.ovirt.engine.core.compat.Guid vmId , org.ovirt.engine.core.compat.Guid hostId ) ;
Source:
public void testCanDoActionInstanceNameDuplicate ( ) { cmd.getParameters ( ) . setTemplateType ( VmEntityType.INSTANCE_TYPE ) ; org.mockito.Mockito.doReturn ( true ) . when ( cmd ) . isInstanceWithSameNameExists ( "templateName" ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( cmd , EngineMessage.ACTION_TYPE_FAILED_NAME_ALREADY_USED ) ; }

Target:
public void testValidateInstanceNameDuplicate ( ) { cmd.getParameters ( ) . setTemplateType ( VmEntityType.INSTANCE_TYPE ) ; org.mockito.Mockito.doReturn ( true ) . when ( cmd ) . isInstanceWithSameNameExists ( "templateName" ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( cmd , EngineMessage.ACTION_TYPE_FAILED_NAME_ALREADY_USED ) ; }
Source:
public void setAssociatedEntities ( org.ovirt.engine.core.compat.Guid [ ] associatedEntities ) { this . associatedEntities = associatedEntities ; }

Target:
public void setEntitiesMap ( java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.VdcObjectType > entitiesMap ) { this . entitiesMap = entitiesMap ; }
Source:
public void testNoRepeats ( ) { java.lang.String sample = org.ovirt.engine.core.utils.Ticketing.GenerateOTP ( ) ; for ( int x = 0 ; x < 1000 ; x ++ ) { java.lang.String other = org.ovirt.engine.core.utils.Ticketing.GenerateOTP ( ) ; assertNotSame ( sample , other ) ; } }

Target:
public void testNoRepeats ( ) { java.lang.String sample = org.ovirt.engine.core.utils.Ticketing.GenerateOTP ( ) ; for ( int x = 0 ; x < 1000 ; x ++ ) { java.lang.String other = org.ovirt.engine.core.utils.Ticketing.GenerateOTP ( ) ; org.junit.Assert.assertNotSame ( sample , other ) ; } }
Source:
protected void onLogin ( org.ovirt.engine.ui.uicommonweb.models.userportal.UserPortalLoginModel loginModel ) { loginModel.UpdateIsENGINEUser ( loginModel.getLoggedUser ( ) ) ; }

Target:
protected void onLogin ( org.ovirt.engine.ui.uicommonweb.models.userportal.UserPortalLoginModel loginModel ) { loginModel.updateIsENGINEUser ( loginModel.getLoggedUser ( ) ) ; }
Source:
public void validateSucceeds ( ) { command.getParameters ( ) . setAuditLogId ( org.ovirt.engine.core.bll.RemoveAuditLogByIdCommandTest.EVENT_ID_3 ) ; org.junit.Assert.assertTrue ( command.validate ( ) ) ; }

Target:
public void validateSucceeds ( ) { command.getParameters ( ) . setAuditLogId ( org.ovirt.engine.core.bll.RemoveAuditLogByIdCommandTest.EVENT_ID_3 ) ; org.junit.jupiter.api.Assertions.assertTrue ( command.validate ( ) ) ; }
Source:
public org.ovirt.engine.core.common.businessentities.VmType getVmType ( ) { return this . vmStatic.getvm_type ( ) ; }

Target:
public void setDbGeneration ( long value ) { this . vmStatic.setDbGeneration ( value ) ; }
Source:
public void checkValidAddress ( ) { org.junit.Assert.assertTrue ( underTest.test ( generateVdsNetworkInterface ( org.ovirt.engine.core.utils.network.predicate.AbstractVdsNetworkInterfacePredicateTest.VALID ) ) ) ; }

Target:
public void checkValidAddress ( ) { org.junit.jupiter.api.Assertions.assertTrue ( underTest.test ( generateVdsNetworkInterface ( org.ovirt.engine.core.utils.network.predicate.AbstractVdsNetworkInterfacePredicateTest.VALID ) ) ) ; }
Source:
private void setNetworks ( java.util.Map < java.lang.String , org.ovirt.engine.ui.uicommonweb.models.hosts.network.LogicalNetworkModel > networks ) { networkMap = networks ; getNetworksChangedEvent ( ) . raise ( this , EventArgs.Empty ) ; }

Target:
private void setNetworks ( java.util.Map < java.lang.String , org.ovirt.engine.ui.uicommonweb.models.hosts.network.LogicalNetworkModel > networks ) { networkMap = networks ; getNetworksChangedEvent ( ) . raise ( this , EventArgs.EMPTY ) ; }
Source:
public org.ovirt.vdsmfake.domain.DataCenter getDataCenterById ( java.lang.String id ) { final org.ovirt.vdsmfake.domain.DataCenter dataCenter = org.ovirt.vdsmfake.domain.VdsmManager.getInstance ( ) . getDataCenterById ( id ) ; return dataCenter ; }

Target:
public org.ovirt.vdsmfake.domain.DataCenter getDataCenterById ( java.lang.String id ) { final org.ovirt.vdsmfake.domain.DataCenter dataCenter = vdsmManager.getDataCenterById ( id ) ; return dataCenter ; }
Source:
public void dispose ( ) { synchronized ( syncObj ) { org.ovirt.engine.core.vdsbroker.irsbroker.IrsProxyData.log.info ( "IrsProxyData::disposing" ) ; resetIrs ( ) ; org.ovirt.engine.core.utils.timer.SchedulerUtilQuartzImpl.getInstance ( ) . deleteJob ( storagePoolRefreshJobId ) ; _disposed = true ; } }

Target:
public void dispose ( ) { synchronized ( syncObj ) { org.ovirt.engine.core.vdsbroker.irsbroker.IrsProxyData.log.info ( "IrsProxyData::disposing" ) ; resetIrs ( ) ; org.ovirt.engine.core.utils.timer.SchedulerUtilQuartzImpl.getInstance ( ) . deleteJob ( storagePoolRefreshJobId ) ; org.ovirt.engine.core.utils.timer.SchedulerUtilQuartzImpl.getInstance ( ) . deleteJob ( domainRecoverOnHostJobId ) ; _disposed = true ; } }