auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private void updateNumOfMonitors ( ) { if ( isVncSelected ( ) ) { getNumOfMonitors ( ) . setSelectedItem ( 1 ) ; getNumOfMonitors ( ) . setIsChangable ( false ) ; } else { getNumOfMonitors ( ) . setIsChangable ( true ) ; } }

Target:
private void updateNumOfMonitors ( ) { if ( ( getDisplayType ( ) . getSelectedItem ( ) ) == ( org.ovirt.engine.core.common.businessentities.DisplayType.qxl ) ) { getNumOfMonitors ( ) . setIsChangable ( true ) ; } else { getNumOfMonitors ( ) . setSelectedItem ( 1 ) ; getNumOfMonitors ( ) . setIsChangable ( false ) ; } }
Source:
public org.ovirt.engine.core.bll.provider.storage.OpenStackVolumeProviderProxy getVolumeProviderProxy ( ) { if ( ( volumeProviderProxy ) == null ) { volumeProviderProxy = org.ovirt.engine.core.bll.provider.storage.OpenStackVolumeProviderProxy.getFromStorageDomainId ( org.ovirt.engine.core.bll.storage.disk.cinder.CinderQueryBase.getParameters ( ) . getId ( ) , org.ovirt.engine.core.bll.storage.disk.cinder.CinderQueryBase.getUserID ( ) , org.ovirt.engine.core.bll.storage.disk.cinder.CinderQueryBase.getParameters ( ) . isFiltered ( ) ) ; } return volumeProviderProxy ; }

Target:
public org.ovirt.engine.core.bll.provider.storage.OpenStackVolumeProviderProxy getVolumeProviderProxy ( ) { if ( ( volumeProviderProxy ) == null ) { volumeProviderProxy = org.ovirt.engine.core.bll.provider.storage.OpenStackVolumeProviderProxy.getFromStorageDomainId ( org.ovirt.engine.core.bll.storage.disk.cinder.CinderQueryBase.getParameters ( ) . getId ( ) , org.ovirt.engine.core.bll.storage.disk.cinder.CinderQueryBase.getUserID ( ) , org.ovirt.engine.core.bll.storage.disk.cinder.CinderQueryBase.getParameters ( ) . isFiltered ( ) , providerProxyFactory ) ; } return volumeProviderProxy ; }
Source:
public org.ovirt.engine.core.common.action.VdcReturnValueBase canDoActionOnly ( ) { setActionMessageParameters ( ) ; getReturnValue ( ) . setCanDoAction ( internalCanDoAction ( ) ) ; java.lang.String tempVar = getDescription ( ) ; getReturnValue ( ) . setDescription ( ( tempVar != null ? tempVar : getReturnValue ( ) . getDescription ( ) ) ) ; return _returnValue ; }

Target:
public org.ovirt.engine.core.common.action.VdcReturnValueBase validateOnly ( ) { setActionMessageParameters ( ) ; getReturnValue ( ) . setValid ( internalValidate ( ) ) ; java.lang.String tempVar = getDescription ( ) ; getReturnValue ( ) . setDescription ( ( tempVar != null ? tempVar : getReturnValue ( ) . getDescription ( ) ) ) ; return _returnValue ; }
Source:
public void getTemplateDiskList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid templateId ) { 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.DiskImage > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmTemplatesDisks , new org.ovirt.engine.core.common.queries.IdQueryParameters ( templateId ) , aQuery ) ; }

Target:
public void getMaxNumOfCPUsPerSocket ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String version ) { 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 ; } } ; org.ovirt.engine.core.common.queries.GetConfigurationValueParameters tempVar = new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.MaxNumOfCpuPerSocket ) ; tempVar.setVersion ( version ) ; getConfigFromCache ( tempVar , aQuery ) ; }
Source:
public static void getVmSnapshotList ( 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 ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Snapshot > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Snapshot > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllVmSnapshotsByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }

Target:
public static void getStorageDomainList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ( ) ; } } ; org.ovirt.engine.core.common.queries.SearchParameters searchParams = new org.ovirt.engine.core.common.queries.SearchParameters ( "Storage:" , org.ovirt.engine.core.common.interfaces.SearchType.StorageDomain ) ; searchParams.setMaxCount ( 9999 ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.Search , searchParams , aQuery ) ; }
Source:
public void getNetworkConnectivityCheckTimeoutInSeconds ( 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 ) ) : 120 ; } } ; getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.NetworkConnectivityCheckTimeoutInSeconds , getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public void getDataCenterMaxNameLength ( org.ovirt.engine.ui.frontend.AsyncQuery < java.lang.Integer > aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.DefaultValueConverter < > ( 1 ) ; getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.StoragePoolNameSizeLimit , getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
public static void GetTemplateById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid templateId ) { 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.GetVmTemplate , new org.ovirt.engine.core.common.queries.GetVmTemplateParameters ( templateId ) , aQuery ) ; }

Target:
public static void GetClusterNetworkList ( 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 ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.Network > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllNetworksByClusterId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( clusterId ) , aQuery ) ; }
Source:
protected org.ovirt.engine.ui.common.widget.uicommon.popup.vm.VmPopupWidgetConfigMap createWidgetConfiguration ( ) { return super . createWidgetConfiguration ( ) . putAll ( poolSpecificFields ( ) , org.ovirt.engine.ui.common.widget.uicommon.popup.vm.VmPopupWidgetConfig.hiddenField ( ) ) . update ( consoleTab , org.ovirt.engine.ui.common.widget.uicommon.popup.vm.VmPopupWidgetConfig.simpleField ( ) . visibleInAdvancedModeOnly ( ) ) ; }

Target:
protected org.ovirt.engine.ui.common.widget.uicommon.popup.vm.PopupWidgetConfigMap createWidgetConfiguration ( ) { return super . createWidgetConfiguration ( ) . putAll ( poolSpecificFields ( ) , org.ovirt.engine.ui.common.widget.uicommon.popup.vm.PopupWidgetConfig.hiddenField ( ) ) . putOne ( logicalNetworksEditorPanel , org.ovirt.engine.ui.common.widget.uicommon.popup.vm.PopupWidgetConfig.hiddenField ( ) ) . update ( consoleTab , org.ovirt.engine.ui.common.widget.uicommon.popup.vm.PopupWidgetConfig.simpleField ( ) . visibleInAdvancedModeOnly ( ) ) ; }
Source:
protected void updateInputTitle ( java.util.ArrayList < java.lang.String > grayOutReasons , com.google.gwt.dom.client.Element input ) { java.lang.StringBuilder title = new java.lang.StringBuilder ( org.ovirt.engine.ui.common.widget.uicommon.storage.AbstractSanStorageList.constants.empty ( ) ) ; for ( java.lang.String reason : grayOutReasons ) { title.append ( reason ) . append ( org.ovirt.engine.ui.common.widget.uicommon.storage.AbstractSanStorageList.constants.space ( ) ) ; } org.ovirt.engine.ui.common.widget.tooltip.TooltipMixin.addTooltipToElement ( com.google.gwt.safehtml.shared.SafeHtmlUtils.fromString ( title.toString ( ) ) , input , Placement.LEFT ) ; }

Target:
protected void updateInputTitle ( java.util.ArrayList < java.lang.String > grayOutReasons , com.google.gwt.dom.client.Element input ) { java.lang.StringBuilder title = new java.lang.StringBuilder ( org.ovirt.engine.ui.common.widget.uicommon.storage.AbstractSanStorageList.constants.empty ( ) ) ; for ( java.lang.String reason : grayOutReasons ) { title.append ( reason ) . append ( org.ovirt.engine.ui.common.widget.uicommon.storage.AbstractSanStorageList.constants.space ( ) ) ; } org.ovirt.engine.ui.common.utils.ElementTooltipUtils.setTooltipOnElement ( input , com.google.gwt.safehtml.shared.SafeHtmlUtils.fromString ( title.toString ( ) ) , Placement.LEFT ) ; }
Source:
public void customValue ( ) { final org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase b = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.TestAuditLogableBase ( ) ; final java.lang.String key = "foo" ; final java.lang.String value = org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.NAME ; b.AddCustomValue ( key , value ) ; final java.lang.String v = b.GetCustomValue ( key ) ; org.junit.Assert.assertEquals ( value , v ) ; }

Target:
public void customValue ( ) { final org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase b = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.TestAuditLogableBase ( ) ; final java.lang.String key = "foo" ; final java.lang.String value = org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.NAME ; b.addCustomValue ( key , value ) ; final java.lang.String v = b.getCustomValue ( key ) ; org.junit.Assert.assertEquals ( value , v ) ; }
Source:
public static void getVmGuestAgentInterfacesByVmId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid vmId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmGuestAgentInterface > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmGuestAgentInterfacesByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) , aQuery ) ; }

Target:
public void isSupportBridgesReportByVDSM ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String version ) { 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.core.common.queries.GetConfigurationValueParameters tempVar = new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.SupportBridgesReportByVDSM ) ; tempVar.setVersion ( version ) ; getConfigFromCache ( tempVar , aQuery ) ; }
Source:
private java.lang.String getVmIsBeingImportedMessage ( ) { java.lang.StringBuilder builder = new java.lang.StringBuilder ( VdcBllMessages.ACTION_TYPE_FAILED_VM_IS_BEING_IMPORTED.name ( ) ) ; if ( ( org.ovirt.engine.core.bll.ImportVmCommand.getVmName ( ) ) != null ) { builder.append ( java.lang.String.format ( "$VmName %1$s" , org.ovirt.engine.core.bll.ImportVmCommand.getVmName ( ) ) ) ; } return builder.toString ( ) ; }

Target:
protected java.util.Map < java.lang.String , org.ovirt.engine.core.common.utils.Pair < java.lang.String , java.lang.String > > getSharedLocks ( ) { return java.util.Collections.singletonMap ( getParameters ( ) . getContainerId ( ) . toString ( ) , org.ovirt.engine.core.bll.LockMessagesMatchUtil.makeLockingPair ( LockingGroup.REMOTE_VM , org.ovirt.engine.core.bll.ImportVmCommand.getVmIsBeingImportedMessage ( ) ) ) ; }
Source:
private org.ovirt.engine.core.common.vdscommands.MigrateVDSCommandParameters createMigrateVDSCommandParameters ( ) { java.lang.String srcVdsHost = org.ovirt.engine.core.bll.MigrateVmCommand.getVds ( ) . getHostName ( ) ; java.lang.String dstVdsHost = java.lang.String.format ( "%1$s:%2$s" , getDestinationVds ( ) . getHostName ( ) , getDestinationVds ( ) . getPort ( ) ) ; return new org.ovirt.engine.core.common.vdscommands.MigrateVDSCommandParameters ( org.ovirt.engine.core.bll.MigrateVmCommand.getVdsId ( ) , org.ovirt.engine.core.bll.MigrateVmCommand.getVmId ( ) , srcVdsHost , vdsDestinationId , dstVdsHost , org.ovirt.engine.core.common.businessentities.MigrationMethod.ONLINE , isTunnelMigrationUsed ( ) , getMigrationNetworkIp ( ) ) ; }

Target:
private org.ovirt.engine.core.common.vdscommands.MigrateVDSCommandParameters createMigrateVDSCommandParameters ( ) { java.lang.String srcVdsHost = org.ovirt.engine.core.bll.MigrateVmCommand.getVds ( ) . getHostName ( ) ; java.lang.String dstVdsHost = java.lang.String.format ( "%1$s:%2$s" , getDestinationVds ( ) . getHostName ( ) , getDestinationVds ( ) . getPort ( ) ) ; return new org.ovirt.engine.core.common.vdscommands.MigrateVDSCommandParameters ( org.ovirt.engine.core.bll.MigrateVmCommand.getVdsId ( ) , org.ovirt.engine.core.bll.MigrateVmCommand.getVmId ( ) , srcVdsHost , vdsDestinationId , dstVdsHost , org.ovirt.engine.core.common.businessentities.MigrationMethod.ONLINE , isTunnelMigrationUsed ( ) , getMigrationNetworkIp ( ) , org.ovirt.engine.core.bll.MigrateVmCommand.getVds ( ) . getVdsGroupCompatibilityVersion ( ) ) ; }
Source:
protected void addVmWatchdog ( ) { org.ovirt.engine.core.common.businessentities.VmWatchdog vmWatchdog = org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . getWatchdog ( ) ; if ( vmWatchdog != null ) { org.ovirt.engine.core.common.action.WatchdogParameters parameters = new org.ovirt.engine.core.common.action.WatchdogParameters ( ) ; parameters.setId ( org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . getVmId ( ) ) ; parameters.setAction ( vmWatchdog.getAction ( ) ) ; parameters.setModel ( vmWatchdog.getModel ( ) ) ; org.ovirt.engine.core.bll.AddVmCommand.getBackend ( ) . runInternalAction ( VdcActionType.AddWatchdog , parameters ) ; } }

Target:
protected void addVmWatchdog ( ) { org.ovirt.engine.core.common.businessentities.VmWatchdog vmWatchdog = org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . getWatchdog ( ) ; if ( vmWatchdog != null ) { org.ovirt.engine.core.common.action.WatchdogParameters parameters = new org.ovirt.engine.core.common.action.WatchdogParameters ( ) ; parameters.setId ( org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . getVmId ( ) ) ; parameters.setAction ( vmWatchdog.getAction ( ) ) ; parameters.setModel ( vmWatchdog.getModel ( ) ) ; runInternalAction ( VdcActionType.AddWatchdog , parameters , org.ovirt.engine.core.bll.AddVmCommand.cloneContextAndDetachFromParent ( ) ) ; } }
Source:
private boolean isPowerManagementLegal ( java.util.List < org.ovirt.engine.core.common.businessentities.pm.FenceAgent > fenceAgents , org.ovirt.engine.core.common.businessentities.VDSGroup vdsGroup , java.util.List < java.lang.String > messages ) { if ( ( fenceAgents == null ) || ( fenceAgents.isEmpty ( ) ) ) { messages.add ( VdcBllMessages.ACTION_TYPE_FAILED_PM_ENABLED_WITHOUT_AGENT.name ( ) ) ; return false ; } else { return isCompatibleAgentExists ( fenceAgents , vdsGroup , messages ) ; } }

Target:
private boolean isPowerManagementLegal ( java.util.List < org.ovirt.engine.core.common.businessentities.pm.FenceAgent > fenceAgents , org.ovirt.engine.core.common.businessentities.VDSGroup vdsGroup , java.util.List < java.lang.String > messages ) { if ( ( fenceAgents == null ) || ( fenceAgents.isEmpty ( ) ) ) { messages.add ( EngineMessage.ACTION_TYPE_FAILED_PM_ENABLED_WITHOUT_AGENT.name ( ) ) ; return false ; } else { return isCompatibleAgentExists ( fenceAgents , vdsGroup , messages ) ; } }
Source:
private void copyFromCommandEntity ( org.ovirt.engine.core.common.businessentities.AsyncTasks asyncTask , org.ovirt.engine.core.common.businessentities.CommandEntity cmdEntity ) { if ( cmdEntity != null ) { asyncTask.setActionParameters ( cmdEntity.getActionParameters ( ) ) ; asyncTask.setParentCommandId ( cmdEntity.getParentCommandId ( ) ) ; asyncTask.setRootCommandId ( cmdEntity.getRootCommandId ( ) ) ; asyncTask.setCommandStatus ( cmdEntity.getCommandStatus ( ) ) ; asyncTask.setCommandType ( cmdEntity.getCommandType ( ) ) ; asyncTask.setCreatedAt ( cmdEntity.getCreatedAt ( ) ) ; } }

Target:
public org.ovirt.engine.core.common.businessentities.CommandEntity getCommandEntity ( org.ovirt.engine.core.compat.Guid commandId ) { return commandsCache.get ( commandId ) ; }
Source:
public static void getAttachedTagsToHost ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.setAttachedTagsConverter ( aQuery ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetTagsByVdsId , new org.ovirt.engine.core.common.queries.GetTagsByVdsIdParameters ( id.toString ( ) ) , aQuery ) ; }

Target:
public static 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 ) ; }
Source:
private java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > createDiskImageList ( ) { org.ovirt.engine.core.common.businessentities.DiskImage disk = new org.ovirt.engine.core.common.businessentities.DiskImage ( ) ; disk.setImageId ( diskImageId ) ; disk.setstorage_ids ( new java.util.ArrayList < org.ovirt.engine.core.compat.Guid > ( java.util.Arrays.asList ( storageDomainId ) ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > diskImageList = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > ( ) ; diskImageList.add ( disk ) ; return diskImageList ; }

Target:
private java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > createDiskImageList ( ) { org.ovirt.engine.core.common.businessentities.DiskImage disk = new org.ovirt.engine.core.common.businessentities.DiskImage ( ) ; disk.setImageId ( diskImageId ) ; disk.setStorageIds ( new java.util.ArrayList < org.ovirt.engine.core.compat.Guid > ( java.util.Arrays.asList ( storageDomainId ) ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > diskImageList = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > ( ) ; diskImageList.add ( disk ) ; return diskImageList ; }
Source:
public void getVmDiskList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid vmId , boolean isRefresh ) { 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 source ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > ( ) ; } } ; org.ovirt.engine.core.common.queries.IdQueryParameters params = new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) ; params.setRefresh ( isRefresh ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllDisksByVmId , params , aQuery ) ; }

Target:
public void getHostById ( 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 ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVdsByVdsId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) . withoutRefresh ( ) , aQuery ) ; }
Source:
public void testClearMigratingToVds ( ) throws java.lang.Exception { org.ovirt.engine.core.compat.Guid vmId = new org.ovirt.engine.core.compat.Guid ( "77296e00-0cad-4e5a-9299-008a7b6f4356" ) ; org.ovirt.engine.core.common.businessentities.VmDynamic vmDynamic = dao.get ( vmId ) ; org.junit.Assert.assertNotNull ( "migrating_to_vds field should not be null before we clear it" , vmDynamic.getMigratingToVds ( ) ) ; dao.clearMigratingToVds ( vmId ) ; vmDynamic = dao.get ( vmId ) ; org.junit.Assert.assertNull ( "migrating_to_vds field should be null after we clear it" , vmDynamic.getMigratingToVds ( ) ) ; }

Target:
public void testClearMigratingToVds ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.VmDynamic vmDynamic = dao.get ( FixturesTool.VM_RHEL5_POOL_51 ) ; org.junit.Assert.assertNotNull ( "migrating_to_vds field should not be null before we clear it" , vmDynamic.getMigratingToVds ( ) ) ; dao.clearMigratingToVds ( FixturesTool.VM_RHEL5_POOL_51 ) ; vmDynamic = dao.get ( FixturesTool.VM_RHEL5_POOL_51 ) ; org.junit.Assert.assertNull ( "migrating_to_vds field should be null after we clear it" , vmDynamic.getMigratingToVds ( ) ) ; }
Source:
public void search ( ) { if ( ( getEntity ( ) ) != null ) { super . search ( ) ; } }

Target:
protected void syncSearch ( ) { if ( ( getEntity ( ) ) == null ) { return ; } org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getGlusterHooks ( new org.ovirt.engine.ui.frontend.AsyncQuery ( this , new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity > glusterHooks = ( ( java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity > ) ( returnValue ) ) ; setItems ( glusterHooks ) ; } } ) , getEntity ( ) . getId ( ) ) ; }
Source:
private boolean restoreCinder ( java.util.List < org.ovirt.engine.core.common.businessentities.storage.CinderDisk > cinderDisks , org.ovirt.engine.core.compat.Guid removedSnapshotId ) { if ( ! ( cinderDisks.isEmpty ( ) ) ) { return restoreAllCinderDisks ( cinderDisks , removedSnapshotId ) ; } return true ; }

Target:
private boolean restoreCinderDisks ( org.ovirt.engine.core.compat.Guid removedSnapshotId , java.util.List < org.ovirt.engine.core.common.businessentities.storage.CinderDisk > cinderDisksToRestore , java.util.List < org.ovirt.engine.core.common.businessentities.storage.CinderDisk > cinderDisksToRemove , java.util.List < org.ovirt.engine.core.common.businessentities.storage.CinderDisk > cinderVolumesToRemove ) { if ( ( ( ! ( cinderDisksToRestore.isEmpty ( ) ) ) || ( ! ( cinderDisksToRemove.isEmpty ( ) ) ) ) || ( ! ( cinderVolumesToRemove.isEmpty ( ) ) ) ) { return restoreAllCinderDisks ( cinderDisksToRestore , cinderDisksToRemove , cinderVolumesToRemove , removedSnapshotId ) ; } return true ; }
Source:
public void validateFailureOnCopyingLunDisk ( ) { initializeCommand ( new org.ovirt.engine.core.common.businessentities.storage.LunDisk ( ) ) ; command.getParameters ( ) . setOperation ( ImageOperation.Copy ) ; command.init ( ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( command , EngineMessage.ACTION_TYPE_FAILED_NOT_SUPPORTED_DISK_STORAGE_TYPE ) ; }

Target:
public void validateFailureOnCopyingCinderDisk ( ) { initializeCommand ( new org.ovirt.engine.core.common.businessentities.storage.CinderDisk ( ) , VmEntityType.VM ) ; command.getParameters ( ) . setOperation ( ImageOperation.Copy ) ; org.mockito.Mockito.doReturn ( new org.ovirt.engine.core.common.businessentities.VmTemplate ( ) ) . when ( command ) . getTemplateForImage ( ) ; command.init ( ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( command , EngineMessage.ACTION_TYPE_FAILED_NOT_SUPPORTED_DISK_STORAGE_TYPE ) ; }
Source:
public static void GetClusterServerMemoryOverCommit ( 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 ( ) : 0 ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.MaxVdsMemOverCommitForServers , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public static void getClusterServerMemoryOverCommit ( 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 ( ) : 0 ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.MaxVdsMemOverCommitForServers , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
public static void main ( java.lang.String ... args ) { org.ovirt.engine.core.config.EngineConfig.initLogging ( ) ; try { org.ovirt.engine.core.config.EngineConfig.getInstance ( ) . setParser ( new org.ovirt.engine.core.config.EngineConfigCLIParser ( ) ) ; org.ovirt.engine.core.config.EngineConfig.getInstance ( ) . setUpAndExecute ( args ) ; } catch ( java.lang.Throwable t ) { org.ovirt.engine.core.config.EngineConfig.log.debug ( "Exiting with error: " , t ) ; org.ovirt.engine.core.config.EngineConfig.console.writeErrorLine ( t.getMessage ( ) ) ; java.lang.System.exit ( 1 ) ; } }

Target:
public static void main ( java.lang.String ... args ) { org.ovirt.engine.core.config.EngineConfig.initLogging ( ) ; try { org.ovirt.engine.core.config.EngineConfigCLIParser parser = new org.ovirt.engine.core.config.EngineConfigCLIParser ( ) ; parser.parse ( args ) ; org.ovirt.engine.core.config.EngineConfig.getInstance ( ) . setUpAndExecute ( parser ) ; } catch ( java.lang.Throwable t ) { org.ovirt.engine.core.config.EngineConfig.log.debug ( "Exiting with error: " , t ) ; org.ovirt.engine.core.config.EngineConfig.console.writeErrorLine ( t.getMessage ( ) ) ; java.lang.System.exit ( 1 ) ; } }
Source:
private org.ovirt.engine.core.common.businessentities.StorageServerConnections createPosixConnection ( java.lang.String connection , org.ovirt.engine.core.common.businessentities.StorageType type , java.lang.String vfsType , java.lang.String mountOptions ) { org.ovirt.engine.core.common.businessentities.StorageServerConnections connectionDetails = populateBasicConnectionDetails ( connection , type ) ; connectionDetails.setVfsType ( vfsType ) ; connectionDetails.setMountOptions ( mountOptions ) ; return connectionDetails ; }

Target:
public void addISCSINonEmptyIqn ( ) { org.ovirt.engine.core.common.businessentities.StorageServerConnections newISCSIConnection = createISCSIConnection ( "10.35.16.25" , StorageType.ISCSI , "iqn.2013-04.myhat.com:aaa-target1" , "3650" , "user1" , "mypassword123" ) ; parameters.setStorageServerConnection ( newISCSIConnection ) ; parameters.setVdsId ( Guid.Empty ) ; org.mockito.Mockito.doReturn ( false ) . when ( command ) . isConnWithSameDetailsExists ( newISCSIConnection , null ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionSuccess ( command ) ; }
Source:
private void verifyAsyncActionStartedButNotCompleted ( ) { verifyAsyncActionStarted ( ) ; org.mockito.Mockito.verify ( mockEventBus , org.mockito.Mockito.never ( ) ) . fireEvent ( new org.ovirt.engine.ui.frontend.communication.AsyncOperationCompleteEvent ( testState ) ) ; }

Target:
public void tearDown ( ) throws java.lang.Exception { org.mockito.Mockito.verify ( mockEventBus , org.mockito.Mockito.never ( ) ) . fireEvent ( new org.ovirt.engine.ui.frontend.communication.AsyncOperationCompleteEvent ( testState , false , true ) ) ; org.mockito.Mockito.verify ( mockEventBus , org.mockito.Mockito.never ( ) ) . fireEvent ( new org.ovirt.engine.ui.frontend.communication.AsyncOperationCompleteEvent ( testState , false , false ) ) ; }
Source:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { java.lang.String propName = ( ( org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ) ( args ) ) . PropertyName ; if ( "IsHostTabVisible" . equals ( propName ) ) { hostPanel.setVisible ( object.getIsHostTabVisible ( ) ) ; } }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { java.lang.String propName = ( ( org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ) ( args ) ) . PropertyName ; if ( "IsHostTabVisible" . equals ( propName ) ) { hostPanel.setVisible ( object.getIsHostTabVisible ( ) ) ; } else if ( "IsCustomPropertiesSheetVisible" . equals ( propName ) ) { customPropertiesPanel.setVisible ( object.getIsCustomPropertiesSheetVisible ( ) ) ; } }
Source:
protected void selectionChanged ( java.lang.Boolean value ) { for ( org.ovirt.engine.ui.uicommonweb.models.EntityModel model : getNetworksTableItems ( ) ) { org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterNetworkManageModel clusterNetworkManageModel = ( ( org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterNetworkManageModel ) ( model ) ) ; if ( canEditAssign ( clusterNetworkManageModel ) ) { changeIsAttached ( clusterNetworkManageModel , value ) ; } } refreshNetworksTable ( ) ; }

Target:
protected void selectionChanged ( java.lang.Boolean value ) { for ( org.ovirt.engine.ui.uicommonweb.models.EntityModel model : getNetworksTableItems ( ) ) { org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterNetworkModel clusterNetworkManageModel = ( ( org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterNetworkModel ) ( model ) ) ; if ( canEditAssign ( clusterNetworkManageModel ) ) { changeIsAttached ( clusterNetworkManageModel , value ) ; } } refreshNetworksTable ( ) ; }
Source:
public void onClick ( com.google.gwt.event.dom.client.ClickEvent event ) { iface.getMAC ( ) . setIsChangable ( enableManualMacCheckbox.getValue ( ) ) ; }

Target:
private void applyStyles ( ) { cardStatusEditor.addContentWidgetStyleName ( style.cardStatusEditorContent ( ) ) ; pluggedEditor.addContentWidgetStyleName ( style.cardStatusRadioContent ( ) ) ; unpluggedEditor.addContentWidgetStyleName ( style.cardStatusRadioContent ( ) ) ; linkStateEditor.addContentWidgetStyleName ( style.linkStateEditorContent ( ) ) ; linkedEditor.addContentWidgetStyleName ( style.linkStateRadioContent ( ) ) ; unlinkedEditor.addContentWidgetStyleName ( style.linkStateRadioContent ( ) ) ; enableManualMacCheckbox.addContentWidgetStyleName ( style.checkBox ( ) ) ; portMirroringEditor.addContentWidgetStyleName ( style.portMirroringEditor ( ) ) ; }
Source:
public static org.ovirt.engine.api.model.Storage map ( org.ovirt.engine.core.common.businessentities.storage.LUNs entity , org.ovirt.engine.api.model.Storage template ) { org.ovirt.engine.api.model.Storage model = ( template != null ) ? template : new org.ovirt.engine.api.model.Storage ( ) ; model.setId ( entity.getLUN_id ( ) ) ; model.setType ( org.ovirt.engine.api.restapi.types.StorageDomainMapper.map ( entity.getLunType ( ) , null ) ) ; model.getLogicalUnits ( ) . add ( org.ovirt.engine.api.restapi.types.StorageLogicalUnitMapper.map ( entity , ( ( org.ovirt.engine.api.model.LogicalUnit ) ( null ) ) ) ) ; return model ; }

Target:
public static org.ovirt.engine.api.model.Storage map ( org.ovirt.engine.core.common.businessentities.storage.LUNs entity , org.ovirt.engine.api.model.Storage template ) { org.ovirt.engine.api.model.Storage model = ( template != null ) ? template : new org.ovirt.engine.api.model.Storage ( ) ; model.setId ( entity.getLUN_id ( ) ) ; model.setType ( org.ovirt.engine.api.restapi.types.StorageDomainMapper.map ( entity.getLunType ( ) , null ) ) ; model.setLogicalUnits ( new org.ovirt.engine.api.model.LogicalUnits ( ) ) ; model.getLogicalUnits ( ) . getLogicalUnits ( ) . add ( org.ovirt.engine.api.restapi.types.StorageLogicalUnitMapper.map ( entity , ( ( org.ovirt.engine.api.model.LogicalUnit ) ( null ) ) ) ) ; return model ; }
Source:
public java.util.Map < java.lang.Integer , java.lang.Integer > getHugePages ( org.ovirt.engine.core.common.businessentities.VmBase vm ) { if ( ! ( isBackedByHudepages ( vm ) ) ) { return java.util.Collections.EMPTY_MAP ; } int hugePageSize = java.lang.Integer.parseInt ( getHugePageSize ( vm ) ) ; int fullPages = ( vm.getMemSizeMb ( ) ) / hugePageSize ; int lastPage = java.lang.Math.min ( 1 , ( ( vm.getMemSizeMb ( ) ) % hugePageSize ) ) ; return java.util.Collections.singletonMap ( hugePageSize , ( fullPages + lastPage ) ) ; }

Target:
public static java.util.Map < java.lang.Integer , java.lang.Integer > getHugePages ( org.ovirt.engine.core.common.businessentities.VmBase vm ) { if ( ! ( org.ovirt.engine.core.common.utils.HugePageUtils.isBackedByHugepages ( vm ) ) ) { return java.util.Collections.emptyMap ( ) ; } int hugePageSize = java.lang.Integer.parseInt ( org.ovirt.engine.core.common.utils.HugePageUtils.getHugePageSize ( vm ) ) ; int fullPages = ( ( int ) ( ( ( ( ( org.ovirt.engine.core.common.utils.HugePageUtils.KIB_IN_MIB ) * ( vm.getMemSizeMb ( ) ) ) + hugePageSize ) - 1 ) / hugePageSize ) ) ; return java.util.Collections.singletonMap ( hugePageSize , fullPages ) ; }
Source:
public void invoke ( org.ovirt.engine.api.extensions.ExtMap context , java.util.Map < java.lang.String , java.lang.Object > args ) { context.put ( Schema.InvokeKeys.MODIFICATION_TYPE , Sql.ModificationTypes.DELETE ) ; context.put ( Schema.InvokeKeys.ENTITY_KEYS , new org.ovirt.engine.api.extensions.ExtMap ( ) . mput ( Schema.GroupIdentifiers.NAME , context.get ( org.ovirt.engine.extension.aaa.jdbc.binding.cli.Cli.ContextKeys.POSITIONAL ) ) ) ; org.ovirt.engine.extension.aaa.jdbc.binding.cli.Cli.commands.get ( "_schema-modify" ) . invoke ( context ) ; context.putIfAbsent ( org.ovirt.engine.extension.aaa.jdbc.binding.cli.Cli.ContextKeys.EXIT_STATUS , org.ovirt.engine.extension.aaa.jdbc.binding.cli.Cli.SUCCESS ) ; }

Target:
public void invoke ( org.ovirt.engine.api.extensions.ExtMap context , java.util.Map < java.lang.String , java.lang.Object > args ) { context.mput ( Schema.InvokeKeys.ENTITY , Schema.Entities.GROUP ) . mput ( Schema.InvokeKeys.ENTITY_KEYS , new org.ovirt.engine.api.extensions.ExtMap ( ) . mput ( Schema.GroupIdentifiers.NAME , args.get ( "group" ) ) . mput ( Schema.SharedKeys.ADD_GROUP , context.get ( ContextKeys.POSITIONAL ) ) ) ; org.ovirt.engine.extension.aaa.jdbc.binding.cli.Cli.commands.get ( "_schema-modify" ) . invoke ( context ) ; context.putIfAbsent ( ContextKeys.EXIT_STATUS , org.ovirt.engine.extension.aaa.jdbc.binding.cli.Cli.SUCCESS ) ; }
Source:
public static org.ovirt.engine.core.common.action.VdcReturnValueBase canDoAction ( org.ovirt.engine.core.common.action.VdcActionType actionType , org.ovirt.engine.core.common.action.VdcActionParametersBase parameters , org.ovirt.engine.core.bll.context.CommandContext commandContext , boolean isInternal ) { parameters.setSessionId ( commandContext.getEngineContext ( ) . getSessionId ( ) ) ; org.ovirt.engine.core.bll.CommandBase < ? > command = org.ovirt.engine.core.bll.tasks.CommandHelper.buildCommand ( actionType , parameters , commandContext.getExecutionContext ( ) , CommandStatus.NOT_STARTED ) ; command.setInternalExecution ( isInternal ) ; return command.validateOnly ( ) ; }

Target:
public static org.ovirt.engine.core.common.action.VdcReturnValueBase validate ( org.ovirt.engine.core.common.action.VdcActionType actionType , org.ovirt.engine.core.common.action.VdcActionParametersBase parameters , org.ovirt.engine.core.bll.context.CommandContext commandContext ) { return org.ovirt.engine.core.bll.CommandsFactory.createCommand ( actionType , parameters , commandContext ) . validateOnly ( ) ; }
Source:
public void getClusterById ( 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 ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVdsGroupById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }

Target:
public void getStorageDomainByName ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String storageDomainName ) { 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.getInstance ( ) . runQuery ( VdcQueryType.GetStorageDomainByName , new org.ovirt.engine.core.common.queries.NameQueryParameters ( storageDomainName ) , aQuery ) ; }
Source:
protected boolean validateGraphicsAndDisplay ( ) { return org.ovirt.engine.core.bll.VmHandler.isGraphicsAndDisplaySupported ( org.ovirt.engine.core.bll.ImportVmCommandBase.getParameters ( ) . getVm ( ) . getOs ( ) , getGraphicsTypesForVm ( ) , org.ovirt.engine.core.bll.ImportVmCommandBase.getParameters ( ) . getVm ( ) . getDefaultDisplayType ( ) , org.ovirt.engine.core.bll.ImportVmCommandBase.getReturnValue ( ) . getCanDoActionMessages ( ) , getEffectiveCompatibilityVersion ( ) ) ; }

Target:
protected boolean validateGraphicsAndDisplay ( ) { return org.ovirt.engine.core.bll.VmHandler.isGraphicsAndDisplaySupported ( org.ovirt.engine.core.bll.ImportVmCommandBase.getParameters ( ) . getVm ( ) . getOs ( ) , getGraphicsTypesForVm ( ) , org.ovirt.engine.core.bll.ImportVmCommandBase.getParameters ( ) . getVm ( ) . getDefaultDisplayType ( ) , org.ovirt.engine.core.bll.ImportVmCommandBase.getReturnValue ( ) . getValidationMessages ( ) , getEffectiveCompatibilityVersion ( ) ) ; }
Source:
public java.lang.String getMessage ( ) { return java.lang.String.format ( "%1$s (Failed with error %2$s and code %3$s)" , super . getMessage ( ) , privateVdsError.getCode ( ) , privateVdsError.getCode ( ) . getValue ( ) ) ; }

Target:
public java.lang.String getMessage ( ) { return java.lang.String.format ( "%1$s (Failed with error %2$s and code %3$s)" , super . getMessage ( ) , ( useRootCause ? super . getCause ( ) . getMessage ( ) : privateVdsError.getCode ( ) ) , privateVdsError.getCode ( ) . getValue ( ) ) ; }
Source:
private static void logField ( org.ovirt.engine.core.common.businessentities.VmStatic vmStaticFromOvf , java.lang.String fieldName , java.lang.String fieldValue ) { java.lang.String vmName = vmStaticFromOvf.getVmName ( ) ; org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase logable = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; logable.AddCustomValue ( "FieldName" , fieldName ) ; logable.AddCustomValue ( "VmName" , vmName ) ; logable.AddCustomValue ( "FieldValue" , fieldValue ) ; org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.log ( logable , AuditLogType.VM_IMPORT_INFO ) ; }

Target:
private static void logField ( org.ovirt.engine.core.common.businessentities.VmStatic vmStaticFromOvf , java.lang.String fieldName , java.lang.String fieldValue ) { java.lang.String vmName = vmStaticFromOvf.getName ( ) ; org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase logable = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; logable.addCustomValue ( "FieldName" , fieldName ) ; logable.addCustomValue ( "VmName" , vmName ) ; logable.addCustomValue ( "FieldValue" , fieldValue ) ; org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.log ( logable , AuditLogType.VM_IMPORT_INFO ) ; }
Source:
protected void refreshModel ( ) { if ( ( getEntity ( ) ) == null ) { return ; } org.ovirt.engine.core.common.businessentities.VM vm = ( ( org.ovirt.engine.core.common.businessentities.VM ) ( getEntity ( ) ) ) ; super . syncSearch ( VdcQueryType.GetAllAuditLogsByVMName , new org.ovirt.engine.core.common.queries.NameQueryParameters ( vm.getName ( ) ) ) ; }

Target:
protected void refreshModel ( ) { if ( ( getEntity ( ) ) == null ) { return ; } org.ovirt.engine.core.common.businessentities.VM vm = ( ( org.ovirt.engine.core.common.businessentities.VM ) ( getEntity ( ) ) ) ; super . syncSearch ( VdcQueryType.GetAllAuditLogsByVMId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vm.getId ( ) ) ) ; }
Source:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { if ( ( ( java.lang.Boolean ) ( model.getSpecificStorageQuota ( ) . getEntity ( ) ) ) ) { quotaStorageTable.insertColumn ( 0 , isStorageInQuotaColumn ) ; quotaStorageTable.setColumnWidth ( isStorageInQuotaColumn , "30px" ) ; quotaStorageTable.edit ( model.getAllDataCenterStorages ( ) ) ; } else { quotaStorageTable.removeColumn ( isStorageInQuotaColumn ) ; quotaStorageTable.edit ( model.getQuotaStorages ( ) ) ; } }

Target:
public org.ovirt.engine.ui.uicommonweb.models.quota.QuotaModel flush ( ) { quotaClusterTable.flush ( ) ; quotaStorageTable.flush ( ) ; return driver.flush ( ) ; }
Source:
protected void verifyModel ( org.ovirt.engine.api.model.Permission model , int index ) { super . verifyModel ( model , index ) ; org.junit.Assert.assertTrue ( model.isSetGroup ( ) ) ; org.junit.Assert.assertEquals ( GUIDS [ 1 ] . toString ( ) , model.getGroup ( ) . getId ( ) ) ; }

Target:
protected void verifyModel ( org.ovirt.engine.api.model.Permission model , int index ) { super . verifyModel ( model , index ) ; org.junit.jupiter.api.Assertions.assertTrue ( model.isSetGroup ( ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( GUIDS [ 1 ] . toString ( ) , model.getGroup ( ) . getId ( ) ) ; }
Source:
public static java.net.URI buildSsoUrlKerberos ( java.lang.String url ) { try { org.apache.http.client.utils.URIBuilder uriBuilder = new org.apache.http.client.utils.URIBuilder ( java.lang.String.format ( "%1$s/sso/oauth/%2$s" , url.substring ( 0 , url.lastIndexOf ( "/" ) ) , org.ovirt.engine.sdk4.internal.SsoUtils.ENTRY_POINT_HTTP ) ) ; uriBuilder.addParameter ( "grant_type" , org.ovirt.engine.sdk4.internal.SsoUtils.GRANT_TYPE_HTTP ) ; uriBuilder.addParameter ( "scope" , org.ovirt.engine.sdk4.internal.SsoUtils.SCOPE ) ; return uriBuilder.build ( ) ; } catch ( java.net.URISyntaxException ex ) { throw new java.lang.RuntimeException ( ex ) ; } }

Target:
public static java.net.URI buildSsoUrlKerberos ( java.lang.String url ) { try { org.apache.http.client.utils.URIBuilder uriBuilder = new org.apache.http.client.utils.URIBuilder ( java.lang.String.format ( "%1$s/sso/oauth/%2$s" , url.substring ( 0 , url.lastIndexOf ( "/" ) ) , org.ovirt.engine.sdk4.internal.SsoUtils.ENTRY_POINT_HTTP ) ) ; uriBuilder.addParameter ( "grant_type" , org.ovirt.engine.sdk4.internal.SsoUtils.GRANT_TYPE_HTTP ) ; uriBuilder.addParameter ( "scope" , org.ovirt.engine.sdk4.internal.SsoUtils.SCOPE ) ; return uriBuilder.build ( ) ; } catch ( java.net.URISyntaxException ex ) { throw new java.lang.Error ( "Failed to build SSO authentication URL" , ex ) ; } }
Source:
public void testGetNotFound ( ) { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpEntityQueryExpectations ( QueryType.GetClustersByStoragePoolId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendDataCenterClusterResourceTest.dataCenterId } , new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Cluster > ( ) , null ) ; try { resource.get ( ) ; org.junit.Assert.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }

Target:
public void testGetNotFound ( ) { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpEntityQueryExpectations ( QueryType.GetClustersByStoragePoolId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendDataCenterClusterResourceTest.dataCenterId } , new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Cluster > ( ) , null ) ; try { resource.get ( ) ; org.junit.jupiter.api.Assertions.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }
Source:
public static void IsBackendAvailable ( 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 ; } } ; org.ovirt.engine.core.common.queries.GetDomainListParameters tempVar = new org.ovirt.engine.core.common.queries.GetDomainListParameters ( ) ; tempVar.setFilterInternalDomain ( true ) ; org.ovirt.engine.ui.frontend.Frontend.RunPublicQuery ( VdcQueryType.GetDomainList , tempVar , aQuery ) ; }

Target:
public static void GetDomainListViaPublic ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , boolean filterInternalDomain ) { 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 < java.lang.String > ( ( ( java.util.ArrayList < java.lang.String > ) ( source ) ) ) : new java.util.ArrayList < java.lang.String > ( ) ; } } ; org.ovirt.engine.core.common.queries.GetDomainListParameters tempVar = new org.ovirt.engine.core.common.queries.GetDomainListParameters ( ) ; tempVar.setFilterInternalDomain ( filterInternalDomain ) ; org.ovirt.engine.ui.frontend.Frontend.RunPublicQuery ( VdcQueryType.GetDomainList , tempVar , aQuery ) ; }