auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private void doInit ( org.ovirt.engine.api.extensions.ExtMap input , org.ovirt.engine.api.extensions.ExtMap output ) { this . ds = new org.ovirt.engine.extension.aaa.jdbc.core.datasource.DataSourceProvider ( configuration ) . provide ( ) ; this . authorization = new org.ovirt.engine.extension.aaa.jdbc.core.Authorization ( ds ) ; this . tasks = new org.ovirt.engine.extension.aaa.jdbc.core.Tasks ( ds , this . authorization ) ; output.put ( Base.InvokeKeys.RESULT , Base.InvokeResult.SUCCESS ) ; }

Target:
private void doInit ( org.ovirt.engine.api.extensions.ExtMap input , org.ovirt.engine.api.extensions.ExtMap output ) throws java.io.IOException , java.sql.SQLException { this . ds = new org.ovirt.engine.extension.aaa.jdbc.core.datasource.DataSourceProvider ( configuration ) . provide ( ) ; this . authorization = new org.ovirt.engine.extension.aaa.jdbc.core.Authorization ( ds ) ; this . tasks = new org.ovirt.engine.extension.aaa.jdbc.core.Tasks ( ds , this . authorization ) ; org.ovirt.engine.extension.aaa.jdbc.binding.api.ExtensionUtils.checkDbVersion ( ds.getConnection ( ) , input.< org.ovirt.engine.api.extensions.ExtMap > get ( Base.InvokeKeys.CONTEXT ) . < java.lang.String > get ( Base.ContextKeys.CONFIGURATION_FILE ) ) ; }
Source:
public void getStorageDomainList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageDomainsByStoragePoolId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) , aQuery ) ; }

Target:
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.storage.DiskImage > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmTemplatesDisks , new org.ovirt.engine.core.common.queries.IdQueryParameters ( templateId ) , aQuery ) ; }
Source:
public javax.ws.rs.core.Response add ( org.ovirt.engine.api.model.OpenStackVolumeProvider provider ) { validateParameters ( provider , "name" ) ; if ( provider.isSetDataCenter ( ) ) { org.ovirt.engine.core.common.businessentities.StoragePool storagePool = getStoragePool ( provider.getDataCenter ( ) ) ; provider.setDataCenter ( org.ovirt.engine.api.restapi.types.DataCenterMapper.map ( storagePool , null ) ) ; } return performCreate ( VdcActionType.AddProvider , new org.ovirt.engine.core.common.action.ProviderParameters ( map ( provider ) ) , new org.ovirt.engine.api.restapi.resource.openstack.QueryIdResolver < org.ovirt.engine.core.compat.Guid > ( org.ovirt.engine.core.common.queries.VdcQueryType.GetProviderById , org.ovirt.engine.core.common.queries.IdQueryParameters.class ) ) ; }

Target:
public javax.ws.rs.core.Response add ( org.ovirt.engine.api.model.OpenStackVolumeProvider provider ) { validateParameters ( provider , "name" ) ; if ( provider.isSetDataCenter ( ) ) { org.ovirt.engine.core.common.businessentities.StoragePool storagePool = getStoragePool ( provider.getDataCenter ( ) ) ; provider.setDataCenter ( org.ovirt.engine.api.restapi.types.DataCenterMapper.map ( storagePool , null ) ) ; } return performCreate ( ActionType.AddProvider , new org.ovirt.engine.core.common.action.ProviderParameters ( map ( provider ) ) , new org.ovirt.engine.api.restapi.resource.openstack.QueryIdResolver < org.ovirt.engine.core.compat.Guid > ( org.ovirt.engine.core.common.queries.VdcQueryType.GetProviderById , org.ovirt.engine.core.common.queries.IdQueryParameters.class ) ) ; }
Source:
private void persistBlockJobPlaceholder ( org.ovirt.engine.core.compat.Guid jobId ) { org.ovirt.engine.core.common.businessentities.VmBlockJob blockJob = new org.ovirt.engine.core.common.businessentities.VmBlockJob ( ) ; blockJob.setVmId ( org.ovirt.engine.core.bll.MergeCommand.getParameters ( ) . getVmId ( ) ) ; blockJob.setId ( jobId ) ; blockJob.setJobType ( VmJobType.BLOCK ) ; blockJob.setJobState ( VmJobState.UNKNOWN ) ; blockJob.setImageGroupId ( org.ovirt.engine.core.bll.MergeCommand.getParameters ( ) . getImageGroupId ( ) ) ; org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmJobDao ( ) . save ( blockJob ) ; org.ovirt.engine.core.bll.MergeCommand.log.info ( "Stored placeholder for job id '{}'" , blockJob.getId ( ) ) ; }

Target:
private void persistBlockJobPlaceholder ( org.ovirt.engine.core.compat.Guid jobId ) { org.ovirt.engine.core.common.businessentities.VmBlockJob blockJob = new org.ovirt.engine.core.common.businessentities.VmBlockJob ( ) ; blockJob.setVmId ( org.ovirt.engine.core.bll.MergeCommand.getParameters ( ) . getVmId ( ) ) ; blockJob.setId ( jobId ) ; blockJob.setJobType ( VmJobType.BLOCK ) ; blockJob.setJobState ( VmJobState.UNKNOWN ) ; blockJob.setImageGroupId ( org.ovirt.engine.core.bll.MergeCommand.getParameters ( ) . getImageGroupId ( ) ) ; vmJobsMonitoring.addJob ( blockJob ) ; }
Source:
public void edit ( org.ovirt.engine.ui.uicommonweb.models.providers.ProviderModel model ) { setAgentTabVisibility ( model.getNeutronAgentModel ( ) . getIsAvailable ( ) ) ; driver.edit ( model ) ; neutronAgentWidget.edit ( model.getNeutronAgentModel ( ) ) ; }

Target:
public void edit ( org.ovirt.engine.ui.uicommonweb.models.providers.ProviderModel model ) { setAgentTabVisibility ( ( ( java.lang.Boolean ) ( model.getNeutronAgentModel ( ) . isPluginConfigurationAvailable ( ) . getEntity ( ) ) ) ) ; driver.edit ( model ) ; neutronAgentWidget.edit ( model.getNeutronAgentModel ( ) ) ; }
Source:
public org.ovirt.engine.api.model.Cdrom get ( ) { org.ovirt.engine.core.common.businessentities.VM vm = getVm ( ) ; boolean current = org.ovirt.engine.api.common.util.ParametersHelper.getBooleanParameter ( httpHeaders , uriInfo , org.ovirt.engine.api.restapi.resource.BackendVmCdromResource.CURRENT , true , false ) ; if ( current ) { vm.setIsoPath ( vm.getCurrentCd ( ) ) ; } return addLinks ( populate ( map ( vm ) , vm ) ) ; }

Target:
public org.ovirt.engine.api.model.Cdrom get ( ) { org.ovirt.engine.core.common.businessentities.VM vm = getVm ( ) ; boolean current = org.ovirt.engine.api.restapi.util.ParametersHelper.getBooleanParameter ( httpHeaders , uriInfo , org.ovirt.engine.api.restapi.resource.BackendVmCdromResource.CURRENT , true , false ) ; if ( current ) { vm.setIsoPath ( vm.getCurrentCd ( ) ) ; } return addLinks ( populate ( map ( vm ) , vm ) ) ; }
Source:
public static final org.ovirt.engine.ui.common.widget.table.column.AbstractTextColumnWithTooltip < org.ovirt.engine.core.common.businessentities.Disk > getDescriptionColumn ( java.lang.String sortBy ) { org.ovirt.engine.ui.common.widget.table.column.AbstractTextColumnWithTooltip < org.ovirt.engine.core.common.businessentities.Disk > column = new org.ovirt.engine.ui.common.widget.table.column.AbstractTextColumnWithTooltip < org.ovirt.engine.core.common.businessentities.Disk > ( ) { @ java.lang.Override public java.lang.String getValue ( org.ovirt.engine.core.common.businessentities.Disk object ) { return object.getDiskDescription ( ) ; } } ; return org.ovirt.engine.ui.common.widget.uicommon.disks.DisksViewColumns.makeSortable ( column , sortBy ) ; }

Target:
public static final org.ovirt.engine.ui.common.widget.table.column.AbstractTextColumn < org.ovirt.engine.core.common.businessentities.Disk > getDescriptionColumn ( java.lang.String sortBy ) { org.ovirt.engine.ui.common.widget.table.column.AbstractTextColumn < org.ovirt.engine.core.common.businessentities.Disk > column = new org.ovirt.engine.ui.common.widget.table.column.AbstractTextColumn < org.ovirt.engine.core.common.businessentities.Disk > ( ) { @ java.lang.Override public java.lang.String getValue ( org.ovirt.engine.core.common.businessentities.Disk object ) { return object.getDiskDescription ( ) ; } } ; return org.ovirt.engine.ui.common.widget.uicommon.disks.DisksViewColumns.makeSortable ( column , sortBy ) ; }
Source:
private boolean volumeInfoChanged ( org.ovirt.engine.core.common.businessentities.DiskImage diskImageFromClient , org.ovirt.engine.core.common.businessentities.DiskImage srcDiskImage ) { return ( ( diskImageFromClient.getVolumeFormat ( ) ) != ( srcDiskImage.getVolumeFormat ( ) ) ) || ( ( diskImageFromClient.getVolumeType ( ) ) != ( srcDiskImage.getVolumeType ( ) ) ) ; }

Target:
private boolean volumeInfoChanged ( org.ovirt.engine.core.common.businessentities.storage.DiskImage diskImageFromClient , org.ovirt.engine.core.common.businessentities.storage.DiskImage srcDiskImage ) { return ( ( diskImageFromClient.getVolumeFormat ( ) ) != ( srcDiskImage.getVolumeFormat ( ) ) ) || ( ( diskImageFromClient.getVolumeType ( ) ) != ( srcDiskImage.getVolumeType ( ) ) ) ; }
Source:
protected void setActionMessageParameters ( ) { addCanDoActionMessage ( VdcBllMessages.VAR__ACTION__REMOVE ) ; addCanDoActionMessage ( VdcBllMessages.VAR__TYPE__LABEL ) ; }

Target:
protected boolean canDoAction ( ) { if ( ( getNic ( ) ) == null ) { return failCanDoAction ( EngineMessage.HOST_NETWORK_INTERFACE_NOT_EXIST ) ; } if ( ( ! ( org.ovirt.engine.core.utils.NetworkUtils.isLabeled ( getNic ( ) ) ) ) || ( ! ( getNic ( ) . getLabels ( ) . contains ( getLabel ( ) ) ) ) ) { return failCanDoAction ( EngineMessage.INTERFACE_NOT_LABELED ) ; } return true ; }
Source:
public void onSuccess ( java.lang.Object model1 , java.lang.Object result1 ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.Network > clusterNetworks = ( ( java.util.List < org.ovirt.engine.core.common.businessentities.network.Network > ) ( result1 ) ) ; managementNetworkName = org.ovirt.engine.ui.uicommonweb.Linq.findManagementNetwork ( clusterNetworks ) . getName ( ) ; profilesQuery.setModel ( clusterNetworks ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getVnicProfilesByDcId ( profilesQuery , dcId ) ; }

Target:
public void onSuccess ( java.lang.Object model1 , java.lang.Object result1 ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.Network > clusterNetworks = ( ( java.util.List < org.ovirt.engine.core.common.businessentities.network.Network > ) ( result1 ) ) ; org.ovirt.engine.core.common.businessentities.network.Network managementNetwork = org.ovirt.engine.ui.uicommonweb.Linq.findManagementNetwork ( clusterNetworks ) ; managementNetworkName = ( managementNetwork != null ) ? managementNetwork.getName ( ) : null ; profilesQuery.setModel ( clusterNetworks ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getVnicProfilesByDcId ( profilesQuery , dcId ) ; }
Source:
public void getCPUList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Version 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.util.ArrayList < org.ovirt.engine.core.common.businessentities.ServerCpu > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ServerCpu > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllServerCpuList , new org.ovirt.engine.core.common.queries.GetAllServerCpuListParameters ( version ) , aQuery ) ; }

Target:
public void getClusterDesktopMemoryOverCommit ( 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 ; } } ; getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.MaxVdsMemOverCommit , getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
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 ) ; }

Target:
public static void getStorageConnectionsByDataCenterIdAndStorageType ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.common.businessentities.StorageType storageType ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.core.common.queries.GetConnectionsByDataCenterAndStorageTypeParameters params = new org.ovirt.engine.core.common.queries.GetConnectionsByDataCenterAndStorageTypeParameters ( storagePoolId , storageType ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetConnectionsByDataCenterAndStorageType , params , aQuery ) ; }
Source:
private static java.lang.String getPath ( java.lang.Class < ? > clz ) { javax.ws.rs.Path pathAnnotation = clz.getAnnotation ( javax.ws.rs.Path.class ) ; java.lang.String path = pathAnnotation.value ( ) ; if ( path.startsWith ( "/" ) ) { path = path.substring ( 1 ) ; } return path ; }

Target:
private static java.lang.String getPath ( java.lang.Class < ? > clz ) { for ( java.lang.reflect.Method method : org.ovirt.engine.api.resource.ApiResource.class . getMethods ( ) ) { if ( ( method.getReturnType ( ) ) == clz ) { javax.ws.rs.Path annotation = method.getAnnotation ( javax.ws.rs.Path.class ) ; if ( annotation != null ) { return annotation.value ( ) ; } } } org.ovirt.engine.api.utils.LinkHelper.log.error ( ( ( "Can\'t find relative path for class \"" + ( clz.getName ( ) ) ) + "\", will return null" ) ) ; return null ; }
Source:
public void Executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { org.ovirt.engine.core.common.action.VdcReturnValueBase returnValueBase = result.getReturnValue ( ) ; if ( ( returnValueBase != null ) && ( returnValueBase.getSucceeded ( ) ) ) { if ( ( windowModel ) != null ) { windowModel.StopProgress ( ) ; listModel.setWindow ( null ) ; listModel.setConfirmWindow ( null ) ; listModel.Search ( ) ; } } }

Target:
public void Executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { org.ovirt.engine.core.common.action.VdcReturnValueBase returnValueBase = result.getReturnValue ( ) ; if ( ( returnValueBase != null ) && ( returnValueBase.getSucceeded ( ) ) ) { if ( ( windowModel ) != null ) { windowModel.StopProgress ( ) ; listModel.setWindow ( null ) ; listModel.setConfirmWindow ( null ) ; listModel.search ( ) ; } } }
Source:
private java.lang.String getTemplateIsBeingExportedMessage ( ) { if ( ( cachedTemplateIsBeingExportedMessage ) == null ) { java.lang.StringBuilder builder = new java.lang.StringBuilder ( VdcBllMessages.ACTION_TYPE_FAILED_TEMPLATE_IS_BEING_EXPORTED.name ( ) ) ; if ( ( org.ovirt.engine.core.bll.ExportVmTemplateCommand.getVmTemplate ( ) ) != null ) { builder.append ( java.lang.String.format ( "$TemplateName %1$s" , org.ovirt.engine.core.bll.ExportVmTemplateCommand.getVmTemplate ( ) . getName ( ) ) ) ; } cachedTemplateIsBeingExportedMessage = builder.toString ( ) ; } return cachedTemplateIsBeingExportedMessage ; }

Target:
private java.lang.String getTemplateIsBeingExportedMessage ( ) { if ( ( cachedTemplateIsBeingExportedMessage ) == null ) { java.lang.StringBuilder builder = new java.lang.StringBuilder ( EngineMessage.ACTION_TYPE_FAILED_TEMPLATE_IS_BEING_EXPORTED.name ( ) ) ; if ( ( org.ovirt.engine.core.bll.ExportVmTemplateCommand.getVmTemplate ( ) ) != null ) { builder.append ( java.lang.String.format ( "$TemplateName %1$s" , org.ovirt.engine.core.bll.ExportVmTemplateCommand.getVmTemplate ( ) . getName ( ) ) ) ; } cachedTemplateIsBeingExportedMessage = builder.toString ( ) ; } return cachedTemplateIsBeingExportedMessage ; }
Source:
public void getFreeVfNoFreeVf ( ) { freeVfCommon ( 0 , 1 , 2 , 3 , 4 ) ; org.junit.Assert.assertNull ( networkDeviceHelper.getFreeVf ( nic , null ) ) ; }

Target:
public void getFreeVfOneFreeVf ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.HostDevice > freeVfs = freeVfCommon ( 1 , 4 , 3 , 2 , 1 , 1 ) ; org.junit.Assert.assertEquals ( 1 , freeVfs.size ( ) ) ; org.junit.Assert.assertTrue ( freeVfs.contains ( networkDeviceHelper.getFreeVf ( nic , null ) ) ) ; }
Source:
public void getVmConfigurationBySnapshot ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid snapshotSourceId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( org.ovirt.engine.core.common.businessentities.VM ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmConfigurationBySnapshot , new org.ovirt.engine.core.common.queries.IdQueryParameters ( snapshotSourceId ) . withoutRefresh ( ) , aQuery ) ; }

Target:
public 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 ) ; }
Source:
public void bondWithNoNetowrkAttached ( ) { org.ovirt.engine.core.common.businessentities.VdsNetworkInterface bond = createBond ( null ) ; java.util.List < org.ovirt.engine.core.common.businessentities.VdsNetworkInterface > ifacesToBond = createBondSlaves ( null ) ; org.ovirt.engine.core.common.action.SetupNetworksParameters parameters = createParametersForBond ( bond , ifacesToBond ) ; org.ovirt.engine.core.bll.SetupNetworksHelper helper = createHelper ( parameters ) ; mockExistingIfacesWithBond ( bond , ifacesToBond ) ; validateAndExpectNoViolations ( helper ) ; assertBondModified ( helper , bond ) ; assertNoNetworksModified ( helper ) ; assertNoBondsRemoved ( helper ) ; assertNoNetworksRemoved ( helper ) ; }

Target:
public void bondWithNoNetowrkAttached ( ) { org.ovirt.engine.core.common.businessentities.VdsNetworkInterface bond = createBond ( org.ovirt.engine.core.bll.SetupNetworksHelperTest.BOND_NAME , null ) ; java.util.List < org.ovirt.engine.core.common.businessentities.VdsNetworkInterface > ifacesToBond = createNics ( null ) ; org.ovirt.engine.core.common.action.SetupNetworksParameters parameters = createParametersForBond ( bond , ifacesToBond ) ; org.ovirt.engine.core.bll.SetupNetworksHelper helper = createHelper ( parameters ) ; mockExistingIfacesWithBond ( bond , ifacesToBond ) ; validateAndExpectNoViolations ( helper ) ; assertBondModified ( helper , bond ) ; assertNoNetworksModified ( helper ) ; assertNoBondsRemoved ( helper ) ; assertNoNetworksRemoved ( helper ) ; }
Source:
public org.ovirt.engine.ui.uicommonweb.models.userportal.IUserPortalListModel flush ( ) { ctrlAltDel.asEditor ( ) . getSubEditor ( ) . getValue ( ) ; enableUsbAutoshare.asEditor ( ) . getSubEditor ( ) . getValue ( ) ; openInFullScreen.asEditor ( ) . getSubEditor ( ) . getValue ( ) ; useLocalDrives.asEditor ( ) . getSubEditor ( ) . getValue ( ) ; return model ; }

Target:
public void setVmName ( java.lang.String vmName ) { consoleTitle.setText ( messages.selectConsoleFor ( vmName ) ) ; }
Source:
public static 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 static void getVmById ( 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 ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) , aQuery ) ; }
Source:
protected void fillMenuBar ( org.ovirt.engine.ui.common.widget.MenuBar menuBar ) { if ( used ) { menuBar.addItem ( "Remove Filter" , new com.google.gwt.user.client.Command ( ) { @ java.lang.Override public void execute ( ) { model.removeFilter ( policyUnit ) ; org.ovirt.engine.ui.webadmin.section.main.view.popup.scheduling.panels.PolicyUnitPanel.menuPopup.hide ( ) ; } } ) ; } else { menuBar.addItem ( "Add Filter" , new com.google.gwt.user.client.Command ( ) { @ java.lang.Override public void execute ( ) { model.addFilter ( policyUnit , used , 0 ) ; org.ovirt.engine.ui.webadmin.section.main.view.popup.scheduling.panels.PolicyUnitPanel.menuPopup.hide ( ) ; } } ) ; } }

Target:
protected void fillMenuBar ( org.ovirt.engine.ui.common.widget.MenuBar menuBar ) { if ( used ) { menuBar.addItem ( org.ovirt.engine.ui.webadmin.section.main.view.popup.scheduling.panels.PolicyUnitPanel.constants.removeFilter ( ) , new com.google.gwt.user.client.Command ( ) { @ java.lang.Override public void execute ( ) { model.removeFilter ( policyUnit ) ; org.ovirt.engine.ui.webadmin.section.main.view.popup.scheduling.panels.PolicyUnitPanel.menuPopup.hide ( ) ; } } ) ; } else { menuBar.addItem ( org.ovirt.engine.ui.webadmin.section.main.view.popup.scheduling.panels.PolicyUnitPanel.constants.addFilter ( ) , new com.google.gwt.user.client.Command ( ) { @ java.lang.Override public void execute ( ) { model.addFilter ( policyUnit , used , 0 ) ; org.ovirt.engine.ui.webadmin.section.main.view.popup.scheduling.panels.PolicyUnitPanel.menuPopup.hide ( ) ; } } ) ; } }
Source:
public static void getAllTemplatesFromExportDomain ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.compat.Guid storageDomainId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? source : new java.util.HashMap < org.ovirt.engine.core.common.businessentities.VmTemplate , java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > > ( ) ; } } ; org.ovirt.engine.core.common.queries.GetAllFromExportDomainQueryParameters getAllFromExportDomainQueryParamenters = new org.ovirt.engine.core.common.queries.GetAllFromExportDomainQueryParameters ( storagePoolId , storageDomainId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetTemplatesFromExportDomain , getAllFromExportDomainQueryParamenters , aQuery ) ; }

Target:
public void getAllTemplatesFromExportDomain ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.compat.Guid storageDomainId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? source : new java.util.HashMap < org.ovirt.engine.core.common.businessentities.VmTemplate , java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.DiskImage > > ( ) ; } } ; org.ovirt.engine.core.common.queries.GetAllFromExportDomainQueryParameters getAllFromExportDomainQueryParamenters = new org.ovirt.engine.core.common.queries.GetAllFromExportDomainQueryParameters ( storagePoolId , storageDomainId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetTemplatesFromExportDomain , getAllFromExportDomainQueryParamenters , aQuery ) ; }
Source:
protected void endSuccessfully ( ) { if ( ! ( org.ovirt.engine.core.bll.storage.disk.cinder.RestoreAllCinderSnapshotsCommand.getParameters ( ) . isParentHasTasks ( ) ) ) { org.ovirt.engine.core.bll.storage.disk.cinder.RestoreAllCinderSnapshotsCommand.getBackend ( ) . endAction ( org.ovirt.engine.core.bll.storage.disk.cinder.RestoreAllCinderSnapshotsCommand.getParameters ( ) . getParentCommand ( ) , org.ovirt.engine.core.bll.storage.disk.cinder.RestoreAllCinderSnapshotsCommand.getParameters ( ) . getParentParameters ( ) , org.ovirt.engine.core.bll.storage.disk.cinder.RestoreAllCinderSnapshotsCommand.getContext ( ) . clone ( ) . withoutCompensationContext ( ) . withoutExecutionContext ( ) . withoutLock ( ) ) ; } }

Target:
protected void endSuccessfully ( ) { removeRedundantVolumesForOrphanedDisks ( ) ; if ( ! ( org.ovirt.engine.core.bll.storage.disk.cinder.RestoreAllCinderSnapshotsCommand.getParameters ( ) . isParentHasTasks ( ) ) ) { org.ovirt.engine.core.bll.storage.disk.cinder.RestoreAllCinderSnapshotsCommand.getBackend ( ) . endAction ( org.ovirt.engine.core.bll.storage.disk.cinder.RestoreAllCinderSnapshotsCommand.getParameters ( ) . getParentCommand ( ) , org.ovirt.engine.core.bll.storage.disk.cinder.RestoreAllCinderSnapshotsCommand.getParameters ( ) . getParentParameters ( ) , org.ovirt.engine.core.bll.storage.disk.cinder.RestoreAllCinderSnapshotsCommand.getContext ( ) . clone ( ) . withoutCompensationContext ( ) . withoutExecutionContext ( ) . withoutLock ( ) ) ; } }
Source:
protected java.lang.String getUrlBuilderCode ( java.util.List < org.ovirt.engine.sdk.entities.Parameter > parameters ) { java.lang.StringBuilder buffer = new java.lang.StringBuilder ( ) ; for ( org.ovirt.engine.sdk.entities.Parameter parameter : parameters ) { org.ovirt.engine.sdk.codegen.templates.UrlBuilderParameterTemplate template = new org.ovirt.engine.sdk.codegen.templates.UrlBuilderParameterTemplate ( ) ; buffer.append ( "\n" ) ; buffer.append ( template.getTemplate ( parameter.getName ( ) , org.ovirt.engine.sdk.codegen.utils.UrlUtils.toQueryParam ( parameter.getName ( ) ) , org.ovirt.engine.sdk.codegen.utils.UrlUtils.toParamType ( parameter.getContext ( ) ) ) ) ; } return buffer.toString ( ) ; }

Target:
protected java.lang.String getUrlBuilderCode ( java.util.List < org.ovirt.engine.sdk.entities.Parameter > parameters ) { java.lang.StringBuilder buffer = new java.lang.StringBuilder ( ) ; for ( org.ovirt.engine.sdk.entities.Parameter parameter : parameters ) { org.ovirt.engine.sdk.codegen.templates.UrlBuilderParameterTemplate template = new org.ovirt.engine.sdk.codegen.templates.UrlBuilderParameterTemplate ( ) ; buffer.append ( "\n" ) ; buffer.append ( template.evaluate ( parameter.getName ( ) , org.ovirt.engine.sdk.codegen.utils.UrlUtils.toQueryParam ( parameter.getName ( ) ) , org.ovirt.engine.sdk.codegen.utils.UrlUtils.toParamType ( parameter.getContext ( ) ) ) ) ; } return buffer.toString ( ) ; }
Source:
public org.ovirt.engine.core.bll.ValidationResult typeMatchesProfile ( ) { boolean profilePassthrough = ( ( getVnicProfile ( ) ) != null ) && ( getVnicProfile ( ) . isPassthrough ( ) ) ; boolean typePassthrough = ( org.ovirt.engine.core.common.businessentities.network.VmInterfaceType.pciPassthrough ) == ( org.ovirt.engine.core.common.businessentities.network.VmInterfaceType.forValue ( nic.getType ( ) ) ) ; return org.ovirt.engine.core.bll.ValidationResult.failWith ( VdcBllMessages.ACTION_TYPE_FAILED_VM_INTERFACE_TYPE_NOT_MATCH_PROFILE ) . when ( ( profilePassthrough ^ typePassthrough ) ) ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult typeMatchesProfile ( ) { boolean profilePassthrough = ( ( getVnicProfile ( ) ) != null ) && ( getVnicProfile ( ) . isPassthrough ( ) ) ; boolean typePassthrough = ( org.ovirt.engine.core.common.businessentities.network.VmInterfaceType.pciPassthrough ) == ( org.ovirt.engine.core.common.businessentities.network.VmInterfaceType.forValue ( nic.getType ( ) ) ) ; return org.ovirt.engine.core.bll.ValidationResult.failWith ( EngineMessage.ACTION_TYPE_FAILED_VM_INTERFACE_TYPE_NOT_MATCH_PROFILE ) . when ( ( profilePassthrough ^ typePassthrough ) ) ; }
Source:
void mockGetCaCertificate ( ) { org.ovirt.engine.core.common.queries.VdcQueryReturnValue caCertificateReturnValue = new org.ovirt.engine.core.common.queries.VdcQueryReturnValue ( ) ; caCertificateReturnValue.setSucceeded ( true ) ; caCertificateReturnValue.setReturnValue ( org.ovirt.engine.core.bll.ConfigureConsoleOptionsQueryTest.CA_CERTIFICATE ) ; org.mockito.Mockito.doReturn ( caCertificateReturnValue ) . when ( backend ) . runInternalQuery ( org.mockito.ArgumentMatchers.eq ( QueryType.GetCACertificate ) , org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.common.queries.QueryParametersBase.class ) ) ; }

Target:
void mockGetCaCertificate ( ) { org.ovirt.engine.core.common.queries.QueryReturnValue caCertificateReturnValue = new org.ovirt.engine.core.common.queries.QueryReturnValue ( ) ; caCertificateReturnValue.setSucceeded ( true ) ; caCertificateReturnValue.setReturnValue ( org.ovirt.engine.core.bll.ConfigureConsoleOptionsQueryTest.CA_CERTIFICATE ) ; org.mockito.Mockito.doReturn ( caCertificateReturnValue ) . when ( backend ) . runInternalQuery ( org.mockito.ArgumentMatchers.eq ( QueryType.GetCACertificate ) , org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.common.queries.QueryParametersBase.class ) ) ; }
Source:
public void OnSaveNetworkConfig ( ) { org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel ) ( getWindow ( ) ) ) ; if ( ( model.getProgress ( ) ) != null ) { return ; } model.StartProgress ( null ) ; setcurrentModel ( model ) ; new org.ovirt.engine.ui.uicommonweb.models.hosts.SaveNetworkConfigAction ( this , model , getEntity ( ) ) . execute ( ) ; }

Target:
public void onSaveNetworkConfig ( ) { org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel ) ( getWindow ( ) ) ) ; if ( ( model.getProgress ( ) ) != null ) { return ; } model.startProgress ( null ) ; setcurrentModel ( model ) ; new org.ovirt.engine.ui.uicommonweb.models.hosts.SaveNetworkConfigAction ( this , model , getEntity ( ) ) . execute ( ) ; }
Source:
public org.ovirt.engine.core.bll.ValidationResult validate ( org.ovirt.engine.core.common.businessentities.VDS vds , java.lang.StringBuilder sb ) { if ( ( ( getVm ( ) . getrun_on_vds ( ) ) != null ) && ( getVm ( ) . getrun_on_vds ( ) . equals ( vds.getId ( ) ) ) ) { sb.append ( "is the same host the VM is currently running on" ) ; return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.dal.VdcBllMessages.ACTION_TYPE_FAILED_MIGRATION_TO_SAME_HOST ) ; } return null ; }

Target:
public org.ovirt.engine.core.dal.VdcBllMessages validate ( org.ovirt.engine.core.common.businessentities.VDS vds , java.lang.StringBuilder sb ) { if ( ( ( getVm ( ) . getrun_on_vds ( ) ) != null ) && ( getVm ( ) . getrun_on_vds ( ) . equals ( vds.getId ( ) ) ) ) { sb.append ( "is the same host the VM is currently running on" ) ; return org.ovirt.engine.core.dal.VdcBllMessages.ACTION_TYPE_FAILED_MIGRATION_TO_SAME_HOST ; } return null ; }
Source:
public java.lang.String toString ( ) { return ( ( ( ( ( ( ( ( ( "FilterEntry{" + "eventName='" ) + ( eventName ) ) + '\'' ) + ", severity=" ) + ( ( severity ) != null ? severity.name ( ) : "any" ) ) + ", exclude=" ) + ( exclude ) ) + ", recipient=" ) + ( recipient ) ) + '}' ; }

Target:
public java.lang.String toString ( ) { return org.ovirt.engine.core.common.utils.ToStringBuilder.forInstance ( this ) . append ( "eventName" , eventName ) . append ( "severity" , ( ( severity ) != null ? severity.name ( ) : "any" ) ) . append ( "exclude" , exclude ) . append ( "recipient" , recipient ) . build ( ) ; }
Source:
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 ) ; }

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:
public static void getLunsByVgId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String vgId , org.ovirt.engine.core.compat.Guid vdsId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.LUNs > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.LUNs > ( ) ; } } ; org.ovirt.engine.core.common.queries.GetLunsByVgIdParameters params = new org.ovirt.engine.core.common.queries.GetLunsByVgIdParameters ( vgId , vdsId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetLunsByVgId , params , aQuery ) ; }

Target:
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 ) ; }
Source:
private java.util.Set < org.ovirt.engine.core.compat.Guid > getStorageDomainsByDisks ( java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > disks , boolean isFillStorageTodDiskMap ) { java.util.Set < org.ovirt.engine.core.compat.Guid > domainsList = new java.util.HashSet < org.ovirt.engine.core.compat.Guid > ( ) ; if ( disks != null ) { for ( org.ovirt.engine.core.common.businessentities.DiskImage disk : disks ) { domainsList.addAll ( disk.getStorageIds ( ) ) ; if ( isFillStorageTodDiskMap ) { for ( org.ovirt.engine.core.compat.Guid storageDomainId : disk.getStorageIds ( ) ) { org.ovirt.engine.core.utils.collections.MultiValueMapUtils.addToMap ( storageDomainId , disk , storageToDisksMap ) ; } } } } return domainsList ; }

Target:
private java.util.Set < org.ovirt.engine.core.compat.Guid > getStorageDomainsByDisks ( java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > disks , boolean isFillStorageTodDiskMap ) { java.util.Set < org.ovirt.engine.core.compat.Guid > domainsList = new java.util.HashSet < org.ovirt.engine.core.compat.Guid > ( ) ; if ( disks != null ) { for ( org.ovirt.engine.core.common.businessentities.storage.DiskImage disk : disks ) { domainsList.addAll ( disk.getStorageIds ( ) ) ; if ( isFillStorageTodDiskMap ) { for ( org.ovirt.engine.core.compat.Guid storageDomainId : disk.getStorageIds ( ) ) { org.ovirt.engine.core.utils.collections.MultiValueMapUtils.addToMap ( storageDomainId , disk , storageToDisksMap ) ; } } } } return domainsList ; }
Source:
public void start ( ) { java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > list = new java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > ( ) ; for ( java.lang.Object item : getSelectedItems ( ) ) { org.ovirt.engine.core.common.businessentities.VDS vds = ( ( org.ovirt.engine.core.common.businessentities.VDS ) ( item ) ) ; list.add ( new org.ovirt.engine.core.common.action.FenceVdsActionParameters ( vds.getId ( ) , org.ovirt.engine.core.common.businessentities.FenceActionType.Start ) ) ; } org.ovirt.engine.ui.frontend.Frontend.RunMultipleAction ( VdcActionType.StartVds , list , new org.ovirt.engine.ui.uicompat.IFrontendMultipleActionAsyncCallback ( ) { @ java.lang.Override public void executed ( org.ovirt.engine.ui.uicompat.FrontendMultipleActionAsyncResult result ) { } } , null ) ; }

Target:
public void start ( ) { java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > list = new java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > ( ) ; for ( java.lang.Object item : getSelectedItems ( ) ) { org.ovirt.engine.core.common.businessentities.VDS vds = ( ( org.ovirt.engine.core.common.businessentities.VDS ) ( item ) ) ; list.add ( new org.ovirt.engine.core.common.action.FenceVdsActionParameters ( vds.getId ( ) , org.ovirt.engine.core.common.businessentities.FenceActionType.Start ) ) ; } org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runMultipleAction ( VdcActionType.StartVds , list , new org.ovirt.engine.ui.uicompat.IFrontendMultipleActionAsyncCallback ( ) { @ java.lang.Override public void executed ( org.ovirt.engine.ui.uicompat.FrontendMultipleActionAsyncResult result ) { } } , null ) ; }
Source:
private void EditNetworkThreadCompat ( org.ovirt.engine.core.common.vdscommands.NetworkVdsmVDSCommandParameters parameters ) { try { retVal = org.ovirt.engine.core.bll.Backend.getInstance ( ) . getResourceManager ( ) . RunVdsCommand ( VDSCommandType.EditNetwork , parameters ) ; editNetworkDone = true ; } catch ( java.lang.RuntimeException e ) { if ( e instanceof org.ovirt.engine.core.common.errors.VdcBLLException ) { org.ovirt.engine.core.bll.network.host.UpdateNetworkToVdsInterfaceCommand.getReturnValue ( ) . setFault ( new org.ovirt.engine.core.common.errors.VdcFault ( e , ( ( org.ovirt.engine.core.common.errors.VdcBLLException ) ( e ) ) . getVdsError ( ) . getCode ( ) ) ) ; } } catch ( java.lang.Exception e ) { } finally { editNetworkThreadFinish = true ; } }

Target:
private void editNetworkThreadCompat ( org.ovirt.engine.core.common.vdscommands.NetworkVdsmVDSCommandParameters parameters ) { try { retVal = org.ovirt.engine.core.bll.Backend.getInstance ( ) . getResourceManager ( ) . RunVdsCommand ( VDSCommandType.EditNetwork , parameters ) ; editNetworkDone = true ; } catch ( java.lang.RuntimeException e ) { if ( e instanceof org.ovirt.engine.core.common.errors.VdcBLLException ) { org.ovirt.engine.core.bll.network.host.UpdateNetworkToVdsInterfaceCommand.getReturnValue ( ) . setFault ( new org.ovirt.engine.core.common.errors.VdcFault ( e , ( ( org.ovirt.engine.core.common.errors.VdcBLLException ) ( e ) ) . getVdsError ( ) . getCode ( ) ) ) ; } } catch ( java.lang.Exception e ) { } finally { editNetworkThreadFinish = true ; } }
Source:
protected void verify ( org.ovirt.engine.api.model.Cdrom model , org.ovirt.engine.api.model.Cdrom transform ) { assertNotNull ( transform ) ; assertNotNull ( transform.getFile ( ) ) ; assertEquals ( model.getFile ( ) . getId ( ) , transform.getFile ( ) . getId ( ) ) ; }

Target:
protected void verify ( org.ovirt.engine.api.model.Cdrom model , org.ovirt.engine.api.model.Cdrom transform ) { org.junit.Assert.assertNotNull ( transform ) ; org.junit.Assert.assertNotNull ( transform.getFile ( ) ) ; org.junit.Assert.assertEquals ( model.getFile ( ) . getId ( ) , transform.getFile ( ) . getId ( ) ) ; }
Source:
public void mapGuestAgentSsoFromRestToBackend ( ) { org.ovirt.engine.api.model.Sso restSso = new org.ovirt.engine.api.model.Sso ( ) ; restSso.setMethods ( new org.ovirt.engine.api.model.Methods ( ) ) ; org.ovirt.engine.api.model.Method guestAgent = new org.ovirt.engine.api.model.Method ( ) ; guestAgent.setId ( org.ovirt.engine.api.model.SsoMethod.GUEST_AGENT ) ; restSso.getMethods ( ) . getMethods ( ) . add ( guestAgent ) ; org.ovirt.engine.core.common.businessentities.SsoMethod expectedBackendSsoMethod = org.ovirt.engine.core.common.businessentities.SsoMethod.GUEST_AGENT ; org.junit.Assert.assertEquals ( expectedBackendSsoMethod , org.ovirt.engine.api.restapi.types.SsoMapper.map ( restSso , null ) ) ; }

Target:
public void mapGuestAgentSsoFromRestToBackend ( ) { org.ovirt.engine.api.model.Sso restSso = new org.ovirt.engine.api.model.Sso ( ) ; restSso.setMethods ( new org.ovirt.engine.api.model.Methods ( ) ) ; org.ovirt.engine.api.model.Method guestAgent = new org.ovirt.engine.api.model.Method ( ) ; guestAgent.setId ( org.ovirt.engine.api.model.SsoMethod.GUEST_AGENT ) ; restSso.getMethods ( ) . getMethods ( ) . add ( guestAgent ) ; org.ovirt.engine.core.common.businessentities.SsoMethod expectedBackendSsoMethod = org.ovirt.engine.core.common.businessentities.SsoMethod.GUEST_AGENT ; org.junit.jupiter.api.Assertions.assertEquals ( expectedBackendSsoMethod , org.ovirt.engine.api.restapi.types.SsoMapper.map ( restSso , null ) ) ; }
Source:
protected org.ovirt.engine.core.common.vdscommands.DeleteImageGroupVDSCommandParameters buildDeleteMemoryConfParams ( java.util.List < org.ovirt.engine.core.compat.Guid > guids ) { boolean discardAfterDelete = storageDomainDao.get ( guids.get ( 0 ) ) . isDiscardAfterDelete ( ) ; return postDeleteActionHandler.fixParameters ( new org.ovirt.engine.core.common.vdscommands.DeleteImageGroupVDSCommandParameters ( guids.get ( 1 ) , guids.get ( 0 ) , guids.get ( 4 ) , isPostZero ( ) , discardAfterDelete , false ) ) ; }

Target:
protected org.ovirt.engine.core.common.vdscommands.DeleteImageGroupVDSCommandParameters buildDeleteMemoryConfParams ( java.util.List < org.ovirt.engine.core.compat.Guid > guids ) { boolean discardAfterDelete = storageDomainDao.get ( guids.get ( 0 ) ) . getDiscardAfterDelete ( ) ; return postDeleteActionHandler.fixParameters ( new org.ovirt.engine.core.common.vdscommands.DeleteImageGroupVDSCommandParameters ( guids.get ( 1 ) , guids.get ( 0 ) , guids.get ( 4 ) , isPostZero ( ) , discardAfterDelete , false ) ) ; }
Source:
private void dataCenterWithClusterSelectedItemChanged ( java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { behavior.dataCenterWithClusterSelectedItemChanged ( ) ; org.ovirt.engine.ui.uicommonweb.models.vms.DataCenterWithCluster dataCenterWithCluster = getDataCenterWithClustersList ( ) . getSelectedItem ( ) ; if ( ( dataCenterWithCluster != null ) && ( ( dataCenterWithCluster.getDataCenter ( ) ) != null ) ) { getDisksAllocationModel ( ) . setQuotaEnforcementType ( dataCenterWithCluster.getDataCenter ( ) . getQuotaEnforcementType ( ) ) ; } updateMigrationOptions ( ) ; handleQxlClusterLevel ( ) ; updateWatchdogModels ( ) ; updateBootMenu ( ) ; getInstanceImages ( ) . updateActionsAvailability ( ) ; initGraphicsConsoles ( ) ; }

Target:
private void dataCenterWithClusterSelectedItemChanged ( java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { behavior.dataCenterWithClusterSelectedItemChanged ( ) ; org.ovirt.engine.ui.uicommonweb.models.vms.DataCenterWithCluster dataCenterWithCluster = getDataCenterWithClustersList ( ) . getSelectedItem ( ) ; if ( ( dataCenterWithCluster != null ) && ( ( dataCenterWithCluster.getDataCenter ( ) ) != null ) ) { getDisksAllocationModel ( ) . setQuotaEnforcementType ( dataCenterWithCluster.getDataCenter ( ) . getQuotaEnforcementType ( ) ) ; } updateMigrationOptions ( ) ; handleQxlClusterLevel ( ) ; updateWatchdogModels ( ) ; updateBootMenu ( ) ; getInstanceImages ( ) . updateActionsAvailability ( ) ; initGraphicsConsoles ( ) ; updateSoundCard ( ) ; }
Source:
public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.Disk > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.Disk > ( ) ; }

Target:
public void getAllAttachableDisks ( org.ovirt.engine.ui.frontend.AsyncQuery < java.util.List < org.ovirt.engine.core.common.businessentities.storage.Disk > > aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.compat.Guid vmId ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.ListConverter < > ( ) ; org.ovirt.engine.core.common.queries.GetAllAttachableDisksForVmQueryParameters params = new org.ovirt.engine.core.common.queries.GetAllAttachableDisksForVmQueryParameters ( storagePoolId ) ; params.setVmId ( vmId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllAttachableDisksForVm , params , aQuery ) ; }