auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
protected void endVmCommand ( ) { org.ovirt.engine.core.bll.StopVmCommandBase.setCommandShouldBeLogged ( false ) ; if ( ( org.ovirt.engine.core.bll.StopVmCommandBase.getVm ( ) ) == null ) { org.ovirt.engine.core.bll.StopVmCommandBase.log.warn ( "VM is null, not performing full endAction" ) ; org.ovirt.engine.core.bll.StopVmCommandBase.setSucceeded ( true ) ; return ; } org.ovirt.engine.core.bll.StopVmCommandBase.getVm ( ) . setStatus ( VMStatus.Down ) ; snapshotDao.removeMemoryFromActiveSnapshot ( org.ovirt.engine.core.bll.StopVmCommandBase.getVmId ( ) ) ; org.ovirt.engine.core.bll.StopVmCommandBase.getVmDynamicDao ( ) . update ( org.ovirt.engine.core.bll.StopVmCommandBase.getVm ( ) . getDynamicData ( ) ) ; org.ovirt.engine.core.bll.StopVmCommandBase.setSucceeded ( true ) ; }

Target:
protected void endVmCommand ( ) { org.ovirt.engine.core.bll.StopVmCommandBase.setCommandShouldBeLogged ( false ) ; if ( ( org.ovirt.engine.core.bll.StopVmCommandBase.getVm ( ) ) == null ) { org.ovirt.engine.core.bll.StopVmCommandBase.log.warn ( "VM is null, not performing full endAction" ) ; org.ovirt.engine.core.bll.StopVmCommandBase.setSucceeded ( true ) ; return ; } org.ovirt.engine.core.bll.StopVmCommandBase.getVm ( ) . setStatus ( VMStatus.Down ) ; snapshotDao.removeMemoryFromActiveSnapshot ( org.ovirt.engine.core.bll.StopVmCommandBase.getVmId ( ) ) ; vmDynamicDao.update ( org.ovirt.engine.core.bll.StopVmCommandBase.getVm ( ) . getDynamicData ( ) ) ; org.ovirt.engine.core.bll.StopVmCommandBase.setSucceeded ( true ) ; }
Source:
public void testValidateModifiedBondSlavesWhenSlaveInterfaceDoesNotExist ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.Bond bond = createBond ( ) ; bond.setSlaves ( java.util.Arrays.asList ( "slaveA" , "slaveB" ) ) ; org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidator validator = new org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidatorTest.HostSetupNetworksValidatorBuilder ( ) . setParams ( new org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidatorTest.ParametersBuilder ( ) . addBonds ( bond ) ) . build ( ) ; _doTestValidateModifiedBondSlaves ( org.mockito.Mockito.spy ( validator ) , new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.HOST_NETWORK_INTERFACE_NOT_EXIST ) , ValidationResult.VALID , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.HOST_NETWORK_INTERFACE_NOT_EXIST ) ) ; }

Target:
public void testValidateModifiedBondSlavesWhenSlaveInterfaceDoesNotExist ( ) throws java.lang.Exception { org.ovirt.engine.core.common.action.CreateOrUpdateBond createOrUpdateBond = createNewCreateOrUpdateBond ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , "bond1" , "slaveA" , "slaveB" ) ; org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidator validator = new org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidatorTest.HostSetupNetworksValidatorBuilder ( ) . setParams ( new org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidatorTest.ParametersBuilder ( ) . addBonds ( createOrUpdateBond ) ) . build ( ) ; doTestValidateModifiedBondSlaves ( org.mockito.Mockito.spy ( validator ) , new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.HOST_NETWORK_INTERFACE_NOT_EXIST ) , ValidationResult.VALID , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.HOST_NETWORK_INTERFACE_NOT_EXIST ) ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.AsyncTasks createAsyncTask ( org.ovirt.engine.core.common.asynctasks.AsyncTaskCreationInfo asyncTaskCreationInfo , org.ovirt.engine.core.common.action.VdcActionType parentCommand ) { org.ovirt.engine.core.common.action.VdcActionParametersBase parentParameters = getParentParameters ( parentCommand ) ; return new org.ovirt.engine.core.common.businessentities.AsyncTasks ( parentCommand , org.ovirt.engine.core.common.businessentities.AsyncTaskResultEnum.success , org.ovirt.engine.core.common.businessentities.AsyncTaskStatusEnum.running , asyncTaskCreationInfo.getVdsmTaskId ( ) , parentParameters , getParameters ( ) , asyncTaskCreationInfo.getStepId ( ) , getCommandId ( ) , parentParameters.getCommandId ( ) , asyncTaskCreationInfo.getStoragePoolID ( ) , asyncTaskCreationInfo.getTaskType ( ) ) ; }

Target:
public void persistCommand ( org.ovirt.engine.core.common.action.VdcActionType parentCommand , org.ovirt.engine.core.bll.context.CommandContext cmdContext , boolean enableCallBack ) { org.ovirt.engine.core.common.action.VdcActionParametersBase parentParameters = getParentParameters ( parentCommand ) ; javax.transaction.Transaction transaction = org.ovirt.engine.core.utils.transaction.TransactionSupport.suspend ( ) ; try { org.ovirt.engine.core.bll.tasks.TaskManagerUtil.persistCommand ( org.ovirt.engine.core.common.businessentities.CommandEntity.buildCommandEntity ( getCommandId ( ) , parentParameters.getCommandId ( ) , getActionType ( ) , getParameters ( ) , commandStatus , enableCallBack , getReturnValue ( ) ) , cmdContext ) ; } finally { org.ovirt.engine.core.utils.transaction.TransactionSupport.resume ( transaction ) ; } }
Source:
protected java.util.Map < java.lang.String , org.ovirt.engine.core.common.utils.Pair < java.lang.String , java.lang.String > > getExclusiveLocks ( ) { return org.ovirt.engine.core.bll.CreateAllSnapshotsFromVmCommand.getParameters ( ) . isNeedsLocking ( ) ? java.util.Collections.singletonMap ( org.ovirt.engine.core.bll.CreateAllSnapshotsFromVmCommand.getVmId ( ) . toString ( ) , org.ovirt.engine.core.bll.LockMessagesMatchUtil.makeLockingPair ( LockingGroup.VM , VdcBllMessages.ACTION_TYPE_FAILED_OBJECT_LOCKED ) ) : null ; }

Target:
protected java.util.Map < java.lang.String , org.ovirt.engine.core.common.utils.Pair < java.lang.String , java.lang.String > > getExclusiveLocks ( ) { return getParameters ( ) . isNeedsLocking ( ) ? java.util.Collections.singletonMap ( org.ovirt.engine.core.bll.CreateAllSnapshotsFromVmCommand.getVmId ( ) . toString ( ) , org.ovirt.engine.core.bll.LockMessagesMatchUtil.makeLockingPair ( LockingGroup.VM , getSnapshotIsBeingTakenForVmMessage ( ) ) ) : null ; }
Source:
public static void getStorageDomainList ( 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.StorageDomain > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ( ) ; } } ; org.ovirt.engine.core.common.queries.SearchParameters searchParams = new org.ovirt.engine.core.common.queries.SearchParameters ( "Storage:" , org.ovirt.engine.core.common.interfaces.SearchType.StorageDomain ) ; searchParams.setMaxCount ( 9999 ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , searchParams , aQuery ) ; }

Target:
public static void getStorageDomainMaxNameLength ( 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 ( ) : 1 ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.StorageDomainNameSizeLimit , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
public static org.ovirt.engine.core.compat.Version selectHighestVersion ( java.util.ArrayList < org.ovirt.engine.core.compat.Version > versions ) { org.ovirt.engine.core.compat.Version retVersion = org.ovirt.engine.ui.uicommonweb.Linq.firstOrDefault ( versions ) ; for ( org.ovirt.engine.core.compat.Version version : versions ) { if ( ( version.compareTo ( retVersion ) ) > 0 ) { retVersion = version ; } } return retVersion ; }

Target:
public static org.ovirt.engine.core.compat.Version selectHighestVersion ( java.util.ArrayList < org.ovirt.engine.core.compat.Version > versions ) { org.ovirt.engine.core.compat.Version retVersion = org.ovirt.engine.ui.uicommonweb.Linq.firstOrNull ( versions ) ; for ( org.ovirt.engine.core.compat.Version version : versions ) { if ( ( version.compareTo ( retVersion ) ) > 0 ) { retVersion = version ; } } return retVersion ; }
Source:
public boolean shouldUpdateVmStatus ( org.ovirt.engine.core.common.businessentities.VmDynamic vmDynamic ) { org.ovirt.engine.core.compat.Guid id = vmDynamic.getId ( ) ; if ( ! ( this . vmStatusUpdated.containsKey ( id ) ) ) { this . vmStatusUpdated.put ( id , vmDynamic.getStatusUpdatedTime ( ) ) ; return true ; } java.lang.Double knownStatusUpdate = this . vmStatusUpdated.get ( id ) ; java.lang.Double statusUpdateTime = vmDynamic.getStatusUpdatedTime ( ) ; if ( knownStatusUpdate <= statusUpdateTime ) { this . vmStatusUpdated.replace ( id , statusUpdateTime ) ; return true ; } return false ; }

Target:
public boolean getRefreshStatistics ( ) { return ( refreshIteration ) == ( numberRefreshesBeforeSave ) ; }
Source:
protected void onMouseOver ( ) { super . onMouseOver ( ) ; org.ovirt.engine.ui.uicommonweb.models.hosts.network.LogicalNetworkModel network = ( ( org.ovirt.engine.ui.uicommonweb.models.hosts.network.LogicalNetworkModel ) ( item ) ) ; if ( ( network != null ) && ( ( network.getAttachedToNic ( ) ) != null ) ) { actionButton.setVisible ( true ) ; } }

Target:
protected void onMouseOver ( ) { super . onMouseOver ( ) ; org.ovirt.engine.ui.uicommonweb.models.hosts.network.LogicalNetworkModel network = ( ( org.ovirt.engine.ui.uicommonweb.models.hosts.network.LogicalNetworkModel ) ( item ) ) ; if ( ( ( network != null ) && ( ( network.getAttachedToNic ( ) ) != null ) ) && ( ! ( network.isAttachedViaLabel ( ) ) ) ) { actionButton.setVisible ( true ) ; } }
Source:
public void SetDefaultNames2 ( ) { org.ovirt.engine.core.common.businessentities.VDS host = context.host ; if ( ( host.getvds_group_id ( ) ) != null ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetClusterById ( new org.ovirt.engine.ui.frontend.AsyncQuery ( this , new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void OnSuccess ( java.lang.Object target , java.lang.Object returnValue ) { context.hostCluster = ( ( org.ovirt.engine.core.common.businessentities.VDSGroup ) ( returnValue ) ) ; SetDefaultNames3 ( ) ; } } , frontendHash ) , host.getvds_group_id ( ) ) ; } else { SetDefaultNames3 ( ) ; } }

Target:
public void SetDefaultNames2 ( ) { org.ovirt.engine.core.common.businessentities.VDS host = context.host ; if ( ( host.getVdsGroupId ( ) ) != null ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetClusterById ( new org.ovirt.engine.ui.frontend.AsyncQuery ( this , new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void OnSuccess ( java.lang.Object target , java.lang.Object returnValue ) { context.hostCluster = ( ( org.ovirt.engine.core.common.businessentities.VDSGroup ) ( returnValue ) ) ; SetDefaultNames3 ( ) ; } } , frontendHash ) , host.getVdsGroupId ( ) ) ; } else { SetDefaultNames3 ( ) ; } }
Source:
public void isUSBEnabledByDefault ( 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.Boolean ) ( source ) ) . booleanValue ( ) : false ; } } ; getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.EnableUSBAsDefault , getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public void isTemplateNameUnique ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String name ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ! ( ( ( java.lang.Boolean ) ( source ) ) . booleanValue ( ) ) : false ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.IsVmTemlateWithSameNameExist , new org.ovirt.engine.core.common.queries.NameQueryParameters ( name ) , aQuery ) ; }
Source:
public void testGetAllStoragePoolIsoMapsForStoragePool ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage_pool_iso_map > result = dao.getAllForStoragePool ( existingPool.getId ( ) ) ; assertNotNull ( result ) ; assertFalse ( result.isEmpty ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.storage_pool_iso_map mapping : result ) { assertEquals ( existingPool.getId ( ) , mapping.getstorage_pool_id ( ) ) ; } }

Target:
public void testGetAllStoragePoolIsoMapsForStoragePool ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.StoragePoolIsoMap > result = dao.getAllForStoragePool ( existingPool.getId ( ) ) ; assertNotNull ( result ) ; assertFalse ( result.isEmpty ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.StoragePoolIsoMap mapping : result ) { assertEquals ( existingPool.getId ( ) , mapping.getstorage_pool_id ( ) ) ; } }
Source:
private void doInit ( org.ovirt.engine.api.extensions.ExtMap inputMap , org.ovirt.engine.api.extensions.ExtMap outputMap ) { context = inputMap.< org.ovirt.engine.api.extensions.ExtMap > get ( Base.InvokeKeys.CONTEXT ) ; configuration = context.< java.util.Properties > get ( Base.ContextKeys.CONFIGURATION ) ; broker = org.ovirt.engine.extensions.aaa.builtin.kerberosldap.LdapFactory.getInstance ( getAuthzName ( ) ) ; context.< java.util.List < java.lang.String > > get ( Base.ContextKeys.CONFIGURATION_SENSITIVE_KEYS ) . add ( "config.authn.user.password" ) ; context.mput ( Base.ContextKeys.AUTHOR , "The oVirt Project" ) . mput ( Base.ContextKeys.EXTENSION_NAME , "Kerberos/Ldap Authn (Built-in)" ) . mput ( Base.ContextKeys.LICENSE , "ASL 2.0" ) . mput ( Base.ContextKeys.HOME_URL , "http://www.ovirt.org" ) . mput ( Base.ContextKeys.VERSION , "N/A" ) . mput ( Authn.ContextKeys.CAPABILITIES , Authn.Capabilities.AUTHENTICATE_PASSWORD ) . mput ( Base.ContextKeys.BUILD_INTERFACE_VERSION , Base.INTERFACE_VERSION_CURRENT ) ; org.ovirt.engine.extensions.aaa.builtin.kerberosldap.KerberosManager.getInstance ( ) ; org.ovirt.engine.extensions.aaa.builtin.kerberosldap.UsersDomainsCacheManagerService.getInstance ( ) . init ( ) ; }

Target:
private void doLoad ( org.ovirt.engine.api.extensions.ExtMap inputMap , org.ovirt.engine.api.extensions.ExtMap outputMap ) { context = inputMap.< org.ovirt.engine.api.extensions.ExtMap > get ( Base.InvokeKeys.CONTEXT ) ; configuration = context.< java.util.Properties > get ( Base.ContextKeys.CONFIGURATION ) ; org.ovirt.engine.extensions.aaa.builtin.kerberosldap.Utils.setDefaults ( configuration , getAuthzName ( ) ) ; broker = org.ovirt.engine.extensions.aaa.builtin.kerberosldap.LdapFactory.getInstance ( getAuthzName ( ) ) ; context.< java.util.List < java.lang.String > > get ( Base.ContextKeys.CONFIGURATION_SENSITIVE_KEYS ) . add ( "config.authn.user.password" ) ; context.mput ( Base.ContextKeys.AUTHOR , "The oVirt Project" ) . mput ( Base.ContextKeys.EXTENSION_NAME , "Kerberos/Ldap Authn (Built-in)" ) . mput ( Base.ContextKeys.LICENSE , "ASL 2.0" ) . mput ( Base.ContextKeys.HOME_URL , "http://www.ovirt.org" ) . mput ( Base.ContextKeys.VERSION , "N/A" ) . mput ( Authn.ContextKeys.CAPABILITIES , Authn.Capabilities.AUTHENTICATE_PASSWORD ) . mput ( Base.ContextKeys.BUILD_INTERFACE_VERSION , Base.INTERFACE_VERSION_CURRENT ) ; }
Source:
private java.util.Map < java.lang.String , java.lang.Object > buildResponse ( javax.servlet.http.HttpServletRequest request , java.lang.String clientId , java.lang.String scope ) throws java.lang.Exception { java.lang.String token = org.ovirt.engine.core.sso.utils.SSOUtils.getRequestParameter ( request , SSOConstants.HTTP_PARAM_TOKEN ) ; org.ovirt.engine.core.sso.utils.SSOSession ssoSession = org.ovirt.engine.core.sso.utils.SSOUtils.getSsoSession ( request , clientId , token , true ) ; java.lang.String password = null ; if ( org.ovirt.engine.core.sso.utils.SSOUtils.scopeAsList ( scope ) . contains ( SSOConstants.PASSWORD_ACCESS_SCOPE ) ) { password = ssoSession.getPassword ( ) ; } return buildResponse ( ssoSession , password ) ; }

Target:
private java.util.Map < java.lang.String , java.lang.Object > buildResponse ( javax.servlet.http.HttpServletRequest request , java.lang.String clientId , java.lang.String scope ) throws java.lang.Exception { java.lang.String token = org.ovirt.engine.core.sso.utils.SsoUtils.getRequestParameter ( request , SsoConstants.HTTP_PARAM_TOKEN ) ; org.ovirt.engine.core.sso.utils.SsoSession ssoSession = org.ovirt.engine.core.sso.utils.SsoUtils.getSsoSession ( request , clientId , token , true ) ; java.lang.String password = null ; if ( org.ovirt.engine.core.sso.utils.SsoUtils.scopeAsList ( scope ) . contains ( SsoConstants.PASSWORD_ACCESS_SCOPE ) ) { password = ssoSession.getPassword ( ) ; } return buildResponse ( ssoSession , password ) ; }
Source:
public static void getVnicProfilesByDcId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dcId ) { 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.VnicProfileView > ( ) ; } return source ; } } ; } org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVnicProfilesByDataCenterId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dcId ) , aQuery ) ; }

Target:
public static void getNumberOfActiveVmsInCluster ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { if ( ( aQuery.converterCallback ) == null ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return java.lang.Integer.valueOf ( 0 ) ; } return source ; } } ; } org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetNumberOfActiveVmsInVdsGroupByVdsGroupId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( clusterId ) , aQuery ) ; }
Source:
protected void setQcowCompat ( org.ovirt.engine.core.common.businessentities.storage.Image diskImage , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.compat.Guid newImageGroupId , org.ovirt.engine.core.compat.Guid newImageId , org.ovirt.engine.core.compat.Guid newStorageDomainID , org.ovirt.engine.core.compat.Guid hostIdForExecution ) { diskImage.setQcowCompat ( QcowCompat.QCOW2_V2 ) ; if ( org.ovirt.engine.core.common.FeatureSupported.qcowCompatSupported ( org.ovirt.engine.core.bll.storage.disk.image.BaseImagesCommand.getStoragePool ( ) . getCompatibilityVersion ( ) ) ) { org.ovirt.engine.core.common.businessentities.storage.QemuImageInfo qemuImageInfo = imagesHandler.getQemuImageInfoFromVdsm ( storagePoolId , newStorageDomainID , newImageGroupId , newImageId , hostIdForExecution , ( hostIdForExecution == null ) ) ; if ( qemuImageInfo != null ) { diskImage.setQcowCompat ( qemuImageInfo.getQcowCompat ( ) ) ; } } }

Target:
protected void setQcowCompat ( org.ovirt.engine.core.common.businessentities.storage.Image diskImage , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.compat.Guid newImageGroupId , org.ovirt.engine.core.compat.Guid newImageId , org.ovirt.engine.core.compat.Guid newStorageDomainID , org.ovirt.engine.core.compat.Guid hostIdForExecution ) { diskImage.setQcowCompat ( QcowCompat.QCOW2_V2 ) ; if ( org.ovirt.engine.core.common.FeatureSupported.qcowCompatSupported ( org.ovirt.engine.core.bll.storage.disk.image.BaseImagesCommand.getStoragePool ( ) . getCompatibilityVersion ( ) ) ) { org.ovirt.engine.core.common.businessentities.storage.QemuImageInfo qemuImageInfo = org.ovirt.engine.core.bll.storage.disk.image.ImagesHandler.getQemuImageInfoFromVdsm ( storagePoolId , newStorageDomainID , newImageGroupId , newImageId , hostIdForExecution , ( hostIdForExecution == null ) ) ; if ( qemuImageInfo != null ) { diskImage.setQcowCompat ( qemuImageInfo.getQcowCompat ( ) ) ; } } }
Source:
private org.ovirt.engine.core.bll.network.host.SetupNetworksHelper qosCommitmendMissingBondSpeed ( java.lang.String bondOptions ) { return qosCommitmentBondSetup ( org.ovirt.engine.core.bll.network.host.SetupNetworksHelperTest.DEFAULT_SPEED , org.ovirt.engine.core.bll.network.host.SetupNetworksHelperTest.DEFAULT_SPEED , null , bondOptions ) ; }

Target:
private void mockCalculateBaseNicWhenVlanNicIsPassed ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface baseNic , org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface vlanNic ) { org.mockito.Mockito.when ( calculateBaseNic.getBaseNic ( org.mockito.Matchers.eq ( vlanNic ) ) ) . thenReturn ( baseNic ) ; org.mockito.Mockito.when ( calculateBaseNic.getBaseNic ( org.mockito.Matchers.eq ( vlanNic ) , org.mockito.Matchers.any ( java.util.Map.class ) ) ) . thenReturn ( baseNic ) ; }
Source:
protected void startSubStep ( ) { asyncTaskStep = org.ovirt.engine.core.bll.job.ExecutionHandler.addSubStep ( this . getExecutionContext ( ) , org.ovirt.engine.core.bll.gluster.GlusterAsyncCommandBase.getExecutionContext ( ) . getJob ( ) . getStep ( StepEnum.EXECUTING ) , getStepType ( ) , org.ovirt.engine.core.dal.job.ExecutionMessageDirector.resolveStepMessage ( getStepType ( ) , getStepMessageMap ( JobExecutionStatus.STARTED , null ) ) ) ; }

Target:
protected void startSubStep ( ) { asyncTaskStep = executionHandler.addSubStep ( this . getExecutionContext ( ) , org.ovirt.engine.core.bll.gluster.GlusterAsyncCommandBase.getExecutionContext ( ) . getJob ( ) . getStep ( StepEnum.EXECUTING ) , getStepType ( ) , org.ovirt.engine.core.dal.job.ExecutionMessageDirector.resolveStepMessage ( getStepType ( ) , getStepMessageMap ( JobExecutionStatus.STARTED , null ) ) ) ; }
Source:
protected boolean canDoAction ( ) { if ( ( getExistingIscsiBond ( ) ) == null ) { return failCanDoAction ( VdcBllMessages.ISCSI_BOND_NOT_EXIST ) ; } if ( isNameChanged ( ) ) { org.ovirt.engine.core.bll.validator.IscsiBondValidator validator = new org.ovirt.engine.core.bll.validator.IscsiBondValidator ( ) ; return validate ( validator.iscsiBondWithTheSameNameExistInDataCenter ( getIscsiBond ( ) ) ) ; } return true ; }

Target:
protected boolean canDoAction ( ) { org.ovirt.engine.core.bll.validator.IscsiBondValidator validator = new org.ovirt.engine.core.bll.validator.IscsiBondValidator ( ) ; if ( ! ( validate ( validator.isIscsiBondExist ( getExistingIscsiBond ( ) ) ) ) ) { return false ; } if ( ( isNameChanged ( ) ) && ( ! ( validate ( validator.iscsiBondWithTheSameNameExistInDataCenter ( getIscsiBond ( ) ) ) ) ) ) { return false ; } return true ; }
Source:
private void optimizationCustomFormatter ( org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterModel object ) { if ( ( ( object.getOptimizationCustom ( ) ) != null ) && ( ( object.getOptimizationCustom ( ) . getEntity ( ) ) != null ) ) { optimizationCustomEditor.asRadioButton ( ) . setHTML ( templates.radioButtonLabel ( messages.clusterPopupMemoryOptimizationCustomLabel ( java.lang.String.valueOf ( object.getMemoryOverCommit ( ) ) ) ) ) ; } }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { if ( object.getOptimizationCustom_IsSelected ( ) . getEntity ( ) ) { optimizationCustomFormatter ( object ) ; optimizationCustomEditor.setVisible ( true ) ; } }
Source:
public void testGetEntityPermissionsByUserAndGroups ( ) { org.junit.Assert.assertNotNull ( dao.getEntityPermissionsForUserAndGroups ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , org.ovirt.engine.core.dao.PermissionDAOTest.DIRECTORY_ELEMENT_ID_WITH_BASIC_PERMISSIONS.toString ( ) , ActionGroup.VM_BASIC_OPERATIONS , org.ovirt.engine.core.dao.PermissionDAOTest.VM_TEMPLATE_ENTITY_ID , VdcObjectType.VM , false ) ) ; org.junit.Assert.assertNull ( dao.getEntityPermissionsForUserAndGroups ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , org.ovirt.engine.core.dao.PermissionDAOTest.DIRECTORY_ELEMENT_ID_WITH_BASIC_PERMISSIONS.toString ( ) , ActionGroup.CREATE_TEMPLATE , org.ovirt.engine.core.dao.PermissionDAOTest.VM_TEMPLATE_ENTITY_ID , VdcObjectType.VM , false ) ) ; }

Target:
public void testGetEntityPermissionsByUserAndGroups ( ) { org.junit.Assert.assertNotNull ( dao.getEntityPermissionsForUserAndGroups ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , org.ovirt.engine.core.dao.PermissionDAOTest.DIRECTORY_ELEMENT_ID_WITH_BASIC_PERMISSIONS.toString ( ) , ActionGroup.RUN_VM , org.ovirt.engine.core.dao.PermissionDAOTest.VM_TEMPLATE_ENTITY_ID , VdcObjectType.VM , false ) ) ; org.junit.Assert.assertNull ( dao.getEntityPermissionsForUserAndGroups ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , org.ovirt.engine.core.dao.PermissionDAOTest.DIRECTORY_ELEMENT_ID_WITH_BASIC_PERMISSIONS.toString ( ) , ActionGroup.CREATE_TEMPLATE , org.ovirt.engine.core.dao.PermissionDAOTest.VM_TEMPLATE_ENTITY_ID , VdcObjectType.VM , false ) ) ; }
Source:
public void validateVmHavingDeviceSnapshotsPluggedToOtherVmsThatAreNotDown ( ) { createParameters ( ) ; initDiskImage ( diskImageGroupId , diskImageId ) ; initVm ( VMStatus.Up , org.ovirt.engine.core.compat.Guid.newGuid ( ) , diskImageGroupId ) ; org.mockito.Mockito.doReturn ( new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_VM_IS_NOT_DOWN ) ) . when ( diskValidator ) . isDiskPluggedToVmsThatAreNotDown ( org.mockito.Matchers.anyBoolean ( ) , org.mockito.Matchers.any ( ) ) ; org.junit.Assert.assertFalse ( command.validate ( ) ) ; org.junit.Assert.assertTrue ( command.getReturnValue ( ) . getValidationMessages ( ) . contains ( EngineMessage.ACTION_TYPE_FAILED_VM_IS_NOT_DOWN.name ( ) ) ) ; }

Target:
public void validateVmHavingDeviceSnapshotsPluggedToOtherVmsThatAreNotDown ( ) { createParameters ( ) ; initDiskImage ( diskImageGroupId , diskImageId ) ; initVm ( VMStatus.Up , org.ovirt.engine.core.compat.Guid.newGuid ( ) , diskImageGroupId ) ; org.mockito.Mockito.doReturn ( new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_VM_IS_NOT_DOWN ) ) . when ( diskValidator ) . isDiskPluggedToVmsThatAreNotDown ( org.mockito.ArgumentMatchers.anyBoolean ( ) , org.mockito.ArgumentMatchers.any ( ) ) ; org.junit.Assert.assertFalse ( command.validate ( ) ) ; org.junit.Assert.assertTrue ( command.getReturnValue ( ) . getValidationMessages ( ) . contains ( EngineMessage.ACTION_TYPE_FAILED_VM_IS_NOT_DOWN.name ( ) ) ) ; }
Source:
public void thpDefaultTrueTest ( ) { org.ovirt.engine.core.common.businessentities.Cluster cluster = new org.ovirt.engine.core.common.businessentities.Cluster ( ) ; cluster.setVersion ( new org.ovirt.engine.api.restapi.types.Version ( ) { { setMajor ( 3 ) ; setMinor ( 0 ) ; } } ) ; org.ovirt.engine.core.common.businessentities.Cluster transform = getMapper ( ) . map ( cluster , null ) ; assertTrue ( transform.getTransparentHugepages ( ) ) ; }

Target:
public void thpDefaultFalseTest ( ) { org.ovirt.engine.core.common.businessentities.Cluster cluster = new org.ovirt.engine.core.common.businessentities.Cluster ( ) ; cluster.setVersion ( new org.ovirt.engine.api.restapi.types.Version ( ) { { setMajor ( 2 ) ; setMinor ( 0 ) ; } } ) ; org.ovirt.engine.core.common.businessentities.Cluster transform = getMapper ( ) . map ( cluster , null ) ; org.junit.Assert.assertFalse ( transform.getTransparentHugepages ( ) ) ; }
Source:
private static void ToStringBuilder ( java.lang.Iterable xmlRpc , java.lang.StringBuilder builder ) { if ( xmlRpc == null ) return ; for ( java.lang.Object value : xmlRpc ) { if ( value instanceof java.lang.Iterable ) { org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcObjectDescriptor.ToStringBuilder ( ( ( java.lang.Iterable ) ( value ) ) , builder ) ; } else { builder.append ( value.toString ( ) ) ; builder.append ( "\n" ) ; } } }

Target:
private static void toStringBuilder ( java.lang.Iterable xmlRpc , java.lang.StringBuilder builder ) { if ( xmlRpc == null ) return ; for ( java.lang.Object value : xmlRpc ) { if ( value instanceof java.lang.Iterable ) { org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcObjectDescriptor.toStringBuilder ( ( ( java.lang.Iterable ) ( value ) ) , builder ) ; } else { builder.append ( value.toString ( ) ) ; builder.append ( "\n" ) ; } } }
Source:
public static void getMaxNumOfVmSockets ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String version ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Integer ) ( source ) ) . intValue ( ) : 1 ; } } ; org.ovirt.engine.core.common.queries.GetConfigurationValueParameters tempVar = new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.MaxNumOfVmSockets ) ; tempVar.setVersion ( version ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigFromCache ( tempVar , aQuery ) ; }

Target:
public static void getDataCenterListByName ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String name ) { 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.StoragePool > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( ( ( "DataCenter: name=" + name ) + " sortby name" ) , org.ovirt.engine.core.common.interfaces.SearchType.StoragePool ) , aQuery ) ; }
Source:
public void testRemoveWithNetworkAndLabels ( ) { commonRemove ( FixturesTool.HOST_NIC_VFS_CONFIG_NOT_ALL_NETWORKS_ALLOWED_1 ) ; java.util.Set < org.ovirt.engine.core.compat.Guid > networks = ( ( org.ovirt.engine.core.dao.network.HostNicVfsConfigDaoDbFacadeImpl ) ( dao ) ) . getNetworksByVfsConfigId ( FixturesTool.HOST_NIC_VFS_CONFIG_NOT_ALL_NETWORKS_ALLOWED_1 ) ; java.util.Set < java.lang.String > labels = ( ( org.ovirt.engine.core.dao.network.HostNicVfsConfigDaoDbFacadeImpl ) ( dao ) ) . getLabelsByVfsConfigId ( FixturesTool.HOST_NIC_VFS_CONFIG_NOT_ALL_NETWORKS_ALLOWED_1 ) ; checkNetworks ( networks , 0 ) ; checkLabels ( labels , 0 ) ; }

Target:
public void testRemoveWithNetworkAndLabels ( ) { commonRemove ( FixturesTool.HOST_NIC_VFS_CONFIG_NOT_ALL_NETWORKS_ALLOWED_1 ) ; java.util.Set < org.ovirt.engine.core.compat.Guid > networks = ( ( org.ovirt.engine.core.dao.network.HostNicVfsConfigDaoImpl ) ( dao ) ) . getNetworksByVfsConfigId ( FixturesTool.HOST_NIC_VFS_CONFIG_NOT_ALL_NETWORKS_ALLOWED_1 ) ; java.util.Set < java.lang.String > labels = ( ( org.ovirt.engine.core.dao.network.HostNicVfsConfigDaoImpl ) ( dao ) ) . getLabelsByVfsConfigId ( FixturesTool.HOST_NIC_VFS_CONFIG_NOT_ALL_NETWORKS_ALLOWED_1 ) ; checkNetworks ( networks , 0 ) ; checkLabels ( labels , 0 ) ; }
Source:
protected void doEdit ( org.ovirt.engine.ui.uicommonweb.models.pools.PoolGeneralModel model ) { driver.edit ( model ) ; monitorCount.setText ( java.lang.Integer.toString ( getModel ( ) . getMonitorCount ( ) ) ) ; }

Target:
protected void doEdit ( org.ovirt.engine.ui.uicommonweb.models.pools.PoolGeneralModel model ) { driver.edit ( model ) ; monitorCount.setText ( java.lang.Integer.toString ( getModel ( ) . getMonitorCount ( ) ) ) ; oS.setText ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getOsName ( getModel ( ) . getOS ( ) ) ) ; }
Source:
public java.lang.Void runInTransaction ( ) { addVmImagesAndSnapshots ( ) ; updateSnapshotsFromExport ( ) ; if ( useCopyImages ) { moveOrCopyAllImageGroups ( ) ; } org.ovirt.engine.core.bll.utils.VmDeviceUtils.addImportedDevices ( getVm ( ) . getStaticData ( ) , getParameters ( ) . isImportAsNewEntity ( ) ) ; org.ovirt.engine.core.bll.VmHandler.lockVm ( getVm ( ) . getId ( ) ) ; if ( getParameters ( ) . isImportAsNewEntity ( ) ) { getParameters ( ) . setVm ( getVm ( ) ) ; setVmId ( getVm ( ) . getId ( ) ) ; } return null ; }

Target:
private org.ovirt.engine.core.common.businessentities.Snapshot getActiveSnapshot ( ) { for ( org.ovirt.engine.core.common.businessentities.Snapshot snapshot : getVm ( ) . getSnapshots ( ) ) { if ( ( snapshot.getType ( ) ) == ( org.ovirt.engine.core.common.businessentities.Snapshot.SnapshotType.ACTIVE ) ) return snapshot ; } org.ovirt.engine.core.bll.ImportVmCommand.log.warn ( "VM '{}' doesn't have active snapshot in export domain" , getVmId ( ) ) ; return null ; }
Source:
private void ApplySearchPageSize ( int value ) { model.setSearchPageSize ( value ) ; if ( ( searchRequested ) && ( model.getIsTimerDisabled ( ) ) ) { model.getSearchCommand ( ) . Execute ( ) ; } model.UpdatePagingAvailability ( ) ; }

Target:
public void RequestSearch ( ) { searchRequested = true ; model.setItems ( new java.util.ArrayList ( ) ) ; model.getSelectedItemChangedEvent ( ) . raise ( this , new org.ovirt.engine.core.compat.EventArgs ( ) ) ; model.getSelectedItemsChangedEvent ( ) . raise ( this , new org.ovirt.engine.core.compat.EventArgs ( ) ) ; }
Source:
public void getClusterFeaturesByVersionAndCategory ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Version version , org.ovirt.engine.core.common.mode.ApplicationMode category ) { 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.Set < org.ovirt.engine.core.common.businessentities.AdditionalFeature > ) ( source ) ) : new java.util.HashSet < org.ovirt.engine.core.common.businessentities.AdditionalFeature > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetClusterFeaturesByVersionAndCategory , new org.ovirt.engine.core.common.queries.GetClusterFeaturesByVersionAndCategoryParameters ( version , category ) , aQuery ) ; }

Target:
public void getPoolById ( org.ovirt.engine.ui.frontend.AsyncQuery < org.ovirt.engine.core.common.businessentities.VmPool > aQuery , org.ovirt.engine.core.compat.Guid poolId ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.CastingConverter < > ( ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmPoolById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( poolId ) , aQuery ) ; }
Source:
private void displayPassPkWindow ( boolean isPasswordVisible ) { if ( isPasswordVisible ) { passwordEditor.getElement ( ) . getStyle ( ) . setVisibility ( Visibility.VISIBLE ) ; publicKeyEditor.getElement ( ) . getStyle ( ) . setVisibility ( Visibility.HIDDEN ) ; } else { passwordEditor.getElement ( ) . getStyle ( ) . setVisibility ( Visibility.HIDDEN ) ; publicKeyEditor.getElement ( ) . getStyle ( ) . setVisibility ( Visibility.VISIBLE ) ; } }

Target:
private void displayPasswordField ( boolean isPasswordVisible ) { if ( isPasswordVisible ) { passwordEditor.getElement ( ) . getStyle ( ) . setVisibility ( Visibility.VISIBLE ) ; publicKeyEditor.getElement ( ) . getStyle ( ) . setVisibility ( Visibility.HIDDEN ) ; } else { passwordEditor.getElement ( ) . getStyle ( ) . setVisibility ( Visibility.HIDDEN ) ; publicKeyEditor.getElement ( ) . getStyle ( ) . setVisibility ( Visibility.VISIBLE ) ; } }
Source:
public static void getDataCenterListByName ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String name ) { 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.StoragePool > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( ( ( "DataCenter: name=" + name ) + " sortby name" ) , org.ovirt.engine.core.common.interfaces.SearchType.StoragePool ) , aQuery ) ; }

Target:
public void getClusterListByName ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String name ) { 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.VDSGroup > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( ( ( "Cluster: name=" + name ) + " sortby name" ) , org.ovirt.engine.core.common.interfaces.SearchType.Cluster ) , aQuery ) ; }
Source:
public void loadVmsFromKvm ( ) { clearForLoad ( ) ; if ( ! ( validateKvmConfiguration ( ) ) ) { return ; } org.ovirt.engine.core.compat.Guid proxyId = ( ( getXenProxyHosts ( ) . getSelectedItem ( ) ) != null ) ? getXenProxyHosts ( ) . getSelectedItem ( ) . getId ( ) : null ; loadVMsFromExternalProvider ( OriginType.KVM , getKvmUri ( ) . getEntity ( ) , getKvmUsername ( ) . getEntity ( ) , getKvmPassword ( ) . getEntity ( ) , proxyId ) ; }

Target:
private void xenProviderChanged ( ) { org.ovirt.engine.core.common.businessentities.Provider < org.ovirt.engine.core.common.businessentities.XENVmProviderProperties > provider = getXenProviders ( ) . getSelectedItem ( ) ; if ( provider == null ) { provider = new org.ovirt.engine.core.common.businessentities.Provider ( ) ; provider.setAdditionalProperties ( new org.ovirt.engine.core.common.businessentities.XENVmProviderProperties ( ) ) ; } org.ovirt.engine.core.common.businessentities.XENVmProviderProperties properties = provider.getAdditionalProperties ( ) ; getXenUri ( ) . setEntity ( properties.getUrl ( ) ) ; setupProxyHost ( getXenProxyHosts ( ) , properties.getProxyHostId ( ) ) ; }
Source:
protected void endVmCommand ( ) { org.ovirt.engine.core.bll.StopVmCommandBase.setCommandShouldBeLogged ( false ) ; if ( ( org.ovirt.engine.core.bll.StopVmCommandBase.getVm ( ) ) != null ) { org.ovirt.engine.core.bll.StopVmCommandBase.getVm ( ) . setStatus ( VMStatus.Down ) ; org.ovirt.engine.core.bll.StopVmCommandBase.getVm ( ) . setHibernationVolHandle ( null ) ; org.ovirt.engine.core.bll.StopVmCommandBase.getVmDynamicDao ( ) . update ( org.ovirt.engine.core.bll.StopVmCommandBase.getVm ( ) . getDynamicData ( ) ) ; } else { org.ovirt.engine.core.bll.StopVmCommandBase.log.warn ( "StopVmCommandBase::EndVmCommand: Vm is null - not performing full EndAction" ) ; } org.ovirt.engine.core.bll.StopVmCommandBase.setSucceeded ( true ) ; }

Target:
protected void endVmCommand ( ) { org.ovirt.engine.core.bll.StopVmCommandBase.setCommandShouldBeLogged ( false ) ; if ( ( org.ovirt.engine.core.bll.StopVmCommandBase.getVm ( ) ) != null ) { org.ovirt.engine.core.bll.StopVmCommandBase.getVm ( ) . setStatus ( VMStatus.Down ) ; org.ovirt.engine.core.bll.StopVmCommandBase.getVm ( ) . setHibernationVolHandle ( null ) ; org.ovirt.engine.core.bll.StopVmCommandBase.getVmDynamicDao ( ) . update ( org.ovirt.engine.core.bll.StopVmCommandBase.getVm ( ) . getDynamicData ( ) ) ; } else { org.ovirt.engine.core.bll.StopVmCommandBase.log.warn ( "StopVmCommandBase::EndVmCommand: Vm is null - not performing full endAction" ) ; } org.ovirt.engine.core.bll.StopVmCommandBase.setSucceeded ( true ) ; }
Source:
public static void getHostArchitecture ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter < org.ovirt.engine.core.common.businessentities.ArchitectureType > ( ) { @ java.lang.Override public org.ovirt.engine.core.common.businessentities.ArchitectureType Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return ( ( org.ovirt.engine.core.common.businessentities.ArchitectureType ) ( source ) ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetHostArchitecture , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }

Target:
public static java.lang.Boolean isMemorySnapshotSupportedByArchitecture ( org.ovirt.engine.core.common.businessentities.ArchitectureType architecture , org.ovirt.engine.core.compat.Version version ) { return org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.memorySnapshotSupport.get ( architecture ) . get ( version ) ; }
Source:
protected void removeNetwork ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.VmNic > list = org.ovirt.engine.core.bll.VmTemplateCommand.getVmNicDao ( ) . getAllForTemplate ( org.ovirt.engine.core.bll.VmTemplateCommand.getVmTemplateId ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.network.VmNic iface : list ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmDeviceDao ( ) . remove ( new org.ovirt.engine.core.common.businessentities.VmDeviceId ( iface.getId ( ) , org.ovirt.engine.core.bll.VmTemplateCommand.getVmTemplateId ( ) ) ) ; org.ovirt.engine.core.bll.VmTemplateCommand.getVmNicDao ( ) . remove ( iface.getId ( ) ) ; } }

Target:
protected void removeNetwork ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.VmNic > list = org.ovirt.engine.core.bll.VmTemplateCommand.getVmNicDao ( ) . getAllForTemplate ( org.ovirt.engine.core.bll.VmTemplateCommand.getVmTemplateId ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.network.VmNic iface : list ) { vmDeviceDao.remove ( new org.ovirt.engine.core.common.businessentities.VmDeviceId ( iface.getId ( ) , org.ovirt.engine.core.bll.VmTemplateCommand.getVmTemplateId ( ) ) ) ; org.ovirt.engine.core.bll.VmTemplateCommand.getVmNicDao ( ) . remove ( iface.getId ( ) ) ; } }
Source:
private java.lang.String supportedVersionsToString ( java.util.Set < org.ovirt.engine.core.compat.Version > versionSet ) { if ( versionSet == null ) { return null ; } java.lang.StringBuilder sb = new java.lang.StringBuilder ( ) ; boolean first = true ; for ( org.ovirt.engine.core.compat.Version version : versionSet ) { if ( first ) { first = false ; } else { sb.append ( "," ) ; } sb.append ( version.toString ( ) ) ; } return sb.toString ( ) ; }

Target:
public org.ovirt.engine.core.common.businessentities.SELinuxMode getSELinuxEnforceMode ( ) { return selinuxEnforceMode ; }
Source:
protected void postGetHost ( java.lang.String hostName ) { java.lang.StringBuilder configBuilder = new java.lang.StringBuilder ( "[virt-viewer]" ) ; configBuilder.append ( "\ntype=vnc" ) . append ( "\nhost=" ) . append ( hostName ) . append ( "\nport=" ) . append ( getEntity ( ) . getDisplay ( ) . toString ( ) ) . append ( "\npassword=" ) . append ( otp64 ) . append ( "\ntitle=" ) . append ( getTitle ( ) ) ; org.ovirt.engine.ui.uicommonweb.models.vms.ConsoleModel.makeConsoleConfigRequest ( "console.vv" , "application/x-virt-viewer; charset=UTF-8" , configBuilder.toString ( ) ) ; }

Target:
private java.lang.String getHost ( ) { return host ; }
Source:
private org.ovirt.engine.core.vdsbroker.vdsbroker.SetupNetworksVDSCommand < org.ovirt.engine.core.common.vdscommands.SetupNetworksVdsCommandParameters > createCommand ( org.ovirt.engine.core.common.vdscommands.SetupNetworksVdsCommandParameters parameters ) { final org.ovirt.engine.core.dal.dbbroker.DbFacade dbFacade = org.mockito.Mockito.mock ( org.ovirt.engine.core.dal.dbbroker.DbFacade.class ) ; final org.ovirt.engine.core.dao.VdsDAO vdsDao = org.mockito.Mockito.mock ( org.ovirt.engine.core.dao.VdsDAO.class ) ; org.mockito.Mockito.when ( dbFacade.getVdsDao ( ) ) . thenReturn ( vdsDao ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.SetupNetworksVDSCommand < org.ovirt.engine.core.common.vdscommands.SetupNetworksVdsCommandParameters > ( parameters ) { @ java.lang.Override protected org.ovirt.engine.core.vdsbroker.vdsbroker.IVdsServer initializeVdsBroker ( org.ovirt.engine.core.compat.Guid vdsId ) { return server ; } @ java.lang.Override protected org.ovirt.engine.core.dal.dbbroker.DbFacade getDbFacade ( ) { return dbFacade ; } } ; }

Target:
private org.ovirt.engine.core.vdsbroker.vdsbroker.SetupNetworksVDSCommand < org.ovirt.engine.core.common.vdscommands.SetupNetworksVdsCommandParameters > createCommand ( org.ovirt.engine.core.common.vdscommands.SetupNetworksVdsCommandParameters parameters ) { final org.ovirt.engine.core.dal.dbbroker.DbFacade dbFacade = org.mockito.Mockito.mock ( org.ovirt.engine.core.dal.dbbroker.DbFacade.class ) ; final org.ovirt.engine.core.dao.VdsStaticDAO vdsStaticDao = org.mockito.Mockito.mock ( org.ovirt.engine.core.dao.VdsStaticDAO.class ) ; org.mockito.Mockito.when ( dbFacade.getVdsStaticDao ( ) ) . thenReturn ( vdsStaticDao ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.SetupNetworksVDSCommand < org.ovirt.engine.core.common.vdscommands.SetupNetworksVdsCommandParameters > ( parameters ) { @ java.lang.Override protected org.ovirt.engine.core.vdsbroker.vdsbroker.IVdsServer initializeVdsBroker ( org.ovirt.engine.core.compat.Guid vdsId ) { return server ; } @ java.lang.Override protected org.ovirt.engine.core.dal.dbbroker.DbFacade getDbFacade ( ) { return dbFacade ; } } ; }
Source:
private void initHostKdumpDetectionStatus ( ) { getDbFacade ( ) . getVdsKdumpStatusDao ( ) . remove ( getVdsId ( ) ) ; if ( ( getVds ( ) . isPmKdumpDetection ( ) ) && ( ( getVds ( ) . getKdumpStatus ( ) ) != ( org.ovirt.engine.core.common.businessentities.KdumpStatus.ENABLED ) ) ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase base = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; base.setVds ( getVds ( ) ) ; org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.log ( base , AuditLogType.KDUMP_DETECTION_NOT_CONFIGURED_ON_VDS ) ; } }

Target:
private void initHostKdumpDetectionStatus ( ) { getDbFacade ( ) . getVdsKdumpStatusDao ( ) . remove ( getVdsId ( ) ) ; if ( ( ( getVds ( ) . getpm_enabled ( ) ) && ( getVds ( ) . isPmKdumpDetection ( ) ) ) && ( ( getVds ( ) . getKdumpStatus ( ) ) != ( org.ovirt.engine.core.common.businessentities.KdumpStatus.ENABLED ) ) ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase base = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; base.setVds ( getVds ( ) ) ; org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.log ( base , AuditLogType.KDUMP_DETECTION_NOT_CONFIGURED_ON_VDS ) ; } }
Source:
protected java.lang.Object [ ] addSession ( java.lang.Object ... values ) { java.lang.Object [ ] ret = new java.lang.Object [ ( values.length ) + 1 ] ; for ( int i = 0 ; i < ( values.length ) ; i ++ ) { ret [ i ] = values [ i ] ; } ret [ values.length ] = org.ovirt.engine.api.restapi.resource.AbstractBackendBaseTest.SESSION_ID ; return ret ; }

Target:
protected java.lang.Object [ ] addSession ( java.lang.Object ... values ) { java.lang.Object [ ] ret = new java.lang.Object [ ( values.length ) + 1 ] ; java.lang.System.arraycopy ( values , 0 , ret , 0 , values.length ) ; ret [ values.length ] = org.ovirt.engine.api.restapi.resource.AbstractBackendBaseTest.SESSION_ID ; return ret ; }