auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public static void GetStorageDomainById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storageDomainId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( org.ovirt.engine.core.common.businessentities.storage_domains ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetStorageDomainById , new org.ovirt.engine.core.common.queries.StorageDomainQueryParametersBase ( storageDomainId ) , aQuery ) ; }

Target:
public static void GetClusterNetworkList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllNetworksByClusterId , new org.ovirt.engine.core.common.queries.VdsGroupQueryParamenters ( clusterId ) , aQuery ) ; }
Source:
protected void executeQueryCommand ( ) { java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.bll.scheduling.PolicyUnitImpl > map = org.ovirt.engine.core.bll.scheduling.SchedulingManager.getInstance ( ) . getPolicyUnitsMap ( ) ; java.util.List < org.ovirt.engine.core.common.scheduling.PolicyUnit > retList = new java.util.ArrayList < org.ovirt.engine.core.common.scheduling.PolicyUnit > ( ) ; for ( org.ovirt.engine.core.bll.scheduling.PolicyUnitImpl policyUnitImpl : map.values ( ) ) { retList.add ( policyUnitImpl.getPolicyUnit ( ) ) ; } getQueryReturnValue ( ) . setReturnValue ( retList ) ; }

Target:
protected void executeQueryCommand ( ) { java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.bll.scheduling.PolicyUnitImpl > map = schedulingManager.getPolicyUnitsMap ( ) ; java.util.List < org.ovirt.engine.core.common.scheduling.PolicyUnit > retList = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.core.bll.scheduling.PolicyUnitImpl policyUnitImpl : map.values ( ) ) { retList.add ( policyUnitImpl.getPolicyUnit ( ) ) ; } getQueryReturnValue ( ) . setReturnValue ( retList ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.VMListReturnForXmlRpc list ( java.lang.String isFull , java.lang.String [ ] vmIds ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "Host.getVMFullList" ) . withOptionalParameterAsList ( "vmList" , new java.util.ArrayList < > ( java.util.Arrays.asList ( vmIds ) ) ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) . withResponseKey ( "vmList" ) . withResponseType ( java.lang.Object [ ] . class ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.VMListReturnForXmlRpc ( response ) ; }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.VMListReturn fullList ( java.util.List < java.lang.String > vmIds ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "Host.getVMFullList" ) . withOptionalParameterAsList ( "vmList" , vmIds ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) . withResponseKey ( "vmList" ) . withResponseType ( java.lang.Object [ ] . class ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.VMListReturn ( response ) ; }
Source:
private void verifyAllContent ( org.ovirt.engine.api.model.Snapshot model , org.ovirt.engine.api.model.ConfigurationType type , java.lang.String data ) { org.junit.Assert.assertNotNull ( model.getInitialization ( ) ) ; org.junit.Assert.assertNotNull ( model.getInitialization ( ) . getConfiguration ( ) ) ; org.junit.Assert.assertEquals ( data , model.getInitialization ( ) . getConfiguration ( ) . getData ( ) ) ; org.junit.Assert.assertEquals ( type , model.getInitialization ( ) . getConfiguration ( ) . getType ( ) ) ; }

Target:
private void verifyAllContent ( org.ovirt.engine.api.model.Snapshot model , org.ovirt.engine.api.model.ConfigurationType type , java.lang.String data ) { org.junit.jupiter.api.Assertions.assertNotNull ( model.getInitialization ( ) ) ; org.junit.jupiter.api.Assertions.assertNotNull ( model.getInitialization ( ) . getConfiguration ( ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( data , model.getInitialization ( ) . getConfiguration ( ) . getData ( ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( type , model.getInitialization ( ) . getConfiguration ( ) . getType ( ) ) ; }
Source:
protected boolean validateQuota ( ) { getParameters ( ) . setQuotaId ( org.ovirt.engine.core.bll.QuotaHelper.getInstance ( ) . getQuotaIdToConsume ( getVmTemplate ( ) . getQuotaId ( ) , getStoragePool ( ) ) ) ; for ( org.ovirt.engine.core.common.businessentities.DiskImage di : getParameters ( ) . getImages ( ) ) { di.setQuotaId ( org.ovirt.engine.core.bll.QuotaHelper.getInstance ( ) . getQuotaIdToConsume ( getVmTemplate ( ) . getQuotaId ( ) , getStoragePool ( ) ) ) ; } return true ; }

Target:
public java.util.Map < java.lang.String , java.lang.String > getJobMessageProperties ( ) { if ( ( jobProperties ) == null ) { jobProperties = super . getJobMessageProperties ( ) ; jobProperties.put ( VdcObjectType.VmTemplate.name ( ) . toLowerCase ( ) , ( ( getVmTemplateName ( ) ) == null ? "" : getVmTemplateName ( ) ) ) ; jobProperties.put ( VdcObjectType.Storage.name ( ) . toLowerCase ( ) , getStorageDomainName ( ) ) ; } return jobProperties ; }
Source:
public void getHostNumaTopologyByHostId ( 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 ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VdsNumaNode > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVdsNumaNodesByVdsId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( hostId ) , asyncQuery ) ; }

Target:
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.VdsIdParametersBase parameters = new org.ovirt.engine.core.common.queries.VdsIdParametersBase ( hostId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetUnusedGlusterBricks , parameters , asyncQuery ) ; }
Source:
private org.ovirt.engine.core.common.asynctasks.AsyncTaskType internalGetTaskType ( ) { if ( hasTaskHandlers ( ) ) { if ( ( getParameters ( ) . getExecutionReason ( ) ) == ( org.ovirt.engine.core.common.action.VdcActionParametersBase.CommandExecutionReason.REGULAR_FLOW ) ) { return getCurrentTaskHandler ( ) . getTaskType ( ) ; } return getCurrentTaskHandler ( ) . getRevertTaskType ( ) ; } return getTaskType ( ) ; }

Target:
protected org.ovirt.engine.core.utils.lock.EngineLock getLock ( ) { return context.getLock ( ) ; }
Source:
private org.ovirt.engine.core.bll.hostdeploy.VdsMgmtPackages createPackagesManager ( final org.ovirt.engine.core.common.businessentities.VDS host , final boolean checkOnly ) throws java.security.KeyStoreException { final org.ovirt.engine.core.bll.hostdeploy.VdsMgmtPackages hostPackagesManager = new org.ovirt.engine.core.bll.hostdeploy.VdsMgmtPackages ( host , checkOnly ) ; java.lang.String correlationId = org.ovirt.engine.core.utils.CorrelationIdTracker.getCorrelationId ( ) ; if ( org.apache.commons.lang.StringUtils.isEmpty ( correlationId ) ) { correlationId = org.ovirt.engine.core.utils.log.LoggedUtils.getObjectId ( host ) ; } hostPackagesManager.setCorrelationId ( correlationId ) ; hostPackagesManager.useDefaultKeyPair ( ) ; return hostPackagesManager ; }

Target:
private org.ovirt.engine.core.bll.hostdeploy.VdsDeploy createPackagesManager ( final org.ovirt.engine.core.common.businessentities.VDS host , boolean alertLog ) throws java.security.KeyStoreException { final org.ovirt.engine.core.bll.hostdeploy.VdsDeploy hostPackagesManager = new org.ovirt.engine.core.bll.hostdeploy.VdsDeploy ( "ovirt-host-mgmt" , host , alertLog ) ; hostPackagesManager.useDefaultKeyPair ( ) ; hostPackagesManager.setCorrelationId ( org.ovirt.engine.core.utils.CorrelationIdTracker.getCorrelationId ( ) ) ; return hostPackagesManager ; }
Source:
public void getAllAttachableDisks ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.compat.Guid vmId ) { 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.Disk > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ( ) ; } } ; org.ovirt.engine.core.common.queries.GetAllAttachableDisks params = new org.ovirt.engine.core.common.queries.GetAllAttachableDisks ( storagePoolId ) ; params.setVmId ( vmId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllAttachableDisks , params , aQuery ) ; }

Target:
public void getManagementNetworkCandidates ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.ListAsyncConverter ( ) ; org.ovirt.engine.core.common.queries.IdQueryParameters params = new org.ovirt.engine.core.common.queries.IdQueryParameters ( storagePoolId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetManagementNetworkCandidates , params , aQuery ) ; }
Source:
public void edit ( org.ovirt.engine.ui.uicommonweb.models.providers.ProviderModel model ) { setAgentTabVisibility ( model.getNeutronAgentModel ( ) . isPluginConfigurationAvailable ( ) . getEntity ( ) ) ; driver.edit ( model ) ; neutronAgentWidget.edit ( model.getNeutronAgentModel ( ) ) ; vmwarePropertiesWidget.edit ( model.getVmwarePropertiesModel ( ) ) ; }

Target:
public void edit ( org.ovirt.engine.ui.uicommonweb.models.providers.ProviderModel model ) { setAgentTabVisibility ( model.getNeutronAgentModel ( ) . isPluginConfigurationAvailable ( ) . getEntity ( ) ) ; driver.edit ( model ) ; neutronAgentWidget.edit ( model.getNeutronAgentModel ( ) ) ; vmwarePropertiesWidget.edit ( model.getVmwarePropertiesModel ( ) ) ; kvmPropertiesWidget.edit ( model.getKvmPropertiesModel ( ) ) ; }
Source:
protected void initConnectionList ( boolean includeInactiveDomains ) { java.util.Set < org.ovirt.engine.core.common.businessentities.StorageDomainStatus > statuses ; statuses = ( includeInactiveDomains ) ? java.util.EnumSet.of ( StorageDomainStatus.Active , StorageDomainStatus.Unknown , StorageDomainStatus.Inactive ) : java.util.EnumSet.of ( StorageDomainStatus.Active , StorageDomainStatus.Unknown ) ; _connections = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStorageServerConnectionDao ( ) . getStorageConnectionsByStorageTypeAndStatus ( org.ovirt.engine.core.bll.storage.ConnectHostToStoragePoolServerCommandBase.getStoragePool ( ) . getId ( ) , null , statuses ) ; updateConnectionsTypeMap ( ) ; }

Target:
protected void initConnectionList ( boolean includeInactiveDomains ) { java.util.Set < org.ovirt.engine.core.common.businessentities.StorageDomainStatus > statuses ; statuses = ( includeInactiveDomains ) ? java.util.EnumSet.of ( StorageDomainStatus.Active , StorageDomainStatus.Unknown , StorageDomainStatus.Inactive ) : java.util.EnumSet.of ( StorageDomainStatus.Active , StorageDomainStatus.Unknown ) ; _connections = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStorageServerConnectionDao ( ) . getStorageConnectionsByStorageTypeAndStatus ( org.ovirt.engine.core.bll.storage.ConnectHostToStoragePoolServerCommandBase.getStoragePool ( ) . getId ( ) , null , statuses ) ; updateConnectionsTypeMap ( ) ; updateConnectionMapForFiberChannel ( statuses ) ; }
Source:
private java.util.List < org.ovirt.engine.core.common.businessentities.network.ReportedConfiguration > createNetworkOutOfSyncPanelParameters ( org.ovirt.engine.ui.uicommonweb.models.hosts.network.LogicalNetworkModel networkModel ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.ReportedConfiguration > reportedUnSyncConfigurationList = filterSyncProperties ( networkModel ) ; return reportedUnSyncConfigurationList ; }

Target:
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 ) ; }
Source:
protected boolean canDoAction ( ) { java.util.List < java.lang.String > canDoActionMessages = getReturnValue ( ) . getCanDoActionMessages ( ) ; java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.storage_domains > domainsMap = new java.util.HashMap < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.storage_domains > ( ) ; if ( ! ( canDoActionBeforeCloneVm ( canDoActionMessages , domainsMap ) ) ) { return failCanDoActionWithType ( ) ; } if ( getParameters ( ) . isImportAsNewEntity ( ) ) { initImportClonedVm ( ) ; } if ( ! ( canDoActionAfterCloneVm ( canDoActionMessages , domainsMap ) ) ) { return failCanDoActionWithType ( ) ; } return true ; }

Target:
protected java.util.List < org.ovirt.engine.core.common.businessentities.VM > getVmsFromExportDomain ( ) { org.ovirt.engine.core.common.queries.GetAllFromExportDomainQueryParameters p = new org.ovirt.engine.core.common.queries.GetAllFromExportDomainQueryParameters ( getParameters ( ) . getStoragePoolId ( ) , getParameters ( ) . getSourceDomainId ( ) ) ; org.ovirt.engine.core.common.queries.VdcQueryReturnValue qRetVal = getBackend ( ) . runInternalQuery ( VdcQueryType.GetVmsFromExportDomain , p ) ; if ( ! ( qRetVal.getSucceeded ( ) ) ) { return null ; } return ( ( java.util.List < org.ovirt.engine.core.common.businessentities.VM > ) ( qRetVal.getReturnValue ( ) ) ) ; }
Source:
public void testFetchSpecificQuotaUsageForGlobalVdsGroup ( ) throws java.lang.Exception { java.util.List < org.ovirt.engine.core.common.businessentities.QuotaVdsGroup > quotaVdsGroupList = dao.getQuotaVdsGroupByVdsGroupGuid ( null , FixturesTool.QUOTA_SPECIFIC ) ; org.ovirt.engine.core.common.businessentities.QuotaVdsGroup quotaVdsGroup = quotaVdsGroupList.get ( 0 ) ; org.junit.Assert.assertEquals ( true , ( ( quotaVdsGroupList.size ( ) ) == 2 ) ) ; org.junit.Assert.assertNotNull ( quotaVdsGroup ) ; }

Target:
public void testFetchSpecificQuotaUsageForGlobalCluster ( ) throws java.lang.Exception { java.util.List < org.ovirt.engine.core.common.businessentities.QuotaCluster > quotaClusterList = dao.getQuotaClusterByClusterGuid ( null , FixturesTool.QUOTA_SPECIFIC ) ; org.ovirt.engine.core.common.businessentities.QuotaCluster quotaCluster = quotaClusterList.get ( 0 ) ; org.junit.Assert.assertEquals ( true , ( ( quotaClusterList.size ( ) ) == 2 ) ) ; org.junit.Assert.assertNotNull ( quotaCluster ) ; }
Source:
public void testGetVmNumaNodeInfoByBdsGroupId ( ) { org.ovirt.engine.core.compat.Guid vdsGroupId = FixturesTool.CLUSTER ; org.ovirt.engine.core.compat.Guid vmId = FixturesTool.VM_RHEL5_POOL_50 ; java.util.Map < org.ovirt.engine.core.compat.Guid , java.util.List < org.ovirt.engine.core.common.businessentities.VmNumaNode > > result = dao.getVmNumaNodeInfoByClusterId ( vdsGroupId ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertEquals ( 1 , result.size ( ) ) ; org.junit.Assert.assertEquals ( 2 , result.get ( vmId ) . size ( ) ) ; }

Target:
public void testGetVmNumaNodeInfoByBdsGroupId ( ) { org.ovirt.engine.core.compat.Guid vdsGroupId = FixturesTool.CLUSTER ; org.ovirt.engine.core.compat.Guid vmId = FixturesTool.VM_RHEL5_POOL_50 ; java.util.Map < org.ovirt.engine.core.compat.Guid , java.util.List < org.ovirt.engine.core.common.businessentities.VmNumaNode > > result = dao.getVmNumaNodeInfoByClusterId ( vdsGroupId ) ; org.junit.jupiter.api.Assertions.assertNotNull ( result ) ; org.junit.jupiter.api.Assertions.assertEquals ( 1 , result.size ( ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( 2 , result.get ( vmId ) . size ( ) ) ; }
Source:
public void testValidModifiedBondsFailsWhenSlavesValidationFails ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.Bond bond = new org.ovirt.engine.core.common.businessentities.network.Bond ( ) ; bond.setName ( "bond0" ) ; bond.setSlaves ( java.util.Arrays.asList ( "slaveA" , "slaveB" ) ) ; doTestValidModifiedBonds ( bond , ValidationResult.VALID , ValidationResult.VALID , null , false , false ) ; }

Target:
public void testValidModifiedBondsFailsWhenSlavesValidationFails ( ) throws java.lang.Exception { org.ovirt.engine.core.bll.ValidationResult slavesValidationResult = new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.NETWORK_INTERFACE_ATTACHED_TO_NETWORK_CANNOT_BE_SLAVE , org.ovirt.engine.core.utils.ReplacementUtils.createSetVariableString ( HostSetupNetworksValidator.NETWORK_INTERFACE_ATTACHED_TO_NETWORK_CANNOT_BE_SLAVE_ENTITY , "slaveA" ) , org.ovirt.engine.core.utils.ReplacementUtils.createSetVariableString ( HostSetupNetworksValidator.VAR_NETWORK_NAME , "networkName" ) ) ; org.ovirt.engine.core.common.businessentities.network.Bond bond = createBond ( ) ; bond.setSlaves ( java.util.Arrays.asList ( "slaveA" , "slaveB" ) ) ; doTestValidModifiedBonds ( bond , ValidationResult.VALID , ValidationResult.VALID , slavesValidationResult , slavesValidationResult ) ; }
Source:
private java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > applyUserConfiguredNics ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > userConfiguredNics = new java.util.ArrayList < > ( ) ; userConfiguredNics.addAll ( org.ovirt.engine.core.bll.network.host.HostSetupNetworksCommand.getParameters ( ) . getBonds ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface existingBondToRemove : getRemovedBonds ( ) ) { existingBondToRemove.setLabels ( null ) ; userConfiguredNics.add ( existingBondToRemove ) ; } return userConfiguredNics ; }

Target:
private void clearLabelsFromRemovedBonds ( java.util.Map < java.lang.String , org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > nicsToConfigureByName ) { for ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface existingBondToRemove : getRemovedBonds ( ) ) { nicsToConfigureByName.get ( existingBondToRemove.getName ( ) ) . setLabels ( null ) ; } }
Source:
public void testGetAllForVmNic ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.VmNicFilterParameter > result = dao.getAllForVmNic ( FixturesTool.VM_NETWORK_INTERFACE ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertEquals ( FixturesTool.NUMBER_OF_VM_NETWORK_FILTER_PARAMETERS_OF_VM_NETWORK_INTERFACE , result.size ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.network.VmNicFilterParameter parameter : result ) { org.junit.Assert.assertEquals ( FixturesTool.VM_NETWORK_INTERFACE , parameter.getVmInterfaceId ( ) ) ; } }

Target:
public void testGetAllForVmNic ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.VmNicFilterParameter > result = dao.getAllForVmNic ( FixturesTool.VM_NETWORK_INTERFACE ) ; org.junit.jupiter.api.Assertions.assertNotNull ( result ) ; org.junit.jupiter.api.Assertions.assertEquals ( FixturesTool.NUMBER_OF_VM_NETWORK_FILTER_PARAMETERS_OF_VM_NETWORK_INTERFACE , result.size ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.network.VmNicFilterParameter parameter : result ) { org.junit.jupiter.api.Assertions.assertEquals ( FixturesTool.VM_NETWORK_INTERFACE , parameter.getVmInterfaceId ( ) ) ; } }
Source:
private boolean isTemplateInDestStorageDomain ( org.ovirt.engine.core.compat.Guid imageId , org.ovirt.engine.core.compat.Guid sourceDomainId ) { org.ovirt.engine.core.compat.Guid templateId = getDiskImageById ( imageId ) . getit_guid ( ) ; if ( ! ( Guid.Empty.equals ( templateId ) ) ) { org.ovirt.engine.core.common.businessentities.DiskImage templateImage = getDiskImageDao ( ) . get ( templateId ) ; if ( ! ( templateImage.getstorage_ids ( ) . contains ( sourceDomainId ) ) ) { return failCanDoAction ( VdcBllMessages.ACTION_TYPE_FAILED_TEMPLATE_NOT_FOUND_ON_DESTINATION_DOMAIN ) ; } } return true ; }

Target:
private boolean isTemplateInDestStorageDomain ( org.ovirt.engine.core.compat.Guid imageId , org.ovirt.engine.core.compat.Guid sourceDomainId ) { org.ovirt.engine.core.compat.Guid templateId = getDiskImageById ( imageId ) . getImageTemplateId ( ) ; if ( ! ( Guid.Empty.equals ( templateId ) ) ) { org.ovirt.engine.core.common.businessentities.DiskImage templateImage = getDiskImageDao ( ) . get ( templateId ) ; if ( ! ( templateImage.getStorageIds ( ) . contains ( sourceDomainId ) ) ) { return failCanDoAction ( VdcBllMessages.ACTION_TYPE_FAILED_TEMPLATE_NOT_FOUND_ON_DESTINATION_DOMAIN ) ; } } return true ; }
Source:
public void testDetachFailure ( ) { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpGetEntityExpectations ( ) ; setUpActionExpectations ( ActionType.DetachStorageConnectionFromStorageDomain , org.ovirt.engine.core.common.action.AttachDetachStorageConnectionParameters.class , new java.lang.String [ ] { } , new java.lang.Object [ ] { } , false , false ) ; try { javax.ws.rs.core.Response response = resource.remove ( ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyBadRequest ( wae ) ; } }

Target:
public void testDetachFailure ( ) { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpGetEntityExpectations ( ) ; setUpActionExpectations ( ActionType.DetachStorageConnectionFromStorageDomain , org.ovirt.engine.core.common.action.AttachDetachStorageConnectionParameters.class , new java.lang.String [ ] { } , new java.lang.Object [ ] { } , false , false ) ; verifyBadRequest ( org.junit.jupiter.api.Assertions.assertThrows ( javax.ws.rs.WebApplicationException.class , ( ) -> org.ovirt.engine.api.restapi.resource.resource.remove ( ) ) ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity getBrick ( org.ovirt.engine.core.compat.Guid volumeId ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity brick = new org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity ( volumeId , new org.ovirt.engine.core.common.businessentities.VdsStatic ( serverName , "127.0.0.1" , "0934390834" , 20 , new org.ovirt.engine.core.compat.Guid ( ) , serverId , serverName , true , org.ovirt.engine.core.common.businessentities.VDSType.oVirtNode ) , org.ovirt.engine.core.bll.gluster.AddBricksToGlusterVolumeCommandTest.BRICK_DIRECTORY , org.ovirt.engine.core.common.businessentities.gluster.GlusterStatus.UP ) ; return brick ; }

Target:
private org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity getBrick ( org.ovirt.engine.core.compat.Guid volumeId ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity brick = new org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity ( volumeId , new org.ovirt.engine.core.common.businessentities.VdsStatic ( serverName , "127.0.0.1" , "0934390834" , 20 , org.ovirt.engine.core.compat.Guid.newGuid ( ) , serverId , serverName , true , org.ovirt.engine.core.common.businessentities.VDSType.oVirtNode ) , org.ovirt.engine.core.bll.gluster.AddBricksToGlusterVolumeCommandTest.BRICK_DIRECTORY , org.ovirt.engine.core.common.businessentities.gluster.GlusterStatus.UP ) ; return brick ; }
Source:
public void testGetStorageDomainWithNoStatus ( ) { org.ovirt.engine.core.common.businessentities.StorageDomain result = dao.getStorageDomain ( FixturesTool.STORAGE_POOL_NFS_INACTIVE_ISO , StorageDomainType.ISO , null ) ; org.junit.Assert.assertEquals ( FixturesTool.STORAGE_DOMAIN_NFS_INACTIVE_ISO , result.getId ( ) ) ; }

Target:
public void testGetStorageDomainWithNoStatus ( ) { org.ovirt.engine.core.common.businessentities.StorageDomain result = dao.getStorageDomain ( FixturesTool.STORAGE_POOL_NFS_INACTIVE_ISO , StorageDomainType.ISO , null ) ; org.junit.Assert.assertEquals ( FixturesTool.STORAGE_DOMAIN_NFS_INACTIVE_ISO , result.getId ( ) ) ; org.junit.Assert.assertEquals ( "Wrong committed disk size" , 0 , result.getCommittedDiskSize ( ) ) ; org.junit.Assert.assertEquals ( "Wrong actual disk size" , 0 , result.getActualImagesSize ( ) ) ; }
Source:
public void testGetAllUsersWithPermissionsOnEntity ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.Permission > result = dao.getAllForEntity ( org.ovirt.engine.core.dao.PermissionDaoTest.VM_ENTITY_ID , FixturesTool.PRIVILEGED_SESSION_ID , true , true ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertEquals ( 2 , result.size ( ) ) ; org.ovirt.engine.core.dao.PermissionDaoTest.assertGetAllForEntityResult ( result ) ; }

Target:
public void testGetAllUsersWithPermissionsOnEntity ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.Permission > result = dao.getAllForEntity ( org.ovirt.engine.core.dao.PermissionDaoTest.VM_ENTITY_ID , FixturesTool.PRIVILEGED_SESSION_ID , true , true ) ; org.junit.jupiter.api.Assertions.assertNotNull ( result ) ; org.junit.jupiter.api.Assertions.assertEquals ( 2 , result.size ( ) ) ; org.ovirt.engine.core.dao.PermissionDaoTest.assertGetAllForEntityResult ( result ) ; }
Source:
public void bootProtocolChangedOverBond ( ) { org.ovirt.engine.core.common.businessentities.network.Network net = createNetwork ( "net" ) ; mockExistingNetworks ( net ) ; org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface bond = createBond ( org.ovirt.engine.core.bll.network.host.SetupNetworksHelperTest.BOND_NAME , net.getName ( ) ) ; bond.setBootProtocol ( NetworkBootProtocol.None ) ; java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > slaves = createNics ( bond.getName ( ) ) ; mockExistingIfacesWithBond ( bond , slaves ) ; bond.setBootProtocol ( NetworkBootProtocol.Dhcp ) ; org.ovirt.engine.core.bll.network.host.SetupNetworksHelper helper = createHelper ( createParametersForBond ( bond , slaves ) ) ; validateAndAssertNetworkModified ( helper , net ) ; }

Target:
public void bootProtocolChangedOverBond ( ) { org.ovirt.engine.core.common.businessentities.network.Network net = createNetwork ( "net" ) ; mockExistingNetworks ( net ) ; org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface bond = createBond ( org.ovirt.engine.core.bll.network.host.SetupNetworksHelperTest.BOND_NAME , net.getName ( ) ) ; bond.setBootProtocol ( NetworkBootProtocol.NONE ) ; java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > slaves = createNics ( bond.getName ( ) ) ; mockExistingIfacesWithBond ( bond , slaves ) ; bond.setBootProtocol ( NetworkBootProtocol.DHCP ) ; org.ovirt.engine.core.bll.network.host.SetupNetworksHelper helper = createHelper ( createParametersForBond ( bond , slaves ) ) ; validateAndAssertNetworkModified ( helper , net ) ; }
Source:
private boolean isVnicProfilePermitted ( org.ovirt.engine.core.compat.Guid userId , org.ovirt.engine.core.common.businessentities.network.VnicProfile profile , org.ovirt.engine.core.common.businessentities.ActionGroup actionGroup ) { return ( getPermissionDAO ( ) . getEntityPermissions ( userId , actionGroup , profile.getId ( ) , VdcObjectType.VnicProfile ) ) != null ; }

Target:
private boolean isVnicProfilePermitted ( org.ovirt.engine.core.compat.Guid userId , org.ovirt.engine.core.common.businessentities.network.VnicProfile profile , boolean portMirroring ) { return ( portMirroring == ( profile.isPortMirroring ( ) ) ) && ( ( getPermissionDAO ( ) . getEntityPermissions ( userId , ActionGroup.CONFIGURE_VM_NETWORK , profile.getId ( ) , VdcObjectType.VnicProfile ) ) != null ) ; }
Source:
private static org.ovirt.engine.core.common.businessentities.DiskImage createImage ( ) { final org.ovirt.engine.core.common.businessentities.DiskImage diskImage = new org.ovirt.engine.core.common.businessentities.DiskImage ( ) ; diskImage.setimage_group_id ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) ) ; diskImage.setstorage_ids ( new java.util.ArrayList < org.ovirt.engine.core.compat.Guid > ( java.util.Arrays.asList ( new org.ovirt.engine.core.compat.Guid ( ) ) ) ) ; return diskImage ; }

Target:
private static org.ovirt.engine.core.common.businessentities.VmDevice createDiskVmDevice ( final org.ovirt.engine.core.common.businessentities.DiskImage diskImage ) { final org.ovirt.engine.core.common.businessentities.VmDevice vmDevice = new org.ovirt.engine.core.common.businessentities.VmDevice ( ) ; vmDevice.setIsPlugged ( true ) ; vmDevice.setId ( new org.ovirt.engine.core.common.businessentities.VmDeviceId ( diskImage.getId ( ) , org.ovirt.engine.core.compat.Guid.NewGuid ( ) ) ) ; return vmDevice ; }
Source:
public static synchronized java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmOsType > getWindowsOsTypes ( ) { if ( ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.windowsOsTypes ) != null ) { return org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.windowsOsTypes ; } org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.windowsOsTypes = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmOsType > ( ) ; for ( org.ovirt.engine.core.common.businessentities.VmOsType type : org.ovirt.engine.core.common.businessentities.VmOsType.values ( ) ) { if ( type.isWindows ( ) ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.windowsOsTypes.add ( type ) ; } } return org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.windowsOsTypes ; }

Target:
public static boolean isLinuxOsType ( java.lang.Integer osId ) { if ( osId == null ) { return false ; } return org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.linuxOsIds.contains ( osId ) ; }
Source:
public void testLogEntryLogsWhenLogLevelActive ( ) throws java.lang.Exception { java.lang.String id = "" ; org.slf4j.Logger log = org.mockito.Mockito.mock ( org.slf4j.Logger.class ) ; org.mockito.Mockito.when ( log.isDebugEnabled ( ) ) . thenReturn ( true ) ; org.ovirt.engine.core.utils.log.LoggedUtils.logEntry ( log , id , new org.ovirt.engine.core.utils.log.LoggedUtilsTest.LoggedOverridingSubclass ( ) ) ; org.mockito.Mockito.verify ( log ) . debug ( org.mockito.Matchers.eq ( LoggedUtils.ENTRY_LOG ) , new java.lang.Object [ ] { org.mockito.Matchers.anyObject ( ) , org.mockito.Matchers.eq ( id ) } ) ; }

Target:
public void testLogEntryLogsWhenLogLevelActive ( ) throws java.lang.Exception { java.lang.String id = "" ; org.slf4j.Logger log = org.mockito.Mockito.mock ( org.slf4j.Logger.class ) ; org.mockito.Mockito.when ( log.isDebugEnabled ( ) ) . thenReturn ( true ) ; org.ovirt.engine.core.utils.log.LoggedUtils.logEntry ( log , id , new org.ovirt.engine.core.utils.log.LoggedUtilsTest.LoggedOverridingSubclass ( ) ) ; org.mockito.Mockito.verify ( log ) . debug ( org.mockito.ArgumentMatchers.eq ( LoggedUtils.ENTRY_LOG ) , new java.lang.Object [ ] { org.mockito.ArgumentMatchers.anyObject ( ) , org.mockito.ArgumentMatchers.eq ( id ) } ) ; }
Source:
private void initializeItems ( ) { java.util.List < org.ovirt.engine.ui.uicommonweb.models.storage.IStorageModel > items = org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getIsoStorageModels ( ) ; items.addAll ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getExportStorageModels ( ) ) ; items.addAll ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getFileDataStorageModels ( ) ) ; items.addAll ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getImportBlockDataStorageModels ( ) ) ; getModel ( ) . setItems ( items ) ; }

Target:
private void initializeItems ( ) { java.util.List < org.ovirt.engine.ui.uicommonweb.models.storage.IStorageModel > items = org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getFileDataStorageModels ( ) ; items.addAll ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getImportBlockDataStorageModels ( ) ) ; items.addAll ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getIsoStorageModels ( ) ) ; items.addAll ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getExportStorageModels ( ) ) ; getModel ( ) . setStorageModels ( items ) ; }
Source:
public static org.ovirt.engine.core.common.businessentities.StoragePool buildStoragePool ( java.util.Map < java.lang.String , java.lang.Object > xmlRpcStruct ) { org.ovirt.engine.core.common.businessentities.StoragePool sPool = new org.ovirt.engine.core.common.businessentities.StoragePool ( ) ; if ( xmlRpcStruct.containsKey ( "type" ) ) { sPool.setstorage_pool_type ( org.ovirt.engine.core.common.businessentities.StorageType.valueOf ( xmlRpcStruct.get ( "type" ) . toString ( ) ) ) ; } sPool.setname ( org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectsBuilder.AssignStringValue ( xmlRpcStruct , "name" ) ) ; java.lang.Integer masterVersion = org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectsBuilder.AssignIntValue ( xmlRpcStruct , "master_ver" ) ; if ( masterVersion != null ) { sPool.setmaster_domain_version ( masterVersion ) ; } return sPool ; }

Target:
public static org.ovirt.engine.core.common.businessentities.StoragePool buildStoragePool ( java.util.Map < java.lang.String , java.lang.Object > xmlRpcStruct ) { org.ovirt.engine.core.common.businessentities.StoragePool sPool = new org.ovirt.engine.core.common.businessentities.StoragePool ( ) ; if ( xmlRpcStruct.containsKey ( "type" ) ) { sPool.setstorage_pool_type ( org.ovirt.engine.core.common.businessentities.StorageType.valueOf ( xmlRpcStruct.get ( "type" ) . toString ( ) ) ) ; } sPool.setName ( org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectsBuilder.AssignStringValue ( xmlRpcStruct , "name" ) ) ; java.lang.Integer masterVersion = org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectsBuilder.AssignIntValue ( xmlRpcStruct , "master_ver" ) ; if ( masterVersion != null ) { sPool.setmaster_domain_version ( masterVersion ) ; } return sPool ; }
Source:
public java.util.Map < java.lang.String , java.lang.String > getJobMessageProperties ( ) { if ( ( jobProperties ) == null ) { jobProperties = super . getJobMessageProperties ( ) ; jobProperties.put ( VdcObjectType.VM.name ( ) . toLowerCase ( ) , ( ( getVmName ( ) ) == null ? "" : getVmName ( ) ) ) ; jobProperties.put ( VdcObjectType.VdsGroups.name ( ) . toLowerCase ( ) , getVdsGroupName ( ) ) ; } return jobProperties ; }

Target:
private void addVmDynamic ( ) { org.ovirt.engine.core.common.businessentities.VmDynamic tempVar = new org.ovirt.engine.core.common.businessentities.VmDynamic ( ) ; tempVar.setId ( getVmId ( ) ) ; tempVar.setStatus ( VMStatus.ImageLocked ) ; tempVar.setVmHost ( "" ) ; tempVar.setVmIp ( "" ) ; tempVar.setAppList ( getParameters ( ) . getVm ( ) . getDynamicData ( ) . getAppList ( ) ) ; org.ovirt.engine.core.bll.ImportVmCommand.getVmDynamicDAO ( ) . save ( tempVar ) ; org.ovirt.engine.core.bll.ImportVmCommand.getCompensationContext ( ) . snapshotNewEntity ( tempVar ) ; }
Source:
private void addStyles ( ) { optimizationNoneEditor.setContentWidgetStyleName ( style.fullWidth ( ) ) ; optimizationForServerEditor.setContentWidgetStyleName ( style.fullWidth ( ) ) ; optimizationForDesktopEditor.setContentWidgetStyleName ( style.fullWidth ( ) ) ; optimizationCustomEditor.setContentWidgetStyleName ( style.fullWidth ( ) ) ; countThreadsAsCoresEditor.setContentWidgetStyleName ( style.fullWidth ( ) ) ; }

Target:
private void addStyles ( ) { optimizationNoneEditor.setContentWidgetContainerStyleName ( style.fullWidth ( ) ) ; optimizationForServerEditor.setContentWidgetContainerStyleName ( style.fullWidth ( ) ) ; optimizationForDesktopEditor.setContentWidgetContainerStyleName ( style.fullWidth ( ) ) ; optimizationCustomEditor.setContentWidgetContainerStyleName ( style.fullWidth ( ) ) ; countThreadsAsCoresEditor.setContentWidgetContainerStyleName ( style.fullWidth ( ) ) ; }
Source:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { org.ovirt.engine.ui.uicommonweb.models.EntityModel hasVLanTagEntity = ( ( org.ovirt.engine.ui.uicommonweb.models.EntityModel ) ( sender ) ) ; java.lang.Boolean hasVLanTagValue = ( ( java.lang.Boolean ) ( hasVLanTagEntity.getEntity ( ) ) ) ; getView ( ) . setVLanTagEnabled ( hasVLanTagValue ) ; }

Target:
public void init ( final T model ) { super . init ( model ) ; model.getPropertyChangedEvent ( ) . addListener ( new org.ovirt.engine.ui.uicompat.IEventListener ( ) { @ java.lang.Override public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { org.ovirt.engine.ui.uicommonweb.models.datacenters.NetworkModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.datacenters.NetworkModel ) ( sender ) ) ; java.lang.String propertyName = ( ( org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ) ( args ) ) . PropertyName ; if ( "Message" . equals ( propertyName ) ) { getView ( ) . setMessageLabel ( model.getMessage ( ) ) ; } } } ) ; }
Source:
public void setSupportBridgesReportByVDSM ( boolean isSupportBridgesReportByVDSM ) { if ( ! isSupportBridgesReportByVDSM ) { getIsVmNetwork ( ) . setEntity ( true ) ; getIsVmNetwork ( ) . setChangeProhibitionReason ( org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getMessages ( ) . bridlessNetworkNotSupported ( getSelectedDc ( ) . getCompatibilityVersion ( ) . toString ( ) ) ) ; getIsVmNetwork ( ) . setIsChangable ( false ) ; } else { if ( ( this . isSupportBridgesReportByVDSM ) != isSupportBridgesReportByVDSM ) { initIsVm ( ) ; } getIsVmNetwork ( ) . setIsChangable ( true ) ; } this . isSupportBridgesReportByVDSM = isSupportBridgesReportByVDSM ; }

Target:
public void setSupportBridgesReportByVDSM ( boolean isSupportBridgesReportByVDSM ) { if ( ! isSupportBridgesReportByVDSM ) { getIsVmNetwork ( ) . setEntity ( true ) ; getIsVmNetwork ( ) . setChangeProhibitionReason ( org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getMessages ( ) . bridlessNetworkNotSupported ( getSelectedDc ( ) . getCompatibilityVersion ( ) . toString ( ) ) ) ; getIsVmNetwork ( ) . setIsChangeable ( false ) ; } else { if ( ( this . isSupportBridgesReportByVDSM ) != isSupportBridgesReportByVDSM ) { initIsVm ( ) ; } getIsVmNetwork ( ) . setIsChangeable ( true ) ; } this . isSupportBridgesReportByVDSM = isSupportBridgesReportByVDSM ; }
Source:
protected void executeVdsIdCommand ( ) { org.ovirt.engine.core.vdsbroker.AddVdsVDSCommand.log.info ( "AddVds - entered , starting logic to add VDS '{}'" , org.ovirt.engine.core.vdsbroker.AddVdsVDSCommand.getVdsId ( ) ) ; org.ovirt.engine.core.common.businessentities.VDS vds = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVdsDao ( ) . get ( org.ovirt.engine.core.vdsbroker.AddVdsVDSCommand.getVdsId ( ) ) ; org.ovirt.engine.core.vdsbroker.AddVdsVDSCommand.log.info ( "AddVds - VDS '{}' was added, will try to add it to the resource manager" , org.ovirt.engine.core.vdsbroker.AddVdsVDSCommand.getVdsId ( ) ) ; org.ovirt.engine.core.vdsbroker.ResourceManager.getInstance ( ) . AddVds ( vds , false ) ; }

Target:
protected void executeVdsIdCommand ( ) { org.ovirt.engine.core.vdsbroker.AddVdsVDSCommand.log.info ( "AddVds - entered , starting logic to add VDS '{}'" , org.ovirt.engine.core.vdsbroker.AddVdsVDSCommand.getVdsId ( ) ) ; org.ovirt.engine.core.common.businessentities.VDS vds = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVdsDao ( ) . get ( org.ovirt.engine.core.vdsbroker.AddVdsVDSCommand.getVdsId ( ) ) ; org.ovirt.engine.core.vdsbroker.AddVdsVDSCommand.log.info ( "AddVds - VDS '{}' was added, will try to add it to the resource manager" , org.ovirt.engine.core.vdsbroker.AddVdsVDSCommand.getVdsId ( ) ) ; org.ovirt.engine.core.vdsbroker.ResourceManager.getInstance ( ) . addVds ( vds , false ) ; }
Source:
public static boolean vmDeviceChanged ( org.ovirt.engine.core.compat.Guid vmId , org.ovirt.engine.core.common.businessentities.VmDeviceGeneralType deviceType , org.ovirt.engine.core.common.businessentities.VmDevice device ) { return org.ovirt.engine.core.bll.utils.VmDeviceUtils.vmDeviceChanged ( vmId , deviceType , null , device ) ; }

Target:
public static < E extends org.ovirt.engine.core.common.businessentities.VmDevice > java.util.Map < java.lang.String , E > vmDevicesByDevice ( java.util.Collection < E > deviceList ) { return deviceList == null ? java.util.Collections.emptyMap ( ) : deviceList.stream ( ) . filter ( ( dev ) -> ( dev.getDevice ( ) ) != null ) . collect ( java.util.stream.Collectors.toMap ( VmDevice :: getDevice , java.util.function.Function.< E > identity ( ) ) ) ; }
Source:
public static java.lang.String rangeParsser ( java.util.List < java.lang.String > values ) { return java.lang.String.valueOf ( ( ( org.ovirt.vdsmfake.Utils.RND.nextInt ( ( ( java.lang.Integer.valueOf ( values.get ( 1 ) . toString ( ) ) ) - ( java.lang.Integer.valueOf ( values.get ( 0 ) . toString ( ) ) ) ) ) ) + ( java.lang.Integer.valueOf ( values.get ( 0 ) . toString ( ) ) ) ) ) ; }

Target:
public static java.lang.String rangeParsser ( java.util.List < java.lang.String > values ) { return java.lang.String.valueOf ( ( ( org.ovirt.vdsmfake.Utils.RND.nextInt ( ( ( java.lang.Integer.parseInt ( values.get ( 1 ) ) ) - ( java.lang.Integer.parseInt ( values.get ( 0 ) ) ) ) ) ) + ( java.lang.Integer.parseInt ( values.get ( 0 ) ) ) ) ) ; }
Source:
protected void executeCommand ( ) { org.ovirt.engine.core.common.vdscommands.VDSReturnValue returnValue = runVdsCommand ( VDSCommandType.StartRebalanceGlusterVolume , new org.ovirt.engine.core.common.vdscommands.gluster.GlusterVolumeRebalanceVDSParameters ( getUpServer ( ) . getId ( ) , getGlusterVolumeName ( ) , getParameters ( ) . isFixLayoutOnly ( ) , getParameters ( ) . isForceAction ( ) ) ) ; setSucceeded ( returnValue.getSucceeded ( ) ) ; }

Target:
protected void executeCommand ( ) { org.ovirt.engine.core.common.vdscommands.VDSReturnValue returnValue = runVdsCommand ( VDSCommandType.StartRebalanceGlusterVolume , new org.ovirt.engine.core.common.vdscommands.gluster.GlusterVolumeRebalanceVDSParameters ( getUpServer ( ) . getId ( ) , getGlusterVolumeName ( ) , getParameters ( ) . isFixLayoutOnly ( ) , getParameters ( ) . isForceAction ( ) ) ) ; if ( getSucceeded ( ) ) { setSucceeded ( returnValue.getSucceeded ( ) ) ; } else { handleVdsError ( AuditLogType.GLUSTER_VOLUME_REBALANCE_START_FAILED , returnValue.getVdsError ( ) . getMessage ( ) ) ; return ; } }
Source:
public static void getStorageConnectionById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String id , boolean isRefresh ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( org.ovirt.engine.core.common.businessentities.StorageServerConnections ) ( source ) ) : null ; } } ; org.ovirt.engine.core.common.queries.StorageServerConnectionQueryParametersBase params = new org.ovirt.engine.core.common.queries.StorageServerConnectionQueryParametersBase ( id ) ; params.setRefresh ( isRefresh ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetStorageServerConnectionById , params , aQuery ) ; }

Target:
public static void getCPUList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Version 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.util.ArrayList < org.ovirt.engine.core.common.businessentities.ServerCpu > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ServerCpu > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllServerCpuList , new org.ovirt.engine.core.common.queries.GetAllServerCpuListParameters ( version ) , aQuery ) ; }
Source:
protected boolean isVirtioScsiEnabled ( ) { java.lang.Boolean virtioScsiEnabled = org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . isVirtioScsiEnabled ( ) ; return virtioScsiEnabled != null ? virtioScsiEnabled : org.ovirt.engine.core.common.FeatureSupported.virtIoScsi ( org.ovirt.engine.core.bll.AddVmCommand.getVdsGroup ( ) . getcompatibility_version ( ) ) ; }

Target:
protected boolean isVirtioScsiEnabled ( ) { java.lang.Boolean virtioScsiEnabled = org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . isVirtioScsiEnabled ( ) ; boolean isOsSupportedForVirtIoScsi = org.ovirt.engine.core.bll.validator.VmValidationUtils.isDiskInterfaceSupportedByOs ( org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . getVm ( ) . getOs ( ) , org.ovirt.engine.core.bll.AddVmCommand.getVdsGroup ( ) . getcompatibility_version ( ) , DiskInterface.VirtIO_SCSI ) ; return virtioScsiEnabled != null ? virtioScsiEnabled : ( org.ovirt.engine.core.common.FeatureSupported.virtIoScsi ( org.ovirt.engine.core.bll.AddVmCommand.getVdsGroup ( ) . getcompatibility_version ( ) ) ) && isOsSupportedForVirtIoScsi ; }
Source:
protected void analyze ( ) { proceedDownVms ( ) ; proceedWatchdogEvents ( ) ; proceedBalloonCheck ( ) ; proceedGuaranteedMemoryCheck ( ) ; updateRepository ( ) ; prepareGuestAgentNetworkDevicesForUpdate ( ) ; updateLunDisks ( ) ; updateVmJobs ( ) ; analyzeExternalVms ( ) ; analyzeHostedEngineVm ( ) ; if ( ( vmDynamicToSave ) != null ) { vmsMonitoring.addVmDynamicToList ( vmDynamicToSave ) ; } }

Target:
protected void analyze ( ) { if ( ( vdsmVm ) == null ) { removeVmFromCache ( ) ; return ; } if ( isUnmanagedVm ( ) ) { saveDynamic ( vdsmVm.getVmDynamic ( ) ) ; return ; } proceedDownVms ( ) ; proceedWatchdogEvents ( ) ; proceedBalloonCheck ( ) ; proceedGuaranteedMemoryCheck ( ) ; updateRepository ( ) ; prepareGuestAgentNetworkDevicesForUpdate ( ) ; updateLunDisks ( ) ; updateVmJobs ( ) ; }