auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void close ( ) { try { writer.writeEndDocument ( ) ; writer.close ( ) ; } catch ( javax.xml.stream.XMLStreamException exception ) { } }

Target:
public void close ( ) { try { writer.writeEndDocument ( ) ; writer.close ( ) ; } catch ( javax.xml.stream.XMLStreamException exception ) { throw new org.ovirt.api.metamodel.runtime.xml.XmlException ( "Can't close" , exception ) ; } }
Source:
private java.util.List < org.ovirt.engine.core.common.businessentities.VDS > uniteAgentsPreserveSpmPrioritySorting ( java.util.List < org.ovirt.engine.core.common.businessentities.VDS > vdsList ) { java.util.List < org.ovirt.engine.core.common.businessentities.VDS > results = uniteAgents ( vdsList ) ; java.util.Collections.sort ( results , new org.ovirt.engine.core.dao.VdsDaoImpl.HostSpmPriorityComparator ( ) ) ; return results ; }

Target:
private java.util.List < org.ovirt.engine.core.common.businessentities.VDS > uniteAgentsPreserveSpmPrioritySorting ( java.util.List < org.ovirt.engine.core.common.businessentities.VDS > vdsList ) { java.util.List < org.ovirt.engine.core.common.businessentities.VDS > results = uniteAgents ( vdsList ) ; java.util.Collections.sort ( results , new org.ovirt.engine.core.common.businessentities.comparators.HostSpmPriorityComparator ( ) ) ; return results ; }
Source:
protected void setUpVersionExpectations ( int index ) throws java.lang.Exception { setUpGetEntityExpectations ( VdcQueryType.GetAvailableStoragePoolVersions , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ index ] } , getVersions ( ) ) ; }

Target:
protected void setUpVersionExpectations ( int index ) throws java.lang.Exception { setUpGetEntityExpectations ( QueryType.GetAvailableStoragePoolVersions , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ index ] } , getVersions ( ) ) ; }
Source:
protected void executeCommand ( ) { getNetworkQoSDao ( ) . update ( getNetworkQoS ( ) ) ; getReturnValue ( ) . setActionReturnValue ( getNetworkQoS ( ) . getId ( ) ) ; setSucceeded ( true ) ; }

Target:
protected org.ovirt.engine.core.bll.validator.NetworkQosValidator getQosValidator ( org.ovirt.engine.core.common.businessentities.network.NetworkQoS qos ) { return new org.ovirt.engine.core.bll.validator.NetworkQosValidator ( qos ) ; }
Source:
protected org.ovirt.engine.core.bll.QueriesCommandBase < ? > createQueryCommand ( org.ovirt.engine.core.common.queries.VdcQueryType actionType , org.ovirt.engine.core.common.queries.VdcQueryParametersBase parameters ) { return org.ovirt.engine.core.bll.CommandsFactory.CreateQueryCommand ( actionType , parameters ) ; }

Target:
public java.util.ArrayList < org.ovirt.engine.core.common.action.VdcReturnValueBase > runMultipleActions ( org.ovirt.engine.core.common.action.VdcActionType actionType , java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > parameters , boolean isRunOnlyIfAllCanDoPass ) { return runMultipleActions ( actionType , parameters , isRunOnlyIfAllCanDoPass , false ) ; }
Source:
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 ) ; }

Target:
public java.lang.String getValue ( org.ovirt.engine.core.common.businessentities.VDS object ) { int numOfActiveVMs = ( ( object.getVmActive ( ) ) != null ) ? object.getVmActive ( ) : 0 ; return org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getMessages ( ) . numberOfVmsForHostsLoad ( numOfActiveVMs ) ; }
Source:
public void testAddValuePrimitive ( ) { int paramValue = new java.util.Random ( ) . nextInt ( ) ; paramSource.addValue ( paramName , paramValue ) ; org.junit.Assert.assertEquals ( "wrong value returned from parameter source" , paramValue , paramSource.getValue ( paramName ) ) ; }

Target:
public void testAddValuePrimitive ( ) { int paramValue = this . random.nextInt ( ) ; paramSource.addValue ( paramName , paramValue ) ; org.junit.Assert.assertEquals ( "wrong value returned from parameter source" , paramValue , paramSource.getValue ( paramName ) ) ; }
Source:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.VmModelBehaviorBase behavior = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.VmModelBehaviorBase ) ( target ) ) ; cachedDefaultTimeZoneKey = ( ( java.lang.String ) ( returnValue ) ) ; behavior.PostUpdateDefaultTimeZone ( ) ; }

Target:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.VmModelBehaviorBase behavior = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.VmModelBehaviorBase ) ( target ) ) ; cachedDefaultTimeZoneKey = ( ( java.lang.String ) ( returnValue ) ) ; behavior.postUpdateDefaultTimeZone ( ) ; }
Source:
protected void attachStorageDomainToDataCenter ( org.ovirt.engine.core.compat.Guid storageDomainId , org.ovirt.engine.core.compat.Guid storagePoolId ) { org.ovirt.engine.core.bll.storage.CINDERStorageHelper CINDERStorageHelper = new org.ovirt.engine.core.bll.storage.CINDERStorageHelper ( ) ; CINDERStorageHelper.setRunInNewTransaction ( false ) ; CINDERStorageHelper.attachCinderDomainToPool ( storageDomainId , storagePoolId ) ; CINDERStorageHelper.activateCinderDomain ( storageDomainId , storagePoolId ) ; }

Target:
protected void attachStorageDomainToDataCenter ( org.ovirt.engine.core.compat.Guid storageDomainId , org.ovirt.engine.core.compat.Guid storagePoolId ) { org.ovirt.engine.core.bll.storage.connection.CINDERStorageHelper CINDERStorageHelper = new org.ovirt.engine.core.bll.storage.connection.CINDERStorageHelper ( ) ; CINDERStorageHelper.setRunInNewTransaction ( false ) ; CINDERStorageHelper.attachCinderDomainToPool ( storageDomainId , storagePoolId ) ; CINDERStorageHelper.activateCinderDomain ( storageDomainId , storagePoolId ) ; }
Source:
protected org.ovirt.engine.core.common.vdscommands.VDSReturnValue runVdsCommand ( org.ovirt.engine.core.common.vdscommands.VDSCommandType commandType , org.ovirt.engine.core.common.vdscommands.VDSParametersBase parameters ) throws org.ovirt.engine.core.common.errors.EngineException { return getBackend ( ) . getResourceManager ( ) . RunVdsCommand ( commandType , parameters ) ; }

Target:
protected org.ovirt.engine.core.common.vdscommands.VDSReturnValue runVdsCommand ( org.ovirt.engine.core.common.vdscommands.VDSCommandType commandType , org.ovirt.engine.core.common.vdscommands.VDSParametersBase parameters ) throws org.ovirt.engine.core.common.errors.EngineException { return getVdsBroker ( ) . runVdsCommand ( commandType , parameters ) ; }
Source:
public static org.ovirt.engine.core.bll.tasks.CommandCoordinatorImpl getInstance ( ) { return org.ovirt.engine.core.bll.tasks.CommandCoordinatorImpl.instance ; }

Target:
public org.ovirt.engine.core.bll.tasks.interfaces.SPMTask construct ( org.ovirt.engine.core.common.asynctasks.AsyncTaskCreationInfo creationInfo ) { return org.ovirt.engine.core.bll.tasks.AsyncTaskFactory.construct ( this , creationInfo ) ; }
Source:
public void testTemplate ( ) { testValidSql ( "Template: " , "SELECT * FROM ((SELECT vm_templates_view.* FROM vm_templates_view ) ORDER BY name ASC ) as T1 OFFSET (1 -1) LIMIT 0" ) ; testValidSql ( "Template: hosts.name = fake1" , "SELECT * FROM ((SELECT vm_templates_view.* FROM vm_templates_view LEFT OUTER JOIN vms_with_tags ON vm_templates_view.vmt_guid=vms_with_tags.vmt_guid LEFT OUTER JOIN vds_with_tags ON vms_with_tags.run_on_vds=vds_with_tags.vds_id WHERE vds_with_tags.vds_name LIKE fake1 ) ORDER BY name ASC ) as T1 OFFSET (1 -1) LIMIT 0" ) ; testValidSql ( "Templates: storage.name = 111" , "SELECT * FROM (SELECT * FROM vm_templates_view WHERE ( vmt_guid IN (SELECT vm_templates_storage_domain.vmt_guid FROM vm_templates_storage_domain LEFT OUTER JOIN vms_with_tags ON vm_templates_storage_domain.vmt_guid=vms_with_tags.vmt_guid LEFT OUTER JOIN storage_domains_with_hosts_view ON vm_templates_storage_domain.storage_id=storage_domains_with_hosts_view.id WHERE storage_domains_with_hosts_view.storage_name LIKE 111 )) ORDER BY name ASC ) as T1 OFFSET (1 -1) LIMIT 0" ) ; }

Target:
public void testEvent ( ) { testValidSql ( "Event: " , "SELECT * FROM ((SELECT distinct audit_log.* FROM audit_log WHERE not deleted) ORDER BY audit_log_id DESC ) as T1 OFFSET (1 -1) LIMIT 0" ) ; testValidSql ( "Event: severity=error " , "SELECT * FROM ((SELECT distinct audit_log.* FROM audit_log WHERE audit_log.severity = '2' AND not deleted) ORDER BY audit_log_id DESC ) as T1 OFFSET (1 -1) LIMIT 0" ) ; testValidSql ( "Event: severity=alert " , "SELECT * FROM ((SELECT distinct audit_log.* FROM audit_log WHERE audit_log.severity = '10' AND not deleted) ORDER BY audit_log_id DESC ) as T1 OFFSET (1 -1) LIMIT 0" ) ; testValidSql ( "Event: host.name = \"host1\" " , "SELECT * FROM ((SELECT distinct audit_log.* FROM audit_log LEFT OUTER JOIN vds_with_tags ON audit_log.vds_id=vds_with_tags.vds_id WHERE vds_with_tags.vds_name LIKE host1 AND not deleted) ORDER BY audit_log_id DESC ) as T1 OFFSET (1 -1) LIMIT 0" ) ; }
Source:
public void testSaveorUpdate ( ) { storageDomainDR.setScheduleCronExpression ( null ) ; dao.saveOrUpdate ( storageDomainDR ) ; org.ovirt.engine.core.common.businessentities.StorageDomainDR result = dao.get ( FixturesTool.POSIX_STORAGE_DOMAIN_ID , FixturesTool.GLUSTER_GEOREP_SESSION_ID2 ) ; org.junit.Assert.assertEquals ( storageDomainDR , result ) ; }

Target:
public void testSaveorUpdate ( ) { storageDomainDR.setScheduleCronExpression ( null ) ; dao.saveOrUpdate ( storageDomainDR ) ; org.ovirt.engine.core.common.businessentities.StorageDomainDR result = dao.get ( FixturesTool.POSIX_STORAGE_DOMAIN_ID , FixturesTool.GLUSTER_GEOREP_SESSION_ID2 ) ; org.junit.jupiter.api.Assertions.assertEquals ( storageDomainDR , result ) ; }
Source:
public void execute ( ) { placeManager.revealPlace ( new com.gwtplatform.mvp.shared.proxy.PlaceRequest.Builder ( ) . nameToken ( placeToken ) . build ( ) ) ; }

Target:
public void execute ( ) { placeManager.revealPlace ( new com.gwtplatform.mvp.client.proxy.PlaceRequest.Builder ( ) . nameToken ( placeToken ) . build ( ) ) ; }
Source:
public org.ovirt.engine.ui.uicommonweb.models.EntityModel < T > setIsChangable ( boolean value ) { if ( ! ( isVmAttachedToPool ( ) ) ) { super . setIsChangable ( value ) ; } return this ; }

Target:
public org.ovirt.engine.ui.uicommonweb.models.EntityModel < T > setIsChangeable ( boolean value ) { if ( ! ( isVmAttachedToPool ( ) ) ) { super . setIsChangeable ( value ) ; } return this ; }
Source:
public void setGuestOsTimezoneOffset ( java.lang.Integer guestOsTimezoneOffset ) { if ( ! ( org.ovirt.engine.core.common.utils.ObjectUtils.objectsEqual ( this . guestOsTimezoneOffset , guestOsTimezoneOffset ) ) ) { this . guestOsTimezoneOffset = guestOsTimezoneOffset ; onPropertyChanged ( new org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ( "TimezoneOffset" ) ) ; } }

Target:
public void setGuestOsTimezoneOffset ( java.lang.Integer guestOsTimezoneOffset ) { if ( ! ( java.util.Objects.equals ( this . guestOsTimezoneOffset , guestOsTimezoneOffset ) ) ) { this . guestOsTimezoneOffset = guestOsTimezoneOffset ; onPropertyChanged ( new org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ( "TimezoneOffset" ) ) ; } }
Source:
protected org.ovirt.engine.core.common.queries.VdcQueryType getProfilesByQosIdQueryType ( ) { return org.ovirt.engine.core.common.queries.VdcQueryType.GetCpuProfilesByCpuQosId ; }

Target:
protected org.ovirt.engine.core.common.queries.VdcQueryType getUsingEntitiesByQosIdQueryType ( ) { return org.ovirt.engine.core.common.queries.VdcQueryType.GetCpuProfilesByCpuQosId ; }
Source:
org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc glusterVolumeRemoveBrickForce ( java.lang.String volumeName , java.lang.String [ ] brickList ) ;

Target:
org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc glusterVolumeRemoveBrickForce ( java.lang.String volumeName , java.lang.String [ ] brickList , int replicCount ) ;
Source:
public void testValidateFieldValueWithEnum ( ) { org.ovirt.engine.core.searchbackend.IConditionFieldAutoCompleter comp = new org.ovirt.engine.core.searchbackend.AuditLogConditionFieldAutoCompleter ( ) ; assertTrue ( "VDC_START" , comp.validateFieldValue ( "TYPE" , "1" ) ) ; assertFalse ( "SOME_RANDOM_TEXT" , comp.validateFieldValue ( "TYPE" , "SOME_RANDOM_TEXT" ) ) ; }

Target:
public void testValidateFieldValueWithEnum ( ) { org.ovirt.engine.core.searchbackend.IConditionFieldAutoCompleter comp = new org.ovirt.engine.core.searchbackend.AuditLogConditionFieldAutoCompleter ( ) ; org.junit.Assert.assertTrue ( "VDC_START" , comp.validateFieldValue ( "TYPE" , "1" ) ) ; org.junit.Assert.assertFalse ( "SOME_RANDOM_TEXT" , comp.validateFieldValue ( "TYPE" , "SOME_RANDOM_TEXT" ) ) ; }
Source:
public void execute ( ) { menuPopup.asPopupPanel ( ) . hide ( ) ; buttonDef.onClick ( selectedItems ) ; }

Target:
public void execute ( ) { menuPopup.asPopupPanel ( ) . hide ( ) ; buttonDef.onClick ( selectedItemsProvider.getSelectedItems ( ) ) ; }
Source:
private static void raiseQueryStartedEvent ( final org.ovirt.engine.core.common.queries.VdcQueryType queryType , final java.lang.String context ) { org.ovirt.engine.ui.frontend.Frontend.raiseQueryEvent ( org.ovirt.engine.ui.frontend.Frontend.getQueryStartedEvent ( ) , queryType , context ) ; }

Target:
private void raiseQueryCompleteEvent ( final java.util.List < org.ovirt.engine.core.common.queries.VdcQueryType > queryTypeList , final java.lang.String context ) { for ( org.ovirt.engine.core.common.queries.VdcQueryType queryType : queryTypeList ) { raiseQueryCompleteEvent ( queryType , context ) ; } }
Source:
private boolean isBond ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface ) { return java.lang.Boolean.TRUE.equals ( iface.getBonded ( ) ) ; }

Target:
private org.ovirt.engine.core.common.businessentities.network.Network existingNetworkRelatedToAttachment ( org.ovirt.engine.core.common.businessentities.network.NetworkAttachment attachment ) { return networkBusinessEntityMap.get ( attachment.getNetworkId ( ) ) ; }
Source:
protected void executeCommand ( ) { org.ovirt.engine.core.bll.network.cluster.NetworkClusterHelper helper = new org.ovirt.engine.core.bll.network.cluster.NetworkClusterHelper ( org.ovirt.engine.core.bll.network.cluster.DetachNetworkFromClusterInternalCommand.getParameters ( ) . getNetworkCluster ( ) ) ; helper.removeNetworkAndReassignRoles ( ) ; org.ovirt.engine.core.bll.network.cluster.DetachNetworkFromClusterInternalCommand.setSucceeded ( true ) ; }

Target:
protected void executeCommand ( ) { networkClusterHelper.removeNetworkAndReassignRoles ( org.ovirt.engine.core.bll.network.cluster.DetachNetworkFromClusterInternalCommand.getParameters ( ) . getNetworkCluster ( ) ) ; org.ovirt.engine.core.bll.network.cluster.DetachNetworkFromClusterInternalCommand.setSucceeded ( true ) ; }
Source:
protected void buildVmUsbDevices ( ) { buildVmUsbControllers ( ) ; buildVmUsbSlots ( ) ; }

Target:
protected void buildVmUsbDevices ( ) { buildVmUsbControllers ( ) ; buildVmUsbSlots ( ) ; buildSmartcardDevice ( ) ; }
Source:
public void canDoActionSucceeds ( ) { cmd = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.gluster.EnableGlusterHookCommand ( new org.ovirt.engine.core.common.action.gluster.GlusterHookParameters ( org.ovirt.engine.core.bll.gluster.EnableGlusterHookCommandTest.CLUSTER_ID , org.ovirt.engine.core.bll.gluster.EnableGlusterHookCommandTest.HOOK_ID ) ) ) ; setupMocks ( ) ; org.junit.Assert.assertTrue ( cmd.canDoAction ( ) ) ; }

Target:
public void canDoActionSucceeds ( ) { cmd = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.gluster.EnableGlusterHookCommand ( new org.ovirt.engine.core.common.action.gluster.GlusterHookParameters ( CLUSTER_ID , HOOK_ID ) ) ) ; setupMocks ( cmd ) ; org.junit.Assert.assertTrue ( cmd.canDoAction ( ) ) ; }
Source:
public void setusage_cpu_percent ( java.lang.Integer value ) { this . mVmStatistics.setusage_cpu_percent ( value ) ; OnPropertyChanged ( new org.ovirt.engine.core.compat.PropertyChangedEventArgs ( "usage_cpu_percent" ) ) ; }

Target:
public void setVmtChildCount ( int value ) { this . vmtchildCount = value ; }
Source:
public void allow36HostWithoutDeployingHostedEngine ( ) { org.ovirt.engine.core.common.businessentities.HostedEngineDeployConfiguration heConfig = new org.ovirt.engine.core.common.businessentities.HostedEngineDeployConfiguration ( HostedEngineDeployConfiguration.Action.NONE ) ; org.junit.Assert.assertThat ( validator.supportsDeployingHostedEngine ( heConfig ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }

Target:
public void allow36HostWithoutDeployingHostedEngine ( ) { org.ovirt.engine.core.common.businessentities.HostedEngineDeployConfiguration heConfig = new org.ovirt.engine.core.common.businessentities.HostedEngineDeployConfiguration ( HostedEngineDeployConfiguration.Action.NONE ) ; org.hamcrest.MatcherAssert.assertThat ( validator.supportsDeployingHostedEngine ( heConfig ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }
Source:
private org.ovirt.engine.core.bll.validator.HostValidator mockHostForProtocol ( org.ovirt.engine.core.common.businessentities.VdsProtocol protocol ) { org.ovirt.engine.core.common.businessentities.VDS host = org.mockito.Mockito.mock ( org.ovirt.engine.core.common.businessentities.VDS.class ) ; org.mockito.Mockito.when ( host.getProtocol ( ) ) . thenReturn ( protocol ) ; return new org.ovirt.engine.core.bll.validator.HostValidator ( dbFacade , host ) ; }

Target:
private org.ovirt.engine.core.bll.validator.HostValidator mockHostForProtocol ( org.ovirt.engine.core.common.businessentities.VdsProtocol protocol ) { org.ovirt.engine.core.common.businessentities.VDS host = org.mockito.Mockito.mock ( org.ovirt.engine.core.common.businessentities.VDS.class ) ; org.mockito.Mockito.when ( host.getProtocol ( ) ) . thenReturn ( protocol ) ; return new org.ovirt.engine.core.bll.validator.HostValidator ( dbFacade , host , hostedEngineHelper ) ; }
Source:
public void testGetDeviceListWithDeviceListAndNoLunsIds ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.LUNs > deviceList = new java.util.LinkedList ( java.util.Collections.singletonList ( new org.ovirt.engine.core.common.businessentities.storage.LUNs ( ) ) ) ; parameters.setDeviceList ( deviceList ) ; org.junit.Assert.assertEquals ( deviceList , command.getDeviceList ( ) ) ; }

Target:
public void testGetDeviceListWithDeviceListAndNoLunsIds ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.LUNs > deviceList = new java.util.LinkedList ( java.util.Collections.singletonList ( new org.ovirt.engine.core.common.businessentities.storage.LUNs ( ) ) ) ; parameters.setDeviceList ( deviceList ) ; org.junit.jupiter.api.Assertions.assertEquals ( deviceList , command.getDeviceList ( ) ) ; }
Source:
public org.ovirt.engine.core.compat.Guid getStorageDomainId ( ) { return getDisk ( ) . getStorageIds ( ) . get ( 0 ) ; }

Target:
public org.ovirt.engine.core.compat.Guid getStorageDomainId ( ) { return org.ovirt.engine.core.bll.storage.CreateCinderSnapshotCommand.getParameters ( ) . getStorageDomainId ( ) ; }
Source:
public org.ovirt.engine.api.model.DataCenters list ( ) { if ( isFiltered ( ) ) { return mapCollection ( getBackendCollection ( QueryType.GetAllStoragePools , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) ) ) ; } else { return mapCollection ( getBackendCollection ( SearchType.StoragePool ) ) ; } }

Target:
public org.ovirt.engine.api.model.DataCenters list ( ) { if ( isFiltered ( ) ) { return mapCollection ( getBackendCollection ( QueryType.GetAllStoragePools , new org.ovirt.engine.core.common.queries.QueryParametersBase ( ) ) ) ; } else { return mapCollection ( getBackendCollection ( SearchType.StoragePool ) ) ; } }
Source:
private org.ovirt.engine.core.common.errors.VdcBllMessages getVNicProfileInUseValidationMessage ( int numberOfEntities ) { boolean singular = numberOfEntities == 1 ; if ( singular ) { return org.ovirt.engine.core.common.errors.VdcBllMessages.ACTION_TYPE_FAILED_VNIC_PROFILE_IN_ONE_USE ; } else { return org.ovirt.engine.core.common.errors.VdcBllMessages.ACTION_TYPE_FAILED_VNIC_PROFILE_IN_MANY_USES ; } }

Target:
private org.ovirt.engine.core.common.errors.EngineMessage getVNicProfileInUseValidationMessage ( int numberOfEntities ) { boolean singular = numberOfEntities == 1 ; if ( singular ) { return org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_VNIC_PROFILE_IN_ONE_USE ; } else { return org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_VNIC_PROFILE_IN_MANY_USES ; } }
Source:
public void testUpdate ( ) { existingOption.setoption_value ( "this is a new value" ) ; dao.update ( existingOption ) ; org.ovirt.engine.core.common.businessentities.VdcOption result = dao.get ( existingOption.getoption_id ( ) ) ; assertEquals ( existingOption , result ) ; }

Target:
public void testUpdate ( ) { existingOption.setoption_value ( "this is a new value" ) ; dao.update ( existingOption ) ; org.ovirt.engine.core.common.businessentities.VdcOption result = dao.get ( existingOption.getoption_id ( ) ) ; org.junit.Assert.assertEquals ( existingOption , result ) ; }
Source:
private void handleOperationException ( org.ovirt.engine.extensions.aaa.builtin.kerberosldap.LdapSearchExceptionHandlingResponse response , java.lang.Throwable throwable , org.ovirt.engine.extensions.aaa.builtin.kerberosldap.LdapCredentials credentials ) { response.setOrderingAlgorithm ( OrderingAlgorithmType.NO_OP ) . setTranslatedException ( new org.ovirt.engine.extensions.aaa.builtin.kerberosldap.AuthenticationResultException ( org.ovirt.engine.core.utils.kerberos.AuthenticationResult.USER_ACCOUNT_DISABLED_OR_LOCKED , throwable ) ) . setTryNextServer ( false ) ; }

Target:
private void handleOperationException ( org.ovirt.engine.extensions.aaa.builtin.kerberosldap.LdapSearchExceptionHandlingResponse response , java.lang.Throwable throwable , org.ovirt.engine.extensions.aaa.builtin.kerberosldap.LdapCredentials credentials ) { response.setOrderingAlgorithm ( OrderingAlgorithmType.NO_OP ) . setTranslatedException ( new org.ovirt.engine.extensions.aaa.builtin.kerberosldap.AuthenticationResultException ( org.ovirt.engine.extensions.aaa.builtin.kerberosldap.utils.kerberos.AuthenticationResult.USER_ACCOUNT_DISABLED_OR_LOCKED , throwable ) ) . setTryNextServer ( false ) ; }
Source:
public org.ovirt.engine.core.common.queries.VdcQueryReturnValue runInternalQuery ( org.ovirt.engine.core.common.queries.VdcQueryType queryType , org.ovirt.engine.core.common.queries.VdcQueryParametersBase queryParameters ) { return runInternalQuery ( queryType , queryParameters , null ) ; }

Target:
public org.ovirt.engine.core.common.queries.QueryReturnValue runInternalQuery ( org.ovirt.engine.core.common.queries.QueryType queryType , org.ovirt.engine.core.common.queries.QueryParametersBase queryParameters ) { return runInternalQuery ( queryType , queryParameters , null ) ; }
Source:
private void initEditors ( ) { statusEditor = new org.ovirt.engine.ui.common.widget.editor.generic.EntityModelLabelEditor ( new org.ovirt.engine.ui.common.widget.renderer.EnumRenderer ( ) , new org.ovirt.engine.ui.common.widget.parser.EntityModelParser ( ) ) ; clientsTable = new org.ovirt.engine.ui.common.widget.editor.EntityModelCellTable < org.ovirt.engine.ui.uicommonweb.models.ListModel > ( false , true ) ; memoryPoolsTable = new org.ovirt.engine.ui.common.widget.editor.EntityModelCellTable < org.ovirt.engine.ui.uicommonweb.models.ListModel > ( false , true ) ; }

Target:
public org.ovirt.engine.core.common.businessentities.gluster.GlusterStatus parse ( java.lang.CharSequence text ) throws java.text.ParseException { return org.ovirt.engine.core.common.businessentities.gluster.GlusterStatus.valueOf ( text.toString ( ) . toUpperCase ( ) ) ; }
Source:
public void setUp ( ) throws java.lang.Exception { initQuery ( getQuery ( ) ) ; for ( org.ovirt.engine.core.utils.MockConfigRule.MockConfigDescriptor < ? > mcd : getExtraConfigDescriptors ( ) ) { org.ovirt.engine.core.bll.AbstractQueryTest.mcr.mockConfigValue ( mcd ) ; } }

Target:
public void setUp ( ) throws java.lang.Exception { initQuery ( getQuery ( ) ) ; for ( org.ovirt.engine.core.utils.MockConfigDescriptor < ? > mcd : getExtraConfigDescriptors ( ) ) { org.ovirt.engine.core.bll.AbstractQueryTest.mcr.mockConfigValue ( mcd ) ; } }
Source:
public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.Set < org.ovirt.engine.core.common.businessentities.SupportedAdditionalClusterFeature > ) ( source ) ) : new java.util.HashSet < org.ovirt.engine.core.common.businessentities.SupportedAdditionalClusterFeature > ( ) ; }

Target:
public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; }
Source:
java.lang.String minMemSizeIs ( int minMemSize ) ;

Target:
java.lang.String memSizeBetween ( int minMemSize , int maxMemSize ) ;
Source:
public void invalidWhenConditionOccursWithVariableReplacements ( ) { org.junit.Assert.assertThat ( org.ovirt.engine.core.bll.ValidationResult.failWith ( org.ovirt.engine.core.bll.ValidationResultTest.ERROR , variableReplacements ) . when ( true ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( org.ovirt.engine.core.bll.ValidationResultTest.ERROR , variableReplacements ) ) ; }

Target:
public void invalidWhenConditionOccursWithVariableReplacements ( ) { org.hamcrest.MatcherAssert.assertThat ( org.ovirt.engine.core.bll.ValidationResult.failWith ( org.ovirt.engine.core.bll.ValidationResultTest.ERROR , variableReplacements ) . when ( true ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( org.ovirt.engine.core.bll.ValidationResultTest.ERROR , variableReplacements ) ) ; }
Source:
public void canDoActionFailsUnsupportedFormat ( ) { sp.setcompatibility_version ( Version.v3_0 ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( cmd , VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_DOMAIN_FORMAT_ILLEGAL_HOST ) ; }

Target:
public void canDoActionFailsUnsupportedFormat ( ) { sp.setCompatibilityVersion ( Version.v3_0 ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( cmd , VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_DOMAIN_FORMAT_ILLEGAL ) ; }
Source:
public boolean getChangePasswordEnabled ( java.util.Map < java.lang.String , java.lang.Object > userInfoMap ) { return true ; }

Target:
public void setUp ( ) throws java.lang.Exception { org.mockito.Mockito.doReturn ( "http://localhost:8080/ovirt-engine/sso/credentials-change.html" ) . when ( testServlet ) . getCredentialsChangeUrl ( org.mockito.ArgumentMatchers.any ( ) ) ; testServlet.setBackend ( mockBackend ) ; testServlet.init ( mockBrandingManager , "/ovirt-engine" ) ; mockBackendQuery ( VdcQueryType.GetConfigurationValue , "oVirtVersion" ) ; org.mockito.Mockito.when ( mockBrandingManager.getBrandingThemes ( ) ) . thenReturn ( new java.util.ArrayList < > ( ) ) ; org.mockito.Mockito.when ( mockBrandingManager.getWelcomeSections ( org.mockito.ArgumentMatchers.any ( java.util.Locale.class ) ) ) . thenReturn ( "Welcome Section HTML" ) ; }
Source:
public void enablePluginInvocation ( ) { canInvokePlugins = true ; for ( org.ovirt.engine.ui.webadmin.plugin.Plugin plugin : getPlugins ( ) ) { initPlugin ( plugin ) ; } }

Target:
public void enablePluginInvocation ( ) { canInvokePlugins = true ; com.google.gwt.core.client.Scheduler.get ( ) . scheduleDeferred ( new com.google.gwt.core.client.Scheduler.ScheduledCommand ( ) { @ java.lang.Override public void execute ( ) { for ( org.ovirt.engine.ui.webadmin.plugin.Plugin plugin : getPlugins ( ) ) { initPlugin ( plugin ) ; } } } ) ; }
Source:
public void setQuotaId ( org.ovirt.engine.core.compat.Guid value ) { this . mVmStatic.setQuotaId ( value ) ; }

Target:
public org.ovirt.engine.core.common.businessentities.QuotaEnforcementTypeEnum getQuotaEnforcementType ( ) { return this . vmStatic.getQuotaEnforcementType ( ) ; }
Source:
public void updateAllDiskImageDynamicWithDiskId ( java.util.Collection < org.ovirt.engine.core.common.businessentities.DiskImageDynamic > diskImageDynamic ) { updateAllInBatch ( "Updatedisk_image_dynamic_by_disk_id" , diskImageDynamic , getBatchImageGroupMapper ( ) ) ; }

Target:
public void updateAllDiskImageDynamicWithDiskIdByVmId ( java.util.Collection < org.ovirt.engine.core.common.utils.Pair < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.DiskImageDynamic > > diskImageDynamicForVm ) { getCallsHandler ( ) . executeStoredProcAsBatch ( "Updatedisk_image_dynamic_by_disk_id_and_vm_id" , diskImageDynamicForVm , getBatchImageGroupMapper ( ) ) ; }
Source:
public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( org.ovirt.engine.core.common.businessentities.StorageDomain ) ( source ) ) : null ; }

Target:
public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( org.ovirt.engine.core.common.businessentities.StorageDomain ) ( source ) ) : null ; }
Source:
public org.ovirt.engine.api.model.Disk lookupEntity ( org.ovirt.engine.core.compat.Guid id ) throws org.ovirt.engine.api.restapi.resource.BackendFailureException { return getEntity ( org.ovirt.engine.api.model.Disk.class , VdcQueryType.GetDiskByDiskId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , id.toString ( ) , false ) ; }

Target:
public org.ovirt.engine.api.model.Disk lookupEntity ( org.ovirt.engine.core.compat.Guid id ) throws org.ovirt.engine.api.restapi.resource.BackendFailureException { return getEntity ( org.ovirt.engine.api.model.Disk.class , QueryType.GetDiskByDiskId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , id.toString ( ) , false ) ; }
Source:
protected java.util.List < Q > getBackendCollection ( org.ovirt.engine.core.common.interfaces.SearchType searchType , java.lang.String constraint ) { return getBackendCollection ( entityType , VdcQueryType.Search , getSearchParameters ( searchType , constraint ) ) ; }

Target:
protected java.util.List < Q > getBackendCollection ( org.ovirt.engine.core.common.interfaces.SearchType searchType , java.lang.String constraint ) { return getBackendCollection ( entityType , QueryType.Search , getSearchParameters ( searchType , constraint ) ) ; }
Source:
public void markAsValid ( ) { if ( editorStateValid ) { super . markAsValid ( ) ; } labelTooltip.setText ( labelConfiguredTooltip ) ; labelTooltip.reconfigure ( ) ; contentWidgetContainerTooltip.setText ( contentWidgetContainerConfiguredTooltip ) ; contentWidgetContainerTooltip.reconfigure ( ) ; }

Target:
public void markAsValid ( ) { if ( editorStateValid ) { super . markAsValid ( ) ; } labelTooltip.setText ( labelConfiguredTooltip ) ; labelTooltip.reconfigure ( ) ; setLabelTooltipStyle ( labelConfiguredTooltip ) ; contentWidgetContainerTooltip.setText ( contentWidgetContainerConfiguredTooltip ) ; contentWidgetContainerTooltip.reconfigure ( ) ; }
Source:
public static java.lang.String cdPathWindowsToLinux ( java.lang.String windowsPath , java.lang.String isoPrefix ) { if ( org.ovirt.engine.core.compat.StringHelper.isNullOrEmpty ( windowsPath ) ) { return windowsPath ; } java.lang.String fileName = org.ovirt.engine.core.compat.backendcompat.Path.GetFileName ( windowsPath ) ; return java.lang.String.format ( "%1$s/%2$s" , isoPrefix , fileName ) ; }

Target:
public static java.lang.String cdPathWindowsToLinux ( java.lang.String windowsPath , java.lang.String isoPrefix ) { if ( org.apache.commons.lang.StringUtils.isEmpty ( windowsPath ) ) { return windowsPath ; } java.lang.String fileName = org.ovirt.engine.core.compat.backendcompat.Path.GetFileName ( windowsPath ) ; return java.lang.String.format ( "%1$s/%2$s" , isoPrefix , fileName ) ; }
Source:
public org.ovirt.engine.core.bll.ValidationResult validateStatus ( org.ovirt.engine.core.common.businessentities.VDSStatus vdsStatus , org.ovirt.engine.core.common.errors.VdcBllMessages hostStatus ) { return vdsStatus == ( vds.getStatus ( ) ) ? ValidationResult.VALID : new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.ACTION_TYPE_FAILED_VDS_STATUS_ILLEGAL , hostStatus.toString ( ) ) ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult validateStatus ( org.ovirt.engine.core.common.businessentities.VDSStatus vdsStatus , org.ovirt.engine.core.common.errors.EngineMessage hostStatus ) { return vdsStatus == ( vds.getStatus ( ) ) ? ValidationResult.VALID : new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_VDS_STATUS_ILLEGAL , hostStatus.toString ( ) ) ; }
Source:
private boolean isFencingPolicySupported ( org.ovirt.engine.core.common.businessentities.VDS proxyCandidate , org.ovirt.engine.core.compat.Version minimalSupportedVersion ) { return proxyCandidate.getSupportedClusterVersionsSet ( ) . contains ( minimalSupportedVersion ) ; }

Target:
protected int getFindFenceProxyRetries ( ) { return java.lang.Math.max ( org.ovirt.engine.core.common.config.Config.< java.lang.Integer > getValue ( ConfigValues.FindFenceProxyRetries ) , 1 ) ; }
Source:
public void setErrorMessage ( java.lang.String text ) { errorMessage.setText ( text ) ; errorMessage.setVisible ( ( text != null ) ) ; if ( errorMessage.isVisible ( ) ) { errorMessagePanel.setVisible ( true ) ; setToolTipPositionAndShow ( ) ; } }

Target:
public void setErrorMessageHtml ( java.lang.String text ) { setErrorMessageLabel ( errorMessage , text ) ; errorMessage.setVisible ( ( text != null ) ) ; if ( errorMessage.isVisible ( ) ) { errorMessagePanel.setVisible ( true ) ; setToolTipPositionAndShow ( ) ; } }
Source:
public void updateJobLastUpdateTime ( org.ovirt.engine.core.compat.Guid jobId , java.util.Date lastUpdateTime ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) . addValue ( "job_id" , jobId ) . addValue ( "last_update_time" , lastUpdateTime ) ; getCallsHandler ( ) . executeModification ( "UpdateJobLastUpdateTime" , parameterSource ) ; }

Target:
public void updateJobLastUpdateTime ( org.ovirt.engine.core.compat.Guid jobId , java.util.Date lastUpdateTime ) { org.ovirt.engine.core.common.job.Job job = get ( jobId ) ; job.setLastUpdateTime ( lastUpdateTime ) ; update ( job ) ; }
Source:
public void addColumnAndSetWidth ( com.google.gwt.user.cellview.client.Column < T , ? > column , com.google.gwt.safehtml.shared.SafeHtml headerHtml , java.lang.String width ) { addColumn ( column , headerHtml ) ; setColumnWidth ( column , width ) ; }

Target:
public void addColumn ( com.google.gwt.user.cellview.client.Column < T , ? > column , java.lang.String headerText ) { com.google.gwt.user.cellview.client.Header < ? > header = new org.ovirt.engine.ui.common.widget.table.header.SafeHtmlHeader ( com.google.gwt.safehtml.shared.SafeHtmlUtils.fromString ( headerText ) ) ; addColumn ( column , header ) ; }
Source:
protected java.lang.String getProgressText ( org.ovirt.engine.core.common.businessentities.VDS object ) { int numOfActiveVMs = ( ( object.getvm_active ( ) ) != null ) ? object.getvm_active ( ) : 0 ; return numOfActiveVMs + " VMs" ; }

Target:
protected java.lang.String getProgressText ( 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 ( object.getvm_active ( ) ) ; }
Source:
public org.ovirt.engine.api.model.Group get ( ) { return performGet ( VdcQueryType.GetDbGroupById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( guid ) , org.ovirt.engine.api.model.BaseResource.class ) ; }

Target:
public org.ovirt.engine.api.model.Group get ( ) { return performGet ( QueryType.GetDbGroupById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( guid ) , org.ovirt.engine.api.model.BaseResource.class ) ; }
Source:
public void testgetAllConnectableStorageSeverConnectionl ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.StorageServerConnections > result = dao.getAllConnectableStorageSeverConnection ( org.ovirt.engine.core.dao.StorageServerConnectionDAOTest.EXISTING_STORAGE_POOL_ID ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertFalse ( result.isEmpty ( ) ) ; }

Target:
public void testGetAllConnectableStorageSeverConnections ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.StorageServerConnections > result = dao.getAllConnectableStorageSeverConnection ( org.ovirt.engine.core.dao.StorageServerConnectionDAOTest.EXISTING_STORAGE_POOL_ID ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertFalse ( result.isEmpty ( ) ) ; }
Source:
public void removeTabWidget ( com.google.gwt.user.client.ui.IsWidget tabWidget ) { widgetBar.remove ( tabWidget ) ; com.google.gwt.user.client.ui.Widget listWidget = copyWidgetAsDropdownItem ( tabWidget ) ; if ( listWidget != null ) { dropdownPanel.remove ( listWidget ) ; } recalculateWidgetBarMinWidth ( ) ; showScrollButtons ( ) ; }

Target:
public void removeTabWidget ( com.google.gwt.user.client.ui.IsWidget tabWidget ) { int widgetIndex = widgetBar.getWidgetIndex ( tabWidget ) ; widgetBar.remove ( tabWidget ) ; dropdownPanel.remove ( widgetIndex ) ; recalculateWidgetBarMinWidth ( ) ; showScrollButtons ( ) ; }
Source:
protected boolean canDoAction ( ) { boolean retValue = true ; if ( org.apache.commons.lang.StringUtils.isBlank ( org.ovirt.engine.core.bll.AddJobCommand.getParameters ( ) . getDescription ( ) ) ) { addCanDoActionMessage ( VdcBllMessages.ACTION_TYPE_EMPTY_DESCRIPTION ) ; retValue = false ; } return retValue ; }

Target:
protected boolean canDoAction ( ) { boolean retValue = true ; if ( org.apache.commons.lang.StringUtils.isBlank ( org.ovirt.engine.core.bll.AddJobCommand.getParameters ( ) . getDescription ( ) ) ) { addCanDoActionMessage ( EngineMessage.ACTION_TYPE_EMPTY_DESCRIPTION ) ; retValue = false ; } return retValue ; }
Source:
public void testGetObjectIdConsistentForSameObject ( ) { java.lang.Object obj = new java.lang.Object ( ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.core.utils.log.LoggedUtils.getObjectId ( obj ) , org.ovirt.engine.core.utils.log.LoggedUtils.getObjectId ( obj ) ) ; }

Target:
public void testGetObjectIdConsistentForSameObject ( ) { java.lang.Object obj = new java.lang.Object ( ) ; org.junit.jupiter.api.Assertions.assertEquals ( org.ovirt.engine.core.utils.log.LoggedUtils.getObjectId ( obj ) , org.ovirt.engine.core.utils.log.LoggedUtils.getObjectId ( obj ) ) ; }
Source:
public int compare ( org.ovirt.engine.core.common.businessentities.VmDevice device1 , org.ovirt.engine.core.common.businessentities.VmDevice device2 ) { return ( toSortingIndex ( device1 ) ) - ( toSortingIndex ( device2 ) ) ; }

Target:
public int compare ( org.ovirt.engine.ui.uicommonweb.models.vms.VmDeviceFeEntity device1 , org.ovirt.engine.ui.uicommonweb.models.vms.VmDeviceFeEntity device2 ) { return ( toSortingIndex ( device1 ) ) - ( toSortingIndex ( device2 ) ) ; }
Source:
public boolean connectHostToDomainsInActiveOrUnknownStatus ( org.ovirt.engine.core.common.businessentities.VDS vds ) { org.ovirt.engine.core.common.action.ConnectHostToStoragePoolServersParameters params = new org.ovirt.engine.core.common.action.ConnectHostToStoragePoolServersParameters ( vds , false ) ; return backend.runInternalAction ( VdcActionType.ConnectHostToStoragePoolServers , params ) . getSucceeded ( ) ; }

Target:
public boolean connectHostToDomainsInActiveOrUnknownStatus ( org.ovirt.engine.core.common.businessentities.VDS vds ) { org.ovirt.engine.core.common.businessentities.StoragePool sp = storagePoolDao.get ( vds.getStoragePoolId ( ) ) ; org.ovirt.engine.core.common.action.ConnectHostToStoragePoolServersParameters params = new org.ovirt.engine.core.common.action.ConnectHostToStoragePoolServersParameters ( sp , vds , false ) ; return backend.runInternalAction ( VdcActionType.ConnectHostToStoragePoolServers , params ) . getSucceeded ( ) ; }
Source:
public void testJsonNullDiskDescription ( ) throws java.io.IOException { disk.setDiskAlias ( "DiskAlias" ) ; disk.setDiskDescription ( null ) ; assertDiskDescriptionMap ( disk ) ; }

Target:
public void testJsonNullDiskDescription ( ) throws java.io.IOException { disk.setDiskAlias ( "DiskAlias" ) ; disk.setDiskDescription ( null ) ; assertDiskDescriptionMap ( disk , org.ovirt.engine.core.bll.MetadataDiskDescriptionHandlerTest.generateDiskAliasJsonEntry ( "DiskAlias" ) , org.ovirt.engine.core.bll.MetadataDiskDescriptionHandlerTest.generateDiskDescriptionJsonEntry ( "" ) ) ; }
Source:
public void testOnlyLoginNameWhenNoDirectorySet ( ) { org.ovirt.engine.core.common.users.VdcUser user = new org.ovirt.engine.core.common.users.VdcUser ( ) ; user.setUserName ( "Legolas" ) ; user.setDomainControler ( "" ) ; command.setCurrentUser ( user ) ; junit.framework.Assert.assertEquals ( command.getConsoleUserName ( ) , "Legolas" ) ; }

Target:
public void testOnlyLoginNameWhenNoDirectorySet ( ) { org.ovirt.engine.core.common.businessentities.DbUser user = new org.ovirt.engine.core.common.businessentities.DbUser ( ) ; user.setLoginName ( "Legolas" ) ; user.setDomain ( "" ) ; command.setCurrentUser ( user ) ; junit.framework.Assert.assertEquals ( command.getConsoleUserName ( ) , "Legolas" ) ; }
Source:
protected org.ovirt.engine.core.common.queries.VdcQueryReturnValue runQueryImpl ( org.ovirt.engine.core.common.queries.VdcQueryType actionType , org.ovirt.engine.core.common.queries.VdcQueryParametersBase parameters , boolean isPerformUserCheck ) { return runQueryImpl ( actionType , parameters , isPerformUserCheck , null ) ; }

Target:
public java.util.List < org.ovirt.engine.core.common.action.ActionReturnValue > runMultipleActions ( org.ovirt.engine.core.common.action.ActionType actionType , java.util.List < org.ovirt.engine.core.common.action.ActionParametersBase > parameters , boolean isRunOnlyIfAllValidationPass ) { return runMultipleActions ( actionType , parameters , isRunOnlyIfAllValidationPass , false ) ; }
Source:
private boolean verifyDisksIfNeeded ( ) { if ( ( ! ( getParameters ( ) . isImportAsNewEntity ( ) ) ) && ( ! ( org.ovirt.engine.core.bll.ImportVmCommand.isImagesAlreadyOnTarget ( ) ) ) ) { return checkIfDisksExist ( imageList ) ; } return true ; }

Target:
private boolean isBalloonDeviceExists ( java.util.Collection < org.ovirt.engine.core.common.businessentities.VmDevice > devices ) { for ( org.ovirt.engine.core.common.businessentities.VmDevice vmDevice : getVm ( ) . getManagedVmDeviceMap ( ) . values ( ) ) { if ( org.ovirt.engine.core.common.utils.VmDeviceCommonUtils.isMemoryBalloon ( vmDevice ) ) { return true ; } } return false ; }
Source:
public int remove ( org.ovirt.engine.core.compat.Guid id ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) . addValue ( "task_id" , id ) ; return getCallsHandler ( ) . executeModificationRowsAffected ( "Deleteasync_tasks" , parameterSource ) ; }

Target:
public int remove ( org.ovirt.engine.core.compat.Guid id ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) . addValue ( "task_id" , id ) ; return getCallsHandler ( ) . executeModificationReturnResult ( "Deleteasync_tasks" , parameterSource ) ; }
Source:
private void removeLunDisks ( ) { java.util.List < org.ovirt.engine.core.bll.LunDisk > lunDisks = org.ovirt.engine.core.bll.ImagesHandler.filterDiskBasedOnLuns ( org.ovirt.engine.core.bll.RemoveVmCommand.getVm ( ) . getDiskMap ( ) . values ( ) ) ; for ( org.ovirt.engine.core.bll.LunDisk lunDisk : lunDisks ) { org.ovirt.engine.core.bll.ImagesHandler.removeLunDisk ( lunDisk ) ; } }

Target:
private void removeLunDisks ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.LunDisk > lunDisks = org.ovirt.engine.core.bll.ImagesHandler.filterDiskBasedOnLuns ( org.ovirt.engine.core.bll.RemoveVmCommand.getVm ( ) . getDiskMap ( ) . values ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.LunDisk lunDisk : lunDisks ) { org.ovirt.engine.core.bll.ImagesHandler.removeLunDisk ( lunDisk ) ; } }
Source:
public void onClick ( com.google.gwt.event.dom.client.ClickEvent event ) { ( ( org.ovirt.engine.ui.common.widget.AddRemoveRowWidget < M , T , V > . AddRemoveRowPanel ) ( widget.getParent ( ) ) ) . swapButton ( createButton ( item ) ) ; addGhostEntry ( ) ; onAdd ( value , widget ) ; }

Target:
public void onClick ( com.google.gwt.event.dom.client.ClickEvent event ) { getEntry ( widget ) . swapButton ( createButton ( item ) ) ; org.ovirt.engine.core.common.utils.Pair < T , V > item = addGhostEntry ( ) ; onAdd ( item.getFirst ( ) , item.getSecond ( ) ) ; }
Source:
public void testGetWithInvalidId ( ) { org.ovirt.engine.core.common.businessentities.StorageDomain result = dao.get ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) ) ; org.junit.Assert.assertNull ( result ) ; }

Target:
public void testGetWithInvalidId ( ) { org.ovirt.engine.core.common.businessentities.StorageDomain result = dao.get ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; org.junit.Assert.assertNull ( result ) ; }
Source:
public void createPool ( org.ovirt.engine.core.common.businessentities.MacPool macPool ) { try ( org.ovirt.engine.core.utils.lock.AutoCloseableLock lock = writeLockResource ( ) ) { createPoolWithoutLocking ( macPool ) ; } }

Target:
public void createPool ( org.ovirt.engine.core.bll.network.macpool.MacPool macPool ) { try ( org.ovirt.engine.core.utils.lock.AutoCloseableLock lock = writeLockResource ( ) ) { createPoolWithoutLocking ( macPool ) ; } }
Source:
public static java.lang.String map ( org.ovirt.engine.core.common.businessentities.VolumeFormat volumeFormat , java.lang.String template ) { switch ( volumeFormat ) { case COW : return DiskFormat.COW.value ( ) ; case RAW : return DiskFormat.RAW.value ( ) ; default : return null ; } }

Target:
public static java.lang.String map ( org.ovirt.engine.core.common.businessentities.storage.VolumeFormat volumeFormat , java.lang.String template ) { switch ( volumeFormat ) { case COW : return DiskFormat.COW.value ( ) ; case RAW : return DiskFormat.RAW.value ( ) ; default : return null ; } }
Source:
private org.ovirt.engine.core.vdsbroker.vdsbroker.HostNetworkAttachmentsPersister createLegacyPersister ( java.util.List < org.ovirt.engine.core.common.businessentities.network.NetworkAttachment > userNetworkAttachments ) { return createLegacyPersister ( userNetworkAttachments , interfaceWithAttachedClusterNetworkA , interfaceWithoutAttachedNetwork ) ; }

Target:
private org.ovirt.engine.core.vdsbroker.vdsbroker.HostNetworkAttachmentsPersister createPersister ( java.util.List < org.ovirt.engine.core.common.businessentities.network.NetworkAttachment > userNetworkAttachments , org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface ... hostInterfaces ) { return createPersister ( userNetworkAttachments , java.util.Collections.emptySet ( ) , hostInterfaces ) ; }
Source:
public void setSystemTreeSelectedItem ( org.ovirt.engine.ui.uicommonweb.models.SystemTreeItemModel value ) { systemTreeSelectedItem = value ; OnPropertyChanged ( new org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ( "SystemTreeSelectedItem" ) ) ; }

Target:
public void setSystemTreeSelectedItem ( org.ovirt.engine.ui.uicommonweb.models.SystemTreeItemModel value ) { systemTreeSelectedItem = value ; onPropertyChanged ( new org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ( "SystemTreeSelectedItem" ) ) ; }
Source:
public void error ( java.lang.Object msg , java.lang.Throwable t ) { log.error ( addPrefixToLogMessage ( msg ) , t ) ; }

Target:
public void error ( java.lang.Object msg , java.lang.Throwable t ) { log.error ( convertToString ( msg ) , t ) ; }