auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private org.ovirt.engine.core.utils.transaction.TransactionMethod < java.lang.Boolean > updateVdsNetworksInTx ( final T bckndCmdParams ) { return new org.ovirt.engine.core.utils.transaction.TransactionMethod < java.lang.Boolean > ( ) { @ java.lang.Override public java.lang.Boolean runInTransaction ( ) { org.ovirt.engine.core.bll.Backend.getInstance ( ) . getResourceManager ( ) . RunVdsCommand ( VDSCommandType.CollectVdsNetworkData , new org.ovirt.engine.core.common.vdscommands.VdsIdAndVdsVDSCommandParametersBase ( bckndCmdParams.getVdsId ( ) ) ) ; for ( org.ovirt.engine.core.common.businessentities.network.Network net : getNetworks ( ) ) { org.ovirt.engine.core.bll.network.cluster.NetworkClusterHelper.setStatus ( getVdsGroupId ( ) , net ) ; } return java.lang.Boolean.TRUE ; } } ; }

Target:
private org.ovirt.engine.core.utils.transaction.TransactionMethod < java.lang.Boolean > updateVdsNetworksInTx ( ) { return new org.ovirt.engine.core.utils.transaction.TransactionMethod < java.lang.Boolean > ( ) { @ java.lang.Override public java.lang.Boolean runInTransaction ( ) { org.ovirt.engine.core.bll.Backend.getInstance ( ) . getResourceManager ( ) . RunVdsCommand ( VDSCommandType.CollectVdsNetworkData , new org.ovirt.engine.core.common.vdscommands.CollectVdsNetworkDataVDSCommandParameters ( getVds ( ) ) ) ; for ( org.ovirt.engine.core.common.businessentities.network.Network net : getNetworks ( ) ) { org.ovirt.engine.core.bll.network.cluster.NetworkClusterHelper.setStatus ( getVdsGroupId ( ) , net ) ; } return java.lang.Boolean.TRUE ; } } ; }
Source:
public void updateHostStatusAfterSuccessfulUpgrade ( ) { org.ovirt.engine.core.common.businessentities.VdsDynamic dynamicHostData = hostDao.get ( org.ovirt.engine.core.bll.hostdeploy.UpgradeHostInternalCommand.getVdsId ( ) ) ; dynamicHostData.setUpdateAvailable ( false ) ; hostDao.update ( dynamicHostData ) ; if ( ( org.ovirt.engine.core.bll.hostdeploy.UpgradeHostInternalCommand.getVds ( ) . getVdsType ( ) ) == ( org.ovirt.engine.core.common.businessentities.VDSType.VDS ) ) { if ( ( org.ovirt.engine.core.bll.hostdeploy.UpgradeHostInternalCommand.getParameters ( ) . getInitialStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VDSStatus.Maintenance ) ) { setVdsStatus ( VDSStatus.Maintenance ) ; } else { setVdsStatus ( VDSStatus.Initializing ) ; } } }

Target:
public void updateHostStatusAfterSuccessfulUpgrade ( ) { org.ovirt.engine.core.common.businessentities.VdsDynamic dynamicHostData = hostDao.get ( org.ovirt.engine.core.bll.hostdeploy.UpgradeHostInternalCommand.getVdsId ( ) ) ; dynamicHostData.setUpdateAvailable ( false ) ; hostDao.update ( dynamicHostData ) ; if ( ( org.ovirt.engine.core.bll.hostdeploy.UpgradeHostInternalCommand.getVds ( ) . getVdsType ( ) ) == ( org.ovirt.engine.core.common.businessentities.VDSType.VDS ) ) { org.ovirt.engine.core.bll.hostdeploy.UpgradeHostInternalCommand.reestablishConnectionIfNeeded ( ) ; if ( ( org.ovirt.engine.core.bll.hostdeploy.UpgradeHostInternalCommand.getParameters ( ) . getInitialStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VDSStatus.Maintenance ) ) { setVdsStatus ( VDSStatus.Maintenance ) ; } else { setVdsStatus ( VDSStatus.Initializing ) ; } } }
Source:
protected boolean validateStorageDomains ( ) { org.ovirt.engine.core.bll.validator.MultipleStorageDomainsValidator storageDomainsValidator = getStorageDomainsValidator ( org.ovirt.engine.core.bll.RemoveSnapshotCommand.getStoragePoolId ( ) , getStorageDomainsIds ( ) ) ; return ( ( validate ( storageDomainsValidator.allDomainsExistAndActive ( ) ) ) && ( validate ( storageDomainsValidator.allDomainsWithinThresholds ( ) ) ) ) && ( validate ( storageDomainsValidator.allDomainsHaveSpaceForClonedDisks ( getSourceImages ( ) ) ) ) ; }

Target:
protected java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > getSnapshotsDummiesForStorageAllocations ( ) { return org.ovirt.engine.core.bll.ImagesHandler.getSnapshotsDummiesForStorageAllocations ( getSourceImages ( ) ) ; }
Source:
public void validCustomDevPropSpec ( ) { java.lang.String customDevPropSpec = "{type=disk;prop={bootable=^(true|false)$}};" + ( ( ( ( ( ( ( "{type=interface;prop={speed=[0-9]{1,5};duplex=^(full|half)$}};" + "{type=video;prop={turned_on=^(true|false)$}};" ) + "{type=sound;prop={volume=[0-9]{1,2}}};" ) + "{type=controller;prop={hotplug=^(true|false)$}};" ) + "{type=balloon;prop={max_size=[0-9]{1,15})}};" ) + "{type=channel;prop={auth_type=^(plain|md5|kerberos)$)}};" ) + "{type=console;prop={type=^(text|vnc)$}};" ) + "{type=smartcard;prop={version=([1-9]{1}).([0-9]{1})}}" ) ; org.ovirt.engine.core.utils.customprop.DevicePropertiesUtils utils = org.ovirt.engine.core.utils.customprop.DevicePropertiesUtils.getInstance ( ) ; org.junit.Assert.assertTrue ( utils.isDevicePropertiesDefinitionValid ( customDevPropSpec ) ) ; }

Target:
public void validCustomDevPropSpec ( ) { java.lang.String customDevPropSpec = "{type=disk;prop={bootable=^(true|false)$}};" + ( ( ( ( ( ( ( ( "{type=interface;prop={speed=[0-9]{1,5};duplex=^(full|half)$}};" + "{type=video;prop={turned_on=^(true|false)$}};" ) + "{type=sound;prop={volume=[0-9]{1,2}}};" ) + "{type=controller;prop={hotplug=^(true|false)$}};" ) + "{type=balloon;prop={max_size=[0-9]{1,15}}};" ) + "{type=channel;prop={auth_type=^(plain|md5|kerberos)$}};" ) + "{type=redir;prop={max_len=[0-9]{1,15}}};" ) + "{type=console;prop={type=^(text|vnc)$}};" ) + "{type=smartcard;prop={version=([1-9]{1}).([0-9]{1})}}" ) ; org.ovirt.engine.core.utils.customprop.DevicePropertiesUtils utils = org.ovirt.engine.core.utils.customprop.DevicePropertiesUtils.getInstance ( ) ; org.junit.Assert.assertTrue ( utils.isDevicePropertiesDefinitionValid ( customDevPropSpec ) ) ; }
Source:
public void getRoleActionGroupsByRoleId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid roleId ) { 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.ActionGroup > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ActionGroup > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetRoleActionGroupsByRoleId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( roleId ) , aQuery ) ; }

Target:
public void isVmNameUnique ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String name ) { 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.Boolean ) ( source ) ) . booleanValue ( ) ) : false ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.IsVmWithSameNameExist , new org.ovirt.engine.core.common.queries.NameQueryParameters ( name ) , aQuery ) ; }
Source:
private org.ovirt.engine.core.bll.ValidationResult notChangingManagementNetworkName ( ) { java.lang.String managementNetwork = org.ovirt.engine.core.common.config.Config.< java.lang.String > GetValue ( ConfigValues.ManagementNetwork ) ; return ( getOldNetwork ( ) . getName ( ) . equals ( managementNetwork ) ) && ( ! ( org.ovirt.engine.core.bll.network.dc.UpdateNetworkCommand.getNetworkName ( ) . equals ( managementNetwork ) ) ) ? new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.dal.VdcBllMessages.NETWORK_CAN_NOT_REMOVE_DEFAULT_NETWORK ) : org.ovirt.engine.core.bll.ValidationResult.VALID ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult notChangingManagementNetwork ( org.ovirt.engine.core.common.businessentities.network.Network newNetwork ) { java.lang.String managementNetwork = org.ovirt.engine.core.common.config.Config.< java.lang.String > GetValue ( ConfigValues.ManagementNetwork ) ; return ( network.getName ( ) . equals ( managementNetwork ) ) && ( ! ( newNetwork.getName ( ) . equals ( managementNetwork ) ) ) ? new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.dal.VdcBllMessages.NETWORK_CAN_NOT_REMOVE_DEFAULT_NETWORK ) : org.ovirt.engine.core.bll.ValidationResult.VALID ; }
Source:
protected void executeVdsBrokerCommand ( ) { try { status = org.ovirt.engine.core.vdsbroker.SetAmountOfMemoryVDSCommand.getBroker ( ) . hotplugMemory ( org.ovirt.engine.core.vdsbroker.architecture.MemoryUtils.createVmMemoryDeviceMap ( org.ovirt.engine.core.vdsbroker.SetAmountOfMemoryVDSCommand.getParameters ( ) . getMemoryDevice ( ) , false ) ) ; org.ovirt.engine.core.vdsbroker.SetAmountOfMemoryVDSCommand.proceedProxyReturnValue ( ) ; } catch ( java.lang.RuntimeException e ) { org.ovirt.engine.core.vdsbroker.SetAmountOfMemoryVDSCommand.setVdsRuntimeErrorAndReport ( e ) ; org.ovirt.engine.core.vdsbroker.SetAmountOfMemoryVDSCommand.getVDSReturnValue ( ) . setExceptionString ( null ) ; } }

Target:
protected void executeVdsBrokerCommand ( ) { try { status = org.ovirt.engine.core.vdsbroker.SetAmountOfMemoryVDSCommand.getBroker ( ) . hotplugMemory ( org.ovirt.engine.core.vdsbroker.architecture.MemoryUtils.createHotplugMemoryParamsMap ( org.ovirt.engine.core.vdsbroker.SetAmountOfMemoryVDSCommand.getParameters ( ) . getMemoryDevice ( ) , false ) ) ; org.ovirt.engine.core.vdsbroker.SetAmountOfMemoryVDSCommand.proceedProxyReturnValue ( ) ; } catch ( java.lang.RuntimeException e ) { org.ovirt.engine.core.vdsbroker.SetAmountOfMemoryVDSCommand.setVdsRuntimeErrorAndReport ( e ) ; org.ovirt.engine.core.vdsbroker.SetAmountOfMemoryVDSCommand.getVDSReturnValue ( ) . setExceptionString ( null ) ; } }
Source:
public org.ovirt.engine.ui.common.presenter.AbstractModelBoundPopupPresenterWidget < ? extends org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel , ? > getConfirmModelPopup ( org.ovirt.engine.ui.uicommonweb.models.storage.StorageSnapshotListModel source , org.ovirt.engine.ui.uicommonweb.UICommand lastExecutedCommand ) { if ( lastExecutedCommand == ( getModel ( ) . getRemoveCommand ( ) ) ) { return removeConfirmPopupProvider.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.storage.TemplateBackupModel source , org.ovirt.engine.ui.uicommonweb.UICommand lastExecutedCommand ) { if ( lastExecutedCommand == ( getModel ( ) . getRemoveCommand ( ) ) ) { return removeConfirmPopupProvider.get ( ) ; } else if ( ( source.getConfirmWindow ( ) ) instanceof org.ovirt.engine.ui.uicommonweb.models.storage.ImportCloneModel ) { return importClonePopupProvider.get ( ) ; } else { return super . getConfirmModelPopup ( source , lastExecutedCommand ) ; } }
Source:
public void testAddIncompleteParameters ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; try { collection.add ( new org.ovirt.engine.api.model.Bookmark ( ) ) ; fail ( "expected WebApplicationException on incomplete parameters" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyIncompleteException ( wae , "Bookmark" , "add" , "name" ) ; } }

Target:
public void testAddIncompleteParameters ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; try { collection.add ( new org.ovirt.engine.api.model.Bookmark ( ) ) ; org.junit.Assert.fail ( "expected WebApplicationException on incomplete parameters" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyIncompleteException ( wae , "Bookmark" , "add" , "name" ) ; } }
Source:
protected org.ovirt.engine.core.common.businessentities.VmDevice createVmDevice ( ) { return new org.ovirt.engine.core.common.businessentities.VmDevice ( new org.ovirt.engine.core.common.businessentities.VmDeviceId ( disk.getId ( ) , org.ovirt.engine.core.bll.AttachDiskToVmCommand.getVmId ( ) ) , org.ovirt.engine.core.common.businessentities.VmDeviceGeneralType.DISK , VmDeviceType.DISK.getName ( ) , "" , 0 , null , true , org.ovirt.engine.core.bll.AttachDiskToVmCommand.getParameters ( ) . isPlugUnPlug ( ) , false , "" , null ) ; }

Target:
protected org.ovirt.engine.core.common.businessentities.VmDevice createVmDevice ( ) { return new org.ovirt.engine.core.common.businessentities.VmDevice ( new org.ovirt.engine.core.common.businessentities.VmDeviceId ( disk.getId ( ) , org.ovirt.engine.core.bll.AttachDiskToVmCommand.getVmId ( ) ) , org.ovirt.engine.core.common.businessentities.VmDeviceGeneralType.DISK , VmDeviceType.DISK.getName ( ) , "" , 0 , null , true , org.ovirt.engine.core.bll.AttachDiskToVmCommand.getParameters ( ) . isPlugUnPlug ( ) , org.ovirt.engine.core.bll.AttachDiskToVmCommand.getParameters ( ) . isReadOnly ( ) , "" , null , org.ovirt.engine.core.bll.AttachDiskToVmCommand.getParameters ( ) . getSnapshotId ( ) ) ; }
Source:
protected void CompleteImageData ( org.ovirt.engine.core.common.businessentities.DiskImage fromIRS ) { getDestinationDiskImage ( ) . setcreation_date ( fromIRS.getcreation_date ( ) ) ; getDestinationDiskImage ( ) . setlast_modified_date ( fromIRS.getlast_modified_date ( ) ) ; getDestinationDiskImage ( ) . setlastModified ( getDestinationDiskImage ( ) . getlast_modified_date ( ) ) ; org.ovirt.engine.core.common.businessentities.DiskImageDynamic destinationDiskDynamic = org.ovirt.engine.core.bll.BaseImagesCommand.getDiskImageDynamicDAO ( ) . get ( getDestinationDiskImage ( ) . getImageId ( ) ) ; if ( destinationDiskDynamic != null ) { destinationDiskDynamic.setactual_size ( fromIRS.getactual_size ( ) ) ; org.ovirt.engine.core.bll.BaseImagesCommand.getDiskImageDynamicDAO ( ) . update ( destinationDiskDynamic ) ; } }

Target:
protected void completeImageData ( org.ovirt.engine.core.common.businessentities.DiskImage fromIRS ) { getDestinationDiskImage ( ) . setcreation_date ( fromIRS.getcreation_date ( ) ) ; getDestinationDiskImage ( ) . setlast_modified_date ( fromIRS.getlast_modified_date ( ) ) ; getDestinationDiskImage ( ) . setlastModified ( getDestinationDiskImage ( ) . getlast_modified_date ( ) ) ; org.ovirt.engine.core.common.businessentities.DiskImageDynamic destinationDiskDynamic = org.ovirt.engine.core.bll.BaseImagesCommand.getDiskImageDynamicDAO ( ) . get ( getDestinationDiskImage ( ) . getImageId ( ) ) ; if ( destinationDiskDynamic != null ) { destinationDiskDynamic.setactual_size ( fromIRS.getactual_size ( ) ) ; org.ovirt.engine.core.bll.BaseImagesCommand.getDiskImageDynamicDAO ( ) . update ( destinationDiskDynamic ) ; } }
Source:
public static void addLink ( java.lang.String url , org.ovirt.engine.api.model.BaseResource resource , java.lang.String rel ) { org.ovirt.engine.api.model.Link link = new org.ovirt.engine.api.model.Link ( ) ; link.setRel ( ( rel + ( org.ovirt.engine.api.utils.LinkHelper.SEARCH_RELATION ) ) ) ; link.setHref ( ( ( org.ovirt.engine.api.utils.LinkHelper.combine ( url , rel ) ) + ( org.ovirt.engine.api.utils.LinkHelper.SEARCH_TEMPLATE ) ) ) ; resource.getLinks ( ) . add ( link ) ; }

Target:
public static org.ovirt.engine.api.model.Link createLink ( java.lang.String url , java.lang.String rel , java.util.List < org.ovirt.engine.api.model.ParametersSet > params ) { org.ovirt.engine.api.model.Link link = new org.ovirt.engine.api.model.Link ( ) ; link.setRel ( ( rel + ( org.ovirt.engine.api.utils.LinkHelper.SEARCH_RELATION ) ) ) ; link.setHref ( ( ( org.ovirt.engine.api.utils.LinkHelper.combine ( url , params ) ) + ( org.ovirt.engine.api.utils.LinkHelper.SEARCH_TEMPLATE ) ) ) ; return link ; }
Source:
private void handleFinalizingSuccess ( final org.ovirt.engine.core.bll.storage.disk.image.UploadImageCommand < T > . StateContext context ) { log.info ( "Finalizing successful upload to {}" , getUploadDescription ( ) ) ; if ( stopImageTransferSession ( context.entity ) ) { org.ovirt.engine.core.compat.Guid transferingVdsId = context.entity.getVdsId ( ) ; if ( verifyImage ( transferingVdsId ) ) { setVolumeLegalityInStorage ( org.ovirt.engine.core.bll.storage.disk.image.UploadImageCommand.LEGAL_IMAGE ) ; org.ovirt.engine.core.bll.storage.disk.image.UploadImageCommand.unLockImage ( ) ; updateEntityPhase ( ImageTransferPhase.FINISHED_SUCCESS ) ; } else { setImageStatus ( ImageStatus.ILLEGAL ) ; updateEntityPhase ( ImageTransferPhase.FINALIZING_FAILURE ) ; } tearDownImage ( context.entity.getVdsId ( ) ) ; } }

Target:
private void handleFinalizingSuccess ( final org.ovirt.engine.core.bll.storage.disk.image.TransferImageCommand < T > . StateContext context ) { log.info ( "Finalizing successful transfer for {}" , getTransferDescription ( ) ) ; if ( stopImageTransferSession ( context.entity ) ) { org.ovirt.engine.core.compat.Guid transferingVdsId = context.entity.getVdsId ( ) ; if ( verifyImage ( transferingVdsId ) ) { setVolumeLegalityInStorage ( org.ovirt.engine.core.bll.storage.disk.image.TransferImageCommand.LEGAL_IMAGE ) ; org.ovirt.engine.core.bll.storage.disk.image.TransferImageCommand.unLockImage ( ) ; updateEntityPhase ( ImageTransferPhase.FINISHED_SUCCESS ) ; } else { setImageStatus ( ImageStatus.ILLEGAL ) ; updateEntityPhase ( ImageTransferPhase.FINALIZING_FAILURE ) ; } tearDownImage ( context.entity.getVdsId ( ) ) ; } }
Source:
public void isTemplateNameUnique ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String templateName , 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.lang.Boolean ) ( source ) ) ) ; } } ; org.ovirt.engine.core.common.queries.NameQueryParameters params = new org.ovirt.engine.core.common.queries.NameQueryParameters ( templateName ) ; params.setDatacenterId ( datacenterId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.IsVmTemlateWithSameNameExist , params , aQuery ) ; }

Target:
public void getPermissionsByAdElementId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid userId ) { 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.Permission > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Permission > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetPermissionsByAdElementId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( userId ) , aQuery ) ; }
Source:
private void printAllValues ( ) { java.util.List < org.apache.commons.configuration.tree.ConfigurationNode > configNodes = keysConfig.getRootNode ( ) . getChildren ( ) ; for ( org.apache.commons.configuration.tree.ConfigurationNode node : configNodes ) { org.ovirt.engine.core.config.entity.ConfigKey key = configKeyFactory.generateByPropertiesKey ( node.getName ( ) ) ; try { printAllValuesForKey ( key.getKey ( ) ) ; } catch ( java.lang.Exception exception ) { org.ovirt.engine.core.config.EngineConfigLogic.log.error ( ( ( "Error while retriving value for key \"" + ( key.getKey ( ) ) ) + "\"." ) , exception ) ; } } }

Target:
private void printAllValues ( ) { java.util.List < org.apache.commons.configuration.tree.ConfigurationNode > configNodes = keysConfig.getRootNode ( ) . getChildren ( ) ; for ( org.apache.commons.configuration.tree.ConfigurationNode node : configNodes ) { org.ovirt.engine.core.config.entity.ConfigKey key = configKeyFactory.generateByPropertiesKey ( node.getName ( ) ) ; try { printAllValuesForKey ( key.getKey ( ) ) ; } catch ( java.lang.Exception exception ) { org.ovirt.engine.core.config.EngineConfigLogic.log.error ( "Error while retrieving value for key \"{}\"." , key.getKey ( ) , exception ) ; } } }
Source:
public void processOnVmStop ( final java.util.Collection < org.ovirt.engine.core.compat.Guid > vmIds , final org.ovirt.engine.core.compat.Guid hostId ) { if ( vmIds.isEmpty ( ) ) { return ; } org.ovirt.engine.core.utils.threadpool.ThreadPoolUtil.execute ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { for ( org.ovirt.engine.core.compat.Guid vmId : vmIds ) { org.ovirt.engine.core.bll.Backend.getInstance ( ) . runInternalAction ( VdcActionType.ProcessDownVm , new org.ovirt.engine.core.common.action.ProcessDownVmParameters ( vmId , true ) ) ; } org.ovirt.engine.core.bll.hostdev.HostDeviceManager hostDeviceManager = org.ovirt.engine.core.di.Injector.get ( org.ovirt.engine.core.bll.hostdev.HostDeviceManager.class ) ; hostDeviceManager.refreshHostIfAnyVmHasHostDevices ( vmIds , hostId ) ; } } ) ; }

Target:
public void processOnVmStop ( final java.util.Collection < org.ovirt.engine.core.compat.Guid > vmIds , final org.ovirt.engine.core.compat.Guid hostId , boolean useSeparateThread ) { if ( vmIds.isEmpty ( ) ) { return ; } if ( useSeparateThread ) { org.ovirt.engine.core.utils.threadpool.ThreadPoolUtil.execute ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { processOnVmStopInternal ( vmIds , hostId ) ; } } ) ; } else { processOnVmStopInternal ( vmIds , hostId ) ; } }
Source:
protected org.ovirt.engine.core.bll.ValidationResult validateDisplayType ( ) { org.ovirt.engine.core.common.businessentities.DisplayType selectedDisplayType = ( ( runVmParam.getUseVnc ( ) ) == null ) ? vm.getDefaultDisplayType ( ) : runVmParam.getUseVnc ( ) ? org.ovirt.engine.core.common.businessentities.DisplayType.vga : org.ovirt.engine.core.common.businessentities.DisplayType.qxl ; if ( ! ( org.ovirt.engine.core.bll.validator.VmValidationUtils.isDisplayTypeSupported ( vm.getOs ( ) , vm.getVdsGroupCompatibilityVersion ( ) , selectedDisplayType ) ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.ACTION_TYPE_FAILED_ILLEGAL_VM_DISPLAY_TYPE_IS_NOT_SUPPORTED_BY_OS ) ; } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }

Target:
protected org.ovirt.engine.core.bll.ValidationResult hasSpaceForSnapshots ( ) { java.util.Set < org.ovirt.engine.core.compat.Guid > sdIds = org.ovirt.engine.core.bll.ImagesHandler.getAllStorageIdsForImageIds ( getVmImageDisks ( ) ) ; org.ovirt.engine.core.bll.validator.MultipleStorageDomainsValidator msdValidator = getStorageDomainsValidator ( sdIds ) ; org.ovirt.engine.core.bll.ValidationResult retVal = msdValidator.allDomainsWithinThresholds ( ) ; if ( retVal == ( org.ovirt.engine.core.bll.ValidationResult.VALID ) ) { return msdValidator.allDomainsHaveSpaceForNewDisks ( getVmImageDisks ( ) ) ; } return retVal ; }
Source:
private static java.util.List < org.ovirt.engine.core.aaa.DirectoryGroup > queryGroups ( org.ovirt.engine.core.extensions.mgr.ExtensionProxy extension , final org.ovirt.engine.api.extensions.ExtMap filter ) { return org.ovirt.engine.core.aaa.AuthzUtils.populateGroups ( extension , new org.ovirt.engine.api.extensions.ExtMap ( ) . mput ( Authz.InvokeKeys.QUERY_ENTITY , Authz.QueryEntity.GROUP ) . mput ( Authz.InvokeKeys.QUERY_FILTER , filter ) ) ; }

Target:
private static java.util.List < org.ovirt.engine.core.aaa.DirectoryGroup > queryGroups ( final org.ovirt.engine.core.extensions.mgr.ExtensionProxy extension , final java.lang.String namespace , final org.ovirt.engine.api.extensions.ExtMap filter ) { return org.ovirt.engine.core.aaa.AuthzUtils.populateGroups ( extension , namespace , new org.ovirt.engine.api.extensions.ExtMap ( ) . mput ( Authz.InvokeKeys.QUERY_ENTITY , Authz.QueryEntity.GROUP ) . mput ( Authz.InvokeKeys.QUERY_FILTER , filter ) ) ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object result ) { org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterGeneralModel innerGeneralModel = ( ( org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterGeneralModel ) ( model ) ) ; java.util.Map < java.lang.String , java.lang.String > serverMap = ( ( java.util.Map < java.lang.String , java.lang.String > ) ( result ) ) ; if ( ! ( serverMap.isEmpty ( ) ) ) { innerGeneralModel.setHasNewGlusterHostsAlert ( true ) ; innerGeneralModel.setHasAnyAlert ( true ) ; } else { setHasNewGlusterHostsAlert ( false ) ; setHasAnyAlert ( false ) ; } }

Target:
public void executed ( org.ovirt.engine.ui.uicompat.FrontendMultipleActionAsyncResult result ) { hostsModel.stopProgress ( ) ; boolean isAllCanDoPassed = true ; for ( org.ovirt.engine.core.common.action.VdcReturnValueBase returnValueBase : result.getReturnValue ( ) ) { isAllCanDoPassed = isAllCanDoPassed && ( returnValueBase.getCanDoAction ( ) ) ; if ( ! isAllCanDoPassed ) { break ; } } if ( isAllCanDoPassed ) { updateAlerts ( ) ; cancel ( ) ; } }
Source:
private void createCommand ( ) { org.mockito.Mockito.doReturn ( org.ovirt.engine.core.bll.AddClusterCommandTest.ARCHITECTURE_TYPE ) . when ( addClusterCommand ) . getArchitecture ( ) ; org.mockito.Mockito.doReturn ( backend ) . when ( addClusterCommand ) . getBackend ( ) ; org.mockito.Mockito.doReturn ( clusterDao ) . when ( addClusterCommand ) . getClusterDao ( ) ; org.mockito.Mockito.doReturn ( managementNetwork ) . when ( addClusterCommand ) . getManagementNetwork ( ) ; org.mockito.Mockito.when ( macPoolDao.getDefaultPool ( ) ) . thenReturn ( new org.ovirt.engine.core.common.businessentities.MacPool ( ) ) ; }

Target:
private void mockDao ( ) { org.mockito.Mockito.when ( macPoolDao.getDefaultPool ( ) ) . thenReturn ( new org.ovirt.engine.core.common.businessentities.MacPool ( ) ) ; }
Source:
public 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 ) ; }

Target:
public 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 ) . withoutRefresh ( ) , aQuery ) ; }
Source:
public void setUsePatternFly ( final boolean use ) { super . setUsePatternFly ( use ) ; if ( use ) { getCheckboxWidgetLabel ( ) . getStyle ( ) . setPaddingLeft ( 10 , Unit.PX ) ; getCheckboxWidgetLabel ( ) . getStyle ( ) . setPaddingRight ( 10 , Unit.PX ) ; getCheckboxWidgetLabel ( ) . getStyle ( ) . setPosition ( Position.RELATIVE ) ; noPaddingNoFixes ( ) ; org.ovirt.engine.ui.common.widget.editor.BaseEntityModelCheckboxEditor.removeWrapperStyleName ( org.ovirt.engine.ui.common.widget.editor.BaseEntityModelCheckboxEditor.CBE_RIGHT_OF_LABEL_PFLY_FIX ) ; } }

Target:
public void setUsePatternFly ( final boolean use ) { super . setUsePatternFly ( use ) ; if ( use ) { getCheckboxWidgetLabel ( ) . getStyle ( ) . setPaddingLeft ( 10 , Unit.PX ) ; getCheckboxWidgetLabel ( ) . getStyle ( ) . setPaddingRight ( 10 , Unit.PX ) ; getCheckboxWidgetLabel ( ) . getStyle ( ) . setPosition ( Position.RELATIVE ) ; getCheckboxWidgetLabel ( ) . getStyle ( ) . setProperty ( org.ovirt.engine.ui.common.widget.editor.BaseEntityModelCheckboxEditor.MAX_WIDTH , "95%" ) ; noPaddingNoFixes ( ) ; org.ovirt.engine.ui.common.widget.editor.BaseEntityModelCheckboxEditor.removeWrapperStyleName ( org.ovirt.engine.ui.common.widget.editor.BaseEntityModelCheckboxEditor.CBE_RIGHT_OF_LABEL_PFLY_FIX ) ; } }
Source:
public static void log ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase auditLogable , org.ovirt.engine.core.common.AuditLogType logType , java.lang.String loggerString ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.updateTimeoutLogableObject ( auditLogable , logType ) ; if ( auditLogable.getLegal ( ) ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.saveToDb ( auditLogable , logType , loggerString ) ; } }

Target:
public static void log ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase auditLogable , org.ovirt.engine.core.common.AuditLogType logType , java.lang.String loggerString ) { if ( ! ( logType.shouldBeLogged ( ) ) ) { return ; } org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.updateTimeoutLogableObject ( auditLogable , logType ) ; if ( auditLogable.getLegal ( ) ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.saveToDb ( auditLogable , logType , loggerString ) ; } }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object result ) { populateRoles ( ( ( java.util.List < org.ovirt.engine.core.common.businessentities.Role > ) ( result ) ) ) ; }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object result ) { if ( ( getProfile ( ) . getSelectedItem ( ) ) != null ) { namespacesMap = ( ( java.util.HashMap < java.lang.String , java.util.List < java.lang.String > > ) ( result ) ) ; populateNamespaces ( ) ; } }
Source:
private boolean networkExists ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.NetworkCluster > networks = org.ovirt.engine.core.bll.AttachNetworkToVdsGroupCommand.getNetworkClusterDAO ( ) . getAllForCluster ( org.ovirt.engine.core.bll.AttachNetworkToVdsGroupCommand.getVdsGroupId ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.NetworkCluster network_cluster : networks ) { if ( network_cluster.getnetwork_id ( ) . equals ( getNetworkCluster ( ) . getnetwork_id ( ) ) ) { return true ; } } return false ; }

Target:
private boolean networkExists ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.NetworkCluster > networks = org.ovirt.engine.core.bll.AttachNetworkToVdsGroupCommand.getNetworkClusterDAO ( ) . getAllForCluster ( org.ovirt.engine.core.bll.AttachNetworkToVdsGroupCommand.getVdsGroupId ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.NetworkCluster networkCluster : networks ) { if ( networkCluster.getnetwork_id ( ) . equals ( getNetworkCluster ( ) . getnetwork_id ( ) ) ) { return true ; } } return false ; }
Source:
public com.google.gwt.resources.client.ImageResource getValue ( org.ovirt.engine.core.common.businessentities.Disk object ) { setEnumTitle ( object.getVmEntityType ( ) ) ; if ( ( object.getVmEntityType ( ) ) == null ) { return null ; } return object.getVmEntityType ( ) . isVmType ( ) ? org.ovirt.engine.ui.common.widget.uicommon.disks.DisksViewColumns.resources.vmsImage ( ) : object.getVmEntityType ( ) . isTemplateType ( ) ? org.ovirt.engine.ui.common.widget.uicommon.disks.DisksViewColumns.resources.templatesImage ( ) : null ; }

Target:
public com.google.gwt.resources.client.ImageResource getValue ( org.ovirt.engine.core.common.businessentities.Disk object ) { setTitle ( ( ( object.getDiskStorageType ( ) ) == ( org.ovirt.engine.core.common.businessentities.Disk.DiskStorageType.LUN ) ? getDefaultTitle ( ) : null ) ) ; return ( object.getDiskStorageType ( ) ) == ( org.ovirt.engine.core.common.businessentities.Disk.DiskStorageType.LUN ) ? org.ovirt.engine.ui.common.widget.uicommon.disks.DisksViewColumns.resources.externalDiskIcon ( ) : null ; }
Source:
public void setItems ( java.lang.Iterable < ? > items ) { if ( items != null ) { for ( java.lang.Object i : items ) { itemPanel.add ( new com.google.gwt.user.client.ui.Label ( getItemText ( i ) ) ) ; } } else { itemPanel.clear ( ) ; } }

Target:
void addItemLabel ( java.lang.String text ) { itemPanel.add ( new com.google.gwt.user.client.ui.Label ( text ) ) ; }
Source:
public void canDoActionSucceedsOnDiskDomainCheckWhenStorageGuidInParamsMismatches ( ) throws java.lang.Exception { org.ovirt.engine.core.compat.Guid storageId = org.ovirt.engine.core.compat.Guid.NewGuid ( ) ; initializeCommand ( storageId ) ; mockVmWithDisk ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) ) ; mockStorageDomain ( storageId ) ; mockStoragePoolIsoMap ( ) ; org.junit.Assert.assertTrue ( command.canDoAction ( ) ) ; }

Target:
public void canDoActionSucceedsOnDiskDomainCheckWhenStorageGuidInParamsMatches ( ) throws java.lang.Exception { org.ovirt.engine.core.compat.Guid storageId = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; initializeCommand ( storageId ) ; mockVmWithDisk ( storageId ) ; mockStorageDomain ( storageId ) ; mockStoragePoolIsoMap ( ) ; runAndAssertCanDoActionSuccess ( ) ; }
Source:
public void testAddIncompleteParameters ( ) { org.ovirt.engine.api.model.Host model = new org.ovirt.engine.api.model.Host ( ) ; model.setName ( NAMES [ 0 ] ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; try { collection.add ( model ) ; org.junit.jupiter.api.Assertions.fail ( "expected WebApplicationException on incomplete parameters" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyIncompleteException ( wae , "Host" , "add" , "address" ) ; } }

Target:
public void testAddIncompleteParameters ( ) { org.ovirt.engine.api.model.Host model = new org.ovirt.engine.api.model.Host ( ) ; model.setName ( NAMES [ 0 ] ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; verifyIncompleteException ( org.junit.jupiter.api.Assertions.assertThrows ( javax.ws.rs.WebApplicationException.class , ( ) -> org.ovirt.engine.api.restapi.resource.collection.add ( model ) ) , "Host" , "add" , "address" ) ; }
Source:
public static void getoVirtISOsList ( 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.compat.RpmVersion > ( ( ( java.util.ArrayList < org.ovirt.engine.core.compat.RpmVersion > ) ( source ) ) ) : new java.util.ArrayList < org.ovirt.engine.core.compat.RpmVersion > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetoVirtISOs , new org.ovirt.engine.core.common.queries.VdsIdParametersBase ( id ) , aQuery ) ; }

Target:
public void getStorageDomainMaxNameLength ( 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.Integer ) ( source ) ) . intValue ( ) : 1 ; } } ; getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.StorageDomainNameSizeLimit , getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
public javax.ws.rs.core.Response remove ( org.ovirt.engine.api.model.Action action ) { get ( ) ; org.ovirt.engine.core.common.action.StoragePoolParametersBase params = new org.ovirt.engine.core.common.action.StoragePoolParametersBase ( asGuid ( id ) ) ; if ( ( action != null ) && ( action.isSetForce ( ) ) ) { params.setForceDelete ( action.isForce ( ) ) ; } return performAction ( VdcActionType.RemoveStoragePool , params ) ; }

Target:
public javax.ws.rs.core.Response remove ( ) { get ( ) ; org.ovirt.engine.core.common.action.StoragePoolParametersBase params = new org.ovirt.engine.core.common.action.StoragePoolParametersBase ( asGuid ( id ) ) ; boolean force = org.ovirt.engine.api.common.util.QueryHelper.getBooleanMatrixParameter ( uriInfo , org.ovirt.engine.api.restapi.resource.BackendDataCenterResource.FORCE , true , false ) ; if ( force ) { params.setForceDelete ( force ) ; } return performAction ( VdcActionType.RemoveStoragePool , params ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.Tags setUpTagExpectations ( org.ovirt.engine.core.compat.Guid tagId ) { org.ovirt.engine.core.common.businessentities.Tags mock = control.createMock ( org.ovirt.engine.core.common.businessentities.Tags.class ) ; org.easymock.EasyMock.expect ( mock.gettag_id ( ) ) . andReturn ( tagId ) . anyTimes ( ) ; org.easymock.EasyMock.expect ( mock.getparent_id ( ) ) . andReturn ( org.ovirt.engine.api.restapi.resource.BackendUserTagResourceTest.USER_ID ) . anyTimes ( ) ; return mock ; }

Target:
private org.ovirt.engine.core.common.businessentities.Tags setUpTagExpectations ( org.ovirt.engine.core.compat.Guid tagId ) { org.ovirt.engine.core.common.businessentities.Tags mock = control.createMock ( org.ovirt.engine.core.common.businessentities.Tags.class ) ; org.easymock.EasyMock.expect ( mock.getTagId ( ) ) . andReturn ( tagId ) . anyTimes ( ) ; org.easymock.EasyMock.expect ( mock.getParentId ( ) ) . andReturn ( org.ovirt.engine.api.restapi.resource.BackendUserTagResourceTest.USER_ID ) . anyTimes ( ) ; return mock ; }
Source:
public java.util.List < org.ovirt.engine.core.common.businessentities.Quota > getAllRelevantQuotasForVdsGroup ( org.ovirt.engine.core.compat.Guid vdsGroupId , long engineSessionSeqId , boolean isFiltered ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource quotaParameterSource = getCustomMapSqlParameterSource ( ) ; quotaParameterSource.addValue ( "vds_group_id" , vdsGroupId ) . addValue ( "engine_session_seq_id" , engineSessionSeqId ) . addValue ( "is_filtered" , isFiltered ) ; java.util.List < org.ovirt.engine.core.common.businessentities.Quota > quotas = getCallsHandler ( ) . executeReadList ( "getAllThinQuotasByVDSGroupId" , getQuotaMetaDataFromResultSet ( ) , quotaParameterSource ) ; return quotas ; }

Target:
public java.util.List < org.ovirt.engine.core.common.businessentities.Quota > getAllRelevantQuotasForCluster ( org.ovirt.engine.core.compat.Guid clusterId , long engineSessionSeqId , boolean isFiltered ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource quotaParameterSource = getCustomMapSqlParameterSource ( ) ; quotaParameterSource.addValue ( "cluster_id" , clusterId ) . addValue ( "engine_session_seq_id" , engineSessionSeqId ) . addValue ( "is_filtered" , isFiltered ) ; java.util.List < org.ovirt.engine.core.common.businessentities.Quota > quotas = getCallsHandler ( ) . executeReadList ( "getAllThinQuotasByClusterId" , getQuotaMetaDataFromResultSet ( ) , quotaParameterSource ) ; return quotas ; }
Source:
java.lang.String getFullPath ( final java.io.File brandingRootPath , final java.lang.String path ) { java.lang.String result = null ; java.lang.String mergedPath = java.nio.file.FileSystems.getDefault ( ) . getPath ( brandingRootPath.getAbsolutePath ( ) , ( path == null ? "" : path ) ) . toString ( ) ; if ( ( path != null ) && ( org.ovirt.engine.core.utils.servlet.ServletUtils.isSane ( mergedPath ) ) ) { result = mergedPath ; } else { org.ovirt.engine.ui.frontend.server.gwt.BrandingServlet.log.error ( ( ( "The path \"" + mergedPath ) + "\" is not sane" ) ) ; } return result ; }

Target:
java.io.File getFile ( final java.io.File brandingRootPath , final java.lang.String path ) { java.io.File result = null ; java.lang.String mergedPath = new java.io.File ( brandingRootPath.getAbsolutePath ( ) , ( path == null ? "" : path ) ) . getAbsolutePath ( ) ; if ( ( path != null ) && ( org.ovirt.engine.core.utils.servlet.ServletUtils.isSane ( mergedPath ) ) ) { result = new java.io.File ( mergedPath ) ; } else { org.ovirt.engine.ui.frontend.server.gwt.BrandingServlet.log.error ( ( ( "The path \"" + mergedPath ) + "\" is not sane" ) ) ; } return result ; }
Source:
private static double computeInterfaceUsage ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface ) { return java.lang.Math.max ( org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectsBuilder.truncatePercentage ( iface.getStatistics ( ) . getReceiveRate ( ) ) , org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectsBuilder.truncatePercentage ( iface.getStatistics ( ) . getTransmitRate ( ) ) ) ; }

Target:
private static java.lang.Double computeInterfaceUsage ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface ) { java.lang.Double receiveRate = org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectsBuilder.truncatePercentage ( iface.getStatistics ( ) . getReceiveRate ( ) ) ; java.lang.Double transmitRate = org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectsBuilder.truncatePercentage ( iface.getStatistics ( ) . getTransmitRate ( ) ) ; if ( receiveRate == null ) { return transmitRate ; } else if ( transmitRate == null ) { return receiveRate ; } else { return java.lang.Math.max ( receiveRate , transmitRate ) ; } }
Source:
public static void getSpiceUsbAutoShare ( 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.Boolean ) ( source ) ) . booleanValue ( ) : true ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.SpiceUsbAutoShare , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public static void getDataCenterList ( 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 ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StoragePool > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( "DataCenter: sortby name" , org.ovirt.engine.core.common.interfaces.SearchType.StoragePool ) , aQuery ) ; }
Source:
private void updateMigrationOptions ( ) { org.ovirt.engine.core.compat.Version version = getVersion ( ) . getSelectedItem ( ) ; if ( version == null ) { return ; } autoConverge.updateChangeability ( ConfigurationValues.AutoConvergenceSupported , version ) ; migrateCompressed.updateChangeability ( ConfigurationValues.MigrationCompressionSupported , version ) ; }

Target:
private void initSelectedMacPool ( ) { java.util.Collection < org.ovirt.engine.core.common.businessentities.MacPool > allMacPools = getMacPoolListModel ( ) . getItems ( ) ; org.ovirt.engine.core.common.businessentities.Cluster cluster = getEntity ( ) ; if ( ( allMacPools != null ) && ( cluster != null ) ) { org.ovirt.engine.core.compat.Guid macPoolId = cluster.getMacPoolId ( ) ; for ( org.ovirt.engine.core.common.businessentities.MacPool macPool : allMacPools ) { if ( macPool.getId ( ) . equals ( macPoolId ) ) { getMacPoolListModel ( ) . setSelectedItem ( macPool ) ; break ; } } } }
Source:
public static org.ovirt.engine.core.common.businessentities.VDSGroup map ( org.ovirt.engine.core.common.businessentities.StoragePool pool , org.ovirt.engine.core.common.businessentities.VDSGroup template ) { org.ovirt.engine.core.common.businessentities.VDSGroup entity = ( template != null ) ? template : new org.ovirt.engine.core.common.businessentities.VDSGroup ( ) ; if ( ( pool.getcompatibility_version ( ) ) != null ) { entity.setcompatibility_version ( pool.getcompatibility_version ( ) ) ; } return entity ; }

Target:
public static org.ovirt.engine.core.common.businessentities.VDSGroup map ( org.ovirt.engine.core.common.businessentities.StoragePool pool , org.ovirt.engine.core.common.businessentities.VDSGroup template ) { org.ovirt.engine.core.common.businessentities.VDSGroup entity = ( template != null ) ? template : new org.ovirt.engine.core.common.businessentities.VDSGroup ( ) ; if ( ( pool.getCompatibilityVersion ( ) ) != null ) { entity.setCompatibilityVersion ( pool.getCompatibilityVersion ( ) ) ; } return entity ; }
Source:
public java.util.ArrayList < org.ovirt.engine.core.common.action.VdcReturnValueBase > RunMultipleActions ( org.ovirt.engine.core.common.action.VdcActionType actionType , java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > parameters , boolean isRunOnlyIfAllCanDoPass ) { return runMultipleActionsImpl ( actionType , parameters , false , isRunOnlyIfAllCanDoPass ) ; }

Target:
public java.util.ArrayList < org.ovirt.engine.core.common.action.VdcReturnValueBase > RunMultipleActions ( org.ovirt.engine.core.common.action.VdcActionType actionType , java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > parameters , boolean isRunOnlyIfAllCanDoPass ) { org.ovirt.engine.core.common.action.VdcReturnValueBase returnValue = notAllowToRunAction ( actionType ) ; if ( returnValue != null ) { java.util.ArrayList < org.ovirt.engine.core.common.action.VdcReturnValueBase > list = new java.util.ArrayList < org.ovirt.engine.core.common.action.VdcReturnValueBase > ( ) ; list.add ( returnValue ) ; return list ; } else { return runMultipleActionsImpl ( actionType , parameters , false , isRunOnlyIfAllCanDoPass ) ; } }
Source:
public static void getUpHostListByCluster ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String clusterName ) { 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 ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > list = org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.VDS > cast ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.IVdcQueryable > ) ( source ) ) ) ; return list ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ( ) ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getUpHostListByCluster ( aQuery , clusterName , null ) ; }

Target:
public static void getVmsRunningOnOrMigratingToVds ( 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 ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VM > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmsRunningOnOrMigratingToVds , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }