auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void canDoActionPreallocatedSpaceCheckSucceeds ( ) { final int availableSize = 12 ; final int usedSize = 8 ; org.ovirt.engine.core.compat.Guid sdid = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; initializeCommand ( sdid , VolumeType.Preallocated ) ; mockVm ( ) ; mockStorageDomain ( sdid , availableSize , usedSize ) ; mockStoragePoolIsoMap ( ) ; org.junit.Assert.assertTrue ( command.canDoAction ( ) ) ; }

Target:
public void canDoActionSpaceValidationSucceeds ( ) { org.ovirt.engine.core.compat.Guid storageId = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; initializeCommand ( storageId , VolumeType.Preallocated ) ; mockVm ( ) ; mockStorageDomain ( storageId ) ; mockStoragePoolIsoMap ( ) ; org.mockito.Mockito.doReturn ( org.ovirt.engine.core.bll.AddDiskToVmCommandTest.mockStorageDomainValidatorWithSpace ( ) ) . when ( command ) . createStorageDomainValidator ( ) ; org.junit.Assert.assertTrue ( command.canDoAction ( ) ) ; }
Source:
public org.ovirt.engine.core.common.businessentities.NonOperationalReason persistAndEnforceNetworkCompliance ( org.ovirt.engine.core.common.businessentities.VDS host , boolean skipManagementNetwork , java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > userConfiguredNics ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > dbIfaces = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getInterfaceDao ( ) . getAllInterfacesForVds ( host.getId ( ) ) ; persistTopology ( host.getInterfaces ( ) , dbIfaces , userConfiguredNics ) ; return enforceNetworkCompliance ( host , skipManagementNetwork , dbIfaces ) ; }

Target:
public org.ovirt.engine.core.common.businessentities.NonOperationalReason persistAndEnforceNetworkCompliance ( org.ovirt.engine.core.common.businessentities.VDS host , boolean skipManagementNetwork , java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > userConfiguredNics ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > dbIfaces = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getInterfaceDao ( ) . getAllInterfacesForVds ( host.getId ( ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.network.Network > clusterNetworks = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getNetworkDao ( ) . getAllForCluster ( host.getVdsGroupId ( ) ) ; persistTopology ( host.getInterfaces ( ) , dbIfaces , userConfiguredNics ) ; return enforceNetworkCompliance ( host , skipManagementNetwork , dbIfaces , clusterNetworks ) ; }
Source:
protected boolean commandSpecificCanDoAction ( ) { org.ovirt.engine.core.common.businessentities.DiskImage targetDisk = org.ovirt.engine.core.bll.UploadStreamCommand.getDiskImage ( ) ; if ( ( targetDisk.getVolumeType ( ) ) != ( org.ovirt.engine.core.common.businessentities.VolumeType.Preallocated ) ) { return failCanDoAction ( VdcBllMessages.ACTION_TYPE_FAILED_DISK_VOLUME_TYPE_UNSUPPORTED , java.lang.String.format ( "$volumeType %1$s" , targetDisk.getVolumeType ( ) . toString ( ) ) , java.lang.String.format ( "$supportedVolumeTypes %1$s" , VolumeType.Preallocated ) ) ; } return true ; }

Target:
protected boolean commandSpecificCanDoAction ( ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage targetDisk = org.ovirt.engine.core.bll.UploadStreamCommand.getDiskImage ( ) ; if ( ( targetDisk.getVolumeType ( ) ) != ( org.ovirt.engine.core.common.businessentities.storage.VolumeType.Preallocated ) ) { return failCanDoAction ( VdcBllMessages.ACTION_TYPE_FAILED_DISK_VOLUME_TYPE_UNSUPPORTED , java.lang.String.format ( "$volumeType %1$s" , targetDisk.getVolumeType ( ) . toString ( ) ) , java.lang.String.format ( "$supportedVolumeTypes %1$s" , VolumeType.Preallocated ) ) ; } return true ; }
Source:
public static void getGlusterHostsNewlyAdded ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId , boolean isFingerprintRequired ) { 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.GetAddedGlusterServers , new org.ovirt.engine.core.common.queries.gluster.AddedGlusterServersParameters ( clusterId , isFingerprintRequired ) , aQuery ) ; }

Target:
public static void getHostFingerprint ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String hostAddress ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.String ) ( source ) ) : "" ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetServerSSHKeyFingerprint , new org.ovirt.engine.core.common.queries.ServerParameters ( hostAddress ) , aQuery ) ; }
Source:
public void onFailureAlertShown ( ) { mockExecutor ( false ) ; try { command.executeCommand ( ) ; org.junit.Assert.fail ( ) ; } catch ( org.ovirt.engine.core.common.errors.EngineException ex ) { org.mockito.Mockito.verify ( auditLogDirector , org.mockito.Mockito.times ( 3 ) ) . log ( org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase.class ) , org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.common.AuditLogType.class ) ) ; } }

Target:
public void onFailureAlertShown ( ) { mockExecutor ( false ) ; try { command.executeCommand ( ) ; org.junit.Assert.fail ( ) ; } catch ( org.ovirt.engine.core.common.errors.EngineException ex ) { org.mockito.Mockito.verify ( auditLogDirector , org.mockito.Mockito.times ( 3 ) ) . log ( org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogable.class ) , org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.common.AuditLogType.class ) ) ; } }
Source:
protected org.ovirt.engine.core.dao.TagDao getTagDao ( ) { return tagDao ; }

Target:
private void addChildren ( org.ovirt.engine.core.common.businessentities.Tags tag ) { org.ovirt.engine.core.bll.TagsDirector.log.info ( "Tag '{}' added to tree" , tag.getTagName ( ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.Tags > children = tagDao.getAllForParent ( tag.getTagId ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.Tags child : children ) { addChildren ( child ) ; org.ovirt.engine.core.bll.TagsDirector.log.info ( "Tag '{}' added as child to parent '{}'" , child.getTagName ( ) , tag.getTagName ( ) ) ; tag.getChildren ( ) . add ( child ) ; addTagToHash ( tag ) ; addTagToHash ( child ) ; } }
Source:
public void execute ( int iterationId ) { try { org.ovirt.engine.core.bll.storage.StorageHelperDirector.getInstance ( ) . getItem ( getStorageDomain ( ) . getstorage_type ( ) ) . connectStorageToDomainByVdsId ( getStorageDomain ( ) , getVdss ( ) . get ( iterationId ) . getId ( ) ) ; } catch ( java.lang.RuntimeException e ) { org.ovirt.engine.core.bll.storage.ConnectSingleAsyncOperation.log.errorFormat ( "Failed to connect host {0} to storage pool {1}. Exception: {3}" , getVdss ( ) . get ( iterationId ) . getVdsName ( ) , getStoragePool ( ) . getname ( ) , e ) ; } }

Target:
public void execute ( int iterationId ) { try { org.ovirt.engine.core.bll.storage.StorageHelperDirector.getInstance ( ) . getItem ( getStorageDomain ( ) . getStorageType ( ) ) . connectStorageToDomainByVdsId ( getStorageDomain ( ) , getVdss ( ) . get ( iterationId ) . getId ( ) ) ; } catch ( java.lang.RuntimeException e ) { org.ovirt.engine.core.bll.storage.ConnectSingleAsyncOperation.log.errorFormat ( "Failed to connect host {0} to storage pool {1}. Exception: {3}" , getVdss ( ) . get ( iterationId ) . getVdsName ( ) , getStoragePool ( ) . getname ( ) , e ) ; } }
Source:
private org.ovirt.engine.core.common.vdscommands.VDSReturnValue runUpdateMomPolicy ( final org.ovirt.engine.core.common.businessentities.VDSGroup cluster , final org.ovirt.engine.core.common.businessentities.VDS vds ) { org.ovirt.engine.core.common.vdscommands.VDSReturnValue returnValue = new org.ovirt.engine.core.common.vdscommands.VDSReturnValue ( ) ; if ( ( cluster.getcompatibility_version ( ) . compareTo ( Version.v3_3 ) ) >= 0 ) { try { returnValue = runVdsCommand ( VDSCommandType.SetMOMPolicyParameters , new org.ovirt.engine.core.common.vdscommands.MomPolicyVDSParameters ( vds , cluster.isEnableBallooning ( ) , cluster.isEnableKsm ( ) ) ) ; } catch ( org.ovirt.engine.core.common.errors.VdcBLLException e ) { log.errorFormat ( "Could not update MoM policy on host {0}" , vds.getName ( ) ) ; returnValue.setSucceeded ( false ) ; } } return returnValue ; }

Target:
private org.ovirt.engine.core.common.vdscommands.VDSReturnValue runUpdateMomPolicy ( final org.ovirt.engine.core.common.businessentities.VDSGroup cluster , final org.ovirt.engine.core.common.businessentities.VDS vds ) { org.ovirt.engine.core.common.vdscommands.VDSReturnValue returnValue = new org.ovirt.engine.core.common.vdscommands.VDSReturnValue ( ) ; if ( ( cluster.getCompatibilityVersion ( ) . compareTo ( Version.v3_3 ) ) >= 0 ) { try { returnValue = runVdsCommand ( VDSCommandType.SetMOMPolicyParameters , new org.ovirt.engine.core.common.vdscommands.MomPolicyVDSParameters ( vds , cluster.isEnableBallooning ( ) , cluster.isEnableKsm ( ) ) ) ; } catch ( org.ovirt.engine.core.common.errors.VdcBLLException e ) { log.error ( "Could not update MoM policy on host '{}'" , vds.getName ( ) ) ; returnValue.setSucceeded ( false ) ; } } return returnValue ; }
Source:
public void reportCompleted ( ) { if ( ( org.ovirt.engine.core.bll.RunVmCommand.getVm ( ) . isRunAndPause ( ) ) && ( ( org.ovirt.engine.core.bll.RunVmCommand.getVmDynamicDao ( ) . get ( org.ovirt.engine.core.bll.RunVmCommand.getVmId ( ) ) . getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.Paused ) ) ) { final org.ovirt.engine.core.bll.job.ExecutionContext executionContext = org.ovirt.engine.core.bll.RunVmCommand.getExecutionContext ( ) ; executionContext.setShouldEndJob ( true ) ; org.ovirt.engine.core.bll.job.ExecutionHandler.endJob ( executionContext , true ) ; } else { super . reportCompleted ( ) ; } }

Target:
protected void endExecutionMonitoring ( ) { if ( ( org.ovirt.engine.core.bll.RunVmCommand.getVm ( ) . isRunAndPause ( ) ) && ( ( org.ovirt.engine.core.bll.RunVmCommand.getVmDynamicDao ( ) . get ( org.ovirt.engine.core.bll.RunVmCommand.getVmId ( ) ) . getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.Paused ) ) ) { final org.ovirt.engine.core.bll.job.ExecutionContext executionContext = org.ovirt.engine.core.bll.RunVmCommand.getExecutionContext ( ) ; executionContext.setShouldEndJob ( true ) ; org.ovirt.engine.core.bll.job.ExecutionHandler.endJob ( executionContext , true ) ; } else { super . endExecutionMonitoring ( ) ; } }
Source:
public java.util.Map < java.lang.String , java.lang.String > getVmToHostAssignments ( ) { java.util.Map < java.lang.String , java.lang.String > situation = new java.util.HashMap < > ( ) ; for ( org.ovirt.engine.sdk.entities.VM vm : vms ) { situation.put ( vm.getId ( ) , ( ( vm.getHost ( ) ) == null ? null : vm.getHost ( ) . getId ( ) ) ) ; } return situation ; }

Target:
public java.util.Map < java.lang.Long , java.lang.String > getInstanceToHostAssignments ( ) { java.util.Map < java.lang.Long , java.lang.String > situation = new java.util.HashMap < > ( ) ; for ( org.ovirt.optimizer.solver.facts.Instance instance : instances ) { org.ovirt.engine.sdk.entities.VM vm = vms.get ( instance.getVmId ( ) ) ; situation.put ( instance.getId ( ) , ( ( vm.getHost ( ) ) == null ? null : vm.getHost ( ) . getId ( ) ) ) ; } return situation ; }
Source:
private void updateTaskStatuses ( java.util.Map < org.ovirt.engine.core.compat.Guid , java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.AsyncTaskStatus > > poolsAllTasksMap ) { for ( org.ovirt.engine.core.bll.SPMAsyncTask task : _tasks.values ( ) ) { if ( task.getShouldPoll ( ) ) { java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.AsyncTaskStatus > asyncTasksForPoolMap = poolsAllTasksMap.get ( task.getStoragePoolID ( ) ) ; if ( asyncTasksForPoolMap != null ) { org.ovirt.engine.core.common.businessentities.AsyncTaskStatus cachedAsyncTaskStatus = asyncTasksForPoolMap.get ( task.getTaskID ( ) ) ; task.UpdateTask ( cachedAsyncTaskStatus ) ; } } } }

Target:
private void PollAndUpdateAsyncTasks ( ) { if ( logChangedMap ) { org.ovirt.engine.core.bll.AsyncTaskManager.log.infoFormat ( "Polling and updating Async Tasks: {0} tasks, {1} tasks to poll now" , _tasks.size ( ) , NumberOfTasksToPoll ( ) ) ; } java.util.Set < org.ovirt.engine.core.compat.Guid > poolsOfActiveTasks = getPoolIdsTasks ( ) ; java.util.Map < org.ovirt.engine.core.compat.Guid , java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.AsyncTaskStatus > > poolsAllTasksMap = getSPMsTasksStatuses ( poolsOfActiveTasks ) ; updateTaskStatuses ( poolsAllTasksMap ) ; }
Source:
public org.ovirt.engine.core.bll.CommandBase < ? > createWrappedCommand ( org.ovirt.engine.core.bll.context.CommandContext commandContext , org.ovirt.engine.core.common.action.ActionType actionType , org.ovirt.engine.core.common.action.VdcActionParametersBase parameter , boolean isInternal ) { org.ovirt.engine.core.bll.CommandBase < ? > command = ( isInternal ) ? org.ovirt.engine.core.bll.CommandsFactory.createCommand ( actionType , parameter , ( commandContext != null ? commandContext.clone ( ) . withoutCompensationContext ( ) : null ) ) : org.ovirt.engine.core.bll.CommandsFactory.createCommand ( actionType , parameter ) ; command.setInternalExecution ( isInternal ) ; return command ; }

Target:
public org.ovirt.engine.core.bll.CommandBase < ? > createWrappedCommand ( org.ovirt.engine.core.bll.context.CommandContext commandContext , org.ovirt.engine.core.common.action.ActionType actionType , org.ovirt.engine.core.common.action.ActionParametersBase parameter , boolean isInternal ) { org.ovirt.engine.core.bll.CommandBase < ? > command = ( isInternal ) ? org.ovirt.engine.core.bll.CommandsFactory.createCommand ( actionType , parameter , ( commandContext != null ? commandContext.clone ( ) . withoutCompensationContext ( ) : null ) ) : org.ovirt.engine.core.bll.CommandsFactory.createCommand ( actionType , parameter ) ; command.setInternalExecution ( isInternal ) ; return command ; }
Source:
public void testDetermineNetworkType ( ) { org.ovirt.engine.core.bll.validator.NetworkAttachmentsValidator validator = new org.ovirt.engine.core.bll.validator.NetworkAttachmentsValidator ( null , null , networkExclusivenessValidator ) ; org.junit.Assert.assertThat ( validator.determineNetworkType ( vlanNetwork ) , org.hamcrest.CoreMatchers.is ( NetworkType.VLAN ) ) ; org.junit.Assert.assertThat ( validator.determineNetworkType ( vmNetwork1 ) , org.hamcrest.CoreMatchers.is ( NetworkType.VM ) ) ; org.junit.Assert.assertThat ( validator.determineNetworkType ( nonVmNetwork1 ) , org.hamcrest.CoreMatchers.is ( NetworkType.NON_VM ) ) ; }

Target:
public void testDetermineNetworkType ( ) { org.ovirt.engine.core.bll.validator.NetworkAttachmentsValidator validator = new org.ovirt.engine.core.bll.validator.NetworkAttachmentsValidator ( null , null , networkExclusivenessValidator ) ; org.hamcrest.MatcherAssert.assertThat ( validator.determineNetworkType ( vlanNetwork ) , org.hamcrest.CoreMatchers.is ( NetworkType.VLAN ) ) ; org.hamcrest.MatcherAssert.assertThat ( validator.determineNetworkType ( vmNetwork1 ) , org.hamcrest.CoreMatchers.is ( NetworkType.VM ) ) ; org.hamcrest.MatcherAssert.assertThat ( validator.determineNetworkType ( nonVmNetwork1 ) , org.hamcrest.CoreMatchers.is ( NetworkType.NON_VM ) ) ; }
Source:
public void testGetCascadingResource_missingResourcesFile ( ) { java.io.File testThemeRootPath = new java.io.File ( this . getClass ( ) . getClassLoader ( ) . getResource ( "./org/ovirt/engine/core/utils/branding" ) . getFile ( ) ) ; java.io.File testThemePath = new java.io.File ( testThemeRootPath.getAbsoluteFile ( ) , "04-test4.brand" ) ; org.ovirt.engine.core.utils.branding.BrandingTheme theme4 = new org.ovirt.engine.core.utils.branding.BrandingTheme ( testThemePath.getAbsolutePath ( ) , testThemeRootPath , 1 ) ; org.junit.Assert.assertTrue ( "Theme 4 should load" , theme4.load ( ) ) ; org.junit.Assert.assertNull ( "getCascadingResource not handling missing resources.properties gracefully" , theme4.getCascadingResource ( "this_file_is_missing_anyway" ) ) ; }

Target:
public void testGetCascadingResource_missingResourcesFile ( ) throws java.net.URISyntaxException { java.io.File testThemeRootPath = new java.io.File ( this . getClass ( ) . getClassLoader ( ) . getResource ( "./org/ovirt/engine/core/utils/branding" ) . toURI ( ) . getPath ( ) ) ; java.io.File testThemePath = new java.io.File ( testThemeRootPath.getAbsoluteFile ( ) , "04-test4.brand" ) ; org.ovirt.engine.core.utils.branding.BrandingTheme theme4 = new org.ovirt.engine.core.utils.branding.BrandingTheme ( testThemePath.getAbsolutePath ( ) , testThemeRootPath , 1 ) ; org.junit.Assert.assertTrue ( "Theme 4 should load" , theme4.load ( ) ) ; org.junit.Assert.assertNull ( "getCascadingResource not handling missing resources.properties gracefully" , theme4.getCascadingResource ( "this_file_is_missing_anyway" ) ) ; }
Source:
private org.ovirt.engine.core.common.action.VdcActionParametersBase createUpgradeParameters ( org.ovirt.engine.core.common.action.hostdeploy.UpgradeHostParameters parameters ) { org.ovirt.engine.core.common.action.hostdeploy.UpgradeHostParameters upgradeParams = new org.ovirt.engine.core.common.action.hostdeploy.UpgradeHostParameters ( parameters.getVdsId ( ) ) ; upgradeParams.setSessionId ( parameters.getSessionId ( ) ) ; upgradeParams.setCorrelationId ( parameters.getCorrelationId ( ) ) ; upgradeParams.setInitialStatus ( parameters.getInitialStatus ( ) ) ; upgradeParams.setoVirtIsoFile ( parameters.getoVirtIsoFile ( ) ) ; upgradeParams.setParentCommand ( VdcActionType.UpgradeHost ) ; upgradeParams.setParentParameters ( parameters ) ; return upgradeParams ; }

Target:
private org.ovirt.engine.core.common.action.VdcActionParametersBase createUpgradeParameters ( org.ovirt.engine.core.common.action.hostdeploy.UpgradeHostParameters parameters ) { org.ovirt.engine.core.common.action.hostdeploy.UpgradeHostParameters upgradeParams = new org.ovirt.engine.core.common.action.hostdeploy.UpgradeHostParameters ( parameters.getVdsId ( ) ) ; upgradeParams.setSessionId ( parameters.getSessionId ( ) ) ; upgradeParams.setCorrelationId ( parameters.getCorrelationId ( ) ) ; upgradeParams.setInitialStatus ( parameters.getInitialStatus ( ) ) ; upgradeParams.setoVirtIsoFile ( parameters.getoVirtIsoFile ( ) ) ; upgradeParams.setParentCommand ( ActionType.UpgradeHost ) ; upgradeParams.setParentParameters ( parameters ) ; return upgradeParams ; }
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 returnValue ) { java.util.ArrayList < java.lang.String > pmTypes = ( ( java.util.ArrayList < java.lang.String > ) ( returnValue ) ) ; updatePmTypeList ( pmTypes , getPmType ( ) ) ; updatePmTypeList ( pmTypes , getPmSecondaryType ( ) ) ; }
Source:
public void getGlusterHostsNewlyAdded ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId , boolean isFingerprintRequired ) { 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.GetAddedGlusterServers , new org.ovirt.engine.core.common.queries.gluster.AddedGlusterServersParameters ( clusterId , isFingerprintRequired ) , aQuery ) ; }

Target:
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 > ( ) ; }
Source:
protected org.ovirt.engine.core.common.businessentities.Permissions mapCollection ( java.util.Set < org.ovirt.engine.core.common.businessentities.Permissions > entities ) { org.ovirt.engine.core.common.businessentities.Permissions collection = new org.ovirt.engine.core.common.businessentities.Permissions ( ) ; for ( org.ovirt.engine.core.common.businessentities.Permissions entity : entities ) { castEveryonePermissionsToUser ( entity ) ; org.ovirt.engine.api.model.Permission permission = map ( entity , getUserById ( entity.getad_element_id ( ) ) ) ; collection.getPermissions ( ) . add ( addLinks ( permission , ( ( permission.getUser ( ) ) != null ? suggestedParentType : org.ovirt.engine.api.model.Group.class ) ) ) ; } return collection ; }

Target:
protected org.ovirt.engine.core.common.businessentities.Permissions mapCollection ( java.util.Set < org.ovirt.engine.core.common.businessentities.Permissions > entities ) { org.ovirt.engine.core.common.businessentities.Permissions collection = new org.ovirt.engine.core.common.businessentities.Permissions ( ) ; for ( org.ovirt.engine.core.common.businessentities.Permissions entity : entities ) { castEveryonePermissionsToUser ( entity ) ; org.ovirt.engine.api.model.Permission permission = map ( entity , getUserById ( entity.getAdElementId ( ) ) ) ; collection.getPermissions ( ) . add ( addLinks ( permission , ( ( permission.getUser ( ) ) != null ? suggestedParentType : org.ovirt.engine.api.model.Group.class ) ) ) ; } return collection ; }
Source:
public void canDoActionVmInPreview ( ) { initializeCommand ( ImageOperation.Move ) ; initSnapshotValidator ( ) ; initVmForSpace ( ) ; initVmDiskImage ( false ) ; initSrcStorageDomain ( ) ; initDestStorageDomain ( StorageType.NFS ) ; org.mockito.Mockito.when ( snapshotsValidator.vmNotInPreview ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.ACTION_TYPE_FAILED_VM_IN_PREVIEW ) ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( command , VdcBllMessages.ACTION_TYPE_FAILED_VM_IN_PREVIEW ) ; }

Target:
public void canDoActionVmInPreview ( ) { initializeCommand ( ImageOperation.Move ) ; initSnapshotValidator ( ) ; initVmForSpace ( ) ; initVmDiskImage ( false ) ; initSrcStorageDomain ( ) ; initDestStorageDomain ( StorageType.NFS ) ; org.mockito.Mockito.when ( snapshotsValidator.vmNotInPreview ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_VM_IN_PREVIEW ) ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( command , EngineMessage.ACTION_TYPE_FAILED_VM_IN_PREVIEW ) ; }
Source:
protected void endVmCommand ( ) { if ( ( org.ovirt.engine.core.bll.VmCommand.getVm ( ) ) != null ) { org.ovirt.engine.core.bll.VmCommand.getVmStaticDAO ( ) . incrementDbGeneration ( org.ovirt.engine.core.bll.VmCommand.getVm ( ) . getId ( ) ) ; } endActionOnDisks ( ) ; unlockVm ( ) ; org.ovirt.engine.core.bll.VmCommand.setSucceeded ( true ) ; }

Target:
protected void endVmCommand ( ) { if ( ( org.ovirt.engine.core.bll.VmCommand.getVm ( ) ) != null ) { org.ovirt.engine.core.bll.VmCommand.getVmStaticDao ( ) . incrementDbGeneration ( org.ovirt.engine.core.bll.VmCommand.getVm ( ) . getId ( ) ) ; } endActionOnDisks ( ) ; unlockVm ( ) ; org.ovirt.engine.core.bll.VmCommand.setSucceeded ( true ) ; }
Source:
void bindConfiguration ( ) { bindConstant ( ) . annotatedWith ( org.ovirt.engine.ui.common.section.DefaultLoginSectionPlace.class ) . to ( ApplicationPlaces.DEFAULT_LOGIN_SECTION_PLACE ) ; bindConstant ( ) . annotatedWith ( org.ovirt.engine.ui.common.section.DefaultMainSectionPlace.class ) . to ( ApplicationPlaces.DEFAULT_MAIN_SECTION_PLACE ) ; bindResourceConfiguration ( org.ovirt.engine.ui.webadmin.ApplicationConstants.class , org.ovirt.engine.ui.webadmin.ApplicationMessages.class , org.ovirt.engine.ui.webadmin.ApplicationResources.class , org.ovirt.engine.ui.webadmin.ApplicationTemplates.class ) ; }

Target:
void bindConfiguration ( ) { bindConstant ( ) . annotatedWith ( org.ovirt.engine.ui.common.section.DefaultLoginSectionPlace.class ) . to ( ApplicationPlaces.DEFAULT_LOGIN_SECTION_PLACE ) ; bindConstant ( ) . annotatedWith ( org.ovirt.engine.ui.common.section.DefaultMainSectionPlace.class ) . to ( ApplicationPlaces.DEFAULT_MAIN_SECTION_PLACE ) ; bindResourceConfiguration ( org.ovirt.engine.ui.webadmin.ApplicationConstants.class , org.ovirt.engine.ui.webadmin.ApplicationMessages.class , org.ovirt.engine.ui.webadmin.ApplicationResources.class , org.ovirt.engine.ui.webadmin.ApplicationTemplates.class , org.ovirt.engine.ui.webadmin.ApplicationDynamicConstants.class ) ; }
Source:
private org.ovirt.engine.core.common.action.ImagesContainterParametersBase getRestoreFromSnapshotParams ( org.ovirt.engine.core.common.businessentities.storage.CinderDisk cinderDisk ) { org.ovirt.engine.core.common.action.ImagesContainterParametersBase params = new org.ovirt.engine.core.common.action.RestoreFromSnapshotParameters ( cinderDisk.getImageId ( ) , org.ovirt.engine.core.bll.storage.disk.cinder.RestoreAllCinderSnapshotsCommand.getParameters ( ) . getVmId ( ) , org.ovirt.engine.core.bll.storage.disk.cinder.RestoreAllCinderSnapshotsCommand.getParameters ( ) . getSnapshot ( ) , org.ovirt.engine.core.bll.storage.disk.cinder.RestoreAllCinderSnapshotsCommand.getParameters ( ) . getRemovedSnapshotId ( ) ) ; params.setParentCommand ( org.ovirt.engine.core.bll.storage.disk.cinder.RestoreAllCinderSnapshotsCommand.getActionType ( ) ) ; params.setStorageDomainId ( cinderDisk.getStorageIds ( ) . get ( 0 ) ) ; params.setParentParameters ( org.ovirt.engine.core.bll.storage.disk.cinder.RestoreAllCinderSnapshotsCommand.getParameters ( ) ) ; return params ; }

Target:
private org.ovirt.engine.core.common.action.ImagesContainterParametersBase getRestoreFromSnapshotParams ( org.ovirt.engine.core.common.businessentities.storage.CinderDisk cinderDisk ) { org.ovirt.engine.core.common.action.RemoveCinderDiskParameters params = new org.ovirt.engine.core.common.action.RemoveCinderDiskParameters ( cinderDisk.getImageId ( ) ) ; params.setRemovedVolume ( cinderDisk ) ; params.setParentCommand ( org.ovirt.engine.core.bll.storage.disk.cinder.RestoreAllCinderSnapshotsCommand.getActionType ( ) ) ; params.setStorageDomainId ( cinderDisk.getStorageIds ( ) . get ( 0 ) ) ; params.setParentParameters ( org.ovirt.engine.core.bll.storage.disk.cinder.RestoreAllCinderSnapshotsCommand.getParameters ( ) ) ; return params ; }
Source:
public void getFreeVfMoreThanOneFreeVf ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.HostDevice > freeVfs = freeVfCommon ( 5 , 2 , 2 , 2 , 2 ) ; org.junit.Assert.assertEquals ( 5 , freeVfs.size ( ) ) ; org.junit.Assert.assertTrue ( freeVfs.contains ( hostNicVfsConfigHelper.getFreeVf ( nic ) ) ) ; }

Target:
public void getFreeVfOneFreeVf ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.HostDevice > freeVfs = freeVfCommon ( 1 , 4 , 3 , 2 , 1 ) ; org.junit.Assert.assertEquals ( 1 , freeVfs.size ( ) ) ; org.junit.Assert.assertTrue ( freeVfs.contains ( hostNicVfsConfigHelper.getFreeVf ( nic , null ) ) ) ; }
Source:
public void testGetAllForVolumeGroup ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.LUNs > result = dao.getAllForVolumeGroup ( existingLUN.getvolume_group_id ( ) ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertFalse ( result.isEmpty ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.LUNs lun : result ) { org.junit.Assert.assertEquals ( existingLUN.getvolume_group_id ( ) , lun.getvolume_group_id ( ) ) ; } }

Target:
public void testGetAllForVolumeGroup ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.LUNs > result = dao.getAllForVolumeGroup ( existingLUN.getvolume_group_id ( ) ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertFalse ( result.isEmpty ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.storage.LUNs lun : result ) { org.junit.Assert.assertEquals ( existingLUN.getvolume_group_id ( ) , lun.getvolume_group_id ( ) ) ; } }
Source:
public void testRemoveNonExistant ( ) throws java.lang.Exception { setUpEntityQueryExpectations ( VdcQueryType.GetVmByVmId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendVmCdromResourceTest.VM_ID } , null ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; try { resource.remove ( ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { assertNotNull ( wae.getResponse ( ) ) ; assertEquals ( 404 , wae.getResponse ( ) . getStatus ( ) ) ; } }

Target:
public void testRemoveNonExistant ( ) throws java.lang.Exception { setUpEntityQueryExpectations ( QueryType.GetVmByVmId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendVmCdromResourceTest.VM_ID } , null ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; try { resource.remove ( ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { assertNotNull ( wae.getResponse ( ) ) ; assertEquals ( 404 , wae.getResponse ( ) . getStatus ( ) ) ; } }
Source:
public boolean getLegal ( ) { if ( getUseTimout ( ) ) { java.lang.String keyForCheck = getkeyForCheck ( ) ; if ( ( org.ovirt.engine.core.utils.cache.CacheManager.getTimeoutBaseCache ( ) . putIfAbsent ( keyForCheck , keyForCheck , getEndTime ( ) , java.util.concurrent.TimeUnit.MILLISECONDS ) ) == null ) { return true ; } return false ; } return true ; }

Target:
public boolean getLegal ( ) { if ( getUseTimout ( ) ) { java.lang.String keyForCheck = getkeyForCheck ( ) ; synchronized ( keyForCheck.intern ( ) ) { if ( ! ( org.ovirt.engine.core.utils.cache.CacheManager.getTimeoutBaseCache ( ) . containsKey ( keyForCheck ) ) ) { org.ovirt.engine.core.utils.cache.CacheManager.getTimeoutBaseCache ( ) . put ( keyForCheck , keyForCheck , getEndTime ( ) , java.util.concurrent.TimeUnit.MILLISECONDS ) ; return true ; } } return false ; } return true ; }
Source:
public static void IsHotPlugAvailable ( 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.HotPlugEnabled ) ; tempVar.setVersion ( version ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( tempVar , aQuery ) ; }

Target:
public static void GetDocumentationBaseURL ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.String ) ( source ) ) : "" ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.DocsURL , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
private java.lang.String getTimeZoneForVm ( org.ovirt.engine.core.common.businessentities.VM vm ) { if ( ! ( org.apache.commons.lang.StringUtils.isEmpty ( vm.getTimeZone ( ) ) ) ) { return vm.getTimeZone ( ) ; } if ( vm.getOs ( ) . isWindows ( ) ) { return org.ovirt.engine.core.common.config.Config.< java.lang.String > GetValue ( ConfigValues.DefaultWindowsTimeZone ) ; } else { return org.ovirt.engine.core.common.config.Config.< java.lang.String > GetValue ( ConfigValues.DefaultGeneralTimeZone ) ; } }

Target:
private java.lang.String getTimeZoneForVm ( org.ovirt.engine.core.common.businessentities.VM vm ) { if ( ! ( org.apache.commons.lang.StringUtils.isEmpty ( vm.getTimeZone ( ) ) ) ) { return vm.getTimeZone ( ) ; } if ( OsRepositoryImpl.INSTANCE.isWindows ( vm.getOs ( ) ) ) { return org.ovirt.engine.core.common.config.Config.< java.lang.String > GetValue ( ConfigValues.DefaultWindowsTimeZone ) ; } else { return "Etc/GMT" ; } }
Source:
public void executed ( org.ovirt.engine.ui.uicompat.FrontendMultipleActionAsyncResult result ) { org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel localModel = ( ( org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel ) ( result.getState ( ) ) ) ; localModel.stopProgress ( ) ; cancel ( ) ; }

Target:
protected void onActionSucceeded ( org.ovirt.engine.core.compat.Guid macPoolId ) { org.ovirt.engine.core.common.businessentities.MacPool macPool = getEntity ( ) ; macPool.setId ( macPoolId ) ; java.util.Collection < org.ovirt.engine.core.common.businessentities.MacPool > macPools = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.MacPool > ( dcModel.getMacPoolListModel ( ) . getItems ( ) ) ; macPools.add ( macPool ) ; dcModel.getMacPoolListModel ( ) . setItems ( macPools ) ; dcModel.getMacPoolListModel ( ) . setSelectedItem ( macPool ) ; this . setConfirmWindow ( null ) ; }
Source:
protected void executeQueryCommand ( ) { java.util.List < org.ovirt.engine.core.aaa.AuthenticationProfile > profiles = org.ovirt.engine.core.aaa.AuthenticationProfileRepository.getInstance ( ) . getProfiles ( ) ; java.util.List < java.lang.String > names = new java.util.ArrayList ( profiles.size ( ) ) ; for ( org.ovirt.engine.core.aaa.AuthenticationProfile profile : profiles ) { names.add ( profile.getName ( ) ) ; } org.ovirt.engine.core.bll.GetAAAProfileListQuery.getQueryReturnValue ( ) . setReturnValue ( names ) ; }

Target:
public int compare ( org.ovirt.engine.core.aaa.ProfileEntry lhs , org.ovirt.engine.core.aaa.ProfileEntry rhs ) { return ( lhs.getProfile ( ) . compareTo ( rhs.getProfile ( ) ) ) != 0 ? lhs.getProfile ( ) . compareTo ( rhs.getProfile ( ) ) : lhs.getAuthz ( ) . compareTo ( rhs.getAuthz ( ) ) ; }
Source:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { if ( "IsAvailable" . equals ( ( ( org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ) ( args ) ) . PropertyName ) ) { getView ( ) . setAgentTabVisibility ( model.getNeutronAgentModel ( ) . getIsAvailable ( ) ) ; } }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { getView ( ) . setAgentTabVisibility ( ( ( java.lang.Boolean ) ( model.getNeutronAgentModel ( ) . isPluginConfigurationAvailable ( ) . getEntity ( ) ) ) ) ; }
Source:
public void testUpdateDoesntChangeExternalId ( ) { org.ovirt.engine.core.common.businessentities.aaa.DbUser userBefore = dao.get ( existingUser.getId ( ) ) ; dao.update ( userBefore ) ; org.ovirt.engine.core.common.businessentities.aaa.DbUser userAfter = dao.get ( existingUser.getId ( ) ) ; org.junit.Assert.assertEquals ( userBefore.getExternalId ( ) , userAfter.getExternalId ( ) ) ; }

Target:
public void testUpdateDoesntChangeExternalId ( ) { org.ovirt.engine.core.common.businessentities.aaa.DbUser userBefore = dao.get ( existingUser.getId ( ) ) ; dao.update ( userBefore ) ; org.ovirt.engine.core.common.businessentities.aaa.DbUser userAfter = dao.get ( existingUser.getId ( ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( userBefore.getExternalId ( ) , userAfter.getExternalId ( ) ) ; }
Source:
public java.util.concurrent.Future < java.util.Map < java.lang.String , java.lang.Object > > setupNetworks ( org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcStruct networks , org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcStruct bonds , org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcStruct options ) { return vdsServer.futureSetupNetworks ( networks.getInnerMap ( ) , bonds.getInnerMap ( ) , options.getInnerMap ( ) ) ; }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc hotplugDisk ( java.util.Map info ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.hotplugDisk ( info ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
Source:
public static void getGlusterHook ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hookId , boolean includeServerHooks ) { 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.GetGlusterHookById , new org.ovirt.engine.core.common.queries.gluster.GlusterHookQueryParameters ( hookId , includeServerHooks ) , aQuery ) ; }

Target:
public static void getGlusterVolumeGeoRepStatusForMasterVolume ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid masterVolumeId ) { 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.GlusterGeoRepSession > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterVolumeGeoRepSessions , new org.ovirt.engine.core.common.queries.IdQueryParameters ( masterVolumeId ) , aQuery ) ; }
Source:
private static void logVmStatusTransionFromUnknown ( org.ovirt.engine.core.common.businessentities.VM vmToUpdate , org.ovirt.engine.core.common.businessentities.VmDynamic runningVm ) { final org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase auditLogable = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; auditLogable.setVmId ( vmToUpdate.getId ( ) ) ; auditLogable.addCustomValue ( "VmStatus" , runningVm.getStatus ( ) . toString ( ) ) ; org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.log ( auditLogable , AuditLogType.VM_STATUS_RESTORED ) ; }

Target:
public org.ovirt.engine.core.vdsbroker.VdsManager getVdsManager ( ) { return vdsManager ; }
Source:
public java.util.List < org.ovirt.engine.core.common.businessentities.Permissions > getTreeForEntity ( org.ovirt.engine.core.compat.Guid id , org.ovirt.engine.core.common.VdcObjectType type , org.ovirt.engine.core.compat.Guid userID , boolean isFiltered , int appMode ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) . addValue ( "id" , id ) . addValue ( "object_type_id" , type.getValue ( ) ) . addValue ( "user_id" , userID ) . addValue ( "is_filtered" , isFiltered ) . addValue ( "app_mode" , appMode ) ; return getCallsHandler ( ) . executeReadList ( "GetPermissionsTreeByEntityId" , org.ovirt.engine.core.dao.PermissionDAODbFacadeImpl.PermissionRowMapper.instance , parameterSource ) ; }

Target:
public java.util.List < org.ovirt.engine.core.common.businessentities.Permissions > getTreeForEntity ( org.ovirt.engine.core.compat.Guid id , org.ovirt.engine.core.common.VdcObjectType type , long engineSessionSeqId , boolean isFiltered , int appMode ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) . addValue ( "id" , id ) . addValue ( "object_type_id" , type.getValue ( ) ) . addValue ( "engine_session_seq_id" , engineSessionSeqId ) . addValue ( "is_filtered" , isFiltered ) . addValue ( "app_mode" , appMode ) ; return getCallsHandler ( ) . executeReadList ( "GetPermissionsTreeByEntityId" , org.ovirt.engine.core.dao.PermissionDAODbFacadeImpl.PermissionRowMapper.instance , parameterSource ) ; }
Source:
public boolean validateAndSetQuota ( ) { if ( org.ovirt.engine.core.bll.RunVmOnceCommand.isInternalExecution ( ) ) { return true ; } boolean quotaAcc = super . validateAndSetQuota ( ) ; if ( ! quotaAcc ) { return false ; } if ( ! ( java.lang.Boolean.TRUE.equals ( org.ovirt.engine.core.bll.RunVmOnceCommand.getParameters ( ) . getRunAsStateless ( ) ) ) ) { return quotaAcc ; } return org.ovirt.engine.core.bll.quota.QuotaManager.getInstance ( ) . validateAndSetStorageQuota ( org.ovirt.engine.core.bll.RunVmOnceCommand.getStoragePool ( ) , getStorageQuotaListParameters ( ) , org.ovirt.engine.core.bll.RunVmOnceCommand.getReturnValue ( ) . getCanDoActionMessages ( ) ) ; }

Target:
public java.util.List < org.ovirt.engine.core.bll.quota.QuotaConsumptionParameter > getQuotaStorageConsumptionParameters ( ) { java.util.List < org.ovirt.engine.core.bll.quota.QuotaConsumptionParameter > list = new java.util.ArrayList < org.ovirt.engine.core.bll.quota.QuotaConsumptionParameter > ( ) ; if ( java.lang.Boolean.TRUE.equals ( org.ovirt.engine.core.bll.RunVmOnceCommand.getParameters ( ) . getRunAsStateless ( ) ) ) { for ( org.ovirt.engine.core.common.businessentities.DiskImage image : org.ovirt.engine.core.bll.RunVmOnceCommand.getVm ( ) . getDiskList ( ) ) { list.add ( new org.ovirt.engine.core.bll.quota.QuotaStorageConsumptionParameter ( image.getQuotaId ( ) , null , QuotaConsumptionParameter.QuotaAction.CONSUME , image.getstorage_ids ( ) . get ( 0 ) , image.getActualSize ( ) ) ) ; } } return list ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.ImageSizeReturnForXmlRpc diskSizeExtend ( java.lang.String vmId , java.util.Map < java.lang.String , java.lang.String > diskParams , java.lang.String newSize ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "VM.diskSizeExtend" ) . withParameter ( "vmID" , vmId ) . withParameter ( "driveSpecs" , diskParams ) . withParameter ( "newSize" , newSize ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) . withResponseKey ( "size" ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.ImageSizeReturnForXmlRpc ( response ) ; }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.ImageSizeReturn diskSizeExtend ( java.lang.String vmId , java.util.Map < java.lang.String , java.lang.String > diskParams , java.lang.String newSize ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "VM.diskSizeExtend" ) . withParameter ( "vmID" , vmId ) . withParameter ( "driveSpecs" , diskParams ) . withParameter ( "newSize" , newSize ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) . withResponseKey ( "size" ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.ImageSizeReturn ( response ) ; }
Source:
public void edit ( final org.ovirt.engine.ui.uicommonweb.models.vms.key_value.KeyValueLineModel object ) { plusButton.addClickHandler ( new com.google.gwt.event.dom.client.ClickHandler ( ) { @ java.lang.Override public void onClick ( com.google.gwt.event.dom.client.ClickEvent event ) { object.getAddLine ( ) . execute ( ) ; } } ) ; minusButton.addClickHandler ( new com.google.gwt.event.dom.client.ClickHandler ( ) { @ java.lang.Override public void onClick ( com.google.gwt.event.dom.client.ClickEvent event ) { object.getRemoveLine ( ) . execute ( ) ; } } ) ; driver.edit ( object ) ; }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { updateKeyTitle ( object ) ; }
Source:
protected void UpdatePriority ( ) { if ( ( cachedMaxPriority ) == null ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetMaxVmPriority ( new org.ovirt.engine.ui.frontend.AsyncQuery ( this , new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.VmModelBehaviorBase behavior = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.VmModelBehaviorBase ) ( target ) ) ; cachedMaxPriority = ( ( java.lang.Integer ) ( returnValue ) ) ; behavior.PostUpdatePriority ( ) ; } } , getModel ( ) . getHash ( ) ) ) ; } else { PostUpdatePriority ( ) ; } }

Target:
protected void updateSelectedCdImage ( org.ovirt.engine.core.common.businessentities.VmBase vmBase ) { getModel ( ) . getCdImage ( ) . setSelectedItem ( vmBase.getIsoPath ( ) ) ; boolean hasCd = ! ( org.ovirt.engine.core.compat.StringHelper.isNullOrEmpty ( vmBase.getIsoPath ( ) ) ) ; getModel ( ) . getCdImage ( ) . setIsChangable ( hasCd ) ; getModel ( ) . getCdAttached ( ) . setEntity ( hasCd ) ; }
Source:
public void testUpdateCantDo ( ) throws java.lang.Exception { try { update ( false , false , 1 ) ; } catch ( javax.ws.rs.WebApplicationException e ) { assertNotNull ( e.getResponse ( ) ) ; assertEquals ( 400 , e.getResponse ( ) . getStatus ( ) ) ; } }

Target:
public void testUpdateCantDo ( ) throws java.lang.Exception { try { update ( false , false , 1 ) ; } catch ( javax.ws.rs.WebApplicationException e ) { org.junit.Assert.assertNotNull ( e.getResponse ( ) ) ; org.junit.Assert.assertEquals ( 400 , e.getResponse ( ) . getStatus ( ) ) ; } }
Source:
public void getHostFingerprint ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String hostAddress ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.String ) ( source ) ) : "" ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetServerSSHKeyFingerprint , new org.ovirt.engine.core.common.queries.ServerParameters ( hostAddress ) , aQuery ) ; }

Target:
public void getStorageDomainByName ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String storageDomainName ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageDomainByName , new org.ovirt.engine.core.common.queries.NameQueryParameters ( storageDomainName ) , aQuery ) ; }