auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private void onShutdown ( ) { onPowerAction ( VdcActionType.ShutdownVm , new org.ovirt.engine.ui.uicommonweb.models.vms.VmListModel.PowerActionParametersFactory < org.ovirt.engine.core.common.action.VdcActionParametersBase > ( ) { @ java.lang.Override public org.ovirt.engine.core.common.action.VdcActionParametersBase createActionParameters ( org.ovirt.engine.core.common.businessentities.VM vm ) { return new org.ovirt.engine.core.common.action.ShutdownVmParameters ( vm.getId ( ) , true ) ; } } ) ; }

Target:
private void onShutdown ( ) { final org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel ) ( getWindow ( ) ) ) ; onPowerAction ( VdcActionType.ShutdownVm , new org.ovirt.engine.ui.uicommonweb.models.vms.VmListModel.PowerActionParametersFactory < org.ovirt.engine.core.common.action.VdcActionParametersBase > ( ) { @ java.lang.Override public org.ovirt.engine.core.common.action.VdcActionParametersBase createActionParameters ( org.ovirt.engine.core.common.businessentities.VM vm ) { return new org.ovirt.engine.core.common.action.ShutdownVmParameters ( vm.getId ( ) , true , model.getReason ( ) . getEntity ( ) ) ; } } ) ; }
Source:
public void testParseInvalidOption ( ) { org.ovirt.engine.api.restapi.util.FenceOptionsParser.parse ( "foo:one=1,two=2,three" , "one=bool,two=int,three=bool" ) ; }

Target:
public void testParseInvalidOption ( ) { java.util.List < org.ovirt.engine.api.model.PowerManagement > ret = org.ovirt.engine.api.restapi.util.FenceOptionsParser.parse ( "foo:one=1,two=2,three" , "one=bool,two=int,three=bool" ) ; assertNotNull ( ret ) ; assertEquals ( 1 , ret.size ( ) ) ; verifyResult ( ret.get ( 0 ) , "foo" , "one" , "bool" , "1" , "two" , "int" , "2" ) ; }
Source:
private boolean verifyImage ( org.ovirt.engine.core.compat.Guid transferingVdsId ) { org.ovirt.engine.core.common.vdscommands.ImageActionsVDSCommandParameters parameters = new org.ovirt.engine.core.common.vdscommands.ImageActionsVDSCommandParameters ( transferingVdsId , org.ovirt.engine.core.bll.storage.disk.image.TransferImageCommand.getStoragePool ( ) . getId ( ) , org.ovirt.engine.core.bll.storage.disk.image.TransferImageCommand.getStorageDomainId ( ) , org.ovirt.engine.core.bll.storage.disk.image.TransferImageCommand.getDiskImage ( ) . getId ( ) , org.ovirt.engine.core.bll.storage.disk.image.TransferImageCommand.getDiskImage ( ) . getImageId ( ) ) ; try { org.ovirt.engine.core.bll.storage.disk.image.TransferImageCommand.getBackend ( ) . getResourceManager ( ) . runVdsCommand ( VDSCommandType.VerifyUntrustedVolume , parameters ) ; } catch ( java.lang.RuntimeException e ) { log.error ( "Failed to verify transferred image: {}" , e ) ; return false ; } return true ; }

Target:
private boolean verifyImage ( org.ovirt.engine.core.compat.Guid transferingVdsId ) { org.ovirt.engine.core.common.vdscommands.ImageActionsVDSCommandParameters parameters = new org.ovirt.engine.core.common.vdscommands.ImageActionsVDSCommandParameters ( transferingVdsId , org.ovirt.engine.core.bll.storage.disk.image.TransferImageCommand.getStoragePool ( ) . getId ( ) , org.ovirt.engine.core.bll.storage.disk.image.TransferImageCommand.getStorageDomainId ( ) , org.ovirt.engine.core.bll.storage.disk.image.TransferImageCommand.getDiskImage ( ) . getId ( ) , org.ovirt.engine.core.bll.storage.disk.image.TransferImageCommand.getDiskImage ( ) . getImageId ( ) ) ; try { backend.getResourceManager ( ) . runVdsCommand ( VDSCommandType.VerifyUntrustedVolume , parameters ) ; } catch ( java.lang.RuntimeException e ) { log.error ( "Failed to verify transferred image: {}" , e ) ; return false ; } return true ; }
Source:
private static org.ovirt.engine.core.common.businessentities.VDSGroup createDefaultVdsGroup ( ) { org.ovirt.engine.core.common.businessentities.VDSGroup group = new org.ovirt.engine.core.common.businessentities.VDSGroup ( ) ; group.setName ( "Default" ) ; group.setId ( org.ovirt.engine.core.bll.UpdateVdsGroupCommandTest.DEFAULT_VDS_GROUP_ID ) ; group.setcpu_name ( "Intel Conroe" ) ; group.setcompatibility_version ( org.ovirt.engine.core.bll.UpdateVdsGroupCommandTest.VERSION_1_1 ) ; group.setStoragePoolId ( org.ovirt.engine.core.bll.UpdateVdsGroupCommandTest.STORAGE_POOL_ID ) ; group.setArchitecture ( ArchitectureType.x86_64 ) ; return group ; }

Target:
private static org.ovirt.engine.core.common.businessentities.VDSGroup createNewVdsGroup ( ) { org.ovirt.engine.core.common.businessentities.VDSGroup group = new org.ovirt.engine.core.common.businessentities.VDSGroup ( ) ; group.setCompatibilityVersion ( org.ovirt.engine.core.bll.UpdateVdsGroupCommandTest.VERSION_1_1 ) ; group.setName ( "Default" ) ; return group ; }
Source:
private boolean refreshHost ( ) { org.ovirt.engine.core.common.vdscommands.VDSReturnValue returnValue = runVdsCommand ( VDSCommandType.CollectVdsNetworkData , new org.ovirt.engine.core.common.vdscommands.CollectHostNetworkDataVdsCommandParameters ( getVds ( ) , java.util.Collections.< org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > emptyList ( ) ) ) ; if ( returnValue.getSucceeded ( ) ) { org.ovirt.engine.core.common.action.VdsActionParameters vdsActionParams = new org.ovirt.engine.core.common.action.VdsActionParameters ( getVdsId ( ) ) ; return runInternalAction ( VdcActionType.RefreshHostDevices , vdsActionParams ) . getSucceeded ( ) ; } return false ; }

Target:
private boolean refreshHost ( ) { org.ovirt.engine.core.common.action.VdsActionParameters vdsActionParams = new org.ovirt.engine.core.common.action.VdsActionParameters ( getVdsId ( ) ) ; return runInternalAction ( VdcActionType.RefreshHost , vdsActionParams ) . getSucceeded ( ) ; }
Source:
public org.ovirt.engine.core.common.eventqueue.EventResult masterDomainNotOperational ( org.ovirt.engine.core.compat.Guid storageDomainId , org.ovirt.engine.core.compat.Guid storagePoolId , boolean isReconstructToInactiveDomains , boolean canReconstructToCurrentMaster ) { org.ovirt.engine.core.common.action.VdcActionParametersBase parameters = new org.ovirt.engine.core.common.action.ReconstructMasterParameters ( storagePoolId , storageDomainId , true , isReconstructToInactiveDomains , canReconstructToCurrentMaster ) ; boolean isSucceeded = org.ovirt.engine.core.bll.Backend.getInstance ( ) . runInternalAction ( VdcActionType.ReconstructMasterDomain , parameters , org.ovirt.engine.core.bll.job.ExecutionHandler.createInternalJobContext ( ) ) . getSucceeded ( ) ; return new org.ovirt.engine.core.common.eventqueue.EventResult ( isSucceeded , org.ovirt.engine.core.common.eventqueue.EventType.RECONSTRUCT ) ; }

Target:
public org.ovirt.engine.core.common.eventqueue.EventResult storageDomainNotOperational ( org.ovirt.engine.core.compat.Guid storageDomainId , org.ovirt.engine.core.compat.Guid storagePoolId ) { org.ovirt.engine.core.common.action.StorageDomainPoolParametersBase parameters = new org.ovirt.engine.core.common.action.StorageDomainPoolParametersBase ( storageDomainId , storagePoolId ) ; parameters.setIsInternal ( true ) ; parameters.setInactive ( true ) ; boolean isSucceeded = backend.runInternalAction ( VdcActionType.DeactivateStorageDomain , parameters , org.ovirt.engine.core.bll.job.ExecutionHandler.createInternalJobContext ( ) ) . getSucceeded ( ) ; return new org.ovirt.engine.core.common.eventqueue.EventResult ( isSucceeded , org.ovirt.engine.core.common.eventqueue.EventType.DOMAINNOTOPERATIONAL ) ; }
Source:
public synchronized void UpdateTaskWithActionParameters ( org.ovirt.engine.core.compat.Guid taskID , org.ovirt.engine.core.common.action.VdcActionParametersBase actionParameters ) { if ( _tasks.containsKey ( taskID ) ) { org.ovirt.engine.core.common.businessentities.AsyncTasks currentDbAsyncTask = _tasks.get ( taskID ) . getParameters ( ) . getDbAsyncTask ( ) ; currentDbAsyncTask.setaction_parameters ( actionParameters ) ; org.ovirt.engine.core.bll.tasks.AsyncTaskUtils.updateAsyncTaskInDB ( _tasks.get ( taskID ) ) ; } }

Target:
public synchronized void StartPollingTask ( org.ovirt.engine.core.compat.Guid taskID ) { if ( _tasks.containsKey ( taskID ) ) { _tasks.get ( taskID ) . StartPollingTask ( ) ; } }
Source:
protected void copyVmDevices ( ) { org.ovirt.engine.core.bll.utils.VmDeviceUtils.copyVmDevices ( vmDevicesSourceId , org.ovirt.engine.core.bll.AddVmCommand.getVmId ( ) , getSrcDeviceIdToTargetDeviceIdMapping ( ) , org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . isSoundDeviceEnabled ( ) , org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . isConsoleEnabled ( ) , isVirtioScsiEnabled ( ) , false ) ; }

Target:
protected void copyVmDevices ( ) { org.ovirt.engine.core.bll.utils.VmDeviceUtils.copyVmDevices ( vmDevicesSourceId , org.ovirt.engine.core.bll.AddVmCommand.getVmId ( ) , getSrcDeviceIdToTargetDeviceIdMapping ( ) , org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . isSoundDeviceEnabled ( ) , org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . isConsoleEnabled ( ) , isVirtioScsiEnabled ( ) , isBalloonEnabled ( ) , false ) ; if ( ( org.ovirt.engine.core.bll.AddVmCommand.getInstanceTypeId ( ) ) != null ) { copyDiskDevicesFromTemplate ( ) ; } }
Source:
public static java.util.Collection < java.lang.Object [ ] > params ( ) { return java.util.Arrays.asList ( new java.lang.Object [ ] [ ] { new java.lang.Object [ ] { "Map single vnic" , org.ovirt.engine.core.bll.exportimport.vnics.FlowDigraphTest.getMapVnicFlow ( ) , "19" } , new java.lang.Object [ ] { "Map all vnics" , org.ovirt.engine.core.bll.exportimport.vnics.FlowDigraphTest.getMapVnicsCollectionFlow ( ) , "11" } } ) ; }

Target:
public static java.util.stream.Stream < org.junit.jupiter.params.provider.Arguments > printFlowAsDigraph ( ) { return java.util.stream.Stream.of ( org.junit.jupiter.params.provider.Arguments.of ( "Map single vnic" , org.ovirt.engine.core.bll.exportimport.vnics.FlowDigraphTest.getMapVnicFlow ( ) , "19" ) , org.junit.jupiter.params.provider.Arguments.of ( "Map all vnics" , org.ovirt.engine.core.bll.exportimport.vnics.FlowDigraphTest.getMapVnicsCollectionFlow ( ) , "11" ) ) ; }
Source:
public static void isSupportBridgesReportByVDSM ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String version ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Boolean ) ( source ) ) . booleanValue ( ) : true ; } } ; org.ovirt.engine.core.common.queries.GetConfigurationValueParameters tempVar = new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.SupportBridgesReportByVDSM ) ; tempVar.setVersion ( version ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigFromCache ( tempVar , aQuery ) ; }

Target:
public static void getProviderCertificateChain ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.common.businessentities.Provider provider ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetProviderCertificateChain , new org.ovirt.engine.core.common.queries.ProviderQueryParameters ( provider ) , aQuery ) ; }
Source:
public void updateGlusterServerHook ( org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity hook , org.ovirt.engine.core.compat.Guid hostId ) { getCallsHandler ( ) . executeModification ( "UpdateGlusterServerHook" , getCustomMapSqlParameterSource ( ) . addValue ( "hook_id" , hook.getId ( ) ) . addValue ( "host_id" , hostId ) . addValue ( "checksum" , hook.getChecksum ( ) ) . addValue ( "status" , org.ovirt.engine.core.common.utils.EnumUtils.nameOrNull ( hook.getStatus ( ) ) ) ) ; }

Target:
public void updateGlusterServerHook ( org.ovirt.engine.core.common.businessentities.gluster.GlusterServerHook serverHook ) { getCallsHandler ( ) . executeModification ( "UpdateGlusterServerHook" , getCustomMapSqlParameterSource ( ) . addValue ( "hook_id" , serverHook.getHookId ( ) ) . addValue ( "server_id" , serverHook.getServerId ( ) ) . addValue ( "hook_status" , org.ovirt.engine.core.common.utils.EnumUtils.nameOrNull ( serverHook.getStatus ( ) ) ) . addValue ( "content_type" , org.ovirt.engine.core.common.utils.EnumUtils.nameOrNull ( serverHook.getContentType ( ) ) ) . addValue ( "checksum" , serverHook.getChecksum ( ) ) ) ; }
Source:
public void initialize ( org.ovirt.engine.ui.uicommonweb.models.SystemTreeItemModel systemTreeSelectedItem ) { super . initialize ( systemTreeSelectedItem ) ; getModel ( ) . getVmType ( ) . setIsChangeable ( true ) ; templateValidate ( ) ; instanceTypeManager = new org.ovirt.engine.ui.uicommonweb.models.vms.instancetypes.NewPoolInstanceTypeManager ( getModel ( ) ) ; getModel ( ) . getVmInitModel ( ) . init ( null ) ; }

Target:
public void initialize ( org.ovirt.engine.ui.uicommonweb.models.SystemTreeItemModel systemTreeSelectedItem ) { super . initialize ( systemTreeSelectedItem ) ; getModel ( ) . getVmType ( ) . setIsChangeable ( true ) ; getModel ( ) . getPoolStateful ( ) . setIsChangeable ( true ) ; templateValidate ( ) ; instanceTypeManager = new org.ovirt.engine.ui.uicommonweb.models.vms.instancetypes.NewPoolInstanceTypeManager ( getModel ( ) ) ; getModel ( ) . getVmInitModel ( ) . init ( null ) ; }
Source:
private void executeFenceVdsManuallyAction ( ) { org.ovirt.engine.core.common.action.FenceVdsManualyParameters fenceVdsManuallyParams = new org.ovirt.engine.core.common.action.FenceVdsManualyParameters ( false ) ; fenceVdsManuallyParams.setStoragePoolId ( org.ovirt.engine.core.bll.VdsKdumpDetectionCommand.getVds ( ) . getStoragePoolId ( ) ) ; fenceVdsManuallyParams.setVdsId ( org.ovirt.engine.core.bll.VdsKdumpDetectionCommand.getVdsId ( ) ) ; fenceVdsManuallyParams.setSessionId ( org.ovirt.engine.core.bll.VdsKdumpDetectionCommand.getParameters ( ) . getSessionId ( ) ) ; fenceVdsManuallyParams.setParentCommand ( VdcActionType.RestartVds ) ; runInternalAction ( VdcActionType.FenceVdsManualy , fenceVdsManuallyParams , org.ovirt.engine.core.bll.VdsKdumpDetectionCommand.dupContext ( ) . setCompensationContext ( null ) . setLock ( new org.ovirt.engine.core.utils.lock.EngineLock ( getExclusiveLocks ( ) , null ) ) ) ; }

Target:
private void executeFenceVdsManuallyAction ( ) { org.ovirt.engine.core.common.action.FenceVdsManualyParameters fenceVdsManuallyParams = new org.ovirt.engine.core.common.action.FenceVdsManualyParameters ( false ) ; fenceVdsManuallyParams.setStoragePoolId ( org.ovirt.engine.core.bll.VdsKdumpDetectionCommand.getVds ( ) . getStoragePoolId ( ) ) ; fenceVdsManuallyParams.setVdsId ( org.ovirt.engine.core.bll.VdsKdumpDetectionCommand.getVdsId ( ) ) ; fenceVdsManuallyParams.setSessionId ( org.ovirt.engine.core.bll.VdsKdumpDetectionCommand.getParameters ( ) . getSessionId ( ) ) ; fenceVdsManuallyParams.setParentCommand ( VdcActionType.RestartVds ) ; runInternalAction ( VdcActionType.FenceVdsManualy , fenceVdsManuallyParams , org.ovirt.engine.core.bll.VdsKdumpDetectionCommand.dupContext ( ) . withoutCompensationContext ( ) . withLock ( new org.ovirt.engine.core.utils.lock.EngineLock ( getExclusiveLocks ( ) , null ) ) ) ; }
Source:
protected java.util.Map < java.lang.String , java.lang.String > getExclusiveLocks ( ) { if ( ( ( org.ovirt.engine.core.bll.AddDiskCommand.getParameters ( ) . getDiskInfo ( ) . isBoot ( ) ) && ( ( org.ovirt.engine.core.bll.AddDiskCommand.getParameters ( ) . getVmId ( ) ) != null ) ) && ( ! ( Guid.Empty.equals ( org.ovirt.engine.core.bll.AddDiskCommand.getParameters ( ) . getVmId ( ) ) ) ) ) { return java.util.Collections.singletonMap ( org.ovirt.engine.core.bll.AddDiskCommand.getParameters ( ) . getVmId ( ) . toString ( ) , LockingGroup.VM_DISK_BOOT.name ( ) ) ; } return null ; }

Target:
protected java.util.Map < java.lang.String , org.ovirt.engine.core.common.utils.Pair < java.lang.String , java.lang.String > > getExclusiveLocks ( ) { if ( ( ( org.ovirt.engine.core.bll.AddDiskCommand.getParameters ( ) . getDiskInfo ( ) . isBoot ( ) ) && ( ( org.ovirt.engine.core.bll.AddDiskCommand.getParameters ( ) . getVmId ( ) ) != null ) ) && ( ! ( Guid.Empty.equals ( org.ovirt.engine.core.bll.AddDiskCommand.getParameters ( ) . getVmId ( ) ) ) ) ) { return java.util.Collections.singletonMap ( org.ovirt.engine.core.bll.AddDiskCommand.getParameters ( ) . getVmId ( ) . toString ( ) , LockMessagesMatchUtil.VM_DISK_BOOT ) ; } return null ; }
Source:
public void testListCrashClientLocale ( ) { collection.setUriInfo ( setUpUriExpectations ( null ) ) ; locales.add ( org.ovirt.engine.api.restapi.resource.gluster.CLIENT_LOCALE ) ; java.lang.Throwable t = new java.lang.RuntimeException ( FAILURE ) ; setUpHooksQueryExpectations ( t ) ; try { getCollection ( ) ; org.junit.jupiter.api.Assertions.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , org.ovirt.engine.api.restapi.resource.gluster.BACKEND_FAILED_CLIENT_LOCALE , t ) ; } }

Target:
public void testListCrashClientLocale ( ) { collection.setUriInfo ( setUpUriExpectations ( null ) ) ; locales.add ( org.ovirt.engine.api.restapi.resource.gluster.CLIENT_LOCALE ) ; java.lang.Throwable t = new java.lang.RuntimeException ( FAILURE ) ; setUpHooksQueryExpectations ( t ) ; verifyFault ( org.junit.jupiter.api.Assertions.assertThrows ( javax.ws.rs.WebApplicationException.class , this :: getCollection ) , org.ovirt.engine.api.restapi.resource.gluster.BACKEND_FAILED_CLIENT_LOCALE , t ) ; }
Source:
public javax.ws.rs.core.Response add ( org.ovirt.engine.api.model.IscsiBond iscsiBond ) { validateParameters ( iscsiBond , "name" ) ; org.ovirt.engine.api.model.IscsiBond entity = getMapper ( org.ovirt.engine.api.model.IscsiBond.class , org.ovirt.engine.api.model.IscsiBond.class ) . map ( iscsiBond , null ) ; entity.setStoragePoolId ( dataCenterId ) ; return performCreate ( VdcActionType.AddIscsiBond , new org.ovirt.engine.core.common.action.AddIscsiBondParameters ( entity ) , new org.ovirt.engine.api.restapi.resource.QueryIdResolver < org.ovirt.engine.core.compat.Guid > ( org.ovirt.engine.core.common.queries.VdcQueryType.GetIscsiBondById , org.ovirt.engine.core.common.queries.IdQueryParameters.class ) ) ; }

Target:
public javax.ws.rs.core.Response add ( org.ovirt.engine.api.model.IscsiBond iscsiBond ) { validateParameters ( iscsiBond , "name" ) ; org.ovirt.engine.api.model.IscsiBond entity = getMapper ( org.ovirt.engine.api.model.IscsiBond.class , org.ovirt.engine.api.model.IscsiBond.class ) . map ( iscsiBond , null ) ; entity.setStoragePoolId ( dataCenterId ) ; return performCreate ( ActionType.AddIscsiBond , new org.ovirt.engine.core.common.action.AddIscsiBondParameters ( entity ) , new org.ovirt.engine.api.restapi.resource.QueryIdResolver < org.ovirt.engine.core.compat.Guid > ( org.ovirt.engine.core.common.queries.VdcQueryType.GetIscsiBondById , org.ovirt.engine.core.common.queries.IdQueryParameters.class ) ) ; }
Source:
public void testExtraVariables ( ) { java.lang.String command = createCommand ( new org.ovirt.engine.core.common.utils.ansible.AnsibleCommandBuilder ( ) . variables ( new org.ovirt.engine.core.common.utils.Pair ( "a" , "1" ) , new org.ovirt.engine.core.common.utils.Pair ( "b" , "2" ) , new org.ovirt.engine.core.common.utils.Pair ( "c" , "3" ) ) . playbook ( org.ovirt.engine.core.common.utils.ansible.AnsibleCommandBuilderTest.ANSIBLE_PLAYBOOK ) ) ; org.junit.Assert.assertEquals ( join ( AnsibleCommandBuilder.ANSIBLE_COMMAND , org.ovirt.engine.core.common.utils.ansible.AnsibleCommandBuilderTest.PRIVATE_KEY , "--extra-vars=a=1" , "--extra-vars=b=2" , "--extra-vars=c=3" , org.ovirt.engine.core.common.utils.ansible.AnsibleCommandBuilderTest.ANSIBLE_PLAYBOOK_FULL_PATH ) , command ) ; }

Target:
public void testVerbosityLevelZero ( ) { java.lang.String command = createCommand ( new org.ovirt.engine.core.common.utils.ansible.AnsibleCommandBuilder ( ) . verboseLevel ( AnsibleVerbosity.LEVEL0 ) . playbook ( org.ovirt.engine.core.common.utils.ansible.AnsibleCommandBuilderTest.ANSIBLE_PLAYBOOK ) ) ; org.junit.Assert.assertEquals ( join ( AnsibleCommandBuilder.ANSIBLE_COMMAND , org.ovirt.engine.core.common.utils.ansible.AnsibleCommandBuilderTest.PRIVATE_KEY , org.ovirt.engine.core.common.utils.ansible.AnsibleCommandBuilderTest.ANSIBLE_PLAYBOOK_FULL_PATH ) , command ) ; }
Source:
protected void fillMacAddressIfMissing ( org.ovirt.engine.core.common.businessentities.network.VmNic iface ) { if ( ( org.apache.commons.lang.StringUtils.isEmpty ( iface.getMacAddress ( ) ) ) && ( ( org.ovirt.engine.core.bll.ImportVmCommand.getMacPool ( ) . getAvailableMacsCount ( ) ) > 0 ) ) { iface.setMacAddress ( org.ovirt.engine.core.bll.ImportVmCommand.getMacPool ( ) . allocateNewMac ( ) ) ; } }

Target:
private boolean verifyDisksIfNeeded ( ) { if ( ( ! ( getParameters ( ) . isImportAsNewEntity ( ) ) ) && ( ! ( org.ovirt.engine.core.bll.ImportVmCommand.isImagesAlreadyOnTarget ( ) ) ) ) { return checkIfDisksExist ( imageList ) ; } return true ; }
Source:
protected void addMoveOrCopyParameters ( java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > parameters , org.ovirt.engine.core.compat.Guid sourceStorageDomainGuid , org.ovirt.engine.core.compat.Guid destStorageDomainGuid , org.ovirt.engine.core.common.businessentities.storage.DiskImage disk ) { org.ovirt.engine.core.common.action.MoveOrCopyImageGroupParameters params = createParameters ( sourceStorageDomainGuid , destStorageDomainGuid , disk ) ; params.setQuotaId ( disk.getQuotaId ( ) ) ; params.setDiskProfileId ( disk.getDiskProfileId ( ) ) ; parameters.add ( params ) ; }

Target:
protected void addMoveOrCopyParameters ( java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > parameters , org.ovirt.engine.core.compat.Guid sourceStorageDomainGuid , org.ovirt.engine.core.compat.Guid destStorageDomainGuid , org.ovirt.engine.core.common.businessentities.storage.DiskImage disk ) { org.ovirt.engine.core.common.action.MoveOrCopyImageGroupParameters params = createParameters ( sourceStorageDomainGuid , destStorageDomainGuid , disk ) ; params.setQuotaId ( disk.getQuotaId ( ) ) ; params.setDiskProfileId ( disk.getDiskProfileId ( ) ) ; params.setNewAlias ( disk.getDiskAlias ( ) ) ; parameters.add ( params ) ; }
Source:
private static void AddGroupToUser ( org.ovirt.engine.core.common.businessentities.LdapUser user , java.lang.String groupName ) { if ( ! ( user.getGroups ( ) . containsKey ( groupName ) ) ) { org.ovirt.engine.core.common.businessentities.LdapGroup group = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getAdGroupDao ( ) . getByName ( groupName ) ; if ( group != null ) { user.getGroups ( ) . put ( groupName , group ) ; } else { user.getGroups ( ) . put ( groupName , new org.ovirt.engine.core.common.businessentities.LdapGroup ( ) ) ; } } }

Target:
private static void AddGroupToUser ( org.ovirt.engine.core.common.businessentities.LdapUser user , java.lang.String groupName ) { if ( ! ( user.getGroups ( ) . containsKey ( groupName ) ) ) { org.ovirt.engine.core.common.businessentities.DbGroup dbGroup = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getDbGroupDao ( ) . getByName ( groupName ) ; org.ovirt.engine.core.common.businessentities.LdapGroup ldapGroup = null ; if ( dbGroup != null ) { ldapGroup = new org.ovirt.engine.core.common.businessentities.LdapGroup ( dbGroup ) ; } else { ldapGroup = new org.ovirt.engine.core.common.businessentities.LdapGroup ( ) ; } user.getGroups ( ) . put ( groupName , ldapGroup ) ; } }
Source:
public static void GetExternalProviderHostList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid providerId , boolean filterOutExistingHosts , java.lang.String searchFilter ) { 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.VDS > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetHostListFromExternalProvider , new org.ovirt.engine.core.common.queries.GetHostListFromExternalProviderParameters ( providerId , filterOutExistingHosts , searchFilter ) , aQuery ) ; }

Target:
public static void getVmGuestAgentInterfacesByVmId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid vmId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmGuestAgentInterface > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVmGuestAgentInterfacesByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) , aQuery ) ; }
Source:
public org.ovirt.engine.core.common.action.VdcActionParametersBase getParameters ( org.ovirt.engine.api.model.Storage incoming , org.ovirt.engine.core.common.businessentities.StorageServerConnections entity ) { org.ovirt.engine.core.common.businessentities.StorageServerConnections connection = map ( incoming , entity ) ; org.ovirt.engine.core.compat.Guid hostId = org.ovirt.engine.core.compat.Guid.Empty ; if ( ( incoming.getHost ( ) ) != null ) { hostId = getHostId ( incoming.getHost ( ) ) ; } return new org.ovirt.engine.core.common.action.StorageServerConnectionParametersBase ( connection , hostId ) ; }

Target:
public org.ovirt.engine.core.common.action.VdcActionParametersBase getParameters ( org.ovirt.engine.api.model.StorageConnection incoming , org.ovirt.engine.core.common.businessentities.StorageServerConnections entity ) { org.ovirt.engine.core.common.businessentities.StorageServerConnections connection = map ( incoming , entity ) ; org.ovirt.engine.core.compat.Guid hostId = org.ovirt.engine.core.compat.Guid.Empty ; if ( ( incoming.getHost ( ) ) != null ) { hostId = getHostId ( incoming.getHost ( ) ) ; } return new org.ovirt.engine.core.common.action.StorageServerConnectionParametersBase ( connection , hostId ) ; }
Source:
void addReportedDevices ( org.ovirt.engine.api.model.NIC model , org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface entity ) { java.util.List < org.ovirt.engine.api.model.ReportedDevice > devices = getDevices ( entity.getVmId ( ) , entity.getMacAddress ( ) ) ; if ( ! ( devices.isEmpty ( ) ) ) { org.ovirt.engine.api.model.ReportedDevices reportedDevices = new org.ovirt.engine.api.model.ReportedDevices ( ) ; reportedDevices.getReportedDevices ( ) . addAll ( devices ) ; model.setReportedDevices ( reportedDevices ) ; } }

Target:
void addReportedDevices ( org.ovirt.engine.api.model.Nic model , org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface entity ) { java.util.List < org.ovirt.engine.api.model.ReportedDevice > devices = getDevices ( entity.getVmId ( ) , entity.getMacAddress ( ) ) ; if ( ! ( devices.isEmpty ( ) ) ) { org.ovirt.engine.api.model.ReportedDevices reportedDevices = new org.ovirt.engine.api.model.ReportedDevices ( ) ; reportedDevices.getReportedDevices ( ) . addAll ( devices ) ; model.setReportedDevices ( reportedDevices ) ; } }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc glusterVolumeGeoRepSessionStart ( java.lang.String volumeName , java.lang.String remoteHost , java.lang.String remoteVolumeName , java.lang.String userName , java.lang.Boolean force ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "GlusterVolume.geoRepSessionStart" ) . withParameter ( "volumeName" , volumeName ) . withParameter ( "remoteHost" , remoteHost ) . withParameter ( "remoteVolumeName" , remoteVolumeName ) . withOptionalParameter ( "remoteUserName" , userName ) . withParameter ( "force" , force ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( response ) ; }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturn glusterVolumeGeoRepSessionStart ( java.lang.String volumeName , java.lang.String remoteHost , java.lang.String remoteVolumeName , java.lang.String userName , java.lang.Boolean force ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "GlusterVolume.geoRepSessionStart" ) . withParameter ( "volumeName" , volumeName ) . withParameter ( "remoteHost" , remoteHost ) . withParameter ( "remoteVolumeName" , remoteVolumeName ) . withOptionalParameter ( "remoteUserName" , userName ) . withParameter ( "force" , force ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturn ( response ) ; }
Source:
public void getNumberOfActiveVmsInCluster ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { if ( ( aQuery.converterCallback ) == null ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return java.lang.Integer.valueOf ( 0 ) ; } return source ; } } ; } org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetNumberOfActiveVmsInVdsGroupByVdsGroupId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( clusterId ) , aQuery ) ; }

Target:
public void getNumberOfActiveVmsInCluster ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { if ( ( aQuery.converterCallback ) == null ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return java.lang.Integer.valueOf ( 0 ) ; } return source ; } } ; } org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetNumberOfActiveVmsInClusterByClusterId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( clusterId ) , aQuery ) ; }
Source:
protected java.util.Map < java.lang.String , java.lang.String > getExclusiveLocks ( ) { if ( ! ( org.apache.commons.lang.StringUtils.isBlank ( org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . getVm ( ) . getVmName ( ) ) ) ) { return java.util.Collections.singletonMap ( org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . getVm ( ) . getVmName ( ) , LockingGroup.VM_NAME.name ( ) ) ; } return null ; }

Target:
protected java.util.Map < java.lang.String , org.ovirt.engine.core.common.utils.Pair < java.lang.String , java.lang.String > > getExclusiveLocks ( ) { if ( ! ( org.apache.commons.lang.StringUtils.isBlank ( org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . getVm ( ) . getName ( ) ) ) ) { return java.util.Collections.singletonMap ( org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . getVm ( ) . getName ( ) , LockMessagesMatchUtil.VM_NAME ) ; } return null ; }
Source:
protected boolean validateGraphicsAndDisplay ( ) { return org.ovirt.engine.core.bll.VmHandler.isGraphicsAndDisplaySupported ( org.ovirt.engine.core.bll.ImportVmCommandBase.getParameters ( ) . getVm ( ) . getOs ( ) , getGraphicsTypesForVm ( ) , org.ovirt.engine.core.bll.ImportVmCommandBase.getParameters ( ) . getVm ( ) . getDefaultDisplayType ( ) , org.ovirt.engine.core.bll.ImportVmCommandBase.getReturnValue ( ) . getCanDoActionMessages ( ) , org.ovirt.engine.core.bll.ImportVmCommandBase.getVdsGroup ( ) . getCompatibilityVersion ( ) ) ; }

Target:
protected boolean validateGraphicsAndDisplay ( ) { return org.ovirt.engine.core.bll.VmHandler.isGraphicsAndDisplaySupported ( org.ovirt.engine.core.bll.ImportVmCommandBase.getParameters ( ) . getVm ( ) . getOs ( ) , getGraphicsTypesForVm ( ) , org.ovirt.engine.core.bll.ImportVmCommandBase.getParameters ( ) . getVm ( ) . getDefaultDisplayType ( ) , org.ovirt.engine.core.bll.ImportVmCommandBase.getReturnValue ( ) . getCanDoActionMessages ( ) , getEffectiveCompatibilityVersion ( ) ) ; }
Source:
private org.ovirt.engine.core.bll.interfaces.BackendCommandObjectsHandler getBackendCommandObjectsHandler ( ) { try { javax.naming.InitialContext ctx = new javax.naming.InitialContext ( ) ; return ( ( org.ovirt.engine.core.bll.interfaces.BackendCommandObjectsHandler ) ( ctx.lookup ( org.ovirt.engine.core.bll.CommandBase.BACKEND_COMMAND_OBJECTS_HANDLER_JNDI_NAME ) ) ) ; } catch ( javax.naming.NamingException e ) { log.error ( ( "Getting backend command objects handler failed" + ( e.getMessage ( ) ) ) ) ; log.debug ( "" , e ) ; return null ; } }

Target:
private void clearChildAsyncTasksWithOutVdsmId ( ) { for ( java.util.Map.Entry < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.bll.CommandBase < ? > > entry : childCommandsMap.entrySet ( ) ) { entry.getValue ( ) . clearAsyncTasksWithOutVdsmId ( ) ; entry.getValue ( ) . clearChildAsyncTasksWithOutVdsmId ( ) ; } }
Source:
void localize ( org.ovirt.engine.ui.webadmin.ApplicationConstants constants ) { titleLabel.setText ( constants.configurePopupTitle ( ) ) ; closeButton.setText ( constants.closeButtonLabel ( ) ) ; rolesTab.setLabel ( constants.configureRoleTabLabel ( ) ) ; systemPermissionsTab.setLabel ( constants.configureSystemPermissionTabLabel ( ) ) ; }

Target:
void localize ( org.ovirt.engine.ui.webadmin.ApplicationConstants constants ) { titleLabel.setText ( constants.configurePopupTitle ( ) ) ; closeButton.setText ( constants.closeButtonLabel ( ) ) ; rolesTab.setLabel ( constants.configureRoleTabLabel ( ) ) ; clusterPoliciesTab.setLabel ( constants.configureClusterPolicyTabLabel ( ) ) ; systemPermissionsTab.setLabel ( constants.configureSystemPermissionTabLabel ( ) ) ; }
Source:
protected void onReset ( ) { super . onReset ( ) ; if ( ! ( hasReportsModelRefreshEvent ( ) ) ) { org.ovirt.engine.ui.webadmin.section.main.presenter.tab.MainTabReportsPresenter.reportsWebappDeployed = false ; getModel ( ) . getReportModelRefreshEvent ( ) . addListener ( new org.ovirt.engine.ui.webadmin.section.main.presenter.tab.MainTabReportsPresenter.ReportsModelRefreshEvent ( ) ) ; } setSubTabPanelVisible ( false ) ; getModel ( ) . refreshReportModel ( ) ; }

Target:
private boolean hasReportsModelRefreshEvent ( ) { for ( org.ovirt.engine.ui.uicompat.IEventListener < ? extends org.ovirt.engine.ui.uicompat.EventArgs > listnr : ( ( java.util.List < org.ovirt.engine.ui.uicompat.IEventListener < ? extends org.ovirt.engine.ui.uicompat.EventArgs > > ) ( getModel ( ) . getReportsAvailabilityEvent ( ) . getListeners ( ) ) ) ) { if ( listnr instanceof org.ovirt.engine.ui.webadmin.section.main.presenter.tab.MainTabReportsPresenter.ReportsModelRefreshEvent ) { return true ; } } return false ; }
Source:
public static void getPermissionsByAdElementId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid userId ) { 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.Permissions > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Permissions > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetPermissionsByAdElementId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( userId ) , aQuery ) ; }

Target:
public void getUserMessageOfTheDayViaPublic ( 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.frontend.Frontend.getInstance ( ) . runPublicQuery ( VdcQueryType.GetConfigurationValue , new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.UserMessageOfTheDay , getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
protected void freeLock ( ) { if ( ( context.getLock ( ) ) != null ) { getLockManager ( ) . releaseLock ( context.getLock ( ) ) ; log.infoFormat ( "Lock freed to object {0}" , context.getLock ( ) ) ; context.withLock ( null ) ; } }

Target:
protected void freeLock ( ) { if ( ( context.getLock ( ) ) != null ) { getLockManager ( ) . releaseLock ( context.getLock ( ) ) ; log.info ( "Lock freed to object '{}'" , context.getLock ( ) ) ; context.withLock ( null ) ; } }
Source:
protected boolean canMigrateVm ( org.ovirt.engine.core.compat.Guid vmGuid , java.util.ArrayList < java.lang.String > reasons ) { boolean canMigrateVM = super . canMigrateVm ( vmGuid , reasons ) ; org.ovirt.engine.core.common.businessentities.VM vm = org.ovirt.engine.core.bll.InternalMigrateVmCommand.getVm ( ) ; canMigrateVM = ( ( vm.getMigrationSupport ( ) ) == ( org.ovirt.engine.core.common.businessentities.MigrationSupport.MIGRATABLE ) ) && canMigrateVM ; return canMigrateVM ; }

Target:
protected boolean canMigrateVm ( org.ovirt.engine.core.compat.Guid vmGuid , java.util.ArrayList < java.lang.String > reasons ) { if ( ( org.ovirt.engine.core.bll.InternalMigrateVmCommand.getVm ( ) . getMigrationSupport ( ) ) == ( org.ovirt.engine.core.common.businessentities.MigrationSupport.MIGRATABLE ) ) { return super . canMigrateVm ( vmGuid , reasons ) ; } else { return failCanDoAction ( VdcBllMessages.ACTION_TYPE_FAILED_VM_IS_NON_MIGRTABLE ) ; } }
Source:
protected void proceedProxyReturnValue ( ) { org.ovirt.engine.core.common.errors.VdcBllErrors returnStatus = GetReturnValueFromStatus ( org.ovirt.engine.core.vdsbroker.vdsbroker.HSMRevertTaskVDSCommand.getReturnStatus ( ) ) ; switch ( returnStatus ) { case UnknownTask : log.error ( java.lang.String.format ( "Trying to revert unknown task: %1$s" , org.ovirt.engine.core.vdsbroker.vdsbroker.HSMRevertTaskVDSCommand.getParameters ( ) . getTaskId ( ) ) ) ; return ; } super . proceedProxyReturnValue ( ) ; }

Target:
protected void proceedProxyReturnValue ( ) { org.ovirt.engine.core.common.errors.VdcBllErrors returnStatus = getReturnValueFromStatus ( org.ovirt.engine.core.vdsbroker.vdsbroker.HSMRevertTaskVDSCommand.getReturnStatus ( ) ) ; switch ( returnStatus ) { case UnknownTask : log.error ( java.lang.String.format ( "Trying to revert unknown task: %1$s" , org.ovirt.engine.core.vdsbroker.vdsbroker.HSMRevertTaskVDSCommand.getParameters ( ) . getTaskId ( ) ) ) ; return ; } super . proceedProxyReturnValue ( ) ; }
Source:
public static void getRpmVersionViaPublic ( 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.frontend.Frontend.RunPublicQuery ( VdcQueryType.GetConfigurationValue , new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.ProductRPMVersion , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public static void getGlusterRebalanceStatus ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId , org.ovirt.engine.core.compat.Guid volumeId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter < org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeTaskStatusEntity > ( ) { @ java.lang.Override public org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeTaskStatusEntity Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return ( ( org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeTaskStatusEntity ) ( source ) ) ; } } ; org.ovirt.engine.core.common.queries.gluster.GlusterVolumeQueriesParameters parameters = new org.ovirt.engine.core.common.queries.gluster.GlusterVolumeQueriesParameters ( clusterId , volumeId ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetGlusterVolumeRebalanceStatus , parameters , aQuery ) ; }
Source:
private static void getVlanParentInterface ( org.ovirt.engine.core.compat.Guid vdsID , org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface , 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 ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVlanParent , new org.ovirt.engine.core.common.queries.InterfaceAndIdQueryParameters ( vdsID , iface ) , aQuery ) ; }

Target:
public void getExternalProviderComputeResourceList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.common.businessentities.Provider provider ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ExternalComputeResource > ( ) ; } return source ; } } ; org.ovirt.engine.core.common.queries.ProviderQueryParameters params = new org.ovirt.engine.core.common.queries.ProviderQueryParameters ( ) ; params.setProvider ( provider ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetComputeResourceFromExternalProvider , params , aQuery ) ; }
Source:
protected org.ovirt.engine.core.bll.validator.storage.StorageDomainValidator getStorageDomainValidator ( java.util.Map.Entry < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.bll.validator.storage.StorageDomainValidator > entry ) { if ( ( entry.getValue ( ) ) == null ) { entry.setValue ( new org.ovirt.engine.core.bll.validator.storage.StorageDomainValidator ( getStorageDomainDAO ( ) . getForStoragePool ( entry.getKey ( ) , storagePoolId ) ) ) ; } return entry.getValue ( ) ; }

Target:
protected org.ovirt.engine.core.bll.validator.storage.StorageDomainValidator getStorageDomainValidator ( java.util.Map.Entry < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.bll.validator.storage.StorageDomainValidator > entry ) { if ( ( entry.getValue ( ) ) == null ) { entry.setValue ( new org.ovirt.engine.core.bll.validator.storage.StorageDomainValidator ( getStorageDomainDao ( ) . getForStoragePool ( entry.getKey ( ) , storagePoolId ) ) ) ; } return entry.getValue ( ) ; }
Source:
public void validateVmShareableDisk ( ) { createParameters ( ) ; org.ovirt.engine.core.common.businessentities.storage.DiskImage diskImage = initDiskImage ( diskImageGroupId , diskImageId ) ; diskImage.setShareable ( true ) ; initVm ( VMStatus.Up , org.ovirt.engine.core.compat.Guid.newGuid ( ) , diskImageGroupId ) ; org.junit.Assert.assertFalse ( command.validate ( ) ) ; org.junit.Assert.assertTrue ( command.getReturnValue ( ) . getValidationMessages ( ) . contains ( EngineMessage.ACTION_TYPE_FAILED_SHAREABLE_DISK_NOT_SUPPORTED.toString ( ) ) ) ; }

Target:
public void validateFailsWhenCreateAllSnapshotFromVmValidationFails ( ) { org.ovirt.engine.core.common.businessentities.StorageDomain srcStorageDomain = initStorageDomain ( srcStorageId ) ; srcStorageDomain.setStatus ( StorageDomainStatus.Active ) ; org.ovirt.engine.core.common.businessentities.StorageDomain dstStorageDomain = initStorageDomain ( dstStorageId ) ; dstStorageDomain.setStatus ( StorageDomainStatus.Active ) ; initDiskImage ( diskImageGroupId , diskImageId ) ; initVm ( VMStatus.Up , org.ovirt.engine.core.compat.Guid.newGuid ( ) , diskImageGroupId ) ; org.mockito.Mockito.doReturn ( false ) . when ( command ) . validateCreateAllSnapshotsFromVmCommand ( ) ; org.junit.Assert.assertFalse ( command.validate ( ) ) ; }
Source:
protected void executeQueryCommand ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.HostDeviceView > hostDeviceList = hostDeviceDao.getVmExtendedHostDevicesByVmId ( org.ovirt.engine.core.bll.GetExtendedVmHostDevicesByVmIdQuery.getParameters ( ) . getId ( ) ) ; org.ovirt.engine.core.bll.GetExtendedVmHostDevicesByVmIdQuery.getQueryReturnValue ( ) . setReturnValue ( hostDeviceList ) ; }

Target:
protected void executeQueryCommand ( ) { java.util.Set < java.lang.String > primaryDevices = getNonPlaceholderDeviceNames ( ) ; java.util.List < org.ovirt.engine.core.common.businessentities.HostDeviceView > hostDeviceList = hostDeviceDao.getVmExtendedHostDevicesByVmId ( org.ovirt.engine.core.bll.GetExtendedVmHostDevicesByVmIdQuery.getParameters ( ) . getId ( ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.HostDeviceView > result = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.HostDeviceView deviceView : hostDeviceList ) { if ( primaryDevices.contains ( deviceView.getDeviceName ( ) ) ) { result.add ( deviceView ) ; } } org.ovirt.engine.core.bll.GetExtendedVmHostDevicesByVmIdQuery.getQueryReturnValue ( ) . setReturnValue ( result ) ; }
Source:
protected void executeVdsBrokerCommand ( ) { java.lang.Boolean includeUserData = org.ovirt.engine.core.common.config.Config.< java.lang.Boolean > getValue ( ConfigValues.SendVmTicketUID , org.ovirt.engine.core.vdsbroker.vdsbroker.SetVmTicketVDSCommand.getVds ( ) . getVdsGroupCompatibilityVersion ( ) . toString ( ) ) ; if ( org.ovirt.engine.core.common.FeatureSupported.graphicsDeviceEnabled ( org.ovirt.engine.core.vdsbroker.vdsbroker.SetVmTicketVDSCommand.getVds ( ) . getVdsGroupCompatibilityVersion ( ) ) ) { setTicketUsingUpdateDevice ( includeUserData ) ; } else { setTicketLegacy ( includeUserData ) ; } org.ovirt.engine.core.vdsbroker.vdsbroker.SetVmTicketVDSCommand.proceedProxyReturnValue ( ) ; }

Target:
protected void executeVdsBrokerCommand ( ) { java.lang.Boolean includeUserData = org.ovirt.engine.core.common.config.Config.< java.lang.Boolean > getValue ( ConfigValues.SendVmTicketUID , org.ovirt.engine.core.vdsbroker.vdsbroker.SetVmTicketVDSCommand.getVds ( ) . getClusterCompatibilityVersion ( ) . toString ( ) ) ; if ( org.ovirt.engine.core.common.FeatureSupported.graphicsDeviceEnabled ( org.ovirt.engine.core.vdsbroker.vdsbroker.SetVmTicketVDSCommand.getVds ( ) . getClusterCompatibilityVersion ( ) ) ) { setTicketUsingUpdateDevice ( includeUserData ) ; } else { setTicketLegacy ( includeUserData ) ; } org.ovirt.engine.core.vdsbroker.vdsbroker.SetVmTicketVDSCommand.proceedProxyReturnValue ( ) ; }