auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public org.ovirt.engine.ui.common.presenter.AbstractModelBoundPopupPresenterWidget < ? extends org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel , ? > getConfirmModelPopup ( org.ovirt.engine.ui.uicommonweb.models.hosts.HostListModel < java.lang.Void > source , org.ovirt.engine.ui.uicommonweb.UICommand lastExecutedCommand ) { if ( lastExecutedCommand == ( getModel ( ) . getRemoveCommand ( ) ) ) { return removeConfirmPopupProvider.get ( ) ; } else if ( lastExecutedCommand == ( getModel ( ) . getManualFenceCommand ( ) ) ) { return manualFenceConfirmPopupProvider.get ( ) ; } else { return super . getConfirmModelPopup ( source , lastExecutedCommand ) ; } }

Target:
public org.ovirt.engine.ui.common.presenter.AbstractModelBoundPopupPresenterWidget < ? extends org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel , ? > getConfirmModelPopup ( org.ovirt.engine.ui.uicommonweb.models.hosts.HostListModel < java.lang.Void > source , org.ovirt.engine.ui.uicommonweb.UICommand lastExecutedCommand ) { if ( ( lastExecutedCommand == ( getModel ( ) . getRemoveCommand ( ) ) ) || ( lastExecutedCommand == ( getModel ( ) . getMaintenanceCommand ( ) ) ) ) { return removeConfirmPopupProvider.get ( ) ; } else if ( lastExecutedCommand == ( getModel ( ) . getManualFenceCommand ( ) ) ) { return manualFenceConfirmPopupProvider.get ( ) ; } else { return super . getConfirmModelPopup ( source , lastExecutedCommand ) ; } }
Source:
private void logDeviceInformation ( org.ovirt.engine.core.compat.Guid vmId , org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcStruct device ) { java.lang.String message = "Recieved a {0} Device without an address when processing VM {1} devices, skipping device" ; java.lang.String deviceType = org.ovirt.engine.core.vdsbroker.VdsUpdateRunTimeInfo.getDeviceType ( device ) ; if ( shouldLogDeviceDetails ( deviceType ) ) { java.util.Map < java.lang.String , java.lang.Object > deviceInfo = device.getInnerMap ( ) ; org.ovirt.engine.core.vdsbroker.VdsUpdateRunTimeInfo.log.infoFormat ( ( message + ": {2}" ) , org.apache.commons.lang.StringUtils.defaultIfEmpty ( deviceType , StringUtils.EMPTY ) , vmId , deviceInfo.toString ( ) ) ; } else { org.ovirt.engine.core.vdsbroker.VdsUpdateRunTimeInfo.log.infoFormat ( message , org.apache.commons.lang.StringUtils.defaultIfEmpty ( deviceType , StringUtils.EMPTY ) , vmId ) ; } }

Target:
private void logDeviceInformation ( org.ovirt.engine.core.compat.Guid vmId , org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcStruct device ) { java.lang.String message = "Received a {0} Device without an address when processing VM {1} devices, skipping device" ; java.lang.String deviceType = org.ovirt.engine.core.vdsbroker.VdsUpdateRunTimeInfo.getDeviceType ( device ) ; if ( shouldLogDeviceDetails ( deviceType ) ) { java.util.Map < java.lang.String , java.lang.Object > deviceInfo = device.getInnerMap ( ) ; org.ovirt.engine.core.vdsbroker.VdsUpdateRunTimeInfo.log.infoFormat ( ( message + ": {2}" ) , org.apache.commons.lang.StringUtils.defaultIfEmpty ( deviceType , StringUtils.EMPTY ) , vmId , deviceInfo.toString ( ) ) ; } else { org.ovirt.engine.core.vdsbroker.VdsUpdateRunTimeInfo.log.infoFormat ( message , org.apache.commons.lang.StringUtils.defaultIfEmpty ( deviceType , StringUtils.EMPTY ) , vmId ) ; } }
Source:
public org.ovirt.engine.sdk.decorators.StorageDomain update ( ) throws java.io.IOException , org.apache.http.client.ClientProtocolException , org.ovirt.engine.sdk.exceptions.ServerException { java.lang.String url = this . getHref ( ) ; java.util.List < org.apache.http.Header > headers = new org.ovirt.engine.sdk.utils.HttpHeaderBuilder ( ) . build ( ) ; url = new org.ovirt.engine.sdk.utils.UrlBuilder ( url ) . build ( ) ; return getProxy ( ) . update ( url , this , org.ovirt.engine.sdk.entities.StorageDomain.class , org.ovirt.engine.sdk.decorators.StorageDomain.class , headers ) ; }

Target:
public org.ovirt.engine.sdk.decorators.StorageDomain update ( ) throws java.io.IOException , org.apache.http.client.ClientProtocolException , org.ovirt.engine.sdk.exceptions.ServerException { java.lang.String url = this . getHref ( ) ; org.ovirt.engine.sdk.utils.HttpHeaderBuilder headersBuilder = new org.ovirt.engine.sdk.utils.HttpHeaderBuilder ( ) ; java.util.List < org.apache.http.Header > headers = headersBuilder.build ( ) ; org.ovirt.engine.sdk.utils.UrlBuilder urlBuilder = new org.ovirt.engine.sdk.utils.UrlBuilder ( url ) ; url = urlBuilder.build ( ) ; return getProxy ( ) . update ( url , this , org.ovirt.engine.sdk.entities.StorageDomain.class , org.ovirt.engine.sdk.decorators.StorageDomain.class , headers ) ; }
Source:
protected int calcEvenDistributionScore ( float maxMemoryOfVdsInCluster , org.ovirt.engine.core.common.businessentities.VDS vds , org.ovirt.engine.core.common.businessentities.VM vm , boolean countThreadsAsCores ) { int score = ( MaxSchedulerWeight ) - 1 ; java.lang.Integer effectiveCpuCores = org.ovirt.engine.core.bll.scheduling.SlaValidator.getEffectiveCpuCores ( vds , countThreadsAsCores ) ; if ( ( effectiveCpuCores != null ) && ( ( vds.getUsageCpuPercent ( ) ) != null ) ) { score = java.lang.Math.min ( ( ( ( int ) ( java.lang.Math.round ( calcDistributeMetric ( vds , vm , effectiveCpuCores ) ) ) ) + 1 ) , org.ovirt.engine.core.bll.scheduling.policyunits.MaxSchedulerWeight ) ; } return score ; }

Target:
protected int calcHostScore ( org.ovirt.engine.core.common.businessentities.VDS vds , org.ovirt.engine.core.common.businessentities.VM vm , boolean countThreadsAsCores ) { int score = ( MaxSchedulerWeight ) - 1 ; java.lang.Integer effectiveCpuCores = org.ovirt.engine.core.bll.scheduling.SlaValidator.getEffectiveCpuCores ( vds , countThreadsAsCores ) ; if ( ( effectiveCpuCores != null ) && ( ( vds.getUsageCpuPercent ( ) ) != null ) ) { score = java.lang.Math.min ( ( ( ( int ) ( java.lang.Math.round ( calcDistributeMetric ( vds , vm , effectiveCpuCores ) ) ) ) + 1 ) , org.ovirt.engine.core.bll.scheduling.policyunits.MaxSchedulerWeight ) ; } return score ; }
Source:
public static java.io.File makeFileFromSanePath ( java.lang.String path , java.io.File base ) { java.io.File file = null ; if ( path == null ) { file = base ; } else if ( ! ( org.ovirt.engine.core.utils.servlet.ServletUtils.isSane ( path ) ) ) { org.ovirt.engine.core.utils.servlet.ServletUtils.log.error ( ( ( "The path \"" + path ) + "\" is not sane, will return null." ) ) ; } else { file = new java.io.File ( base , path ) ; } return file ; }

Target:
public static java.io.File makeFileFromSanePath ( java.lang.String path , java.io.File base ) { java.io.File file = null ; if ( path == null ) { file = base ; } else if ( ! ( org.ovirt.engine.core.utils.servlet.ServletUtils.isSane ( path ) ) ) { org.ovirt.engine.core.utils.servlet.ServletUtils.log.error ( "The path '{}' is not sane, will return null." , path ) ; } else { file = new java.io.File ( base , path ) ; } return file ; }
Source:
protected java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.DiskImage > getImages ( ) { return new java.util.ArrayList ( ( ( org.ovirt.engine.core.bll.exportimport.ImportVmTemplateFromConfigurationCommand.getParameters ( ) . getDiskTemplateMap ( ) ) != null ? org.ovirt.engine.core.bll.exportimport.ImportVmTemplateFromConfigurationCommand.getParameters ( ) . getDiskTemplateMap ( ) . values ( ) : org.ovirt.engine.core.bll.exportimport.ImportVmTemplateFromConfigurationCommand.getVmTemplate ( ) . getDiskTemplateMap ( ) . values ( ) ) ) ; }

Target:
protected java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.DiskImage > getImages ( ) { if ( ( imagesList ) == null ) { imagesList = new java.util.ArrayList ( ( ( org.ovirt.engine.core.bll.exportimport.ImportVmTemplateFromConfigurationCommand.getParameters ( ) . getDiskTemplateMap ( ) ) != null ? org.ovirt.engine.core.bll.exportimport.ImportVmTemplateFromConfigurationCommand.getParameters ( ) . getDiskTemplateMap ( ) . values ( ) : org.ovirt.engine.core.bll.exportimport.ImportVmTemplateFromConfigurationCommand.getVmTemplate ( ) . getDiskTemplateMap ( ) . values ( ) ) ) ; } return imagesList ; }
Source:
private void setupMock ( ) { org.ovirt.engine.core.common.vdscommands.VDSReturnValue returnValue = new org.ovirt.engine.core.common.vdscommands.VDSReturnValue ( ) ; returnValue.setSucceeded ( true ) ; returnValue.setReturnValue ( expectedProfileInfo ) ; org.mockito.Mockito.doReturn ( returnValue ) . when ( getQuery ( ) ) . runVdsCommand ( org.mockito.Matchers.eq ( VDSCommandType.GetGlusterVolumeProfileInfo ) , org.mockito.Matchers.any ( org.ovirt.engine.core.common.vdscommands.VDSParametersBase.class ) ) ; }

Target:
private void setupMock ( ) { org.ovirt.engine.core.common.vdscommands.VDSReturnValue returnValue = new org.ovirt.engine.core.common.vdscommands.VDSReturnValue ( ) ; returnValue.setSucceeded ( true ) ; returnValue.setReturnValue ( expectedProfileInfo ) ; org.mockito.Mockito.doReturn ( returnValue ) . when ( getQuery ( ) ) . runVdsCommand ( org.mockito.ArgumentMatchers.eq ( VDSCommandType.GetGlusterVolumeProfileInfo ) , org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.common.vdscommands.VDSParametersBase.class ) ) ; }
Source:
protected org.ovirt.engine.api.model.Disk deprecatedPopulate ( org.ovirt.engine.api.model.Disk model , org.ovirt.engine.api.model.Disk entity ) { org.ovirt.engine.api.model.Disk populatedDisk = super . doPopulate ( model , entity ) ; populatedDisk.setStorageDomain ( new org.ovirt.engine.api.model.StorageDomain ( ) ) ; populatedDisk.getStorageDomain ( ) . setId ( this . storageDomainId ) ; return model ; }

Target:
public javax.ws.rs.core.Response copy ( org.ovirt.engine.api.model.Action action ) { return getDelegate ( ) . copy ( action ) ; }
Source:
public static void getGlusterHostsNewlyAdded ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId , boolean isFingerprintRequired ) { 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 ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAddedGlusterServers , new org.ovirt.engine.core.common.queries.gluster.AddedGlusterServersParameters ( clusterId , isFingerprintRequired ) , aQuery ) ; }

Target:
public static void getHostPublicKey ( 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.lang.String ) ( source ) ) : "" ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetServerSSHPublicKey , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }
Source:
protected void updateIsDiskHotPlugAvailable ( ) { org.ovirt.engine.core.common.businessentities.VM vm = getEntity ( ) ; org.ovirt.engine.core.compat.Version clusterCompatibilityVersion = vm.getVdsGroupCompatibilityVersion ( ) ; if ( clusterCompatibilityVersion == null ) { setIsDiskHotPlugSupported ( false ) ; } else { setIsDiskHotPlugSupported ( ( ! ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getDiskHotpluggableInterfaces ( getEntity ( ) . getOs ( ) , clusterCompatibilityVersion ) . isEmpty ( ) ) ) ) ; } }

Target:
protected void updateIsDiskHotPlugAvailable ( ) { org.ovirt.engine.core.common.businessentities.VM vm = getEntity ( ) ; org.ovirt.engine.core.compat.Version compatibilityVersion = vm.getCompatibilityVersion ( ) ; if ( compatibilityVersion == null ) { setIsDiskHotPlugSupported ( false ) ; } else { setIsDiskHotPlugSupported ( ( ! ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getDiskHotpluggableInterfaces ( getEntity ( ) . getOs ( ) , compatibilityVersion ) . isEmpty ( ) ) ) ) ; } }
Source:
private void doTestBadAddMacPool ( boolean valid , boolean success , java.lang.String detail ) throws java.lang.Exception { setUriInfo ( setUpActionExpectations ( VdcActionType.AddMacPool , org.ovirt.engine.core.common.action.MacPoolParameters.class , new java.lang.String [ ] { } , new java.lang.Object [ ] { } , valid , success ) ) ; org.ovirt.engine.api.model.MacPool model = org.ovirt.engine.api.restapi.resource.BackendMacPoolsResourceTest.getModel ( 0 ) ; try { collection.add ( model ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , detail ) ; } }

Target:
private void doTestBadAddMacPool ( boolean valid , boolean success , java.lang.String detail ) throws java.lang.Exception { setUriInfo ( setUpActionExpectations ( ActionType.AddMacPool , org.ovirt.engine.core.common.action.MacPoolParameters.class , new java.lang.String [ ] { } , new java.lang.Object [ ] { } , valid , success ) ) ; org.ovirt.engine.api.model.MacPool model = org.ovirt.engine.api.restapi.resource.BackendMacPoolsResourceTest.getModel ( 0 ) ; try { collection.add ( model ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , detail ) ; } }
Source:
protected org.ovirt.engine.core.common.action.VdcReturnValueBase evaluateCorrelationId ( org.ovirt.engine.core.bll.CommandBase < ? > commandBase ) { org.ovirt.engine.core.common.action.VdcReturnValueBase returnValue = null ; returnValue = org.ovirt.engine.core.bll.job.ExecutionHandler.evaluateCorrelationId ( commandBase.getParameters ( ) ) ; if ( returnValue != null ) { org.ovirt.engine.core.bll.Backend.log.warn ( "CanDoAction of action '{}' failed. Reasons: {}" , commandBase.getActionType ( ) , org.apache.commons.lang.StringUtils.join ( returnValue.getCanDoActionMessages ( ) , ',' ) ) ; } commandBase.setCorrelationId ( commandBase.getParameters ( ) . getCorrelationId ( ) ) ; return returnValue ; }

Target:
protected org.ovirt.engine.core.common.action.VdcReturnValueBase evaluateCorrelationId ( org.ovirt.engine.core.bll.CommandBase < ? > commandBase ) { org.ovirt.engine.core.common.action.VdcReturnValueBase returnValue = null ; returnValue = org.ovirt.engine.core.bll.job.ExecutionHandler.evaluateCorrelationId ( commandBase.getParameters ( ) ) ; if ( returnValue != null ) { org.ovirt.engine.core.bll.Backend.log.warn ( "Validation of action '{}' failed. Reasons: {}" , commandBase.getActionType ( ) , org.apache.commons.lang.StringUtils.join ( returnValue.getValidationMessages ( ) , ',' ) ) ; } commandBase.setCorrelationId ( commandBase.getParameters ( ) . getCorrelationId ( ) ) ; return returnValue ; }
Source:
public org.ovirt.engine.core.bll.ValidationResult validate ( org.ovirt.engine.core.common.businessentities.VDS vds , java.lang.StringBuilder sb ) { if ( ! ( areRequiredNetworksAvailable ( vds ) ) ) { sb.append ( "is missing networks required by VM nics " ) . append ( org.ovirt.engine.core.common.businessentities.Entities.interfacesByNetworkName ( getVmNICs ( ) ) . keySet ( ) ) ; return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.dal.VdcBllMessages.ACTION_TYPE_FAILED_VDS_VM_NETWORKS ) ; } return null ; }

Target:
public org.ovirt.engine.core.dal.VdcBllMessages validate ( org.ovirt.engine.core.common.businessentities.VDS vds , java.lang.StringBuilder sb ) { if ( ! ( areRequiredNetworksAvailable ( vds ) ) ) { sb.append ( "is missing networks required by VM nics " ) . append ( org.ovirt.engine.core.common.businessentities.Entities.interfacesByNetworkName ( getVmNICs ( ) ) . keySet ( ) ) ; return org.ovirt.engine.core.dal.VdcBllMessages.ACTION_TYPE_FAILED_VDS_VM_NETWORKS ; } return null ; }
Source:
public void testAllDomainsWithinThresholdsOneLacking ( ) { domain1.getStorageDynamicData ( ) . setAvailableDiskSize ( ( ( org.ovirt.engine.core.bll.validator.storage.MultipleStorageDomainsValidatorTest.CRITICAL_SPACE_THRESHOLD ) + 1 ) ) ; domain2.getStorageDynamicData ( ) . setAvailableDiskSize ( ( ( org.ovirt.engine.core.bll.validator.storage.MultipleStorageDomainsValidatorTest.CRITICAL_SPACE_THRESHOLD ) - 1 ) ) ; domain1.setCriticalSpaceActionBlocker ( org.ovirt.engine.core.bll.validator.storage.MultipleStorageDomainsValidatorTest.CRITICAL_SPACE_THRESHOLD ) ; domain2.setCriticalSpaceActionBlocker ( org.ovirt.engine.core.bll.validator.storage.MultipleStorageDomainsValidatorTest.CRITICAL_SPACE_THRESHOLD ) ; org.ovirt.engine.core.bll.ValidationResult result = validator.allDomainsWithinThresholds ( ) ; org.junit.Assert.assertThat ( "domain2 should not be within thresholds" , result , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.ACTION_TYPE_FAILED_DISK_SPACE_LOW_ON_STORAGE_DOMAIN ) ) ; }

Target:
public void testAllDomainsWithinThresholdsOneLacking ( ) { domain1.getStorageDynamicData ( ) . setAvailableDiskSize ( ( ( org.ovirt.engine.core.bll.validator.storage.MultipleStorageDomainsValidatorTest.CRITICAL_SPACE_THRESHOLD ) + 1 ) ) ; domain2.getStorageDynamicData ( ) . setAvailableDiskSize ( ( ( org.ovirt.engine.core.bll.validator.storage.MultipleStorageDomainsValidatorTest.CRITICAL_SPACE_THRESHOLD ) - 1 ) ) ; domain1.setCriticalSpaceActionBlocker ( org.ovirt.engine.core.bll.validator.storage.MultipleStorageDomainsValidatorTest.CRITICAL_SPACE_THRESHOLD ) ; domain2.setCriticalSpaceActionBlocker ( org.ovirt.engine.core.bll.validator.storage.MultipleStorageDomainsValidatorTest.CRITICAL_SPACE_THRESHOLD ) ; org.ovirt.engine.core.bll.ValidationResult result = validator.allDomainsWithinThresholds ( ) ; org.hamcrest.MatcherAssert.assertThat ( "domain2 should not be within thresholds" , result , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.ACTION_TYPE_FAILED_DISK_SPACE_LOW_ON_STORAGE_DOMAIN ) ) ; }
Source:
private void updateShareable ( org.ovirt.engine.core.common.businessentities.VolumeType volumeType , org.ovirt.engine.core.common.businessentities.StorageType storageType ) { getIsShareable ( ) . setEntity ( false ) ; getIsShareable ( ) . setChangeProhibitionReason ( org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getConstants ( ) . shareableDiskNotSupportedByConfiguration ( ) ) ; getIsShareable ( ) . setIsChangable ( ( ! ( ( storageType.isBlockDomain ( ) ) && ( volumeType == ( org.ovirt.engine.core.common.businessentities.VolumeType.Sparse ) ) ) ) ) ; }

Target:
private void onForceSave ( ) { org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel confirmationModel = ( ( org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel ) ( getConfirmWindow ( ) ) ) ; if ( ( confirmationModel != null ) && ( ! ( confirmationModel.Validate ( ) ) ) ) { return ; } cancelConfirm ( ) ; getSanStorageModel ( ) . setForce ( true ) ; onSave ( ) ; }
Source:
public void setItems ( java.lang.Iterable value ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > disks = ( value != null ) ? org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.Disk > cast ( value ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ( ) ; org.ovirt.engine.ui.uicommonweb.Linq.sort ( disks , new org.ovirt.engine.ui.uicommonweb.Linq.DiskByAliasComparer ( ) ) ; super . setItems ( disks ) ; UpdateActionAvailability ( ) ; }

Target:
public void setItems ( java.lang.Iterable value ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > disks = ( value != null ) ? org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.Disk > cast ( value ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ( ) ; org.ovirt.engine.ui.uicommonweb.Linq.sort ( disks , new org.ovirt.engine.ui.uicommonweb.Linq.DiskByAliasComparer ( ) ) ; super . setItems ( disks ) ; updateActionAvailability ( ) ; }
Source:
boolean detectOverflowUsingScrollWidth ( com.google.gwt.dom.client.Element parent ) { int scrollWidthBefore = parent.getScrollWidth ( ) ; java.lang.String overflowValue = parent.getStyle ( ) . getProperty ( "overflow" ) ; parent.getStyle ( ) . setProperty ( "overflow" , "auto" ) ; int scrollWidthAfter = parent.getScrollWidth ( ) ; parent.getStyle ( ) . setProperty ( "overflow" , overflowValue ) ; return scrollWidthAfter > scrollWidthBefore ; }

Target:
boolean detectOverflowUsingScrollWidth ( com.google.gwt.dom.client.Element parent ) { int scrollWidthBefore = parent.getScrollWidth ( ) ; java.lang.String overflowValue = parent.getStyle ( ) . getProperty ( "overflow" ) ; parent.getStyle ( ) . setProperty ( "overflow" , "auto" ) ; int scrollWidthAfter = parent.getScrollWidth ( ) ; int clientWidthAfter = parent.getClientWidth ( ) ; parent.getStyle ( ) . setProperty ( "overflow" , overflowValue ) ; return ( scrollWidthAfter > scrollWidthBefore ) || ( scrollWidthAfter > clientWidthAfter ) ; }
Source:
public void getStorageConnectionsByDataCenterIdAndStorageType ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.common.businessentities.storage.StorageType storageType ) { 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 ; } } ; org.ovirt.engine.core.common.queries.GetConnectionsByDataCenterAndStorageTypeParameters params = new org.ovirt.engine.core.common.queries.GetConnectionsByDataCenterAndStorageTypeParameters ( storagePoolId , storageType ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetConnectionsByDataCenterAndStorageType , params , aQuery ) ; }

Target:
public void getRoleList ( org.ovirt.engine.ui.frontend.AsyncQuery < java.util.List < org.ovirt.engine.core.common.businessentities.Role > > aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.ListConverter < > ( ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllRoles , new org.ovirt.engine.core.common.queries.MultilevelAdministrationsQueriesParameters ( ) , aQuery ) ; }
Source:
public void removeAll ( org.ovirt.engine.core.compat.Guid vmId ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > interfaces = getVmNetworkInterfaceDao ( ) . getAllForVm ( vmId ) ; if ( interfaces != null ) { for ( org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface iface : interfaces ) { getMacPoolManager ( ) . freeMac ( iface.getMacAddress ( ) ) ; getVmNicDao ( ) . remove ( iface.getId ( ) ) ; getVmNetworkStatisticsDao ( ) . remove ( iface.getId ( ) ) ; } } }

Target:
public void removeAll ( org.ovirt.engine.core.compat.Guid vmId ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.VmNic > interfaces = getVmNicDao ( ) . getAllForVm ( vmId ) ; if ( interfaces != null ) { for ( org.ovirt.engine.core.common.businessentities.network.VmNic iface : interfaces ) { getMacPoolManager ( ) . freeMac ( iface.getMacAddress ( ) ) ; getVmNicDao ( ) . remove ( iface.getId ( ) ) ; getVmNetworkStatisticsDao ( ) . remove ( iface.getId ( ) ) ; } } }
Source:
protected java.util.List < org.ovirt.engine.core.common.businessentities.storage.Disk > filterDisks ( java.util.List < org.ovirt.engine.core.common.businessentities.storage.Disk > diskList ) { org.ovirt.engine.core.common.businessentities.VM vm = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmDao ( ) . get ( org.ovirt.engine.core.bll.storage.disk.GetAllAttachableDisksForVmQuery.getParameters ( ) . getVmId ( ) , org.ovirt.engine.core.bll.storage.disk.GetAllAttachableDisksForVmQuery.getUserID ( ) , org.ovirt.engine.core.bll.storage.disk.GetAllAttachableDisksForVmQuery.getParameters ( ) . isFiltered ( ) ) ; if ( vm == null ) { return new java.util.ArrayList < > ( ) ; } return doFilter ( diskList , vm.getOs ( ) , vm.getVdsGroupCompatibilityVersion ( ) ) ; }

Target:
protected java.util.List < org.ovirt.engine.core.common.businessentities.storage.Disk > filterDisks ( java.util.List < org.ovirt.engine.core.common.businessentities.storage.Disk > diskList ) { org.ovirt.engine.core.common.businessentities.VM vm = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmDao ( ) . get ( org.ovirt.engine.core.bll.storage.disk.GetAllAttachableDisksForVmQuery.getParameters ( ) . getVmId ( ) , org.ovirt.engine.core.bll.storage.disk.GetAllAttachableDisksForVmQuery.getUserID ( ) , org.ovirt.engine.core.bll.storage.disk.GetAllAttachableDisksForVmQuery.getParameters ( ) . isFiltered ( ) ) ; if ( vm == null ) { return new java.util.ArrayList < > ( ) ; } return doFilter ( diskList , vm.getOs ( ) , vm.getCompatibilityVersion ( ) ) ; }
Source:
protected void doTestBadRemove ( boolean valid , boolean success , java.lang.String detail ) { setUpEntityQueryExpectations ( 2 , 0 , false ) ; setUriInfo ( setUpActionExpectations ( ActionType.RemoveCpuProfile , org.ovirt.engine.core.common.action.CpuProfileParameters.class , new java.lang.String [ ] { } , new java.lang.Object [ ] { } , valid , success ) ) ; try { resource.remove ( ) ; org.junit.jupiter.api.Assertions.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , detail ) ; } }

Target:
protected void doTestBadRemove ( boolean valid , boolean success , java.lang.String detail ) { setUpEntityQueryExpectations ( 2 , 0 , false ) ; setUriInfo ( setUpActionExpectations ( ActionType.RemoveCpuProfile , org.ovirt.engine.core.common.action.CpuProfileParameters.class , new java.lang.String [ ] { } , new java.lang.Object [ ] { } , valid , success ) ) ; verifyFault ( org.junit.jupiter.api.Assertions.assertThrows ( javax.ws.rs.WebApplicationException.class , resource :: remove ) , detail ) ; }
Source:
public com.google.gwt.event.dom.client.HasClickHandlers addSuspendButton ( ) { org.ovirt.engine.ui.userportal.widget.basic.MainTabBasicListItemActionButton button = new org.ovirt.engine.ui.userportal.widget.basic.MainTabBasicListItemActionButton ( constants.suspendVm ( ) , resources.pauseIcon ( ) , resources.pauseDisabledIcon ( ) , style.suspendButtonAdditionalStyle ( ) ) ; this . suspendButton = button ; addButtonToPanel ( button ) ; return button ; }

Target:
public com.google.gwt.event.dom.client.HasClickHandlers addSuspendButton ( ) { org.ovirt.engine.ui.userportal.widget.basic.MainTabBasicListItemActionButton button = new org.ovirt.engine.ui.userportal.widget.basic.MainTabBasicListItemActionButton ( constants.suspendVm ( ) , resources.suspendIcon ( ) , resources.suspendDisabledIcon ( ) , style.suspendButtonAdditionalStyle ( ) ) ; this . suspendButton = button ; addButtonToPanel ( button ) ; return button ; }
Source:
public org.ovirt.engine.sdk.decorators.Network add ( org.ovirt.engine.sdk.decorators.Network network ) throws java.io.IOException , org.apache.http.client.ClientProtocolException , org.ovirt.engine.sdk.exceptions.ServerException { java.lang.String url = ( SLASH ) + ( getName ( ) ) ; return getProxy ( ) . add ( url , network , org.ovirt.engine.sdk.entities.Network.class , org.ovirt.engine.sdk.decorators.Network.class ) ; }

Target:
public org.ovirt.engine.sdk.decorators.Network add ( org.ovirt.engine.sdk.decorators.Network network ) throws java.io.IOException , org.apache.http.client.ClientProtocolException , org.ovirt.engine.sdk.exceptions.ServerException { java.lang.String url = ( SLASH ) + ( getName ( ) ) ; java.util.List < org.apache.http.Header > headers = new org.ovirt.engine.sdk.utils.HttpHeaderBuilder ( ) . build ( ) ; url = new org.ovirt.engine.sdk.utils.UrlBuilder ( url ) . build ( ) ; return getProxy ( ) . add ( url , network , org.ovirt.engine.sdk.entities.Network.class , org.ovirt.engine.sdk.decorators.Network.class , headers ) ; }
Source:
protected void setUpEntityQueryExpectations ( int times ) throws java.lang.Exception { while ( ( times -- ) > 0 ) { setUpEntityQueryExpectations ( VdcQueryType.GetVmInterfacesByVmId , org.ovirt.engine.core.common.queries.GetVmByVmIdParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { PARENT_ID } , getEntityList ( ) ) ; } }

Target:
protected void setUpEntityQueryExpectations ( int times ) throws java.lang.Exception { while ( ( times -- ) > 0 ) { setUpEntityQueryExpectations ( VdcQueryType.GetVmInterfacesByVmId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { PARENT_ID } , getEntityList ( ) ) ; } }
Source:
public org.ovirt.engine.core.common.AuditLogType getAuditLogTypeValue ( ) { switch ( org.ovirt.engine.core.bll.AddDiskCommand.getActionState ( ) ) { case EXECUTE : if ( ( org.ovirt.engine.core.bll.AddDiskCommand.getParameters ( ) . getDiskInfo ( ) . getDiskStorageType ( ) ) == ( org.ovirt.engine.core.common.businessentities.storage.DiskStorageType.IMAGE ) ) { return getExecuteAuditLogTypeValue ( org.ovirt.engine.core.bll.AddDiskCommand.getSucceeded ( ) ) ; } else { return getEndSuccessAuditLogTypeValue ( org.ovirt.engine.core.bll.AddDiskCommand.getSucceeded ( ) ) ; } case END_SUCCESS : return getEndSuccessAuditLogTypeValue ( org.ovirt.engine.core.bll.AddDiskCommand.getSucceeded ( ) ) ; default : return org.ovirt.engine.core.common.AuditLogType.USER_ADD_DISK_FINISHED_FAILURE ; } }

Target:
private boolean isDiskStorageTypeRequiresExecuteState ( ) { return ( ( org.ovirt.engine.core.bll.AddDiskCommand.getParameters ( ) . getDiskInfo ( ) . getDiskStorageType ( ) ) == ( org.ovirt.engine.core.common.businessentities.storage.DiskStorageType.IMAGE ) ) || ( ( org.ovirt.engine.core.bll.AddDiskCommand.getParameters ( ) . getDiskInfo ( ) . getDiskStorageType ( ) ) == ( org.ovirt.engine.core.common.businessentities.storage.DiskStorageType.CINDER ) ) ; }
Source:
private void doTestBadUpdate ( boolean valid , boolean success , java.lang.String detail ) { setUpEntityQueryExpectations ( 1 , 0 , false ) ; setUriInfo ( setUpActionExpectations ( ActionType.UpdateMacPool , org.ovirt.engine.core.common.action.MacPoolParameters.class , new java.lang.String [ ] { } , new java.lang.Object [ ] { } , valid , success ) ) ; try { resource.update ( org.ovirt.engine.api.restapi.resource.BackendMacPoolResourceTest.getModel ( 0 ) ) ; org.junit.Assert.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , detail ) ; } }

Target:
private void doTestBadUpdate ( boolean valid , boolean success , java.lang.String detail ) { setUpEntityQueryExpectations ( 1 , 0 , false ) ; setUriInfo ( setUpActionExpectations ( ActionType.UpdateMacPool , org.ovirt.engine.core.common.action.MacPoolParameters.class , new java.lang.String [ ] { } , new java.lang.Object [ ] { } , valid , success ) ) ; try { resource.update ( org.ovirt.engine.api.restapi.resource.BackendMacPoolResourceTest.getModel ( 0 ) ) ; org.junit.jupiter.api.Assertions.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , detail ) ; } }
Source:
public org.ovirt.engine.core.bll.ValidationResult isDomainHasSpaceForRequest ( final long requestedSize ) { if ( ( ( storageDomain.getavailable_disk_size ( ) ) != null ) && ( ( ( storageDomain.getavailable_disk_size ( ) ) - requestedSize ) < ( org.ovirt.engine.core.bll.validator.StorageDomainValidator.getLowDiskSpaceThreshold ( ) ) ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.dal.VdcBllMessages.ACTION_TYPE_FAILED_DISK_SPACE_LOW_ON_TARGET_STORAGE_DOMAIN , storageName ( ) ) ; } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult isDomainHasSpaceForRequest ( final long requestedSize ) { if ( ( ( storageDomain.getAvailableDiskSize ( ) ) != null ) && ( ( ( storageDomain.getAvailableDiskSize ( ) ) - requestedSize ) < ( org.ovirt.engine.core.bll.validator.StorageDomainValidator.getLowDiskSpaceThreshold ( ) ) ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.dal.VdcBllMessages.ACTION_TYPE_FAILED_DISK_SPACE_LOW_ON_TARGET_STORAGE_DOMAIN , storageName ( ) ) ; } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }
Source:
public void update ( int index , org.ovirt.engine.core.common.businessentities.Provider provider , java.lang.String value ) { transitionHandler.handlePlaceTransition ( true ) ; }

Target:
public void update ( int index , org.ovirt.engine.core.common.businessentities.Provider provider , java.lang.String value ) { java.util.Map < java.lang.String , java.lang.String > parameters = new java.util.HashMap < > ( ) ; parameters.put ( FragmentParams.NAME.getName ( ) , provider.getName ( ) ) ; getPlaceTransitionHandler ( ) . handlePlaceTransition ( WebAdminApplicationPlaces.providerGeneralSubTabPlace , parameters ) ; }
Source:
public void canDoActionVmShareableDisk ( ) { createParameters ( ) ; org.ovirt.engine.core.common.businessentities.DiskImage diskImage = initDiskImage ( diskImageId ) ; diskImage.setShareable ( true ) ; initVm ( VMStatus.Up , org.ovirt.engine.core.compat.Guid.newGuid ( ) , diskImageId ) ; org.junit.Assert.assertFalse ( command.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( command.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( VdcBllMessages.ACTION_TYPE_FAILED_SHAREABLE_DISK_NOT_SUPPORTED.toString ( ) ) ) ; }

Target:
public void canDoActionVmShareableDisk ( ) { createParameters ( ) ; org.ovirt.engine.core.common.businessentities.DiskImage diskImage = initDiskImage ( diskImageGroupId , diskImageId ) ; diskImage.setShareable ( true ) ; initVm ( VMStatus.Up , org.ovirt.engine.core.compat.Guid.newGuid ( ) , diskImageGroupId ) ; org.junit.Assert.assertFalse ( command.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( command.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( VdcBllMessages.ACTION_TYPE_FAILED_SHAREABLE_DISK_NOT_SUPPORTED.toString ( ) ) ) ; }
Source:
public void readData ( java.io.ObjectInputStream dis ) { synchronized ( ovirt_engine_dwh.aggregationtohourly_3_4.AggregationToHourly.dc_aggregate_dateStruct.commonByteArrayLock_OVIRT_ENGINE_DWH_AggregationToHourly ) { try { int length = 0 ; this . var_name = readString ( dis ) ; this . var_value = readString ( dis ) ; this . var_datetime = readDate ( dis ) ; } catch ( java.io.IOException e ) { throw new java.lang.RuntimeException ( e ) ; } } }

Target:
public void writeData ( java.io.ObjectOutputStream dos ) { try { writeString ( this . key , dos ) ; writeString ( this . value , dos ) ; } catch ( java.io.IOException e ) { throw new java.lang.RuntimeException ( e ) ; } }
Source:
public static void getGlusterHook ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hookId , boolean includeServerHooks ) { 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 ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetGlusterHookById , new org.ovirt.engine.core.common.queries.gluster.GlusterHookQueryParameters ( hookId , includeServerHooks ) , aQuery ) ; }

Target:
public static void getClusterGlusterServices ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { 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 ; } } ; org.ovirt.engine.core.common.queries.gluster.GlusterVolumeAdvancedDetailsParameters parameters = new org.ovirt.engine.core.common.queries.gluster.GlusterVolumeAdvancedDetailsParameters ( clusterId , null , null , false ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterVolumeAdvancedDetails , parameters , aQuery ) ; }
Source:
private void replaceBrick ( org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity brick , org.ovirt.engine.core.compat.Guid newServerId , java.lang.String newBrickDir ) { brick.setId ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) ) ; brick.setServerId ( newServerId ) ; brick.setBrickDirectory ( newBrickDir ) ; addedBrickIds.add ( brick.getId ( ) ) ; }

Target:
private void replaceBrick ( org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity brick , org.ovirt.engine.core.compat.Guid newServerId , java.lang.String newBrickDir ) { brick.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; brick.setServerId ( newServerId ) ; brick.setBrickDirectory ( newBrickDir ) ; addedBrickIds.add ( brick.getId ( ) ) ; }
Source:
public static java.lang.String collection ( java.lang.String subCollectionName ) { org.ovirt.engine.sdk.generator.rsdl.templates.SubCollectionTemplate template = new org.ovirt.engine.sdk.generator.rsdl.templates.SubCollectionTemplate ( ) ; template.set ( "sub_collection_name" , subCollectionName ) ; return template.evaluate ( ) ; }

Target:
public static java.lang.String collection ( org.ovirt.engine.sdk.generator.utils.Tree < org.ovirt.engine.sdk.generator.rsdl.Location > collectionTree ) { org.ovirt.engine.sdk.generator.utils.Tree < org.ovirt.engine.sdk.generator.rsdl.Location > entityTree = collectionTree.getParent ( ) ; java.lang.String brokerType = org.ovirt.engine.sdk.generator.rsdl.BrokerRules.getBrokerType ( collectionTree ) ; java.lang.String entityType = org.ovirt.engine.sdk.generator.rsdl.SchemaRules.getSchemaType ( entityTree ) ; java.lang.String parentClassParameterName = entityType.toLowerCase ( ) . replace ( "_" , "" ) ; org.ovirt.engine.sdk.generator.rsdl.templates.SubCollectionTemplate template = new org.ovirt.engine.sdk.generator.rsdl.templates.SubCollectionTemplate ( ) ; template.set ( "broker_type" , brokerType ) ; template.set ( "parentclass_parameter_name" , parentClassParameterName ) ; return template.evaluate ( ) ; }
Source:
private void calculateNetworkImplementationDetailsAndAssertManaged ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface , boolean expectManaged , org.ovirt.engine.core.common.businessentities.network.Network network ) { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface.NetworkImplementationDetails networkImplementationDetails = initMocksForNetworkImplementationDetailsUtils ( network , null , testIface ) . calculateNetworkImplementationDetails ( iface , network ) ; org.junit.Assert.assertNotNull ( "Network implementation details should be filled." , networkImplementationDetails ) ; org.junit.Assert.assertEquals ( ( ( "Network implementation details should be " + ( expectManaged ? "" : "un" ) ) + "managed." ) , expectManaged , networkImplementationDetails.isManaged ( ) ) ; }

Target:
private void calculateNetworkImplementationDetailsAndAssertManaged ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface , boolean expectManaged , org.ovirt.engine.core.common.businessentities.network.Network network ) { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface.NetworkImplementationDetails networkImplementationDetails = initMocksForNetworkImplementationDetailsUtils ( network , null , testIface ) . calculateNetworkImplementationDetails ( iface , network ) ; org.junit.jupiter.api.Assertions.assertNotNull ( networkImplementationDetails , "Network implementation details should be filled." ) ; org.junit.jupiter.api.Assertions.assertEquals ( expectManaged , networkImplementationDetails.isManaged ( ) , ( ( "Network implementation details should be " + ( expectManaged ? "" : "un" ) ) + "managed." ) ) ; }
Source:
private java.util.List < org.ovirt.engine.core.common.businessentities.network.Network > getModifiedNetworks ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.Network > modifiedNetworks = new java.util.ArrayList ( org.ovirt.engine.core.bll.network.host.HostSetupNetworksCommand.getParameters ( ) . getNetworkAttachments ( ) . size ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.network.NetworkAttachment attachment : org.ovirt.engine.core.bll.network.host.HostSetupNetworksCommand.getParameters ( ) . getNetworkAttachments ( ) ) { modifiedNetworks.add ( getClusterNetworks ( ) . get ( attachment.getNetworkId ( ) ) ) ; } return modifiedNetworks ; }

Target:
private org.ovirt.engine.core.common.businessentities.network.Network existingNetworkRelatedToAttachment ( org.ovirt.engine.core.common.businessentities.network.NetworkAttachment attachment ) { return getNetworkBusinessEntityMap ( ) . get ( attachment.getNetworkId ( ) ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc setMOMPolicyParameters ( java.util.Map < java.lang.String , java.lang.Object > values ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "Host.setMOMPolicyParameters" ) . withParameter ( "key_value_store" , values ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( response ) ; }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturn setMOMPolicyParameters ( java.util.Map < java.lang.String , java.lang.Object > values ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "Host.setMOMPolicyParameters" ) . withParameter ( "key_value_store" , values ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturn ( response ) ; }
Source:
public void getHostNumaTopologyByHostId ( org.ovirt.engine.ui.frontend.AsyncQuery asyncQuery , org.ovirt.engine.core.compat.Guid hostId ) { asyncQuery.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.VdsNumaNode > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVdsNumaNodesByVdsId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( hostId ) , asyncQuery ) ; }

Target:
public void getVmTemplatesByBaseTemplateId ( org.ovirt.engine.ui.frontend.AsyncQuery asyncQuery , org.ovirt.engine.core.compat.Guid baseTemplate ) { asyncQuery.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.VmTemplate > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmTemplatesByBaseTemplateId , new org.ovirt.engine.core.common.queries.GetVmTemplateParameters ( baseTemplate ) , asyncQuery ) ; }
Source:
public void updateCompletedJobAndSteps ( final org.ovirt.engine.core.common.job.Job job ) { org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInNewTransaction ( new org.ovirt.engine.core.utils.transaction.TransactionMethod < java.lang.Void > ( ) { @ java.lang.Override public java.lang.Void runInTransaction ( ) { jobDao.update ( job ) ; stepDao.updateJobStepsCompleted ( job.getId ( ) , job.getStatus ( ) , job.getEndTime ( ) ) ; return null ; } } ) ; }

Target:
public void updateCompletedJobAndSteps ( final org.ovirt.engine.core.common.job.Job job ) { org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInNewTransaction ( new org.ovirt.engine.core.utils.transaction.TransactionMethod < java.lang.Void > ( ) { @ java.lang.Override public java.lang.Void runInTransaction ( ) { for ( org.ovirt.engine.core.common.job.Step step : job.getSteps ( ) ) { if ( ( step.getStatus ( ) ) == ( org.ovirt.engine.core.common.job.JobExecutionStatus.STARTED ) ) { step.setStatus ( job.getStatus ( ) ) ; step.setEndTime ( job.getEndTime ( ) ) ; } } jobDao.update ( job ) ; return null ; } } ) ; }
Source:
public boolean validate ( boolean isOVirt ) { getOVirtISO ( ) . setIsValid ( true ) ; getRootPassword ( ) . setIsValid ( true ) ; if ( isOVirt ) { getOVirtISO ( ) . validateSelectedItem ( new org.ovirt.engine.ui.uicommonweb.validation.IValidation [ ] { new org.ovirt.engine.ui.uicommonweb.validation.NotEmptyValidation ( ) } ) ; } else { getRootPassword ( ) . validateEntity ( new org.ovirt.engine.ui.uicommonweb.validation.IValidation [ ] { new org.ovirt.engine.ui.uicommonweb.validation.NotEmptyValidation ( ) } ) ; } return ( getRootPassword ( ) . getIsValid ( ) ) && ( getOVirtISO ( ) . getIsValid ( ) ) ; }

Target:
private void setPublicKey ( org.ovirt.engine.ui.uicommonweb.models.EntityModel value ) { privatePublicKey = value ; }
Source:
private void incrementDbGenerationForRelatedEntities ( ) { if ( ( org.ovirt.engine.core.bll.MoveOrCopyDiskCommand.getParameters ( ) . getOperation ( ) ) == ( org.ovirt.engine.core.common.businessentities.ImageOperation.Copy ) ) { org.ovirt.engine.core.bll.MoveOrCopyDiskCommand.getVmStaticDAO ( ) . incrementDbGeneration ( org.ovirt.engine.core.bll.MoveOrCopyDiskCommand.getVmTemplateId ( ) ) ; } else { java.util.List < org.ovirt.engine.core.common.utils.Pair < org.ovirt.engine.core.common.businessentities.VM , org.ovirt.engine.core.common.businessentities.VmDevice > > vmsForDisk = getVmsWithVmDeviceInfoForDiskId ( ) ; for ( org.ovirt.engine.core.common.utils.Pair < org.ovirt.engine.core.common.businessentities.VM , org.ovirt.engine.core.common.businessentities.VmDevice > pair : vmsForDisk ) { org.ovirt.engine.core.bll.MoveOrCopyDiskCommand.getVmStaticDAO ( ) . incrementDbGeneration ( pair.getFirst ( ) . getId ( ) ) ; } } }

Target:
private void incrementDbGenerationForRelatedEntities ( ) { if ( ( org.ovirt.engine.core.bll.MoveOrCopyDiskCommand.getParameters ( ) . getOperation ( ) ) == ( org.ovirt.engine.core.common.businessentities.storage.ImageOperation.Copy ) ) { org.ovirt.engine.core.bll.MoveOrCopyDiskCommand.getVmStaticDAO ( ) . incrementDbGeneration ( org.ovirt.engine.core.bll.MoveOrCopyDiskCommand.getVmTemplateId ( ) ) ; } else { java.util.List < org.ovirt.engine.core.common.utils.Pair < org.ovirt.engine.core.common.businessentities.VM , org.ovirt.engine.core.common.businessentities.VmDevice > > vmsForDisk = getVmsWithVmDeviceInfoForDiskId ( ) ; for ( org.ovirt.engine.core.common.utils.Pair < org.ovirt.engine.core.common.businessentities.VM , org.ovirt.engine.core.common.businessentities.VmDevice > pair : vmsForDisk ) { org.ovirt.engine.core.bll.MoveOrCopyDiskCommand.getVmStaticDAO ( ) . incrementDbGeneration ( pair.getFirst ( ) . getId ( ) ) ; } } }