auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void ResetIrs ( ) { setmCurrentIrsHost ( null ) ; setmIrsProxy ( null ) ; mCurrentVdsId = null ; org.ovirt.engine.core.common.businessentities.storage_pool storagePool = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStoragePoolDAO ( ) . get ( _storagePoolId ) ; if ( storagePool != null ) { storagePool.setspm_vds_id ( null ) ; org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStoragePoolDAO ( ) . update ( storagePool ) ; } }

Target:
public void ResetIrs ( ) { setmCurrentIrsHost ( null ) ; setmIrsProxy ( null ) ; mCurrentVdsId = null ; org.ovirt.engine.core.common.businessentities.storage_pool storagePool = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStoragePoolDao ( ) . get ( _storagePoolId ) ; if ( storagePool != null ) { storagePool.setspm_vds_id ( null ) ; org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStoragePoolDao ( ) . update ( storagePool ) ; } }
Source:
public org.ovirt.engine.core.common.businessentities.AsyncTasks getByVdsmTaskId ( org.ovirt.engine.core.compat.Guid vdsmTaskId ) { org.ovirt.engine.core.common.businessentities.AsyncTasks asyncTask = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getAsyncTaskDao ( ) . getByVdsmTaskId ( vdsmTaskId ) ; if ( asyncTask != null ) { map ( coco.getCommandEntity ( asyncTask.getCommandId ( ) ) , asyncTask ) ; } return asyncTask ; }

Target:
public org.ovirt.engine.core.common.businessentities.AsyncTask getByVdsmTaskId ( org.ovirt.engine.core.compat.Guid vdsmTaskId ) { org.ovirt.engine.core.common.businessentities.AsyncTask asyncTask = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getAsyncTaskDao ( ) . getByVdsmTaskId ( vdsmTaskId ) ; if ( asyncTask != null ) { asyncTask.setRootCmdEntity ( getCommandEntity ( asyncTask.getRootCommandId ( ) ) ) ; asyncTask.setChildCmdEntity ( getCommandEntity ( asyncTask.getCommandId ( ) ) ) ; } return asyncTask ; }
Source:
protected boolean performImagesChecks ( org.ovirt.engine.core.common.businessentities.VM vm ) { return org.ovirt.engine.core.bll.ImagesHandler.PerformImagesChecks ( vm , org.ovirt.engine.core.bll.AddDiskCommand.getReturnValue ( ) . getCanDoActionMessages ( ) , vm.getstorage_pool_id ( ) , getStorageDomainId ( ) . getValue ( ) , false , true , false , false , true , false , false , true , null ) ; }

Target:
protected boolean performImagesChecks ( org.ovirt.engine.core.common.businessentities.VM vm ) { return org.ovirt.engine.core.bll.ImagesHandler.PerformImagesChecks ( vm , org.ovirt.engine.core.bll.AddDiskCommand.getReturnValue ( ) . getCanDoActionMessages ( ) , vm.getstorage_pool_id ( ) , getStorageDomainId ( ) . getValue ( ) , false , true , false , false , true , false , false , true , java.util.Collections.emptyList ( ) ) ; }
Source:
public java.lang.Boolean call ( ) throws java.lang.Exception { if ( ( _resultError ) || ( ! ( _installIncomplete ) ) ) { _parser.cliNoop ( ) ; } else { java.lang.String [ ] msgs = ( ( java.lang.String [ ] ) ( _parser.cliEnvironmentGet ( org.ovirt.ovirt_host_deploy.constants.CoreEnv.INSTALL_INCOMPLETE_REASONS ) ) ) ; _messages.post ( InstallerMessages.Severity.WARNING , "Installation is incomplete, manual intervention is required" ) ; for ( java.lang.String m : msgs ) { _messages.post ( InstallerMessages.Severity.WARNING , m ) ; } } return true ; }

Target:
public java.lang.Boolean call ( ) throws java.lang.Exception { if ( ( _resultError ) || ( ! ( _installIncomplete ) ) ) { _parser.cliNoop ( ) ; } else { java.lang.String [ ] msgs = ( ( java.lang.String [ ] ) ( _parser.cliEnvironmentGet ( org.ovirt.ovirt_host_deploy.constants.CoreEnv.INSTALL_INCOMPLETE_REASONS ) ) ) ; userVisibleLog ( java.util.logging.Level.WARNING , "Installation is incomplete, manual intervention is required" ) ; for ( java.lang.String m : msgs ) { userVisibleLog ( java.util.logging.Level.WARNING , m ) ; } } return true ; }
Source:
public java.util.List < org.ovirt.engine.core.common.businessentities.VDS > getHostsForStorageOperation ( org.ovirt.engine.core.compat.Guid storagePoolId , boolean localFsOnly ) { if ( ( storagePoolId == null ) || ( storagePoolId.equals ( Guid.Empty ) ) ) { storagePoolId = null ; } return getCallsHandler ( ) . executeReadList ( "getHostsForStorageOperation" , org.ovirt.engine.core.dao.VdsDAODbFacadeImpl.VdsRowMapper.instance , getCustomMapSqlParameterSource ( ) . addValue ( "storage_pool_id" , storagePoolId ) . addValue ( "local_fs_only" , localFsOnly ) ) ; }

Target:
public java.util.List < org.ovirt.engine.core.common.businessentities.VDS > getHostsForStorageOperation ( org.ovirt.engine.core.compat.Guid storagePoolId , boolean localFsOnly ) { if ( ( storagePoolId == null ) || ( storagePoolId.equals ( Guid.Empty ) ) ) { storagePoolId = null ; } java.util.List < org.ovirt.engine.core.common.businessentities.VDS > vdsList = getCallsHandler ( ) . executeReadList ( "getHostsForStorageOperation" , org.ovirt.engine.core.dao.VdsDAODbFacadeImpl.VdsRowMapper.instance , getCustomMapSqlParameterSource ( ) . addValue ( "storage_pool_id" , storagePoolId ) . addValue ( "local_fs_only" , localFsOnly ) ) ; return uniteAgents ( vdsList ) ; }
Source:
public void testUpdateNotFound ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpEntityQueryExpectations ( 1 , 0 , true ) ; org.ovirt.engine.api.restapi.resource.BackendVnicProfileResource resource = ( ( org.ovirt.engine.api.restapi.resource.BackendVnicProfileResource ) ( this . resource ) ) ; try { resource.update ( org.ovirt.engine.api.restapi.resource.BackendVnicProfileResourceTest.getModel ( 0 ) ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }

Target:
public void testUpdateNotFound ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpEntityQueryExpectations ( 1 , 0 , true ) ; org.ovirt.engine.api.restapi.resource.BackendVnicProfileResource resource = ( ( org.ovirt.engine.api.restapi.resource.BackendVnicProfileResource ) ( this . resource ) ) ; try { resource.update ( org.ovirt.engine.api.restapi.resource.BackendVnicProfileResourceTest.getModel ( 0 ) ) ; org.junit.Assert.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }
Source:
public void canDoActionSucceedsWithForceOption ( ) throws java.lang.Exception { command = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.RemoveVdsCommand < org.ovirt.engine.core.common.action.RemoveVdsParameters > ( new org.ovirt.engine.core.common.action.RemoveVdsParameters ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) , true ) ) ) ; prepareMocks ( ) ; mockVdsWithStatus ( VDSStatus.Maintenance ) ; mockVdsDynamic ( ) ; mockVmsPinnedToHost ( java.util.Collections.< java.lang.String > emptyList ( ) ) ; mockIsGlusterEnabled ( true ) ; mockHasVolumeOnServer ( true ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionSuccess ( command ) ; }

Target:
public void canDoActionSucceedsWithForceOption ( ) throws java.lang.Exception { command = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.RemoveVdsCommand < org.ovirt.engine.core.common.action.RemoveVdsParameters > ( new org.ovirt.engine.core.common.action.RemoveVdsParameters ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , true ) ) ) ; prepareMocks ( ) ; mockVdsWithStatus ( VDSStatus.Maintenance ) ; mockVdsDynamic ( ) ; mockVmsPinnedToHost ( java.util.Collections.< java.lang.String > emptyList ( ) ) ; mockIsGlusterEnabled ( true ) ; mockHasVolumeOnServer ( true ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionSuccess ( command ) ; }
Source:
public void testGet ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpEntityQueryExpectations ( getEntityList ( ) ) ; control.replay ( ) ; org.ovirt.engine.api.model.Label model = resource.get ( ) ; assertEquals ( org.ovirt.engine.api.restapi.resource.BackendHostNicLabelResourceTest.LABELS [ 0 ] , model.getId ( ) ) ; verifyLinks ( model ) ; }

Target:
public void testGet ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpEntityQueryExpectations ( getEntityList ( ) ) ; control.replay ( ) ; org.ovirt.engine.api.model.NetworkLabel model = resource.get ( ) ; assertEquals ( org.ovirt.engine.api.restapi.resource.BackendHostNicLabelResourceTest.LABELS [ 0 ] , model.getId ( ) ) ; verifyLinks ( model ) ; }
Source:
public void canDoActionFailsOnNullHookId ( ) { cmd = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.gluster.DisableGlusterHookCommand ( new org.ovirt.engine.core.common.action.gluster.GlusterHookParameters ( CLUSTER_ID , null ) ) ) ; setupMocks ( cmd ) ; org.junit.Assert.assertFalse ( cmd.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( cmd.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( VdcBllMessages.ACTION_TYPE_FAILED_GLUSTER_HOOK_ID_IS_REQUIRED.toString ( ) ) ) ; }

Target:
public void canDoActionFailsOnNullHook ( ) { cmd = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.gluster.DisableGlusterHookCommand < org.ovirt.engine.core.common.action.gluster.GlusterHookParameters > ( new org.ovirt.engine.core.common.action.gluster.GlusterHookParameters ( HOOK_ID ) ) ) ; setupMocks ( cmd , false ) ; org.junit.Assert.assertFalse ( cmd.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( cmd.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( VdcBllMessages.ACTION_TYPE_FAILED_GLUSTER_HOOK_DOES_NOT_EXIST.toString ( ) ) ) ; }
Source:
private void fetchCpuProfiles ( org.ovirt.engine.core.compat.Guid clusterId ) { org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetCpuProfilesByClusterId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( clusterId ) , new org.ovirt.engine.ui.frontend.AsyncQuery ( new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { java.util.List < org.ovirt.engine.core.common.businessentities.profiles.CpuProfile > cpuProfiles = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ; getCpuProfiles ( ) . setItems ( cpuProfiles ) ; } } ) ) ; }

Target:
private void fetchCpuProfiles ( org.ovirt.engine.core.compat.Guid clusterId ) { org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetCpuProfilesByClusterId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( clusterId ) , new org.ovirt.engine.ui.uicommonweb.models.vms.AsyncQuery ( new org.ovirt.engine.ui.frontend.AsyncCallback < org.ovirt.engine.core.common.queries.VdcQueryReturnValue > ( ) { @ java.lang.Override public void onSuccess ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue returnValue ) { java.util.List < org.ovirt.engine.core.common.businessentities.profiles.CpuProfile > cpuProfiles = returnValue.getReturnValue ( ) ; getCpuProfiles ( ) . setItems ( cpuProfiles ) ; } } ) ) ; }
Source:
private boolean serverExists ( java.util.List < org.ovirt.engine.core.common.businessentities.VDS > serversList , org.ovirt.engine.core.common.businessentities.gluster.GlusterServerInfo glusterServer ) { for ( org.ovirt.engine.core.common.businessentities.VDS server : serversList ) { java.lang.String serverHostnameOrIp = ( server.getHostName ( ) . isEmpty ( ) ) ? server.getManagmentIp ( ) : server.getHostName ( ) ; if ( serverHostnameOrIp.equalsIgnoreCase ( glusterServer.getHostnameOrIp ( ) ) ) { return true ; } } return false ; }

Target:
protected org.ovirt.engine.core.dao.gluster.GlusterDBUtils getDbUtils ( ) { return org.ovirt.engine.core.dao.gluster.GlusterDBUtils.getInstance ( ) ; }
Source:
public static org.ovirt.engine.core.aaa.DirectoryUser fetchPrincipalRecord ( final org.ovirt.engine.core.extensions.mgr.ExtensionProxy extension , org.ovirt.engine.api.extensions.ExtMap authRecord ) { return org.ovirt.engine.core.aaa.AuthzUtils.mapPrincipalRecord ( extension , extension.invoke ( new org.ovirt.engine.api.extensions.ExtMap ( ) . mput ( Base.InvokeKeys.COMMAND , Authz.InvokeCommands.FETCH_PRINCIPAL_RECORD ) . mput ( Authn.InvokeKeys.AUTH_RECORD , authRecord ) ) . < org.ovirt.engine.api.extensions.ExtMap > get ( Authz.InvokeKeys.PRINCIPAL_RECORD ) ) ; }

Target:
public static org.ovirt.engine.core.aaa.DirectoryUser fetchPrincipalRecord ( final org.ovirt.engine.core.extensions.mgr.ExtensionProxy extension , org.ovirt.engine.api.extensions.ExtMap authRecord ) { return org.ovirt.engine.core.aaa.AuthzUtils.mapPrincipalRecord ( extension , extension.invoke ( new org.ovirt.engine.api.extensions.ExtMap ( ) . mput ( Base.InvokeKeys.COMMAND , Authz.InvokeCommands.FETCH_PRINCIPAL_RECORD ) . mput ( Authn.InvokeKeys.AUTH_RECORD , authRecord ) . mput ( Authz.InvokeKeys.QUERY_FLAGS , ( ( Authz.QueryFlags.RESOLVE_GROUPS ) | ( Authz.QueryFlags.RESOLVE_GROUPS_RECURSIVE ) ) ) ) . < org.ovirt.engine.api.extensions.ExtMap > get ( Authz.InvokeKeys.PRINCIPAL_RECORD ) ) ; }
Source:
protected org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface map ( org.ovirt.engine.api.model.HostNIC entity , org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface template ) { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface = super . map ( entity , template ) ; if ( entity.isSetNetwork ( ) ) { if ( ( entity.getNetwork ( ) . isSetId ( ) ) || ( entity.getNetwork ( ) . isSetName ( ) ) ) { org.ovirt.engine.api.model.Network net = lookupNetwork ( entity.getNetwork ( ) ) ; iface.setNetworkName ( net.getName ( ) ) ; } else { iface.setNetworkName ( null ) ; } } return iface ; }

Target:
protected org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface map ( org.ovirt.engine.api.model.HostNic entity , org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface template ) { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface = super . map ( entity , template ) ; if ( entity.isSetNetwork ( ) ) { if ( ( entity.getNetwork ( ) . isSetId ( ) ) || ( entity.getNetwork ( ) . isSetName ( ) ) ) { org.ovirt.engine.api.model.Network net = lookupNetwork ( entity.getNetwork ( ) ) ; iface.setNetworkName ( net.getName ( ) ) ; } else { iface.setNetworkName ( null ) ; } } return iface ; }
Source:
private void warnIfNotAllDisksPermitSnapshots ( ) { for ( org.ovirt.engine.core.common.businessentities.Disk disk : org.ovirt.engine.core.bll.RunVmCommand.getVm ( ) . getDiskMap ( ) . values ( ) ) { if ( ! ( disk.isAllowSnapshot ( ) ) ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.log ( this , AuditLogType.USER_RUN_VM_AS_STATELESS_WITH_DISKS_NOT_ALLOWING_SNAPSHOT ) ; break ; } } }

Target:
private void warnIfNotAllDisksPermitSnapshots ( ) { for ( org.ovirt.engine.core.common.businessentities.storage.Disk disk : org.ovirt.engine.core.bll.RunVmCommand.getVm ( ) . getDiskMap ( ) . values ( ) ) { if ( ! ( disk.isAllowSnapshot ( ) ) ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.log ( this , AuditLogType.USER_RUN_VM_AS_STATELESS_WITH_DISKS_NOT_ALLOWING_SNAPSHOT ) ; break ; } } }
Source:
private static boolean canPlugInterface ( org.ovirt.engine.core.common.businessentities.network.VmNic iface , org.ovirt.engine.core.compat.Guid vdsGroupId ) { org.ovirt.engine.core.common.businessentities.VDSGroup vdsGroup = org.ovirt.engine.core.bll.utils.VmDeviceUtils.dbFacade.getVdsGroupDao ( ) . get ( vdsGroupId ) ; org.ovirt.engine.core.compat.Guid dataCenterId = ( vdsGroup == null ) ? null : vdsGroup.getStoragePoolId ( ) ; java.lang.String macAddress = iface.getMacAddress ( ) ; boolean canPlugInterface = org.ovirt.engine.core.bll.utils.VmDeviceUtils.canPlugInterfaceInDc ( macAddress , dataCenterId ) ; if ( ! canPlugInterface ) { new org.ovirt.engine.core.bll.network.VmInterfaceManager ( ) . auditLogMacInUseUnplug ( iface ) ; } return canPlugInterface ; }

Target:
private static boolean canPlugInterface ( org.ovirt.engine.core.common.businessentities.network.VmNic iface ) { org.ovirt.engine.core.bll.network.VmInterfaceManager vmIfaceManager = new org.ovirt.engine.core.bll.network.VmInterfaceManager ( ) ; if ( vmIfaceManager.existsPluggedInterfaceWithSameMac ( iface ) ) { vmIfaceManager.auditLogMacInUseUnplug ( iface ) ; return false ; } else { return true ; } }
Source:
public void qosValidCommitmentReportedBondSpeed ( ) { org.ovirt.engine.core.bll.network.host.SetupNetworksHelper helper = qosCommitmentReportedBondSpeed ( ( ( org.ovirt.engine.core.bll.network.host.SetupNetworksHelperTest.DEFAULT_SPEED ) / 2 ) ) ; validateAndExpectNoViolations ( helper ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { effectiveHostNetworkQos = new org.ovirt.engine.core.vdsbroker.EffectiveHostNetworkQos ( qosDao ) ; injectorRule.bind ( org.ovirt.engine.core.dao.network.NetworkDao.class , networkDao ) ; injectorRule.bind ( org.ovirt.engine.core.dao.network.NetworkAttachmentDao.class , networkAttachmentDao ) ; injectorRule.bind ( org.ovirt.engine.core.dao.network.InterfaceDao.class , interfaceDao ) ; injectorRule.bind ( org.ovirt.engine.core.dao.gluster.GlusterBrickDao.class , brickDao ) ; injectorRule.bind ( org.ovirt.engine.core.vdsbroker.EffectiveHostNetworkQos.class , effectiveHostNetworkQos ) ; injectorRule.bind ( org.ovirt.engine.core.vdsbroker.NetworkImplementationDetailsUtils.class , new org.ovirt.engine.core.vdsbroker.NetworkImplementationDetailsUtils ( effectiveHostNetworkQos , networkAttachmentDao , calculateBaseNic ) ) ; injectorRule.bind ( org.ovirt.engine.core.vdsbroker.CalculateBaseNic.class , calculateBaseNic ) ; }
Source:
public void validateVmShareableDisk ( ) { org.ovirt.engine.core.common.businessentities.StorageDomain srcStorageDomain = initStorageDomain ( srcStorageId ) ; srcStorageDomain.setStatus ( StorageDomainStatus.Active ) ; 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.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( command , EngineMessage.ACTION_TYPE_FAILED_SHAREABLE_DISK_NOT_SUPPORTED ) ; }

Target:
public void validateVmShareableDisk ( ) { initStorageDomain ( srcStorageId ) ; initStorageDomain ( dstStorageId ) ; 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.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( command , EngineMessage.ACTION_TYPE_FAILED_SHAREABLE_DISK_NOT_SUPPORTED ) ; }
Source:
private void initVncKeyboardLayout ( ) { final java.util.List < java.lang.String > layouts = ( ( java.util.List < java.lang.String > ) ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getConfigValuePreConverted ( ConfigurationValues.VncKeyboardLayoutValidValues ) ) ) ; final java.util.ArrayList < java.lang.String > vncKeyboardLayoutItems = new java.util.ArrayList < java.lang.String > ( ) ; vncKeyboardLayoutItems.add ( null ) ; vncKeyboardLayoutItems.addAll ( layouts ) ; getVncKeyboardLayout ( ) . setItems ( vncKeyboardLayoutItems ) ; getVncKeyboardLayout ( ) . setIsAvailable ( isVncSelected ( ) ) ; }

Target:
private void initGraphicsAndDisplayListeners ( ) { getDisplayType ( ) . getSelectedItemChangedEvent ( ) . addListener ( this ) ; getGraphicsType ( ) . getSelectedItemChangedEvent ( ) . addListener ( this ) ; }
Source:
public void testUpdate ( ) throws java.lang.Exception { setUpGetEntityExpectations ( 2 ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.UpdateVmDisk , org.ovirt.engine.core.common.action.UpdateVmDiskParameters.class , new java.lang.String [ ] { "VmId" , "DiskId" , "DiskInfo.WipeAfterDelete" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.AbstractBackendDisksResourceTest.PARENT_ID , GUIDS [ 1 ] , java.lang.Boolean.FALSE } , true , true ) ) ; org.ovirt.engine.api.model.Disk disk = resource.update ( getUpdate ( ) ) ; assertNotNull ( disk ) ; }

Target:
public void testUpdate ( ) throws java.lang.Exception { setUpGetEntityExpectations ( 2 ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.UpdateVmDisk , org.ovirt.engine.core.common.action.UpdateVmDiskParameters.class , new java.lang.String [ ] { "VmId" , "DiskId" , "DiskInfo.WipeAfterDelete" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendVmDiskResourceTest.VM_ID , org.ovirt.engine.api.restapi.resource.BackendVmDiskResourceTest.DISK_ID , java.lang.Boolean.FALSE } , true , true ) ) ; org.ovirt.engine.api.model.Disk disk = resource.update ( getUpdate ( ) ) ; assertNotNull ( disk ) ; }
Source:
public void getHostById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVdsByVdsId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) . withoutRefresh ( ) , aQuery ) ; }

Target:
public void getStorageDomainList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageDomainsByStoragePoolId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) , aQuery ) ; }
Source:
public java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity > getByClusterId ( org.ovirt.engine.core.compat.Guid clusterId ) { java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity > glusterHooks = getCallsHandler ( ) . executeReadList ( "GetGlusterHooksByClusterGuid" , org.ovirt.engine.core.dao.gluster.GlusterHooksDaoDbFacadeImpl.glusterHookRowMapper , getCustomMapSqlParameterSource ( ) . addValue ( "cluster_id" , clusterId ) ) ; for ( org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity entity : glusterHooks ) { getGlusterServerHook ( entity , null ) ; } return glusterHooks ; }

Target:
public java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity > getByClusterId ( org.ovirt.engine.core.compat.Guid clusterId ) { java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity > glusterHooks = getCallsHandler ( ) . executeReadList ( "GetGlusterHooksByClusterId" , org.ovirt.engine.core.dao.gluster.GlusterHooksDaoDbFacadeImpl.glusterHookRowMapper , getCustomMapSqlParameterSource ( ) . addValue ( "cluster_id" , clusterId ) ) ; return glusterHooks ; }
Source:
private void updatePosixProperties ( org.ovirt.engine.ui.uicommonweb.models.storage.IStorageModel storageModel ) { org.ovirt.engine.ui.uicommonweb.models.storage.PosixStorageModel posixModel = ( ( org.ovirt.engine.ui.uicommonweb.models.storage.PosixStorageModel ) ( storageModel ) ) ; connection.setVfsType ( posixModel.getVfsType ( ) . getEntity ( ) . toString ( ) ) ; if ( ( posixModel.getMountOptions ( ) . getEntity ( ) ) != null ) { connection.setMountOptions ( posixModel.getMountOptions ( ) . getEntity ( ) . toString ( ) ) ; } }

Target:
private void updatePosixProperties ( org.ovirt.engine.ui.uicommonweb.models.storage.IStorageModel storageModel ) { org.ovirt.engine.ui.uicommonweb.models.storage.PosixStorageModel posixModel = ( ( org.ovirt.engine.ui.uicommonweb.models.storage.PosixStorageModel ) ( storageModel ) ) ; connection.setVfsType ( posixModel.getVfsType ( ) . getEntity ( ) . toString ( ) ) ; if ( ( posixModel.getMountOptions ( ) . getEntity ( ) ) != null ) { connection.setMountOptions ( posixModel.getMountOptions ( ) . getEntity ( ) . toString ( ) ) ; } if ( posixModel.getType ( ) . equals ( StorageType.GLUSTERFS ) ) { connection.setGlusterVolumeId ( null ) ; } }
Source:
public java.nio.channels.SelectionKey getSelectionKey ( ) throws org.ovirt.vdsm.jsonrpc.client.ClientConnectionException { if ( ( this . key ) == null ) { connect ( ) ; } return this . key ; }

Target:
private void processHeartbeat ( ) { if ( ( ! ( this . isInInit ( ) ) ) && ( ( ( this . lastHeartbeat ) + ( this . policy.getHeartbeat ( ) ) ) < ( java.lang.System.currentTimeMillis ( ) ) ) ) { org.ovirt.vdsm.jsonrpc.client.reactors.ReactorClient.log.debug ( "Heartbeat exeeded. Closing channel" ) ; this . closeChannel ( ) ; } }
Source:
private void alert ( org.ovirt.engine.core.common.AuditLogType logType , java.lang.String reason ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase alert = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; alert.setVdsId ( getVdsId ( ) ) ; alert.addCustomValue ( "Reason" , reason ) ; org.ovirt.engine.core.dal.dbbroker.auditloghandling.AlertDirector.Alert ( alert , logType ) ; }

Target:
private void alert ( org.ovirt.engine.core.common.AuditLogType logType , java.lang.String reason ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase alert = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; alert.setVdsId ( getVdsId ( ) ) ; alert.addCustomValue ( "Reason" , reason ) ; org.ovirt.engine.core.dal.dbbroker.auditloghandling.AlertDirector.Alert ( alert , logType , auditLogDirector ) ; }
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 ( ) . getVmName ( ) ) ) ) { return java.util.Collections.singletonMap ( org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . getVm ( ) . getVmName ( ) , LockMessagesMatchUtil.VM_NAME ) ; } return null ; }
Source:
public void qosBaloonNotSupported ( ) { org.mockito.Mockito.when ( cluster.getCompatibilityVersion ( ) ) . thenReturn ( org.mockito.Mockito.mock ( org.ovirt.engine.core.compat.Version.class ) ) ; org.mockito.Mockito.when ( cluster.isEnableBallooning ( ) ) . thenReturn ( true ) ; validator = new org.ovirt.engine.core.bll.validator.ClusterValidator ( dbFacade , cluster ) ; org.junit.Assert.assertThat ( validator.qosBaloonSupported ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.QOS_BALLOON_NOT_SUPPORTED ) ) ; }

Target:
public void qosBaloonSupported ( ) { org.mockito.Mockito.when ( cluster.getCompatibilityVersion ( ) ) . thenReturn ( Version.v3_3 ) ; org.mockito.Mockito.when ( cluster.isEnableBallooning ( ) ) . thenReturn ( true ) ; validator = new org.ovirt.engine.core.bll.validator.ClusterValidator ( dbFacade , cluster , cpuFlagsManagerHandler ) ; org.junit.Assert.assertThat ( validator.qosBaloonSupported ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }
Source:
public org.ovirt.engine.core.common.businessentities.TagsVmMap mapRow ( java.sql.ResultSet rs , int rowNum ) throws java.sql.SQLException { org.ovirt.engine.core.common.businessentities.TagsVmMap entity = new org.ovirt.engine.core.common.businessentities.TagsVmMap ( ) ; entity.settag_id ( org.ovirt.engine.core.compat.Guid.createGuidFromStringDefaultEmpty ( rs.getString ( "tag_id" ) ) ) ; entity.setvm_id ( org.ovirt.engine.core.compat.Guid.createGuidFromStringDefaultEmpty ( rs.getString ( "vm_id" ) ) ) ; entity.setDefaultDisplayType ( ( ( java.lang.Integer ) ( rs.getObject ( "DefaultDisplayType" ) ) ) ) ; entity.settag_id ( org.ovirt.engine.core.compat.Guid.createGuidFromStringDefaultEmpty ( rs.getString ( "tag_id" ) ) ) ; return entity ; }

Target:
public org.ovirt.engine.core.common.businessentities.TagsVmMap mapRow ( java.sql.ResultSet rs , int rowNum ) throws java.sql.SQLException { org.ovirt.engine.core.common.businessentities.TagsVmMap entity = new org.ovirt.engine.core.common.businessentities.TagsVmMap ( ) ; entity.settag_id ( getGuidDefaultEmpty ( rs , "tag_id" ) ) ; entity.setvm_id ( getGuidDefaultEmpty ( rs , "vm_id" ) ) ; entity.setDefaultDisplayType ( ( ( java.lang.Integer ) ( rs.getObject ( "DefaultDisplayType" ) ) ) ) ; return entity ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc glusterVolumeGeoRepSessionResume ( java.lang.String volumeName , java.lang.String slaveHostName , java.lang.String slaveVolumeName , boolean force ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.glusterVolumeGeoRepSessionResume ( volumeName , slaveHostName , slaveVolumeName , force ) ; 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 ) ; } }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.BooleanReturnForXmlRpc glusterVolumeEmptyCheck ( java.lang.String volumeName ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.glusterVolumeEmptyCheck ( volumeName ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.BooleanReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.BooleanReturnForXmlRpc ( xmlRpcReturnValue , "volumeEmptyCheck" ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
Source:
protected void loadPolicyUnits ( ) { java.util.List < org.ovirt.engine.core.common.scheduling.PolicyUnit > allPolicyUnits = getPolicyUnitDao ( ) . getAll ( ) ; for ( org.ovirt.engine.core.common.scheduling.PolicyUnit policyUnit : allPolicyUnits ) { policyUnits.put ( policyUnit.getId ( ) , org.ovirt.engine.core.bll.scheduling.PolicyUnitImpl.getPolicyUnitImpl ( policyUnit ) ) ; } }

Target:
protected void loadPolicyUnits ( ) { java.util.List < org.ovirt.engine.core.common.scheduling.PolicyUnit > allPolicyUnits = getPolicyUnitDao ( ) . getAll ( ) ; for ( org.ovirt.engine.core.common.scheduling.PolicyUnit policyUnit : allPolicyUnits ) { if ( policyUnit.isInternal ( ) ) { policyUnits.put ( policyUnit.getId ( ) , org.ovirt.engine.core.bll.scheduling.PolicyUnitImpl.getPolicyUnitImpl ( policyUnit ) ) ; } else { policyUnits.put ( policyUnit.getId ( ) , new org.ovirt.engine.core.bll.scheduling.PolicyUnitImpl ( policyUnit ) ) ; } } }
Source:
public void testVmDuringSnaoshot ( ) { org.mockito.Mockito.doReturn ( new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_VM_IS_DURING_SNAPSHOT ) ) . when ( snapshotsValidator ) . vmNotDuringSnapshot ( org.mockito.ArgumentMatchers.any ( ) ) ; org.mockito.Mockito.doReturn ( org.ovirt.engine.core.bll.snapshots.CreateAllSnapshotsFromVmCommandTest.getEmptyDiskList ( ) ) . when ( cmd ) . getDisksList ( ) ; org.junit.Assert.assertFalse ( cmd.validate ( ) ) ; org.junit.Assert.assertTrue ( cmd.getReturnValue ( ) . getValidationMessages ( ) . contains ( EngineMessage.ACTION_TYPE_FAILED_VM_IS_DURING_SNAPSHOT.name ( ) ) ) ; }

Target:
public void testVmInPreview ( ) { org.mockito.Mockito.doReturn ( new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_VM_IN_PREVIEW ) ) . when ( snapshotsValidator ) . vmNotInPreview ( org.mockito.ArgumentMatchers.any ( ) ) ; org.mockito.Mockito.doReturn ( org.ovirt.engine.core.bll.snapshots.CreateAllSnapshotsFromVmCommandTest.getEmptyDiskList ( ) ) . when ( cmd ) . getDisksList ( ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( cmd , EngineMessage.ACTION_TYPE_FAILED_VM_IN_PREVIEW ) ; }
Source:
public static boolean isExternalVm ( org.ovirt.engine.core.common.businessentities.VM vm ) { return OriginType.EXTERNAL.equals ( vm.getOrigin ( ) ) ; }

Target:
public static boolean isOsTypeSupported ( int osId , org.ovirt.engine.core.common.businessentities.ArchitectureType architectureType , java.util.List < java.lang.String > reasons ) { boolean result = org.ovirt.engine.core.bll.validator.VmValidationUtils.isOsTypeSupported ( osId , architectureType ) ; if ( ! result ) { reasons.add ( VdcBllMessages.ACTION_TYPE_FAILED_ILLEGAL_OS_TYPE_IS_NOT_SUPPORTED_BY_ARCHITECTURE_TYPE.toString ( ) ) ; } return result ; }
Source:
public void testUpdateVdsGroupsProps ( ) { org.junit.Assert.assertNotSame ( "pc-1.2.3" , existingVdsGroup.getEmulatedMachine ( ) ) ; existingVdsGroup.setEmulatedMachine ( "pc-1.2.3" ) ; dao.update ( existingVdsGroup ) ; org.junit.Assert.assertEquals ( "pc-1.2.3" , existingVdsGroup.getEmulatedMachine ( ) ) ; existingVdsGroup.setDetectEmulatedMachine ( true ) ; dao.update ( existingVdsGroup ) ; org.junit.Assert.assertEquals ( true , existingVdsGroup.isDetectEmulatedMachine ( ) ) ; }

Target:
public void testUpdateClustersProps ( ) { org.junit.Assert.assertNotSame ( "pc-1.2.3" , existingCluster.getEmulatedMachine ( ) ) ; existingCluster.setEmulatedMachine ( "pc-1.2.3" ) ; dao.update ( existingCluster ) ; org.junit.Assert.assertEquals ( "pc-1.2.3" , existingCluster.getEmulatedMachine ( ) ) ; existingCluster.setDetectEmulatedMachine ( true ) ; dao.update ( existingCluster ) ; org.junit.Assert.assertEquals ( true , existingCluster.isDetectEmulatedMachine ( ) ) ; }
Source:
public void vmsMonitoringInitFinished ( ) { if ( ! ( isInitialized ( ) ) ) { org.ovirt.engine.core.vdsbroker.VdsManager.log.info ( "VMs initialization finished for Host: '{}:{}'" , cachedVds.getName ( ) , cachedVds.getId ( ) ) ; org.ovirt.engine.core.vdsbroker.ResourceManager.getInstance ( ) . handleVmsFinishedInitOnVds ( cachedVds.getId ( ) ) ; setInitialized ( true ) ; } }

Target:
public void vmsMonitoringInitFinished ( ) { if ( ! ( isInitialized ( ) ) ) { org.ovirt.engine.core.vdsbroker.VdsManager.log.info ( "VMs initialization finished for Host: '{}:{}'" , cachedVds.getName ( ) , cachedVds.getId ( ) ) ; resourceManager.handleVmsFinishedInitOnVds ( cachedVds.getId ( ) ) ; setInitialized ( true ) ; } }
Source:
protected void endActionOnAllImageGroups ( ) { for ( org.ovirt.engine.core.common.action.VdcActionParametersBase p : org.ovirt.engine.core.bll.ExportVmTemplateCommand.getParameters ( ) . getImagesParameters ( ) ) { p.setTaskGroupSuccess ( org.ovirt.engine.core.bll.ExportVmTemplateCommand.getParameters ( ) . getTaskGroupSuccess ( ) ) ; org.ovirt.engine.core.bll.ExportVmTemplateCommand.getBackend ( ) . EndAction ( org.ovirt.engine.core.bll.ExportVmTemplateCommand.getImagesActionType ( ) , p ) ; } }

Target:
protected void endActionOnAllImageGroups ( ) { for ( org.ovirt.engine.core.common.action.VdcActionParametersBase p : org.ovirt.engine.core.bll.ExportVmTemplateCommand.getParameters ( ) . getImagesParameters ( ) ) { p.setTaskGroupSuccess ( org.ovirt.engine.core.bll.ExportVmTemplateCommand.getParameters ( ) . getTaskGroupSuccess ( ) ) ; org.ovirt.engine.core.bll.ExportVmTemplateCommand.getBackend ( ) . endAction ( org.ovirt.engine.core.bll.ExportVmTemplateCommand.getImagesActionType ( ) , p ) ; } }
Source:
public void getDataCenterById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId ) { 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.GetStoragePoolById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) . withoutRefresh ( ) , aQuery ) ; }

Target:
public void getClusterNetworkList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { if ( ( aQuery.converterCallback ) == null ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.Network > ( ) ; } return source ; } } ; } org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllNetworksByClusterId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( clusterId ) , aQuery ) ; }
Source:
protected void endWithFailure ( ) { org.ovirt.engine.core.bll.HibernateVmCommand.revertTasks ( ) ; if ( ( org.ovirt.engine.core.bll.HibernateVmCommand.getVm ( ) . getRunOnVds ( ) ) != null ) { org.ovirt.engine.core.bll.HibernateVmCommand.getSnapshotDAO ( ) . removeMemoryFromActiveSnapshot ( org.ovirt.engine.core.bll.HibernateVmCommand.getVmId ( ) ) ; org.ovirt.engine.core.bll.HibernateVmCommand.setSucceeded ( true ) ; } else { org.ovirt.engine.core.bll.HibernateVmCommand.log.warn ( "VM '{}' doesn't have 'run_on_vds' value - not clearing 'hibernation_vol_handle' info." , org.ovirt.engine.core.bll.HibernateVmCommand.getVm ( ) . getName ( ) ) ; org.ovirt.engine.core.bll.HibernateVmCommand.getReturnValue ( ) . setEndActionTryAgain ( false ) ; } }

Target:
private void addMetadataDisk ( ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage metaDataDisk = org.ovirt.engine.core.bll.memory.MemoryUtils.createMetadataDiskForVm ( org.ovirt.engine.core.bll.HibernateVmCommand.getVm ( ) ) ; addDisk ( metaDataDisk ) ; }
Source:
protected org.ovirt.engine.core.aaa.DirectoryGroup getAdGroup ( ) { if ( ( ( mGroup ) == null ) && ( ! ( getGroupId ( ) . equals ( Guid.Empty ) ) ) ) { org.ovirt.engine.core.common.businessentities.DbGroup dbGroup = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getDbGroupDao ( ) . get ( getGroupId ( ) ) ; if ( dbGroup != null ) { org.ovirt.engine.core.aaa.Directory directory = org.ovirt.engine.core.aaa.DirectoryManager.getInstance ( ) . getDirectory ( dbGroup.getDomain ( ) ) ; mGroup = directory.findGroup ( dbGroup.getExternalId ( ) ) ; } } return mGroup ; }

Target:
protected org.ovirt.engine.core.aaa.DirectoryGroup getAdGroup ( ) { if ( ( ( mGroup ) == null ) && ( ! ( getGroupId ( ) . equals ( Guid.Empty ) ) ) ) { org.ovirt.engine.core.common.businessentities.DbGroup dbGroup = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getDbGroupDao ( ) . get ( getGroupId ( ) ) ; if ( dbGroup != null ) { org.ovirt.engine.core.aaa.Directory directory = org.ovirt.engine.core.aaa.AuthenticationProfileRepository.getInstance ( ) . getDirectory ( dbGroup.getDomain ( ) ) ; mGroup = directory.findGroup ( dbGroup.getExternalId ( ) ) ; } } return mGroup ; }
Source:
public org.ovirt.engine.core.common.eventqueue.EventResult call ( ) { boolean isSucceeded = org.ovirt.engine.core.bll.Backend.getInstance ( ) . runInternalAction ( VdcActionType.ReconstructMasterDomain , getParameters ( ) ) . 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 call ( ) { setStorageDomain ( null ) ; setStoragePool ( null ) ; if ( canDoAction ( ) ) { org.ovirt.engine.core.common.businessentities.StoragePoolIsoMap domainPoolMap = new org.ovirt.engine.core.common.businessentities.StoragePoolIsoMap ( getRecoveryStoragePoolParametersData ( ) . getNewMasterDomainId ( ) , getRecoveryStoragePoolParametersData ( ) . getStoragePoolId ( ) , org.ovirt.engine.core.common.businessentities.StorageDomainStatus.Active ) ; org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStoragePoolIsoMapDao ( ) . save ( domainPoolMap ) ; getStoragePool ( ) . setstatus ( StoragePoolStatus.Problematic ) ; executeReconstruct ( ) ; } return new org.ovirt.engine.core.common.eventqueue.EventResult ( reconstructOpSucceeded , org.ovirt.engine.core.common.eventqueue.EventType.RECONSTRUCT ) ; }
Source:
private void putPrefixOrNetmaskIfNotEmpty ( java.util.Map < java.lang.String , java.lang.Object > opts , java.lang.String netmask ) { if ( org.ovirt.engine.core.common.validation.MaskValidator.getInstance ( ) . isPrefixValid ( netmask ) ) { org.ovirt.engine.core.vdsbroker.vdsbroker.HostSetupNetworksVDSCommand.putIfNotEmpty ( opts , "prefix" , netmask.replace ( "/" , "" ) ) ; } else { org.ovirt.engine.core.vdsbroker.vdsbroker.HostSetupNetworksVDSCommand.putIfNotEmpty ( opts , "netmask" , netmask ) ; } }

Target:
private void putIpv4PrefixOrNetmaskIfNotEmpty ( java.util.Map < java.lang.String , java.lang.Object > opts , java.lang.String netmask ) { if ( org.ovirt.engine.core.common.validation.MaskValidator.getInstance ( ) . isPrefixValid ( netmask ) ) { org.ovirt.engine.core.vdsbroker.vdsbroker.HostSetupNetworksVDSCommand.putIfNotEmpty ( opts , "prefix" , netmask.replace ( "/" , "" ) ) ; } else { org.ovirt.engine.core.vdsbroker.vdsbroker.HostSetupNetworksVDSCommand.putIfNotEmpty ( opts , "netmask" , netmask ) ; } }
Source:
public static void getMaximalVmMemSize32OS ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Integer ) ( source ) ) . intValue ( ) : 20480 ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.VM32BitMaxMemorySizeInMB , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public static void getNumberOfVmsInCluster ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetNumberOfVmsInVdsGroupByVdsGroupId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( clusterId ) , aQuery ) ; }
Source:
private boolean validateImageConfig ( java.util.List < java.lang.String > canDoActionMessages , java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.StorageDomain > domainsMap , org.ovirt.engine.core.common.businessentities.DiskImage image ) { return org.ovirt.engine.core.bll.ImagesHandler.CheckImageConfiguration ( domainsMap.get ( imageToDestinationDomainMap.get ( image.getId ( ) ) ) . getStorageStaticData ( ) , image , canDoActionMessages ) ; }

Target:
private boolean validateImageConfig ( java.util.List < java.lang.String > canDoActionMessages , java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.StorageDomain > domainsMap , org.ovirt.engine.core.common.businessentities.DiskImage image ) { return org.ovirt.engine.core.bll.ImagesHandler.checkImageConfiguration ( domainsMap.get ( imageToDestinationDomainMap.get ( image.getId ( ) ) ) . getStorageStaticData ( ) , image , canDoActionMessages ) ; }
Source:
public void start ( ) { java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > list = new java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > ( ) ; for ( java.lang.Object item : org.ovirt.engine.ui.uicommonweb.models.hosts.HostListModel.getSelectedItems ( ) ) { org.ovirt.engine.core.common.businessentities.VDS vds = ( ( org.ovirt.engine.core.common.businessentities.VDS ) ( item ) ) ; list.add ( new org.ovirt.engine.core.common.action.FenceVdsActionParameters ( vds.getId ( ) ) ) ; } org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runMultipleAction ( VdcActionType.StartVds , list , new org.ovirt.engine.ui.uicompat.IFrontendMultipleActionAsyncCallback ( ) { @ java.lang.Override public void executed ( org.ovirt.engine.ui.uicompat.FrontendMultipleActionAsyncResult result ) { } } , null ) ; }

Target:
private void setUpgradeActionStatus ( final org.ovirt.engine.core.common.businessentities.VDS vds ) { final boolean executionAllowed = canUpgradeHost ( vds ) ; if ( ! executionAllowed ) { final org.ovirt.engine.ui.uicompat.UIConstants constants = org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getConstants ( ) ; getUpgradeCommand ( ) . getExecuteProhibitionReasons ( ) . add ( constants.switchToMaintenanceModeToEnableUpgradeReason ( ) ) ; } getUpgradeCommand ( ) . setIsExecutionAllowed ( executionAllowed ) ; }
Source:
private void clusterHasVMs ( ) { org.ovirt.engine.core.common.businessentities.VM vm = new org.ovirt.engine.core.common.businessentities.VM ( ) ; vm.setVdsGroupId ( org.ovirt.engine.core.bll.UpdateVdsGroupCommandTest.DEFAULT_VDS_GROUP_ID ) ; java.util.List < org.ovirt.engine.core.common.businessentities.VM > vmList = new java.util.ArrayList < > ( ) ; vmList.add ( vm ) ; org.mockito.Mockito.when ( vmDao.getAllForVdsGroup ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( vmList ) ; }

Target:
private void clusterHasVMs ( ) { org.ovirt.engine.core.common.businessentities.VM vm = new org.ovirt.engine.core.common.businessentities.VM ( ) ; vm.setClusterId ( org.ovirt.engine.core.bll.UpdateClusterCommandTest.DEFAULT_CLUSTER_ID ) ; java.util.List < org.ovirt.engine.core.common.businessentities.VM > vmList = new java.util.ArrayList < > ( ) ; vmList.add ( vm ) ; org.mockito.Mockito.when ( vmDao.getAllForCluster ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( vmList ) ; }
Source:
private java.util.List < org.ovirt.engine.api.model.TransportType > adaptTransportTypes ( org.ovirt.engine.api.v3.types.V3GlusterVolume from ) { java.util.List < org.ovirt.engine.api.model.TransportType > results = new java.util.LinkedList < > ( ) ; for ( java.lang.String s : from.getTransportTypes ( ) . getTransportTypes ( ) ) { results.add ( org.ovirt.engine.api.model.TransportType.valueOf ( s ) ) ; } return results ; }

Target:
private java.util.List < org.ovirt.engine.api.model.TransportType > adaptTransportTypes ( org.ovirt.engine.api.v3.types.V3GlusterVolume from ) { java.util.List < org.ovirt.engine.api.model.TransportType > results = new java.util.LinkedList < > ( ) ; for ( java.lang.String s : from.getTransportTypes ( ) . getTransportTypes ( ) ) { results.add ( org.ovirt.engine.api.model.TransportType.fromValue ( s ) ) ; } return results ; }
Source:
private static java.lang.String getStoragePoolRegexString ( org.ovirt.engine.core.searchbackend.SearchObjectAutoCompleter search ) { return ( ( ( ( ( ".*" + ( search.getDefaultSort ( SearchObjects.VDC_STORAGE_POOL_OBJ_NAME ) ) ) + ".*" ) + ( search.getRelatedTableNameWithOutTags ( SearchObjects.VDC_STORAGE_POOL_OBJ_NAME ) ) ) + ".* " ) + ( search.getPrimeryKeyName ( SearchObjects.VDC_STORAGE_POOL_OBJ_NAME ) ) ) + ".*" ; }

Target:
private static java.lang.String getStoragePoolRegexString ( org.ovirt.engine.core.searchbackend.SearchObjectAutoCompleter search ) { java.lang.StringBuilder query = new java.lang.StringBuilder ( ) ; query.append ( ".*" ) . append ( search.getDefaultSort ( SearchObjects.VDC_STORAGE_POOL_OBJ_NAME ) ) . append ( ".*" ) . append ( search.getRelatedTableNameWithOutTags ( SearchObjects.VDC_STORAGE_POOL_OBJ_NAME ) ) . append ( ".* " ) ; return query.toString ( ) ; }