auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public static void GetMaxVmMemSize ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , boolean is64 ) { 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 source ; } return 262144 ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( ( is64 ? org.ovirt.engine.core.common.queries.ConfigurationValues.VM64BitMaxMemorySizeInMB : org.ovirt.engine.core.common.queries.ConfigurationValues.VM32BitMaxMemorySizeInMB ) ) , aQuery ) ; }

Target:
public static void GetMaxVmMemSize ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , boolean is64 ) { 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 source ; } return 262144 ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( ( is64 ? org.ovirt.engine.core.common.queries.ConfigurationValues.VM64BitMaxMemorySizeInMB : org.ovirt.engine.core.common.queries.ConfigurationValues.VM32BitMaxMemorySizeInMB ) , org.ovirt.engine.core.common.config.Config.DefaultConfigurationVersion ) , aQuery ) ; }
Source:
public static void getAllVnicProfiles ( 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 ) { 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.GetAllVnicProfiles , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }

Target:
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 ) ; }
Source:
public java.lang.String getHelpNote ( ) { return java.lang.String.format ( ( "%n%n%n" + ( ( ( ( ( ( ( ( "### Notes:%n" + "### 1. Passwords: password can be set in interactive mode ie:%n" ) + "### engine-config -s PasswordEntry=interactive%n" ) + "### or via file with one of the following options:%n" ) + "### engine-config -s PasswordEntry --admin-pass-file=/tmp/mypass%n" ) + "### engine-config -s PasswordEntry=/tmp/mypass%n" ) + "### 2. In order for your change(s) to take effect,%n" ) + "### restart the oVirt engine service (using: 'service ovirt-engine restart').%n" ) + "################################################################################%n%n" ) ) ) ; }

Target:
public java.lang.String getHelpNote ( org.ovirt.engine.core.config.entity.ConfigKey key ) { return java.lang.String.format ( ( "%n%n%n" + ( ( ( ( ( ( ( ( "### Notes:%n" + "### 1. Passwords: password can be set in interactive mode ie:%n" ) + "### engine-config -s %1$s=interactive%n" ) + "### or via file with one of the following options:%n" ) + "### engine-config -s %1$s --admin-pass-file=/tmp/mypass%n" ) + "### engine-config -s %1$s=/tmp/mypass%n" ) + "### 2. In order for your change(s) to take effect,%n" ) + "### restart the oVirt engine service (using: 'service ovirt-engine restart').%n" ) + "################################################################################%n%n" ) ) , key.getKey ( ) ) ; }
Source:
private void localize ( org.ovirt.engine.ui.webadmin.ApplicationConstants constants ) { headerLabel.setText ( constants.loginHeaderLabel ( ) ) ; userNameEditor.setLabel ( constants.loginFormUserNameLabel ( ) ) ; passwordEditor.setLabel ( constants.loginFormPasswordLabel ( ) ) ; domainEditor.setLabel ( constants.loginFormDomainLabel ( ) ) ; loginButton.setText ( constants.loginButtonLabel ( ) ) ; }

Target:
private void localize ( org.ovirt.engine.ui.webadmin.ApplicationConstants constants ) { headerLabel.setText ( constants.loginHeaderLabel ( ) ) ; userNameLabel.setText ( constants.loginFormUserNameLabel ( ) ) ; passwordLabel.setText ( constants.loginFormPasswordLabel ( ) ) ; domainLabel.setText ( constants.loginFormDomainLabel ( ) ) ; loginButton.setLabel ( constants.loginButtonLabel ( ) ) ; }
Source:
protected org.codehaus.jackson.node.ObjectNode getUserInfoObject ( org.ovirt.engine.core.common.businessentities.aaa.DbUser loggedInUser ) { org.codehaus.jackson.node.ObjectNode obj = createObjectNode ( ) ; obj.put ( "id" , loggedInUser.getId ( ) . toString ( ) ) ; obj.put ( "userName" , loggedInUser.getLoginName ( ) ) ; obj.put ( "domain" , loggedInUser.getDomain ( ) ) ; return obj ; }

Target:
protected org.codehaus.jackson.node.ObjectNode getUserInfoObject ( org.ovirt.engine.core.common.businessentities.aaa.DbUser loggedInUser , java.lang.String engineSessionId , java.lang.String ssoToken ) { org.codehaus.jackson.node.ObjectNode obj = createObjectNode ( ) ; obj.put ( "id" , loggedInUser.getId ( ) . toString ( ) ) ; obj.put ( "userName" , loggedInUser.getLoginName ( ) ) ; obj.put ( "domain" , loggedInUser.getDomain ( ) ) ; obj.put ( "isAdmin" , loggedInUser.isAdmin ( ) ) ; obj.put ( "engineSessionId" , engineSessionId ) ; obj.put ( "ssoToken" , ssoToken ) ; return obj ; }
Source:
private void completeGenerationInfo ( ) { org.ovirt.engine.core.common.businessentities.VdsmImageLocationInfo info = org.ovirt.engine.core.bll.storage.disk.image.UpdateVolumeCommand.getParameters ( ) . getVolInfo ( ) ; org.ovirt.engine.core.common.businessentities.storage.DiskImage image = imagesHandler.getVolumeInfoFromVdsm ( org.ovirt.engine.core.bll.storage.disk.image.UpdateVolumeCommand.getParameters ( ) . getStoragePoolId ( ) , info.getStorageDomainId ( ) , info.getImageGroupId ( ) , info.getImageId ( ) ) ; info.setGeneration ( image.getImage ( ) . getGeneration ( ) ) ; org.ovirt.engine.core.bll.storage.disk.image.UpdateVolumeCommand.persistCommandIfNeeded ( ) ; }

Target:
private void completeGenerationInfo ( ) { org.ovirt.engine.core.common.businessentities.VdsmImageLocationInfo info = org.ovirt.engine.core.bll.storage.disk.image.UpdateVolumeCommand.getParameters ( ) . getVolInfo ( ) ; org.ovirt.engine.core.common.businessentities.storage.DiskImage image = org.ovirt.engine.core.bll.storage.disk.image.ImagesHandler.getVolumeInfoFromVdsm ( org.ovirt.engine.core.bll.storage.disk.image.UpdateVolumeCommand.getParameters ( ) . getStoragePoolId ( ) , info.getStorageDomainId ( ) , info.getImageGroupId ( ) , info.getImageId ( ) ) ; info.setGeneration ( image.getImage ( ) . getGeneration ( ) ) ; org.ovirt.engine.core.bll.storage.disk.image.UpdateVolumeCommand.persistCommandIfNeeded ( ) ; }
Source:
public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { org.ovirt.engine.core.common.action.VmManagementParametersBase param = new org.ovirt.engine.core.common.action.VmManagementParametersBase ( gettempVm ( ) ) ; param.setSoundDeviceEnabled ( ( ( java.lang.Boolean ) ( model.getIsSoundcardEnabled ( ) . getEntity ( ) ) ) ) ; param.setConsoleEnabled ( ( ( java.lang.Boolean ) ( model.getIsConsoleDeviceEnabled ( ) . getEntity ( ) ) ) ) ; org.ovirt.engine.ui.frontend.Frontend.RunAction ( VdcActionType.UpdateVm , param , new org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModelNetworkAsyncCallbacks.NetworkUpdateFrontendAsyncCallback ( model , defaultNetworkCreatingManager , gettempVm ( ) . getId ( ) ) , this ) ; }

Target:
public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { org.ovirt.engine.core.common.action.VmManagementParametersBase param = new org.ovirt.engine.core.common.action.VmManagementParametersBase ( gettempVm ( ) ) ; param.setSoundDeviceEnabled ( model.getIsSoundcardEnabled ( ) . getEntity ( ) ) ; param.setConsoleEnabled ( model.getIsConsoleDeviceEnabled ( ) . getEntity ( ) ) ; param.setApplyChangesLater ( applyCpuChangesLater ) ; setRngDeviceToParams ( model , param ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runAction ( VdcActionType.UpdateVm , param , new org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModelNetworkAsyncCallback ( model , defaultNetworkCreatingManager , gettempVm ( ) . getId ( ) ) , this ) ; }
Source:
public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { network.setId ( ( ( org.ovirt.engine.core.compat.Guid ) ( result.getReturnValue ( ) . getActionReturnValue ( ) ) ) ) ; fetchDcClusters ( dcId , network , externalNetwork.isPublicUse ( ) ) ; }

Target:
public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { org.ovirt.engine.core.common.action.VdcReturnValueBase returnValue = result.getReturnValue ( ) ; if ( ( returnValue != null ) && ( returnValue.getSucceeded ( ) ) ) { network.setId ( ( ( org.ovirt.engine.core.compat.Guid ) ( returnValue.getActionReturnValue ( ) ) ) ) ; fetchDcClusters ( dcId , network , externalNetwork.isPublicUse ( ) ) ; } }
Source:
private void initManualWidgets ( ) { usageTypeEditor = new org.ovirt.engine.ui.common.widget.editor.ListModelListBoxEditor ( new org.ovirt.engine.ui.common.widget.renderer.EnumRenderer ( ) ) ; }

Target:
private void initManualWidgets ( ) { usageTypeEditor = new org.ovirt.engine.ui.common.widget.editor.ListModelListBoxEditor ( new org.ovirt.engine.ui.common.widget.renderer.EnumRenderer ( ) ) ; uuidEditor = new org.ovirt.engine.ui.common.widget.editor.generic.StringEntityModelTextBoxOnlyEditor ( ) ; uuidEditorWithInfo = new org.ovirt.engine.ui.common.widget.EntityModelWidgetWithInfo ( new org.ovirt.engine.ui.common.widget.label.EnableableFormLabel ( org.ovirt.engine.ui.webadmin.section.main.view.popup.provider.ProviderSecretPopupView.constants.idLibvirtSecret ( ) ) , uuidEditor ) ; uuidEditorWithInfo.setExplanation ( com.google.gwt.safehtml.shared.SafeHtmlUtils.fromTrustedString ( org.ovirt.engine.ui.webadmin.section.main.view.popup.provider.ProviderSecretPopupView.constants.idLibvirtSecretHint ( ) ) ) ; }
Source:
protected java.util.List < org.ovirt.engine.core.common.businessentities.VM > getPrivilegedQueryReturnValue ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VM > vmList = org.ovirt.engine.core.bll.GetUserVmsByUserIdAndGroupsQuery.getDbFacade ( ) . getVmDao ( ) . getAllForUserWithGroupsAndUserRoles ( org.ovirt.engine.core.bll.GetUserVmsByUserIdAndGroupsQuery.getParameters ( ) . getUserId ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.VM vm : vmList ) { updateVmGuestAgentVersion ( vm ) ; if ( org.ovirt.engine.core.bll.GetUserVmsByUserIdAndGroupsQuery.getParameters ( ) . getIncludeDiskData ( ) ) { updateDisksFromDB ( vm ) ; java.util.Collections.sort ( vm.getDiskList ( ) , new org.ovirt.engine.core.common.businessentities.ImagesComparerByName ( ) ) ; fillImagesBySnapshots ( vm ) ; } } return vmList ; }

Target:
protected void executeQueryCommand ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VM > vmList = org.ovirt.engine.core.bll.GetUserVmsByUserIdAndGroupsQuery.getDbFacade ( ) . getVmDao ( ) . getAllForUserWithGroupsAndUserRoles ( org.ovirt.engine.core.bll.GetUserVmsByUserIdAndGroupsQuery.getUserID ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.VM vm : vmList ) { updateVmGuestAgentVersion ( vm ) ; if ( org.ovirt.engine.core.bll.GetUserVmsByUserIdAndGroupsQuery.getParameters ( ) . getIncludeDiskData ( ) ) { updateDisksFromDB ( vm ) ; java.util.Collections.sort ( vm.getDiskList ( ) , new org.ovirt.engine.core.common.businessentities.ImagesComparerByName ( ) ) ; fillImagesBySnapshots ( vm ) ; } } setReturnValue ( vmList ) ; }
Source:
private boolean evaluateHostUpgradeInternalCommandProgress ( java.util.List < org.ovirt.engine.core.compat.Guid > childCmdIds , org.ovirt.engine.core.bll.CommandBase < ? > rootCommand ) { org.ovirt.engine.core.common.businessentities.CommandEntity upgradeCommand = getHostUpgradeInternalCommand ( childCmdIds ) ; if ( upgradeCommand == null ) { return false ; } switch ( upgradeCommand.getCommandStatus ( ) ) { case ACTIVE : case NOT_STARTED : return false ; case FAILED : case FAILED_RESTARTED : case ENDED_WITH_FAILURE : case UNKNOWN : rootCommand.setCommandStatus ( CommandStatus.FAILED ) ; return true ; case SUCCEEDED : case ENDED_SUCCESSFULLY : rootCommand.setCommandStatus ( CommandStatus.SUCCEEDED ) ; return true ; } return true ; }

Target:
private boolean evaluateHostUpgradeInternalCommandProgress ( java.util.List < org.ovirt.engine.core.compat.Guid > childCmdIds , org.ovirt.engine.core.bll.CommandBase < ? > rootCommand ) { org.ovirt.engine.core.common.businessentities.CommandEntity upgradeCommand = getHostUpgradeInternalCommand ( childCmdIds ) ; if ( upgradeCommand == null ) { return false ; } switch ( upgradeCommand.getCommandStatus ( ) ) { case ACTIVE : case NOT_STARTED : return false ; case FAILED : case EXECUTION_FAILED : case ENDED_WITH_FAILURE : case UNKNOWN : rootCommand.setCommandStatus ( CommandStatus.FAILED ) ; return true ; case SUCCEEDED : case ENDED_SUCCESSFULLY : rootCommand.setCommandStatus ( CommandStatus.SUCCEEDED ) ; return true ; } return true ; }
Source:
public void OnSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.storage.SanStorageModel sanStorageModel = ( ( org.ovirt.engine.ui.uicommonweb.models.storage.SanStorageModel ) ( target ) ) ; java.util.ArrayList < org.ovirt.engine.core.common.businessentities.LUNs > lunList = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.LUNs > ) ( returnValue ) ) ; sanStorageModel.ApplyData ( lunList , true ) ; }

Target:
private void PrepareSanStorageForEdit ( org.ovirt.engine.ui.uicommonweb.models.storage.SanStorageModel model ) { org.ovirt.engine.core.common.businessentities.storage_domains storage = ( ( org.ovirt.engine.core.common.businessentities.storage_domains ) ( getSelectedItem ( ) ) ) ; model.setStorageDomain ( storage ) ; }
Source:
protected int calcEvenDistributionScore ( float maxMemoryOfVdsInCluster , org.ovirt.engine.core.common.businessentities.VDS vds , org.ovirt.engine.core.common.businessentities.VM vm , boolean countThreadsAsCores ) { int score = ( MaxSchedulerWeight ) - 1 ; java.lang.Integer effectiveCpuCores = org.ovirt.engine.core.bll.scheduling.SlaValidator.getEffectiveCpuCores ( vds , countThreadsAsCores ) ; if ( ( effectiveCpuCores != null ) && ( ( vds.getUsageCpuPercent ( ) ) != null ) ) { score = java.lang.Math.min ( ( ( ( int ) ( java.lang.Math.round ( calcDistributeMetric ( vds , vm , effectiveCpuCores ) ) ) ) + 1 ) , org.ovirt.engine.core.bll.scheduling.policyunits.MaxSchedulerWeight ) ; } return score ; }

Target:
protected int calcEvenDistributionScore ( float maxMemoryOfVdsInCluster , org.ovirt.engine.core.common.businessentities.VDS vds , org.ovirt.engine.core.common.businessentities.VM vm , boolean countThreadsAsCores ) { int score = ( MaxSchedulerWeight ) - 1 ; java.lang.Integer effectiveCpuCores = slaValidator.getEffectiveCpuCores ( vds , countThreadsAsCores ) ; if ( ( effectiveCpuCores != null ) && ( ( vds.getUsageCpuPercent ( ) ) != null ) ) { score = java.lang.Math.min ( ( ( ( int ) ( java.lang.Math.round ( calcDistributeMetric ( vds , vm , effectiveCpuCores ) ) ) ) + 1 ) , org.ovirt.engine.core.bll.scheduling.policyunits.MaxSchedulerWeight ) ; } return score ; }
Source:
private void createNetworkAttachmentForReportedNetworksNotHavingOne ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nic , java.lang.String networkName ) { org.ovirt.engine.core.common.businessentities.network.NetworkAttachment networkAttachment = new org.ovirt.engine.core.common.businessentities.network.NetworkAttachment ( getBaseInterfaceNicOrThis ( nic ) , clusterNetworks.get ( networkName ) , org.ovirt.engine.core.utils.NetworkUtils.createIpConfigurationFromVdsNetworkInterface ( nic ) ) ; networkAttachment.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; if ( ( customPropertiesForNics ) != null ) { networkAttachment.setProperties ( customPropertiesForNics.getCustomPropertiesFor ( nic ) ) ; } networkAttachmentDao.save ( networkAttachment ) ; }

Target:
private void createNetworkAttachmentForReportedNetworksNotHavingOne ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nic , java.lang.String networkName ) { org.ovirt.engine.core.common.businessentities.network.NetworkAttachment networkAttachment = new org.ovirt.engine.core.common.businessentities.network.NetworkAttachment ( getBaseInterfaceNicOrThis ( nic ) , clusterNetworks.get ( networkName ) , org.ovirt.engine.core.utils.NetworkUtils.createIpConfigurationFromVdsNetworkInterface ( nic ) ) ; networkAttachment.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; if ( ( legacyMode ) && ( ( customPropertiesForNics ) != null ) ) { networkAttachment.setProperties ( customPropertiesForNics.getCustomPropertiesFor ( nic ) ) ; } networkAttachmentDao.save ( networkAttachment ) ; }
Source:
public void getVmsRunningOnOrMigratingToVds ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VM > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmsRunningOnOrMigratingToVds , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }

Target:
public void getVmsFromExternalServer ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId , org.ovirt.engine.core.compat.Guid vdsId , java.lang.String url , java.lang.String username , java.lang.String password ) { 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.VM > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmsFromExternalProvider , new org.ovirt.engine.core.common.queries.GetVmsFromExternalProviderQueryParameters ( url , username , password , vdsId , dataCenterId ) , aQuery ) ; }
Source:
public void getAllErrata ( 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 ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Erratum > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetErrataForSystem , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }

Target:
public void getAllErrata ( 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 ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Erratum > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetErrataForSystem , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }
Source:
public org.ovirt.engine.ui.common.widget.form.FormItem addFormItem ( org.ovirt.engine.ui.common.widget.form.FormItem item ) { formPanel.addFormItem ( item ) ; items.add ( item ) ; java.lang.String isAvailablePropertyName = item.getIsAvailablePropertyName ( ) ; if ( isAvailablePropertyName != null ) { getItemsForPropertyName ( isAvailablePropertyName ) . add ( item ) ; } return item ; }

Target:
public void addFormItem ( org.ovirt.engine.ui.common.widget.form.FormItem item ) { item.setFormPanel ( formPanel ) ; if ( item.isValid ( ) ) { formPanel.addFormItem ( item ) ; items.add ( item ) ; java.lang.String isAvailablePropertyName = item.getIsAvailablePropertyName ( ) ; if ( isAvailablePropertyName != null ) { getItemsForPropertyName ( isAvailablePropertyName ) . add ( item ) ; } } }
Source:
protected void attemptToActivateCinderDomain ( ) { try { org.ovirt.engine.core.bll.storage.CINDERStorageHelper CINDERStorageHelper = new org.ovirt.engine.core.bll.storage.CINDERStorageHelper ( ) ; CINDERStorageHelper.activateCinderDomain ( org.ovirt.engine.core.bll.storage.domain.AttachStorageDomainToPoolCommand.getParameters ( ) . getStorageDomainId ( ) , org.ovirt.engine.core.bll.storage.domain.AttachStorageDomainToPoolCommand.getParameters ( ) . getStoragePoolId ( ) ) ; } catch ( java.lang.RuntimeException e ) { auditLogDirector.log ( this , AuditLogType.USER_ACTIVATE_STORAGE_DOMAIN_FAILED ) ; } }

Target:
protected void attemptToActivateCinderDomain ( ) { try { org.ovirt.engine.core.bll.storage.connection.CINDERStorageHelper CINDERStorageHelper = new org.ovirt.engine.core.bll.storage.connection.CINDERStorageHelper ( ) ; CINDERStorageHelper.activateCinderDomain ( org.ovirt.engine.core.bll.storage.domain.AttachStorageDomainToPoolCommand.getParameters ( ) . getStorageDomainId ( ) , org.ovirt.engine.core.bll.storage.domain.AttachStorageDomainToPoolCommand.getParameters ( ) . getStoragePoolId ( ) ) ; } catch ( java.lang.RuntimeException e ) { auditLogDirector.log ( this , AuditLogType.USER_ACTIVATE_STORAGE_DOMAIN_FAILED ) ; } }
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 isSupportBridgesReportByVDSM ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String version ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Boolean ) ( source ) ) . booleanValue ( ) : true ; } } ; org.ovirt.engine.core.common.queries.GetConfigurationValueParameters tempVar = new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.SupportBridgesReportByVDSM ) ; tempVar.setVersion ( version ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigFromCache ( tempVar , aQuery ) ; }
Source:
public org.ovirt.engine.core.bll.ValidationResult validateSpaceRequirements ( java.util.Collection < org.ovirt.engine.core.common.businessentities.DiskImage > diskImages ) { org.ovirt.engine.core.bll.validator.MultipleStorageDomainsValidator sdValidator = createMultipleStorageDomainsValidator ( diskImages ) ; org.ovirt.engine.core.bll.ValidationResult result = sdValidator.allDomainsExistAndActive ( ) ; if ( ! ( result.isValid ( ) ) ) { return result ; } result = sdValidator.allDomainsWithinThresholds ( ) ; if ( ! ( result.isValid ( ) ) ) { return result ; } if ( params.getCopyCollapse ( ) ) { return sdValidator.allDomainsHaveSpaceForClonedDisks ( diskImages ) ; } return sdValidator.allDomainsHaveSpaceForDisksWithSnapshots ( diskImages ) ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult validateSpaceRequirements ( java.util.Collection < org.ovirt.engine.core.common.businessentities.DiskImage > diskImages ) { org.ovirt.engine.core.bll.validator.storage.MultipleStorageDomainsValidator sdValidator = createMultipleStorageDomainsValidator ( diskImages ) ; org.ovirt.engine.core.bll.ValidationResult result = sdValidator.allDomainsExistAndActive ( ) ; if ( ! ( result.isValid ( ) ) ) { return result ; } result = sdValidator.allDomainsWithinThresholds ( ) ; if ( ! ( result.isValid ( ) ) ) { return result ; } if ( params.getCopyCollapse ( ) ) { return sdValidator.allDomainsHaveSpaceForClonedDisks ( diskImages ) ; } return sdValidator.allDomainsHaveSpaceForDisksWithSnapshots ( diskImages ) ; }
Source:
protected void executeQueryCommand ( ) { org.ovirt.engine.core.bll.GetVmsRunningOnOrMigratingToVdsQuery.getQueryReturnValue ( ) . setReturnValue ( org.ovirt.engine.core.bll.GetVmsRunningOnOrMigratingToVdsQuery.getDbFacade ( ) . getVmDao ( ) . getAllRunningOnOrMigratingToVds ( org.ovirt.engine.core.bll.GetVmsRunningOnOrMigratingToVdsQuery.getParameters ( ) . getId ( ) ) ) ; }

Target:
protected void executeQueryCommand ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VM > allRunningOnOrMigratingToVds = org.ovirt.engine.core.bll.GetVmsRunningOnOrMigratingToVdsQuery.getDbFacade ( ) . getVmDao ( ) . getAllRunningOnOrMigratingToVds ( org.ovirt.engine.core.bll.GetVmsRunningOnOrMigratingToVdsQuery.getParameters ( ) . getId ( ) ) ; updateStatistics ( allRunningOnOrMigratingToVds ) ; org.ovirt.engine.core.bll.GetVmsRunningOnOrMigratingToVdsQuery.getQueryReturnValue ( ) . setReturnValue ( allRunningOnOrMigratingToVds ) ; }
Source:
public void vdsNameVds ( ) { b.setVdsName ( null ) ; final org.ovirt.engine.core.common.businessentities.VDS v = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; v.setVdsName ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.NAME ) ; b.setVds ( v ) ; final java.lang.String s = b.getVdsName ( ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.NAME , s ) ; }

Target:
public void vdsNameVds ( ) { b.setVdsName ( null ) ; final org.ovirt.engine.core.common.businessentities.VDS v = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; v.setVdsName ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.NAME ) ; b.setVds ( v ) ; final java.lang.String s = b.getVdsName ( ) ; org.junit.jupiter.api.Assertions.assertEquals ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.NAME , s ) ; }
Source:
public void testAllowRhel6InRhel7 ( ) { org.ovirt.engine.core.common.businessentities.VDS vds = createBaseVds ( ) ; vdsFromDb.setHostOs ( "RHEL - 7Server - 1.el7" ) ; vds.setHostOs ( "RHEL - 6Server - 6.5.0.1.el6" ) ; cluster.setClusterPolicyId ( ClusterPolicy.UPGRADE_POLICY_GUID ) ; virtStrategy.processSoftwareCapabilities ( vds ) ; org.junit.Assert.assertNotEquals ( VDSStatus.NonOperational , vds.getStatus ( ) ) ; }

Target:
public void testAllowRhel6InRhel7 ( ) { org.ovirt.engine.core.common.businessentities.VDS vds = createBaseVds ( ) ; vdsFromDb.setHostOs ( "RHEL - 7Server - 1.el7" ) ; vds.setHostOs ( "RHEL - 6Server - 6.5.0.1.el6" ) ; cluster.setClusterPolicyId ( ClusterPolicy.UPGRADE_POLICY_GUID ) ; virtStrategy.processSoftwareCapabilities ( vds ) ; org.junit.jupiter.api.Assertions.assertNotEquals ( VDSStatus.NonOperational , vds.getStatus ( ) ) ; }
Source:
public void validateFailsWithClusterDoesNotSupportGluster ( ) { cmd = org.mockito.Mockito.spy ( createTestCommand ( getVolume ( 2 , false ) ) ) ; prepareMocks ( cmd ) ; org.mockito.Mockito.doReturn ( getCluster ( false ) ) . when ( clusterDao ) . get ( org.mockito.Mockito.any ( org.ovirt.engine.core.compat.Guid.class ) ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( cmd , EngineMessage.ACTION_TYPE_FAILED_CLUSTER_DOES_NOT_SUPPORT_GLUSTER ) ; }

Target:
public void validateFailsWithClusterDoesNotSupportGluster ( ) { cmd = org.mockito.Mockito.spy ( createTestCommand ( getVolume ( 2 , false ) ) ) ; prepareMocks ( cmd ) ; org.mockito.Mockito.doReturn ( getCluster ( false ) ) . when ( clusterDao ) . get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( cmd , EngineMessage.ACTION_TYPE_FAILED_CLUSTER_DOES_NOT_SUPPORT_GLUSTER ) ; }
Source:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { super . eventRaised ( ev , sender , args ) ; if ( ev.matchesDefinition ( RegistrationResult.RetrievedEventDefinition ) ) { asyncResult_Retrieved ( ) ; } if ( ev.matchesDefinition ( ProvideTickEvent.Definition ) ) { syncSearch ( ) ; } }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { super . eventRaised ( ev , sender , args ) ; if ( ev.matchesDefinition ( RegistrationResult.RetrievedEventDefinition ) ) { asyncResult_Retrieved ( ) ; } if ( ev.matchesDefinition ( ProvideTickEvent.definition ) ) { syncSearch ( ) ; } }
Source:
public java.lang.Object call ( ) { org.ovirt.engine.core.common.businessentities.StoragePoolIsoMap map = getStoragePoolIsoMapDAO ( ) . get ( new org.ovirt.engine.core.common.businessentities.StoragePoolIsoMapId ( storageDomainId , storagePoolId ) ) ; map.setStatus ( storageDomainStatus ) ; getStoragePoolIsoMapDAO ( ) . updateStatus ( map.getId ( ) , map.getStatus ( ) ) ; return null ; }

Target:
public java.lang.Object call ( ) { org.ovirt.engine.core.common.businessentities.StoragePoolIsoMap map = getStoragePoolIsoMapDao ( ) . get ( new org.ovirt.engine.core.common.businessentities.StoragePoolIsoMapId ( storageDomainId , storagePoolId ) ) ; map.setStatus ( storageDomainStatus ) ; getStoragePoolIsoMapDao ( ) . updateStatus ( map.getId ( ) , map.getStatus ( ) ) ; return null ; }
Source:
public void testZeroLatency ( ) { java.lang.String doubleValue = "0" ; java.util.Map < java.lang.String , java.lang.Object > diskData = org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectsBuilderTest.setDiskData ( ) ; diskData.put ( VdsProperties.vm_disk_write_latency , doubleValue ) ; java.util.Map < java.lang.String , java.lang.Object > xml = org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectsBuilderTest.setMockForTesting ( diskData ) ; java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImageDynamic > disks = org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectsBuilder.buildVmDiskStatistics ( xml ) ; org.junit.Assert.assertEquals ( new java.lang.Double ( "0" ) , disks.get ( 0 ) . getWriteLatency ( ) ) ; }

Target:
public void testZeroLatency ( ) { java.lang.String doubleValue = "0" ; java.util.Map < java.lang.String , java.lang.Object > diskData = org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectsBuilderTest.setDiskData ( ) ; diskData.put ( VdsProperties.vm_disk_write_latency , doubleValue ) ; java.util.Map < java.lang.String , java.lang.Object > xml = org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectsBuilderTest.setMockForTesting ( diskData ) ; java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImageDynamic > disks = vdsBrokerObjectsBuilder.buildVmDiskStatistics ( xml ) ; org.junit.Assert.assertEquals ( new java.lang.Double ( "0" ) , disks.get ( 0 ) . getWriteLatency ( ) ) ; }
Source:
public void compensate ( ) { org.ovirt.engine.core.bll.ImagesHandler.updateImageStatus ( enclosingCommand.getParameters ( ) . getImageId ( ) , ImageStatus.OK ) ; org.ovirt.engine.core.bll.ImagesHandler.updateImageStatus ( enclosingCommand.getParameters ( ) . getDestinationImageId ( ) , ImageStatus.OK ) ; }

Target:
public void endWithFailure ( ) { for ( org.ovirt.engine.core.common.action.LiveMigrateDiskParameters parameters : enclosingCommand.getParameters ( ) . getParametersList ( ) ) { updateDestinationImageId ( parameters ) ; } endCreateAllSnapshots ( ) ; org.ovirt.engine.core.bll.job.ExecutionHandler.endJob ( enclosingCommand.getExecutionContext ( ) , false ) ; enclosingCommand.setExecutionContext ( null ) ; enclosingCommand.getReturnValue ( ) . setSucceeded ( true ) ; }
Source:
public org.ovirt.engine.core.bll.ValidationResult isDiskInterfaceSupported ( org.ovirt.engine.core.common.businessentities.VM vm ) { if ( vm != null ) { if ( ! ( org.ovirt.engine.core.bll.validator.VmValidationUtils.isDiskInterfaceSupportedByOs ( vm.getOs ( ) , vm.getCompatibilityVersion ( ) , diskVmElement.getDiskInterface ( ) ) ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_DISK_INTERFACE_UNSUPPORTED , java.lang.String.format ( "$osName %s" , org.ovirt.engine.core.bll.validator.storage.DiskVmElementValidator.getOsRepository ( ) . getOsName ( vm.getOs ( ) ) ) ) ; } } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult isDiskInterfaceSupported ( org.ovirt.engine.core.common.businessentities.VM vm ) { if ( vm != null ) { if ( ! ( org.ovirt.engine.core.di.Injector.get ( org.ovirt.engine.core.bll.validator.VmValidationUtils.class ) . isDiskInterfaceSupportedByOs ( vm.getOs ( ) , vm.getCompatibilityVersion ( ) , diskVmElement.getDiskInterface ( ) ) ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_DISK_INTERFACE_UNSUPPORTED , java.lang.String.format ( "$osName %s" , org.ovirt.engine.core.bll.validator.storage.DiskVmElementValidator.getOsRepository ( ) . getOsName ( vm.getOs ( ) ) ) ) ; } } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }
Source:
private boolean nicUsedByRemovedNetwork ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface slave ) { for ( org.ovirt.engine.core.common.businessentities.network.NetworkAttachment attachment : params.getRemovedNetworkAttachments ( ) ) { if ( java.util.Objects.equals ( slave.getName ( ) , attachment.getNicName ( ) ) ) { return true ; } } return false ; }

Target:
private boolean bondIsUpdatedAndDoesNotContainCertainSlave ( java.lang.String slaveName , java.lang.String bondName ) { for ( org.ovirt.engine.core.common.businessentities.network.Bond bond : params.getBonds ( ) ) { boolean isRequiredBond = bond.getName ( ) . equals ( bondName ) ; if ( isRequiredBond ) { boolean updatedBondDoesNotContainGivenSlave = ! ( bond.getSlaves ( ) . contains ( slaveName ) ) ; return updatedBondDoesNotContainGivenSlave ; } } return false ; }
Source:
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 ) ; assertFalse ( 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:
public void unmanagedVlanAddedToNic ( ) { org.ovirt.engine.core.common.businessentities.VdsNetworkInterface nic = createNic ( "nic0" , null ) ; mockExistingIfaces ( nic ) ; org.ovirt.engine.core.bll.SetupNetworksHelper helper = createHelper ( createParametersForNics ( nic , createVlan ( nic.getName ( ) , 100 , "net" ) ) ) ; validateAndExpectViolation ( helper , VdcBllMessages.NETWORKS_DONT_EXIST_IN_CLUSTER ) ; }

Target:
public void unmanagedVlanAddedToNic ( ) { org.ovirt.engine.core.common.businessentities.VdsNetworkInterface nic = createNic ( "nic0" , null ) ; mockExistingIfaces ( nic ) ; java.lang.String networkName = "net" ; org.ovirt.engine.core.bll.SetupNetworksHelper helper = createHelper ( createParametersForNics ( nic , createVlan ( nic.getName ( ) , 100 , networkName ) ) ) ; validateAndExpectViolation ( helper , VdcBllMessages.NETWORKS_DONT_EXIST_IN_CLUSTER , networkName ) ; }
Source:
public static void getDomainList ( 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.RunQuery ( VdcQueryType.GetDomainList , tempVar , aQuery ) ; }

Target:
public static void getVmDiskList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid vmId , 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 ) { if ( source != null ) { return source ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > ( ) ; } } ; org.ovirt.engine.core.common.queries.IdQueryParameters params = new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) ; params.setRefresh ( isRefresh ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllDisksByVmId , params , aQuery ) ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object ReturnValue ) { if ( model.equals ( getViewFilterType ( ) ) ) { this . setItems ( ( ( java.util.List < org.ovirt.engine.core.common.utils.PairQueryable < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface , org.ovirt.engine.core.common.businessentities.VM > > ) ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( ReturnValue ) ) . getReturnValue ( ) ) ) ) ; } }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object ReturnValue ) { if ( model.equals ( getViewFilterType ( ) ) ) { setItems ( ( ( java.util.Collection < org.ovirt.engine.core.common.utils.PairQueryable < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface , org.ovirt.engine.core.common.businessentities.VM > > ) ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( ReturnValue ) ) . getReturnValue ( ) ) ) ) ; } }
Source:
public void testAddIncompleteParameters_2 ( ) throws java.lang.Exception { org.ovirt.engine.api.model.Disk model = getModel ( 0 ) ; model.setName ( NAMES [ 0 ] ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; control.replay ( ) ; try { collection.add ( model ) ; fail ( "expected WebApplicationException on incomplete parameters" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyIncompleteException ( wae , "Disk" , "add" , "provisionedSize|size" ) ; } }

Target:
public void testAddIncompleteParameters_2 ( ) throws java.lang.Exception { org.ovirt.engine.api.model.Disk model = getModel ( 0 ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; control.replay ( ) ; try { collection.add ( model ) ; fail ( "expected WebApplicationException on incomplete parameters" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyIncompleteException ( wae , "Disk" , "validateDiskForCreation" , "provisionedSize|size" ) ; } }
Source:
public void initUserAndGroupData ( ) { if ( ( _dbUser ) == null ) { _dbUser = org.ovirt.engine.core.bll.PermissionsCommandBase.getDbUserDAO ( ) . get ( org.ovirt.engine.core.bll.PermissionsCommandBase.getParameters ( ) . getPermission ( ) . getad_element_id ( ) ) ; } if ( ( _adGroup ) == null ) { _adGroup = org.ovirt.engine.core.bll.PermissionsCommandBase.getAdGroupDAO ( ) . get ( org.ovirt.engine.core.bll.PermissionsCommandBase.getParameters ( ) . getPermission ( ) . getad_element_id ( ) ) ; } }

Target:
public void initUserAndGroupData ( ) { if ( ( _dbUser ) == null ) { _dbUser = org.ovirt.engine.core.bll.PermissionsCommandBase.getDbUserDAO ( ) . get ( org.ovirt.engine.core.bll.PermissionsCommandBase.getParameters ( ) . getPermission ( ) . getad_element_id ( ) ) ; } if ( ( _adGroup ) == null ) { org.ovirt.engine.core.common.businessentities.DbGroup dbGroup = org.ovirt.engine.core.bll.PermissionsCommandBase.getAdGroupDAO ( ) . get ( org.ovirt.engine.core.bll.PermissionsCommandBase.getParameters ( ) . getPermission ( ) . getad_element_id ( ) ) ; if ( dbGroup != null ) { _adGroup = new org.ovirt.engine.core.common.businessentities.LdapGroup ( dbGroup ) ; } } }
Source:
public void testRemoveNonExistant ( ) throws java.lang.Exception { setUpGetEntityExpectations ( VdcQueryType.GetVmByVmId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { NON_EXISTANT_GUID } , null ) ; control.replay ( ) ; try { collection.remove ( org.ovirt.engine.api.restapi.resource.NON_EXISTANT_GUID.toString ( ) ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { assertNotNull ( wae.getResponse ( ) ) ; assertEquals ( 404 , wae.getResponse ( ) . getStatus ( ) ) ; } }

Target:
public void testRemoveNonExistant ( ) throws java.lang.Exception { setUpGetEntityExpectations ( VdcQueryType.GetVmByVmId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { NON_EXISTANT_GUID } , null ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; control.replay ( ) ; try { collection.remove ( org.ovirt.engine.api.restapi.resource.NON_EXISTANT_GUID.toString ( ) ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { assertNotNull ( wae.getResponse ( ) ) ; assertEquals ( 404 , wae.getResponse ( ) . getStatus ( ) ) ; } }
Source:
public void onFailure ( final java.lang.Throwable caught ) { if ( org.ovirt.engine.ui.frontend.Frontend.ignoreFailure ( caught ) ) { return ; } org.ovirt.engine.ui.frontend.Frontend.logger.log ( java.util.logging.Level.SEVERE , ( "Failed to execute RunAction: " + caught ) , caught ) ; org.ovirt.engine.ui.frontend.Frontend.failureEventHandler ( caught ) ; if ( callback != null ) { callback.executed ( new org.ovirt.engine.ui.uicompat.FrontendMultipleActionAsyncResult ( actionType , parameters , null , state ) ) ; } }

Target:
public void onSuccess ( final org.ovirt.engine.core.common.action.VdcReturnValueBase result ) { org.ovirt.engine.ui.frontend.Frontend.logger.finer ( "Succesful returned result from logoff." ) ; callback.getDel ( ) . onSuccess ( callback.getModel ( ) , result ) ; if ( ( org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . getLoginHandler ( ) ) != null ) { org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . getLoginHandler ( ) . onLogout ( ) ; } }
Source:
protected boolean setAndValidateCpuProfile ( ) { getVmTemplate ( ) . setVdsGroupId ( getVdsGroupId ( ) ) ; getVmTemplate ( ) . setCpuProfileId ( getParameters ( ) . getCpuProfileId ( ) ) ; return validate ( org.ovirt.engine.core.bll.profiles.CpuProfileHelper.setAndValidateCpuProfile ( getVmTemplate ( ) , getVdsGroup ( ) . getCompatibilityVersion ( ) , getUserId ( ) ) ) ; }

Target:
protected boolean setAndValidateCpuProfile ( ) { getVmTemplate ( ) . setVdsGroupId ( getVdsGroupId ( ) ) ; getVmTemplate ( ) . setCpuProfileId ( getParameters ( ) . getCpuProfileId ( ) ) ; return validate ( cpuProfileHelper.setAndValidateCpuProfile ( getVmTemplate ( ) , getVdsGroup ( ) . getCompatibilityVersion ( ) , getUserId ( ) ) ) ; }
Source:
public static void initNicHotplugSupportMap ( ) { org.ovirt.engine.ui.frontend.AsyncQuery callback = new org.ovirt.engine.ui.frontend.AsyncQuery ( ) ; callback.asyncCallback = new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.nicHotplugSupportMap = ( ( java.util.Map < org.ovirt.engine.core.common.utils.Pair < java.lang.Integer , org.ovirt.engine.core.compat.Version > , java.lang.Boolean > ) ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ) ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.OsRepository , new org.ovirt.engine.core.common.queries.OsQueryParameters ( org.ovirt.engine.core.common.queries.OsQueryParameters.OsRepositoryVerb.GetNicHotplugSupportMap ) , callback ) ; }

Target:
public void initNicHotplugSupportMap ( ) { org.ovirt.engine.ui.frontend.AsyncQuery callback = new org.ovirt.engine.ui.frontend.AsyncQuery ( ) ; callback.asyncCallback = new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { nicHotplugSupportMap = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.OsRepository , new org.ovirt.engine.core.common.queries.OsQueryParameters ( org.ovirt.engine.core.common.queries.OsQueryParameters.OsRepositoryVerb.GetNicHotplugSupportMap ) , callback ) ; }
Source:
protected void afterUpdate ( ) { boolean newSizeUnderCurrentConsumption = org.ovirt.engine.core.bll.quota.QuotaManager.getInstance ( ) . isStorageQuotaExceeded ( getQuota ( ) . getId ( ) ) ; if ( newSizeUnderCurrentConsumption ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase logable = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; logable.AddCustomValue ( "QuotaName" , getQuotaName ( ) ) ; org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.log ( logable , AuditLogType.QUOTA_STORAGE_RESIZE_LOWER_THEN_CONSUMPTION ) ; } }

Target:
protected void afterUpdate ( ) { boolean newSizeUnderCurrentConsumption = org.ovirt.engine.core.bll.quota.QuotaManager.getInstance ( ) . isStorageQuotaExceeded ( getQuota ( ) . getId ( ) ) ; if ( newSizeUnderCurrentConsumption ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase logable = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; logable.addCustomValue ( "QuotaName" , getQuotaName ( ) ) ; org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.log ( logable , AuditLogType.QUOTA_STORAGE_RESIZE_LOWER_THEN_CONSUMPTION ) ; } }