auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void calculateNetworkImplementationDetailsNetworkIsSyncWithMtuUnset ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface = createNetworkDevice ( ) ; calculateNetworkImplementationDetailsAndAssertSync ( iface , true , iface.getNetworkName ( ) , iface.isBridged ( ) , 0 , iface.getVlanId ( ) , createQos ( ) ) ; }

Target:
public void calculateNetworkImplementationDetailsNetworkDefaultMtuOutOfSync ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface = createNetworkDevice ( ) ; calculateNetworkImplementationDetailsAndAssertSync ( iface , false , iface.getNetworkName ( ) , iface.isBridged ( ) , 0 , iface.getVlanId ( ) , createQos ( ) ) ; }
Source:
protected org.ovirt.engine.core.common.businessentities.VolumeFormat getRawValue ( org.ovirt.engine.core.common.businessentities.DiskImage object ) { return object.getvolume_format ( ) ; }

Target:
protected java.lang.Long getRawValue ( org.ovirt.engine.core.common.businessentities.DiskImage object ) { return java.lang.Math.round ( object.getActualDiskWithSnapshotsSize ( ) ) ; }
Source:
protected void setActionMessageParameters ( ) { addCanDoActionMessage ( ( ( org.ovirt.engine.core.bll.network.vm.ActivateDeactivateVmNicCommand.getParameters ( ) . getAction ( ) ) == ( org.ovirt.engine.core.common.action.PlugAction.PLUG ) ? org.ovirt.engine.core.common.errors.EngineMessage.VAR__ACTION__ACTIVATE : org.ovirt.engine.core.common.errors.EngineMessage.VAR__ACTION__DEACTIVATE ) ) ; addCanDoActionMessage ( EngineMessage.VAR__TYPE__INTERFACE ) ; }

Target:
private void clearPassthroughData ( java.lang.String vfToUse ) { if ( vfToUse != null ) { networkDeviceHelper.setVmIdOnVfs ( org.ovirt.engine.core.bll.network.vm.ActivateDeactivateVmNicCommand.getVdsId ( ) , null , java.util.Collections.singleton ( vfToUse ) ) ; } }
Source:
protected void onEntityChanged ( ) { super . onEntityChanged ( ) ; if ( ( getEntity ( ) ) != null ) { isEntityChanged = true ; getSearchCommand ( ) . Execute ( ) ; } }

Target:
protected void onEntityChanged ( ) { super . onEntityChanged ( ) ; if ( ( getEntity ( ) ) != null ) { isEntityChanged = true ; getSearchCommand ( ) . execute ( ) ; } }
Source:
protected void updateCustomPropertySheet ( org.ovirt.engine.core.compat.Version clusterVersion ) { getModel ( ) . getCustomPropertySheet ( ) . setKeyValueString ( getModel ( ) . getCustomPropertiesKeysList ( ) . get ( clusterVersion ) ) ; }

Target:
protected void updateCustomPropertySheet ( org.ovirt.engine.core.compat.Version clusterVersion ) { getModel ( ) . getCustomPropertySheet ( ) . setKeyValueMap ( getModel ( ) . getCustomPropertiesKeysList ( ) . get ( clusterVersion ) ) ; }
Source:
private void assertCorrectGetAllResult ( java.util.List < org.ovirt.engine.core.common.businessentities.Cluster > result ) { org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertFalse ( result.isEmpty ( ) ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.core.dao.ClusterDaoTest.NUMBER_OF_GROUPS , result.size ( ) ) ; }

Target:
private void assertCorrectGetAllResult ( java.util.List < org.ovirt.engine.core.common.businessentities.Cluster > result ) { org.junit.jupiter.api.Assertions.assertNotNull ( result ) ; org.junit.jupiter.api.Assertions.assertFalse ( result.isEmpty ( ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( org.ovirt.engine.core.dao.ClusterDaoTest.NUMBER_OF_GROUPS , result.size ( ) ) ; }
Source:
public void testHasPeersFalse ( ) { org.mockito.Mockito.doReturn ( org.ovirt.engine.core.bll.utils.GlusterUtilTest.OUTPUT_XML_NO_PEERS ) . when ( glusterUtil ) . executePeerStatusCommand ( client ) ; org.junit.Assert.assertTrue ( glusterUtil.getPeers ( client ) . isEmpty ( ) ) ; }

Target:
public void testHasPeersFalse ( ) { org.mockito.Mockito.doReturn ( org.ovirt.engine.core.bll.utils.GlusterUtilTest.OUTPUT_XML_NO_PEERS ) . when ( glusterUtil ) . executePeerStatusCommand ( client ) ; org.junit.jupiter.api.Assertions.assertTrue ( glusterUtil.getPeers ( client ) . isEmpty ( ) ) ; }
Source:
public java.util.List < java.lang.String > getLunIds ( ) { if ( ( lunIds ) == null ) { lunIds = new java.util.ArrayList < > ( ) ; } return lunIds ; }

Target:
public java.util.Set < java.lang.String > getLunIds ( ) { if ( ( lunIds ) == null ) { lunIds = new java.util.HashSet < > ( ) ; } return lunIds ; }
Source:
public void ExecuteCommand ( org.ovirt.engine.ui.uicommonweb.UICommand uiCommand , java.lang.Object ... parameters ) { ProxyDown ( ) ; }

Target:
public void executeCommand ( org.ovirt.engine.ui.uicommonweb.UICommand command ) { proxyUp ( ) ; }
Source:
public org.ovirt.engine.core.bll.ValidationResult vmNetworkSetCorrectly ( ) { return org.ovirt.engine.core.bll.ValidationResult.failWith ( EngineMessage.NON_VM_NETWORK_NOT_SUPPORTED_FOR_POOL_LEVEL ) . unless ( ( ( network.isVmNetwork ( ) ) || ( org.ovirt.engine.core.common.FeatureSupported.nonVmNetwork ( getDataCenter ( ) . getCompatibilityVersion ( ) ) ) ) ) ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult networkNotUsedByVms ( java.util.Collection < java.lang.String > vmNames ) { return new org.ovirt.engine.core.bll.validator.NetworkValidator.PluralMessages ( org.ovirt.engine.core.common.errors.EngineMessage.VAR__ENTITIES__VM , org.ovirt.engine.core.common.errors.EngineMessage.VAR__ENTITIES__VMS ) . getNetworkInUse ( vmNames ) ; }
Source:
public void testIsDomainExistAndActiveDomainNotExists ( ) { validator = new org.ovirt.engine.core.bll.validator.storage.StorageDomainValidator ( null ) ; org.junit.Assert.assertEquals ( "Wrong failure for null domain" , VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_DOMAIN_NOT_EXIST , validator.isDomainExistAndActive ( ) . getMessage ( ) ) ; }

Target:
public void testIsDomainExistAndActiveDomainNotExists ( ) { validator = new org.ovirt.engine.core.bll.validator.storage.StorageDomainValidator ( null ) ; org.junit.Assert.assertEquals ( "Wrong failure for null domain" , EngineMessage.ACTION_TYPE_FAILED_STORAGE_DOMAIN_NOT_EXIST , validator.isDomainExistAndActive ( ) . getMessage ( ) ) ; }
Source:
public void testIsNetworkInSyncWhenStaticBootProtocolAddressEqual ( ) throws java.lang.Exception { initIpConfigurationBootProtocolAddress ( org.ovirt.engine.core.utils.NetworkInSyncWithVdsNetworkInterfaceTest.BOOT_PROTOCOL , true ) ; org.junit.Assert.assertThat ( createTestedInstance ( ) . isNetworkInSync ( ) , org.hamcrest.CoreMatchers.is ( true ) ) ; }

Target:
private void initIpv4ConfigurationBootProtocolAddress ( org.ovirt.engine.core.common.businessentities.network.Ipv4BootProtocol networkBootProtocol , boolean syncAddress ) { initIpv4ConfigurationStaticBootProtocol ( networkBootProtocol ) ; ipv4Address.setAddress ( org.ovirt.engine.core.utils.NetworkInSyncWithVdsNetworkInterfaceTest.IPV4_ADDRESS ) ; iface.setIpv4Address ( ( syncAddress ? org.ovirt.engine.core.utils.NetworkInSyncWithVdsNetworkInterfaceTest.IPV4_ADDRESS : null ) ) ; }
Source:
public java.lang.String getUserdefinedVMProperties ( org.ovirt.engine.core.compat.Version version ) { return org.ovirt.engine.core.common.config.Config.getValue ( ConfigValues.UserDefinedVMProperties , version.getValue ( ) ) ; }

Target:
public java.lang.String getUserDefinedVMProperties ( org.ovirt.engine.core.compat.Version version ) { return org.ovirt.engine.core.common.config.Config.getValue ( ConfigValues.UserDefinedVMProperties , version.getValue ( ) ) ; }
Source:
public void moveDiskToGluster ( ) { initializeCommand ( new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ) ; initSrcStorageDomain ( ) ; initDestStorageDomain ( StorageType.GLUSTERFS ) ; initVmDiskImage ( false ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateSuccess ( command ) ; }

Target:
public void moveDiskToGluster ( ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage disk = new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ; initializeCommand ( disk , VmEntityType.VM ) ; initSrcStorageDomain ( ) ; initDestStorageDomain ( StorageType.GLUSTERFS ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateSuccess ( command ) ; }
Source:
private void editInstanceType ( ) { createWindow ( new org.ovirt.engine.ui.uicommonweb.models.vms.instancetypes.ExistingInstanceTypeModelBehavior ( ( ( org.ovirt.engine.core.common.businessentities.InstanceType ) ( getSelectedItem ( ) ) ) ) , "edit_instance_type" , "OnEditInstanceType" , false , org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getConstants ( ) . editInstanceTypeTitle ( ) , HelpTag.edit_instance_type ) ; }

Target:
private void editInstanceType ( ) { createWindow ( new org.ovirt.engine.ui.uicommonweb.models.vms.instancetypes.ExistingNonClusterModelBehavior ( ( ( org.ovirt.engine.core.common.businessentities.VmTemplate ) ( getSelectedItem ( ) ) ) ) , "edit_instance_type" , "OnEditInstanceType" , false , org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getConstants ( ) . editInstanceTypeTitle ( ) , HelpTag.edit_instance_type ) ; }
Source:
public java.util.List < org.ovirt.engine.core.common.businessentities.VmTemplate > getTemplatesUsingProfile ( ) { return getDbFacade ( ) . getVmTemplateDao ( ) . getAllForCpuProfile ( getProfile ( ) . getId ( ) ) ; }

Target:
public java.util.List < org.ovirt.engine.core.common.businessentities.VmTemplate > getTemplatesUsingProfile ( ) { return vmTemplateDao.getAllForCpuProfile ( getProfile ( ) . getId ( ) ) ; }
Source:
protected org.ovirt.engine.core.common.businessentities.Provider < ? > generateNewEntity ( ) { org.ovirt.engine.core.common.businessentities.Provider < org.ovirt.engine.core.common.businessentities.Provider.AdditionalProperties > provider = new org.ovirt.engine.core.common.businessentities.Provider ( ) ; provider.setId ( generateNonExistingId ( ) ) ; provider.setName ( "brovider" ) ; provider.setUrl ( "http://brovider.com/" ) ; provider.setType ( ProviderType.OPENSTACK_NETWORK ) ; org.ovirt.engine.core.common.businessentities.OpenstackNetworkProviderProperties additionalProperties = new org.ovirt.engine.core.common.businessentities.OpenstackNetworkProviderProperties ( ) ; additionalProperties.setTenantName ( "10ant" ) ; additionalProperties.setPluginType ( OpenstackNetworkPluginType.LINUX_BRIDGE.name ( ) ) ; provider.setAdditionalProperties ( additionalProperties ) ; provider.setAuthUrl ( "http://keystone-server:35357/v2.0/" ) ; return provider ; }

Target:
protected org.ovirt.engine.core.common.businessentities.Provider < ? > generateNewEntity ( ) { org.ovirt.engine.core.common.businessentities.Provider < org.ovirt.engine.core.common.businessentities.Provider.AdditionalProperties > provider = new org.ovirt.engine.core.common.businessentities.Provider ( ) ; provider.setId ( generateNonExistingId ( ) ) ; provider.setName ( "brovider" ) ; provider.setUrl ( "http://brovider.com/" ) ; provider.setType ( ProviderType.OPENSTACK_NETWORK ) ; org.ovirt.engine.core.common.businessentities.OpenstackNetworkProviderProperties additionalProperties = new org.ovirt.engine.core.common.businessentities.OpenstackNetworkProviderProperties ( ) ; additionalProperties.setReadOnly ( java.lang.Boolean.FALSE ) ; additionalProperties.setTenantName ( "10ant" ) ; additionalProperties.setPluginType ( OpenstackNetworkPluginType.LINUX_BRIDGE.name ( ) ) ; provider.setAdditionalProperties ( additionalProperties ) ; provider.setAuthUrl ( "http://keystone-server:35357/v2.0/" ) ; return provider ; }
Source:
public void setEnabled ( boolean enabled ) { getLabel ( ) . setEnabled ( enabled ) ; if ( enabled ) { tooltip.setText ( "" ) ; } }

Target:
public boolean isEnabled ( ) { return label.isEnabled ( ) ; }
Source:
public java.lang.String getValue ( java.lang.Object object ) { int numOfCpus = getEntity ( object ) . getNumOfCpus ( ) ; return java.lang.String.valueOf ( numOfCpus ) ; }

Target:
public java.lang.String getValue ( org.ovirt.engine.ui.uicommonweb.models.vms.ImportVmData importVmData ) { int numOfCpus = importVmData.getVm ( ) . getNumOfCpus ( ) ; return java.lang.String.valueOf ( numOfCpus ) ; }
Source:
private void mockStorageDomainSpaceCheckerRequest ( org.ovirt.engine.core.common.businessentities.storage_domains domain , boolean succeeded ) { org.powermock.api.mockito.PowerMockito.when ( org.ovirt.engine.core.bll.command.utils.StorageDomainSpaceChecker.hasSpaceForRequest ( org.mockito.Matchers.eq ( domain ) , org.mockito.Matchers.anyInt ( ) ) ) . thenReturn ( succeeded ) ; }

Target:
private void mockStorageDomainSpaceCheckerRequest ( org.ovirt.engine.core.common.businessentities.storage_domains domain , boolean succeeded ) { org.mockito.Mockito.doReturn ( succeeded ) . when ( command ) . doesStorageDomainhaveSpaceForRequest ( domain ) ; }
Source:
public void testGetAllForVdsWithInvalidVds ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.tags > result = dao.getAllForVds ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) . getUuid ( ) . toString ( ) ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertTrue ( result.isEmpty ( ) ) ; }

Target:
public void testGetAllForVdsWithInvalidVds ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.tags > result = dao.getAllForVds ( org.ovirt.engine.core.compat.Guid.newGuid ( ) . getUuid ( ) . toString ( ) ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertTrue ( result.isEmpty ( ) ) ; }
Source:
protected boolean isAdminUser ( ) { return org.ovirt.engine.core.bll.MultiLevelAdministrationHandler.isAdminUser ( org.ovirt.engine.core.bll.GetAllRolesQuery.getUser ( ) ) ; }

Target:
protected boolean isAdminUser ( ) { return multiLevelAdministrationHandler.isAdminUser ( org.ovirt.engine.core.bll.GetAllRolesQuery.getUser ( ) ) ; }
Source:
public static java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > getWatchdogs ( org.ovirt.engine.core.compat.Guid vmId ) { return org.ovirt.engine.core.bll.utils.VmDeviceUtils.dao.getVmDeviceByVmIdAndType ( vmId , VmDeviceGeneralType.WATCHDOG ) ; }

Target:
public static java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > getMemoryBalloons ( org.ovirt.engine.core.compat.Guid vmId ) { return org.ovirt.engine.core.bll.utils.VmDeviceUtils.vmDeviceDao.getVmDeviceByVmIdAndType ( vmId , VmDeviceGeneralType.BALLOON ) ; }
Source:
protected java.util.List < org.ovirt.engine.core.common.businessentities.tags > GetTagsAttachedToObject ( ) { return org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getTagDAO ( ) . getAllForVmPools ( org.ovirt.engine.core.bll.VmPoolCommandBase.getParameters ( ) . getVmPoolId ( ) . toString ( ) ) ; }

Target:
protected java.util.List < org.ovirt.engine.core.common.businessentities.tags > getTagsAttachedToObject ( ) { return org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getTagDao ( ) . getAllForVmPools ( org.ovirt.engine.core.bll.VmPoolCommandBase.getParameters ( ) . getVmPoolId ( ) . toString ( ) ) ; }
Source:
public boolean evaluate ( java.lang.Object o ) { org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain = ( ( org.ovirt.engine.core.common.businessentities.StorageDomain ) ( o ) ) ; return ( storageDomain.getStorageType ( ) . isCinderDomain ( ) ) && ( ( storageDomain.getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.StorageDomainStatus.Active ) ) ; }

Target:
public boolean evaluate ( java.lang.Object o ) { org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain = ( ( org.ovirt.engine.core.common.businessentities.StorageDomain ) ( o ) ) ; return ( ( storageDomain.getStorageType ( ) ) == storageType ) && ( ( storageDomain.getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.StorageDomainStatus.Active ) ) ; }
Source:
public void emptyStringMakesEmptyMap ( ) { final java.lang.String empty = "" ; java.util.Map < java.lang.String , java.lang.String > map = org.ovirt.engine.core.common.businessentities.VdsStatic.PmOptionsStringToMap ( empty ) ; mapIsEmpty ( map ) ; }

Target:
public void emptyStringMakesEmptyMap ( ) { final java.lang.String empty = "" ; java.util.Map < java.lang.String , java.lang.String > map = org.ovirt.engine.core.common.businessentities.VdsStatic.pmOptionsStringToMap ( empty ) ; mapIsEmpty ( map ) ; }
Source:
public void testIsNetworkInSyncWhenStaticBootProtocolNetmaskEqual ( ) throws java.lang.Exception { initIpConfigurationBootProtocolNetmask ( org.ovirt.engine.core.utils.NetworkInSyncWithVdsNetworkInterfaceTest.BOOT_PROTOCOL , true ) ; org.junit.Assert.assertThat ( createTestedInstance ( ) . isNetworkInSync ( ) , org.hamcrest.CoreMatchers.is ( true ) ) ; }

Target:
public void testIsNetworkInSyncWhenIpv4StaticBootProtocolNetmaskEqual ( ) throws java.lang.Exception { initIpv4ConfigurationBootProtocolNetmask ( org.ovirt.engine.core.utils.NetworkInSyncWithVdsNetworkInterfaceTest.IPV4_BOOT_PROTOCOL , true ) ; org.junit.Assert.assertThat ( createTestedInstance ( ) . isNetworkInSync ( ) , org.hamcrest.CoreMatchers.is ( true ) ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.LdapGroup getDirectoryGroup ( int index ) { org.ovirt.engine.core.common.businessentities.LdapGroup directoryGroup = new org.ovirt.engine.core.common.businessentities.LdapGroup ( ) ; directoryGroup.setid ( GUIDS [ index ] ) ; directoryGroup.setname ( org.ovirt.engine.api.restapi.resource.BackendGroupsResourceTest.GROUP_NAMES [ index ] ) ; directoryGroup.setdomain ( org.ovirt.engine.api.restapi.resource.DOMAIN ) ; return directoryGroup ; }

Target:
private org.ovirt.engine.core.common.businessentities.LdapGroup getDirectoryGroup ( int index ) { org.ovirt.engine.core.common.businessentities.LdapGroup directoryGroup = new org.ovirt.engine.core.common.businessentities.LdapGroup ( ) ; directoryGroup.setid ( EXTERNAL_IDS [ index ] ) ; directoryGroup.setname ( org.ovirt.engine.api.restapi.resource.BackendGroupsResourceTest.GROUP_NAMES [ index ] ) ; directoryGroup.setdomain ( org.ovirt.engine.api.restapi.resource.DOMAIN ) ; return directoryGroup ; }
Source:
public void setEntity ( org.ovirt.engine.core.common.businessentities.DbUser value ) { super . setEntity ( value ) ; }

Target:
public void setEntity ( org.ovirt.engine.core.common.businessentities.aaa.DbUser value ) { super . setEntity ( value ) ; }
Source:
public com.google.gwt.safehtml.shared.SafeHtml getTooltip ( org.ovirt.engine.core.common.businessentities.VM object ) { return null ; }

Target:
public java.lang.String getValue ( org.ovirt.engine.core.common.businessentities.VM vm ) { if ( ( vm.getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.MigratingFrom ) ) { return null ; } return super . getValue ( vm ) ; }
Source:
public org.ovirt.engine.core.bll.ValidationResult mtuValid ( ) { return org.ovirt.engine.core.bll.ValidationResult.failWith ( VdcBllMessages.NETWORK_MTU_OVERRIDE_NOT_SUPPORTED ) . unless ( ( ( ( network.getMtu ( ) ) == 0 ) || ( org.ovirt.engine.core.common.FeatureSupported.mtuSpecification ( getDataCenter ( ) . getcompatibility_version ( ) ) ) ) ) ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult mtuValid ( ) { return org.ovirt.engine.core.bll.ValidationResult.failWith ( VdcBllMessages.NETWORK_MTU_OVERRIDE_NOT_SUPPORTED ) . unless ( ( ( ( network.getMtu ( ) ) == 0 ) || ( org.ovirt.engine.core.common.FeatureSupported.mtuSpecification ( getDataCenter ( ) . getCompatibilityVersion ( ) ) ) ) ) ; }
Source:
public java.util.List < org.ovirt.engine.core.common.businessentities.DisplayType > getDisplayTypes ( int osId , org.ovirt.engine.core.compat.Version version ) ;

Target:
public java.util.List < org.ovirt.engine.core.common.utils.Pair < org.ovirt.engine.core.common.businessentities.GraphicsType , org.ovirt.engine.core.common.businessentities.DisplayType > > getGraphicsAndDisplays ( int osId , org.ovirt.engine.core.compat.Version version ) ;
Source:
private void handlePaused ( final org.ovirt.engine.core.bll.storage.disk.image.UploadImageCommand < T > . StateContext context ) { periodicPauseLog ( context.entity , context.iterationTimestamp ) ; stopImageTransferSession ( context.entity ) ; }

Target:
private void handlePaused ( final org.ovirt.engine.core.bll.storage.disk.image.TransferImageCommand < T > . StateContext context ) { periodicPauseLog ( context.entity , context.iterationTimestamp ) ; stopImageTransferSession ( context.entity ) ; }
Source:
public static java.lang.Iterable < java.lang.RuntimeException > Flatten ( java.lang.RuntimeException source ) { java.util.ArrayList < java.lang.RuntimeException > result = new java.util.ArrayList < java.lang.RuntimeException > ( ) ; java.lang.RuntimeException ex = source ; result.add ( ex ) ; return result ; }

Target:
public static java.lang.Iterable < java.lang.RuntimeException > flatten ( java.lang.RuntimeException source ) { java.util.ArrayList < java.lang.RuntimeException > result = new java.util.ArrayList < java.lang.RuntimeException > ( ) ; java.lang.RuntimeException ex = source ; result.add ( ex ) ; return result ; }
Source:
private java.lang.String removeUpnSuffix ( java.lang.String value ) { return value.contains ( "@" ) ? value.substring ( 0 , value.indexOf ( "@" ) ) : value ; }

Target:
private java.lang.String formatValue ( java.lang.String value , org.ovirt.engine.api.extensions.ExtKey key ) { java.lang.String result = value ; if ( ( key.equals ( Authz.PrincipalRecord.NAME ) ) || ( key.equals ( Authz.PrincipalRecord.PRINCIPAL ) ) ) { result = ( value.contains ( "@" ) ) ? value.substring ( 0 , value.indexOf ( "@" ) ) : value ; } else if ( key.equals ( Authz.GroupRecord.NAME ) ) { result = ( value.contains ( "/" ) ) ? value.substring ( ( ( value.lastIndexOf ( '/' ) ) + 1 ) ) : value ; } return result ; }
Source:
public java.lang.String getValue ( org.ovirt.engine.core.common.businessentities.VDSGroup object ) { if ( ( object.getGroupHostsAndVms ( ) ) == null ) { return "" ; } return ( object.getGroupHostsAndVms ( ) . getHosts ( ) ) + "" ; }

Target:
public java.lang.String getValue ( org.ovirt.engine.core.common.businessentities.Cluster object ) { if ( ( object.getGroupHostsAndVms ( ) ) == null ) { return "" ; } return ( object.getGroupHostsAndVms ( ) . getHosts ( ) ) + "" ; }
Source:
public void setName ( java.lang.String name ) { this . name = name ; }

Target:
public java.util.Map < org.ovirt.engine.core.aaa.ExtensionProperties , java.lang.Object > getContext ( ) { return context ; }
Source:
private java.lang.String readPasswordInteractively ( ) { java.lang.String password = null ; while ( org.apache.commons.lang.StringUtils.isBlank ( password ) ) { java.lang.System.out.println ( "Enter password:" ) ; password = new java.lang.String ( java.lang.System.console ( ) . readPassword ( ) ) ; } return password ; }

Target:
private java.lang.String readPasswordInteractively ( ) { java.lang.String password = null ; while ( org.apache.commons.lang.StringUtils.isBlank ( password ) ) { java.lang.System.out.print ( "Enter password:" ) ; password = new java.lang.String ( java.lang.System.console ( ) . readPassword ( ) ) ; } return password ; }
Source:
public java.util.Map < java.lang.String , java.lang.Object > call ( ) throws java.lang.Exception { return new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( client , request ) ; }

Target:
public java.util.Map < java.lang.String , java.lang.Object > call ( ) throws java.lang.Exception { return new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( client , request , timeout , unit ) ; }
Source:
protected boolean validate ( ) { if ( ( getAffinityGroupDao ( ) . getByName ( getParameters ( ) . getAffinityGroup ( ) . getName ( ) ) ) != null ) { return failValidation ( EngineMessage.ACTION_TYPE_FAILED_AFFINITY_GROUP_NAME_EXISTS ) ; } return validateParameters ( ) ; }

Target:
protected boolean validate ( ) { if ( ( affinityGroupDao.getByName ( getParameters ( ) . getAffinityGroup ( ) . getName ( ) ) ) != null ) { return failValidation ( EngineMessage.ACTION_TYPE_FAILED_AFFINITY_GROUP_NAME_EXISTS ) ; } return validateParameters ( ) ; }
Source:
public void testRemove ( ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity existingBrick = dao.getById ( org.ovirt.engine.core.dao.gluster.GlusterBrickDaoTest.EXISTING_BRICK_ID ) ; org.junit.Assert.assertNotNull ( existingBrick ) ; dao.removeBrick ( org.ovirt.engine.core.dao.gluster.GlusterBrickDaoTest.EXISTING_BRICK_ID ) ; org.junit.Assert.assertNull ( dao.getById ( org.ovirt.engine.core.dao.gluster.GlusterBrickDaoTest.EXISTING_BRICK_ID ) ) ; }

Target:
public void testRemove ( ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity existingBrick = dao.getById ( FixturesTool.GLUSTER_BRICK_UUID1 ) ; org.junit.Assert.assertNotNull ( existingBrick ) ; dao.removeBrick ( FixturesTool.GLUSTER_BRICK_UUID1 ) ; org.junit.Assert.assertNull ( dao.getById ( FixturesTool.GLUSTER_BRICK_UUID1 ) ) ; }
Source:
public void addMessage ( com.google.gwt.safehtml.shared.SafeHtml message ) { com.google.gwt.user.client.ui.HTMLPanel messageLabel = new com.google.gwt.user.client.ui.HTMLPanel ( message ) ; messagePanel.add ( messageLabel ) ; }

Target:
public void addMessage ( com.google.gwt.safehtml.shared.SafeHtml message ) { messagePanel.add ( createMessageLabel ( message ) ) ; }
Source:
public void setvm_ip ( java.lang.String value ) { this . mVmDynamic.setvm_ip ( value ) ; OnPropertyChanged ( new org.ovirt.engine.core.compat.PropertyChangedEventArgs ( "vm_ip" ) ) ; }

Target:
public void setVmPid ( java.lang.Integer value ) { this . vmDynamic.setvm_pid ( value ) ; }
Source:
boolean isUpdateAvailable ( org.ovirt.engine.core.common.businessentities.VDS host ) ;

Target:
org.ovirt.engine.core.common.HostUpgradeManagerResult checkForUpdates ( org.ovirt.engine.core.common.businessentities.VDS host ) ;
Source:
java.lang.String passthroughNotSupported ( java.lang.String version ) ;

Target:
java.lang.String removeStorageQoSMessage ( int numOfProfiles ) ;
Source:
public void testEnumDeserializationLiteralDoesNotExist ( ) { org.ovirt.engine.core.utils.serialization.json.JsonObjectDeserializerTest.Kind kind = new org.ovirt.engine.core.utils.serialization.json.JsonObjectDeserializer ( ) . deserialize ( "\"RED\"" , org.ovirt.engine.core.utils.serialization.json.JsonObjectDeserializerTest.Kind.class ) ; org.junit.Assert.assertEquals ( null , kind ) ; }

Target:
public void testEnumDeserializationLiteralDoesNotExist ( ) { org.ovirt.engine.core.utils.serialization.json.JsonObjectDeserializerTest.Kind kind = new org.ovirt.engine.core.utils.serialization.json.JsonObjectDeserializer ( ) . deserialize ( "\"RED\"" , org.ovirt.engine.core.utils.serialization.json.JsonObjectDeserializerTest.Kind.class ) ; org.junit.Assert.assertNull ( kind ) ; }
Source:
protected void disableLoginScreen ( ) { getUserName ( ) . setIsChangable ( false ) ; getPassword ( ) . setIsChangable ( false ) ; getDomain ( ) . setIsChangable ( false ) ; getLoginCommand ( ) . setIsExecutionAllowed ( false ) ; }

Target:
protected void disableLoginScreen ( ) { getUserName ( ) . setIsChangable ( false ) ; getPassword ( ) . setIsChangable ( false ) ; getProfile ( ) . setIsChangable ( false ) ; getLoginCommand ( ) . setIsExecutionAllowed ( false ) ; }
Source:
private void failOnDowngradingWithStorageType ( org.ovirt.engine.core.common.businessentities.storage.StorageType storageType ) { storagePoolVersion35 ( ) ; cmd.getStoragePool ( ) . setCompatibilityVersion ( Version.v3_1 ) ; org.ovirt.engine.core.common.businessentities.StorageDomain sd = createStorageDomain ( StorageFormatType.V3 , storageType ) ; setAttachedDomains ( sd ) ; canDoActionFailed ( EngineMessage.ACTION_TYPE_FAILED_STORAGE_DOMAINS_ARE_NOT_SUPPORTED_IN_DOWNGRADED_VERSION ) ; }

Target:
private void failOnDowngradingWithStorageType ( org.ovirt.engine.core.common.businessentities.storage.StorageType storageType ) { storagePoolVersion35 ( ) ; cmd.getStoragePool ( ) . setCompatibilityVersion ( Version.v3_1 ) ; org.ovirt.engine.core.common.businessentities.StorageDomain sd = createStorageDomain ( StorageFormatType.V3 , storageType ) ; setAttachedDomains ( sd ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( cmd , EngineMessage.ACTION_TYPE_FAILED_STORAGE_DOMAINS_ARE_NOT_SUPPORTED_IN_DOWNGRADED_VERSION ) ; }
Source:
public void testCanDoActionStoragePoolDown ( ) { storagePool.setStatus ( StoragePoolStatus.Maintenance ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( cmd , EngineMessage.ACTION_TYPE_FAILED_IMAGE_REPOSITORY_NOT_FOUND ) ; }

Target:
public void testValidateStoragePoolDown ( ) { storagePool.setStatus ( StoragePoolStatus.Maintenance ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( cmd , EngineMessage.ACTION_TYPE_FAILED_IMAGE_REPOSITORY_NOT_FOUND ) ; }
Source:
public void macAddressFormatValidForUpdate ( ) throws java.lang.Exception { assertMacAddressFormatValidation ( org.ovirt.engine.core.common.businessentities.network.VmNetworkInterfaceValidationTest.VALID_MAC_ADDRESS , org.ovirt.engine.core.common.validation.group.UpdateEntity.class , false ) ; }

Target:
public void macAddressFormatInvalidForUpdate ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.VmNetworkInterfaceValidationTest.assertMacAddressFormatValidation ( org.ovirt.engine.core.common.businessentities.network.VmNetworkInterfaceValidationTest.createInvalidMacAddress ( ) , org.ovirt.engine.core.common.validation.group.UpdateEntity.class , true ) ; }
Source:
public org.ovirt.engine.core.bll.ValidationResult providerIsSet ( ) { return ( provider ) == null ? new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.ACTION_TYPE_FAILED_PROVIDER_DOESNT_EXIST ) : org.ovirt.engine.core.bll.ValidationResult.VALID ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult providerIsSet ( ) { return org.ovirt.engine.core.bll.ValidationResult.failWith ( VdcBllMessages.ACTION_TYPE_FAILED_PROVIDER_DOESNT_EXIST ) . when ( ( ( provider ) == null ) ) ; }
Source:
protected void executeQueryCommand ( ) { org.ovirt.engine.core.bll.GetAllVdsGroupsQuery.getQueryReturnValue ( ) . setReturnValue ( org.ovirt.engine.core.bll.GetAllVdsGroupsQuery.getDbFacade ( ) . getVdsGroupDao ( ) . getAll ( org.ovirt.engine.core.bll.GetAllVdsGroupsQuery.getUserID ( ) , org.ovirt.engine.core.bll.GetAllVdsGroupsQuery.getParameters ( ) . isFiltered ( ) ) ) ; }

Target:
protected void executeQueryCommand ( ) { org.ovirt.engine.core.bll.GetAllClustersQuery.getQueryReturnValue ( ) . setReturnValue ( org.ovirt.engine.core.bll.GetAllClustersQuery.getDbFacade ( ) . getClusterDao ( ) . getAll ( org.ovirt.engine.core.bll.GetAllClustersQuery.getUserID ( ) , org.ovirt.engine.core.bll.GetAllClustersQuery.getParameters ( ) . isFiltered ( ) ) ) ; }
Source:
private void assertGetAllRelevantQuoatsForVdsGroup ( org.ovirt.engine.core.compat.Guid vdsGroupId , int expectedQuotas ) { java.util.List < org.ovirt.engine.core.common.businessentities.Quota > quotas = dao.getAllRelevantQuotasForVdsGroup ( vdsGroupId ) ; org.junit.Assert.assertEquals ( "Wrong number of quotas retuend" , expectedQuotas , quotas.size ( ) ) ; }

Target:
public void testGetRelevantStorageQuotaForUserWithoutPrivileges ( ) throws java.lang.Exception { java.util.List < org.ovirt.engine.core.common.businessentities.Quota > quotas = dao.getAllRelevantQuotasForStorage ( FixturesTool.STORAGE_DOAMIN_NFS_MASTER , org.ovirt.engine.core.dao.UNPRIVILEGED_USER_ID , true ) ; org.junit.Assert.assertEquals ( "Unprivileged user is not allowed to fetch for quota" , 0 , quotas.size ( ) ) ; }
Source:
public int getCount ( ) { return getCallsHandler ( ) . executeRead ( "GetTemplateCount" , getIntegerMapper ( ) , getCustomMapSqlParameterSource ( ) ) ; }

Target:
public int getCount ( ) { return getCallsHandler ( ) . executeRead ( "GetTemplateCount" , org.springframework.jdbc.core.SingleColumnRowMapper.newInstance ( java.lang.Integer.class ) , getCustomMapSqlParameterSource ( ) ) ; }
Source:
public void testFindBestMatchForEmulateMachine ( ) { java.lang.String original = "pc-i440fx-rhel7.3.0" ; java.lang.String bestMatch = "pc-i440fx-rhel7.2.0" ; java.util.List < java.lang.String > candidates = java.util.Arrays.asList ( "pc-i440fx-2.1" , bestMatch , "pseries-rhel7.2.0" ) ; org.junit.Assert.assertEquals ( bestMatch , org.ovirt.engine.core.bll.utils.EmulatedMachineUtils.findBestMatchForEmulatedMachine ( original , candidates ) ) ; }

Target:
public void testFindBestMatchForEmulateMachine ( ) { java.lang.String original = "pc-i440fx-rhel7.3.0" ; java.lang.String bestMatch = "pc-i440fx-rhel7.2.0" ; java.util.List < java.lang.String > candidates = java.util.Arrays.asList ( "pc-i440fx-2.1" , bestMatch , "pseries-rhel7.2.0" ) ; org.junit.jupiter.api.Assertions.assertEquals ( bestMatch , org.ovirt.engine.core.bll.utils.EmulatedMachineUtils.findBestMatchForEmulatedMachine ( original , candidates ) ) ; }
Source:
public void testGetAllForEntityFilteredWithPermissions ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.Permissions > result = dao.getAllForEntity ( org.ovirt.engine.core.dao.PermissionDAOTest.VM_ENTITY_ID , org.ovirt.engine.core.dao.PRIVILEGED_USER_SESSION_ID , true ) ; org.ovirt.engine.core.dao.PermissionDAOTest.assertGetAllForEntityResult ( result ) ; }

Target:
public void testGetAllForEntityFilteredWithNoPermissionsFilteringDisabled ( ) { org.junit.Assert.assertNotNull ( unprivilegedUserSession ) ; java.util.List < org.ovirt.engine.core.common.businessentities.Permissions > result = dao.getAllForEntity ( org.ovirt.engine.core.dao.PermissionDAOTest.VM_ENTITY_ID , unprivilegedUserSession.getId ( ) , false ) ; org.ovirt.engine.core.dao.PermissionDAOTest.assertGetAllForEntityResult ( result ) ; }
Source:
public void Configure ( org.ovirt.engine.ui.uicommonweb.models.vms.ISpice spice ) { super . Configure ( spice ) ; updateWanColorDepthOptions ( spice ) ; updateWANDisableEffects ( spice ) ; }

Target:
public void Configure ( org.ovirt.engine.ui.uicommonweb.models.vms.ISpice spice ) { super . Configure ( spice ) ; updateWanColorDepthOptions ( spice ) ; updateWANDisableEffects ( spice ) ; spice.setSpiceProxyEnabled ( consoleUtils.isSpiceProxyDefined ( ) ) ; }
Source:
public java.lang.String toString ( ) { return java.lang.String.format ( "vmId = %s, status = %s" , getVmId ( ) , getStatus ( ) ) ; }

Target:
public java.lang.String toString ( ) { return java.lang.String.format ( "vmId = %s, status = %s, exit status = %s" , getVmId ( ) , getStatus ( ) , getExitStatus ( ) ) ; }
Source:
void updateHibernationMemory ( org.ovirt.engine.core.compat.Guid vmId , java.lang.String memoryVolume ) ;

Target:
void updateHibernationMemory ( org.ovirt.engine.core.compat.Guid vmId , org.ovirt.engine.core.compat.Guid memoryDumpDiskId , org.ovirt.engine.core.compat.Guid memoryMetadataDiskId , java.lang.String memoryVolume ) ;
Source:
private void Provisioning_SelectedItemChanged ( java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { behavior.Provisioning_SelectedItemChanged ( ) ; }

Target:
private void provisioning_SelectedItemChanged ( java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { behavior.provisioning_SelectedItemChanged ( ) ; }
Source:
public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Permission > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Permission > ( ) ; }

Target:
public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; }
Source:
private org.ovirt.engine.core.compat.Guid addMemoryDisk ( ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage memoryDisk = org.ovirt.engine.core.bll.memory.MemoryUtils.createSnapshotMemoryDisk ( vm , getStorageType ( ) ) ; return addDisk ( memoryDisk ) ; }

Target:
private org.ovirt.engine.core.compat.Guid addMemoryDisk ( ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage memoryDisk = org.ovirt.engine.core.bll.memory.MemoryUtils.createSnapshotMemoryDisk ( vm , getStorageType ( ) , vmOverheadCalculator ) ; return addDisk ( memoryDisk ) ; }
Source:
public void setAsyncResult ( org.ovirt.engine.ui.frontend.RegistrationResult value ) { if ( ( asyncResult ) != value ) { AsyncResultChanging ( value , asyncResult ) ; asyncResult = value ; onPropertyChanged ( new org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ( "AsyncResult" ) ) ; } }

Target:
public void setAsyncResult ( org.ovirt.engine.ui.frontend.RegistrationResult value ) { if ( ( asyncResult ) != value ) { asyncResultChanging ( value , asyncResult ) ; asyncResult = value ; onPropertyChanged ( new org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ( "AsyncResult" ) ) ; } }
Source:
private void setRngDeviceToParams ( org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel model , org.ovirt.engine.core.common.action.VmTemplateParametersBase parameters ) { parameters.setUpdateRngDevice ( true ) ; parameters.setRngDevice ( ( model.getIsRngEnabled ( ) . getEntity ( ) ? model.generateRngDevice ( ) : null ) ) ; }

Target:
private void setRngDeviceToParams ( org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel model , org.ovirt.engine.core.common.action.VmTemplateManagementParameters parameters ) { parameters.setUpdateRngDevice ( true ) ; parameters.setRngDevice ( ( model.getIsRngEnabled ( ) . getEntity ( ) ? model.generateRngDevice ( ) : null ) ) ; }
Source:
public void testGetAllInterfacesForVdsWithPermissionsForPriviligedUser ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > result = dao.getAllInterfacesForVds ( org.ovirt.engine.core.dao.network.InterfaceDaoTest.VDS_ID , org.ovirt.engine.core.dao.network.PRIVILEGED_USER_ID , true ) ; assertGetAllForVdsCorrectResult ( result ) ; }

Target:
public void testGetAllInterfacesForVdsWithPermissionsForPriviligedUser ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > result = dao.getAllInterfacesForVds ( org.ovirt.engine.core.dao.network.InterfaceDaoImplTest.VDS_ID , org.ovirt.engine.core.dao.network.PRIVILEGED_USER_ID , true ) ; assertGetAllForVdsCorrectResult ( result ) ; }
Source:
public void notAnyValidJsonIsValid ( ) { org.junit.Assert.assertFalse ( helper.validate ( null , "{}" ) . isOk ( ) ) ; }

Target:
public void notAnyValidJsonIsValid ( ) { org.junit.jupiter.api.Assertions.assertFalse ( helper.validate ( null , "{}" ) . isOk ( ) ) ; }
Source:
public java.lang.Object Convert ( java.lang.Object returnValue , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( returnValue != null ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.cachedConfigValuesPreConvert.putAll ( ( ( java.util.HashMap < org.ovirt.engine.core.compat.KeyValuePairCompat < org.ovirt.engine.core.common.queries.ConfigurationValues , java.lang.String > , java.lang.Object > ) ( returnValue ) ) ) ; } return org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.cachedConfigValuesPreConvert ; }

Target:
public java.lang.Object Convert ( java.lang.Object returnValue , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( returnValue != null ) { cachedConfigValuesPreConvert.putAll ( ( ( java.util.HashMap < org.ovirt.engine.core.compat.KeyValuePairCompat < org.ovirt.engine.core.common.queries.ConfigurationValues , java.lang.String > , java.lang.Object > ) ( returnValue ) ) ) ; } return cachedConfigValuesPreConvert ; }
Source:
public boolean eval ( org.ovirt.engine.core.common.businessentities.VM vm ) { return vm.isRunning ( ) ; }

Target:
public boolean test ( org.ovirt.engine.core.common.businessentities.VM vm ) { return vm.isRunning ( ) ; }
Source:
public void InitCdImage ( ) { updateUserCdImage ( ( ( org.ovirt.engine.core.common.businessentities.storage_pool ) ( getModel ( ) . getDataCenter ( ) . getSelectedItem ( ) ) ) . getId ( ) ) ; }

Target:
public void initCdImage ( ) { updateUserCdImage ( ( ( org.ovirt.engine.core.common.businessentities.StoragePool ) ( getModel ( ) . getDataCenter ( ) . getSelectedItem ( ) ) ) . getId ( ) ) ; }
Source:
public org.ovirt.engine.core.dao.VdsGroupDAO getVdsGroupDAO ( ) { return getDbFacade ( ) . getVdsGroupDAO ( ) ; }

Target:
public org.ovirt.engine.core.dao.VdsGroupDAO getVdsGroupDAO ( ) { return getDbFacade ( ) . getVdsGroupDao ( ) ; }
Source:
public void vdsMovedToMaintenance ( org.ovirt.engine.core.common.businessentities.VDS vds ) { try { org.ovirt.engine.core.bll.MaintenanceVdsCommand.ProcessStorageOnVdsInactive ( vds ) ; } finally { org.ovirt.engine.core.bll.job.ExecutionHandler.updateSpecificActionJobCompleted ( vds.getId ( ) , VdcActionType.MaintenanceVds , true ) ; } }

Target:
public void vdsMovedToMaintenance ( org.ovirt.engine.core.common.businessentities.VDS vds ) { try { org.ovirt.engine.core.bll.MaintenanceVdsCommand.processStorageOnVdsInactive ( vds ) ; } finally { org.ovirt.engine.core.bll.job.ExecutionHandler.updateSpecificActionJobCompleted ( vds.getId ( ) , VdcActionType.MaintenanceVds , true ) ; } }
Source:
public java.lang.String getSubjectName ( ) { initUserAndGroupData ( ) ; return ( _dbUser ) == null ? ( _adGroup ) == null ? "" : _adGroup.getname ( ) : _dbUser.getusername ( ) ; }

Target:
public java.lang.String getSubjectName ( ) { initUserAndGroupData ( ) ; return ( _dbUser ) == null ? ( _adGroup ) == null ? "" : _adGroup.getname ( ) : _dbUser.getLoginName ( ) ; }
Source:
private void logInitializationError ( java.lang.String message ) { org.ovirt.engine.core.bll.network.MacPoolManager.log.error ( "The MAC addresses pool is not initialized" ) ; org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase logable = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; logable.AddCustomValue ( "Message" , message ) ; org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.log ( logable , AuditLogType.MAC_ADDRESSES_POOL_NOT_INITIALIZED ) ; }

Target:
private void logInitializationError ( java.lang.String message ) { org.ovirt.engine.core.bll.network.MacPoolManager.log.error ( "The MAC addresses pool is not initialized" ) ; org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase logable = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; logable.addCustomValue ( "Message" , message ) ; org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.log ( logable , AuditLogType.MAC_ADDRESSES_POOL_NOT_INITIALIZED ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.VmPool mockVmPools ( ) { org.ovirt.engine.core.common.businessentities.VmPool pool = new org.ovirt.engine.core.common.businessentities.VmPool ( ) ; pool.setVmPoolName ( "simplePoolName" ) ; pool.setVdsGroupId ( vdsGroupId ) ; pool.setVmPoolId ( vmPoolId ) ; return pool ; }

Target:
private org.ovirt.engine.core.common.businessentities.VmPool mockVmPools ( ) { org.ovirt.engine.core.common.businessentities.VmPool pool = new org.ovirt.engine.core.common.businessentities.VmPool ( ) ; pool.setName ( "simplePoolName" ) ; pool.setVdsGroupId ( vdsGroupId ) ; pool.setVmPoolId ( vmPoolId ) ; return pool ; }
Source:
public org.ovirt.engine.core.common.action.VdcReturnValueBase endAction ( org.ovirt.engine.core.common.action.VdcActionType actionType , org.ovirt.engine.core.common.action.VdcActionParametersBase parameters ) { return endAction ( actionType , parameters , null ) ; }

Target:
public org.ovirt.engine.core.common.queries.VdcQueryReturnValue runInternalQuery ( org.ovirt.engine.core.common.queries.VdcQueryType actionType , org.ovirt.engine.core.common.queries.VdcQueryParametersBase parameters , org.ovirt.engine.core.bll.context.EngineContext engineContext ) { return runQueryImpl ( actionType , parameters , false , engineContext ) ; }
Source:
public void getPrefixedKey ( ) { java.lang.String prefixedKey = tested.getPrefixedKey ( "Key" ) ; org.junit.Assert.assertThat ( prefixedKey , org.hamcrest.CoreMatchers.equalTo ( ( ( org.ovirt.engine.ui.common.system.ClientStorageImplTest.KEY_PREFIX ) + "_Key" ) ) ) ; }

Target:
public void getPrefixedKey ( ) { java.lang.String prefixedKey = tested.getPrefixedKey ( "Key" ) ; org.junit.Assert.assertThat ( prefixedKey , org.hamcrest.CoreMatchers.equalTo ( ( ( ClientStorageImpl.CLIENT_STORAGE_KEY_PREFIX ) + "Key" ) ) ) ; }
Source:
public static java.lang.String getOsName ( java.lang.Integer osId ) { if ( osId == null ) { return "" ; } return org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.osNames.get ( osId ) ; }

Target:
public java.lang.String getOsName ( java.lang.Integer osId ) { if ( osId == null ) { return "" ; } return osNames.get ( osId ) ; }
Source:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; dao = dbFacade.getQuotaDao ( ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; dao = dbFacade.getQuotaDao ( ) ; org.ovirt.engine.core.dao.EngineSessionDAO engineDao = dbFacade.getEngineSessionDao ( ) ; unprivilegedUserSession = engineDao.getBySessionId ( org.ovirt.engine.core.dao.UNPRIVILEGED_USER_ENGINE_SESSION_ID ) ; privilegedUserSession = engineDao.getBySessionId ( org.ovirt.engine.core.dao.PRIVILEGED_USER_ENGINE_SESSION_ID ) ; }
Source:
public void onSuccess ( org.ovirt.engine.core.common.action.VdcReturnValueBase result ) { org.ovirt.engine.ui.frontend.Frontend.logger.finer ( "Frontend: sucessfully executed logOff, determining result!" ) ; org.ovirt.engine.ui.frontend.Frontend.logger.finer ( ( ( "Result of logoff: succeeded? [" + ( result.getSucceeded ( ) ) ) + "]" ) ) ; callback.onSuccess ( result ) ; }

Target:
public static void setLoginHandler ( org.ovirt.engine.ui.frontend.FrontendLoginHandler loginHandler ) { org.ovirt.engine.ui.frontend.Frontend.loginHandler = loginHandler ; }
Source:
public org.ovirt.engine.core.bll.ValidationResult sshUserNameNotEmpty ( ) { return org.ovirt.engine.core.bll.ValidationResult.failWith ( VdcBllMessages.ACTION_TYPE_FAILED_VDS_WITH_INVALID_SSH_USERNAME ) . when ( org.apache.commons.lang.StringUtils.isBlank ( host.getSshUsername ( ) ) ) ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult sshUserNameNotEmpty ( ) { return org.ovirt.engine.core.bll.ValidationResult.failWith ( EngineMessage.ACTION_TYPE_FAILED_VDS_WITH_INVALID_SSH_USERNAME ) . when ( org.apache.commons.lang.StringUtils.isBlank ( host.getSshUsername ( ) ) ) ; }
Source:
private boolean shouldOvfStoreBeShareable ( ) { return ( org.ovirt.engine.core.bll.CreateOvfVolumeForStorageDomainCommand.getStorageDomain ( ) . getStorageType ( ) ) != ( org.ovirt.engine.core.common.businessentities.StorageType.GLUSTERFS ) ; }

Target:
private boolean shouldOvfStoreBeShareable ( ) { return ( org.ovirt.engine.core.bll.CreateOvfVolumeForStorageDomainCommand.getStorageDomain ( ) . getStorageType ( ) ) != ( org.ovirt.engine.core.common.businessentities.storage.StorageType.GLUSTERFS ) ; }
Source:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { spice.setUsbAutoShare ( ( ( java.lang.Boolean ) ( returnValue ) ) ) ; }

Target:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { spice.getOptions ( ) . setUsbAutoShare ( ( ( java.lang.Boolean ) ( returnValue ) ) ) ; }
Source:
public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StoragePool > ( ) ; } return source ; }

Target:
public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Boolean ) ( source ) ) . booleanValue ( ) : true ; }
Source:
public void canDoActionFailsBlockLocal ( ) { sd.setStorageDomainType ( StorageDomainType.ImportExport ) ; sd.setStorageType ( StorageType.LOCALFS ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( cmd , VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_DOMAIN_TYPE_ILLEGAL ) ; }

Target:
public void canDoActionFailsExportOnLocal ( ) { sd.setStorageDomainType ( StorageDomainType.ImportExport ) ; sd.setStorageType ( StorageType.LOCALFS ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( cmd , VdcBllMessages.ACTION_TYPE_FAILED_DOMAIN_TYPE_CAN_BE_CREATED_ONLY_ON_SPECIFIC_STORAGE_DOMAINS ) ; }