auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void invoke ( org.ovirt.engine.api.extensions.ExtMap context , java.util.Map < java.lang.String , java.lang.Object > args ) { context.mput ( Schema.InvokeKeys.ENTITY , Schema.Entities.USER ) . mput ( Schema.InvokeKeys.ENTITY_KEYS , new org.ovirt.engine.api.extensions.ExtMap ( ) . mput ( Schema.UserIdentifiers.USERNAME , args.get ( "user" ) ) . mput ( Schema.SharedKeys.REMOVE_GROUP , context.get ( org.ovirt.engine.extension.aaa.jdbc.binding.cli.Cli.ContextKeys.POSITIONAL ) ) ) ; org.ovirt.engine.extension.aaa.jdbc.binding.cli.Cli.commands.get ( "_schema-modify" ) . invoke ( context ) ; context.putIfAbsent ( org.ovirt.engine.extension.aaa.jdbc.binding.cli.Cli.ContextKeys.EXIT_STATUS , org.ovirt.engine.extension.aaa.jdbc.binding.cli.Cli.SUCCESS ) ; }

Target:
public void invoke ( org.ovirt.engine.api.extensions.ExtMap context , java.util.Map < java.lang.String , java.lang.Object > args ) { context.mput ( Schema.InvokeKeys.ENTITY , Schema.Entities.USER ) . mput ( Schema.InvokeKeys.ENTITY_KEYS , new org.ovirt.engine.api.extensions.ExtMap ( ) . mput ( Schema.UserIdentifiers.USERNAME , args.get ( "user" ) ) . mput ( Schema.SharedKeys.REMOVE_GROUP , context.get ( ContextKeys.POSITIONAL ) ) ) ; org.ovirt.engine.extension.aaa.jdbc.binding.cli.Cli.commands.get ( "_schema-modify" ) . invoke ( context ) ; context.putIfAbsent ( ContextKeys.EXIT_STATUS , org.ovirt.engine.extension.aaa.jdbc.binding.cli.Cli.SUCCESS ) ; }
Source:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { org.ovirt.engine.core.common.businessentities.Snapshot snapshot = ( ( org.ovirt.engine.core.common.businessentities.Snapshot ) ( getModel ( ) . getSelectedItem ( ) ) ) ; if ( ( snapshot != null ) && ( ! ( getTable ( ) . getSelectionModel ( ) . isSelected ( snapshot ) ) ) ) { getTable ( ) . getSelectionModel ( ) . setSelected ( snapshot , true ) ; } vmSnapshotInfoPanel.updatePanel ( snapshot ) ; }

Target:
protected org.ovirt.engine.ui.uicommonweb.UICommand resolveCommand ( ) { return getModel ( ) . getPreviewCommand ( ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc heartBeat ( ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.heartBeat ( ) ; 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.StatusOnlyReturnForXmlRpc convertVmFromOva ( java.lang.String ovaPath , java.util.Map < java.lang.String , java.lang.Object > vm , java.lang.String jobUUID ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.convertExternalVmFromOva ( ovaPath , vm , jobUUID ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
Source:
public void OnSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.userportal.VmItemBehavior behavior = ( ( org.ovirt.engine.ui.uicommonweb.models.userportal.VmItemBehavior ) ( target ) ) ; org.ovirt.engine.core.common.businessentities.VmPool pool = ( ( org.ovirt.engine.core.common.businessentities.VmPool ) ( returnValue ) ) ; boolean isManualPool = ( pool.getvm_pool_type ( ) ) == ( org.ovirt.engine.core.common.businessentities.VmPoolType.Manual ) ; behavior.UpdateCommandsAccordingToPoolType ( isManualPool ) ; }

Target:
public void OnSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.userportal.VmItemBehavior behavior = ( ( org.ovirt.engine.ui.uicommonweb.models.userportal.VmItemBehavior ) ( target ) ) ; org.ovirt.engine.core.common.businessentities.VmPool pool = ( ( org.ovirt.engine.core.common.businessentities.VmPool ) ( returnValue ) ) ; boolean isManualPool = ( pool.getVmPoolType ( ) ) == ( org.ovirt.engine.core.common.businessentities.VmPoolType.Manual ) ; behavior.UpdateCommandsAccordingToPoolType ( isManualPool ) ; }
Source:
protected < T extends org.ovirt.engine.core.dao.DAO > T getDao ( java.lang.Class < T > daoType ) { T dao = org.ovirt.engine.core.dao.DaoFactory.get ( daoType ) ; if ( dao instanceof org.ovirt.engine.core.dao.BaseDAODbFacade ) { org.ovirt.engine.core.dao.BaseDAODbFacade dbFacadeDAO = ( ( org.ovirt.engine.core.dao.BaseDAODbFacade ) ( dao ) ) ; dbFacadeDAO.setTemplate ( jdbcTemplate ) ; dbFacadeDAO.setDialect ( dbEngineDialect ) ; dbFacadeDAO.setDbFacade ( this ) ; } return dao ; }

Target:
private < T extends org.ovirt.engine.core.dao.DAO > T getDao ( java.lang.Class < T > daoType ) { for ( org.ovirt.engine.core.dao.DAO dao : daos ) { if ( daoType.isAssignableFrom ( dao.getClass ( ) ) ) { return ( ( T ) ( dao ) ) ; } } org.ovirt.engine.core.dal.dbbroker.DbFacade.log.error ( ( "Can't find dao for " + daoType ) ) ; return null ; }
Source:
public static boolean isLastSuperUserGroup ( org.ovirt.engine.core.compat.Guid groupId ) { boolean retValue = false ; java.util.List < org.ovirt.engine.core.common.businessentities.permissions > permissions = org.ovirt.engine.core.bll.MultiLevelAdministrationHandler.getPermissionDAO ( ) . getAllForRole ( PredefinedRoles.SUPER_USER.getId ( ) ) ; if ( ( permissions.size ( ) ) <= 1 ) { permissions = org.ovirt.engine.core.bll.MultiLevelAdministrationHandler.getPermissionDAO ( ) . getAllForAdElement ( groupId ) ; for ( org.ovirt.engine.core.common.businessentities.permissions permission : permissions ) { if ( permission.getrole_id ( ) . equals ( PredefinedRoles.SUPER_USER.getId ( ) ) ) { retValue = true ; break ; } } } return retValue ; }

Target:
public static boolean isLastSuperUserGroup ( org.ovirt.engine.core.compat.Guid groupId ) { boolean retValue = false ; java.util.List < org.ovirt.engine.core.common.businessentities.Permissions > permissions = org.ovirt.engine.core.bll.MultiLevelAdministrationHandler.getPermissionDAO ( ) . getAllForRole ( PredefinedRoles.SUPER_USER.getId ( ) ) ; if ( ( permissions.size ( ) ) <= 1 ) { permissions = org.ovirt.engine.core.bll.MultiLevelAdministrationHandler.getPermissionDAO ( ) . getAllForAdElement ( groupId ) ; for ( org.ovirt.engine.core.common.businessentities.Permissions permission : permissions ) { if ( permission.getrole_id ( ) . equals ( PredefinedRoles.SUPER_USER.getId ( ) ) ) { retValue = true ; break ; } } } return retValue ; }
Source:
protected boolean canDoAction ( ) { if ( ! ( org.ovirt.engine.core.bll.qos.RemoveQosCommandBase.validateParameters ( ) ) ) { return false ; } org.ovirt.engine.core.bll.validator.QosValidator < T > validator = getQosValidator ( org.ovirt.engine.core.bll.qos.RemoveQosCommandBase.getQos ( ) ) ; return ( super . canDoAction ( ) ) && ( validate ( validator.qosExists ( ) ) ) ; }

Target:
protected boolean canDoAction ( ) { if ( ! ( org.ovirt.engine.core.bll.qos.RemoveQosCommandBase.validateParameters ( ) ) ) { return false ; } org.ovirt.engine.core.bll.validator.QosValidator < T > validator = getQosValidator ( org.ovirt.engine.core.bll.qos.RemoveQosCommandBase.getQos ( ) ) ; return ( ( super . canDoAction ( ) ) && ( validate ( validator.qosExists ( ) ) ) ) && ( validate ( validator.consistentDataCenter ( ) ) ) ; }
Source:
public void getGlusterHooks ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? source : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterHooks , new org.ovirt.engine.core.common.queries.gluster.GlusterParameters ( clusterId ) , aQuery ) ; }

Target:
public void getHostPublicKey ( 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 ( ) . runQuery ( VdcQueryType.GetServerSSHPublicKey , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }
Source:
protected void revertTasks ( ) { org.ovirt.engine.core.compat.Guid destImageId = org.ovirt.engine.core.bll.storage.disk.image.CreateImageTemplateCommand.getDestinationDiskImage ( ) . getImageId ( ) ; org.ovirt.engine.core.common.action.RemoveImageParameters p = new org.ovirt.engine.core.common.action.RemoveImageParameters ( destImageId ) ; p.setEntityInfo ( new org.ovirt.engine.core.common.asynctasks.EntityInfo ( org.ovirt.engine.core.common.VdcObjectType.Disk , destImageId ) ) ; p.setParentParameters ( p ) ; p.setParentCommand ( ActionType.RemoveImage ) ; org.ovirt.engine.core.common.action.VdcReturnValueBase returnValue = checkAndPerformRollbackUsingCommand ( ActionType.RemoveImage , p , null ) ; if ( returnValue.getSucceeded ( ) ) { startPollingAsyncTasks ( returnValue.getInternalVdsmTaskIdList ( ) ) ; } }

Target:
protected void revertTasks ( ) { org.ovirt.engine.core.compat.Guid destImageId = org.ovirt.engine.core.bll.storage.disk.image.CreateImageTemplateCommand.getDestinationDiskImage ( ) . getImageId ( ) ; org.ovirt.engine.core.common.action.RemoveImageParameters p = new org.ovirt.engine.core.common.action.RemoveImageParameters ( destImageId ) ; p.setEntityInfo ( new org.ovirt.engine.core.common.asynctasks.EntityInfo ( org.ovirt.engine.core.common.VdcObjectType.Disk , destImageId ) ) ; p.setParentParameters ( p ) ; p.setParentCommand ( ActionType.RemoveImage ) ; org.ovirt.engine.core.common.action.ActionReturnValue returnValue = checkAndPerformRollbackUsingCommand ( ActionType.RemoveImage , p , null ) ; if ( returnValue.getSucceeded ( ) ) { startPollingAsyncTasks ( returnValue.getInternalVdsmTaskIdList ( ) ) ; } }
Source:
public void testSpecificQuotaLimitations ( ) { org.ovirt.engine.core.common.businessentities.Quota quota = org.ovirt.engine.core.dao.QuotaDaoTest.createGeneralQuota ( ) ; quota.setQuotaClusters ( org.ovirt.engine.core.dao.QuotaDaoTest.getQuotaCluster ( org.ovirt.engine.core.dao.QuotaDaoTest.getSpecificQuotaCluster ( quota.getId ( ) ) ) ) ; quota.setQuotaStorages ( org.ovirt.engine.core.dao.QuotaDaoTest.getQuotaStorage ( org.ovirt.engine.core.dao.QuotaDaoTest.getSpecificQuotaStorage ( quota.getId ( ) ) ) ) ; dao.save ( quota ) ; org.ovirt.engine.core.common.businessentities.Quota quotaEntity = dao.getById ( quota.getId ( ) ) ; org.junit.Assert.assertNotNull ( quotaEntity ) ; org.junit.Assert.assertEquals ( quota , quotaEntity ) ; }

Target:
public void testSpecificQuotaLimitations ( ) { org.ovirt.engine.core.common.businessentities.Quota quota = org.ovirt.engine.core.dao.QuotaDaoTest.createGeneralQuota ( ) ; quota.setQuotaClusters ( org.ovirt.engine.core.dao.QuotaDaoTest.getQuotaCluster ( org.ovirt.engine.core.dao.QuotaDaoTest.getSpecificQuotaCluster ( quota.getId ( ) ) ) ) ; quota.setQuotaStorages ( org.ovirt.engine.core.dao.QuotaDaoTest.getQuotaStorage ( org.ovirt.engine.core.dao.QuotaDaoTest.getSpecificQuotaStorage ( quota.getId ( ) ) ) ) ; dao.save ( quota ) ; org.ovirt.engine.core.common.businessentities.Quota quotaEntity = dao.getById ( quota.getId ( ) ) ; org.junit.jupiter.api.Assertions.assertNotNull ( quotaEntity ) ; org.junit.jupiter.api.Assertions.assertEquals ( quota , quotaEntity ) ; }
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.CreateSnapshotsForVmCommandTest.getEmptyDiskList ( ) ) . when ( cmd ) . getDisksList ( ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( cmd , EngineMessage.ACTION_TYPE_FAILED_VM_IS_DURING_SNAPSHOT ) ; }

Target:
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.CreateSnapshotForVmCommandTest.getEmptyDiskList ( ) ) . when ( cmd ) . getDisksList ( ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( cmd , EngineMessage.ACTION_TYPE_FAILED_VM_IS_DURING_SNAPSHOT ) ; }
Source:
protected < T > boolean validate ( T value ) { java.util.List < java.lang.String > messages = org.ovirt.engine.core.common.utils.ValidationUtils.validateInputs ( getValidationGroups ( ) , value ) ; if ( ! ( messages.isEmpty ( ) ) ) { getReturnValue ( ) . getCanDoActionMessages ( ) . addAll ( messages ) ; return false ; } return true ; }

Target:
protected boolean validateObject ( java.lang.Object value ) { java.util.List < java.lang.String > messages = org.ovirt.engine.core.common.utils.ValidationUtils.validateInputs ( getValidationGroups ( ) , value ) ; if ( ! ( messages.isEmpty ( ) ) ) { getReturnValue ( ) . getCanDoActionMessages ( ) . addAll ( messages ) ; return false ; } return true ; }
Source:
private void DontMigrateVM_EntityChanged ( java.lang.Object sender , org.ovirt.engine.core.compat.EventArgs args ) { if ( ( ( java.lang.Boolean ) ( getDontMigrateVM ( ) . getEntity ( ) ) ) == true ) { clearAndDisable ( getRunVMOnSpecificHost ( ) ) ; getHostCpu ( ) . setIsChangable ( true ) ; } else { clearAndDisable ( getHostCpu ( ) ) ; getRunVMOnSpecificHost ( ) . setIsChangable ( true ) ; } }

Target:
private void DontMigrateVM_EntityChanged ( java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { if ( ( ( java.lang.Boolean ) ( getDontMigrateVM ( ) . getEntity ( ) ) ) == true ) { clearAndDisable ( getRunVMOnSpecificHost ( ) ) ; getHostCpu ( ) . setIsChangable ( true ) ; } else { clearAndDisable ( getHostCpu ( ) ) ; getRunVMOnSpecificHost ( ) . setIsChangable ( true ) ; } behavior.updateCpuPinningVisibility ( ) ; }
Source:
public void testHostsRuleStructureNeg ( ) throws java.lang.Exception { org.ovirt.engine.api.model.AffinityGroup model = new org.ovirt.engine.api.model.AffinityGroup ( ) ; org.ovirt.engine.api.model.AffinityRule rule = new org.ovirt.engine.api.model.AffinityRule ( ) ; rule.setEnabled ( true ) ; rule.setEnforcing ( false ) ; rule.setPositive ( true ) ; model.setHostsRule ( rule ) ; org.ovirt.engine.api.model.AffinityGroup entity = new org.ovirt.engine.api.model.AffinityGroup ( ) ; org.ovirt.engine.api.restapi.types.AffinityGroupMapper.map ( model , entity ) ; org.junit.Assert.assertEquals ( EntityAffinityRule.POSITIVE , entity.getVdsAffinityRule ( ) ) ; org.junit.Assert.assertEquals ( false , entity.isVdsEnforcing ( ) ) ; }

Target:
public void testHostsRuleStructureNeg ( ) throws java.lang.Exception { org.ovirt.engine.api.model.AffinityGroup model = new org.ovirt.engine.api.model.AffinityGroup ( ) ; org.ovirt.engine.api.model.AffinityRule rule = new org.ovirt.engine.api.model.AffinityRule ( ) ; rule.setEnabled ( true ) ; rule.setEnforcing ( false ) ; rule.setPositive ( true ) ; model.setHostsRule ( rule ) ; org.ovirt.engine.api.model.AffinityGroup entity = new org.ovirt.engine.api.model.AffinityGroup ( ) ; org.ovirt.engine.api.restapi.types.AffinityGroupMapper.map ( model , entity ) ; org.junit.Assert.assertEquals ( EntityAffinityRule.POSITIVE , entity.getVdsAffinityRule ( ) ) ; org.junit.Assert.assertFalse ( entity.isVdsEnforcing ( ) ) ; }
Source:
private void runThreads ( final int threadsNumber , org.ovirt.engine.core.utils.thread.LatchedRunnableWrapperTest.RunnableCreator runnableCreator ) { java.util.concurrent.ExecutorService fixedThreadPool = java.util.concurrent.Executors.newFixedThreadPool ( threadsNumber ) ; java.util.concurrent.CountDownLatch latch = new java.util.concurrent.CountDownLatch ( threadsNumber ) ; for ( int index = 0 ; index < threadsNumber ; index ++ ) { fixedThreadPool.execute ( new org.ovirt.engine.core.utils.thread.LatchedRunnableWrapper ( runnableCreator.createRunnable ( ) , latch ) ) ; } try { latch.await ( ) ; } catch ( java.lang.InterruptedException e ) { e.printStackTrace ( ) ; } }

Target:
private void verifyCommonExecutionChecks ( ) { org.mockito.Mockito.verify ( latch , org.mockito.Mockito.times ( org.ovirt.engine.core.utils.thread.LatchedRunnableWrapperTest.THREADS_NUMBER ) ) . countDown ( ) ; org.junit.Assert.assertEquals ( "latch counter value wasn't in the expected value" , 0 , latch.getCount ( ) ) ; try { org.mockito.Mockito.verify ( latch , org.mockito.Mockito.times ( 1 ) ) . await ( ) ; } catch ( java.lang.InterruptedException e ) { throw new org.mockito.exceptions.base.MockitoException ( e.toString ( ) ) ; } }
Source:
protected boolean validateImages ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > imagesToValidate = org.ovirt.engine.core.bll.ImagesHandler.filterImageDisks ( org.ovirt.engine.core.bll.RemoveSnapshotCommand.getDiskDao ( ) . getAllForVm ( org.ovirt.engine.core.bll.RemoveSnapshotCommand.getVmId ( ) ) , true , false ) ; org.ovirt.engine.core.bll.validator.DiskImagesValidator diskImagesValidator = new org.ovirt.engine.core.bll.validator.DiskImagesValidator ( imagesToValidate ) ; return ( validate ( diskImagesValidator.diskImagesNotLocked ( ) ) ) && ( org.ovirt.engine.core.bll.ImagesHandler.PerformImagesChecks ( org.ovirt.engine.core.bll.RemoveSnapshotCommand.getReturnValue ( ) . getCanDoActionMessages ( ) , org.ovirt.engine.core.bll.RemoveSnapshotCommand.getVm ( ) . getStoragePoolId ( ) , true , true , imagesToValidate ) ) ; }

Target:
protected boolean validateImages ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > imagesToValidate = org.ovirt.engine.core.bll.ImagesHandler.filterImageDisks ( org.ovirt.engine.core.bll.RemoveSnapshotCommand.getDiskDao ( ) . getAllForVm ( org.ovirt.engine.core.bll.RemoveSnapshotCommand.getVmId ( ) ) , true , false ) ; org.ovirt.engine.core.bll.validator.DiskImagesValidator diskImagesValidator = new org.ovirt.engine.core.bll.validator.DiskImagesValidator ( imagesToValidate ) ; return ( validate ( diskImagesValidator.diskImagesNotLocked ( ) ) ) && ( validate ( diskImagesValidator.diskImagesNotIllegal ( ) ) ) ; }
Source:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { for ( org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterNetworkModel model : getItems ( ) ) { if ( model.isManagement ( ) ) { managementNetwork = model ; } } }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { for ( org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterNetworkModel model : getItems ( ) ) { if ( model.isManagement ( ) ) { managementNetwork = model ; } if ( model.isGlusterNetwork ( ) ) { glusterNetwork = model ; } } }
Source:
public static void getDomainListViaPublic ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , boolean filterInternalDomain ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? new java.util.ArrayList < java.lang.String > ( ( ( java.util.ArrayList < java.lang.String > ) ( source ) ) ) : new java.util.ArrayList < java.lang.String > ( ) ; } } ; org.ovirt.engine.core.common.queries.GetDomainListParameters tempVar = new org.ovirt.engine.core.common.queries.GetDomainListParameters ( ) ; tempVar.setFilterInternalDomain ( filterInternalDomain ) ; org.ovirt.engine.ui.frontend.Frontend.RunPublicQuery ( VdcQueryType.GetDomainList , tempVar , aQuery ) ; }

Target:
public static void getVmConfigurationBySnapshot ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid snapshotSourceId ) { 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 ? ( ( org.ovirt.engine.core.common.businessentities.VM ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmConfigurationBySnapshot , new org.ovirt.engine.core.common.queries.IdQueryParameters ( snapshotSourceId ) , aQuery ) ; }
Source:
public static void GetStorageDomainListByTemplate ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid templateId ) { 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.RunQuery ( VdcQueryType.GetStorageDomainsByVmTemplateId , new org.ovirt.engine.core.common.queries.GetStorageDomainsByVmTemplateIdQueryParameters ( templateId ) , aQuery ) ; }

Target:
public static void GetTemplateDiskList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid templateId ) { 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.DiskImage > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVmTemplatesDisks , new org.ovirt.engine.core.common.queries.GetVmTemplatesDisksParameters ( templateId ) , aQuery ) ; }
Source:
public void testValidName ( ) { prepareVmToPassCanDoAction ( ) ; junit.framework.Assert.assertTrue ( "canDoAction should have passed." , command.canDoAction ( ) ) ; }

Target:
public void testDedicatedHostNotInSameCluster ( ) { prepareVmToPassCanDoAction ( ) ; org.ovirt.engine.core.common.businessentities.VDS vds = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; vds.setVdsGroupId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; org.mockito.Mockito.doReturn ( vdsDAO ) . when ( command ) . getVdsDAO ( ) ; org.mockito.Mockito.when ( vdsDAO.get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( vds ) ; vmStatic.setDedicatedVmForVds ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; junit.framework.Assert.assertFalse ( "canDoAction should have failed with invalid dedicated host." , command.canDoAction ( ) ) ; assertCanDoActionMessage ( VdcBllMessages.ACTION_TYPE_FAILED_DEDICATED_VDS_NOT_IN_SAME_CLUSTER ) ; }
Source:
public void doTestRegister ( org.ovirt.engine.core.common.businessentities.Cluster cluster , boolean importAsNewEntity ) throws java.lang.Exception { setUriInfo ( setUpActionExpectations ( ActionType.ImportVmFromConfiguration , org.ovirt.engine.core.common.action.ImportVmParameters.class , new java.lang.String [ ] { "ContainerId" , "StorageDomainId" , "ClusterId" , "ImportAsNewEntity" , "ImagesExistOnTargetStorageDomain" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendStorageDomainVmResourceTest.VM_ID , GUIDS [ 3 ] , GUIDS [ 1 ] , importAsNewEntity , true } ) ) ; org.ovirt.engine.api.model.Action action = new org.ovirt.engine.api.model.Action ( ) ; action.setCluster ( cluster ) ; action.setClone ( importAsNewEntity ) ; verifyActionResponse ( resource.register ( action ) ) ; }

Target:
public void doTestRegister ( org.ovirt.engine.core.common.businessentities.Cluster cluster , boolean importAsNewEntity ) throws java.lang.Exception { setUriInfo ( setUpActionExpectations ( ActionType.ImportVmFromConfiguration , org.ovirt.engine.core.common.action.ImportVmFromConfParameters.class , new java.lang.String [ ] { "ContainerId" , "StorageDomainId" , "ClusterId" , "ImportAsNewEntity" , "ImagesExistOnTargetStorageDomain" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendStorageDomainVmResourceTest.VM_ID , GUIDS [ 3 ] , GUIDS [ 1 ] , importAsNewEntity , true } ) ) ; org.ovirt.engine.api.model.Action action = new org.ovirt.engine.api.model.Action ( ) ; action.setCluster ( cluster ) ; action.setClone ( importAsNewEntity ) ; verifyActionResponse ( resource.register ( action ) ) ; }
Source:
private void clusterHasVds ( ) { org.ovirt.engine.core.common.businessentities.VDS vds = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; vds.setStatus ( VDSStatus.Up ) ; vds.setSupportedClusterLevels ( org.ovirt.engine.core.bll.UpdateClusterCommandTest.VERSION_1_1.toString ( ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.VDS > vdsList = new java.util.ArrayList < > ( ) ; vdsList.add ( vds ) ; org.mockito.Mockito.when ( vdsDao.getAllForCluster ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( vdsList ) ; }

Target:
private void vdsExist ( ) { org.ovirt.engine.core.common.businessentities.VDS vds = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; vds.setStatus ( VDSStatus.Up ) ; java.util.List < org.ovirt.engine.core.common.businessentities.VDS > vdsList = new java.util.ArrayList < > ( ) ; vdsList.add ( vds ) ; org.mockito.Mockito.when ( vdsDao.getAllForCluster ( org.mockito.ArgumentMatchers.any ( ) ) ) . thenReturn ( vdsList ) ; }
Source:
public void getStorageConnectionById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String id , boolean isRefresh ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( org.ovirt.engine.core.common.businessentities.StorageServerConnections ) ( source ) ) : null ; } } ; org.ovirt.engine.core.common.queries.StorageServerConnectionQueryParametersBase params = new org.ovirt.engine.core.common.queries.StorageServerConnectionQueryParametersBase ( id ) ; params.setRefresh ( isRefresh ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageServerConnectionById , params , aQuery ) ; }

Target:
public void getStorageConnectionById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String id , boolean isRefresh ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( org.ovirt.engine.core.common.businessentities.StorageServerConnections ) ( source ) ) : null ; } } ; org.ovirt.engine.core.common.queries.StorageServerConnectionQueryParametersBase params = new org.ovirt.engine.core.common.queries.StorageServerConnectionQueryParametersBase ( id ) ; params.setRefresh ( isRefresh ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageServerConnectionById , params , aQuery ) ; }
Source:
public void mockConfig ( ) { java.util.HashSet < org.ovirt.engine.core.compat.Version > supportedClusters = new java.util.HashSet < > ( ) ; supportedClusters.add ( version ) ; org.mockito.Mockito.when ( host.getSupportedClusterVersionsSet ( ) ) . thenReturn ( supportedClusters ) ; org.mockito.Mockito.when ( host.getVdsGroupCompatibilityVersion ( ) ) . thenReturn ( version ) ; configRule.mockConfigValue ( ConfigValues.DefaultRouteSupported , version , java.lang.Boolean.FALSE ) ; configRule.mockConfigValue ( ConfigValues.DefaultMTU , 1500 ) ; }

Target:
public void mockConfig ( ) { java.util.HashSet < org.ovirt.engine.core.compat.Version > supportedClusters = new java.util.HashSet < > ( ) ; supportedClusters.add ( version ) ; org.mockito.Mockito.when ( host.getSupportedClusterVersionsSet ( ) ) . thenReturn ( supportedClusters ) ; org.mockito.Mockito.when ( host.getVdsGroupCompatibilityVersion ( ) ) . thenReturn ( version ) ; configRule.mockConfigValue ( ConfigValues.DefaultRouteSupported , version , java.lang.Boolean.FALSE ) ; configRule.mockConfigValue ( ConfigValues.DefaultMTU , 1500 ) ; configRule.mockConfigValue ( ConfigValues.HostNetworkQosSupported , version , false ) ; }
Source:
private static org.ovirt.engine.core.common.businessentities.RepoFileMetaData getNewIsoRepoFile ( ) { org.ovirt.engine.core.common.businessentities.RepoFileMetaData newRepoFileMap = new org.ovirt.engine.core.common.businessentities.RepoFileMetaData ( ) ; newRepoFileMap.setFileType ( FileTypeExtension.ISO ) ; newRepoFileMap.setRepoFileName ( "isoDomain.iso" ) ; newRepoFileMap.setLastRefreshed ( java.lang.System.currentTimeMillis ( ) ) ; newRepoFileMap.setSize ( 0 ) ; newRepoFileMap.setDateCreated ( null ) ; newRepoFileMap.setRepoDomainId ( FixturesTool.STORAGE_DOAMIN_NFS_ISO ) ; return newRepoFileMap ; }

Target:
private static org.ovirt.engine.core.common.businessentities.RepoFileMetaData getNewIsoRepoFile ( ) { org.ovirt.engine.core.common.businessentities.RepoFileMetaData newRepoFileMap = new org.ovirt.engine.core.common.businessentities.RepoFileMetaData ( ) ; newRepoFileMap.setFileType ( ImageType.ISO ) ; newRepoFileMap.setRepoFileName ( "isoDomain.iso" ) ; newRepoFileMap.setLastRefreshed ( java.lang.System.currentTimeMillis ( ) ) ; newRepoFileMap.setSize ( 0 ) ; newRepoFileMap.setDateCreated ( null ) ; newRepoFileMap.setRepoDomainId ( FixturesTool.STORAGE_DOAMIN_NFS_ISO ) ; return newRepoFileMap ; }
Source:
private static void addUsbSlots ( org.ovirt.engine.core.common.businessentities.VmBase vm , int numOfSlots ) { for ( int index = 1 ; index <= numOfSlots ; index ++ ) { org.ovirt.engine.core.bll.utils.VmDeviceUtils.addManagedDevice ( new org.ovirt.engine.core.common.businessentities.VmDeviceId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , vm.getId ( ) ) , VmDeviceGeneralType.CHANNEL , VmDeviceType.SPICEVMC , org.ovirt.engine.core.bll.utils.VmDeviceUtils.getUsbSlotSpecParams ( ) , true , false , null ) ; } }

Target:
private static void addUsbSlots ( org.ovirt.engine.core.common.businessentities.VmBase vm , int numOfSlots ) { for ( int index = 1 ; index <= numOfSlots ; index ++ ) { org.ovirt.engine.core.bll.utils.VmDeviceUtils.addManagedDevice ( new org.ovirt.engine.core.common.businessentities.VmDeviceId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , vm.getId ( ) ) , VmDeviceGeneralType.REDIR , VmDeviceType.SPICEVMC , org.ovirt.engine.core.bll.utils.VmDeviceUtils.getUsbSlotSpecParams ( ) , true , false , null ) ; } }
Source:
private void setupMock ( ) { vdsBrokerFrontend = org.mockito.Mockito.mock ( org.ovirt.engine.core.common.interfaces.VDSBrokerFrontend.class ) ; org.mockito.Mockito.doReturn ( vdsBrokerFrontend ) . when ( getQuery ( ) ) . getBackendInstance ( ) ; org.ovirt.engine.core.common.vdscommands.VDSReturnValue returnValue = new org.ovirt.engine.core.common.vdscommands.VDSReturnValue ( ) ; returnValue.setSucceeded ( true ) ; returnValue.setReturnValue ( expected ) ; org.mockito.Mockito.when ( vdsBrokerFrontend.RunVdsCommand ( org.mockito.Matchers.eq ( VDSCommandType.GetGlusterVolumeOptionsInfo ) , org.mockito.Matchers.any ( org.ovirt.engine.core.common.vdscommands.VDSParametersBase.class ) ) ) . thenReturn ( returnValue ) ; }

Target:
private void setupMock ( ) { vdsBrokerFrontend = org.mockito.Mockito.mock ( org.ovirt.engine.core.common.interfaces.VDSBrokerFrontend.class ) ; org.mockito.Mockito.doReturn ( vdsBrokerFrontend ) . when ( getQuery ( ) ) . getBackendResourceManager ( ) ; org.ovirt.engine.core.common.vdscommands.VDSReturnValue returnValue = new org.ovirt.engine.core.common.vdscommands.VDSReturnValue ( ) ; returnValue.setSucceeded ( true ) ; returnValue.setReturnValue ( expected ) ; org.mockito.Mockito.when ( vdsBrokerFrontend.RunVdsCommand ( org.mockito.Matchers.eq ( VDSCommandType.GetGlusterVolumeOptionsInfo ) , org.mockito.Matchers.any ( org.ovirt.engine.core.common.vdscommands.VDSParametersBase.class ) ) ) . thenReturn ( returnValue ) ; }
Source:
public static org.ovirt.engine.api.model.MemoryPolicy map ( org.ovirt.engine.core.common.businessentities.VDSGroup entity , org.ovirt.engine.api.model.MemoryPolicy template ) { org.ovirt.engine.api.model.MemoryPolicy model = ( template != null ) ? template : new org.ovirt.engine.api.model.MemoryPolicy ( ) ; model.setOverCommit ( new org.ovirt.engine.api.model.MemoryOverCommit ( ) ) ; model.getOverCommit ( ) . setPercent ( entity.getMaxVdsMemoryOverCommit ( ) ) ; model.setTransparentHugepages ( new org.ovirt.engine.api.model.TransparentHugePages ( ) ) ; model.getTransparentHugepages ( ) . setEnabled ( entity.getTransparentHugepages ( ) ) ; return model ; }

Target:
public static org.ovirt.engine.api.model.MemoryPolicy map ( org.ovirt.engine.core.common.businessentities.Cluster entity , org.ovirt.engine.api.model.MemoryPolicy template ) { org.ovirt.engine.api.model.MemoryPolicy model = ( template != null ) ? template : new org.ovirt.engine.api.model.MemoryPolicy ( ) ; model.setOverCommit ( new org.ovirt.engine.api.model.MemoryOverCommit ( ) ) ; model.getOverCommit ( ) . setPercent ( entity.getMaxVdsMemoryOverCommit ( ) ) ; model.setTransparentHugepages ( new org.ovirt.engine.api.model.TransparentHugePages ( ) ) ; model.getTransparentHugepages ( ) . setEnabled ( entity.getTransparentHugepages ( ) ) ; return model ; }
Source:
public java.util.concurrent.Future < java.lang.Void > close ( ) { return scheduleTask ( this . disconnectCallable ) ; }

Target:
public java.util.concurrent.Future < java.lang.Void > close ( ) { final java.lang.String message = "Client close" ; final java.util.concurrent.Callable < java.lang.Void > disconnectCallable = new java.util.concurrent.Callable < java.lang.Void > ( ) { @ java.lang.Override public java.lang.Void call ( ) { disconnect ( message ) ; return null ; } } ; return scheduleTask ( disconnectCallable ) ; }
Source:
public void getHostPublicKey ( 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 ( ) . runQuery ( VdcQueryType.GetServerSSHPublicKey , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }

Target:
public void getClusterGlusterServices ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.core.common.queries.gluster.GlusterVolumeAdvancedDetailsParameters parameters = new org.ovirt.engine.core.common.queries.gluster.GlusterVolumeAdvancedDetailsParameters ( clusterId , null , null , false ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterVolumeAdvancedDetails , parameters , aQuery ) ; }
Source:
protected java.util.List < org.ovirt.engine.core.common.businessentities.storage.Disk > filterDisks ( java.util.List < org.ovirt.engine.core.common.businessentities.storage.Disk > diskList ) { org.ovirt.engine.core.common.businessentities.VM vm = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmDao ( ) . get ( org.ovirt.engine.core.bll.storage.disk.GetAllAttachableDisksForVmQuery.getParameters ( ) . getVmId ( ) , org.ovirt.engine.core.bll.storage.disk.GetAllAttachableDisksForVmQuery.getUserID ( ) , org.ovirt.engine.core.bll.storage.disk.GetAllAttachableDisksForVmQuery.getParameters ( ) . isFiltered ( ) ) ; if ( vm == null ) { return new java.util.ArrayList < > ( ) ; } return doFilter ( diskList , vm.getOs ( ) , vm.getCompatibilityVersion ( ) ) ; }

Target:
protected void executeQueryCommand ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.Disk > diskList = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getDiskDao ( ) . getAllAttachableDisksByPoolId ( org.ovirt.engine.core.bll.storage.disk.GetAllAttachableDisksForVmQuery.getParameters ( ) . getStoragePoolId ( ) , org.ovirt.engine.core.bll.storage.disk.GetAllAttachableDisksForVmQuery.getParameters ( ) . getVmId ( ) , org.ovirt.engine.core.bll.storage.disk.GetAllAttachableDisksForVmQuery.getUserID ( ) , org.ovirt.engine.core.bll.storage.disk.GetAllAttachableDisksForVmQuery.getParameters ( ) . isFiltered ( ) ) ; if ( org.apache.commons.collections.CollectionUtils.isEmpty ( diskList ) ) { setReturnValue ( diskList ) ; return ; } setReturnValue ( diskList ) ; }
Source:
public void onValueChange ( com.google.gwt.event.logical.shared.ValueChangeEvent < java.lang.String > event ) { super . onValueChange ( event ) ; if ( "firefox" . equalsIgnoreCase ( clientAgentType.getBrowser ( ) ) ) { com.google.gwt.dom.client.Node favicon = com.google.gwt.user.client.DOM.getElementById ( "id-link-favicon" ) ; if ( favicon != null ) { com.google.gwt.dom.client.Node parent = favicon.getParentNode ( ) ; favicon.removeFromParent ( ) ; parent.appendChild ( favicon ) ; } } }

Target:
public void execute ( ) { com.google.gwt.dom.client.Node favicon = com.google.gwt.user.client.DOM.getElementById ( "id-link-favicon" ) ; if ( favicon != null ) { com.google.gwt.dom.client.Node parent = favicon.getParentNode ( ) ; favicon.removeFromParent ( ) ; parent.appendChild ( favicon ) ; } }
Source:
public static void getWANColorDepth ( 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 ? org.ovirt.engine.ui.uicommonweb.models.vms.WanColorDepth.fromInt ( ( ( java.lang.Integer ) ( source ) ) . intValue ( ) ) : org.ovirt.engine.ui.uicommonweb.models.vms.WanColorDepth.depth16 ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.WANColorDepth , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public void getWANColorDepth ( 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 ? org.ovirt.engine.core.common.console.ConsoleOptions.WanColorDepth.fromInt ( ( ( java.lang.Integer ) ( source ) ) . intValue ( ) ) : org.ovirt.engine.core.common.console.ConsoleOptions.WanColorDepth.depth16 ; } } ; getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.WANColorDepth , getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
public static void getGlusterHooks ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? source : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetGlusterHooks , new org.ovirt.engine.core.common.queries.gluster.GlusterParameters ( clusterId ) , aQuery ) ; }

Target:
public static void getGlusterHostsNewlyAdded ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId , boolean isFingerprintRequired ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAddedGlusterServers , new org.ovirt.engine.core.common.queries.gluster.AddedGlusterServersParameters ( clusterId , isFingerprintRequired ) , aQuery ) ; }
Source:
public void toggleChangeability ( boolean value ) { getName ( ) . setIsChangable ( value ) ; getCidr ( ) . setIsChangable ( value ) ; getIpVersion ( ) . setIsChangable ( value ) ; }

Target:
public void toggleChangeability ( boolean value ) { getName ( ) . setIsChangable ( value ) ; getCidr ( ) . setIsChangable ( value ) ; getIpVersion ( ) . setIsChangable ( value ) ; getGateway ( ) . setIsChangable ( value ) ; getDnsServers ( ) . setIsChangable ( value ) ; }
Source:
public static org.ovirt.engine.core.bll.scheduling.SchedulingManager getInstance ( ) { if ( ( org.ovirt.engine.core.bll.scheduling.SchedulingManager.instance ) == null ) { synchronized ( org.ovirt.engine.core.bll.scheduling.SchedulingManager.class ) { if ( ( org.ovirt.engine.core.bll.scheduling.SchedulingManager.instance ) == null ) { org.ovirt.engine.core.bll.scheduling.SchedulingManager.instance = new org.ovirt.engine.core.bll.scheduling.SchedulingManager ( ) ; } } } return org.ovirt.engine.core.bll.scheduling.SchedulingManager.instance ; }

Target:
public static org.ovirt.engine.core.bll.scheduling.SchedulingManager getInstance ( ) { if ( ( org.ovirt.engine.core.bll.scheduling.SchedulingManager.instance ) == null ) { synchronized ( org.ovirt.engine.core.bll.scheduling.SchedulingManager.class ) { if ( ( org.ovirt.engine.core.bll.scheduling.SchedulingManager.instance ) == null ) { org.ovirt.engine.core.bll.scheduling.SchedulingManager.instance = new org.ovirt.engine.core.bll.scheduling.SchedulingManager ( ) ; org.ovirt.engine.core.bll.scheduling.SchedulingManager.EnableLoadBalancer ( ) ; } } } return org.ovirt.engine.core.bll.scheduling.SchedulingManager.instance ; }
Source:
public java.lang.String toString ( ) { return ( ( ( ( ( ( ( "FilterEntry{" + "eventName='" ) + ( eventName ) ) + '\'' ) + ", exclude=" ) + ( exclude ) ) + ", recipient=" ) + ( recipient ) ) + '}' ; }

Target:
public java.lang.String toString ( ) { return ( ( ( ( ( ( ( ( ( "FilterEntry{" + "eventName='" ) + ( eventName ) ) + '\'' ) + ", severity=" ) + ( ( severity ) != null ? severity.name ( ) : "any" ) ) + ", exclude=" ) + ( exclude ) ) + ", recipient=" ) + ( recipient ) ) + '}' ; }
Source:
public static void GetRoleList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Role > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Role > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllRoles , new org.ovirt.engine.core.common.queries.MultilevelAdministrationsQueriesParameters ( ) , aQuery ) ; }

Target:
public static void getRoleList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Role > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Role > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllRoles , new org.ovirt.engine.core.common.queries.MultilevelAdministrationsQueriesParameters ( ) , aQuery ) ; }
Source:
public void invalidAuthenticationUrl ( ) { org.mockito.Mockito.when ( provider.isRequiringAuthentication ( ) ) . thenReturn ( true ) ; org.mockito.Mockito.when ( provider.getUsername ( ) ) . thenReturn ( "user" ) ; org.mockito.Mockito.when ( provider.getPassword ( ) ) . thenReturn ( "pass" ) ; org.junit.Assert.assertThat ( validator.validateAuthentication ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.ACTION_TYPE_FAILED_PROVIDER_NO_AUTH_URL ) ) ; }

Target:
public void invalidAuthenticationUrl ( ) { org.mockito.Mockito.when ( provider.isRequiringAuthentication ( ) ) . thenReturn ( true ) ; org.mockito.Mockito.when ( provider.getUsername ( ) ) . thenReturn ( "user" ) ; org.mockito.Mockito.when ( provider.getPassword ( ) ) . thenReturn ( "pass" ) ; org.hamcrest.MatcherAssert.assertThat ( validator.validateAuthentication ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.ACTION_TYPE_FAILED_PROVIDER_NO_AUTH_URL ) ) ; }
Source:
protected void updateOldImageAsActive ( org.ovirt.engine.core.common.businessentities.Snapshot.SnapshotType snapshotType , boolean active ) { org.ovirt.engine.core.compat.Guid oldImageId = findImageForSameDrive ( snapshotType ) ; if ( oldImageId == null ) { log.error ( "Can't find image to update to active '{}', snapshot type '{}', original image id '{}'" , active , snapshotType , getImageId ( ) ) ; return ; } org.ovirt.engine.core.common.businessentities.storage.DiskImage oldImage = diskImageDao.getSnapshotById ( oldImageId ) ; oldImage.setActive ( active ) ; org.ovirt.engine.core.bll.storage.disk.image.BaseImagesCommand.getImageDao ( ) . update ( oldImage.getImage ( ) ) ; }

Target:
protected void updateOldImageAsActive ( org.ovirt.engine.core.common.businessentities.Snapshot.SnapshotType snapshotType , boolean active ) { org.ovirt.engine.core.compat.Guid oldImageId = findImageForSameDrive ( snapshotType ) ; if ( oldImageId == null ) { log.error ( "Can't find image to update to active '{}', snapshot type '{}', original image id '{}'" , active , snapshotType , getImageId ( ) ) ; return ; } org.ovirt.engine.core.common.businessentities.storage.DiskImage oldImage = diskImageDao.getSnapshotById ( oldImageId ) ; oldImage.setActive ( active ) ; imageDao.update ( oldImage.getImage ( ) ) ; }