auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void testAdd ( ) { try { javax.ws.rs.core.UriInfo uriInfo = mockUri ( "vms" , "00000001-0001-0001-0001-000000000011" , "disks" ) ; javax.ws.rs.core.Request request = mockRequest ( "POST" ) ; control.replay ( ) ; org.ovirt.engine.api.model.Fault fault = usageFinder.getUsageMessage ( uriInfo , request ) ; assertEquals ( "For correct usage, see: http://localhost:8080/ovirt-engine/api/model#services/vm-disks/methods/add" , fault.getDetail ( ) ) ; } catch ( java.lang.ClassNotFoundException | java.io.IOException | java.net.URISyntaxException e ) { fail ( ) ; } }

Target:
public void testAdd ( ) { try { javax.ws.rs.core.UriInfo uriInfo = mockUri ( "hosts" , "00000001-0001-0001-0001-000000000011" , "nics" ) ; javax.ws.rs.core.Request request = mockRequest ( "POST" ) ; control.replay ( ) ; org.ovirt.engine.api.model.Fault fault = usageFinder.getUsageMessage ( uriInfo , request ) ; assertEquals ( "For correct usage, see: http://localhost:8080/ovirt-engine/api/model#services/host-nics/methods/add" , fault.getDetail ( ) ) ; } catch ( java.lang.ClassNotFoundException | java.io.IOException | java.net.URISyntaxException e ) { fail ( ) ; } }
Source:
public void canDoActionFailsNullParameterForIsoFile ( ) { mockVdsWithOsVersion ( org.ovirt.engine.core.bll.hostdeploy.UpgradeOvirtNodeInternalCommandTest.VALID_OVIRT_VERSION ) ; org.ovirt.engine.core.common.action.hostdeploy.InstallVdsParameters param = org.ovirt.engine.core.bll.hostdeploy.UpgradeOvirtNodeInternalCommandTest.createParameters ( ) ; param.setoVirtIsoFile ( null ) ; org.ovirt.engine.core.bll.hostdeploy.UpgradeOvirtNodeInternalCommand < org.ovirt.engine.core.common.action.hostdeploy.InstallVdsParameters > command = createCommand ( param ) ; org.ovirt.engine.core.bll.hostdeploy.UpgradeOvirtNodeInternalCommandTest.assertFailsWithCanDoActionMessage ( command , EngineMessage.VDS_CANNOT_INSTALL_MISSING_IMAGE_FILE ) ; }

Target:
public void validateFailsNullParameterForIsoFile ( ) { mockVdsWithOsVersion ( org.ovirt.engine.core.bll.hostdeploy.UpgradeOvirtNodeInternalCommandTest.VALID_OVIRT_VERSION ) ; org.ovirt.engine.core.common.action.hostdeploy.InstallVdsParameters param = org.ovirt.engine.core.bll.hostdeploy.UpgradeOvirtNodeInternalCommandTest.createParameters ( ) ; param.setoVirtIsoFile ( null ) ; org.ovirt.engine.core.bll.hostdeploy.UpgradeOvirtNodeInternalCommand < org.ovirt.engine.core.common.action.hostdeploy.InstallVdsParameters > command = createCommand ( param ) ; org.ovirt.engine.core.bll.hostdeploy.UpgradeOvirtNodeInternalCommandTest.assertFailsWithValidateMessage ( command , EngineMessage.VDS_CANNOT_INSTALL_MISSING_IMAGE_FILE ) ; }
Source:
protected void executeCommand ( ) { org.ovirt.engine.core.bll.provider.ProviderProxy proxy = org.ovirt.engine.core.bll.provider.ProviderProxyFactory.getInstance ( ) . create ( org.ovirt.engine.core.bll.provider.TestProviderConnectivityCommand.getParameters ( ) . getProvider ( ) ) ; proxy.testConnection ( ) ; org.ovirt.engine.core.bll.provider.TestProviderConnectivityCommand.setSucceeded ( true ) ; }

Target:
protected void executeCommand ( ) { org.ovirt.engine.core.bll.provider.ProviderProxy proxy = providerProxyFactory.create ( org.ovirt.engine.core.bll.provider.TestProviderConnectivityCommand.getParameters ( ) . getProvider ( ) ) ; proxy.testConnection ( ) ; org.ovirt.engine.core.bll.provider.TestProviderConnectivityCommand.setSucceeded ( true ) ; }
Source:
public com.google.gwt.safehtml.shared.SafeHtml getTooltip ( org.ovirt.engine.ui.uicommonweb.models.EntityModel object ) { return null ; }

Target:
public com.google.gwt.resources.client.ImageResource getValue ( org.ovirt.engine.ui.uicommonweb.models.EntityModel object ) { org.ovirt.engine.core.common.businessentities.storage.Disk disk = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.DiskModel ) ( object.getEntity ( ) ) ) . getDisk ( ) ; return disk.isBoot ( ) ? org.ovirt.engine.ui.common.widget.uicommon.popup.vm.VmDiskAttachPopupWidget.resources.bootableDiskIcon ( ) : null ; }
Source:
public void addMonitoring ( org.ovirt.engine.core.vdsbroker.VmsMonitoring vmsMonitoring ) { this . monitoring.addVmsMonitoring ( vmsMonitoring ) ; }

Target:
public org.ovirt.engine.core.common.businessentities.V2VJobInfo getV2VJobInfoForVm ( org.ovirt.engine.core.compat.Guid vmId ) { return vmIdToV2VJob.get ( vmId ) ; }
Source:
public java.util.SortedSet < java.lang.String > Convert ( java.lang.Object returnValue , org.ovirt.engine.ui.frontend.AsyncQuery asyncQuery ) { java.util.SortedSet < java.lang.String > sortedSet = new java.util.TreeSet ( new org.ovirt.engine.core.common.businessentities.comparators.LexoNumericComparator ( ) ) ; sortedSet.addAll ( ( ( java.util.Collection < java.lang.String > ) ( returnValue ) ) ) ; return sortedSet ; }

Target:
public java.util.SortedSet < java.lang.String > convert ( java.lang.Object returnValue , org.ovirt.engine.ui.frontend.AsyncQuery asyncQuery ) { java.util.SortedSet < java.lang.String > sortedSet = new java.util.TreeSet ( new org.ovirt.engine.core.common.businessentities.comparators.LexoNumericComparator ( ) ) ; sortedSet.addAll ( ( ( java.util.Collection < java.lang.String > ) ( returnValue ) ) ) ; return sortedSet ; }
Source:
public int hashCode ( ) { return java.util.Objects.hash ( customProperties , id , name , networkId , networkQosId , portMirroring , passthrough , description ) ; }

Target:
public int hashCode ( ) { return java.util.Objects.hash ( customProperties , id , name , networkId , networkQosId , portMirroring , passthrough , description , networkFilterId ) ; }
Source:
public java.lang.String renderNullSafe ( java.lang.Object object ) { return ( ( org.ovirt.engine.core.common.businessentities.Quota ) ( object ) ) . getQuotaName ( ) ; }

Target:
public com.google.gwt.safehtml.shared.SafeHtml getTooltip ( java.lang.Object object ) { com.google.gwt.safehtml.shared.SafeHtml superTooltip = super . getTooltip ( object ) ; if ( superTooltip == null ) { return com.google.gwt.safehtml.shared.SafeHtmlUtils.fromSafeConstant ( org.ovirt.engine.ui.webadmin.section.main.view.popup.storage.backup.ImportVmFromExportDomainPopupView.constants.importAllocationModifiedCollapse ( ) ) ; } return superTooltip ; }
Source:
public java.lang.Void runInTransaction ( ) { _vdsManager.setStatus ( parameters.getStatus ( ) , vds ) ; _vdsManager.UpdateDynamicData ( vds.getDynamicData ( ) ) ; _vdsManager.updateStatisticsData ( vds.getStatisticsData ( ) ) ; return null ; }

Target:
public java.lang.Void runInTransaction ( ) { _vdsManager.setStatus ( parameters.getStatus ( ) , vds ) ; _vdsManager.updateDynamicData ( vds.getDynamicData ( ) ) ; _vdsManager.updateStatisticsData ( vds.getStatisticsData ( ) ) ; return null ; }
Source:
public static java.lang.String GenerateOTP ( ) { java.security.SecureRandom secr = new java.security.SecureRandom ( ) ; byte [ ] arrRandom = new byte [ 9 ] ; secr.nextBytes ( arrRandom ) ; return Encoding.Base64.getString ( arrRandom ) ; }

Target:
public static java.lang.String GenerateOTP ( ) { java.security.SecureRandom secr = new java.security.SecureRandom ( ) ; byte [ ] arrRandom = new byte [ 9 ] ; secr.nextBytes ( arrRandom ) ; return org.apache.commons.codec.binary.Base64.encodeBase64String ( arrRandom ) ; }
Source:
public void setusage_network_percent ( java.lang.Integer value ) { this . mVmStatistics.setusage_network_percent ( value ) ; OnPropertyChanged ( new org.ovirt.engine.core.compat.PropertyChangedEventArgs ( "usage_network_percent" ) ) ; }

Target:
public void setSelectionAlgorithm ( org.ovirt.engine.core.common.businessentities.VdsSelectionAlgorithm value ) { selectionAlgorithm = value ; }
Source:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs pcArgs = ( ( org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ) ( args ) ) ; if ( "Progress" . equals ( pcArgs.propertyName ) ) { updatePopupProgress ( model , popup ) ; } }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs pcArgs = ( ( org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ) ( args ) ) ; if ( PropertyChangedEventArgs.Args.PROGRESS.toString ( ) . equals ( pcArgs.propertyName ) ) { updatePopupProgress ( model , popup ) ; } }
Source:
protected java.util.List < org.ovirt.engine.core.common.businessentities.VM > getVmsUsingProfile ( ) { if ( ( vms ) == null ) { vms = getDbFacade ( ) . getVmDao ( ) . getAllForVnicProfile ( vnicProfile.getId ( ) ) ; } return vms ; }

Target:
protected org.ovirt.engine.core.common.businessentities.network.VnicProfile getOldVnicProfile ( ) { if ( ( oldVnicProfile ) == null ) { oldVnicProfile = org.ovirt.engine.core.di.Injector.get ( org.ovirt.engine.core.dao.network.VnicProfileDao.class ) . get ( vnicProfile.getId ( ) ) ; } return oldVnicProfile ; }
Source:
protected void executeCommand ( ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getBookmarkDAO ( ) . save ( org.ovirt.engine.core.bll.AddBookmarkCommand.getBookmark ( ) ) ; org.ovirt.engine.core.bll.AddBookmarkCommand.setSucceeded ( true ) ; }

Target:
protected void executeCommand ( ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getBookmarkDao ( ) . save ( org.ovirt.engine.core.bll.AddBookmarkCommand.getBookmark ( ) ) ; org.ovirt.engine.core.bll.AddBookmarkCommand.setSucceeded ( true ) ; }
Source:
protected void OnEntityChanged ( ) { super . OnEntityChanged ( ) ; if ( ( getEntity ( ) ) != null ) { UpdateProperties ( ) ; } }

Target:
protected void onEntityChanged ( ) { super . onEntityChanged ( ) ; if ( ( getEntity ( ) ) != null ) { UpdateProperties ( ) ; } }
Source:
public java.lang.Void call ( ) throws org.ovirt.vdsm.jsonrpc.client.ClientConnectionException { client.updateInterestedOps ( ) ; return null ; }

Target:
protected void postConnect ( org.ovirt.vdsm.jsonrpc.client.utils.OneTimeCallback callback ) throws org.ovirt.vdsm.jsonrpc.client.ClientConnectionException { super . postConnect ( getPostConnectCallback ( ) ) ; }
Source:
public void canNotDoWithTwoPinnedHost ( ) { final org.ovirt.engine.core.bll.numa.vm.AddVmNumaNodesCommand command = mockedCommandWithVmFromDb ( ) ; vm.setDedicatedVmForVdsList ( java.util.Arrays.asList ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( command , EngineMessage.ACTION_TYPE_FAILED_VM_PINNED_TO_MULTIPLE_HOSTS ) ; }

Target:
public void canNotDoWithTwoPinnedHost ( ) { final org.ovirt.engine.core.bll.numa.vm.AddVmNumaNodesCommand command = mockedCommandWithVmFromDb ( ) ; vm.setDedicatedVmForVdsList ( java.util.Arrays.asList ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( command , EngineMessage.ACTION_TYPE_FAILED_VM_PINNED_TO_MULTIPLE_HOSTS ) ; }
Source:
org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeGeoRepStatusForXmlRpc glusterVolumeGeoRepStatus ( java.lang.String volumeName ) ;

Target:
org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc glusterVolumeGeoRepSessionCreate ( java.lang.String volumeName , java.lang.String remoteHost , java.lang.String remoteVolumeName , java.lang.String userName , java.lang.Boolean force ) ;
Source:
public void setTicketValiditySeconds ( int ticketValiditySeconds ) { this . ticketValiditySeconds = ticketValiditySeconds ; }

Target:
protected java.lang.String getSecureAttentionMapping ( ) { return org.ovirt.engine.core.common.console.ConsoleOptions.SECURE_ATTENTION_MAPPING ; }
Source:
public void UpdateIsDisksAvailable ( ) { }

Target:
public void updateIsDisksAvailable ( ) { getModel ( ) . setIsDisksAvailable ( ( ( ( getModel ( ) . getDisks ( ) ) != null ) && ( getModel ( ) . getProvisioning ( ) . getIsChangable ( ) ) ) ) ; }
Source:
private org.ovirt.engine.core.bll.provider.storage.OpenStackVolumeProviderProxy getVolumeProviderProxy ( org.ovirt.engine.core.compat.Guid storageDomainId ) { if ( ( proxy ) == null ) { proxy = org.ovirt.engine.core.bll.provider.storage.OpenStackVolumeProviderProxy.getFromStorageDomainId ( storageDomainId ) ; } return proxy ; }

Target:
private org.ovirt.engine.core.bll.provider.storage.OpenStackVolumeProviderProxy getVolumeProviderProxy ( org.ovirt.engine.core.compat.Guid storageDomainId ) { if ( ( proxy ) == null ) { proxy = org.ovirt.engine.core.bll.provider.storage.OpenStackVolumeProviderProxy.getFromStorageDomainId ( storageDomainId , org.ovirt.engine.core.di.Injector.get ( org.ovirt.engine.core.bll.provider.ProviderProxyFactory.class ) ) ; } return proxy ; }
Source:
public void getUsbPolicySetDisabled ( ) { org.ovirt.engine.api.model.Usb usb = new org.ovirt.engine.api.model.Usb ( ) ; usb.setEnabled ( false ) ; assertEquals ( UsbPolicy.DISABLED , org.ovirt.engine.api.restapi.types.VmMapper.getUsbPolicyOnCreate ( usb ) ) ; }

Target:
public void getUsbPolicyOnUpdateCurrentlyDisabledGotEnabledNotSetNativePolicyUsb ( ) { org.ovirt.engine.api.model.Usb usb = new org.ovirt.engine.api.model.Usb ( ) ; usb.setType ( UsbType.NATIVE ) ; org.junit.Assert.assertEquals ( UsbPolicy.DISABLED , org.ovirt.engine.api.restapi.types.VmMapper.getUsbPolicyOnUpdate ( usb , UsbPolicy.DISABLED ) ) ; }
Source:
public java.lang.String getTitle ( ) { return org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getConstants ( ) . editStorageQoSTitle ( ) ; }

Target:
public java.lang.String getTitle ( ) { return org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getConstants ( ) . editCpuQoSTitle ( ) ; }
Source:
private org.ovirt.engine.core.bll.network.macpoolmanager.Range findIncludingRange ( long mac ) { for ( org.ovirt.engine.core.bll.network.macpoolmanager.Range range : ranges ) { if ( range.contains ( mac ) ) { return range ; } } return null ; }

Target:
private org.ovirt.engine.core.bll.network.macpool.Range findIncludingRange ( long mac ) { for ( org.ovirt.engine.core.bll.network.macpool.Range range : ranges ) { if ( range.contains ( mac ) ) { return range ; } } return null ; }
Source:
public void invalidCorrelationId ( ) { org.ovirt.engine.core.common.action.VdcActionParametersBase parameters = new org.ovirt.engine.core.common.action.VdcActionParametersBase ( ) ; parameters.setCorrelationId ( "INVALID_CORRELATION_@#$%@#" ) ; org.ovirt.engine.core.common.action.VdcReturnValueBase result = org.ovirt.engine.core.bll.job.ExecutionHandler.evaluateCorrelationId ( parameters ) ; org.junit.Assert.assertNotNull ( "Correlation id is invalid" , result ) ; org.junit.Assert.assertFalse ( "Correlation id is invalid" , result.getSucceeded ( ) ) ; }

Target:
public void invalidCorrelationId ( ) { org.ovirt.engine.core.common.action.ActionParametersBase parameters = new org.ovirt.engine.core.common.action.ActionParametersBase ( ) ; parameters.setCorrelationId ( "INVALID_CORRELATION_@#$%@#" ) ; org.ovirt.engine.core.common.action.VdcReturnValueBase result = org.ovirt.engine.core.bll.job.ExecutionHandler.evaluateCorrelationId ( parameters ) ; org.junit.Assert.assertNotNull ( "Correlation id is invalid" , result ) ; org.junit.Assert.assertFalse ( "Correlation id is invalid" , result.getSucceeded ( ) ) ; }
Source:
public void setUp ( ) { vm = createVm ( ) ; validator = new org.ovirt.engine.core.bll.validator.VmValidator ( vm ) ; }

Target:
public void setUp ( ) throws org.ovirt.engine.core.common.utils.exceptions.InitializationException { vm = createVm ( ) ; validator = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.validator.VmValidator ( vm ) ) ; mockVmPropertiesUtils ( ) ; }
Source:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { updateCloudInitVisibility ( object ) ; }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event < ? extends org.ovirt.engine.ui.uicompat.EventArgs > ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { updateSysprepVisibility ( object ) ; }
Source:
private void processVmPoolOnStopVm ( ) { org.ovirt.engine.core.bll.VmPoolHandler.processVmPoolOnStopVm ( org.ovirt.engine.core.bll.RunVmCommandBase.getVm ( ) . getId ( ) , org.ovirt.engine.core.bll.job.ExecutionHandler.createDefaultContexForTasks ( org.ovirt.engine.core.bll.RunVmCommandBase.getExecutionContext ( ) ) ) ; }

Target:
private void processVmPoolOnStopVm ( ) { org.ovirt.engine.core.utils.threadpool.ThreadPoolUtil.execute ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { org.ovirt.engine.core.bll.VmPoolHandler.processVmPoolOnStopVm ( getVm ( ) . getId ( ) , org.ovirt.engine.core.bll.job.ExecutionHandler.createDefaultContexForTasks ( getExecutionContext ( ) ) ) ; } } ) ; }
Source:
public void testGetAllForVm ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.aaa.DbUser > result = dao.getAllForVm ( vm ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertFalse ( result.isEmpty ( ) ) ; }

Target:
public void testGetAllForVm ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.aaa.DbUser > result = dao.getAllForVm ( vm ) ; org.junit.jupiter.api.Assertions.assertNotNull ( result ) ; org.junit.jupiter.api.Assertions.assertFalse ( result.isEmpty ( ) ) ; }
Source:
public java.lang.String getValue ( org.ovirt.engine.core.common.businessentities.VM object ) { return ( java.lang.String.valueOf ( object.getVmMemSizeMb ( ) ) ) + " MB" ; }

Target:
public java.lang.String getValue ( org.ovirt.engine.core.common.businessentities.VM object ) { return org.ovirt.engine.ui.webadmin.section.main.view.tab.storage.SubTabStorageRegisterVmView.messages.megabytes ( java.lang.String.valueOf ( object.getVmMemSizeMb ( ) ) ) ; }
Source:
public void UpdateStatisticsData ( org.ovirt.engine.core.common.businessentities.VdsStatistics statisticsData ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVdsStatisticsDAO ( ) . update ( statisticsData ) ; }

Target:
public org.ovirt.engine.core.vdsbroker.VdsMonitor getVdsMonitor ( ) { return vdsMonitor ; }
Source:
public void nonInternalMaintenanceAllowed ( ) { testExecution ( StorageDomainStatus.Maintenance ) ; canDoActionSucceeds ( ) ; noIllegalStatusMessage ( ) ; }

Target:
public void nonInternalActionAllowed ( org.ovirt.engine.core.common.businessentities.StorageDomainStatus status ) { testExecution ( status ) ; testActionAllowed ( ) ; }
Source:
public void testAccepts01 ( ) { org.junit.Assert.assertTrue ( org.ovirt.engine.api.utils.BooleanParser.parseBoolean ( "1" ) ) ; org.junit.Assert.assertFalse ( org.ovirt.engine.api.utils.BooleanParser.parseBoolean ( "0" ) ) ; }

Target:
public void testAccepts01 ( ) { org.junit.jupiter.api.Assertions.assertTrue ( org.ovirt.engine.api.utils.BooleanParser.parseBoolean ( "1" ) ) ; org.junit.jupiter.api.Assertions.assertFalse ( org.ovirt.engine.api.utils.BooleanParser.parseBoolean ( "0" ) ) ; }
Source:
protected org.ovirt.engine.core.common.businessentities.VDSGroup lookupClusterByName ( java.lang.String name ) { return getEntity ( org.ovirt.engine.core.common.businessentities.VDSGroup.class , SearchType.Cluster , ( "Cluster: name=" + name ) ) ; }

Target:
protected org.ovirt.engine.core.common.businessentities.VDSGroup lookupClusterByName ( java.lang.String name ) { return getEntity ( org.ovirt.engine.core.common.businessentities.VDSGroup.class , VdcQueryType.GetVdsGroupByName , new org.ovirt.engine.core.common.queries.NameQueryParameters ( name ) , ( "Cluster: name=" + name ) ) ; }
Source:
public int compare ( org.ovirt.engine.core.common.businessentities.VM o1 , org.ovirt.engine.core.common.businessentities.VM o2 ) { return java.lang.Integer.valueOf ( calculateCpuUsage ( o1 ) ) . compareTo ( calculateCpuUsage ( o2 ) ) ; }

Target:
public int compare ( org.ovirt.engine.core.common.businessentities.VM o1 , org.ovirt.engine.core.common.businessentities.VM o2 ) { return java.lang.Integer.valueOf ( org.ovirt.engine.core.bll.scheduling.policyunits.EvenDistributionBalancePolicyUnit.VmCpuUsageComparator.calculateCpuUsage ( o1 ) ) . compareTo ( org.ovirt.engine.core.bll.scheduling.policyunits.EvenDistributionBalancePolicyUnit.VmCpuUsageComparator.calculateCpuUsage ( o2 ) ) ; }
Source:
public java.lang.Void answer ( org.mockito.invocation.InvocationOnMock invocation ) throws java.lang.Throwable { if ( ( ( ( org.ovirt.engine.core.utils.Pair ) ( invocation.getArguments ( ) [ 0 ] ) ) . getFirst ( ) ) != null ) { org.ovirt.engine.core.bll.quota.QuotaManagerTest.auditLogWritten = true ; } return null ; }

Target:
public java.lang.Void answer ( org.mockito.invocation.InvocationOnMock invocation ) throws java.lang.Throwable { if ( ( ( ( org.ovirt.engine.core.utils.Pair ) ( invocation.getArguments ( ) [ 0 ] ) ) . getFirst ( ) ) != null ) { auditLogWritten = true ; } return null ; }
Source:
protected void OnEntityChanged ( ) { super . OnEntityChanged ( ) ; if ( ( getEntity ( ) ) == null ) { return ; } getSearchCommand ( ) . Execute ( ) ; updateActionAvailability ( ) ; }

Target:
protected void onEntityChanged ( ) { super . onEntityChanged ( ) ; if ( ( getEntity ( ) ) == null ) { return ; } getSearchCommand ( ) . Execute ( ) ; updateActionAvailability ( ) ; }
Source:
public static int getAvailableUnitForVirtioScsiDisk ( java.util.Map < org.ovirt.engine.core.common.businessentities.VmDevice , java.lang.Integer > vmDeviceUnitMap ) { int unit = 0 ; while ( vmDeviceUnitMap.containsValue ( unit ) ) { unit ++ ; } return unit ; }

Target:
public static int getAvailableUnitForScsiDisk ( java.util.Map < org.ovirt.engine.core.common.businessentities.VmDevice , java.lang.Integer > vmDeviceUnitMap , boolean reserveFirstLun ) { int unit = ( reserveFirstLun ) ? 1 : 0 ; while ( vmDeviceUnitMap.containsValue ( unit ) ) { unit ++ ; } return unit ; }
Source:
public void testGetAllRunningForVds ( ) { java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.VM > result = dao.getAllRunningByVds ( org.ovirt.engine.core.dao.VmDAOTest.VDS_STATIC_ID ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertFalse ( result.isEmpty ( ) ) ; }

Target:
public void testGetAllForVdsGroup ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VM > result = dao.getAllForVdsGroup ( FixturesTool.VDS_GROUP_RHEL6_ISCSI ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertFalse ( result.isEmpty ( ) ) ; }
Source:
public org.ovirt.engine.core.dao.VmDao getVmDao ( ) { return dbFacade.getVmDao ( ) ; }

Target:
public org.ovirt.engine.core.dao.VmDynamicDao getVmDynamicDao ( ) { return dbFacade.getVmDynamicDao ( ) ; }
Source:
public org.ovirt.engine.core.common.AuditLogType getAuditLogTypeValue ( ) { if ( org.ovirt.engine.core.bll.AddVmPoolWithVmsCommand.isAddVmsSucceded ( ) ) { return org.ovirt.engine.core.common.AuditLogType.USER_ADD_VM_POOL_WITH_VMS ; } return org.ovirt.engine.core.bll.AddVmPoolWithVmsCommand.getSucceeded ( ) ? org.ovirt.engine.core.common.AuditLogType.USER_ADD_VM_POOL_WITH_VMS_ADD_VDS_FAILED : org.ovirt.engine.core.common.AuditLogType.USER_ADD_VM_POOL_WITH_VMS_FAILED ; }

Target:
public org.ovirt.engine.core.common.AuditLogType getAuditLogTypeValue ( ) { if ( org.ovirt.engine.core.bll.AddVmPoolCommand.isAddVmsSucceded ( ) ) { return org.ovirt.engine.core.common.AuditLogType.USER_ADD_VM_POOL_WITH_VMS ; } return org.ovirt.engine.core.bll.AddVmPoolCommand.getSucceeded ( ) ? org.ovirt.engine.core.common.AuditLogType.USER_ADD_VM_POOL_WITH_VMS_ADD_VDS_FAILED : org.ovirt.engine.core.common.AuditLogType.USER_ADD_VM_POOL_WITH_VMS_FAILED ; }
Source:
public java.lang.String getValue ( org.ovirt.engine.core.common.businessentities.VDS object ) { return ( ( object.getvm_active ( ) ) + " " ) + ( constants.vmsClusterHost ( ) ) ; }

Target:
public java.lang.String getValue ( org.ovirt.engine.core.common.businessentities.VDS object ) { int numOfActiveVMs = ( ( object.getvm_active ( ) ) != null ) ? object.getvm_active ( ) : 0 ; return org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getMessages ( ) . numberOfVmsForHostsLoad ( numOfActiveVMs ) ; }
Source:
protected javax.ws.rs.core.Response performCreation ( org.ovirt.engine.core.common.action.VdcActionType task , org.ovirt.engine.core.common.action.VdcActionParametersBase taskParams , org.ovirt.engine.api.restapi.resource.EntityIdResolver entityResolver , boolean block ) { return performCreation ( task , taskParams , entityResolver , block , null ) ; }

Target:
protected < T > javax.ws.rs.core.Response performCreation ( org.ovirt.engine.core.common.action.VdcActionType task , org.ovirt.engine.core.common.action.VdcActionParametersBase taskParams , org.ovirt.engine.api.restapi.resource.IResolver < T , Q > entityResolver , boolean block ) { return performCreation ( task , taskParams , entityResolver , block , null ) ; }
Source:
public org.ovirt.engine.core.bll.ValidationResult updatesAvailable ( ) { return org.ovirt.engine.core.bll.ValidationResult.failWith ( EngineMessage.NO_AVAILABLE_UPDATES_FOR_HOST ) . unless ( ( ( host.isOvirtNode ( ) ) || ( host.isUpdateAvailable ( ) ) ) ) ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult updatesAvailable ( ) { return org.ovirt.engine.core.bll.ValidationResult.failWith ( EngineMessage.NO_AVAILABLE_UPDATES_FOR_HOST ) . unless ( ( ( host.isOvirtVintageNode ( ) ) || ( host.isUpdateAvailable ( ) ) ) ) ; }
Source:
public void InternalSetVmStatus ( org.ovirt.engine.core.common.businessentities.VM vm , final org.ovirt.engine.core.common.businessentities.VMStatus status , org.ovirt.engine.core.common.businessentities.VmExitStatus exitStatus ) { InternalSetVmStatus ( vm , status , exitStatus , StringUtils.EMPTY , VmExitReason.Unknown ) ; }

Target:
public void InternalSetVmStatus ( org.ovirt.engine.core.common.businessentities.VM vm , final org.ovirt.engine.core.common.businessentities.VMStatus status , org.ovirt.engine.core.common.businessentities.VmExitStatus exitStatus ) { InternalSetVmStatus ( vm , status , exitStatus , StringUtils.EMPTY , VmExitReason.Unknown , vm.getStatusUpdatedTime ( ) ) ; }
Source:
public void testGetTreeForEntityWithRoleTypeFilteredWithNoPermissionsCheckDisabled ( ) { baseTestGetTreeForEntityFiltered ( org.ovirt.engine.core.dao.PermissionDAOTest.STORAGE_ENTITY_ID , VdcObjectType.Storage , org.ovirt.engine.core.dao.UNPRIVILEGED_USER_ID , false ) ; }

Target:
public void testGetTreeForEntityWithRoleTypeFilteredWithNoPermissionsCheckDisabled ( ) { baseTestGetTreeForEntityFiltered ( org.ovirt.engine.core.dao.PermissionDAOTest.STORAGE_ENTITY_ID , VdcObjectType.Storage , org.ovirt.engine.core.dao.UNPRIVILEGED_USER_SESSION_ID , false ) ; }
Source:
public void setDiskProfileListModel ( org.ovirt.engine.ui.uicommonweb.models.profiles.DiskProfileListModel diskProfileListModel ) { this . diskProfileListModel = diskProfileListModel ; }

Target:
private org.ovirt.engine.ui.uicommonweb.UICommand createCancelCommand ( java.lang.String commandName ) { return org.ovirt.engine.ui.uicommonweb.UICommand.createCancelUiCommand ( commandName , this ) ; }
Source:
public boolean isDisplayNetwork ( ) { return getEntity ( ) . getCluster ( ) . getis_display ( ) ; }

Target:
public boolean isMultiDisplay ( ) { return false ; }
Source:
public org.ovirt.engine.ui.common.widget.table.cell.TextCellWithEditableTooltip getCell ( ) { org.ovirt.engine.ui.common.widget.table.cell.TextCellWithEditableTooltip textCellWithEditableTooltip = super . getCell ( ) ; textCellWithEditableTooltip.setTitle ( constants.quotaCalculationsMessage ( ) ) ; return textCellWithEditableTooltip ; }

Target:
public org.ovirt.engine.ui.common.widget.table.cell.TextCellWithTooltip getCell ( ) { org.ovirt.engine.ui.common.widget.table.cell.TextCellWithTooltip TextCellWithTooltip = super . getCell ( ) ; TextCellWithTooltip.setTitle ( constants.quotaCalculationsMessage ( ) ) ; return TextCellWithTooltip ; }
Source:
public void testConvertMegaBytesToTB ( ) { long mb = ( 5 * 1024 ) * 1024 ; int tbs = org.ovirt.engine.core.common.utils.SizeConverter.convert ( mb , SizeUnit.MiB , SizeUnit.TiB ) . intValue ( ) ; org.junit.Assert.assertEquals ( 5 , tbs ) ; }

Target:
public void testConvertMegaBytesToTB ( ) { long mb = ( 5 * 1024 ) * 1024 ; int tbs = org.ovirt.engine.core.common.utils.SizeConverter.convert ( mb , SizeUnit.MiB , SizeUnit.TiB ) . intValue ( ) ; org.junit.jupiter.api.Assertions.assertEquals ( 5 , tbs ) ; }
Source:
protected void executeQueryCommand ( ) { setReturnValue ( org.ovirt.engine.core.bll.GetVmDevicesForVmQuery.getDbFacade ( ) . getVmDeviceDao ( ) . getVmDeviceByVmId ( org.ovirt.engine.core.bll.GetVmDevicesForVmQuery.getParameters ( ) . getId ( ) , org.ovirt.engine.core.bll.GetVmDevicesForVmQuery.getUserID ( ) , org.ovirt.engine.core.bll.GetVmDevicesForVmQuery.getParameters ( ) . isFiltered ( ) ) ) ; }

Target:
protected void executeQueryCommand ( ) { setReturnValue ( vmDeviceDao.getVmDeviceByVmId ( org.ovirt.engine.core.bll.GetVmDevicesForVmQuery.getParameters ( ) . getId ( ) , org.ovirt.engine.core.bll.GetVmDevicesForVmQuery.getUserID ( ) , org.ovirt.engine.core.bll.GetVmDevicesForVmQuery.getParameters ( ) . isFiltered ( ) ) ) ; }
Source:
static com.gwtplatform.mvp.client.TabData getTabData ( org.ovirt.engine.ui.webadmin.gin.ClientGinjector ginjector ) { return new org.ovirt.engine.ui.common.widget.tab.ModelBoundTabData ( ginjector.getApplicationConstants ( ) . userMainTabLabel ( ) , 12 , ginjector.getMainTabUserModelProvider ( ) ) ; }

Target:
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.DbUser , org.ovirt.engine.ui.uicommonweb.models.users.UserListModel > modelProvider ) { return new org.ovirt.engine.ui.common.widget.tab.ModelBoundTabData ( applicationConstants.userMainTabLabel ( ) , 13 , modelProvider ) ; }
Source:
public void Executed ( org.ovirt.engine.ui.uicompat.FrontendMultipleActionAsyncResult result ) { org.ovirt.engine.ui.uicommonweb.models.vms.MigrateModel localModel = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.MigrateModel ) ( result.getState ( ) ) ) ; localModel.StopProgress ( ) ; Cancel ( ) ; }

Target:
public void executed ( org.ovirt.engine.ui.uicompat.FrontendMultipleActionAsyncResult result ) { org.ovirt.engine.ui.uicommonweb.models.vms.VmListModel vmListModel1 = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.VmListModel ) ( result.getState ( ) ) ) ; vmListModel1.getWindow ( ) . stopProgress ( ) ; vmListModel1.cancel ( ) ; }
Source:
public org.ovirt.engine.core.compat.Guid findActiveISODomain ( org.ovirt.engine.core.compat.Guid storagePoolId ) { return new org.ovirt.engine.core.compat.Guid ( ) ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult vmNotInPreview ( org.ovirt.engine.core.compat.Guid vmId ) { if ( vmInPreview ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.dal.VdcBllMessages.ACTION_TYPE_FAILED_VM_IN_PREVIEW ) ; } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }
Source:
public static < R extends org.ovirt.engine.api.model.BaseResource > R addLinks ( javax.ws.rs.core.UriInfo uriInfo , R model , java.lang.Class < ? extends org.ovirt.engine.api.model.BaseResource > suggestedParentType ) { return org.ovirt.engine.api.utils.LinkHelper.addLinks ( uriInfo , model , suggestedParentType , true ) ; }

Target:
public static < R extends org.ovirt.engine.api.model.BaseResource > R addLinks ( javax.ws.rs.core.UriInfo uriInfo , R model , java.lang.Class < ? extends org.ovirt.engine.api.model.BaseResource > suggestedParentType ) { return org.ovirt.engine.api.restapi.util.LinkHelper.addLinks ( uriInfo , model , suggestedParentType , true ) ; }
Source:
public boolean eval ( org.ovirt.engine.core.common.businessentities.VdsNetworkInterface bond ) { return org.ovirt.engine.core.compat.StringHelper.EqOp ( bond.getBondName ( ) , i.getName ( ) ) ; }

Target:
public boolean eval ( org.ovirt.engine.core.common.businessentities.VdsNetworkInterface bond ) { return org.apache.commons.lang.StringUtils.equals ( bond.getBondName ( ) , i.getName ( ) ) ; }
Source:
public org.ovirt.engine.core.common.businessentities.NonOperationalReason persistAndEnforceNetworkCompliance ( org.ovirt.engine.core.common.businessentities.VDS host ) { return persistAndEnforceNetworkCompliance ( host , false , null ) ; }

Target:
public org.ovirt.engine.core.common.businessentities.NonOperationalReason persistAndEnforceNetworkCompliance ( org.ovirt.engine.core.common.businessentities.VDS host ) { return persistAndEnforceNetworkCompliance ( host , false , java.util.Collections.< org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > emptyList ( ) ) ; }
Source:
protected void setUpGetStorageDomainExpectations ( org.ovirt.engine.core.common.businessentities.StorageDomainType domainType ) throws java.lang.Exception { setUpEntityQueryExpectations ( VdcQueryType.GetStorageDomainById , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendExportDomainDiskResourceTest.STORAGE_DOMAIN_ID } , org.ovirt.engine.api.restapi.resource.BackendStorageDomainTemplatesResourceTest.setUpStorageDomain ( domainType ) ) ; }

Target:
protected void setUpGetStorageDomainExpectations ( org.ovirt.engine.core.common.businessentities.StorageDomainType domainType ) throws java.lang.Exception { setUpEntityQueryExpectations ( QueryType.GetStorageDomainById , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendExportDomainDiskResourceTest.STORAGE_DOMAIN_ID } , org.ovirt.engine.api.restapi.resource.BackendStorageDomainTemplatesResourceTest.setUpStorageDomain ( domainType ) ) ; }
Source:
public void moreWithMissingVersionButWithColonIsNotValid ( ) { org.junit.Assert.assertFalse ( helper.validate ( null , "a:;b:" ) . isOk ( ) ) ; org.junit.Assert.assertFalse ( helper.validate ( null , ":a;b:c" ) . isOk ( ) ) ; }

Target:
public void moreWithMissingVersionButWithColonIsNotValid ( ) { org.junit.jupiter.api.Assertions.assertFalse ( helper.validate ( null , "a:;b:" ) . isOk ( ) ) ; org.junit.jupiter.api.Assertions.assertFalse ( helper.validate ( null , ":a;b:c" ) . isOk ( ) ) ; }
Source:
public void Cluster_SelectedItemChanged ( ) { UpdateDefaultHost ( ) ; updateCustomPropertySheet ( ) ; UpdateNumOfSockets ( ) ; updateQuotaByCluster ( vm.getQuotaId ( ) , vm.getQuotaName ( ) ) ; updateCpuPinningVisibility ( ) ; }

Target:
public void postDataCenterWithClusterSelectedItemChanged ( ) { updateDefaultHost ( ) ; updateCustomPropertySheet ( ) ; updateNumOfSockets ( ) ; updateQuotaByCluster ( vm.getQuotaId ( ) , vm.getQuotaName ( ) ) ; updateCpuPinningVisibility ( ) ; }
Source:
public void networkNotLabeled ( ) { org.junit.Assert.assertThat ( validator.notLabeled ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }

Target:
public void testNotExternalNetworkSucceedsForNonExternalNetwork ( ) { org.mockito.Mockito.when ( network.isExternal ( ) ) . thenReturn ( false ) ; org.hamcrest.MatcherAssert.assertThat ( validator.notExternalNetwork ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }
Source:
private void verifyAuditFenceExecutionFailure ( int expectedInvocations ) { org.mockito.Mockito.verify ( auditLogDirector , org.mockito.Mockito.times ( expectedInvocations ) ) . log ( org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase.class ) , org.mockito.ArgumentMatchers.eq ( AuditLogType.FENCE_OPERATION_USING_AGENT_AND_PROXY_FAILED ) ) ; }

Target:
private void verifyAuditFenceExecutionFailure ( int expectedInvocations ) { org.mockito.Mockito.verify ( auditLogDirector , org.mockito.Mockito.times ( expectedInvocations ) ) . log ( org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogable.class ) , org.mockito.ArgumentMatchers.eq ( AuditLogType.FENCE_OPERATION_USING_AGENT_AND_PROXY_FAILED ) ) ; }
Source:
protected org.ovirt.engine.core.bll.interfaces.BackendInternal getBackend ( ) { return org.ovirt.engine.core.di.Injector.get ( org.ovirt.engine.core.bll.interfaces.BackendInternal.class ) ; }

Target:
protected org.ovirt.engine.core.bll.interfaces.BackendInternal getBackend ( ) { return backendInternal ; }
Source:
private void onSystemTreeSelectedItemChanged ( ) { search ( ) ; }

Target:
private void onSystemTreeSelectedItemChanged ( ) { org.ovirt.engine.ui.uicommonweb.models.quota.QuotaListModel.search ( ) ; }
Source:
public org.ovirt.engine.sdk.web.ConnectionsPoolBuilder timeout ( java.lang.Integer timeout ) { if ( timeout != null ) { this . timeout = timeout.intValue ( ) ; } return this ; }

Target:
public org.ovirt.engine.sdk.web.ConnectionsPoolBuilder requestTimeout ( java.lang.Integer requestTimeout ) { if ( requestTimeout != null ) { this . requestTimeout = requestTimeout ; } return this ; }
Source:
public void testValidateCommand ( ) throws java.lang.Exception { org.ovirt.engine.core.bll.RemoveQuotaCommand removeQuotaCommand = createCommand ( ) ; org.junit.Assert.assertTrue ( removeQuotaCommand.validate ( ) ) ; }

Target:
public void testValidateCommand ( ) throws java.lang.Exception { org.ovirt.engine.core.bll.RemoveQuotaCommand removeQuotaCommand = createCommand ( generalGuidQuota ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateSuccess ( removeQuotaCommand ) ; }
Source:
public org.ovirt.engine.core.bll.ValidationResult virtIoRngSupported ( ) { return org.ovirt.engine.core.bll.ValidationResult.failWith ( VdcBllMessages.ACTION_TYPE_FAILED_RNG_SOURCE_NOT_SUPPORTED ) . unless ( ( ( cluster.getRequiredRngSources ( ) . isEmpty ( ) ) || ( virtIoRngSupportedInCluster ( ) ) ) ) ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult virtIoRngSupported ( ) { return org.ovirt.engine.core.bll.ValidationResult.failWith ( EngineMessage.ACTION_TYPE_FAILED_RNG_SOURCE_NOT_SUPPORTED ) . unless ( ( ( cluster.getRequiredRngSources ( ) . isEmpty ( ) ) || ( virtIoRngSupportedInCluster ( ) ) ) ) ; }
Source:
private void assertExpected ( java.lang.Integer ... values ) { for ( java.lang.Integer v : values ) { assertEquals ( v , map.get ( org.ovirt.engine.core.utils.ReapedMapTest.MAPPER.getKey ( v ) ) ) ; } }

Target:
private void assertExpected ( java.lang.Integer ... values ) { for ( java.lang.Integer v : values ) { org.junit.Assert.assertEquals ( v , map.get ( org.ovirt.engine.core.utils.ReapedMapTest.MAPPER.getKey ( v ) ) ) ; } }
Source:
protected void executeCommand ( ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getClusterDao ( ) . remove ( org.ovirt.engine.core.bll.RemoveClusterCommand.getCluster ( ) . getId ( ) ) ; org.ovirt.engine.core.bll.RemoveClusterCommand.setSucceeded ( true ) ; }

Target:
protected void executeCommand ( ) { clusterDao.remove ( org.ovirt.engine.core.bll.RemoveClusterCommand.getCluster ( ) . getId ( ) ) ; org.ovirt.engine.core.bll.RemoveClusterCommand.setSucceeded ( true ) ; }
Source:
protected org.ovirt.engine.core.compat.Guid getPoolId ( ) { org.ovirt.engine.core.common.businessentities.vm_pools vmPool = org.ovirt.engine.core.bll.AddVmPoolWithVmsCommand.getVmPool ( ) ; org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmPoolDAO ( ) . save ( vmPool ) ; return vmPool.getvm_pool_id ( ) ; }

Target:
protected org.ovirt.engine.core.compat.Guid getPoolId ( ) { org.ovirt.engine.core.common.businessentities.vm_pools vmPool = org.ovirt.engine.core.bll.AddVmPoolWithVmsCommand.getVmPool ( ) ; org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmPoolDao ( ) . save ( vmPool ) ; return vmPool.getvm_pool_id ( ) ; }
Source:
public void testSimpleMatches ( ) { org.ovirt.engine.core.compat.Regex regex = new org.ovirt.engine.core.compat.Regex ( "[0-9]" ) ; assertTrue ( "A number should match" , regex.IsMatch ( "1" ) ) ; assertFalse ( "A letter should not match" , regex.IsMatch ( "a" ) ) ; }

Target:
public void testSimpleMatches ( ) { org.ovirt.engine.core.compat.Regex regex = new org.ovirt.engine.core.compat.Regex ( "[0-9]" ) ; org.junit.Assert.assertTrue ( "A number should match" , regex.IsMatch ( "1" ) ) ; org.junit.Assert.assertFalse ( "A letter should not match" , regex.IsMatch ( "a" ) ) ; }
Source:
protected void executeCommand ( ) { getSyncJobInstance ( ) . refreshHooksInCluster ( org.ovirt.engine.core.bll.gluster.RefreshGlusterHooksCommand.getCluster ( ) , true ) ; org.ovirt.engine.core.bll.gluster.RefreshGlusterHooksCommand.setSucceeded ( true ) ; }

Target:
protected void executeCommand ( ) { glusterHookSyncJob.refreshHooksInCluster ( org.ovirt.engine.core.bll.gluster.RefreshGlusterHooksCommand.getCluster ( ) , true ) ; org.ovirt.engine.core.bll.gluster.RefreshGlusterHooksCommand.setSucceeded ( true ) ; }
Source:
public javax.ws.rs.core.Response clear ( org.ovirt.engine.api.model.Action action ) { org.ovirt.engine.core.common.action.VdcActionParametersBase params = new org.ovirt.engine.core.common.action.VdcActionParametersBase ( ) ; params.setJobId ( guid ) ; return doAction ( ActionType.ClearExternalJob , params , action ) ; }

Target:
public javax.ws.rs.core.Response clear ( org.ovirt.engine.api.model.Action action ) { org.ovirt.engine.core.common.action.ActionParametersBase params = new org.ovirt.engine.core.common.action.ActionParametersBase ( ) ; params.setJobId ( guid ) ; return doAction ( ActionType.ClearExternalJob , params , action ) ; }
Source:
java.util.List < org.ovirt.engine.core.common.businessentities.Role > getAllForUserAndGroups ( org.ovirt.engine.core.compat.Guid userId , java.lang.String groupIds , int appMode ) ;

Target:
java.util.List < org.ovirt.engine.core.common.businessentities.Role > getAnyAdminRoleForUserAndGroups ( org.ovirt.engine.core.compat.Guid userId , java.lang.String groupIds , int appMode ) ;
Source:
public java.lang.String getPassword ( ) { return ( ( java.lang.String ) ( getData ( org.ovirt.engine.core.bll.session.SessionDataContainer.PASSWORD_PARAMETER_NAME ) ) ) ; }

Target:
public boolean isSessionExists ( java.lang.String sessionId ) { return sessionInfoMap.containsKey ( sessionId ) ; }
Source:
public org.ovirt.engine.core.common.AuditLogType getAuditLogTypeValue ( ) { return org.ovirt.engine.core.bll.RemoveVmPoolCommand.getSucceeded ( ) ? org.ovirt.engine.core.common.AuditLogType.USER_REMOVE_VM_POOL : org.ovirt.engine.core.common.AuditLogType.USER_REMOVE_VM_POOL_FAILED ; }

Target:
public org.ovirt.engine.core.common.AuditLogType getAuditLogTypeValue ( ) { if ( ( org.ovirt.engine.core.bll.RemoveVmPoolCommand.getActionState ( ) ) == ( CommandActionState.EXECUTE ) ) { return org.ovirt.engine.core.common.AuditLogType.USER_REMOVE_VM_POOL_INITIATED ; } else { return org.ovirt.engine.core.bll.RemoveVmPoolCommand.getSucceeded ( ) ? org.ovirt.engine.core.common.AuditLogType.USER_REMOVE_VM_POOL : org.ovirt.engine.core.common.AuditLogType.USER_REMOVE_VM_POOL_FAILED ; } }
Source:
public void canDoActionFailsBlockIso ( ) { sd.setStorageDomainType ( StorageDomainType.ISO ) ; sd.setStorageType ( StorageType.FCP ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( cmd , EngineMessage.ACTION_TYPE_FAILED_DOMAIN_TYPE_CAN_BE_CREATED_ONLY_ON_SPECIFIC_STORAGE_DOMAINS ) ; }

Target:
public void validateFailsBlockIso ( ) { sd.setStorageDomainType ( StorageDomainType.ISO ) ; sd.setStorageType ( StorageType.FCP ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( cmd , EngineMessage.ACTION_TYPE_FAILED_DOMAIN_TYPE_CAN_BE_CREATED_ONLY_ON_SPECIFIC_STORAGE_DOMAINS ) ; }
Source:
protected void handleAsynchrony ( org.ovirt.engine.core.common.action.VdcReturnValueBase result , R model ) { model.setCreationStatus ( getAsynchronousStatus ( result ) . value ( ) ) ; linkSubResource ( model , org.ovirt.engine.api.restapi.resource.AbstractBackendCollectionResource.CREATION_STATUS_REL , asString ( result.getVdsmTaskIdList ( ) ) ) ; }

Target:
protected void handleAsynchrony ( org.ovirt.engine.core.common.action.ActionReturnValue result , R model ) { model.setCreationStatus ( getAsynchronousStatus ( result ) . value ( ) ) ; linkSubResource ( model , org.ovirt.engine.api.restapi.resource.AbstractBackendCollectionResource.CREATION_STATUS_REL , asString ( result.getVdsmTaskIdList ( ) ) ) ; }
Source:
private boolean isVmMigratingToThisVds ( org.ovirt.engine.core.common.businessentities.VMStatus vmStatus , org.ovirt.engine.core.compat.Guid migratingToVds ) { return ( vmStatus == ( org.ovirt.engine.core.common.businessentities.VMStatus.MigratingFrom ) ) && ( getVdsManager ( ) . getVdsId ( ) . equals ( migratingToVds ) ) ; }

Target:
private boolean isVmMigratingToThisVds ( ) { return ( ( dbVm.getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.MigratingFrom ) ) && ( getVdsManager ( ) . getVdsId ( ) . equals ( dbVm.getMigratingToVds ( ) ) ) ; }
Source:
public void lowerVersionNoHostsNoNetwork ( ) { storagePoolWithLowerVersion ( ) ; addNonDefaultClusterToPool ( ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateSuccess ( cmd ) ; }

Target:
public void lowerVersionHostsAndNetwork ( ) { cmd.getStoragePool ( ) . setCompatibilityVersion ( org.ovirt.engine.core.bll.storage.pool.UpdateStoragePoolCommandTest.VERSION_1_0 ) ; addNonDefaultClusterToPool ( ) ; addHostsToCluster ( ) ; addNonManagementNetworkToPool ( ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( cmd , EngineMessage.ACTION_TYPE_FAILED_CANNOT_DECREASE_DATA_CENTER_COMPATIBILITY_VERSION ) ; }
Source:
protected org.ovirt.engine.core.common.queries.VdcQueryReturnValue runInternalQuery ( org.ovirt.engine.core.common.queries.VdcQueryType actionType , org.ovirt.engine.core.common.queries.VdcQueryParametersBase parameters ) { return getBackend ( ) . runInternalQuery ( actionType , parameters , getEngineContext ( ) ) ; }

Target:
protected org.ovirt.engine.core.common.queries.VdcQueryReturnValue runInternalQuery ( org.ovirt.engine.core.common.queries.VdcQueryType actionType , org.ovirt.engine.core.common.queries.VdcQueryParametersBase parameters ) { parameters.setRefresh ( false ) ; return getBackend ( ) . runInternalQuery ( actionType , parameters , getEngineContext ( ) ) ; }
Source:
protected java.util.List < org.ovirt.engine.api.model.Network > getEntityList ( boolean isDisplay , boolean isMigration , boolean isRequired ) { return getEntities ( isDisplay , isMigration , isRequired ) ; }

Target:
protected java.util.List < org.ovirt.engine.api.model.Network > getEntityList ( boolean isDisplay , boolean isMigration , boolean isRequired , boolean isDefaultRoute ) { return getEntities ( isDisplay , isMigration , isRequired , isDefaultRoute ) ; }
Source:
private void addInvalidVmStateMessage ( org.ovirt.engine.core.common.businessentities.VM vm ) { setActionMessageParameters ( ) ; addCanDoActionMessage ( java.lang.String.format ( "$%1$s %2$s" , "VmName" , vm.getName ( ) ) ) ; addCanDoActionMessage ( VdcBllMessages.ACTION_TYPE_FAILED_VM_IS_NOT_DOWN_OR_UP ) ; org.ovirt.engine.core.bll.MoveDisksCommand.getReturnValue ( ) . setCanDoAction ( false ) ; }

Target:
private void addInvalidVmStateMessage ( org.ovirt.engine.core.common.businessentities.VM vm ) { setActionMessageParameters ( ) ; addCanDoActionMessageVariable ( "VmName" , vm.getName ( ) ) ; addCanDoActionMessage ( VdcBllMessages.ACTION_TYPE_FAILED_VM_IS_NOT_DOWN_OR_UP ) ; org.ovirt.engine.core.bll.MoveDisksCommand.getReturnValue ( ) . setCanDoAction ( false ) ; }
Source:
public void testOneKeyVal ( ) { java.util.Map < java.lang.String , java.lang.String > map = org.ovirt.engine.core.utils.StringMapUtils.string2Map ( org.ovirt.engine.core.utils.StringMapUtilsTest.ONE_KEY_VAL ) ; org.junit.Assert.assertEquals ( 1 , map.size ( ) ) ; }

Target:
public void testOneKeyVal ( ) { java.util.Map < java.lang.String , java.lang.String > map = org.ovirt.engine.core.utils.StringMapUtils.string2Map ( org.ovirt.engine.core.utils.StringMapUtilsTest.ONE_KEY_VAL ) ; org.junit.jupiter.api.Assertions.assertEquals ( 1 , map.size ( ) ) ; }