auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void onClick ( com.google.gwt.event.dom.client.ClickEvent event ) { org.ovirt.engine.ui.uicommonweb.Configurator configurator = ( ( org.ovirt.engine.ui.uicommonweb.Configurator ) ( org.ovirt.engine.ui.uicommonweb.TypeResolver.getInstance ( ) . Resolve ( org.ovirt.engine.ui.uicommonweb.Configurator.class ) ) ) ; if ( configurator.isDocumentationAvailable ( ) ) { java.lang.String url = ( configurator.getDocumentationLibURL ( ) ) + ( documentationGuidePath ) ; org.ovirt.engine.ui.common.utils.WebUtils.openUrlInNewWindow ( windowName , url ) ; } }

Target:
public void onClick ( com.google.gwt.event.dom.client.ClickEvent event ) { org.ovirt.engine.ui.uicommonweb.Configurator configurator = ( ( org.ovirt.engine.ui.uicommonweb.Configurator ) ( org.ovirt.engine.ui.uicommonweb.TypeResolver.getInstance ( ) . Resolve ( org.ovirt.engine.ui.uicommonweb.Configurator.class ) ) ) ; if ( configurator.isDocumentationAvailable ( ) ) { java.lang.String url = ( configurator.getDocumentationLibURL ( ) ) + ( documentationGuidePath ) ; org.ovirt.engine.ui.common.utils.WebUtils.openUrlInNewWindow ( windowName , url , WebUtils.OPTION_SCROLLBARS ) ; } }
Source:
private void setEngineSessionSoftLimit ( java.lang.String engineSessionId , int ttlValue ) throws java.io.IOException , javax.naming.NamingException { javax.naming.InitialContext context = new javax.naming.InitialContext ( ) ; try { org.ovirt.engine.core.aaa.filters.FiltersHelper.getBackend ( context ) . runAction ( VdcActionType.SetSesssionSoftLimit , new org.ovirt.engine.core.common.action.SetSesssionSoftLimitCommandParameters ( engineSessionId , ttlValue ) ) ; } finally { try { context.close ( ) ; } catch ( javax.naming.NamingException e ) { org.ovirt.engine.core.aaa.filters.RestApiSessionMgmtFilter.log.error ( ( "Error in REST-API session management. 'Context' object could not be manually closed. " + "This is a cleanup error only; it does not disturb application flow" ) , e ) ; } } }

Target:
private void setEngineSessionSoftLimit ( java.lang.String engineSessionId , int ttlValue ) throws java.io.IOException , javax.naming.NamingException { javax.naming.InitialContext context = new javax.naming.InitialContext ( ) ; try { org.ovirt.engine.core.aaa.filters.FiltersHelper.getBackend ( context ) . runAction ( ActionType.SetSesssionSoftLimit , new org.ovirt.engine.core.common.action.SetSesssionSoftLimitCommandParameters ( engineSessionId , ttlValue ) ) ; } finally { try { context.close ( ) ; } catch ( javax.naming.NamingException e ) { org.ovirt.engine.core.aaa.filters.RestApiSessionMgmtFilter.log.error ( ( "Error in REST-API session management. 'Context' object could not be manually closed. " + "This is a cleanup error only; it does not disturb application flow" ) , e ) ; } } }
Source:
private void auditLogDiskFieldTruncatedAndOthersWereLost ( java.lang.String diskAlias , java.lang.String fieldName , java.lang.String diskFieldsNames ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogable logable = createDiskEvent ( diskAlias ) ; logable.addCustomValue ( "DiskFieldName" , fieldName ) ; logable.addCustomValue ( "DiskFieldsNames" , diskFieldsNames ) ; getAuditLogDirector ( ) . log ( logable , AuditLogType.FAILED_TO_STORE_ENTIRE_DISK_FIELD_AND_REST_OF_FIELDS_IN_DISK_DESCRIPTION_METADATA ) ; }

Target:
private void auditLogDiskFieldTruncatedAndOthersWereLost ( java.lang.String diskAlias , java.lang.String fieldName , java.lang.String diskFieldsNames ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogable logable = createDiskEvent ( diskAlias ) ; logable.addCustomValue ( "DiskFieldName" , fieldName ) ; logable.addCustomValue ( "DiskFieldsNames" , diskFieldsNames ) ; auditLogDirector.log ( logable , AuditLogType.FAILED_TO_STORE_ENTIRE_DISK_FIELD_AND_REST_OF_FIELDS_IN_DISK_DESCRIPTION_METADATA ) ; }
Source:
private java.util.List < org.ovirt.engine.core.common.businessentities.Erratum > mapErrata ( java.util.List < org.ovirt.engine.core.bll.host.provider.foreman.ExternalErratum > externalErrata ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Erratum > errata = new java.util.ArrayList ( externalErrata.size ( ) ) ; for ( org.ovirt.engine.core.bll.host.provider.foreman.ExternalErratum externalErratum : externalErrata ) { org.ovirt.engine.core.common.businessentities.Erratum erratum = mapErratum ( externalErratum ) ; errata.add ( erratum ) ; } return errata ; }

Target:
public java.util.List < org.ovirt.engine.core.common.businessentities.Erratum > getErrataForHost ( java.lang.String hostName ) { return getContentHostProvider ( ) . getErrataForHost ( hostName ) ; }
Source:
protected void setGetNetworksQueryExpectations ( int times , java.util.List < org.ovirt.engine.api.model.Network > networks ) throws java.lang.Exception { while ( ( times -- ) > 0 ) { setUpEntityQueryExpectations ( VdcQueryType.GetAllNetworksByClusterId , org.ovirt.engine.core.common.queries.VdsGroupQueryParamenters.class , new java.lang.String [ ] { "VdsGroupId" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , networks ) ; } }

Target:
protected void setGetNetworksQueryExpectations ( int times , java.util.List < org.ovirt.engine.api.model.Network > networks ) throws java.lang.Exception { while ( ( times -- ) > 0 ) { setUpEntityQueryExpectations ( VdcQueryType.GetAllNetworksByClusterId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , networks ) ; } }
Source:
public org.ovirt.engine.core.bll.ValidationResult isCinderAlreadyExists ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.Provider < ? > > cinderProvidersFromDB = getProviderDao ( ) . getAllByTypes ( ProviderType.OPENSTACK_VOLUME ) ; for ( org.ovirt.engine.core.common.businessentities.Provider cinderProviderFromDB : cinderProvidersFromDB ) { if ( provider.getUrl ( ) . equals ( cinderProviderFromDB.getUrl ( ) ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_CINDER_ALREADY_EXISTS ) ; } } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult isCinderAlreadyExists ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.Provider < ? > > cinderProvidersFromDB = providerDao.getAllByTypes ( ProviderType.OPENSTACK_VOLUME ) ; for ( org.ovirt.engine.core.common.businessentities.Provider cinderProviderFromDB : cinderProvidersFromDB ) { if ( provider.getUrl ( ) . equals ( cinderProviderFromDB.getUrl ( ) ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_CINDER_ALREADY_EXISTS ) ; } } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }
Source:
private void fillDiskMap ( org.ovirt.engine.core.common.businessentities.LunDisk disk , org.ovirt.engine.core.common.businessentities.VM vm , int expectedMapSize ) { java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.Disk > diskMap = new java.util.HashMap < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.Disk > ( ) ; for ( int i = 0 ; i < expectedMapSize ; i ++ ) { diskMap.put ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , disk ) ; } vm.setDiskMap ( diskMap ) ; }

Target:
private void fillDiskMap ( org.ovirt.engine.core.common.businessentities.storage.LunDisk disk , org.ovirt.engine.core.common.businessentities.VM vm , int expectedMapSize ) { java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.storage.Disk > diskMap = new java.util.HashMap < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.storage.Disk > ( ) ; for ( int i = 0 ; i < expectedMapSize ; i ++ ) { diskMap.put ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , disk ) ; } vm.setDiskMap ( diskMap ) ; }
Source:
protected void executeVdsBrokerCommand ( ) { try { status = org.ovirt.engine.core.vdsbroker.HotUnplugMemoryVDSCommand.getBroker ( ) . hotUnplugMemory ( org.ovirt.engine.core.vdsbroker.architecture.MemoryUtils.createVmMemoryDeviceMap ( org.ovirt.engine.core.vdsbroker.HotUnplugMemoryVDSCommand.getParameters ( ) . getMemoryDeviceToUnplug ( ) , true ) ) ; org.ovirt.engine.core.vdsbroker.HotUnplugMemoryVDSCommand.proceedProxyReturnValue ( ) ; } catch ( java.lang.RuntimeException e ) { org.ovirt.engine.core.vdsbroker.HotUnplugMemoryVDSCommand.setVdsRuntimeErrorAndReport ( e ) ; org.ovirt.engine.core.vdsbroker.HotUnplugMemoryVDSCommand.getVDSReturnValue ( ) . setExceptionString ( null ) ; } }

Target:
protected void executeVdsBrokerCommand ( ) { try { status = org.ovirt.engine.core.vdsbroker.HotUnplugMemoryVDSCommand.getBroker ( ) . hotUnplugMemory ( org.ovirt.engine.core.vdsbroker.architecture.MemoryUtils.createHotplugMemoryParamsMap ( org.ovirt.engine.core.vdsbroker.HotUnplugMemoryVDSCommand.getParameters ( ) . getMemoryDeviceToUnplug ( ) , true ) ) ; org.ovirt.engine.core.vdsbroker.HotUnplugMemoryVDSCommand.proceedProxyReturnValue ( ) ; } catch ( java.lang.RuntimeException e ) { org.ovirt.engine.core.vdsbroker.HotUnplugMemoryVDSCommand.setVdsRuntimeErrorAndReport ( e ) ; org.ovirt.engine.core.vdsbroker.HotUnplugMemoryVDSCommand.getVDSReturnValue ( ) . setExceptionString ( null ) ; } }
Source:
protected int calcHostScore ( org.ovirt.engine.core.common.businessentities.VDS vds , org.ovirt.engine.core.common.businessentities.VM vm , boolean countThreadsAsCores ) { if ( ( ( vds.getUsageCpuPercent ( ) ) == null ) || ( ( vds.getUsageCpuPercent ( ) ) > ( highUtilization ) ) ) { return ( MaxSchedulerWeight ) - 1 ; } return ( ( MaxSchedulerWeight ) - 1 ) - ( super . calcHostScore ( vds , vm , countThreadsAsCores ) ) ; }

Target:
protected int calcHostScore ( org.ovirt.engine.core.common.businessentities.VDS vds , org.ovirt.engine.core.common.businessentities.VM vm , boolean countThreadsAsCores ) { if ( ( ( vds.getUsageCpuPercent ( ) ) == null ) || ( ( vds.getUsageCpuPercent ( ) ) > ( highUtilization ) ) ) { return ( getMaxSchedulerWeight ( ) ) - 1 ; } return ( ( getMaxSchedulerWeight ( ) ) - 1 ) - ( super . calcHostScore ( vds , vm , countThreadsAsCores ) ) ; }
Source:
private java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.VmDevice > getVmInterfaceDevices ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > vmInterfaceDevicesList = org.ovirt.engine.core.bll.network.vm.ReorderVmNicsCommand.getVmDeviceDao ( ) . getVmDeviceByVmIdAndType ( org.ovirt.engine.core.bll.network.vm.ReorderVmNicsCommand.getParameters ( ) . getVmId ( ) , VmDeviceGeneralType.INTERFACE ) ; java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.VmDevice > vmInterfaceDevices = new java.util.HashMap < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.VmDevice device : vmInterfaceDevicesList ) { vmInterfaceDevices.put ( device.getDeviceId ( ) , device ) ; } return vmInterfaceDevices ; }

Target:
private java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.VmDevice > getVmInterfaceDevices ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > vmInterfaceDevicesList = vmDeviceDao.getVmDeviceByVmIdAndType ( org.ovirt.engine.core.bll.network.vm.ReorderVmNicsCommand.getParameters ( ) . getVmId ( ) , VmDeviceGeneralType.INTERFACE ) ; java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.VmDevice > vmInterfaceDevices = new java.util.HashMap < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.VmDevice device : vmInterfaceDevicesList ) { vmInterfaceDevices.put ( device.getDeviceId ( ) , device ) ; } return vmInterfaceDevices ; }
Source:
protected void endWithFailure ( ) { if ( ( getMoveOrCopyImageOperation ( ) ) == ( org.ovirt.engine.core.common.businessentities.ImageOperation.Copy ) ) { org.ovirt.engine.core.bll.MoveOrCopyImageGroupCommand.UnLockImage ( ) ; if ( org.ovirt.engine.core.bll.MoveOrCopyImageGroupCommand.getParameters ( ) . getAddImageDomainMapping ( ) ) { org.ovirt.engine.core.bll.MoveOrCopyImageGroupCommand.getImageStorageDomainMapDao ( ) . remove ( new org.ovirt.engine.core.common.businessentities.image_storage_domain_map_id ( org.ovirt.engine.core.bll.MoveOrCopyImageGroupCommand.getParameters ( ) . getImageId ( ) , org.ovirt.engine.core.bll.MoveOrCopyImageGroupCommand.getParameters ( ) . getStorageDomainId ( ) ) ) ; } RevertTasks ( ) ; } else { org.ovirt.engine.core.bll.MoveOrCopyImageGroupCommand.MarkImageAsIllegal ( ) ; } org.ovirt.engine.core.bll.MoveOrCopyImageGroupCommand.setSucceeded ( true ) ; }

Target:
protected void endWithFailure ( ) { if ( ( getMoveOrCopyImageOperation ( ) ) == ( org.ovirt.engine.core.common.businessentities.ImageOperation.Copy ) ) { org.ovirt.engine.core.bll.MoveOrCopyImageGroupCommand.UnLockImage ( ) ; if ( org.ovirt.engine.core.bll.MoveOrCopyImageGroupCommand.getParameters ( ) . getAddImageDomainMapping ( ) ) { org.ovirt.engine.core.bll.MoveOrCopyImageGroupCommand.getImageStorageDomainMapDao ( ) . remove ( new org.ovirt.engine.core.common.businessentities.image_storage_domain_map_id ( org.ovirt.engine.core.bll.MoveOrCopyImageGroupCommand.getParameters ( ) . getImageId ( ) , org.ovirt.engine.core.bll.MoveOrCopyImageGroupCommand.getParameters ( ) . getStorageDomainId ( ) ) ) ; } revertTasks ( ) ; } else { org.ovirt.engine.core.bll.MoveOrCopyImageGroupCommand.MarkImageAsIllegal ( ) ; } org.ovirt.engine.core.bll.MoveOrCopyImageGroupCommand.setSucceeded ( true ) ; }
Source:
private java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.gluster.GlusterStatus > getBrickStatusMap ( org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeAdvancedDetails volumeDetails ) { java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.gluster.GlusterStatus > brickStatusMap = new java.util.HashMap < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.gluster.GlusterStatus > ( ) ; for ( org.ovirt.engine.core.common.businessentities.gluster.BrickDetails brickDetails : volumeDetails.getBrickDetails ( ) ) { brickStatusMap.put ( brickDetails.getBrickProperties ( ) . getBrickId ( ) , brickDetails.getBrickProperties ( ) . getStatus ( ) ) ; } return brickStatusMap ; }

Target:
private java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.gluster.BrickProperties > getBrickPropertiesMap ( org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeAdvancedDetails volumeDetails ) { java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.gluster.BrickProperties > brickStatusMap = new java.util.HashMap < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.gluster.BrickProperties > ( ) ; for ( org.ovirt.engine.core.common.businessentities.gluster.BrickDetails brickDetails : volumeDetails.getBrickDetails ( ) ) { if ( ( brickDetails.getBrickProperties ( ) . getBrickId ( ) ) != null ) { brickStatusMap.put ( brickDetails.getBrickProperties ( ) . getBrickId ( ) , brickDetails.getBrickProperties ( ) ) ; } } return brickStatusMap ; }
Source:
protected boolean updateVnicForBackwardCompatibility ( org.ovirt.engine.core.common.businessentities.network.VmNic oldNic ) { if ( ! ( validate ( org.ovirt.engine.core.bll.network.vm.VnicProfileHelper.updateNicForBackwardCompatibility ( org.ovirt.engine.core.bll.network.vm.AbstractVmInterfaceCommand.getParameters ( ) . getInterface ( ) , oldNic , org.ovirt.engine.core.bll.network.vm.AbstractVmInterfaceCommand.getParameters ( ) . getNetworkName ( ) , org.ovirt.engine.core.bll.network.vm.AbstractVmInterfaceCommand.getParameters ( ) . isPortMirroring ( ) , org.ovirt.engine.core.bll.network.vm.AbstractVmInterfaceCommand.getVm ( ) . getStaticData ( ) , org.ovirt.engine.core.bll.network.vm.AbstractVmInterfaceCommand.getCurrentUser ( ) ) ) ) ) { return false ; } return true ; }

Target:
protected boolean updateVnicForBackwardCompatibility ( org.ovirt.engine.core.common.businessentities.network.VmNic oldNic ) { if ( ! ( validate ( backwardCompatibilityVnicHelper.updateNicForBackwardCompatibility ( org.ovirt.engine.core.bll.network.vm.AbstractVmInterfaceCommand.getParameters ( ) . getInterface ( ) , oldNic , org.ovirt.engine.core.bll.network.vm.AbstractVmInterfaceCommand.getParameters ( ) . getNetworkName ( ) , org.ovirt.engine.core.bll.network.vm.AbstractVmInterfaceCommand.getParameters ( ) . isPortMirroring ( ) , org.ovirt.engine.core.bll.network.vm.AbstractVmInterfaceCommand.getVm ( ) . getStaticData ( ) , org.ovirt.engine.core.bll.network.vm.AbstractVmInterfaceCommand.getCurrentUser ( ) ) ) ) ) { return false ; } return true ; }
Source:
public void setType ( org.ovirt.engine.ui.userportal.widget.QuotaProgressBar.QuotaType type ) { this . type = type ; }

Target:
public void onMouseOver ( com.google.gwt.event.dom.client.MouseOverEvent event ) { com.google.gwt.safehtml.shared.SafeHtml tooltipHtml = getTooltip ( ) ; if ( ! ( "" . equals ( tooltipHtml.asString ( ) ) ) ) { tooltip.setHTML ( tooltipHtml ) ; org.ovirt.engine.ui.common.utils.PopupUtils.adjustPopupLocationToFitScreenAndShow ( tooltipPanel , event.getClientX ( ) , ( ( event.getClientY ( ) ) + 20 ) ) ; } }
Source:
private org.ovirt.engine.core.common.vdscommands.VDSReturnValue executeVerb ( org.ovirt.engine.core.common.businessentities.StorageDomainStatic storage ) { try { return org.ovirt.engine.core.bll.Backend.getInstance ( ) . getResourceManager ( ) . RunVdsCommand ( VDSCommandType.GetVmsInfo , buildGetVmsInfoParameters ( storage ) ) ; } catch ( java.lang.RuntimeException e ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase logable = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; logable.addCustomValue ( "StorageDomainName" , storage.getStorageName ( ) ) ; new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector ( ) . log ( logable , AuditLogType.IMPORTEXPORT_GET_VMS_INFO_FAILED ) ; throw e ; } }

Target:
private org.ovirt.engine.core.common.vdscommands.VDSReturnValue executeVerb ( org.ovirt.engine.core.common.businessentities.StorageDomainStatic storage ) { try { return org.ovirt.engine.core.bll.Backend.getInstance ( ) . getResourceManager ( ) . RunVdsCommand ( VDSCommandType.GetVmsInfo , buildGetVmsInfoParameters ( storage ) ) ; } catch ( java.lang.RuntimeException e ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase logable = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; logable.addCustomValue ( "StorageDomainName" , storage.getStorageName ( ) ) ; auditLogDirector.log ( logable , AuditLogType.IMPORTEXPORT_GET_VMS_INFO_FAILED ) ; throw e ; } }
Source:
public static void main ( java.lang.String [ ] args ) throws java.lang.Exception { java.io.FileOutputStream os = null ; try { os = new java.io.FileOutputStream ( args [ 0 ] ) ; org.ovirt.engine.core.utils.hostinstall.Tar.doTar ( os , new java.io.File ( args [ 1 ] ) ) ; } finally { try { if ( os != null ) { os.close ( ) ; } } finally { } } }

Target:
public static void main ( java.lang.String [ ] args ) throws java.lang.Exception { java.io.FileOutputStream os = null ; try { os = new java.io.FileOutputStream ( args [ 0 ] ) ; org.ovirt.engine.core.utils.archivers.tar.Tar.doTar ( os , new java.io.File ( args [ 1 ] ) ) ; } finally { try { if ( os != null ) { os.close ( ) ; } } finally { } } }
Source:
public void updateIsFreeFlag ( ) { org.ovirt.engine.core.common.businessentities.gluster.StorageDevice storageDevice = dao.get ( org.ovirt.engine.core.dao.gluster.StoageDeviceDaoTest.EXISTING_STORAGE_DEVICE_ID_2 ) ; org.junit.Assert.assertNotNull ( "storage device doesn't exists" , storageDevice ) ; dao.updateIsFreeFlag ( org.ovirt.engine.core.dao.gluster.StoageDeviceDaoTest.EXISTING_STORAGE_DEVICE_ID_2 , false ) ; storageDevice = dao.get ( org.ovirt.engine.core.dao.gluster.StoageDeviceDaoTest.EXISTING_STORAGE_DEVICE_ID_2 ) ; org.junit.Assert.assertFalse ( "canCreateBrick is not updated" , storageDevice.getCanCreateBrick ( ) ) ; dao.updateIsFreeFlag ( org.ovirt.engine.core.dao.gluster.StoageDeviceDaoTest.EXISTING_STORAGE_DEVICE_ID_2 , true ) ; storageDevice = dao.get ( org.ovirt.engine.core.dao.gluster.StoageDeviceDaoTest.EXISTING_STORAGE_DEVICE_ID_2 ) ; org.junit.Assert.assertTrue ( "canCreateBrick is not updated" , storageDevice.getCanCreateBrick ( ) ) ; }

Target:
public void updateIsFreeFlag ( ) { org.ovirt.engine.core.common.businessentities.gluster.StorageDevice storageDevice = dao.get ( org.ovirt.engine.core.dao.gluster.StoageDeviceDaoTest.EXISTING_STORAGE_DEVICE_ID_2 ) ; org.junit.jupiter.api.Assertions.assertNotNull ( storageDevice , "storage device doesn't exists" ) ; dao.updateIsFreeFlag ( org.ovirt.engine.core.dao.gluster.StoageDeviceDaoTest.EXISTING_STORAGE_DEVICE_ID_2 , false ) ; storageDevice = dao.get ( org.ovirt.engine.core.dao.gluster.StoageDeviceDaoTest.EXISTING_STORAGE_DEVICE_ID_2 ) ; org.junit.jupiter.api.Assertions.assertFalse ( storageDevice.getCanCreateBrick ( ) , "canCreateBrick is not updated" ) ; dao.updateIsFreeFlag ( org.ovirt.engine.core.dao.gluster.StoageDeviceDaoTest.EXISTING_STORAGE_DEVICE_ID_2 , true ) ; storageDevice = dao.get ( org.ovirt.engine.core.dao.gluster.StoageDeviceDaoTest.EXISTING_STORAGE_DEVICE_ID_2 ) ; org.junit.jupiter.api.Assertions.assertTrue ( storageDevice.getCanCreateBrick ( ) , "canCreateBrick is not updated" ) ; }
Source:
public java.lang.Object runInTransaction ( ) { HandleVdsInformation ( ) ; vm.setRunOnVds ( getVdsId ( ) ) ; org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmDynamicDao ( ) . update ( vm.getDynamicData ( ) ) ; return null ; }

Target:
public java.lang.Object runInTransaction ( ) { handleVdsInformation ( ) ; vm.setRunOnVds ( getVdsId ( ) ) ; if ( getParameters ( ) . isClearHibernationVolumes ( ) ) { vm.setHibernationVolHandle ( StringUtils.EMPTY ) ; } org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmDynamicDao ( ) . update ( vm.getDynamicData ( ) ) ; return null ; }
Source:
public void testGetVmssIdsForOvfUpdateOneVm ( ) { vmAndTemplatesGenerationsDao.updateOvfGenerations ( java.util.Collections.singletonList ( FixturesTool.VM_RHEL5_POOL_50 ) , java.util.Collections.singletonList ( java.lang.Long.valueOf ( 0 ) ) , java.util.Arrays.asList ( "a" ) ) ; java.util.List < org.ovirt.engine.core.compat.Guid > guids = vmAndTemplatesGenerationsDao.getVmsIdsForOvfUpdate ( FixturesTool.STORAGE_POOL_RHEL6_ISCSI_OTHER ) ; org.junit.Assert.assertEquals ( "one vm should need ovf update" , 1 , guids.size ( ) ) ; org.junit.Assert.assertEquals ( "wrong vm returned as in need for ovf update" , FixturesTool.VM_RHEL5_POOL_50 , guids.get ( 0 ) ) ; }

Target:
public void testGetVmssIdsForOvfUpdateOneVm ( ) { vmAndTemplatesGenerationsDao.updateOvfGenerations ( java.util.Collections.singletonList ( FixturesTool.VM_RHEL5_POOL_50 ) , java.util.Collections.singletonList ( 0L ) , java.util.Collections.singletonList ( "a" ) ) ; java.util.List < org.ovirt.engine.core.compat.Guid > guids = vmAndTemplatesGenerationsDao.getVmsIdsForOvfUpdate ( FixturesTool.STORAGE_POOL_RHEL6_ISCSI_OTHER ) ; org.junit.Assert.assertEquals ( "one vm should need ovf update" , 1 , guids.size ( ) ) ; org.junit.Assert.assertEquals ( "wrong vm returned as in need for ovf update" , FixturesTool.VM_RHEL5_POOL_50 , guids.get ( 0 ) ) ; }
Source:
public void testAddLabelToNicAndValidateWhenUsingValidLabel ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface vdsNetworkInterface = createVdsNetworkInterfaceWithName ( ) ; vdsNetworkInterface.setLabels ( new java.util.HashSet < java.lang.String > ( ) ) ; java.util.List < java.lang.Class < ? > > validationGroups = java.util.Arrays.< java.lang.Class < ? > > asList ( javax.validation.groups.Default.class , org.ovirt.engine.core.common.validation.group.UpdateEntity.class , org.ovirt.engine.core.common.validation.group.CreateEntity.class ) ; org.junit.Assert.assertThat ( new org.ovirt.engine.core.bll.validator.HostInterfaceValidator ( vdsNetworkInterface ) . addLabelToNicAndValidate ( "ok" , validationGroups ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }

Target:
public void testAddLabelToNicAndValidateWhenUsingValidLabel ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface vdsNetworkInterface = createVdsNetworkInterfaceWithName ( ) ; vdsNetworkInterface.setLabels ( new java.util.HashSet < java.lang.String > ( ) ) ; org.ovirt.engine.core.bll.validator.HostInterfaceValidator validator = new org.ovirt.engine.core.bll.validator.HostInterfaceValidator ( vdsNetworkInterface ) ; org.junit.Assert.assertThat ( validator.addLabelToNicAndValidate ( "ok" , java.util.Collections.< java.lang.Class < ? > > emptyList ( ) ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }
Source:
public static void getAttachedTagsToUser ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.setAttachedTagsConverter ( aQuery ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetTagsByUserId , new org.ovirt.engine.core.common.queries.GetTagsByUserIdParameters ( id.toString ( ) ) , aQuery ) ; }

Target:
public static void getNetworkList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override 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.network.Network > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.Network > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllNetworks , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) , aQuery ) ; }
Source:
public void calculateNetworkImplementationDetailsNetworkIsSync ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface = createNetworkDevice ( ) ; calculateNetworkImplementationDetailsAndAssertSync ( iface , true , iface.getNetworkName ( ) , iface.isBridged ( ) , iface.getMtu ( ) , iface.getVlanId ( ) ) ; }

Target:
public void calculateNetworkImplementationDetailsNetworkIsSync ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface = createNetworkDevice ( ) ; calculateNetworkImplementationDetailsAndAssertSync ( iface , true , iface.getNetworkName ( ) , iface.isBridged ( ) , iface.getMtu ( ) , iface.getVlanId ( ) , createQos ( ) ) ; }
Source:
private void writeStructMembers ( org.ovirt.api.metamodel.tool.XmlWriter writer , org.ovirt.api.metamodel.concepts.StructType type ) { writer.writeStartElement ( org.ovirt.api.metamodel.tool.SchemaGenerator.XS_URI , "sequence" ) ; for ( org.ovirt.api.metamodel.concepts.Attribute attribute : type.getDeclaredAttributes ( ) ) { writeStructMemberAsElement ( writer , attribute ) ; } for ( org.ovirt.api.metamodel.concepts.Link link : type.getDeclaredLinks ( ) ) { writeStructMemberAsElement ( writer , link ) ; } writer.writeEndElement ( ) ; }

Target:
private void writeStructMembers ( org.ovirt.api.metamodel.concepts.StructType type ) { writer.writeStartElement ( org.ovirt.api.metamodel.tool.SchemaGenerator.XS_URI , "sequence" ) ; for ( org.ovirt.api.metamodel.concepts.Attribute attribute : type.getDeclaredAttributes ( ) ) { writeStructMember ( attribute ) ; } for ( org.ovirt.api.metamodel.concepts.Link link : type.getDeclaredLinks ( ) ) { writeStructMember ( link ) ; } writer.writeEndElement ( ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc extendImageTransferSession ( java.lang.String ticketId , long expiration ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.extendImageTransferSession ( ticketId , expiration ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc remove_image_ticket ( java.lang.String ticketId ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.remove_image_ticket ( ticketId ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
Source:
public static void getVnicProfilesByNetworkId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid networkId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override 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.network.VnicProfileView > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVnicProfilesByNetworkId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( networkId ) , aQuery ) ; }

Target:
public static void getVmGuestAgentInterfacesByVmId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid vmId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override 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.VmGuestAgentInterface > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmGuestAgentInterfacesByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) , aQuery ) ; }
Source:
private boolean useMac ( long mac , boolean allowDuplicates ) { org.ovirt.engine.core.bll.network.macpoolmanager.Range range = findIncludingRange ( mac ) ; if ( range == null ) { return customMacs.add ( mac , allowDuplicates ) ; } else { return range.use ( mac , allowDuplicates ) ; } }

Target:
private boolean useMac ( long mac , boolean allowDuplicates ) { org.ovirt.engine.core.bll.network.macpoolmanager.Range range = findIncludingRange ( mac ) ; if ( range == null ) { return customMacs.increase ( mac , allowDuplicates ) ; } else { return range.use ( mac , allowDuplicates ) ; } }
Source:
protected void updateHosts ( ) { updateHostList ( getProviderSearchFilter ( ) . getEntity ( ) ) ; }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object result ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ExternalComputeResource > computeResources = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ExternalComputeResource > ) ( result ) ) ; org.ovirt.engine.ui.uicommonweb.models.ListModel externalComputeResourceListModel = getExternalComputeResource ( ) ; externalComputeResourceListModel.setItems ( computeResources ) ; externalComputeResourceListModel.setIsChangable ( true ) ; }
Source:
protected void endWithFailure ( ) { org.ovirt.engine.core.bll.HibernateVmCommand.revertTasks ( ) ; if ( ( org.ovirt.engine.core.bll.HibernateVmCommand.getVm ( ) . getRunOnVds ( ) ) != null ) { org.ovirt.engine.core.bll.HibernateVmCommand.getSnapshotDAO ( ) . removeMemoryFromActiveSnapshot ( org.ovirt.engine.core.bll.HibernateVmCommand.getVmId ( ) ) ; org.ovirt.engine.core.bll.HibernateVmCommand.setSucceeded ( true ) ; } else { org.ovirt.engine.core.bll.HibernateVmCommand.log.warn ( "VM '{}' doesn't have 'run_on_vds' value - not clearing 'hibernation_vol_handle' info." , org.ovirt.engine.core.bll.HibernateVmCommand.getVm ( ) . getName ( ) ) ; org.ovirt.engine.core.bll.HibernateVmCommand.getReturnValue ( ) . setEndActionTryAgain ( false ) ; } }

Target:
protected void perform ( ) { addMemoryDisk ( ) ; addMetadataDisk ( ) ; org.ovirt.engine.core.bll.HibernateVmCommand.setSucceeded ( true ) ; }
Source:
static org.ovirt.engine.api.model.CpuTune stringToCpuTune ( java.lang.String cpuPinning ) { if ( ( cpuPinning == null ) || ( cpuPinning.equals ( "" ) ) ) { return null ; } final org.ovirt.engine.api.model.CpuTune cpuTune = new org.ovirt.engine.api.model.CpuTune ( ) ; for ( java.lang.String strCpu : cpuPinning.split ( "_" ) ) { org.ovirt.engine.api.model.VCpuPin pin = org.ovirt.engine.api.restapi.types.VmMapper.stringToVCpupin ( strCpu ) ; cpuTune.getVcpuPin ( ) . add ( pin ) ; } return cpuTune ; }

Target:
static org.ovirt.engine.api.model.CpuTune stringToCpuTune ( java.lang.String cpuPinning ) { if ( ( cpuPinning == null ) || ( cpuPinning.equals ( "" ) ) ) { return null ; } final org.ovirt.engine.api.model.CpuTune cpuTune = new org.ovirt.engine.api.model.CpuTune ( ) ; for ( java.lang.String strCpu : cpuPinning.split ( "_" ) ) { org.ovirt.engine.api.model.VCpuPin pin = org.ovirt.engine.api.restapi.types.VmMapper.stringToVCpupin ( strCpu ) ; cpuTune.getVCpuPin ( ) . add ( pin ) ; } return cpuTune ; }
Source:
public int hashCode ( ) { if ( this . hashCodeDirty ) { final int prime = ovirt_engine_dwh.configurationsync_4_1.ConfigurationSync.updateFirstSyncStruct.PRIME ; int result = ovirt_engine_dwh.configurationsync_4_1.ConfigurationSync.updateFirstSyncStruct.DEFAULT_HASHCODE ; result = ( prime * result ) + ( ( this . var_name ) == null ? 0 : this . var_name.hashCode ( ) ) ; this . hashCode = result ; this . hashCodeDirty = false ; } return this . hashCode ; }

Target:
public int hashCode ( ) { if ( this . hashCodeDirty ) { final int prime = ovirt_engine_dwh.configurationsync_4_1.ConfigurationSync.copyOfupdateFirstSyncStruct.PRIME ; int result = ovirt_engine_dwh.configurationsync_4_1.ConfigurationSync.copyOfupdateFirstSyncStruct.DEFAULT_HASHCODE ; result = ( prime * result ) + ( ( this . var_name ) == null ? 0 : this . var_name.hashCode ( ) ) ; this . hashCode = result ; this . hashCodeDirty = false ; } return this . hashCode ; }
Source:
public static void getDiskList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override 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.DiskImage > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > ( ) ; } } ; org.ovirt.engine.core.common.queries.SearchParameters searchParams = new org.ovirt.engine.core.common.queries.SearchParameters ( "Disks:" , org.ovirt.engine.core.common.interfaces.SearchType.Disk ) ; searchParams.setMaxCount ( 9999 ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.Search , searchParams , aQuery ) ; }

Target:
public static void getVmConfigurationBySnapshot ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid snapshotSourceId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override 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.VM ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVmConfigurationBySnapshot , new org.ovirt.engine.core.common.queries.IdQueryParameters ( snapshotSourceId ) , aQuery ) ; }
Source:
private void setDiskList ( org.ovirt.engine.core.common.businessentities.VmTemplate vmTemplate ) { for ( org.ovirt.engine.core.common.businessentities.DiskImage diskImage : getDiskImageList ( ) ) { vmTemplate.getDiskList ( ) . add ( diskImage ) ; } java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.DiskImage > diskImageTemplate = getDiskImageTempalteList ( ) ; for ( org.ovirt.engine.core.compat.Guid key : diskImageTemplate.keySet ( ) ) { vmTemplate.getDiskMap ( ) . put ( key , diskImageTemplate.get ( key ) ) ; } }

Target:
private static void setDiskList ( org.ovirt.engine.core.common.businessentities.VmTemplate vmTemplate ) { for ( org.ovirt.engine.core.common.businessentities.DiskImage diskImage : org.ovirt.engine.core.bll.CommonVmPoolWithVmsCommandTestAbstract.getDiskImageList ( ) ) { vmTemplate.getDiskList ( ) . add ( diskImage ) ; } java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.DiskImage > diskImageTemplate = org.ovirt.engine.core.bll.CommonVmPoolWithVmsCommandTestAbstract.getDiskImageTempalteList ( ) ; for ( org.ovirt.engine.core.compat.Guid key : diskImageTemplate.keySet ( ) ) { vmTemplate.getDiskMap ( ) . put ( key , diskImageTemplate.get ( key ) ) ; } }
Source:
protected void onLoadingStateChanged ( com.google.gwt.user.cellview.client.LoadingStateChangeEvent.LoadingState state ) { super . onLoadingStateChanged ( state ) ; if ( state == ( com.google.gwt.user.cellview.client.LoadingStateChangeEvent.LoadingState.LOADED ) ) { com.google.gwt.core.client.Scheduler.get ( ) . scheduleDeferred ( new com.google.gwt.core.client.Scheduler.ScheduledCommand ( ) { @ java.lang.Override public void execute ( ) { enforceScrollPosition ( ) ; doAutoSelect = true ; } } ) ; } }

Target:
protected void onLoadingStateChanged ( com.google.gwt.user.cellview.client.LoadingStateChangeEvent.LoadingState state ) { super . onLoadingStateChanged ( state ) ; enforceScrollPosition ( ) ; if ( state == ( com.google.gwt.user.cellview.client.LoadingStateChangeEvent.LoadingState.LOADING ) ) { com.google.gwt.core.client.Scheduler.get ( ) . scheduleDeferred ( new com.google.gwt.core.client.Scheduler.ScheduledCommand ( ) { @ java.lang.Override public void execute ( ) { doAutoSelect = true ; } } ) ; } }
Source:
public void getAllTemplatesFromExportDomain ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.compat.Guid storageDomainId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? source : new java.util.HashMap < org.ovirt.engine.core.common.businessentities.VmTemplate , java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > > ( ) ; } } ; org.ovirt.engine.core.common.queries.GetAllFromExportDomainQueryParameters getAllFromExportDomainQueryParamenters = new org.ovirt.engine.core.common.queries.GetAllFromExportDomainQueryParameters ( storagePoolId , storageDomainId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetTemplatesFromExportDomain , getAllFromExportDomainQueryParamenters , aQuery ) ; }

Target:
public void getPermittedStorageDomainsByStoragePoolId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId , org.ovirt.engine.core.common.businessentities.ActionGroup actionGroup ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override 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.StorageDomain > ( ) ; } return source ; } } ; org.ovirt.engine.core.common.queries.GetPermittedStorageDomainsByStoragePoolIdParameters params = new org.ovirt.engine.core.common.queries.GetPermittedStorageDomainsByStoragePoolIdParameters ( ) ; params.setStoragePoolId ( dataCenterId ) ; params.setActionGroup ( actionGroup ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetPermittedStorageDomainsByStoragePoolId , params , aQuery ) ; }
Source:
protected void initFrontend ( ) { frontend.setEventsHandler ( frontendEventsHandler ) ; frontend.getFrontendFailureEvent ( ) . addListener ( frontendFailureEventListener ) ; frontend.getFrontendNotLoggedInEvent ( ) . addListener ( new org.ovirt.engine.ui.uicompat.IEventListener ( ) { @ java.lang.Override public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { user.logout ( ) ; } } ) ; frontend.setFilterQueries ( filterFrontendQueries ( ) ) ; }

Target:
public void onLoginSuccess ( ) { com.google.gwt.core.client.Scheduler.get ( ) . scheduleDeferred ( new com.google.gwt.core.client.Scheduler.ScheduledCommand ( ) { @ java.lang.Override public void execute ( ) { frontend.runQuery ( VdcQueryType.GetEngineSessionIdToken , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , new org.ovirt.engine.ui.frontend.AsyncQuery ( new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { java.lang.String engineAuthToken = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ; restApiSessionManager.acquireSession ( engineAuthToken ) ; } } ) ) ; } } ) ; }
Source:
public void testUpdate ( ) { org.ovirt.engine.core.common.businessentities.Tags tag = createTag ( "tag1" , "desc1" ) ; tagsDirector.addTag ( tag ) ; tag.settag_name ( "new name" ) ; tagsDirector.updateTag ( tag ) ; org.ovirt.engine.core.common.businessentities.Tags fromDirector = tagsDirector.getTagById ( tag.gettag_id ( ) ) ; org.junit.Assert.assertEquals ( tag.gettag_name ( ) , fromDirector.gettag_name ( ) ) ; }

Target:
public void testUpdate ( ) { org.ovirt.engine.core.common.businessentities.Tags tag = createTag ( "tag1" , "desc1" ) ; tagsDirector.addTag ( tag ) ; tag.setTagName ( "new name" ) ; tagsDirector.updateTag ( tag ) ; org.ovirt.engine.core.common.businessentities.Tags fromDirector = tagsDirector.getTagById ( tag.getTagId ( ) ) ; org.junit.Assert.assertEquals ( tag.getTagName ( ) , fromDirector.getTagName ( ) ) ; }
Source:
private java.util.List < java.lang.String > getUsedKeys ( ) { if ( ( keyValueMap_used ) == null ) { return new java.util.ArrayList < java.lang.String > ( ) ; } else { return new java.util.ArrayList < java.lang.String > ( keyValueMap_used.keySet ( ) ) ; } }

Target:
protected void setValueByKey ( org.ovirt.engine.ui.uicommonweb.models.vms.key_value.KeyValueLineModel lineModel , java.lang.String key ) { if ( allRegExKeys.containsKey ( key ) ) { lineModel.getValues ( ) . setSelectedItem ( keyValueMap_used.get ( key ) ) ; } else { lineModel.getValue ( ) . setEntity ( keyValueMap_used.get ( key ) ) ; } }
Source:
public void testValidateAndSetStorageQuotaGlobalInGrace ( ) throws java.lang.Exception { java.util.List < org.ovirt.engine.core.bll.quota.StorageQuotaValidationParameter > parameters = new java.util.ArrayList < org.ovirt.engine.core.bll.quota.StorageQuotaValidationParameter > ( ) ; parameters.add ( new org.ovirt.engine.core.bll.quota.StorageQuotaValidationParameter ( org.ovirt.engine.core.bll.quota.QuotaManagerTest.STORAGE_QUOTA_GLOBAL_IN_GRACE , org.ovirt.engine.core.bll.quota.QuotaManagerTest.DESTINATION_GUID , 1 ) ) ; org.junit.Assert.assertTrue ( quotaManager.validateAndSetStorageQuota ( storage_pool , parameters , canDoActionMessages ) ) ; assertEmptyCanDoActionMessage ( ) ; assertAuditLogWritten ( ) ; }

Target:
public void testValidateAndSetStorageQuotaSpecificInGrace ( ) throws java.lang.Exception { org.junit.Assert.assertTrue ( consumeForStorageQuota ( org.ovirt.engine.core.bll.quota.QuotaManagerTest.STORAGE_QUOTA_SPECIFIC_IN_GRACE ) ) ; assertEmptyCanDoActionMessage ( ) ; assertAuditLogWritten ( ) ; }
Source:
public static void getVmNicList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ) ( source ) ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmInterfacesByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }

Target:
public static void getLunsByVgId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String vgId , org.ovirt.engine.core.compat.Guid vdsId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override 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.LUNs > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.LUNs > ( ) ; } } ; org.ovirt.engine.core.common.queries.GetLunsByVgIdParameters params = new org.ovirt.engine.core.common.queries.GetLunsByVgIdParameters ( vgId , vdsId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetLunsByVgId , params , aQuery ) ; }
Source:
protected boolean isOSSupportingHotPlug ( ) { java.lang.String vmOs = org.ovirt.engine.core.bll.VmCommand.getVm ( ) . getos ( ) . name ( ) ; java.lang.String [ ] oses = org.ovirt.engine.core.common.config.Config.< java.lang.String > GetValue ( ConfigValues.HotPlugSupportedOsList ) . split ( "," ) ; for ( java.lang.String os : oses ) { if ( os.equalsIgnoreCase ( vmOs ) ) { return true ; } } addCanDoActionMessage ( VdcBllMessages.ACTION_TYPE_FAILED_GUEST_OS_VERSION_IS_NOT_SUPPORTED ) ; return false ; }

Target:
protected boolean isOSSupportingHotPlug ( ) { java.lang.String vmOs = org.ovirt.engine.core.bll.VmCommand.getVm ( ) . getos ( ) . name ( ) ; java.lang.String [ ] unsupportedOSs = org.ovirt.engine.core.common.config.Config.< java.lang.String > GetValue ( ConfigValues.HotPlugUnsupportedOsList ) . split ( "," ) ; for ( java.lang.String os : unsupportedOSs ) { if ( os.equalsIgnoreCase ( vmOs ) ) { addCanDoActionMessage ( VdcBllMessages.ACTION_TYPE_FAILED_GUEST_OS_VERSION_IS_NOT_SUPPORTED ) ; return false ; } } return true ; }
Source:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { super . eventRaised ( ev , sender , args ) ; if ( ev.equals ( org.ovirt.engine.ui.uicommonweb.models.EntityModel.EntityChangedEventDefinition ) ) { OnEntityChanged ( ) ; } else if ( ev.equals ( ProvidePropertyChangedEvent.Definition ) ) { EntityPropertyChanged ( sender , ( ( org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ) ( args ) ) ) ; } }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { super . eventRaised ( ev , sender , args ) ; if ( ev.matchesDefinition ( org.ovirt.engine.ui.uicommonweb.models.EntityModel.EntityChangedEventDefinition ) ) { OnEntityChanged ( ) ; } else if ( ev.matchesDefinition ( ProvidePropertyChangedEvent.Definition ) ) { EntityPropertyChanged ( sender , ( ( org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ) ( args ) ) ) ; } }