auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
protected void UpdateActionAvailability ( ) { super . UpdateActionAvailability ( ) ; getConnectCommand ( ) . setIsExecutionAllowed ( ( ( ( ( getEntity ( ) ) != null ) && ( ( ( getEntity ( ) . getstatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.Up ) ) || ( ( getEntity ( ) . getstatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.PoweringDown ) ) ) ) && ( org.ovirt.engine.ui.uicommonweb.DataProvider.IsWindowsOsType ( getEntity ( ) . getvm_os ( ) ) ) ) ) ; }

Target:
protected void UpdateActionAvailability ( ) { super . UpdateActionAvailability ( ) ; getConnectCommand ( ) . setIsExecutionAllowed ( ( ( ( ( ( getEntity ( ) ) != null ) && ( ( ( getEntity ( ) . getstatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.Up ) ) || ( ( getEntity ( ) . getstatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.PoweringDown ) ) ) ) && ( org.ovirt.engine.ui.uicommonweb.DataProvider.IsWindowsOsType ( getEntity ( ) . getvm_os ( ) ) ) ) && ( getConfigurator ( ) . isClientWindownsExplorer ( ) ) ) ) ; }
Source:
protected boolean isRoleNetwork ( ) { return ( ( getNetworkCluster ( ) . isDisplay ( ) ) || ( getNetworkCluster ( ) . isMigration ( ) ) ) || ( getNetworkCluster ( ) . isGluster ( ) ) ; }

Target:
private boolean validBootProtocolForRoleNetwork ( ) { if ( ! ( org.ovirt.engine.core.utils.NetworkUtils.isRoleNetwork ( getNetworkCluster ( ) ) ) ) { return true ; } org.ovirt.engine.core.common.businessentities.network.IpConfiguration ipConfiguration = attachment.getIpConfiguration ( ) ; if ( ipConfiguration == null ) { return false ; } if ( getNetworkCluster ( ) . isMigration ( ) ) { return hasBootProtocol ( ipConfiguration ) ; } return hasIpv4BootProtocol ( ipConfiguration ) ; }
Source:
private org.ovirt.engine.core.common.action.RemoveCinderDiskParameters buildChildCommandParameters ( org.ovirt.engine.core.common.businessentities.storage.CinderDisk cinderDisk ) { org.ovirt.engine.core.common.action.RemoveCinderDiskParameters removeDiskParams = new org.ovirt.engine.core.common.action.RemoveCinderDiskParameters ( cinderDisk.getId ( ) ) ; removeDiskParams.setParentCommand ( org.ovirt.engine.core.bll.storage.disk.cinder.RemoveAllVmCinderDisksCommand.getActionType ( ) ) ; removeDiskParams.setParentParameters ( org.ovirt.engine.core.bll.storage.disk.cinder.RemoveAllVmCinderDisksCommand.getParameters ( ) ) ; removeDiskParams.setShouldBeLogged ( false ) ; return removeDiskParams ; }

Target:
private org.ovirt.engine.core.common.action.RemoveCinderDiskParameters buildChildCommandParameters ( org.ovirt.engine.core.common.businessentities.storage.CinderDisk cinderDisk ) { org.ovirt.engine.core.common.action.RemoveCinderDiskParameters removeDiskParams = new org.ovirt.engine.core.common.action.RemoveCinderDiskParameters ( cinderDisk.getId ( ) ) ; removeDiskParams.setParentCommand ( org.ovirt.engine.core.bll.storage.disk.cinder.RemoveAllVmCinderDisksCommand.getActionType ( ) ) ; removeDiskParams.setParentParameters ( org.ovirt.engine.core.bll.storage.disk.cinder.RemoveAllVmCinderDisksCommand.getParameters ( ) ) ; removeDiskParams.setShouldBeLogged ( false ) ; removeDiskParams.setShouldBeEndedByParent ( false ) ; return removeDiskParams ; }
Source:
protected boolean canDoAction ( ) { org.ovirt.engine.core.bll.validator.NetworkValidator validator = new org.ovirt.engine.core.bll.validator.NetworkValidator ( vmDao , getNetwork ( ) ) ; return ( ( validate ( validator.networkIsSet ( ) ) ) && ( validate ( validator.notLabeled ( ) ) ) ) && ( validate ( validator.notExternalNetwork ( ) ) ) ; }

Target:
protected boolean validate ( ) { org.ovirt.engine.core.bll.validator.NetworkValidator validator = new org.ovirt.engine.core.bll.validator.NetworkValidator ( vmDao , getNetwork ( ) ) ; return ( ( validate ( validator.networkIsSet ( org.ovirt.engine.core.bll.network.dc.LabelNetworkCommand.getParameters ( ) . getNetworkId ( ) ) ) ) && ( validate ( validator.notLabeled ( ) ) ) ) && ( validate ( validator.notExternalNetwork ( ) ) ) ; }
Source:
private void endVmTemplateRelatedOps ( ) { if ( ( org.ovirt.engine.core.bll.MoveOrCopyTemplateCommand.getVmTemplate ( ) ) != null ) { org.ovirt.engine.core.bll.VmTemplateHandler.UnLockVmTemplate ( org.ovirt.engine.core.bll.MoveOrCopyTemplateCommand.getVmTemplateId ( ) ) ; org.ovirt.engine.core.bll.utils.VmDeviceUtils.setVmDevices ( org.ovirt.engine.core.bll.MoveOrCopyTemplateCommand.getVmTemplate ( ) ) ; UpdateTemplateInSpm ( ) ; } else { org.ovirt.engine.core.bll.MoveOrCopyTemplateCommand.setCommandShouldBeLogged ( false ) ; log.warn ( "MoveOrCopyTemplateCommand::EndMoveOrCopyCommand: VmTemplate is null, not performing full EndAction" ) ; } }

Target:
private void endVmTemplateRelatedOps ( ) { if ( ( org.ovirt.engine.core.bll.MoveOrCopyTemplateCommand.getVmTemplate ( ) ) != null ) { org.ovirt.engine.core.bll.VmTemplateHandler.UnLockVmTemplate ( org.ovirt.engine.core.bll.MoveOrCopyTemplateCommand.getVmTemplateId ( ) ) ; org.ovirt.engine.core.bll.utils.VmDeviceUtils.setVmDevices ( org.ovirt.engine.core.bll.MoveOrCopyTemplateCommand.getVmTemplate ( ) ) ; updateTemplateInSpm ( ) ; } else { org.ovirt.engine.core.bll.MoveOrCopyTemplateCommand.setCommandShouldBeLogged ( false ) ; log.warn ( "MoveOrCopyTemplateCommand::EndMoveOrCopyCommand: VmTemplate is null, not performing full EndAction" ) ; } }
Source:
private java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > mockAllImages ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > images = mockImages ( ) ; org.ovirt.engine.core.common.businessentities.storage.DiskImage image3 = new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ; image3.setImageId ( org.ovirt.engine.core.bll.snapshots.RemoveDiskSnapshotsCommandTest.IMAGE_ID_3 ) ; image3.setStorageIds ( new java.util.ArrayList ( java.util.Arrays.asList ( org.ovirt.engine.core.bll.snapshots.RemoveDiskSnapshotsCommandTest.STORAGE_DOMAIN_ID ) ) ) ; images.add ( image3 ) ; return images ; }

Target:
private java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > mockAllImages ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > images = mockImages ( ) ; org.ovirt.engine.core.common.businessentities.storage.DiskImage image3 = new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ; image3.setImageId ( org.ovirt.engine.core.bll.snapshots.RemoveDiskSnapshotsCommandTest.IMAGE_ID_3 ) ; image3.setStorageIds ( new java.util.ArrayList ( java.util.Collections.singletonList ( org.ovirt.engine.core.bll.snapshots.RemoveDiskSnapshotsCommandTest.STORAGE_DOMAIN_ID ) ) ) ; images.add ( image3 ) ; return images ; }
Source:
public void log ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase auditLogable , org.ovirt.engine.core.common.AuditLogType logType , java.lang.String loggerString ) { if ( ! ( logType.shouldBeLogged ( ) ) ) { return ; } org.ovirt.engine.core.dal.dbbroker.auditloghandling.EventFloodRegulator eventFloodRegulator = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.EventFloodRegulator ( auditLogable , logType ) ; eventFloodRegulator.updateTimeoutLogableObject ( ) ; if ( eventFloodRegulator.isLegal ( ) ) { saveToDb ( auditLogable , logType , loggerString ) ; } }

Target:
public void log ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogable auditLogable , org.ovirt.engine.core.common.AuditLogType logType , java.lang.String loggerString ) { if ( ! ( logType.shouldBeLogged ( ) ) ) { return ; } org.ovirt.engine.core.dal.dbbroker.auditloghandling.EventFloodRegulator eventFloodRegulator = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.EventFloodRegulator ( auditLogable , logType ) ; eventFloodRegulator.updateTimeoutLogableObject ( ) ; if ( eventFloodRegulator.isLegal ( ) ) { saveToDb ( auditLogable , logType , loggerString ) ; } }
Source:
public void correlationIdTooLong ( ) { org.ovirt.engine.core.common.action.ActionParametersBase parameters = new org.ovirt.engine.core.common.action.ActionParametersBase ( ) ; parameters.setCorrelationId ( org.apache.commons.lang.StringUtils.leftPad ( "" , ( ( org.ovirt.engine.core.common.businessentities.BusinessEntitiesDefinitions.CORRELATION_ID_SIZE ) + 1 ) , "A" ) ) ; org.ovirt.engine.core.common.action.VdcReturnValueBase result = org.ovirt.engine.core.bll.job.ExecutionHandler.evaluateCorrelationId ( parameters ) ; org.junit.Assert.assertNotNull ( "Correlation id exceeds max size" , result ) ; org.junit.Assert.assertFalse ( "Correlation id exceeds max size" , result.getSucceeded ( ) ) ; }

Target:
public void correlationIdTooLong ( ) { org.ovirt.engine.core.common.action.ActionParametersBase parameters = new org.ovirt.engine.core.common.action.ActionParametersBase ( ) ; parameters.setCorrelationId ( org.apache.commons.lang.StringUtils.leftPad ( "" , ( ( org.ovirt.engine.core.common.businessentities.BusinessEntitiesDefinitions.CORRELATION_ID_SIZE ) + 1 ) , "A" ) ) ; org.ovirt.engine.core.common.action.ActionReturnValue result = org.ovirt.engine.core.bll.job.ExecutionHandler.evaluateCorrelationId ( parameters ) ; org.junit.Assert.assertNotNull ( "Correlation id exceeds max size" , result ) ; org.junit.Assert.assertFalse ( "Correlation id exceeds max size" , result.getSucceeded ( ) ) ; }
Source:
private void assertTestNotRemovingLabeledNetworksValid ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nic , org.ovirt.engine.core.common.businessentities.network.NetworkAttachment removedAttachment , org.ovirt.engine.core.common.action.HostSetupNetworksParameters params , org.ovirt.engine.core.common.businessentities.network.Network network ) { org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidator validator = new org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidatorTest.HostSetupNetworksValidatorBuilder ( ) . setParams ( params ) . addExistingInterfaces ( nic ) . addNetworks ( network ) . build ( ) ; org.junit.Assert.assertThat ( validator.notRemovingLabeledNetworks ( removedAttachment ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }

Target:
private void assertTestNotRemovingLabeledNetworksValid ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nic , org.ovirt.engine.core.common.businessentities.network.NetworkAttachment removedAttachment , org.ovirt.engine.core.common.action.HostSetupNetworksParameters params , org.ovirt.engine.core.common.businessentities.network.Network network ) { org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidator validator = new org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidatorTest.HostSetupNetworksValidatorBuilder ( ) . setParams ( params ) . addExistingInterfaces ( nic ) . addNetworks ( network ) . build ( ) ; org.hamcrest.MatcherAssert.assertThat ( validator.notRemovingLabeledNetworks ( removedAttachment ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }
Source:
public java.util.Map < java.lang.String , java.lang.String > getJobMessageProperties ( ) { if ( ( jobProperties ) == null ) { jobProperties = super . getJobMessageProperties ( ) ; jobProperties.put ( VdcObjectType.Snapshot.name ( ) . toLowerCase ( ) , getParameters ( ) . getDescription ( ) ) ; } return jobProperties ; }

Target:
public java.util.Map < java.lang.String , java.lang.String > getJobMessageProperties ( ) { if ( ( jobProperties ) == null ) { jobProperties = super . getJobMessageProperties ( ) ; jobProperties.put ( VdcObjectType.Snapshot.name ( ) . toLowerCase ( ) , org.ovirt.engine.core.bll.snapshots.CreateAllSnapshotsFromVmCommand.getParameters ( ) . getDescription ( ) ) ; } return jobProperties ; }
Source:
private boolean isHeadlessModeChanged ( org.ovirt.engine.core.common.businessentities.VM source , org.ovirt.engine.core.common.action.VmManagementParametersBase updateVmParameters ) { return ( ( source.getDefaultDisplayType ( ) ) != ( updateVmParameters.getVmStaticData ( ) . getDefaultDisplayType ( ) ) ) && ( ( ( source.getDefaultDisplayType ( ) ) == ( org.ovirt.engine.core.common.businessentities.DisplayType.none ) ) || ( ( updateVmParameters.getVmStaticData ( ) . getDefaultDisplayType ( ) ) == ( org.ovirt.engine.core.common.businessentities.DisplayType.none ) ) ) ; }

Target:
private void updateHaMaintenanceAvailability ( java.util.List items ) { if ( ( items == null ) || ( ( items.size ( ) ) != 1 ) ) { setHaMaintenanceAvailability ( false ) ; return ; } org.ovirt.engine.core.common.businessentities.VM vm = org.ovirt.engine.ui.uicommonweb.models.vms.VmListModel.getSelectedItem ( ) ; if ( ( vm == null ) || ( ! ( vm.isHostedEngine ( ) ) ) ) { setHaMaintenanceAvailability ( false ) ; } else { setHaMaintenanceAvailability ( true ) ; } }
Source:
private org.ovirt.engine.core.common.queries.VdcQueryReturnValue generateDescriptorResponse ( ) throws java.lang.Exception { org.ovirt.engine.api.model.GraphicsType graphicsType = org.ovirt.engine.api.restapi.resource.BackendGraphicsConsoleHelper.asGraphicsType ( consoleId ) ; org.ovirt.engine.core.common.console.ConsoleOptions consoleOptions = new org.ovirt.engine.core.common.console.ConsoleOptions ( graphicsType ) ; consoleOptions.setVmId ( guid ) ; org.ovirt.engine.core.common.queries.VdcQueryReturnValue configuredOptionsReturnValue = runQuery ( VdcQueryType.ConfigureConsoleOptions , new org.ovirt.engine.core.common.queries.ConfigureConsoleOptionsParams ( consoleOptions , true ) ) ; if ( ! ( configuredOptionsReturnValue.getSucceeded ( ) ) ) { throw new java.lang.Exception ( configuredOptionsReturnValue.getExceptionString ( ) ) ; } return runQuery ( VdcQueryType.GetConsoleDescriptorFile , new org.ovirt.engine.core.common.queries.ConsoleOptionsParams ( configuredOptionsReturnValue.getReturnValue ( ) ) ) ; }

Target:
private org.ovirt.engine.core.common.queries.VdcQueryReturnValue generateDescriptorResponse ( ) throws java.lang.Exception { org.ovirt.engine.api.model.GraphicsType graphicsType = org.ovirt.engine.api.restapi.resource.BackendGraphicsConsoleHelper.asGraphicsType ( consoleId ) ; org.ovirt.engine.core.common.console.ConsoleOptions consoleOptions = new org.ovirt.engine.core.common.console.ConsoleOptions ( graphicsType ) ; consoleOptions.setVmId ( guid ) ; org.ovirt.engine.core.common.queries.VdcQueryReturnValue configuredOptionsReturnValue = runQuery ( QueryType.ConfigureConsoleOptions , new org.ovirt.engine.core.common.queries.ConfigureConsoleOptionsParams ( consoleOptions , true ) ) ; if ( ! ( configuredOptionsReturnValue.getSucceeded ( ) ) ) { throw new java.lang.Exception ( configuredOptionsReturnValue.getExceptionString ( ) ) ; } return runQuery ( QueryType.GetConsoleDescriptorFile , new org.ovirt.engine.core.common.queries.ConsoleOptionsParams ( configuredOptionsReturnValue.getReturnValue ( ) ) ) ; }
Source:
public static void getHostListByDataCenter ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid spId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > list = org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.VDS > cast ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.IVdcQueryable > ) ( source ) ) ) ; return list ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllVdsByStoragePool , new org.ovirt.engine.core.common.queries.IdQueryParameters ( spId ) , 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 perform ( ) { if ( ( this . manager.isMonitoringNeeded ( ) ) && ( getRefreshStatistics ( ) ) ) { org.ovirt.engine.core.vdsbroker.VmsListFetcher fetcher = new org.ovirt.engine.core.vdsbroker.VmsStatisticsFetcher ( this . manager ) ; fetcher.fetch ( ) ; new org.ovirt.engine.core.vdsbroker.VmsMonitoring ( this . manager , fetcher.getChangedVms ( ) , fetcher.getVmsWithChangedDevices ( ) , this . auditLogDirector , java.lang.System.nanoTime ( ) ) . perform ( ) ; } }

Target:
public void perform ( ) { if ( ( this . manager.isMonitoringNeeded ( ) ) && ( getRefreshStatistics ( ) ) ) { org.ovirt.engine.core.vdsbroker.VmsListFetcher fetcher = new org.ovirt.engine.core.vdsbroker.VmsStatisticsFetcher ( this . manager ) ; long fetchTime = java.lang.System.nanoTime ( ) ; fetcher.fetch ( ) ; new org.ovirt.engine.core.vdsbroker.VmsMonitoring ( this . manager , fetcher.getChangedVms ( ) , fetcher.getVmsWithChangedDevices ( ) , this . auditLogDirector , fetchTime ) . perform ( ) ; } }
Source:
public void testGetByName ( ) { org.ovirt.engine.core.common.businessentities.VdsStatic result = dao.get ( existingVds.getvds_name ( ) ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertEquals ( existingVds.getvds_name ( ) , result.getvds_name ( ) ) ; }

Target:
public void testGetAllForHost ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VdsStatic > result = dao.getAllForHost ( existingVds.getHostName ( ) ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertFalse ( result.isEmpty ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.VdsStatic vds : result ) { org.junit.Assert.assertEquals ( existingVds.getHostName ( ) , vds.getHostName ( ) ) ; } }
Source:
protected void doTestBadRemove ( boolean valid , boolean success , java.lang.String detail ) throws java.lang.Exception { setUpGetEntityExpectations ( 1 ) ; setUpGetGraphicsExpectations ( 1 ) ; setUpGetBallooningExpectations ( ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.RemoveVmTemplate , org.ovirt.engine.core.common.action.VmTemplateParametersBase.class , new java.lang.String [ ] { "VmTemplateId" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , valid , success ) ) ; try { resource.remove ( ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , detail ) ; } }

Target:
protected void doTestBadRemove ( boolean valid , boolean success , java.lang.String detail ) throws java.lang.Exception { setUpGetEntityExpectations ( 1 ) ; setUpGetGraphicsExpectations ( 1 ) ; setUpGetBallooningExpectations ( ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.RemoveVmTemplate , org.ovirt.engine.core.common.action.VmTemplateManagementParameters.class , new java.lang.String [ ] { "VmTemplateId" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , valid , success ) ) ; try { resource.remove ( ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , detail ) ; } }
Source:
public void testList ( ) throws java.lang.Exception { }

Target:
public void testListFailure ( ) throws java.lang.Exception { javax.ws.rs.core.UriInfo uriInfo = setUpUriExpectations ( null ) ; setUpQueryExpectations ( org.ovirt.engine.api.restapi.resource.BackendGroupsResourceTest.QUERY , org.ovirt.engine.api.restapi.resource.FAILURE ) ; collection.setUriInfo ( uriInfo ) ; try { getCollection ( ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { assertTrue ( ( ( wae.getResponse ( ) . getEntity ( ) ) instanceof org.ovirt.engine.api.model.Fault ) ) ; assertEquals ( mockl10n ( org.ovirt.engine.api.restapi.resource.FAILURE ) , ( ( org.ovirt.engine.api.model.Fault ) ( wae.getResponse ( ) . getEntity ( ) ) ) . getDetail ( ) ) ; } }
Source:
public org.ovirt.engine.core.common.businessentities.VdsStatic getByVdsName ( java.lang.String vdsName ) { return singleResult ( entityManager.createNamedQuery ( "VdsStatic.getByVdsName" , org.ovirt.engine.core.common.businessentities.VdsStatic.class ) . setParameter ( "name" , vdsName ) ) ; }

Target:
public void save ( org.ovirt.engine.core.common.businessentities.VdsStatic vds ) { org.ovirt.engine.core.compat.Guid id = vds.getId ( ) ; if ( org.ovirt.engine.core.compat.Guid.isNullOrEmpty ( id ) ) { id = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; vds.setId ( id ) ; } new org.springframework.jdbc.core.simple.SimpleJdbcCall ( getJdbcTemplate ( ) ) . withProcedureName ( "InsertVdsStatic" ) . execute ( getInsertOrUpdateParams ( vds ) ) ; }
Source:
protected void executeQueryCommand ( ) { boolean succeeded = true ; if ( org.ovirt.engine.core.bll.aaa.SessionDataContainer.getInstance ( ) . isSessionExists ( org.ovirt.engine.core.bll.aaa.GetValueBySessionQuery.getParameters ( ) . getSessionId ( ) ) ) { setReturnValue ( org.ovirt.engine.core.bll.aaa.SessionDataContainer.getInstance ( ) . getData ( org.ovirt.engine.core.bll.aaa.GetValueBySessionQuery.getParameters ( ) . getSessionId ( ) , org.ovirt.engine.core.bll.aaa.GetValueBySessionQuery.getParameters ( ) . getKey ( ) , false ) ) ; } else { succeeded = false ; } org.ovirt.engine.core.bll.aaa.GetValueBySessionQuery.getQueryReturnValue ( ) . setSucceeded ( succeeded ) ; }

Target:
protected void executeQueryCommand ( ) { boolean succeeded = true ; if ( org.ovirt.engine.core.bll.aaa.SessionDataContainer.getInstance ( ) . isSessionExists ( org.ovirt.engine.core.bll.aaa.GetDbUserBySessionQuery.getParameters ( ) . getSessionId ( ) ) ) { setReturnValue ( org.ovirt.engine.core.bll.aaa.SessionDataContainer.getInstance ( ) . getUser ( org.ovirt.engine.core.bll.aaa.GetDbUserBySessionQuery.getParameters ( ) . getSessionId ( ) , false ) ) ; } else { succeeded = false ; } org.ovirt.engine.core.bll.aaa.GetDbUserBySessionQuery.getQueryReturnValue ( ) . setSucceeded ( succeeded ) ; }
Source:
static void verifyModelWithIso ( org.ovirt.engine.api.model.CdRom model , java.lang.String isoPath ) { assertEquals ( Guid.Empty.toString ( ) , model.getId ( ) ) ; assertTrue ( model.isSetVm ( ) ) ; assertEquals ( org.ovirt.engine.api.restapi.resource.AbstractBackendCdRomsResourceTest.PARENT_ID.toString ( ) , model.getVm ( ) . getId ( ) ) ; assertTrue ( model.isSetFile ( ) ) ; assertEquals ( isoPath , model.getFile ( ) . getId ( ) ) ; }

Target:
static void verifyModelWithIso ( org.ovirt.engine.api.model.Cdrom model , java.lang.String isoPath ) { assertEquals ( Guid.Empty.toString ( ) , model.getId ( ) ) ; assertTrue ( model.isSetVm ( ) ) ; assertEquals ( org.ovirt.engine.api.restapi.resource.AbstractBackendCdRomsResourceTest.PARENT_ID.toString ( ) , model.getVm ( ) . getId ( ) ) ; assertTrue ( model.isSetFile ( ) ) ; assertEquals ( isoPath , model.getFile ( ) . getId ( ) ) ; }
Source:
public org.ovirt.engine.core.bll.ValidationResult bootProtocolSetForDisplayNetwork ( ) { org.ovirt.engine.core.common.businessentities.network.IpConfiguration ipConfiguration = attachment.getIpConfiguration ( ) ; boolean failWhen = ( getNetworkCluster ( ) . isDisplay ( ) ) && ( ( ( ipConfiguration == null ) || ( ! ( ipConfiguration.hasPrimaryAddressSet ( ) ) ) ) || ( ( ipConfiguration.getPrimaryAddress ( ) . getBootProtocol ( ) ) == ( org.ovirt.engine.core.common.businessentities.network.NetworkBootProtocol.NONE ) ) ) ; return org.ovirt.engine.core.bll.ValidationResult.failWith ( EngineMessage.ACTION_TYPE_FAILED_DISPLAY_NETWORK_HAS_NO_BOOT_PROTOCOL , org.ovirt.engine.core.utils.ReplacementUtils.createSetVariableString ( org.ovirt.engine.core.bll.validator.NetworkAttachmentValidator.VAR_ACTION_TYPE_FAILED_DISPLAY_NETWORK_HAS_NO_BOOT_PROTOCOL_ENTITY , getNetwork ( ) . getName ( ) ) ) . when ( failWhen ) ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult bootProtocolSetForRoleNetwork ( ) { org.ovirt.engine.core.common.businessentities.network.IpConfiguration ipConfiguration = attachment.getIpConfiguration ( ) ; boolean failWhen = ( isRoleNetwork ( ) ) && ( ( ( ipConfiguration == null ) || ( ! ( ipConfiguration.hasPrimaryAddressSet ( ) ) ) ) || ( ( ipConfiguration.getPrimaryAddress ( ) . getBootProtocol ( ) ) == ( org.ovirt.engine.core.common.businessentities.network.NetworkBootProtocol.NONE ) ) ) ; return org.ovirt.engine.core.bll.ValidationResult.failWith ( EngineMessage.ACTION_TYPE_FAILED_ROLE_NETWORK_HAS_NO_BOOT_PROTOCOL , org.ovirt.engine.core.utils.ReplacementUtils.createSetVariableString ( org.ovirt.engine.core.bll.validator.NetworkAttachmentValidator.VAR_ACTION_TYPE_FAILED_ROLE_NETWORK_HAS_NO_BOOT_PROTOCOL_ENTITY , getNetwork ( ) . getName ( ) ) ) . when ( failWhen ) ; }
Source:
public static void getoVirtISOsList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? new java.util.ArrayList < org.ovirt.engine.core.compat.RpmVersion > ( ( ( java.util.ArrayList < org.ovirt.engine.core.compat.RpmVersion > ) ( source ) ) ) : new java.util.ArrayList < org.ovirt.engine.core.compat.RpmVersion > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetoVirtISOs , new org.ovirt.engine.core.common.queries.VdsIdParametersBase ( id ) , aQuery ) ; }

Target:
public void 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 void removeAll ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > interfaces = java.util.Arrays.asList ( createNewInterface ( ) , createNewInterface ( ) ) ; org.mockito.Mockito.when ( vmNetworkInterfaceDAO.getAllForVm ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( interfaces ) ; vmInterfaceManager.removeAll ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface iface : interfaces ) { verifyRemoveAllDelegatedCorrectly ( iface ) ; } }

Target:
public void removeAll ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.VmNic > interfaces = java.util.Arrays.asList ( createNewInterface ( ) , createNewInterface ( ) ) ; org.mockito.Mockito.when ( vmNicDao.getAllForVm ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( interfaces ) ; vmInterfaceManager.removeAll ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.network.VmNic iface : interfaces ) { verifyRemoveAllDelegatedCorrectly ( iface ) ; } }
Source:
public org.ovirt.engine.core.vdsbroker.irsbroker.OneUuidReturnForXmlRpc createVG ( java.lang.String sdUUID , java.lang.String [ ] deviceList ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.createVG ( sdUUID , deviceList ) ; org.ovirt.engine.core.vdsbroker.irsbroker.OneUuidReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.irsbroker.OneUuidReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.OneMapReturnForXmlRpc get_image_transfer_session_stats ( java.lang.String ticketId ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.get_image_transfer_session_stats ( ticketId ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.OneMapReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.OneMapReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
Source:
public void vdsGroupWithVirtGlusterNotSupported ( ) { createCommandWithGlusterEnabled ( ) ; org.mockito.Mockito.when ( vdsGroupDAO.get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( org.ovirt.engine.core.bll.UpdateVdsGroupCommandTest.createVdsGroupWithNoCpuName ( ) ) ; org.mockito.Mockito.when ( vdsGroupDAO.getByName ( org.mockito.Matchers.anyString ( ) ) ) . thenReturn ( org.ovirt.engine.core.bll.UpdateVdsGroupCommandTest.createVdsGroupWithNoCpuName ( ) ) ; org.ovirt.engine.core.bll.UpdateVdsGroupCommandTest.mcr.mockConfigValue ( ConfigValues.AllowClusterWithVirtGlusterEnabled , java.lang.Boolean.FALSE ) ; org.ovirt.engine.core.bll.UpdateVdsGroupCommandTest.mcr.mockConfigValue ( ConfigValues.GlusterSupport , org.ovirt.engine.core.bll.UpdateVdsGroupCommandTest.VERSION_1_1 , java.lang.Boolean.FALSE ) ; cpuExists ( ) ; allQueriesForVms ( ) ; canDoActionFailedWithReason ( VdcBllMessages.GLUSTER_NOT_SUPPORTED ) ; }

Target:
public void vdspysGroupWithVirtGlusterNotSupported ( ) { createCommandWithGlusterEnabled ( ) ; org.mockito.Mockito.when ( vdsGroupDAO.get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( org.ovirt.engine.core.bll.UpdateVdsGroupCommandTest.createVdsGroupWithNoCpuName ( ) ) ; org.mockito.Mockito.when ( vdsGroupDAO.getByName ( org.mockito.Matchers.anyString ( ) ) ) . thenReturn ( org.ovirt.engine.core.bll.UpdateVdsGroupCommandTest.createVdsGroupWithNoCpuName ( ) ) ; org.ovirt.engine.core.bll.UpdateVdsGroupCommandTest.mcr.mockConfigValue ( ConfigValues.AllowClusterWithVirtGlusterEnabled , java.lang.Boolean.FALSE ) ; org.ovirt.engine.core.bll.UpdateVdsGroupCommandTest.mcr.mockConfigValue ( ConfigValues.GlusterSupport , org.ovirt.engine.core.bll.UpdateVdsGroupCommandTest.VERSION_1_1 , java.lang.Boolean.FALSE ) ; cpuExists ( ) ; allQueriesForVms ( ) ; canDoActionFailedWithReason ( VdcBllMessages.GLUSTER_NOT_SUPPORTED ) ; }
Source:
public java.util.List < org.ovirt.engine.core.common.businessentities.network.Network > getAll ( ) { try { com.woorea.openstack.quantum.model.Networks networks = getQuantumClient ( ) . networks ( ) . list ( ) . execute ( ) ; return map ( networks.getList ( ) ) ; } catch ( java.lang.RuntimeException e ) { throw new org.ovirt.engine.core.common.errors.VdcBLLException ( org.ovirt.engine.core.common.errors.VdcBllErrors.ENGINE , e ) ; } }

Target:
public java.util.List < org.ovirt.engine.core.common.businessentities.network.Network > getAll ( ) { try { com.woorea.openstack.quantum.model.Networks networks = getClient ( ) . networks ( ) . list ( ) . execute ( ) ; return map ( networks.getList ( ) ) ; } catch ( java.lang.RuntimeException e ) { throw new org.ovirt.engine.core.common.errors.VdcBLLException ( org.ovirt.engine.core.common.errors.VdcBllErrors.PROVIDER_FAILURE , e ) ; } }
Source:
protected org.ovirt.engine.api.model.Storage lookupStorage ( java.lang.String id ) { for ( org.ovirt.engine.core.common.businessentities.LUNs lun : getLogicalUnits ( ) ) { if ( lun.getLUN_id ( ) . equals ( id ) ) { return addLinks ( map ( lun ) ) ; } } for ( org.ovirt.engine.api.restapi.resource.StorageDomain vg : getVolumeGroups ( ) ) { if ( vg.getStorage ( ) . equals ( id ) ) { return addLinks ( map ( vg ) ) ; } } return notFound ( ) ; }

Target:
protected org.ovirt.engine.api.model.Storage lookupStorage ( java.lang.String id ) { for ( org.ovirt.engine.core.common.businessentities.storage.LUNs lun : getLogicalUnits ( ) ) { if ( lun.getLUN_id ( ) . equals ( id ) ) { return addLinks ( map ( lun ) ) ; } } for ( org.ovirt.engine.api.restapi.resource.StorageDomain vg : getVolumeGroups ( ) ) { if ( vg.getStorage ( ) . equals ( id ) ) { return addLinks ( map ( vg ) ) ; } } return notFound ( ) ; }
Source:
protected void getPKITrustV1 ( javax.servlet.http.HttpServletRequest request , javax.servlet.http.HttpServletResponse response ) throws java.io.IOException , javax.servlet.ServletException { org.ovirt.engine.core.services.RegisterServlet.log.info ( "PKI Trust request: source='{}', secured='{}'" , request.getRemoteHost ( ) , request.isSecure ( ) ) ; try ( java.io.PrintWriter out = response.getWriter ( ) ) { response.setContentType ( PKIResources.Resource.CACertificate.getContentType ( PKIResources.Format.X509_PEM_CA ) ) ; out.print ( PKIResources.Resource.CACertificate.toString ( PKIResources.Format.X509_PEM_CA ) ) ; } }

Target:
protected void getPKITrustV1 ( javax.servlet.http.HttpServletRequest request , javax.servlet.http.HttpServletResponse response ) throws java.io.IOException , javax.servlet.ServletException { org.ovirt.engine.core.services.RegisterServlet.log.info ( "PKI Trust request: source='{}', secured='{}'" , request.getRemoteHost ( ) , request.isSecure ( ) ) ; try ( java.io.PrintWriter out = response.getWriter ( ) ) { response.setContentType ( org.ovirt.engine.core.utils.PKIResources.getCaCertificate ( ) . getContentType ( PKIResources.Format.X509_PEM_CA ) ) ; out.print ( org.ovirt.engine.core.utils.PKIResources.getCaCertificate ( ) . toString ( PKIResources.Format.X509_PEM_CA ) ) ; } }
Source:
public void setCustomValues ( ) { final org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase underTest = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.TestAuditLogableBase ( ) ; final java.lang.String key = "foo" ; doSetCustomValuesTest ( underTest , key ) ; }

Target:
public void setCustomValuesOverridesDoesNotAffectsOtherKeys ( ) { final java.lang.String key1 = "foo" ; final java.lang.String key2 = "bar" ; b.appendCustomValue ( key2 , "test value 2" , null ) ; doSetCustomValuesTest ( b , key1 ) ; org.junit.Assert.assertThat ( b.getCustomValue ( key2 ) , org.hamcrest.Matchers.is ( "test value 2" ) ) ; }
Source:
public void insufficientDiskSpaceWithCollapse ( ) { final org.ovirt.engine.core.bll.ImportVmCommand < org.ovirt.engine.core.common.action.ImportVmParameters > command = setupDiskSpaceTest ( createParameters ( ) ) ; org.mockito.Mockito.doReturn ( true ) . when ( command ) . validateImages ( org.mockito.Matchers.any ( java.util.Map.class ) ) ; org.mockito.Mockito.when ( command.getImportValidator ( ) . validateSpaceRequirements ( org.mockito.Matchers.anyCollection ( ) ) ) . thenReturn ( new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.ACTION_TYPE_FAILED_DISK_SPACE_LOW_ON_STORAGE_DOMAIN ) ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( command , VdcBllMessages.ACTION_TYPE_FAILED_DISK_SPACE_LOW_ON_STORAGE_DOMAIN ) ; }

Target:
public void insufficientDiskSpaceWithCollapse ( ) { final org.ovirt.engine.core.bll.ImportVmCommand < org.ovirt.engine.core.common.action.ImportVmParameters > command = setupDiskSpaceTest ( createParameters ( ) ) ; org.mockito.Mockito.doReturn ( true ) . when ( command ) . validateImages ( org.mockito.Matchers.any ( java.util.Map.class ) ) ; org.mockito.Mockito.when ( command.getImportValidator ( ) . validateSpaceRequirements ( org.mockito.Matchers.anyCollection ( ) ) ) . thenReturn ( new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_DISK_SPACE_LOW_ON_STORAGE_DOMAIN ) ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( command , EngineMessage.ACTION_TYPE_FAILED_DISK_SPACE_LOW_ON_STORAGE_DOMAIN ) ; }
Source:
protected void verifyResponseGlusterOnly ( javax.ws.rs.core.Response response ) { org.junit.Assert.assertEquals ( 200 , response.getStatus ( ) ) ; org.junit.Assert.assertTrue ( ( ( response.getEntity ( ) ) instanceof org.ovirt.engine.api.model.API ) ) ; verifyApiGlusterOnly ( ( ( org.ovirt.engine.api.model.API ) ( response.getEntity ( ) ) ) ) ; }

Target:
protected void verifyResponseGlusterOnly ( javax.ws.rs.core.Response response ) { org.junit.Assert.assertEquals ( 200 , response.getStatus ( ) ) ; org.junit.Assert.assertTrue ( ( ( response.getEntity ( ) ) instanceof org.ovirt.engine.api.model.Api ) ) ; verifyApiGlusterOnly ( ( ( org.ovirt.engine.api.model.Api ) ( response.getEntity ( ) ) ) ) ; }
Source:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { if ( ( ( java.lang.Boolean ) ( object.getOptimizationCustom_IsSelected ( ) . getEntity ( ) ) ) ) { optimizationCustomFormatter ( object ) ; optimizationCustomEditor.setVisible ( true ) ; } }

Target:
private void optimizationCustomFormatter ( org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterModel object ) { if ( ( ( object.getOptimizationCustom ( ) ) != null ) && ( ( object.getOptimizationCustom ( ) . getEntity ( ) ) != null ) ) { optimizationCustomEditor.asRadioButton ( ) . setHTML ( templates.radioButtonLabel ( messages.clusterPopupMemoryOptimizationCustomLabel ( java.lang.String.valueOf ( object.getMemoryOverCommit ( ) ) ) ) ) ; } }
Source:
public void untarEmptyFileReturnsNoContent ( ) throws java.io.IOException { byte [ ] emptyFile = new byte [ 0 ] ; try ( org.ovirt.engine.core.utils.archivers.tar.TarInMemoryExport tar = new org.ovirt.engine.core.utils.archivers.tar.TarInMemoryExport ( new java.io.ByteArrayInputStream ( emptyFile ) ) ) { java.util.Map < java.lang.String , java.nio.ByteBuffer > emptyTarEntries = tar.unTar ( ) ; org.junit.Assert.assertTrue ( emptyTarEntries.isEmpty ( ) ) ; } }

Target:
public void untarEmptyFileReturnsNoContent ( ) throws java.io.IOException { byte [ ] emptyFile = new byte [ 0 ] ; try ( org.ovirt.engine.core.utils.archivers.tar.TarInMemoryExport tar = new org.ovirt.engine.core.utils.archivers.tar.TarInMemoryExport ( new java.io.ByteArrayInputStream ( emptyFile ) ) ) { java.util.Map < java.lang.String , java.nio.ByteBuffer > emptyTarEntries = tar.unTar ( ) ; org.junit.jupiter.api.Assertions.assertTrue ( emptyTarEntries.isEmpty ( ) ) ; } }
Source:
public static 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 ) ; }

Target:
public static void isMTUOverrideSupported ( 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.MTUOverrideSupported ) ; tempVar.setVersion ( version ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigFromCache ( tempVar , aQuery ) ; }
Source:
public static void GetHostListByDataCenter ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid spId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > list = org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.VDS > Cast ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.IVdcQueryable > ) ( source ) ) ) ; return list ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllVdsByStoragePool , new org.ovirt.engine.core.common.queries.GetAllVdsByStoragePoolParameters ( spId ) , aQuery ) ; }

Target:
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 ) ; }
Source:
protected void executeVdsBrokerCommand ( ) { infoReturn = org.ovirt.engine.core.vdsbroker.vdsbroker.GetCapabilitiesVDSCommand.getBroker ( ) . getCapabilities ( ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.GetCapabilitiesVDSCommand.proceedProxyReturnValue ( ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectsBuilder.updateVDSDynamicData ( org.ovirt.engine.core.vdsbroker.vdsbroker.GetCapabilitiesVDSCommand.getVds ( ) , infoReturn.info ) ; setReturnValue ( org.ovirt.engine.core.vdsbroker.vdsbroker.GetCapabilitiesVDSCommand.getVds ( ) ) ; }

Target:
protected void executeVdsBrokerCommand ( ) { infoReturn = org.ovirt.engine.core.vdsbroker.vdsbroker.GetCapabilitiesVDSCommand.getBroker ( ) . getCapabilities ( ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.GetCapabilitiesVDSCommand.proceedProxyReturnValue ( ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectsBuilder.updateVDSDynamicData ( org.ovirt.engine.core.vdsbroker.vdsbroker.GetCapabilitiesVDSCommand.getVds ( ) , vdsmNameMapper.createVdsmNameMapping ( org.ovirt.engine.core.vdsbroker.vdsbroker.GetCapabilitiesVDSCommand.getVds ( ) . getClusterId ( ) ) , infoReturn.info ) ; setReturnValue ( org.ovirt.engine.core.vdsbroker.vdsbroker.GetCapabilitiesVDSCommand.getVds ( ) ) ; }
Source:
void initEntityModelCellTables ( ) { externalVms.addColumn ( new org.ovirt.engine.ui.common.widget.table.column.AbstractTextColumn < org.ovirt.engine.ui.uicommonweb.models.EntityModel < org.ovirt.engine.core.common.businessentities.VM > > ( ) { @ java.lang.Override public java.lang.String getValue ( org.ovirt.engine.ui.uicommonweb.models.EntityModel < org.ovirt.engine.core.common.businessentities.VM > externalVmModel ) { return externalVmModel.getEntity ( ) . getName ( ) ; } } , org.ovirt.engine.ui.webadmin.section.main.view.popup.ImportVmsPopupView.constants.name ( ) ) ; importedVms.addColumn ( new org.ovirt.engine.ui.common.widget.table.column.AbstractTextColumn < org.ovirt.engine.ui.uicommonweb.models.EntityModel < org.ovirt.engine.core.common.businessentities.VM > > ( ) { @ java.lang.Override public java.lang.String getValue ( org.ovirt.engine.ui.uicommonweb.models.EntityModel < org.ovirt.engine.core.common.businessentities.VM > externalVmModel ) { return externalVmModel.getEntity ( ) . getName ( ) ; } } , org.ovirt.engine.ui.webadmin.section.main.view.popup.ImportVmsPopupView.constants.name ( ) ) ; }

Target:
void initEntityModelCellTables ( ) { externalVms.addColumn ( new org.ovirt.engine.ui.common.widget.table.column.AbstractTextColumn < org.ovirt.engine.ui.uicommonweb.models.EntityModel < org.ovirt.engine.core.common.businessentities.VM > > ( ) { @ java.lang.Override public java.lang.String getValue ( org.ovirt.engine.ui.uicommonweb.models.EntityModel < org.ovirt.engine.core.common.businessentities.VM > externalVmModel ) { return toCellString ( externalVmModel ) ; } } , org.ovirt.engine.ui.webadmin.section.main.view.popup.ImportVmsPopupView.constants.name ( ) ) ; importedVms.addColumn ( new org.ovirt.engine.ui.common.widget.table.column.AbstractTextColumn < org.ovirt.engine.ui.uicommonweb.models.EntityModel < org.ovirt.engine.core.common.businessentities.VM > > ( ) { @ java.lang.Override public java.lang.String getValue ( org.ovirt.engine.ui.uicommonweb.models.EntityModel < org.ovirt.engine.core.common.businessentities.VM > externalVmModel ) { return toCellString ( externalVmModel ) ; } } , org.ovirt.engine.ui.webadmin.section.main.view.popup.ImportVmsPopupView.constants.name ( ) ) ; }
Source:
public static void GetClusterDesktopMemoryOverCommit ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Integer ) ( source ) ) . intValue ( ) : 0 ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.MaxVdsMemOverCommit , org.ovirt.engine.core.common.config.Config.DefaultConfigurationVersion ) , aQuery ) ; }

Target:
public static void GetCPUList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Version version ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ServerCpu > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ServerCpu > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllServerCpuList , new org.ovirt.engine.core.common.queries.GetAllServerCpuListParameters ( version ) , aQuery ) ; }
Source:
private static void addVideoDevice ( org.ovirt.engine.core.common.businessentities.VM vm ) { org.ovirt.engine.core.bll.utils.VmDeviceUtils.addManagedDevice ( new org.ovirt.engine.core.common.businessentities.VmDeviceId ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) , vm.getId ( ) ) , VmDeviceGeneralType.VIDEO , vm.getDefaultDisplayType ( ) . getVmDeviceType ( ) , org.ovirt.engine.core.bll.utils.VmDeviceUtils.getMemExpr ( vm.getNumOfMonitors ( ) ) , true , true , null ) ; }

Target:
private static void addVideoDevice ( org.ovirt.engine.core.common.businessentities.VmBase vm ) { org.ovirt.engine.core.bll.utils.VmDeviceUtils.addManagedDevice ( new org.ovirt.engine.core.common.businessentities.VmDeviceId ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) , vm.getId ( ) ) , VmDeviceGeneralType.VIDEO , vm.getDefaultDisplayType ( ) . getVmDeviceType ( ) , org.ovirt.engine.core.bll.utils.VmDeviceUtils.getMemExpr ( vm.getNumOfMonitors ( ) ) , true , true , null ) ; }