auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object ReturnValue ) { java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > disks = ( ( java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > ) ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( ReturnValue ) ) . getReturnValue ( ) ) ) ; java.util.Collections.sort ( disks , new org.ovirt.engine.ui.uicommonweb.Linq.DiskByAliasComparer ( ) ) ; org.ovirt.engine.ui.uicommonweb.models.SearchableListModel searchableListModel = ( ( org.ovirt.engine.ui.uicommonweb.models.SearchableListModel ) ( model ) ) ; searchableListModel.setItems ( disks ) ; }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object ReturnValue ) { java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > disks = ( ( java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > ) ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( ReturnValue ) ) . getReturnValue ( ) ) ) ; java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > diskList = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > ( ) ; diskList.addAll ( disks ) ; java.util.Collections.sort ( diskList , new org.ovirt.engine.ui.uicommonweb.Linq.DiskByAliasComparer ( ) ) ; org.ovirt.engine.ui.uicommonweb.models.SearchableListModel searchableListModel = ( ( org.ovirt.engine.ui.uicommonweb.models.SearchableListModel ) ( model ) ) ; searchableListModel.setItems ( diskList ) ; }
Source:
protected void ProceedProxyReturnValue ( ) { org.ovirt.engine.core.common.errors.VdcBllErrors returnStatus = GetReturnValueFromStatus ( org.ovirt.engine.core.vdsbroker.vdsbroker.CancelMigrateVDSCommand.getReturnStatus ( ) ) ; switch ( returnStatus ) { case noVM : org.ovirt.engine.core.vdsbroker.vdsbroker.VDSExceptionBase outEx = org.ovirt.engine.core.vdsbroker.vdsbroker.CancelMigrateVDSCommand.createDefaultConcreteException ( "Cancel migration has failed. Please try again in a few moments and track the VM's event log for details" ) ; initializeVdsError ( returnStatus ) ; outEx.setVdsError ( new org.ovirt.engine.core.common.errors.VDSError ( org.ovirt.engine.core.common.errors.VdcBllErrors.MIGRATION_CANCEL_ERROR_NO_VM , org.ovirt.engine.core.vdsbroker.vdsbroker.CancelMigrateVDSCommand.getReturnStatus ( ) . mMessage ) ) ; throw outEx ; default : super . ProceedProxyReturnValue ( ) ; } }

Target:
protected void proceedProxyReturnValue ( ) { org.ovirt.engine.core.common.errors.VdcBllErrors returnStatus = GetReturnValueFromStatus ( org.ovirt.engine.core.vdsbroker.vdsbroker.CancelMigrateVDSCommand.getReturnStatus ( ) ) ; switch ( returnStatus ) { case noVM : org.ovirt.engine.core.vdsbroker.vdsbroker.VDSExceptionBase outEx = org.ovirt.engine.core.vdsbroker.vdsbroker.CancelMigrateVDSCommand.createDefaultConcreteException ( "Cancel migration has failed. Please try again in a few moments and track the VM's event log for details" ) ; initializeVdsError ( returnStatus ) ; outEx.setVdsError ( new org.ovirt.engine.core.common.errors.VDSError ( org.ovirt.engine.core.common.errors.VdcBllErrors.MIGRATION_CANCEL_ERROR_NO_VM , org.ovirt.engine.core.vdsbroker.vdsbroker.CancelMigrateVDSCommand.getReturnStatus ( ) . mMessage ) ) ; throw outEx ; default : super . proceedProxyReturnValue ( ) ; } }
Source:
public static void getExternalProviderComputeResourceList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.common.businessentities.Provider provider ) { 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.ExternalComputeResource > ( ) ; } return source ; } } ; org.ovirt.engine.core.common.queries.ProviderQueryParameters params = new org.ovirt.engine.core.common.queries.ProviderQueryParameters ( ) ; params.setProvider ( provider ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetComputeResourceFromExternalProvider , params , 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:
static void verifyModelSpecific ( org.ovirt.engine.api.model.Host model , int index ) { org.junit.Assert.assertEquals ( GUIDS [ index ] . toString ( ) , model.getId ( ) ) ; org.junit.Assert.assertEquals ( NAMES [ index ] , model.getName ( ) ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.api.restapi.resource.BackendHostsResourceTest.ADDRESSES [ index ] , model.getAddress ( ) ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.api.restapi.resource.BackendHostsResourceTest.HOST_STATUS [ index ] , model.getStatus ( ) ) ; }

Target:
static void verifyModelSpecific ( org.ovirt.engine.api.model.Host model , int index ) { org.junit.jupiter.api.Assertions.assertEquals ( GUIDS [ index ] . toString ( ) , model.getId ( ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( NAMES [ index ] , model.getName ( ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( org.ovirt.engine.api.restapi.resource.BackendHostsResourceTest.ADDRESSES [ index ] , model.getAddress ( ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( org.ovirt.engine.api.restapi.resource.BackendHostsResourceTest.HOST_STATUS [ index ] , model.getStatus ( ) ) ; }
Source:
protected void executeQueryCommand ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmTemplate > retval = org.ovirt.engine.core.bll.GetAllTemplateBasedEntityQuery.getDbFacade ( ) . getVmTemplateDao ( ) . getAll ( org.ovirt.engine.core.bll.GetAllTemplateBasedEntityQuery.getUserID ( ) , org.ovirt.engine.core.bll.GetAllTemplateBasedEntityQuery.getParameters ( ) . isFiltered ( ) , entityType ) ; for ( org.ovirt.engine.core.common.businessentities.VmTemplate template : retval ) { org.ovirt.engine.core.bll.VmTemplateHandler.updateDisksFromDb ( template ) ; } org.ovirt.engine.core.bll.GetAllTemplateBasedEntityQuery.getQueryReturnValue ( ) . setReturnValue ( retval ) ; }

Target:
protected void executeQueryCommand ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmTemplate > retval = vmTemplateDao.getAll ( org.ovirt.engine.core.bll.GetAllTemplateBasedEntityQuery.getUserID ( ) , org.ovirt.engine.core.bll.GetAllTemplateBasedEntityQuery.getParameters ( ) . isFiltered ( ) , entityType ) ; for ( org.ovirt.engine.core.common.businessentities.VmTemplate template : retval ) { org.ovirt.engine.core.bll.VmTemplateHandler.updateDisksFromDb ( template ) ; } org.ovirt.engine.core.bll.GetAllTemplateBasedEntityQuery.getQueryReturnValue ( ) . setReturnValue ( retval ) ; }
Source:
private static org.ovirt.engine.core.common.businessentities.Cluster createClusterWithNoCpuName ( ) { org.ovirt.engine.core.common.businessentities.Cluster group = new org.ovirt.engine.core.common.businessentities.Cluster ( ) ; group.setName ( "Default" ) ; group.setId ( org.ovirt.engine.core.bll.UpdateClusterCommandTest.DEFAULT_CLUSTER_ID ) ; group.setCompatibilityVersion ( org.ovirt.engine.core.bll.UpdateClusterCommandTest.VERSION_1_1 ) ; group.setStoragePoolId ( org.ovirt.engine.core.bll.UpdateClusterCommandTest.DC_ID1 ) ; group.setArchitecture ( ArchitectureType.undefined ) ; group.setClusterPolicyId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; return group ; }

Target:
private static org.ovirt.engine.core.common.businessentities.Cluster createClusterWithNoCpuName ( ) { org.ovirt.engine.core.common.businessentities.Cluster group = new org.ovirt.engine.core.common.businessentities.Cluster ( ) ; group.setName ( "Default" ) ; group.setId ( org.ovirt.engine.core.bll.UpdateClusterCommandTest.DEFAULT_CLUSTER_ID ) ; group.setCompatibilityVersion ( org.ovirt.engine.core.bll.UpdateClusterCommandTest.VERSION_1_1 ) ; group.setStoragePoolId ( org.ovirt.engine.core.bll.UpdateClusterCommandTest.DC_ID1 ) ; group.setArchitecture ( ArchitectureType.undefined ) ; group.setClusterPolicyId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; group.setMaxVdsMemoryOverCommit ( 100 ) ; return group ; }
Source:
public void init ( final org.ovirt.engine.ui.uicommonweb.models.ConsolePopupModel model ) { if ( model.getModel ( ) . isPool ( ) ) { throw new java.lang.IllegalArgumentException ( "The console popup can not be used with pool, only with VM" ) ; } this . model = model ; initModel ( model ) ; initView ( model ) ; initListeners ( model ) ; java.lang.String vmName = model.getModel ( ) . getVM ( ) . getName ( ) ; getView ( ) . setVmName ( vmName ) ; super . init ( model ) ; }

Target:
public void init ( final org.ovirt.engine.ui.uicommonweb.models.ConsolePopupModel model ) { if ( ( model.getVmConsoles ( ) . getVm ( ) ) == null ) { throw new java.lang.IllegalArgumentException ( "The console popup can not be used with pool, only with VM" ) ; } this . model = model ; initModel ( model ) ; initView ( model ) ; initListeners ( model ) ; java.lang.String vmName = model.getVmConsoles ( ) . getVm ( ) . getName ( ) ; getView ( ) . setVmName ( vmName ) ; super . init ( model ) ; }
Source:
public org.ovirt.engine.ui.common.uicommon.model.SearchableDetailModelProvider < org.ovirt.engine.core.common.businessentities.Quota , org.ovirt.engine.ui.uicommonweb.models.datacenters.DataCenterListModel , org.ovirt.engine.ui.uicommonweb.models.datacenters.DataCenterQuotaListModel > getDataCenterQuotaListProvider ( org.ovirt.engine.ui.webadmin.gin.ClientGinjector ginjector ) { return new org.ovirt.engine.ui.common.uicommon.model.SearchableDetailTabModelProvider < org.ovirt.engine.core.common.businessentities.Quota , org.ovirt.engine.ui.uicommonweb.models.datacenters.DataCenterListModel , org.ovirt.engine.ui.uicommonweb.models.datacenters.DataCenterQuotaListModel > ( ginjector , org.ovirt.engine.ui.uicommonweb.models.datacenters.DataCenterListModel.class , org.ovirt.engine.ui.uicommonweb.models.datacenters.DataCenterQuotaListModel.class ) ; }

Target:
public org.ovirt.engine.ui.common.presenter.AbstractModelBoundPopupPresenterWidget < ? extends org.ovirt.engine.ui.uicommonweb.models.Model , ? > getModelPopup ( org.ovirt.engine.ui.uicommonweb.models.datacenters.DataCenterQuotaListModel source , org.ovirt.engine.ui.uicommonweb.UICommand lastExecutedCommand , org.ovirt.engine.ui.uicommonweb.models.Model windowModel ) { if ( ( ( lastExecutedCommand.equals ( getModel ( ) . getCreateQuotaCommand ( ) ) ) || ( lastExecutedCommand.equals ( getModel ( ) . getEditQuotaCommand ( ) ) ) ) || ( lastExecutedCommand.equals ( getModel ( ) . getCloneQuotaCommand ( ) ) ) ) { return quotaPopupProvider.get ( ) ; } else { return super . getModelPopup ( source , lastExecutedCommand , windowModel ) ; } }
Source:
protected void endSuccessfully ( ) { org.ovirt.engine.core.bll.TryBackToAllSnapshotsOfVmCommand.getVmStaticDAO ( ) . incrementDbGeneration ( org.ovirt.engine.core.bll.TryBackToAllSnapshotsOfVmCommand.getVm ( ) . getId ( ) ) ; org.ovirt.engine.core.bll.TryBackToAllSnapshotsOfVmCommand.endActionOnDisks ( ) ; if ( ( org.ovirt.engine.core.bll.TryBackToAllSnapshotsOfVmCommand.getVm ( ) ) != null ) { org.ovirt.engine.core.bll.VmHandler.unlockVm ( org.ovirt.engine.core.bll.TryBackToAllSnapshotsOfVmCommand.getVm ( ) , org.ovirt.engine.core.bll.TryBackToAllSnapshotsOfVmCommand.getCompensationContext ( ) ) ; restoreVmConfigFromSnapshot ( ) ; } else { org.ovirt.engine.core.bll.TryBackToAllSnapshotsOfVmCommand.setCommandShouldBeLogged ( false ) ; log.warn ( "VmCommand::EndVmCommand: Vm is null - not performing endAction on Vm" ) ; } org.ovirt.engine.core.bll.TryBackToAllSnapshotsOfVmCommand.setSucceeded ( true ) ; }

Target:
protected void endSuccessfully ( ) { org.ovirt.engine.core.bll.TryBackToAllSnapshotsOfVmCommand.getVmStaticDao ( ) . incrementDbGeneration ( org.ovirt.engine.core.bll.TryBackToAllSnapshotsOfVmCommand.getVm ( ) . getId ( ) ) ; org.ovirt.engine.core.bll.TryBackToAllSnapshotsOfVmCommand.endActionOnDisks ( ) ; if ( ( org.ovirt.engine.core.bll.TryBackToAllSnapshotsOfVmCommand.getVm ( ) ) != null ) { org.ovirt.engine.core.bll.VmHandler.unlockVm ( org.ovirt.engine.core.bll.TryBackToAllSnapshotsOfVmCommand.getVm ( ) , org.ovirt.engine.core.bll.TryBackToAllSnapshotsOfVmCommand.getCompensationContext ( ) ) ; restoreVmConfigFromSnapshot ( ) ; } else { org.ovirt.engine.core.bll.TryBackToAllSnapshotsOfVmCommand.setCommandShouldBeLogged ( false ) ; log.warn ( "VmCommand::EndVmCommand: Vm is null - not performing endAction on Vm" ) ; } org.ovirt.engine.core.bll.TryBackToAllSnapshotsOfVmCommand.setSucceeded ( true ) ; }
Source:
public void getRedirectServletReportsPage ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.String ) ( source ) ) : "" ; } } ; getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.RedirectServletReportsPage , getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public void getPermittedStorageDomainsByStoragePoolId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId , org.ovirt.engine.core.common.businessentities.ActionGroup actionGroup ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ( ) ; } return source ; } } ; org.ovirt.engine.core.common.queries.GetPermittedStorageDomainsByStoragePoolIdParameters params = new org.ovirt.engine.core.common.queries.GetPermittedStorageDomainsByStoragePoolIdParameters ( ) ; params.setStoragePoolId ( dataCenterId ) ; params.setActionGroup ( actionGroup ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetPermittedStorageDomainsByStoragePoolId , params , aQuery ) ; }
Source:
public static void getRoleList ( 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.Role > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Role > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllRoles , new org.ovirt.engine.core.common.queries.MultilevelAdministrationsQueriesParameters ( ) , aQuery ) ; }

Target:
public static void getDiskList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > ( ) ; } } ; org.ovirt.engine.core.common.queries.SearchParameters searchParams = new org.ovirt.engine.core.common.queries.SearchParameters ( "Disks:" , org.ovirt.engine.core.common.interfaces.SearchType.Disk ) ; searchParams.setMaxCount ( 9999 ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , searchParams , aQuery ) ; }
Source:
public void removeNetworkFromParameters ( org.ovirt.engine.core.common.action.SetupNetworksParameters params , org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nic , org.ovirt.engine.core.common.businessentities.network.Network net ) { if ( org.ovirt.engine.core.utils.NetworkUtils.isVlan ( net ) ) { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface vlan = getVlanDevice ( params.getInterfaces ( ) , nic , net ) ; if ( vlan == null ) { throw new org.ovirt.engine.core.common.errors.VdcBLLException ( org.ovirt.engine.core.common.errors.VdcBllErrors.NETWORK_LABEL_CONFLICT ) ; } else { params.getInterfaces ( ) . remove ( vlan ) ; } } }

Target:
public void removeNetworkFromParameters ( org.ovirt.engine.core.common.action.SetupNetworksParameters params , org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nic , org.ovirt.engine.core.common.businessentities.network.Network net ) { if ( org.ovirt.engine.core.utils.NetworkUtils.isVlan ( net ) ) { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface vlan = getVlanDevice ( params.getInterfaces ( ) , nic , net ) ; if ( vlan == null ) { throw new org.ovirt.engine.core.common.errors.VdcBLLException ( org.ovirt.engine.core.common.errors.VdcBllErrors.NETWORK_LABEL_CONFLICT ) ; } else { params.getInterfaces ( ) . remove ( vlan ) ; } } else if ( org.apache.commons.lang.StringUtils.equals ( net.getName ( ) , nic.getNetworkName ( ) ) ) { nic.setNetworkName ( null ) ; } }
Source:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel ) ( target ) ) ; org.ovirt.engine.core.common.businessentities.VmTemplate template = ( ( org.ovirt.engine.core.common.businessentities.VmTemplate ) ( returnValue ) ) ; model.getTemplate ( ) . setItems ( new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmTemplate > ( java.util.Arrays.asList ( new org.ovirt.engine.core.common.businessentities.VmTemplate [ ] { template } ) ) ) ; model.getTemplate ( ) . setSelectedItem ( template ) ; model.getTemplate ( ) . setIsChangable ( false ) ; PostInitTemplate ( ) ; }

Target:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel ) ( target ) ) ; org.ovirt.engine.core.common.businessentities.VmTemplate template = ( ( org.ovirt.engine.core.common.businessentities.VmTemplate ) ( returnValue ) ) ; model.getTemplate ( ) . setItems ( new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmTemplate > ( java.util.Arrays.asList ( new org.ovirt.engine.core.common.businessentities.VmTemplate [ ] { template } ) ) ) ; model.getTemplate ( ) . setSelectedItem ( template ) ; model.getTemplate ( ) . setIsChangable ( false ) ; postInitTemplate ( ) ; }
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 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 runFailedAutoStartVMs ( java.util.List < org.ovirt.engine.core.compat.Guid > vmIds ) { for ( org.ovirt.engine.core.compat.Guid vmId : vmIds ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase event = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; event.setVmId ( vmId ) ; org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.log ( event , AuditLogType.HA_VM_FAILED ) ; org.ovirt.engine.core.bll.VdsEventListener.log.infoFormat ( "Highly Available VM went down. Attempting to restart. VM Name: {0}, VM Id: {1}" , event.getVmName ( ) , vmId ) ; } org.ovirt.engine.core.bll.AutoStartVmsRunner.getInstance ( ) . addVmsToRun ( vmIds ) ; }

Target:
public void runFailedAutoStartVMs ( java.util.List < org.ovirt.engine.core.compat.Guid > vmIds ) { for ( org.ovirt.engine.core.compat.Guid vmId : vmIds ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase event = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; event.setVmId ( vmId ) ; org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.log ( event , AuditLogType.HA_VM_FAILED ) ; org.ovirt.engine.core.bll.VdsEventListener.log.info ( "Highly Available VM went down. Attempting to restart. VM Name '{}', VM Id '{}'" , event.getVmName ( ) , vmId ) ; } org.ovirt.engine.core.bll.AutoStartVmsRunner.getInstance ( ) . addVmsToRun ( vmIds ) ; }
Source:
protected void MoveOrCopyAllImageGroups ( ) { MoveOrCopyAllImageGroups ( getVm ( ) . getId ( ) , org.ovirt.engine.core.bll.ImagesHandler.filterImageDisks ( getVm ( ) . getDiskMap ( ) . values ( ) , false , false ) ) ; }

Target:
private boolean CanAddVm ( ) { boolean exists = ( ( java.lang.Boolean ) ( getBackend ( ) . runInternalQuery ( VdcQueryType.IsVmWithSameNameExist , new org.ovirt.engine.core.common.queries.IsVmWithSameNameExistParameters ( getVm ( ) . getvm_name ( ) ) ) . getReturnValue ( ) ) ) ; if ( exists ) { addCanDoActionMessage ( VdcBllMessages.VM_CANNOT_IMPORT_VM_NAME_EXISTS ) ; } return ! exists ; }
Source:
protected void executeCommand ( ) { super . executeCommand ( ) ; getParameters ( ) . getLibvirtSecret ( ) . setCreationDate ( new java.util.Date ( ) ) ; getLibvirtSecretDao ( ) . save ( getParameters ( ) . getLibvirtSecret ( ) ) ; registerLibvirtSecret ( ) ; setSucceeded ( true ) ; }

Target:
protected void executeCommand ( ) { super . executeCommand ( ) ; getParameters ( ) . getLibvirtSecret ( ) . setCreationDate ( new java.util.Date ( ) ) ; libvirtSecretDao.save ( getParameters ( ) . getLibvirtSecret ( ) ) ; registerLibvirtSecret ( ) ; setSucceeded ( true ) ; }
Source:
public 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 > ( ) ; } } ; getUpHostListByCluster ( aQuery , clusterName , null ) ; }

Target:
public void getExistingStorageDomainList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hostId , org.ovirt.engine.core.common.businessentities.StorageDomainType domainType , org.ovirt.engine.core.common.businessentities.storage.StorageType storageType , java.lang.String path ) { 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 ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetExistingStorageDomainList , new org.ovirt.engine.core.common.queries.GetExistingStorageDomainListParameters ( hostId , storageType , domainType , path ) , aQuery ) ; }
Source:
private void removeVmStatlessImages ( ) { runInternalAction ( VdcActionType.ProcessDownVm , new org.ovirt.engine.core.common.action.ProcessDownVmParameters ( org.ovirt.engine.core.bll.RunVmCommand.getVm ( ) . getId ( ) , true ) , org.ovirt.engine.core.bll.job.ExecutionHandler.createDefaultContextForTasks ( org.ovirt.engine.core.bll.RunVmCommand.getContext ( ) , org.ovirt.engine.core.bll.RunVmCommand.getLock ( ) ) ) ; org.ovirt.engine.core.bll.RunVmCommand.setLock ( null ) ; org.ovirt.engine.core.bll.RunVmCommand.setSucceeded ( true ) ; }

Target:
private void removeVmStatlessImages ( ) { runInternalAction ( VdcActionType.ProcessDownVm , new org.ovirt.engine.core.common.action.ProcessDownVmParameters ( org.ovirt.engine.core.bll.RunVmCommand.getVm ( ) . getId ( ) , true ) , executionHandler.createDefaultContextForTasks ( org.ovirt.engine.core.bll.RunVmCommand.getContext ( ) , org.ovirt.engine.core.bll.RunVmCommand.getLock ( ) ) ) ; org.ovirt.engine.core.bll.RunVmCommand.setLock ( null ) ; org.ovirt.engine.core.bll.RunVmCommand.setSucceeded ( true ) ; }
Source:
public static org.ovirt.engine.core.aaa.DirectoryGroup findGroupById ( final org.ovirt.engine.core.extensions.mgr.ExtensionProxy extension , final java.lang.String id ) { java.util.List < org.ovirt.engine.core.aaa.DirectoryGroup > groups = org.ovirt.engine.core.aaa.AuthzUtils.findGroupsByIds ( extension , java.util.Arrays.asList ( id ) ) ; if ( groups.isEmpty ( ) ) { return null ; } return groups.get ( 0 ) ; }

Target:
public static org.ovirt.engine.core.aaa.DirectoryGroup findGroupById ( final org.ovirt.engine.core.extensions.mgr.ExtensionProxy extension , java.lang.String namespace , final java.lang.String id ) { java.util.List < org.ovirt.engine.core.aaa.DirectoryGroup > groups = org.ovirt.engine.core.aaa.AuthzUtils.findGroupsByIds ( extension , namespace , java.util.Arrays.asList ( id ) ) ; if ( groups.isEmpty ( ) ) { return null ; } return groups.get ( 0 ) ; }
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 getMaxSpmPriority ( 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 ; } } ; aQuery.asyncCallback.onSuccess ( aQuery.getModel ( ) , 10 ) ; }
Source:
org.ovirt.engine.api.model.StorageConnection getModel ( int index ) { org.ovirt.engine.api.model.StorageConnection model = new org.ovirt.engine.api.model.StorageConnection ( ) ; model.setType ( org.ovirt.engine.api.restapi.resource.BackendStorageServerConnectionResourceTest.STORAGE_TYPES_MAPPED [ index ] . toString ( ) ) ; model.setAddress ( "1.122.10.125" ) ; org.ovirt.engine.api.model.Host host = new org.ovirt.engine.api.model.Host ( ) ; host.setId ( GUIDS [ 1 ] . toString ( ) ) ; model.setHost ( host ) ; if ( index == 0 ) { model.setPath ( "/data1" ) ; } if ( index == 3 ) { model.setPort ( 3260 ) ; } return model ; }

Target:
org.ovirt.engine.api.model.StorageConnection getModel ( int index ) { org.ovirt.engine.api.model.StorageConnection model = new org.ovirt.engine.api.model.StorageConnection ( ) ; model.setType ( org.ovirt.engine.api.restapi.resource.BackendStorageServerConnectionResourceTest.STORAGE_TYPES [ index ] ) ; model.setAddress ( "1.122.10.125" ) ; org.ovirt.engine.api.model.Host host = new org.ovirt.engine.api.model.Host ( ) ; host.setId ( GUIDS [ 1 ] . toString ( ) ) ; model.setHost ( host ) ; if ( index == 0 ) { model.setPath ( "/data1" ) ; } if ( index == 3 ) { model.setPort ( 3260 ) ; } return model ; }
Source:
public static org.ovirt.engine.core.compat.Version getEffective ( org.ovirt.engine.core.common.businessentities.VmBase vmBase , org.ovirt.engine.core.common.businessentities.VDSGroup cluster ) { org.ovirt.engine.core.compat.Version vmCustomCompatibilityVersion = ( vmBase != null ) ? vmBase.getCustomCompatibilityVersion ( ) : null ; org.ovirt.engine.core.compat.Version clusterCompatibilityVersion = ( cluster != null ) ? cluster.getCompatibilityVersion ( ) : null ; return org.ovirt.engine.core.common.utils.CompatibilityVersionUtils.getEffective ( vmCustomCompatibilityVersion , clusterCompatibilityVersion , org.ovirt.engine.core.compat.Version.getLast ( ) ) ; }

Target:
public static org.ovirt.engine.core.compat.Version getEffective ( org.ovirt.engine.core.common.businessentities.VmBase vmBase , org.ovirt.engine.core.common.businessentities.Cluster cluster ) { org.ovirt.engine.core.compat.Version vmCustomCompatibilityVersion = ( vmBase != null ) ? vmBase.getCustomCompatibilityVersion ( ) : null ; org.ovirt.engine.core.compat.Version clusterCompatibilityVersion = ( cluster != null ) ? cluster.getCompatibilityVersion ( ) : null ; return org.ovirt.engine.core.common.utils.CompatibilityVersionUtils.getEffective ( vmCustomCompatibilityVersion , clusterCompatibilityVersion , org.ovirt.engine.core.compat.Version.getLast ( ) ) ; }
Source:
protected void setVirtioScsiController ( org.ovirt.engine.api.model.VM model ) { if ( ! ( model.isSetVirtioScsi ( ) ) ) { model.setVirtioScsi ( new org.ovirt.engine.api.model.VirtIOSCSI ( ) ) ; } model.getVirtioScsi ( ) . setEnabled ( ( ! ( org.ovirt.engine.api.restapi.util.VmHelper.getVirtioScsiControllersForEntity ( this , new org.ovirt.engine.core.compat.Guid ( model.getId ( ) ) ) . isEmpty ( ) ) ) ) ; }

Target:
protected void setVirtioScsiController ( org.ovirt.engine.api.model.VM model ) { if ( ! ( model.isSetVirtioScsi ( ) ) ) { model.setVirtioScsi ( new org.ovirt.engine.api.model.VirtioScsi ( ) ) ; } model.getVirtioScsi ( ) . setEnabled ( ( ! ( org.ovirt.engine.api.restapi.util.VmHelper.getVirtioScsiControllersForEntity ( this , new org.ovirt.engine.core.compat.Guid ( model.getId ( ) ) ) . isEmpty ( ) ) ) ) ; }
Source:
public void testListCrash ( ) throws java.lang.Exception { javax.ws.rs.core.UriInfo uriInfo = setUpUriExpectations ( null ) ; java.lang.Throwable t = new java.lang.RuntimeException ( FAILURE ) ; setUpEntityQueryExpectations ( 1 , t ) ; control.replay ( ) ; collection.setUriInfo ( uriInfo ) ; try { getCollection ( ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , org.ovirt.engine.api.restapi.resource.BACKEND_FAILED_SERVER_LOCALE , t ) ; } }

Target:
static void verifyModelSpecific ( org.ovirt.engine.api.model.Disk model , int index ) { assertEquals ( GUIDS [ index ] . toString ( ) , model.getId ( ) ) ; assertTrue ( model.isSparse ( ) ) ; assertTrue ( ( ! ( model.isBootable ( ) ) ) ) ; assertTrue ( model.isPropagateErrors ( ) ) ; }
Source:
public static void getUnusedBricksFromServer ( org.ovirt.engine.ui.frontend.AsyncQuery asyncQuery , org.ovirt.engine.core.compat.Guid hostId ) { asyncQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.core.common.queries.VdsIdParametersBase parameters = new org.ovirt.engine.core.common.queries.VdsIdParametersBase ( hostId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetUnusedGlusterBricks , parameters , asyncQuery ) ; }

Target:
public static void getStorageDevices ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hostId ) { 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.GetGlusterStorageDevices , new org.ovirt.engine.core.common.queries.VdsIdParametersBase ( hostId ) , aQuery ) ; }
Source:
public java.util.Map < java.lang.String , java.lang.String > getDownloadHeaders ( ) { java.util.HashMap < java.lang.String , java.lang.String > httpHeaders = new java.util.HashMap < > ( ) ; if ( ( getTokenProvider ( ) ) != null ) { httpHeaders.put ( "X-Auth-Token" , getTokenProvider ( ) . getToken ( ) ) ; } return httpHeaders ; }

Target:
public java.lang.String getImageUrl ( java.lang.String id ) { return ( ( ( getProvider ( ) . getUrl ( ) ) + ( org.ovirt.engine.core.bll.provider.storage.OpenStackImageProviderProxy.API_VERSION ) ) + "/images/" ) + id ; }
Source:
public void getClusterNetworkList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { if ( ( aQuery.converterCallback ) == null ) { 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.getInstance ( ) . runQuery ( VdcQueryType.GetAllNetworksByClusterId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( clusterId ) , aQuery ) ; }

Target:
public void getAAANamespaces ( 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.HashMap < java.lang.String , java.util.List < java.lang.String > > ) ( source ) ) : new java.util.HashMap < java.lang.String , java.util.List < java.lang.String > > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAvailableNamespaces , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }
Source:
public javax.ws.rs.core.Response export ( org.ovirt.engine.api.model.Action action ) { validateParameters ( action , "storageDomain.id|name" ) ; org.ovirt.engine.core.common.action.MoveOrCopyParameters params = new org.ovirt.engine.core.common.action.MoveOrCopyParameters ( guid , getStorageDomainId ( action ) ) ; if ( ( action.isSetExclusive ( ) ) && ( action.isExclusive ( ) ) ) { params.setForceOverride ( true ) ; } if ( ( action.isSetDiscardSnapshots ( ) ) && ( action.isDiscardSnapshots ( ) ) ) { params.setCopyCollapse ( true ) ; } return doAction ( VdcActionType.ExportVm , params , action ) ; }

Target:
public javax.ws.rs.core.Response export ( org.ovirt.engine.api.model.Action action ) { validateParameters ( action , "storageDomain.id|name" ) ; org.ovirt.engine.core.common.action.MoveOrCopyParameters params = new org.ovirt.engine.core.common.action.MoveOrCopyParameters ( guid , getStorageDomainId ( action ) ) ; if ( ( action.isSetExclusive ( ) ) && ( action.isExclusive ( ) ) ) { params.setForceOverride ( true ) ; } if ( ( action.isSetDiscardSnapshots ( ) ) && ( action.isDiscardSnapshots ( ) ) ) { params.setCopyCollapse ( true ) ; } return doAction ( ActionType.ExportVm , params , action ) ; }
Source:
private void setupVdsGroupDao ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.NetworkCluster > expectedNetworkCluster = java.util.Collections.singletonList ( networkCluster ) ; org.ovirt.engine.core.dao.network.NetworkClusterDao networkClusterDaoMock = org.mockito.Mockito.mock ( org.ovirt.engine.core.dao.network.NetworkClusterDao.class ) ; org.mockito.Mockito.when ( networkClusterDaoMock.getAllForNetwork ( networkId ) ) . thenReturn ( expectedNetworkCluster ) ; org.mockito.Mockito.when ( getDbFacadeMockInstance ( ) . getNetworkClusterDao ( ) ) . thenReturn ( networkClusterDaoMock ) ; }

Target:
private void setupClusterDao ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.NetworkCluster > expectedNetworkCluster = java.util.Collections.singletonList ( networkCluster ) ; org.ovirt.engine.core.dao.network.NetworkClusterDao networkClusterDaoMock = org.mockito.Mockito.mock ( org.ovirt.engine.core.dao.network.NetworkClusterDao.class ) ; org.mockito.Mockito.when ( networkClusterDaoMock.getAllForNetwork ( networkId ) ) . thenReturn ( expectedNetworkCluster ) ; org.mockito.Mockito.when ( getDbFacadeMockInstance ( ) . getNetworkClusterDao ( ) ) . thenReturn ( networkClusterDaoMock ) ; }
Source:
private int getResourceType ( org.ovirt.engine.core.compat.backendcompat.XmlNode node , java.lang.String resource ) { if ( ( ( node.SelectSingleNode ( resource , _xmlNS ) ) != null ) && ( ! ( org.apache.commons.lang.StringUtils.isEmpty ( node.SelectSingleNode ( resource , _xmlNS ) . InnerText ) ) ) ) { return java.lang.Integer.valueOf ( node.SelectSingleNode ( resource , _xmlNS ) . InnerText ) ; } return - 1 ; }

Target:
private int getResourceType ( org.ovirt.engine.core.compat.backendcompat.XmlNode node , java.lang.String resource ) { if ( ( ( node.SelectSingleNode ( resource , _xmlNS ) ) != null ) && ( ! ( org.apache.commons.lang.StringUtils.isEmpty ( node.SelectSingleNode ( resource , _xmlNS ) . innerText ) ) ) ) { return java.lang.Integer.valueOf ( node.SelectSingleNode ( resource , _xmlNS ) . innerText ) ; } return - 1 ; }
Source:
public static void getPermittedStorageDomainsByStoragePoolId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId , org.ovirt.engine.core.common.businessentities.ActionGroup actionGroup ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ( ) ; } return source ; } } ; org.ovirt.engine.core.common.queries.GetPermittedStorageDomainsByStoragePoolIdParameters params = new org.ovirt.engine.core.common.queries.GetPermittedStorageDomainsByStoragePoolIdParameters ( ) ; params.setStoragePoolId ( dataCenterId ) ; params.setActionGroup ( actionGroup ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetPermittedStorageDomainsByStoragePoolId , params , aQuery ) ; }

Target:
public static void getVmNicList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ) ( source ) ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmInterfacesByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }
Source:
public static void GetDataCentersByStorageDomain ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , 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 ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage_pool > ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetStoragePoolsByStorageDomainId , new org.ovirt.engine.core.common.queries.StorageDomainQueryParametersBase ( storageDomainId ) , 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.core.common.config.Config.DefaultConfigurationVersion ) , aQuery ) ; }
Source:
public com.google.gwt.resources.client.ImageResource getValue ( T item ) { java.lang.String osTypeName = org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getOsUniqueOsNames ( ) . get ( extractor.extractOsType ( item ) ) ; com.google.gwt.resources.client.ResourcePrototype resource = org.ovirt.engine.ui.userportal.widget.table.column.VmImageColumn.getApplicationResourcesWithLookup ( ) . getResource ( ( osTypeName + "SmallImage" ) ) ; if ( ! ( resource instanceof com.google.gwt.resources.client.ImageResource ) ) { resource = org.ovirt.engine.ui.userportal.widget.table.column.VmImageColumn.getApplicationResourcesWithLookup ( ) . otherSmallImage ( ) ; } return ( ( com.google.gwt.resources.client.ImageResource ) ( resource ) ) ; }

Target:
public com.google.gwt.resources.client.ImageResource getValue ( T item ) { java.lang.String osTypeName = org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getOsUniqueOsNames ( ) . get ( extractor.extractOsType ( item ) ) ; com.google.gwt.resources.client.ResourcePrototype resource = resourcesWithLookup.getResource ( ( osTypeName + "SmallImage" ) ) ; if ( ! ( resource instanceof com.google.gwt.resources.client.ImageResource ) ) { resource = resourcesWithLookup.otherSmallImage ( ) ; } return ( ( com.google.gwt.resources.client.ImageResource ) ( resource ) ) ; }
Source:
private void setUpGetUserExpectations ( ) { org.ovirt.engine.core.common.users.VdcUser user = new org.ovirt.engine.core.common.users.VdcUser ( ) ; user.setUserId ( GUIDS [ 0 ] ) ; org.easymock.EasyMock.expect ( sessionHelper.getCurrent ( ) . get ( org.ovirt.engine.core.common.users.VdcUser.class ) ) . andReturn ( user ) . anyTimes ( ) ; }

Target:
private void setUpGetUserExpectations ( ) { org.ovirt.engine.core.common.businessentities.DbUser user = new org.ovirt.engine.core.common.businessentities.DbUser ( ) ; user.setId ( GUIDS [ 0 ] ) ; org.easymock.EasyMock.expect ( sessionHelper.getCurrent ( ) . get ( org.ovirt.engine.core.common.businessentities.DbUser.class ) ) . andReturn ( user ) . anyTimes ( ) ; }
Source:
private void executeCallbacks ( boolean success , org.ovirt.engine.ui.uicommonweb.action.UiAction.ActionFlowState flowState , java.util.List < org.ovirt.engine.ui.uicompat.IFrontendMultipleActionAsyncCallback > callbacks , boolean waitForResult ) { java.util.Collections.shuffle ( callbacks ) ; for ( org.ovirt.engine.ui.uicompat.IFrontendMultipleActionAsyncCallback callback : callbacks ) { assertNotAllDone ( flowState ) ; org.ovirt.engine.core.common.action.VdcReturnValueBase result = new org.ovirt.engine.core.common.action.VdcReturnValueBase ( ) ; result.setValid ( ( waitForResult || success ) ) ; result.setSucceeded ( ( waitForResult && success ) ) ; callback.executed ( new org.ovirt.engine.ui.uicompat.FrontendMultipleActionAsyncResult ( ACTION_TYPE , null , java.util.Collections.singletonList ( result ) ) ) ; } }

Target:
private void executeCallbacks ( boolean success , org.ovirt.engine.ui.uicommonweb.action.UiAction.ActionFlowState flowState , java.util.List < org.ovirt.engine.ui.uicompat.IFrontendMultipleActionAsyncCallback > callbacks , boolean waitForResult ) { java.util.Collections.shuffle ( callbacks ) ; for ( org.ovirt.engine.ui.uicompat.IFrontendMultipleActionAsyncCallback callback : callbacks ) { assertNotAllDone ( flowState ) ; org.ovirt.engine.core.common.action.ActionReturnValue result = new org.ovirt.engine.core.common.action.ActionReturnValue ( ) ; result.setValid ( ( waitForResult || success ) ) ; result.setSucceeded ( ( waitForResult && success ) ) ; callback.executed ( new org.ovirt.engine.ui.uicompat.FrontendMultipleActionAsyncResult ( ACTION_TYPE , null , java.util.Collections.singletonList ( result ) ) ) ; } }
Source:
private static java.lang.String addSessionToContext ( org.ovirt.engine.core.common.queries.VdcQueryParametersBase parameters ) { java.lang.String sessionId = parameters.getHttpSessionId ( ) ; boolean isAddToContext = true ; if ( org.ovirt.engine.core.compat.StringHelper.isNullOrEmpty ( sessionId ) ) { sessionId = parameters.getSessionId ( ) ; } if ( org.ovirt.engine.core.compat.StringHelper.isNullOrEmpty ( sessionId ) ) { sessionId = org.ovirt.engine.core.utils.ThreadLocalParamsContainer.getHttpSessionId ( ) ; isAddToContext = false ; } if ( ( ! ( org.ovirt.engine.core.compat.StringHelper.isNullOrEmpty ( sessionId ) ) ) && isAddToContext ) { org.ovirt.engine.core.utils.ThreadLocalParamsContainer.setHttpSessionId ( sessionId ) ; } return sessionId ; }

Target:
public java.util.ArrayList < org.ovirt.engine.core.common.action.VdcReturnValueBase > runMultipleActions ( org.ovirt.engine.core.common.action.VdcActionType actionType , java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > parameters , boolean isRunOnlyIfAllCanDoPass , boolean waitForResult ) { org.ovirt.engine.core.common.action.VdcReturnValueBase returnValue = notAllowToRunAction ( actionType ) ; if ( returnValue != null ) { java.util.ArrayList < org.ovirt.engine.core.common.action.VdcReturnValueBase > list = new java.util.ArrayList < org.ovirt.engine.core.common.action.VdcReturnValueBase > ( ) ; list.add ( returnValue ) ; return list ; } else { return runMultipleActionsImpl ( actionType , parameters , false , isRunOnlyIfAllCanDoPass , waitForResult ) ; } }
Source:
private void clusterSelectedItemChanged ( ) { if ( ( getCluster ( ) . getSelectedItem ( ) ) != null ) { getAddBricksCommand ( ) . setIsExecutionAllowed ( true ) ; } else { getAddBricksCommand ( ) . setIsExecutionAllowed ( false ) ; } setBricks ( new org.ovirt.engine.ui.uicommonweb.models.ListModel ( ) ) ; }

Target:
private void cancelConfirmation ( ) { setConfirmWindow ( null ) ; }