auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private void createTables ( org.ovirt.engine.ui.uicommonweb.models.storage.RegisterEntityModel < E > model ) { createEntityTable ( model ) ; createInfoPanel ( model ) ; entityTable.asEditor ( ) . edit ( model.getEntities ( ) ) ; model.getEntities ( ) . setSelectedItem ( org.ovirt.engine.ui.uicommonweb.Linq.firstOrDefault ( model.getEntities ( ) . getItems ( ) ) ) ; }

Target:
private void createTables ( org.ovirt.engine.ui.uicommonweb.models.storage.RegisterEntityModel < E > model ) { createEntityTable ( model ) ; createInfoPanel ( model ) ; entityTable.asEditor ( ) . edit ( model.getEntities ( ) ) ; model.getEntities ( ) . setSelectedItem ( org.ovirt.engine.ui.uicommonweb.Linq.firstOrNull ( model.getEntities ( ) . getItems ( ) ) ) ; }
Source:
private void commit ( ) { org.ovirt.engine.ui.uicompat.Enlistment enlistment = new org.ovirt.engine.ui.uicompat.Enlistment ( context ) ; enlistment.getDoneEvent ( ) . addListener ( new org.ovirt.engine.core.compat.IEventListener ( ) { @ java.lang.Override public void eventRaised ( org.ovirt.engine.core.compat.Event ev , java.lang.Object sender , org.ovirt.engine.core.compat.EventArgs args ) { doneOnCommitHandler ( ) ; } } ) ; org.ovirt.engine.ui.uicompat.IEnlistmentNotification notification = notifications.get ( commitIndex ) ; notification.commit ( enlistment ) ; }

Target:
private void commit ( ) { org.ovirt.engine.ui.uicompat.Enlistment enlistment = new org.ovirt.engine.ui.uicompat.Enlistment ( context ) ; enlistment.getDoneEvent ( ) . addListener ( new org.ovirt.engine.ui.uicompat.IEventListener ( ) { @ java.lang.Override public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { doneOnCommitHandler ( ) ; } } ) ; org.ovirt.engine.ui.uicompat.IEnlistmentNotification notification = notifications.get ( commitIndex ) ; notification.commit ( enlistment ) ; }
Source:
public void getVmGuestAgentInterfacesByVmId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid vmId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmGuestAgentInterface > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmGuestAgentInterfacesByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) . withoutRefresh ( ) , aQuery ) ; }

Target:
public void getVMsWithVNumaNodesByClusterId ( org.ovirt.engine.ui.frontend.AsyncQuery asyncQuery , org.ovirt.engine.core.compat.Guid clusterId ) { asyncQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VM > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllVmsWithNumaByClusterId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( clusterId ) , asyncQuery ) ; }
Source:
public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { model.stopProgress ( ) ; if ( result.getReturnValue ( ) . getSucceeded ( ) ) { cancel ( ) ; } }

Target:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > disks = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ) ( returnValue ) ) ; getVmDisks ( ) . clear ( ) ; for ( org.ovirt.engine.core.common.businessentities.Disk disk : disks ) { if ( ( disk.getDiskStorageType ( ) ) == ( Disk.DiskStorageType.LUN ) ) { continue ; } org.ovirt.engine.core.common.businessentities.DiskImage diskImage = ( ( org.ovirt.engine.core.common.businessentities.DiskImage ) ( disk ) ) ; getVmDisks ( ) . add ( diskImage ) ; } }
Source:
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 ) ; }

Target:
public void getVmConfigurationBySnapshot ( org.ovirt.engine.ui.frontend.AsyncQuery < org.ovirt.engine.core.common.businessentities.VM > aQuery , org.ovirt.engine.core.compat.Guid snapshotSourceId ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.CastingConverter < > ( ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmConfigurationBySnapshot , new org.ovirt.engine.core.common.queries.IdQueryParameters ( snapshotSourceId ) . withoutRefresh ( ) , aQuery ) ; }
Source:
protected void ExecuteVdsBrokerCommand ( ) { java.util.List < java.lang.String > vmIds = org.ovirt.engine.core.vdsbroker.vdsbroker.FullListVdsCommand.getParameters ( ) . getVmIds ( ) ; java.lang.String [ ] vmIdsArray = vmIds.toArray ( new java.lang.String [ vmIds.size ( ) ] ) ; fullVmListReturn = org.ovirt.engine.core.vdsbroker.vdsbroker.FullListVdsCommand.getBroker ( ) . list ( java.lang.Boolean.TRUE.toString ( ) , vmIdsArray ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.FullListVdsCommand.ProceedProxyReturnValue ( ) ; java.util.Map < java.lang.String , java.lang.Object > [ ] struct = fullVmListReturn.mVmList ; org.ovirt.engine.core.vdsbroker.vdsbroker.FullListVdsCommand.setReturnValue ( struct ) ; }

Target:
protected void ExecuteVdsBrokerCommand ( ) { java.util.List < java.lang.String > vmIds = org.ovirt.engine.core.vdsbroker.vdsbroker.FullListVdsCommand.getParameters ( ) . getVmIds ( ) ; java.lang.String [ ] vmIdsArray = vmIds.toArray ( new java.lang.String [ vmIds.size ( ) ] ) ; fullVmListReturn = org.ovirt.engine.core.vdsbroker.vdsbroker.FullListVdsCommand.getBroker ( ) . list ( java.lang.Boolean.TRUE.toString ( ) , vmIdsArray ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.FullListVdsCommand.proceedProxyReturnValue ( ) ; java.util.Map < java.lang.String , java.lang.Object > [ ] struct = fullVmListReturn.mVmList ; org.ovirt.engine.core.vdsbroker.vdsbroker.FullListVdsCommand.setReturnValue ( struct ) ; }
Source:
public void setupCommand ( ) { initSpyCommand ( ) ; mockDaos ( ) ; mockSnapshotValidator ( ) ; }

Target:
public void moveUnpluggedDiskVmDown ( ) { command.getParameters ( ) . setParametersList ( createMoveDisksParameters ( ) ) ; initDiskImage ( diskImageId ) ; initVm ( VMStatus.Down , org.ovirt.engine.core.compat.Guid.newGuid ( ) , diskImageId , false ) ; command.updateParameters ( ) ; org.junit.Assert.assertEquals ( command.getMoveDiskParametersList ( ) . size ( ) , 1 ) ; }
Source:
public org.ovirt.engine.ui.common.presenter.AbstractModelBoundPopupPresenterWidget < ? extends org.ovirt.engine.ui.uicommonweb.models.Model , ? > getModelPopup ( org.ovirt.engine.ui.uicommonweb.models.pools.PoolListModel source , org.ovirt.engine.ui.uicommonweb.UICommand lastExecutedCommand , org.ovirt.engine.ui.uicommonweb.models.Model windowModel ) { if ( lastExecutedCommand == ( getModel ( ) . getNewCommand ( ) ) ) { return poolPopupProvider.get ( ) ; } else if ( lastExecutedCommand == ( getModel ( ) . getEditCommand ( ) ) ) { return poolPopupProvider.get ( ) ; } else { return super . getModelPopup ( source , lastExecutedCommand , windowModel ) ; } }

Target:
public org.ovirt.engine.ui.common.presenter.AbstractModelBoundPopupPresenterWidget < ? extends org.ovirt.engine.ui.uicommonweb.models.Model , ? > getModelPopup ( org.ovirt.engine.ui.uicommonweb.models.pools.PoolListModel source , org.ovirt.engine.ui.uicommonweb.UICommand lastExecutedCommand , org.ovirt.engine.ui.uicommonweb.models.Model windowModel ) { if ( lastExecutedCommand == ( getModel ( ) . getNewCommand ( ) ) ) { return poolPopupProvider.get ( ) ; } else if ( lastExecutedCommand == ( getModel ( ) . getEditCommand ( ) ) ) { return poolEditPopupProvider.get ( ) ; } else { return super . getModelPopup ( source , lastExecutedCommand , windowModel ) ; } }
Source:
public void getVmDiskList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid vmId , boolean isRefresh ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { return source ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > ( ) ; } } ; org.ovirt.engine.core.common.queries.IdQueryParameters params = new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) ; params.setRefresh ( isRefresh ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllDisksByVmId , params , aQuery ) ; }

Target:
public void getClustersHavingHosts ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > list = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ) ( source ) ) ; java.util.Collections.sort ( list , new org.ovirt.engine.core.common.businessentities.comparators.NameableComparator ( ) ) ; return list ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllClustersHavingHosts , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }
Source:
private void applyModeCustomizations ( ) { if ( ( org.ovirt.engine.ui.uicommonweb.models.ApplicationModeHelper.getUiMode ( ) ) == ( org.ovirt.engine.core.common.mode.ApplicationMode.GlusterOnly ) ) { optimizationTab.setVisible ( false ) ; resiliencePolicyTab.setVisible ( false ) ; clusterPolicyTab.setVisible ( false ) ; consoleTab.setVisible ( false ) ; dataCenterPanel.addStyleName ( style.generalTabTopDecoratorEmpty ( ) ) ; } }

Target:
private void applyModeCustomizations ( ) { if ( ( org.ovirt.engine.ui.uicommonweb.models.ApplicationModeHelper.getUiMode ( ) ) == ( org.ovirt.engine.core.common.mode.ApplicationMode.GlusterOnly ) ) { optimizationTab.setVisible ( false ) ; resiliencePolicyTab.setVisible ( false ) ; clusterPolicyTab.setVisible ( false ) ; consoleTab.setVisible ( false ) ; fencingPolicyTab.setVisible ( false ) ; dataCenterPanel.addStyleName ( style.generalTabTopDecoratorEmpty ( ) ) ; } }
Source:
public void getAllowClusterWithVirtGlusterEnabled ( 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 ? source : java.lang.Boolean.TRUE ; } } ; getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.AllowClusterWithVirtGlusterEnabled , getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public void getExternalProviderDiscoveredHostList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.common.businessentities.Provider provider ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.ListConverter < > ( ) ; 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.GetDiscoveredHostListFromExternalProvider , params , aQuery ) ; }
Source:
public void testValidate ( ) { org.ovirt.engine.core.searchbackend.IAutoCompleter comp = new org.ovirt.engine.core.searchbackend.BitValueAutoCompleter ( ) ; assertTrue ( "true" , comp.validate ( "true" ) ) ; assertTrue ( "TRUE" , comp.validate ( "TRUE" ) ) ; assertFalse ( "JarJar" , comp.validate ( "JarJar" ) ) ; }

Target:
public void testValidate ( ) { org.ovirt.engine.core.searchbackend.IAutoCompleter comp = new org.ovirt.engine.core.searchbackend.BitValueAutoCompleter ( ) ; org.junit.Assert.assertTrue ( "true" , comp.validate ( "true" ) ) ; org.junit.Assert.assertTrue ( "TRUE" , comp.validate ( "TRUE" ) ) ; org.junit.Assert.assertFalse ( "JarJar" , comp.validate ( "JarJar" ) ) ; }
Source:
public static void getDataCenterMaxNameLength ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Integer ) ( source ) ) . intValue ( ) : 1 ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.StoragePoolNameSizeLimit , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
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.StoragePool > ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetStoragePoolsByStorageDomainId , new org.ovirt.engine.core.common.queries.StorageDomainQueryParametersBase ( storageDomainId ) , aQuery ) ; }
Source:
public org.ovirt.engine.core.compat.Guid getQuotaId ( ) { return org.ovirt.engine.core.bll.UpdateVmTemplateCommand.getParameters ( ) . getVmTemplateData ( ) . getQuotaId ( ) ; }

Target:
public java.util.List < org.ovirt.engine.core.bll.quota.QuotaConsumptionParameter > getQuotaVdsConsumptionParameters ( ) { java.util.List < org.ovirt.engine.core.bll.quota.QuotaConsumptionParameter > list = new java.util.ArrayList < org.ovirt.engine.core.bll.quota.QuotaConsumptionParameter > ( ) ; list.add ( new org.ovirt.engine.core.bll.quota.QuotaSanityParameter ( org.ovirt.engine.core.bll.UpdateVmTemplateCommand.getParameters ( ) . getVmTemplateData ( ) . getQuotaId ( ) , null ) ) ; return list ; }
Source:
public org.ovirt.engine.core.common.businessentities.LdapGroup mapRow ( final java.sql.ResultSet rs , final int rowNum ) throws java.sql.SQLException { org.ovirt.engine.core.common.businessentities.LdapGroup entity = new org.ovirt.engine.core.common.businessentities.LdapGroup ( ) ; entity.setid ( org.ovirt.engine.core.compat.Guid.createGuidFromStringDefaultEmpty ( rs.getString ( "id" ) ) ) ; entity.setname ( rs.getString ( "name" ) ) ; entity.setstatus ( org.ovirt.engine.core.common.businessentities.LdapRefStatus.forValue ( rs.getInt ( "status" ) ) ) ; entity.setdomain ( rs.getString ( "domain" ) ) ; entity.setDistinguishedName ( rs.getString ( "distinguishedname" ) ) ; return entity ; }

Target:
public org.ovirt.engine.core.common.businessentities.LdapGroup mapRow ( final java.sql.ResultSet rs , final int rowNum ) throws java.sql.SQLException { org.ovirt.engine.core.common.businessentities.LdapGroup entity = new org.ovirt.engine.core.common.businessentities.LdapGroup ( ) ; entity.setid ( getGuidDefaultEmpty ( rs , "id" ) ) ; entity.setname ( rs.getString ( "name" ) ) ; entity.setstatus ( org.ovirt.engine.core.common.businessentities.LdapRefStatus.forValue ( rs.getInt ( "status" ) ) ) ; entity.setdomain ( rs.getString ( "domain" ) ) ; entity.setDistinguishedName ( rs.getString ( "distinguishedname" ) ) ; return entity ; }
Source:
public void testGetAllWithQuery ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity > volumes = dao.getAllWithQuery ( ( ( "select * from gluster_volumes where vol_type = '" + ( GlusterVolumeType.DISTRIBUTED_REPLICATE.name ( ) ) ) + "'" ) ) ; org.junit.Assert.assertTrue ( ( volumes != null ) ) ; org.junit.Assert.assertTrue ( ( ( volumes.size ( ) ) == 1 ) ) ; org.junit.Assert.assertEquals ( existingReplVol , volumes.get ( 0 ) ) ; }

Target:
public void testGetAllWithQuery ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity > volumes = dao.getAllWithQuery ( ( ( "select * from gluster_volumes_view where vol_type = '" + ( GlusterVolumeType.DISTRIBUTED_REPLICATE.name ( ) ) ) + "'" ) ) ; org.junit.Assert.assertTrue ( ( volumes != null ) ) ; org.junit.Assert.assertTrue ( ( ( volumes.size ( ) ) == 1 ) ) ; org.junit.Assert.assertEquals ( existingReplVol , volumes.get ( 0 ) ) ; }
Source:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { updateSelectedBricksActions ( ) ; }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { if ( getShowBricksList ( ) . getEntity ( ) ) { getBricksFromServer ( ) . setIsAvailable ( true ) ; getBrickDirectory ( ) . setIsAvailable ( false ) ; updateBricksFromHost ( ) ; } else { getBricksFromServer ( ) . setIsAvailable ( false ) ; getBrickDirectory ( ) . setIsAvailable ( true ) ; } }
Source:
public void testQueryWithNonExistingHostId ( ) { org.mockito.Mockito.when ( getQueryParameters ( ) . getVdsId ( ) ) . thenReturn ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) ) ; getQuery ( ) . setInternalExecution ( true ) ; getQuery ( ) . ExecuteCommand ( ) ; org.ovirt.engine.core.bll.CommandAssertUtils.checkSucceeded ( getQuery ( ) , true ) ; org.ovirt.engine.core.bll.GetoVirtISOsTest.checkReturnValue ( getQuery ( ) ) ; }

Target:
public void testQueryWithNonExistingHostId ( ) { org.mockito.Mockito.when ( getQueryParameters ( ) . getVdsId ( ) ) . thenReturn ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) ) ; getQuery ( ) . setInternalExecution ( true ) ; getQuery ( ) . executeCommand ( ) ; org.ovirt.engine.core.bll.CommandAssertUtils.checkSucceeded ( getQuery ( ) , true ) ; org.ovirt.engine.core.bll.GetoVirtISOsTest.checkReturnValue ( getQuery ( ) ) ; }
Source:
public void vlanBondNameMismatch ( ) { 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 ) ; parameters.getInterfaces ( ) . add ( createVlan ( ( ( bond.getName ( ) ) + "1" ) , 100 , "net" ) ) ; mockExistingIfacesWithBond ( bond , ifacesToBond ) ; org.ovirt.engine.core.bll.SetupNetworksHelper helper = createHelper ( parameters ) ; validateAndExpectViolation ( helper , VdcBllMessages.NETWORK_INTERFACES_DONT_EXIST ) ; }

Target:
public void vlanBondNameMismatch ( ) { 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 ) ; java.lang.String ifaceName = ( bond.getName ( ) ) + "1" ; parameters.getInterfaces ( ) . add ( createVlan ( ifaceName , 100 , "net" ) ) ; mockExistingIfacesWithBond ( bond , ifacesToBond ) ; org.ovirt.engine.core.bll.SetupNetworksHelper helper = createHelper ( parameters ) ; validateAndExpectViolation ( helper , VdcBllMessages.NETWORK_INTERFACES_DONT_EXIST , ifaceName ) ; }
Source:
public void validateNotEnoughSpace ( ) throws java.lang.Exception { initializeCommand ( new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ) ; initVmForSpace ( ) ; initVmDiskImage ( false ) ; initSrcStorageDomain ( ) ; initDestStorageDomain ( StorageType.NFS ) ; org.mockito.Mockito.doReturn ( org.ovirt.engine.core.bll.storage.disk.MoveOrCopyDiskCommandTest.mockStorageDomainValidatorWithoutSpace ( ) ) . when ( command ) . createStorageDomainValidator ( ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( command , EngineMessage.ACTION_TYPE_FAILED_DISK_SPACE_LOW_ON_STORAGE_DOMAIN ) ; }

Target:
public void validateDiskIsLocked ( ) throws java.lang.Exception { initializeCommand ( new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) , VmEntityType.VM ) ; mockGetVmsListForDisk ( ) ; command.getImage ( ) . setImageStatus ( ImageStatus.LOCKED ) ; org.junit.Assert.assertFalse ( command.validate ( ) ) ; org.junit.Assert.assertTrue ( command.getReturnValue ( ) . getValidationMessages ( ) . contains ( EngineMessage.ACTION_TYPE_FAILED_DISKS_LOCKED.toString ( ) ) ) ; }
Source:
public org.ovirt.engine.api.model.Nic update ( org.ovirt.engine.api.model.Nic device ) { validateEnums ( org.ovirt.engine.api.model.Nic.class , device ) ; return super . update ( device ) ; }

Target:
private org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface lookupNic ( org.ovirt.engine.core.compat.Guid nicId ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > nics = getBackendCollection ( org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface.class , VdcQueryType.GetVmInterfacesByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) ) ; for ( org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface nic : nics ) { if ( java.util.Objects.equals ( nic.getId ( ) , nicId ) ) { return nic ; } } return null ; }
Source:
private static void addSoundCard ( org.ovirt.engine.core.common.businessentities.VmBase vmBase , org.ovirt.engine.core.compat.Version vdsGroupCompatibilityVersion ) { java.lang.String soundDevice = org.ovirt.engine.core.bll.utils.VmDeviceUtils.osRepository.getSoundDevice ( vmBase.getOsId ( ) , vdsGroupCompatibilityVersion ) ; org.ovirt.engine.core.bll.utils.VmDeviceUtils.addManagedDevice ( new org.ovirt.engine.core.common.businessentities.VmDeviceId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , vmBase.getId ( ) ) , VmDeviceGeneralType.SOUND , org.ovirt.engine.core.common.utils.VmDeviceType.getSoundDeviceType ( soundDevice ) , new java.util.HashMap < java.lang.String , java.lang.Object > ( ) , true , true , null , false ) ; }

Target:
private static java.util.Map < java.lang.String , java.lang.Object > getVideoDeviceSpecParams ( org.ovirt.engine.core.common.businessentities.VmBase vmBase ) { return org.ovirt.engine.core.bll.utils.VmDeviceUtils.getVideoDeviceSpecParams ( vmBase.getNumOfMonitors ( ) , vmBase.getSingleQxlPci ( ) ) ; }
Source:
public static void getAllVnicProfiles ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VnicProfileView > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllVnicProfiles , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }

Target:
public static void getVmGuestAgentInterfacesByVmId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid vmId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmGuestAgentInterface > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVmGuestAgentInterfacesByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) , aQuery ) ; }
Source:
private org.ovirt.engine.api.model.GlusterBricks createModel ( ) { org.ovirt.engine.api.model.GlusterBricks bricks = new org.ovirt.engine.api.model.GlusterBricks ( ) ; org.ovirt.engine.api.model.GlusterBrick brick = new org.ovirt.engine.api.model.GlusterBrick ( ) ; brick.setId ( GUIDS [ 0 ] . toString ( ) ) ; brick.setGlusterVolume ( new org.ovirt.engine.api.model.GlusterVolume ( ) ) ; brick.getGlusterVolume ( ) . setId ( org.ovirt.engine.api.restapi.resource.gluster.BackendGlusterBricksResourceTest.volumeId.toString ( ) ) ; brick.setServerId ( org.ovirt.engine.api.restapi.resource.gluster.BackendGlusterBricksResourceTest.serverId.toString ( ) ) ; brick.setBrickDir ( org.ovirt.engine.api.restapi.resource.gluster.BackendGlusterBricksResourceTest.brickDir ) ; bricks.getGlusterBricks ( ) . add ( brick ) ; return bricks ; }

Target:
private org.ovirt.engine.api.model.GlusterBricks createModel ( ) { org.ovirt.engine.api.model.GlusterBricks bricks = new org.ovirt.engine.api.model.GlusterBricks ( ) ; org.ovirt.engine.api.model.GlusterBrick brick = new org.ovirt.engine.api.model.GlusterBrick ( ) ; brick.setId ( GUIDS [ 0 ] . toString ( ) ) ; brick.setGlusterVolume ( new org.ovirt.engine.api.model.GlusterVolume ( ) ) ; brick.getGlusterVolume ( ) . setId ( org.ovirt.engine.api.restapi.resource.gluster.GlusterTestHelper.volumeId.toString ( ) ) ; brick.setServerId ( org.ovirt.engine.api.restapi.resource.gluster.GlusterTestHelper.serverId.toString ( ) ) ; brick.setBrickDir ( org.ovirt.engine.api.restapi.resource.gluster.GlusterTestHelper.brickDir ) ; bricks.getGlusterBricks ( ) . add ( brick ) ; return bricks ; }
Source:
public void doParse_unhandledFieldTypeRecursion ( ) throws com.google.gwt.core.ext.UnableToCompleteException { java.util.Set < ? extends com.google.gwt.core.ext.typeinfo.JClassType > ownerTypeParentFieldTypeSubField1TypeFlattenedSupertypeHierarchy = java.util.Collections.singleton ( ownerTypeParentFieldTypeSubField1Type ) ; org.mockito.Mockito.doReturn ( ownerTypeParentFieldTypeSubField1TypeFlattenedSupertypeHierarchy ) . when ( ownerTypeParentFieldTypeSubField1Type ) . getFlattenedSupertypeHierarchy ( ) ; org.mockito.Mockito.when ( ownerTypeParentFieldTypeSubField1Type.getFields ( ) ) . thenReturn ( new com.google.gwt.core.ext.typeinfo.JField [ ] { ownerTypeParentField } ) ; tested.doParse ( ownerType , new java.util.ArrayList < com.google.gwt.core.ext.typeinfo.JClassType > ( ) , "." , "IdPrefix" ) ; }

Target:
public void doParse_unhandledFieldTypeRecursion ( ) { java.util.Set < ? extends com.google.gwt.core.ext.typeinfo.JClassType > ownerTypeParentFieldTypeSubField1TypeFlattenedSupertypeHierarchy = java.util.Collections.singleton ( ownerTypeParentFieldTypeSubField1Type ) ; org.mockito.Mockito.doReturn ( ownerTypeParentFieldTypeSubField1TypeFlattenedSupertypeHierarchy ) . when ( ownerTypeParentFieldTypeSubField1Type ) . getFlattenedSupertypeHierarchy ( ) ; org.mockito.Mockito.when ( ownerTypeParentFieldTypeSubField1Type.getFields ( ) ) . thenReturn ( new com.google.gwt.core.ext.typeinfo.JField [ ] { ownerTypeParentField } ) ; org.junit.jupiter.api.Assertions.assertThrows ( com.google.gwt.core.ext.UnableToCompleteException.class , ( ) -> tested.doParse ( ownerType , new org.ovirt.engine.ui.common.binding.ArrayList < > ( ) , "." , "IdPrefix" ) ) ; }
Source:
public org.ovirt.engine.core.common.action.VdcActionParametersBase getParameters ( org.ovirt.engine.api.model.NetworkAttachment incoming , org.ovirt.engine.api.model.NetworkAttachment entity ) { java.util.HashMap < java.lang.String , java.lang.String > actionConstraints = org.ovirt.engine.api.common.util.QueryHelper.getMatrixConstraints ( org.ovirt.engine.api.restapi.resource.AbstractBackendNetworkAttachmentResource.UpdateParametersProvider.getUriInfo ( ) , org.ovirt.engine.api.restapi.resource.AbstractBackendNetworkAttachmentResource.OVERRIDE_CONFIGURATION ) ; boolean syncAttachment = false ; if ( actionConstraints.containsKey ( org.ovirt.engine.api.restapi.resource.AbstractBackendNetworkAttachmentResource.OVERRIDE_CONFIGURATION ) ) { syncAttachment = java.lang.Boolean.parseBoolean ( actionConstraints.get ( org.ovirt.engine.api.restapi.resource.AbstractBackendNetworkAttachmentResource.OVERRIDE_CONFIGURATION ) ) ; } org.ovirt.engine.api.model.NetworkAttachment attachment = map ( incoming , entity ) ; attachment.setOverrideConfiguration ( syncAttachment ) ; org.ovirt.engine.core.common.action.NetworkAttachmentParameters params = new org.ovirt.engine.core.common.action.NetworkAttachmentParameters ( parent.getHostId ( ) , attachment ) ; return params ; }

Target:
public org.ovirt.engine.core.common.action.VdcActionParametersBase getParameters ( org.ovirt.engine.api.model.NetworkAttachment incoming , org.ovirt.engine.api.model.NetworkAttachment entity ) { boolean overrideConfiguration = org.ovirt.engine.api.common.util.ParametersHelper.getBooleanParameter ( httpHeaders , uriInfo , org.ovirt.engine.api.restapi.resource.AbstractBackendNetworkAttachmentResource.OVERRIDE_CONFIGURATION , true , false ) ; org.ovirt.engine.api.model.NetworkAttachment attachment = map ( incoming , entity ) ; attachment.setOverrideConfiguration ( overrideConfiguration ) ; org.ovirt.engine.core.common.action.NetworkAttachmentParameters params = new org.ovirt.engine.core.common.action.NetworkAttachmentParameters ( parent.getHostId ( ) , attachment ) ; return params ; }
Source:
protected org.ovirt.engine.core.compat.Guid getDataCenterId ( org.ovirt.engine.api.model.Network network ) { java.lang.String networkName = network.getDataCenter ( ) . getName ( ) ; return getEntity ( org.ovirt.engine.core.common.businessentities.StoragePool.class , VdcQueryType.GetStoragePoolByDatacenterName , new org.ovirt.engine.core.common.queries.NameQueryParameters ( networkName ) , ( "Datacenter: name=" + networkName ) ) . getId ( ) ; }

Target:
protected org.ovirt.engine.core.compat.Guid getDataCenterId ( org.ovirt.engine.api.model.Network network ) { java.lang.String networkName = network.getDataCenter ( ) . getName ( ) ; return getEntity ( org.ovirt.engine.core.common.businessentities.StoragePool.class , QueryType.GetStoragePoolByDatacenterName , new org.ovirt.engine.core.common.queries.NameQueryParameters ( networkName ) , ( "Datacenter: name=" + networkName ) ) . getId ( ) ; }
Source:
public void getGlusterHooks ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? source : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterHooks , new org.ovirt.engine.core.common.queries.gluster.GlusterParameters ( clusterId ) , aQuery ) ; }

Target:
public void getGlusterBricksForServer ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid serverId ) { 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.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterVolumeBricksByServerId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( serverId ) , aQuery ) ; }
Source:
public void executeCommand ( org.ovirt.engine.ui.uicommonweb.UICommand command ) { super . executeCommand ( command ) ; if ( command == ( getRemoveCommand ( ) ) ) { remove ( ) ; } else if ( org.ovirt.engine.core.compat.StringHelper.stringsEqual ( command.getName ( ) , "OnRemove" ) ) { OnRemove ( ) ; } else if ( org.ovirt.engine.core.compat.StringHelper.stringsEqual ( command.getName ( ) , "Cancel" ) ) { Cancel ( ) ; } }

Target:
public void executeCommand ( org.ovirt.engine.ui.uicommonweb.UICommand command ) { super . executeCommand ( command ) ; if ( command == ( getRemoveCommand ( ) ) ) { remove ( ) ; } else if ( org.ovirt.engine.core.compat.StringHelper.stringsEqual ( command.getName ( ) , "OnRemove" ) ) { onRemove ( ) ; } else if ( org.ovirt.engine.core.compat.StringHelper.stringsEqual ( command.getName ( ) , "Cancel" ) ) { cancel ( ) ; } }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { java.util.List < java.lang.String > pmOptions = ( ( java.util.ArrayList < java.lang.String > ) ( returnValue ) ) ; if ( pmOptions != null ) { getPmSecondaryPort ( ) . setIsAvailable ( pmOptions.contains ( org.ovirt.engine.ui.uicommonweb.models.hosts.HostModel.PmPortKey ) ) ; getPmSecondarySlot ( ) . setIsAvailable ( pmOptions.contains ( org.ovirt.engine.ui.uicommonweb.models.hosts.HostModel.PmSlotKey ) ) ; getPmSecondarySecure ( ) . setIsAvailable ( pmOptions.contains ( org.ovirt.engine.ui.uicommonweb.models.hosts.HostModel.PmSecureKey ) ) ; } }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object result ) { java.lang.String pk = ( ( java.lang.String ) ( result ) ) ; if ( ( pk != null ) && ( ( pk.length ( ) ) > 0 ) ) { getPublicKey ( ) . setEntity ( result ) ; } }
Source:
public java.lang.String getTemplate ( java.lang.String decoratorCollectionName , java.lang.String decoratorCollectionVariableName , java.lang.String publicCollecionName ) { org.ovirt.engine.sdk.codegen.utils.StringTemplateWrapper templateWrapper = new org.ovirt.engine.sdk.codegen.utils.StringTemplateWrapper ( getTemplate ( ) ) ; templateWrapper.set ( "decoratorCollectionName" , decoratorCollectionName ) ; templateWrapper.set ( "decoratorCollectionVariableName" , decoratorCollectionVariableName ) ; templateWrapper.set ( "publicCollecionName" , publicCollecionName ) ; return templateWrapper.toString ( ) ; }

Target:
public java.lang.String evaluate ( org.ovirt.engine.sdk.codegen.utils.Tree < org.ovirt.engine.sdk.codegen.rsdl.Location > collectionTree ) { java.lang.String brokerType = org.ovirt.engine.sdk.codegen.rsdl.BrokerRules.getBrokerType ( collectionTree ) ; java.lang.String collectionType = org.ovirt.engine.sdk.codegen.rsdl.SchemaRules.getSchemaType ( collectionTree ) ; java.lang.String fieldName = ( java.lang.Character.toLowerCase ( brokerType.charAt ( 0 ) ) ) + ( brokerType.substring ( 1 ) ) ; set ( "broker_type" , brokerType ) ; set ( "collection_type" , collectionType ) ; set ( "field_name" , fieldName ) ; return evaluate ( ) ; }
Source:
private static org.ovirt.engine.core.common.businessentities.StoragePool createLowerVersionStoragePool ( ) { org.ovirt.engine.core.common.businessentities.StoragePool pool = org.ovirt.engine.core.bll.storage.UpdateStoragePoolCommandTest.createBasicPool ( ) ; pool.setIsLocal ( true ) ; pool.setcompatibility_version ( org.ovirt.engine.core.bll.storage.UpdateStoragePoolCommandTest.VERSION_1_0 ) ; return pool ; }

Target:
private static java.util.List < org.ovirt.engine.core.common.businessentities.VDSGroup > createClusterList ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VDSGroup > clusters = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ( ) ; org.ovirt.engine.core.common.businessentities.VDSGroup cluster = new org.ovirt.engine.core.common.businessentities.VDSGroup ( ) ; cluster.setCompatibilityVersion ( org.ovirt.engine.core.bll.storage.UpdateStoragePoolCommandTest.VERSION_1_0 ) ; cluster.setName ( "firstCluster" ) ; clusters.add ( cluster ) ; return clusters ; }
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.GetAllVmSnapshotsByVmIdParameters ( id ) , 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:
public void getProviderCertificateChain ( 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 ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetProviderCertificateChain , new org.ovirt.engine.core.common.queries.ProviderQueryParameters ( provider ) , aQuery ) ; }

Target:
public void getAllProvidersByType ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.common.businessentities.ProviderType providerType ) { 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.Provider > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllProviders , new org.ovirt.engine.core.common.queries.GetAllProvidersParameters ( providerType ) , aQuery ) ; }
Source:
public void setInSlot ( java.lang.Object slot , com.google.gwt.user.client.ui.Widget content ) { if ( slot == ( org.ovirt.engine.ui.userportal.section.main.presenter.MainSectionPresenter.TYPE_SetHeader ) ) { setPanelContent ( headerPanel , content ) ; } else if ( slot == ( org.ovirt.engine.ui.userportal.section.main.presenter.MainSectionPresenter.TYPE_SetMainContent ) ) { setPanelContent ( mainContentPanel , content ) ; } else { super . setInSlot ( slot , content ) ; } }

Target:
public void setInSlot ( java.lang.Object slot , com.google.gwt.user.client.ui.IsWidget content ) { if ( slot == ( org.ovirt.engine.ui.userportal.section.main.presenter.MainSectionPresenter.TYPE_SetHeader ) ) { setPanelContent ( headerPanel , content ) ; } else if ( slot == ( org.ovirt.engine.ui.userportal.section.main.presenter.MainSectionPresenter.TYPE_SetMainContent ) ) { setPanelContent ( mainContentPanel , content ) ; } else { super . setInSlot ( slot , content ) ; } }
Source:
public static org.ovirt.engine.api.model.User map ( org.ovirt.engine.core.aaa.DirectoryUser entity , org.ovirt.engine.api.model.User template ) { org.ovirt.engine.api.model.User model = ( template != null ) ? template : new org.ovirt.engine.api.model.User ( ) ; model.setName ( entity.getFirstName ( ) ) ; model.setUserName ( ( ( ( entity.getName ( ) ) + "@" ) + ( entity.getDirectoryName ( ) ) ) ) ; model.setId ( org.ovirt.engine.api.restapi.utils.DirectoryEntryIdUtils.encode ( entity.getId ( ) ) ) ; model.setLastName ( entity.getLastName ( ) ) ; model.setEmail ( entity.getEmail ( ) ) ; model.setDepartment ( entity.getDepartment ( ) ) ; model.setNamespace ( entity.getNamespace ( ) ) ; if ( ( entity.getGroups ( ) ) != null ) { model.setGroups ( new org.ovirt.engine.api.model.Groups ( ) ) ; for ( org.ovirt.engine.core.aaa.DirectoryGroup directoryGroup : entity.getGroups ( ) ) { org.ovirt.engine.api.model.Group group = new org.ovirt.engine.api.model.Group ( ) ; group.setName ( directoryGroup.getName ( ) ) ; model.getGroups ( ) . getGroups ( ) . add ( group ) ; } } if ( ! ( org.apache.commons.lang.StringUtils.isEmpty ( entity.getDirectoryName ( ) ) ) ) { org.ovirt.engine.api.model.Domain dom = new org.ovirt.engine.api.model.Domain ( ) ; dom.setId ( new org.ovirt.engine.core.compat.Guid ( entity.getDirectoryName ( ) . getBytes ( java.nio.charset.Charset.forName ( "UTF-8" ) ) , true ) . toString ( ) ) ; model.setDomain ( dom ) ; } return model ; }

Target:
public static org.ovirt.engine.api.model.User map ( org.ovirt.engine.core.aaa.DirectoryUser entity , org.ovirt.engine.api.model.User template ) { org.ovirt.engine.api.model.User model = ( template != null ) ? template : new org.ovirt.engine.api.model.User ( ) ; model.setName ( entity.getFirstName ( ) ) ; model.setUserName ( ( ( ( entity.getName ( ) ) + "@" ) + ( entity.getDirectoryName ( ) ) ) ) ; model.setId ( org.ovirt.engine.api.restapi.utils.DirectoryEntryIdUtils.encode ( entity.getId ( ) ) ) ; model.setLastName ( entity.getLastName ( ) ) ; model.setEmail ( entity.getEmail ( ) ) ; model.setDepartment ( entity.getDepartment ( ) ) ; model.setPrincipal ( entity.getPrincipal ( ) ) ; model.setNamespace ( entity.getNamespace ( ) ) ; if ( ( entity.getGroups ( ) ) != null ) { model.setGroups ( new org.ovirt.engine.api.model.Groups ( ) ) ; for ( org.ovirt.engine.core.aaa.DirectoryGroup directoryGroup : entity.getGroups ( ) ) { org.ovirt.engine.api.model.Group group = new org.ovirt.engine.api.model.Group ( ) ; group.setName ( directoryGroup.getName ( ) ) ; model.getGroups ( ) . getGroups ( ) . add ( group ) ; } } if ( ! ( org.apache.commons.lang.StringUtils.isEmpty ( entity.getDirectoryName ( ) ) ) ) { org.ovirt.engine.api.model.Domain dom = new org.ovirt.engine.api.model.Domain ( ) ; dom.setId ( new org.ovirt.engine.core.compat.Guid ( entity.getDirectoryName ( ) . getBytes ( java.nio.charset.Charset.forName ( "UTF-8" ) ) , true ) . toString ( ) ) ; model.setDomain ( dom ) ; } return model ; }
Source:
org.ovirt.engine.core.common.businessentities.VM getCachedVm ( ) { if ( ( cachedVm ) == null ) { org.ovirt.engine.core.common.queries.IdQueryParameters params = new org.ovirt.engine.core.common.queries.IdQueryParameters ( org.ovirt.engine.core.bll.ConfigureConsoleOptionsQuery.getParameters ( ) . getOptions ( ) . getVmId ( ) ) ; params.setFiltered ( org.ovirt.engine.core.bll.ConfigureConsoleOptionsQuery.getParameters ( ) . isFiltered ( ) ) ; params.setSessionId ( org.ovirt.engine.core.bll.ConfigureConsoleOptionsQuery.getParameters ( ) . getSessionId ( ) ) ; cachedVm = backend.runInternalQuery ( VdcQueryType.GetVmByVmId , params ) . getReturnValue ( ) ; } return cachedVm ; }

Target:
org.ovirt.engine.core.common.businessentities.VM getCachedVm ( ) { if ( ( cachedVm ) == null ) { org.ovirt.engine.core.common.queries.IdQueryParameters params = new org.ovirt.engine.core.common.queries.IdQueryParameters ( org.ovirt.engine.core.bll.ConfigureConsoleOptionsQuery.getParameters ( ) . getOptions ( ) . getVmId ( ) ) ; params.setFiltered ( org.ovirt.engine.core.bll.ConfigureConsoleOptionsQuery.getParameters ( ) . isFiltered ( ) ) ; params.setSessionId ( org.ovirt.engine.core.bll.ConfigureConsoleOptionsQuery.getParameters ( ) . getSessionId ( ) ) ; cachedVm = backend.runInternalQuery ( QueryType.GetVmByVmId , params ) . getReturnValue ( ) ; } return cachedVm ; }
Source:
public static void getHostList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getHostListByStatus ( aQuery , null ) ; }

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 void testUpdate ( ) throws java.lang.Exception { setUpGetGraphicsExpectations ( 1 ) ; setUpUpdateExpectations ( ) ; setUpGetBallooningExpectations ( ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.UpdateVmTemplate , org.ovirt.engine.core.common.action.UpdateVmTemplateParameters.class , new java.lang.String [ ] { } , new java.lang.Object [ ] { } , true , true ) ) ; verifyModel ( resource.update ( getRestModel ( 0 ) ) , 0 ) ; }

Target:
public void testUpdate ( ) throws java.lang.Exception { setUpGetGraphicsExpectations ( 1 ) ; setUpUpdateExpectations ( ) ; setUpGetBallooningExpectations ( ) ; setUriInfo ( setUpActionExpectations ( ActionType.UpdateVmTemplate , org.ovirt.engine.core.common.action.UpdateVmTemplateParameters.class , new java.lang.String [ ] { } , new java.lang.Object [ ] { } , true , true ) ) ; verifyModel ( resource.update ( getRestModel ( 0 ) ) , 0 ) ; }