auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public org.ovirt.engine.ui.uicommonweb.models.userportal.IUserPortalListModel flush ( ) { ctrlAltDel.asEditor ( ) . getSubEditor ( ) . getValue ( ) ; enableUsbAutoshare.asEditor ( ) . getSubEditor ( ) . getValue ( ) ; openInFullScreen.asEditor ( ) . getSubEditor ( ) . getValue ( ) ; useLocalDrives.asEditor ( ) . getSubEditor ( ) . getValue ( ) ; return model ; }

Target:
public void selectWanOptionsEnabled ( boolean selected ) { wanEnabled.asCheckBox ( ) . setValue ( selected ) ; }
Source:
private void addDiskPermissions ( org.ovirt.engine.core.common.businessentities.Disk disk ) { org.ovirt.engine.core.common.businessentities.permissions perms = new org.ovirt.engine.core.common.businessentities.permissions ( org.ovirt.engine.core.bll.AddDiskCommand.getCurrentUser ( ) . getUserId ( ) , PredefinedRoles.DISK_OPERATOR.getId ( ) , disk.getId ( ) , org.ovirt.engine.core.common.VdcObjectType.Disk ) ; org.ovirt.engine.core.bll.MultiLevelAdministrationHandler.addPermission ( perms ) ; }

Target:
private void addDiskPermissions ( org.ovirt.engine.core.common.businessentities.Disk disk ) { org.ovirt.engine.core.common.businessentities.Permissions perms = new org.ovirt.engine.core.common.businessentities.Permissions ( org.ovirt.engine.core.bll.AddDiskCommand.getCurrentUser ( ) . getId ( ) , PredefinedRoles.DISK_OPERATOR.getId ( ) , disk.getId ( ) , org.ovirt.engine.core.common.VdcObjectType.Disk ) ; org.ovirt.engine.core.bll.MultiLevelAdministrationHandler.addPermission ( perms ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.VDS createHost ( org.ovirt.engine.core.common.businessentities.VDSStatus status , org.ovirt.engine.core.compat.Guid clusterId , org.ovirt.engine.core.compat.Guid dcId ) { org.ovirt.engine.core.common.businessentities.VDS host = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; host.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; host.setVdsGroupId ( clusterId ) ; host.setStoragePoolId ( dcId ) ; host.setVdsGroupCompatibilityVersion ( Version.v3_0 ) ; host.setStatus ( status ) ; host.setHostName ( ( "host-" + ( host.getId ( ) ) ) ) ; return host ; }

Target:
private org.ovirt.engine.core.common.businessentities.VDS createHost ( org.ovirt.engine.core.common.businessentities.VDSStatus status , org.ovirt.engine.core.compat.Guid clusterId , org.ovirt.engine.core.compat.Guid dcId ) { org.ovirt.engine.core.common.businessentities.VDS host = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; host.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; host.setClusterId ( clusterId ) ; host.setStoragePoolId ( dcId ) ; host.setClusterCompatibilityVersion ( Version.v3_0 ) ; host.setStatus ( status ) ; host.setHostName ( ( "host-" + ( host.getId ( ) ) ) ) ; return host ; }
Source:
protected void onFetchVms ( ) { dbVms = getVmDao ( ) . getAllRunningByVds ( vdsManager.getVdsId ( ) ) ; changedVms = new java.util.ArrayList < > ( ) ; filterVms ( ) ; gatherNonRunningVms ( dbVms ) ; saveLastVmsList ( vdsmVms ) ; }

Target:
protected void onFetchVms ( ) { dbVms = getVmDynamicDao ( ) . getAllRunningForVds ( vdsManager.getVdsId ( ) ) . stream ( ) . collect ( java.util.stream.Collectors.toMap ( VmDynamic :: getId , java.util.function.Function.identity ( ) ) ) ; changedVms = new java.util.ArrayList < > ( ) ; filterVms ( ) ; gatherNonRunningVms ( dbVms ) ; saveLastVmsList ( vdsmVms ) ; }
Source:
public void addExternallyManagedVms ( java.util.List < org.ovirt.engine.core.common.businessentities.VmStatic > externalVmList ) { for ( org.ovirt.engine.core.common.businessentities.VmStatic currVm : externalVmList ) { org.ovirt.engine.core.common.action.AddVmFromScratchParameters params = new org.ovirt.engine.core.common.action.AddVmFromScratchParameters ( currVm , null , null ) ; org.ovirt.engine.core.common.action.VdcReturnValueBase returnValue = org.ovirt.engine.core.bll.Backend.getInstance ( ) . runInternalAction ( VdcActionType.AddVmFromScratch , params , org.ovirt.engine.core.bll.job.ExecutionHandler.createInternalJobContext ( ) ) ; if ( ! ( returnValue.getSucceeded ( ) ) ) { org.ovirt.engine.core.bll.VdsEventListener.log.debugFormat ( "Failed adding Externally managed VM {0}" , currVm.getName ( ) ) ; } } }

Target:
public void addExternallyManagedVms ( java.util.List < org.ovirt.engine.core.common.businessentities.VmStatic > externalVmList ) { for ( org.ovirt.engine.core.common.businessentities.VmStatic currVm : externalVmList ) { org.ovirt.engine.core.common.action.AddVmParameters params = new org.ovirt.engine.core.common.action.AddVmParameters ( currVm , null , null ) ; org.ovirt.engine.core.common.action.VdcReturnValueBase returnValue = org.ovirt.engine.core.bll.Backend.getInstance ( ) . runInternalAction ( VdcActionType.AddVmFromScratch , params , org.ovirt.engine.core.bll.job.ExecutionHandler.createInternalJobContext ( ) ) ; if ( ! ( returnValue.getSucceeded ( ) ) ) { org.ovirt.engine.core.bll.VdsEventListener.log.debugFormat ( "Failed adding Externally managed VM {0}" , currVm.getName ( ) ) ; } } }
Source:
private void removeMemoryFromSnapshot ( ) { if ( memoryVolumeFromSnapshot.isEmpty ( ) ) { return ; } if ( ( getSnapshotDao ( ) . getNumOfSnapshotsByMemory ( memoryVolumeFromSnapshot ) ) == 1 ) { removeMemoryVolumes ( memoryVolumeFromSnapshot , org.ovirt.engine.core.bll.RunVmCommand.getActionType ( ) , true ) ; } getSnapshotDao ( ) . removeMemoryFromSnapshot ( getBaselineSnapshot ( ) . getId ( ) ) ; }

Target:
public void runningSucceded ( ) { removeMemoryFromActiveSnapshot ( ) ; super . runningSucceded ( ) ; }
Source:
public void testStatisticalQuery ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface entity = setUpStatisticalExpectations ( ) ; @ java.lang.SuppressWarnings ( value = "unchecked" ) org.ovirt.engine.api.restapi.resource.BackendStatisticsResource < org.ovirt.engine.api.model.HostNic , org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > statisticsResource = ( ( org.ovirt.engine.api.restapi.resource.BackendStatisticsResource < org.ovirt.engine.api.model.HostNic , org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > ) ( resource.getStatisticsResource ( ) ) ) ; assertNotNull ( statisticsResource ) ; verifyQuery ( statisticsResource.getQuery ( ) , entity ) ; }

Target:
public void testStatisticalQuery ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface entity = setUpStatisticalExpectations ( ) ; @ java.lang.SuppressWarnings ( value = "unchecked" ) org.ovirt.engine.api.restapi.resource.BackendStatisticsResource < org.ovirt.engine.api.model.HostNic , org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > statisticsResource = ( ( org.ovirt.engine.api.restapi.resource.BackendStatisticsResource < org.ovirt.engine.api.model.HostNic , org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > ) ( resource.getStatisticsResource ( ) ) ) ; org.junit.Assert.assertNotNull ( statisticsResource ) ; verifyQuery ( statisticsResource.getQuery ( ) , entity ) ; }
Source:
public void updateCommandStatus ( org.ovirt.engine.core.compat.Guid commandId , org.ovirt.engine.core.common.asynctasks.AsyncTaskType taskType , org.ovirt.engine.core.compat.CommandStatus status ) { final org.ovirt.engine.core.common.businessentities.CommandEntity cmdEntity = get ( commandId ) ; if ( cmdEntity != null ) { cmdEntity.setCommandStatus ( status ) ; if ( ( taskType.equals ( AsyncTaskType.notSupported ) ) || ( cmdEntity.isCallBackEnabled ( ) ) ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getCommandEntityDao ( ) . saveOrUpdate ( cmdEntity ) ; } } }

Target:
public void updateCommandStatus ( org.ovirt.engine.core.compat.Guid commandId , org.ovirt.engine.core.common.asynctasks.AsyncTaskType taskType , org.ovirt.engine.core.compat.CommandStatus status ) { final org.ovirt.engine.core.common.businessentities.CommandEntity cmdEntity = get ( commandId ) ; if ( cmdEntity != null ) { cmdEntity.setCommandStatus ( status ) ; if ( ( taskType.equals ( AsyncTaskType.notSupported ) ) || ( cmdEntity.isCallBackEnabled ( ) ) ) { org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInScope ( TransactionScopeOption.Required , new org.ovirt.engine.core.utils.transaction.TransactionMethod < java.lang.Object > ( ) { @ java.lang.Override public java.lang.Void runInTransaction ( ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getCommandEntityDao ( ) . saveOrUpdate ( cmdEntity ) ; return null ; } } ) ; } } }
Source:
public void testListCrash ( ) { java.lang.Throwable t = new java.lang.RuntimeException ( FAILURE ) ; setUpMacPoolsQueryExpectations ( t ) ; javax.ws.rs.core.UriInfo uriInfo = setUpUriExpectations ( null ) ; collection.setUriInfo ( uriInfo ) ; try { getCollection ( ) ; org.junit.jupiter.api.Assertions.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , org.ovirt.engine.api.restapi.resource.BACKEND_FAILED_SERVER_LOCALE , t ) ; } }

Target:
public void testListCrashClientLocale ( ) { javax.ws.rs.core.UriInfo uriInfo = setUpUriExpectations ( null ) ; locales.add ( org.ovirt.engine.api.restapi.resource.CLIENT_LOCALE ) ; java.lang.Throwable t = new java.lang.RuntimeException ( FAILURE ) ; setUpMacPoolsQueryExpectations ( t ) ; collection.setUriInfo ( uriInfo ) ; verifyFault ( org.junit.jupiter.api.Assertions.assertThrows ( javax.ws.rs.WebApplicationException.class , this :: getCollection ) , org.ovirt.engine.api.restapi.resource.BACKEND_FAILED_CLIENT_LOCALE , t ) ; }
Source:
public java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.network.NetworkAttachment > getNetworkToAttachment ( org.ovirt.engine.core.compat.Guid hostId ) { if ( ! ( networkToAttachmentByHostId.containsKey ( hostId ) ) ) { networkToAttachmentByHostId.put ( hostId , new org.ovirt.engine.core.common.utils.MapNetworkAttachments ( networkAttachmentDao.getAllForHost ( hostId ) ) . byNetworkId ( ) ) ; } return networkToAttachmentByHostId.get ( hostId ) ; }

Target:
public java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.network.NetworkAttachment > getNetworkIdToAttachmentMap ( org.ovirt.engine.core.compat.Guid hostId ) { if ( ! ( networkToAttachmentByHostId.containsKey ( hostId ) ) ) { networkToAttachmentByHostId.put ( hostId , new org.ovirt.engine.core.common.utils.MapNetworkAttachments ( networkAttachmentDao.getAllForHost ( hostId ) ) . byNetworkId ( ) ) ; } return networkToAttachmentByHostId.get ( hostId ) ; }
Source:
protected org.ovirt.engine.core.common.vdscommands.CreateVmVDSCommandParameters buildCreateVmParameters ( ) { org.ovirt.engine.core.common.vdscommands.CreateVmVDSCommandParameters createVmParams = super . buildCreateVmParameters ( ) ; org.ovirt.engine.core.common.action.RunVmOnceParams runOnceParams = org.ovirt.engine.core.bll.RunVmOnceCommand.getParameters ( ) ; org.ovirt.engine.core.common.action.SysPrepParams sysPrepParams = new org.ovirt.engine.core.common.action.SysPrepParams ( ) ; sysPrepParams.setSysPrepDomainName ( runOnceParams.getSysPrepDomainName ( ) ) ; sysPrepParams.setSysPrepUserName ( runOnceParams.getSysPrepUserName ( ) ) ; sysPrepParams.setSysPrepPassword ( runOnceParams.getSysPrepPassword ( ) ) ; createVmParams.setSysPrepParams ( sysPrepParams ) ; createVmParams.getVm ( ) . setVmInit ( org.ovirt.engine.core.bll.RunVmOnceCommand.getParameters ( ) . getVmInit ( ) ) ; return createVmParams ; }

Target:
protected org.ovirt.engine.core.common.vdscommands.CreateVmVDSCommandParameters buildCreateVmParameters ( ) { org.ovirt.engine.core.common.vdscommands.CreateVmVDSCommandParameters createVmParams = super . buildCreateVmParameters ( ) ; org.ovirt.engine.core.common.action.RunVmOnceParams runOnceParams = org.ovirt.engine.core.bll.RunVmOnceCommand.getParameters ( ) ; org.ovirt.engine.core.common.action.SysPrepParams sysPrepParams = new org.ovirt.engine.core.common.action.SysPrepParams ( ) ; sysPrepParams.setSysPrepDomainName ( runOnceParams.getSysPrepDomainName ( ) ) ; sysPrepParams.setSysPrepUserName ( runOnceParams.getSysPrepUserName ( ) ) ; sysPrepParams.setSysPrepPassword ( runOnceParams.getSysPrepPassword ( ) ) ; createVmParams.setSysPrepParams ( sysPrepParams ) ; createVmParams.getVm ( ) . setVmInit ( org.ovirt.engine.core.bll.RunVmOnceCommand.getParameters ( ) . getVmInit ( ) ) ; fillRunOnceGraphics ( ) ; return createVmParams ; }
Source:
public void labelBeingAttachedToValidBondExistingBondValid ( ) { org.ovirt.engine.core.common.businessentities.network.Bond bond = new org.ovirt.engine.core.common.businessentities.network.Bond ( "bond" ) ; bond.setSlaves ( java.util.Arrays.asList ( "slave1" , "slave2" ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > nics = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > ( java.util.Arrays.asList ( bond ) ) ; org.ovirt.engine.core.common.businessentities.network.NicLabel nicLabel = new org.ovirt.engine.core.common.businessentities.network.NicLabel ( bond.getId ( ) , bond.getName ( ) , "lbl1" ) ; org.junit.Assert.assertThat ( createNicLabelValidator ( nics ) . labelBeingAttachedToValidBond ( nicLabel ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }

Target:
public void labelBeingAttachedToValidBondExistingBondValid ( ) { org.ovirt.engine.core.common.businessentities.network.Bond bond = new org.ovirt.engine.core.common.businessentities.network.Bond ( "bond" ) ; bond.setSlaves ( java.util.Arrays.asList ( "slave1" , "slave2" ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > nics = new java.util.ArrayList ( java.util.Collections.singletonList ( bond ) ) ; org.ovirt.engine.core.common.businessentities.network.NicLabel nicLabel = new org.ovirt.engine.core.common.businessentities.network.NicLabel ( bond.getId ( ) , bond.getName ( ) , "lbl1" ) ; org.junit.Assert.assertThat ( createNicLabelValidator ( nics ) . labelBeingAttachedToValidBond ( nicLabel ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }
Source:
public void testNoDiskBootFromIsoDomain ( ) { org.ovirt.engine.core.common.businessentities.VM vm = new org.ovirt.engine.core.common.businessentities.VM ( ) ; vm.setBootSequence ( BootSequence.CD ) ; org.ovirt.engine.core.bll.validator.RunVmValidatorTest.validateResult ( runVmValidator.validateBootSequence ( vm , new java.util.ArrayList < > ( ) , org.ovirt.engine.core.compat.Guid.newGuid ( ) ) , true , null ) ; }

Target:
public void testIsoOnDataDomainNotExists ( ) { org.ovirt.engine.core.common.businessentities.VM vm = new org.ovirt.engine.core.common.businessentities.VM ( ) ; vm.setBootSequence ( BootSequence.CD ) ; org.mockito.Mockito.when ( diskDao.get ( org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( null ) ; org.ovirt.engine.core.bll.validator.RunVmValidatorTest.validateResult ( runVmValidator.validateIsoPath ( vm , org.ovirt.engine.core.compat.Guid.newGuid ( ) . toString ( ) , null , null ) , false , EngineMessage.ERROR_CANNOT_FIND_ISO_IMAGE_PATH ) ; }
Source:
protected java.security.MessageDigest getMd5Digest ( javax.servlet.http.HttpServletRequest request ) throws java.security.NoSuchAlgorithmException { java.security.MessageDigest digest = createMd5Digest ( ) ; digest.update ( request.getAttribute ( org.ovirt.engine.ui.frontend.server.gwt.GwtDynamicHostPageServlet.ATTR_SELECTOR_SCRIPT ) . toString ( ) . getBytes ( ) ) ; if ( ( request.getAttribute ( org.ovirt.engine.ui.frontend.server.gwt.GwtDynamicHostPageServlet.ATTR_USER_INFO ) ) != null ) { digest.update ( request.getAttribute ( org.ovirt.engine.ui.frontend.server.gwt.GwtDynamicHostPageServlet.ATTR_USER_INFO ) . toString ( ) . getBytes ( ) ) ; } return digest ; }

Target:
private java.lang.String getBrandingMessages ( final java.util.Locale locale ) { return brandingManager.getMessages ( getApplicationType ( ) . getPrefix ( ) , locale ) ; }
Source:
public void updateReportsAvailability ( org.ovirt.engine.ui.webadmin.ApplicationConstants constants ) { if ( org.ovirt.engine.ui.uicommonweb.ReportInit.getInstance ( ) . isReportsEnabled ( ) ) { java.util.List < org.ovirt.engine.ui.common.widget.action.ActionButtonDefinition < org.ovirt.engine.core.common.businessentities.VDSGroup > > resourceSubActions = org.ovirt.engine.ui.webadmin.uicommon.ReportActionsHelper.getInstance ( ) . getResourceSubActions ( "Cluster" , getModelProvider ( ) ) ; if ( ( resourceSubActions != null ) && ( ( resourceSubActions.size ( ) ) > 0 ) ) { getTable ( ) . addActionButton ( new org.ovirt.engine.ui.webadmin.widget.action.WebAdminMenuBarButtonDefinition < org.ovirt.engine.core.common.businessentities.VDSGroup > ( constants.showReportCluster ( ) , resourceSubActions ) ) ; } } }

Target:
public void updateReportsAvailability ( ) { if ( org.ovirt.engine.ui.uicommonweb.ReportInit.getInstance ( ) . isReportsEnabled ( ) ) { java.util.List < org.ovirt.engine.ui.common.widget.action.ActionButtonDefinition < org.ovirt.engine.core.common.businessentities.VDSGroup > > resourceSubActions = org.ovirt.engine.ui.webadmin.uicommon.ReportActionsHelper.getInstance ( ) . getResourceSubActions ( "Cluster" , getModelProvider ( ) ) ; if ( ( resourceSubActions != null ) && ( ( resourceSubActions.size ( ) ) > 0 ) ) { getTable ( ) . addActionButton ( new org.ovirt.engine.ui.webadmin.widget.action.WebAdminMenuBarButtonDefinition < org.ovirt.engine.core.common.businessentities.VDSGroup > ( org.ovirt.engine.ui.webadmin.section.main.view.tab.MainTabClusterView.constants.showReportCluster ( ) , resourceSubActions ) ) ; } } }
Source:
private void setUpGetEntityExpectations ( org.ovirt.engine.core.compat.Guid entityId , java.lang.Boolean returnNull ) throws java.lang.Exception { setUpGetEntityExpectations ( VdcQueryType.GetAdGroupById , org.ovirt.engine.core.common.queries.GetAdGroupByIdParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { entityId } , ( returnNull ? null : getEntity ( 0 ) ) ) ; }

Target:
private void setUpGetEntityExpectations ( org.ovirt.engine.core.compat.Guid entityId , java.lang.Boolean returnNull ) throws java.lang.Exception { setUpGetEntityExpectations ( VdcQueryType.GetAdGroupById , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { entityId } , ( returnNull ? null : getEntity ( 0 ) ) ) ; }
Source:
private boolean unregisterLibvirtSecrets ( org.ovirt.engine.core.common.businessentities.VDS vds , org.ovirt.engine.core.common.businessentities.StoragePool pool ) { if ( org.ovirt.engine.core.common.FeatureSupported.cinderProviderSupported ( pool.getCompatibilityVersion ( ) ) ) { return registerLibvirtSecrets ( vds , java.util.Collections.< org.ovirt.engine.core.common.businessentities.storage.LibvirtSecret > emptyList ( ) , true ) ; } return true ; }

Target:
private boolean handleLibvirtSecrets ( org.ovirt.engine.core.bll.context.CommandContext cmdContext , org.ovirt.engine.core.common.businessentities.VDS vds , org.ovirt.engine.core.compat.Guid poolId ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.LibvirtSecret > libvirtSecrets = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getLibvirtSecretDao ( ) . getAllByStoragePoolIdFilteredByActiveStorageDomains ( poolId ) ; if ( ( ! ( libvirtSecrets.isEmpty ( ) ) ) && ( ! ( registerLibvirtSecretsImpl ( vds , libvirtSecrets , false ) ) ) ) { org.ovirt.engine.core.bll.storage.CINDERStorageHelper.log.error ( "Failed to register libvirt secret on vds {}." , vds.getName ( ) ) ; setNonOperational ( cmdContext , vds.getId ( ) , NonOperationalReason.LIBVIRT_SECRETS_REGISTRATION_FAILURE ) ; return false ; } return true ; }
Source:
public static void getMinimalVmMemSize ( 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.VMMinMemorySizeInMB , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public void getIrsImageList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId ) { getIrsImageList ( aQuery , storagePoolId , false ) ; }
Source:
public org.ovirt.engine.ui.common.presenter.AbstractModelBoundPopupPresenterWidget < ? extends org.ovirt.engine.ui.uicommonweb.models.Model , ? > getModelPopup ( org.ovirt.engine.ui.uicommonweb.models.networks.NetworkProfileListModel source , org.ovirt.engine.ui.uicommonweb.UICommand lastExecutedCommand , org.ovirt.engine.ui.uicommonweb.models.Model windowModel ) { if ( lastExecutedCommand == ( getModel ( ) . getNewCommand ( ) ) ) { return newNetworkPopupProvider.get ( ) ; } else if ( lastExecutedCommand == ( getModel ( ) . getEditCommand ( ) ) ) { return editNetworkPopupProvider.get ( ) ; } else { return super . getModelPopup ( source , lastExecutedCommand , windowModel ) ; } }

Target:
public org.ovirt.engine.ui.common.presenter.AbstractModelBoundPopupPresenterWidget < ? extends org.ovirt.engine.ui.uicommonweb.models.Model , ? > getModelPopup ( org.ovirt.engine.ui.uicommonweb.models.networks.NetworkProfileListModel source , org.ovirt.engine.ui.uicommonweb.UICommand lastExecutedCommand , org.ovirt.engine.ui.uicommonweb.models.Model windowModel ) { if ( lastExecutedCommand == ( getModel ( ) . getNewCommand ( ) ) ) { return newProfilePopupProvider.get ( ) ; } else if ( lastExecutedCommand == ( getModel ( ) . getEditCommand ( ) ) ) { return editProfilePopupProvider.get ( ) ; } else { return super . getModelPopup ( source , lastExecutedCommand , windowModel ) ; } }
Source:
private void addSyncDiff ( org.ovirt.engine.ui.uicommonweb.models.hosts.network.LogicalNetworkModel networkModel ) { addRow ( org.ovirt.engine.ui.webadmin.section.main.view.popup.host.panels.ItemInfoPopup.templates.imageTextSetupNetwork ( notInSyncImage , org.ovirt.engine.ui.webadmin.section.main.view.popup.host.panels.ItemInfoPopup.constants.hostOutOfSync ( ) ) ) ; com.google.gwt.safehtml.shared.SafeHtml safeHtml = com.google.gwt.safehtml.shared.SafeHtmlUtils.fromTrustedString ( org.ovirt.engine.ui.webadmin.section.main.view.popup.host.panels.ItemInfoPopup.constants.hostOutOfSyncPreviewSentence ( ) ) ; addRow ( safeHtml ) ; java.util.List < org.ovirt.engine.core.common.businessentities.network.ReportedConfiguration > panelParameters = filterSyncProperties ( networkModel ) ; com.google.gwt.user.client.ui.Widget networkOutOfSyncPanel = new org.ovirt.engine.ui.webadmin.section.main.view.popup.host.panels.NetworkOutOfSyncPanel ( panelParameters ) . outOfSyncTableAsWidget ( ) ; contents.insertRow ( contents.getRowCount ( ) ) ; contents.setWidget ( contents.getRowCount ( ) , 0 , networkOutOfSyncPanel ) ; }

Target:
private java.lang.String generatePreviewSentence ( ) { com.google.gwt.safehtml.shared.SafeHtml host = org.ovirt.engine.ui.webadmin.section.main.view.popup.host.panels.ItemInfoPopup.templates.strongTextWithColor ( org.ovirt.engine.ui.webadmin.section.main.view.popup.host.panels.ItemInfoPopup.constants.hostForOutOfSyncSentence ( ) , org.ovirt.engine.ui.webadmin.section.main.view.popup.host.panels.ItemInfoPopup.WHITE_TEXT_COLOR ) ; com.google.gwt.safehtml.shared.SafeHtml dc = org.ovirt.engine.ui.webadmin.section.main.view.popup.host.panels.ItemInfoPopup.templates.strongTextWithColor ( org.ovirt.engine.ui.webadmin.section.main.view.popup.host.panels.ItemInfoPopup.constants.dcForOutOfSyncSentence ( ) , org.ovirt.engine.ui.webadmin.section.main.view.popup.host.panels.ItemInfoPopup.WHITE_TEXT_COLOR ) ; com.google.gwt.safehtml.shared.SafeHtml outOfSyncPreviewSentence = org.ovirt.engine.ui.webadmin.section.main.view.popup.host.panels.ItemInfoPopup.templates.coloredText ( org.ovirt.engine.ui.webadmin.section.main.view.popup.host.panels.ItemInfoPopup.constants.hostOutOfSyncPreviewSentence ( ) , org.ovirt.engine.ui.webadmin.section.main.view.popup.host.panels.ItemInfoPopup.TEXT_COLOR ) ; return org.ovirt.engine.ui.webadmin.section.main.view.popup.host.panels.ItemInfoPopup.templates.hostOutOfSyncPreviewSentence ( host , outOfSyncPreviewSentence , dc ) . asString ( ) ; }
Source:
public void getAAANamespaces ( 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.HashMap < java.lang.String , java.util.List < java.lang.String > > ) ( source ) ) : new java.util.HashMap < java.lang.String , java.util.List < java.lang.String > > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAvailableNamespaces , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }

Target:
public void getRoleList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Role > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Role > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllRoles , new org.ovirt.engine.core.common.queries.MultilevelAdministrationsQueriesParameters ( ) , aQuery ) ; }
Source:
private static void logField ( org.ovirt.engine.core.common.businessentities.VmStatic vmStaticFromOvf , java.lang.String fieldName , java.lang.String fieldValue ) { java.lang.String vmName = vmStaticFromOvf.getvm_name ( ) ; org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase logable = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; logable.AddCustomValue ( "FieldName" , fieldName ) ; logable.AddCustomValue ( "VmName" , vmName ) ; logable.AddCustomValue ( "FieldValue" , fieldValue ) ; org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.log ( logable , AuditLogType.VM_IMPORT_INFO ) ; }

Target:
private static void logField ( org.ovirt.engine.core.common.businessentities.VmStatic vmStaticFromOvf , java.lang.String fieldName , java.lang.String fieldValue ) { java.lang.String vmName = vmStaticFromOvf.getVmName ( ) ; org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase logable = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; logable.AddCustomValue ( "FieldName" , fieldName ) ; logable.AddCustomValue ( "VmName" , vmName ) ; logable.AddCustomValue ( "FieldValue" , fieldValue ) ; org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.log ( logable , AuditLogType.VM_IMPORT_INFO ) ; }
Source:
public void updateCommandStatus ( org.ovirt.engine.core.compat.Guid commandId , org.ovirt.engine.core.compat.CommandStatus status ) { final org.ovirt.engine.core.common.businessentities.CommandEntity cmdEntity = get ( commandId ) ; if ( cmdEntity != null ) { cmdEntity.setCommandStatus ( status ) ; org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getCommandEntityDao ( ) . saveOrUpdate ( cmdEntity ) ; } }

Target:
public void saveOrUpdateWithoutTransaction ( org.ovirt.engine.core.common.businessentities.CommandEntity cmdEntity ) { javax.transaction.Transaction transaction = org.ovirt.engine.core.utils.transaction.TransactionSupport.suspend ( ) ; try { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getCommandEntityDao ( ) . saveOrUpdate ( cmdEntity ) ; } finally { if ( transaction != null ) { org.ovirt.engine.core.utils.transaction.TransactionSupport.resume ( transaction ) ; } } }
Source:
public org.ovirt.engine.api.model.Nics list ( ) { org.ovirt.engine.api.model.Nics nics = new org.ovirt.engine.api.model.Nics ( ) ; java.util.List < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > entities = getBackendCollection ( VdcQueryType.GetVmInterfacesByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) ) ; for ( org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface entity : entities ) { org.ovirt.engine.api.model.Nic nic = populate ( map ( entity ) , entity ) ; nics.getNics ( ) . add ( addLinks ( nic ) ) ; } return nics ; }

Target:
public org.ovirt.engine.api.model.Nics list ( ) { org.ovirt.engine.api.model.Nics nics = new org.ovirt.engine.api.model.Nics ( ) ; java.util.List < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > entities = getBackendCollection ( QueryType.GetVmInterfacesByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) ) ; for ( org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface entity : entities ) { org.ovirt.engine.api.model.Nic nic = populate ( map ( entity ) , entity ) ; nics.getNics ( ) . add ( addLinks ( nic ) ) ; } return nics ; }
Source:
public javax.ws.rs.core.Response remove ( ) { org.ovirt.engine.core.common.businessentities.UserProfile entity = getEntity ( org.ovirt.engine.core.common.businessentities.UserProfile.class , VdcQueryType.GetUserProfile , new org.ovirt.engine.core.common.queries.IdQueryParameters ( userId ) , userId.toString ( ) , true ) ; entity.setSshPublicKeyId ( Guid.Empty ) ; entity.setSshPublicKey ( "" ) ; org.ovirt.engine.core.common.action.UserProfileParameters parameters = new org.ovirt.engine.core.common.action.UserProfileParameters ( ) ; parameters.setUserProfile ( entity ) ; return performAction ( VdcActionType.UpdateUserProfile , parameters ) ; }

Target:
public javax.ws.rs.core.Response remove ( ) { org.ovirt.engine.core.common.businessentities.UserProfile entity = getEntity ( org.ovirt.engine.core.common.businessentities.UserProfile.class , VdcQueryType.GetUserProfile , new org.ovirt.engine.core.common.queries.IdQueryParameters ( userId ) , userId.toString ( ) , true ) ; entity.setSshPublicKeyId ( Guid.Empty ) ; entity.setSshPublicKey ( "" ) ; org.ovirt.engine.core.common.action.UserProfileParameters parameters = new org.ovirt.engine.core.common.action.UserProfileParameters ( ) ; parameters.setUserProfile ( entity ) ; return performAction ( ActionType.UpdateUserProfile , parameters ) ; }
Source:
public void saveJobSubjectEntity ( ) { java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.VdcObjectType > entitybeforeSave = dao.getJobSubjectEntityByJobId ( org.ovirt.engine.core.dao.JobSubjectEntityDaoTest.EXISTING_JOB_ID ) ; org.junit.Assert.assertTrue ( ( ! ( entitybeforeSave.isEmpty ( ) ) ) ) ; dao.save ( org.ovirt.engine.core.dao.JobSubjectEntityDaoTest.EXISTING_JOB_ID , org.ovirt.engine.core.compat.Guid.NewGuid ( ) , VdcObjectType.VmPool ) ; java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.VdcObjectType > entityAfterSave = dao.getJobSubjectEntityByJobId ( org.ovirt.engine.core.dao.JobSubjectEntityDaoTest.EXISTING_JOB_ID ) ; org.junit.Assert.assertEquals ( "Job subject entities before and after adding new entity" , ( ( entitybeforeSave.size ( ) ) + 1 ) , entityAfterSave.size ( ) ) ; }

Target:
public void saveJobSubjectEntity ( ) { java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.VdcObjectType > entitybeforeSave = dao.getJobSubjectEntityByJobId ( org.ovirt.engine.core.dao.JobSubjectEntityDaoTest.EXISTING_JOB_ID ) ; org.junit.Assert.assertTrue ( ( ! ( entitybeforeSave.isEmpty ( ) ) ) ) ; dao.save ( org.ovirt.engine.core.dao.JobSubjectEntityDaoTest.EXISTING_JOB_ID , org.ovirt.engine.core.compat.Guid.newGuid ( ) , VdcObjectType.VmPool ) ; java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.VdcObjectType > entityAfterSave = dao.getJobSubjectEntityByJobId ( org.ovirt.engine.core.dao.JobSubjectEntityDaoTest.EXISTING_JOB_ID ) ; org.junit.Assert.assertEquals ( "Job subject entities before and after adding new entity" , ( ( entitybeforeSave.size ( ) ) + 1 ) , entityAfterSave.size ( ) ) ; }
Source:
protected void copyVmDevices ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > devices = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmDevice > ( vmFromConfiguration.getVmUnamagedDeviceList ( ) ) ; devices.addAll ( vmFromConfiguration.getManagedVmDeviceMap ( ) . values ( ) ) ; org.ovirt.engine.core.bll.utils.VmDeviceUtils.copyVmDevices ( getVmIdFromSnapshot ( ) , org.ovirt.engine.core.bll.AddVmFromSnapshotCommand.getVmId ( ) , vmFromConfiguration , vmFromConfiguration.getStaticData ( ) , true , devices , newDiskImages , _vmInterfaces ) ; }

Target:
protected void copyVmDevices ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > devices = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmDevice > ( vmFromConfiguration.getVmUnamagedDeviceList ( ) ) ; devices.addAll ( vmFromConfiguration.getManagedVmDeviceMap ( ) . values ( ) ) ; org.ovirt.engine.core.bll.utils.VmDeviceUtils.copyVmDevices ( getVmIdFromSnapshot ( ) , org.ovirt.engine.core.bll.AddVmFromSnapshotCommand.getVmId ( ) , vmFromConfiguration , vmFromConfiguration.getStaticData ( ) , true , devices , newDiskImages , _vmInterfaces , org.ovirt.engine.core.bll.AddVmFromSnapshotCommand.getParameters ( ) . isSoundDeviceEnabled ( ) ) ; }
Source:
public static void getTemplateById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid templateId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVmTemplate , new org.ovirt.engine.core.common.queries.GetVmTemplateParameters ( templateId ) , aQuery ) ; }

Target:
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.getInstance ( ) . runQuery ( VdcQueryType.GetDomainList , tempVar , aQuery ) ; }
Source:
protected void executeVmCommand ( ) { try { org.ovirt.engine.core.common.vdscommands.VDSReturnValue retValue = runVdsCommand ( ) ; if ( retValue.getSucceeded ( ) ) { getVdsManager ( ) . addV2VJobInfoForVm ( org.ovirt.engine.core.bll.ConvertVmCommand.getVmId ( ) , JobStatus.WAIT_FOR_START ) ; org.ovirt.engine.core.bll.ConvertVmCommand.setSucceeded ( true ) ; } else { org.ovirt.engine.core.bll.ConvertVmCommand.log.error ( "Failed to convert VM" ) ; setCommandStatus ( CommandStatus.FAILED ) ; } } catch ( org.ovirt.engine.core.common.errors.EngineException e ) { org.ovirt.engine.core.bll.ConvertVmCommand.log.error ( "Failed to convert VM" , e ) ; setCommandStatus ( CommandStatus.FAILED ) ; } }

Target:
protected void executeVmCommand ( ) { try { org.ovirt.engine.core.common.vdscommands.VDSReturnValue retValue = runVdsCommand ( ) ; if ( retValue.getSucceeded ( ) ) { monitorV2VJob ( JobStatus.WAIT_FOR_START ) ; org.ovirt.engine.core.bll.ConvertVmCommand.setSucceeded ( true ) ; } else { org.ovirt.engine.core.bll.ConvertVmCommand.log.error ( "Failed to convert VM" ) ; setCommandStatus ( CommandStatus.FAILED ) ; } } catch ( org.ovirt.engine.core.common.errors.EngineException e ) { org.ovirt.engine.core.bll.ConvertVmCommand.log.error ( "Failed to convert VM" , e ) ; setCommandStatus ( CommandStatus.FAILED ) ; } }
Source:
public static void getDefaultSpmPriority ( 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 ( ) : 0 ; } } ; aQuery.asyncCallback.onSuccess ( aQuery.getModel ( ) , 5 ) ; }

Target:
public static void getExistingStorageDomainList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hostId , org.ovirt.engine.core.common.businessentities.StorageDomainType domainType , org.ovirt.engine.core.common.businessentities.StorageType storageType , java.lang.String path ) { 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 ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetExistingStorageDomainList , new org.ovirt.engine.core.common.queries.GetExistingStorageDomainListParameters ( hostId , storageType , domainType , path ) , aQuery ) ; }
Source:
public void testUpdate ( ) { existingTemplate.setdescription ( "This is an updated description" ) ; dao.update ( existingTemplate ) ; org.ovirt.engine.core.common.businessentities.VmTemplate result = dbFacade.getVmTemplateDAO ( ) . get ( existingTemplate.getId ( ) ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertEquals ( existingTemplate , result ) ; }

Target:
public void testUpdate ( ) { existingTemplate.setdescription ( "This is an updated description" ) ; dao.update ( existingTemplate ) ; org.ovirt.engine.core.common.businessentities.VmTemplate result = dbFacade.getVmTemplateDao ( ) . get ( existingTemplate.getId ( ) ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertEquals ( existingTemplate , result ) ; }
Source:
public void onLoginSuccess ( final java.lang.String userName , final java.lang.String password , final java.lang.String domain ) { com.google.gwt.core.client.Scheduler.get ( ) . scheduleDeferred ( new com.google.gwt.core.client.Scheduler.ScheduledCommand ( ) { @ java.lang.Override public void execute ( ) { final java.lang.String domainToken = "@" ; restApiSessionManager.acquireSession ( ( userName.contains ( domainToken ) ? userName : ( userName + domainToken ) + domain ) , password ) ; } } ) ; }

Target:
public void execute ( ) { frontend.runQuery ( VdcQueryType.GetEngineSessionIdToken , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , new org.ovirt.engine.ui.frontend.AsyncQuery ( new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { java.lang.String engineAuthToken = ( ( java.lang.String ) ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ) ) ; restApiSessionManager.acquireSession ( engineAuthToken ) ; } } ) ) ; }
Source:
public void sendMessage ( byte [ ] message ) { send ( new org.ovirt.vdsm.jsonrpc.client.reactors.stomp.impl.Message ( ) . send ( ) . withHeader ( org.ovirt.vdsm.jsonrpc.client.reactors.stomp.impl.Message.HEADER_DESTINATION , this . getRequestQueue ( ) ) . withHeader ( org.ovirt.vdsm.jsonrpc.client.reactors.stomp.impl.Message.HEADER_REPLY_TO , getResponseQueue ( ) ) . withContent ( message ) . build ( ) ) ; }

Target:
public void sendMessage ( byte [ ] message ) { send ( new org.ovirt.vdsm.jsonrpc.client.reactors.stomp.impl.Message ( ) . send ( ) . withHeader ( org.ovirt.vdsm.jsonrpc.client.reactors.stomp.impl.Message.HEADER_DESTINATION , this . getRequestQueue ( ) ) . withHeader ( org.ovirt.vdsm.jsonrpc.client.reactors.stomp.impl.Message.HEADER_REPLY_TO , getResponseQueue ( ) ) . withCorrelationId ( ) . withContent ( message ) . build ( ) ) ; }
Source:
public void refuseSoundDeviceOnPPC ( ) { org.ovirt.engine.core.bll.AddVmCommand < org.ovirt.engine.core.common.action.AddVmParameters > cmd = setupCanAddPpcTest ( ) ; cmd.getParameters ( ) . setSoundDeviceEnabled ( true ) ; org.mockito.Mockito.when ( osRepository.isSoundDeviceEnabled ( cmd.getParameters ( ) . getVm ( ) . getVmOsId ( ) , cmd.getVdsGroup ( ) . getCompatibilityVersion ( ) ) ) . thenReturn ( false ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( cmd , EngineMessage.SOUND_DEVICE_REQUESTED_ON_NOT_SUPPORTED_ARCH ) ; }

Target:
public void refuseBalloonOnPPC ( ) { org.ovirt.engine.core.bll.AddVmCommand < org.ovirt.engine.core.common.action.AddVmParameters > cmd = setupCanAddPpcTest ( ) ; cmd.getParameters ( ) . setBalloonEnabled ( true ) ; org.mockito.Mockito.when ( osRepository.isBalloonEnabled ( cmd.getParameters ( ) . getVm ( ) . getVmOsId ( ) , cmd.getCluster ( ) . getCompatibilityVersion ( ) ) ) . thenReturn ( false ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( cmd , EngineMessage.BALLOON_REQUESTED_ON_NOT_SUPPORTED_ARCH ) ; }
Source:
public void testNoAffinityGroups ( ) { hosts = java.util.Arrays.asList ( host_positive_enforcing , host_negative_enforcing , host_not_in_affinity_group ) ; java.util.List < org.ovirt.engine.core.common.scheduling.AffinityGroup > affinityGroups = new java.util.ArrayList < > ( ) ; org.mockito.Mockito.doReturn ( affinityGroups ) . when ( affinityGroupDao ) . getAllAffinityGroupsByVmId ( org.mockito.Matchers.any ( ) ) ; org.assertj.core.api.Assertions.assertThat ( unit.filter ( cluster , hosts , vm , new java.util.HashMap < > ( ) , new org.ovirt.engine.core.common.scheduling.PerHostMessages ( ) ) ) . contains ( host_positive_enforcing , host_negative_enforcing , host_not_in_affinity_group ) ; }

Target:
public void testNoAffinityGroups ( ) { hosts = java.util.Arrays.asList ( host_positive_enforcing , host_negative_enforcing , host_not_in_affinity_group ) ; java.util.List < org.ovirt.engine.core.common.scheduling.AffinityGroup > affinityGroups = new java.util.ArrayList < > ( ) ; org.mockito.Mockito.doReturn ( affinityGroups ) . when ( affinityGroupDao ) . getAllAffinityGroupsByVmId ( org.mockito.ArgumentMatchers.any ( ) ) ; org.assertj.core.api.Assertions.assertThat ( unit.filter ( cluster , hosts , vm , new java.util.HashMap < > ( ) , new org.ovirt.engine.core.common.scheduling.PerHostMessages ( ) ) ) . contains ( host_positive_enforcing , host_negative_enforcing , host_not_in_affinity_group ) ; }
Source:
protected void verifyModel ( org.ovirt.engine.api.model.Role model , int index ) { super . verifyModel ( model , index ) ; org.junit.Assert.assertTrue ( model.isSetUser ( ) ) ; org.junit.Assert.assertTrue ( model.getUser ( ) . isSetId ( ) ) ; org.junit.Assert.assertEquals ( GUIDS [ 1 ] . toString ( ) , model.getUser ( ) . getId ( ) ) ; }

Target:
protected void verifyModel ( org.ovirt.engine.api.model.Role model , int index ) { super . verifyModel ( model , index ) ; org.junit.jupiter.api.Assertions.assertTrue ( model.isSetUser ( ) ) ; org.junit.jupiter.api.Assertions.assertTrue ( model.getUser ( ) . isSetId ( ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( GUIDS [ 1 ] . toString ( ) , model.getUser ( ) . getId ( ) ) ; }
Source:
public void getUnusedBricksFromServer ( org.ovirt.engine.ui.frontend.AsyncQuery asyncQuery , org.ovirt.engine.core.compat.Guid hostId ) { asyncQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.core.common.queries.IdQueryParameters parameters = new org.ovirt.engine.core.common.queries.IdQueryParameters ( hostId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetUnusedGlusterBricks , parameters , asyncQuery ) ; }

Target:
public void getUnusedBricksFromServer ( org.ovirt.engine.ui.frontend.AsyncQuery < java.util.List < org.ovirt.engine.core.common.businessentities.gluster.StorageDevice > > asyncQuery , org.ovirt.engine.core.compat.Guid hostId ) { asyncQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.CastingConverter < > ( ) ; org.ovirt.engine.core.common.queries.IdQueryParameters parameters = new org.ovirt.engine.core.common.queries.IdQueryParameters ( hostId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetUnusedGlusterBricks , parameters , asyncQuery ) ; }
Source:
private void logAlert ( org.ovirt.engine.core.common.businessentities.VDS host , java.lang.Double percents ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase auditLogable = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; auditLogable.addCustomValue ( "Percents" , percents.toString ( ) ) ; auditLogable.setVdsId ( host.getId ( ) ) ; org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.log ( auditLogable , AuditLogType.VDS_ALERT_FENCE_OPERATION_SKIPPED_BROKEN_CONNECTIVITY ) ; }

Target:
private void logAlert ( org.ovirt.engine.core.common.businessentities.VDS host , java.lang.Double percents ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase auditLogable = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; auditLogable.addCustomValue ( "Percents" , percents.toString ( ) ) ; auditLogable.setVdsId ( host.getId ( ) ) ; auditLogable.setRepeatable ( true ) ; org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.log ( auditLogable , AuditLogType.VDS_ALERT_FENCE_OPERATION_SKIPPED_BROKEN_CONNECTIVITY ) ; }
Source:
public void testActivateNic ( ) throws java.lang.Exception { org.ovirt.engine.api.restapi.resource.BackendVmNicResource backendVmNicResource = ( ( org.ovirt.engine.api.restapi.resource.BackendVmNicResource ) ( resource ) ) ; setUpGetEntityExpectations ( 4 ) ; setGetVmQueryExpectations ( 4 ) ; setGetNetworksQueryExpectations ( 4 ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.UpdateVmInterface , org.ovirt.engine.core.common.action.AddVmInterfaceParameters.class , new java.lang.String [ ] { "VmId" , "Interface.Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.AbstractBackendNicsResourceTest.PARENT_ID , GUIDS [ 1 ] } ) ) ; verifyActionResponse ( backendVmNicResource.activate ( new org.ovirt.engine.api.model.Action ( ) ) ) ; }

Target:
public void testActivateNic ( ) throws java.lang.Exception { org.ovirt.engine.api.restapi.resource.BackendVmNicResource backendVmNicResource = ( ( org.ovirt.engine.api.restapi.resource.BackendVmNicResource ) ( resource ) ) ; setUpGetEntityExpectations ( 4 ) ; setGetVmQueryExpectations ( 4 ) ; setGetNetworksQueryExpectations ( 4 ) ; setGetGuestAgentQueryExpectations ( 3 ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.UpdateVmInterface , org.ovirt.engine.core.common.action.AddVmInterfaceParameters.class , new java.lang.String [ ] { "VmId" , "Interface.Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.AbstractBackendNicsResourceTest.PARENT_ID , GUIDS [ 1 ] } ) ) ; verifyActionResponse ( backendVmNicResource.activate ( new org.ovirt.engine.api.model.Action ( ) ) ) ; }