auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public static void initCache ( org.ovirt.engine.ui.uicommonweb.models.LoginModel loginModel ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.cacheConfigValues ( new org.ovirt.engine.ui.frontend.AsyncQuery ( loginModel , new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( target ) ; } } ) ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.initOsNames ( ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.initUniqueOsNames ( ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.initLinuxOsTypes ( ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.initWindowsOsTypes ( ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.initOsArchitecture ( ) ; }

Target:
public static void initCache ( org.ovirt.engine.ui.uicommonweb.models.LoginModel loginModel ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.cacheConfigValues ( new org.ovirt.engine.ui.frontend.AsyncQuery ( loginModel , new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( target ) ; } } ) ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.initOsNames ( ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.initUniqueOsNames ( ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.initLinuxOsTypes ( ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.initWindowsOsTypes ( ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.initDisplayTypes ( ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.initNicHotplugSupportMap ( ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.initDiskHotpluggableInterfacesMap ( ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.initOsArchitecture ( ) ; }
Source:
private java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > getMovedDisks ( ) { java.util.LinkedHashSet < org.ovirt.engine.core.compat.Guid > movedDiskIds = getMovedDiskIds ( ) ; java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > disks = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.core.compat.Guid diskId : movedDiskIds ) { org.ovirt.engine.core.common.businessentities.DiskImage disk = new org.ovirt.engine.core.common.businessentities.DiskImage ( ) ; disk.setId ( diskId ) ; disks.add ( disk ) ; } return disks ; }

Target:
private java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > getMovedDisks ( ) { java.util.LinkedHashSet < org.ovirt.engine.core.compat.Guid > movedDiskIds = getMovedDiskIds ( ) ; java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > disks = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.core.compat.Guid diskId : movedDiskIds ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage disk = new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ; disk.setId ( diskId ) ; disks.add ( disk ) ; } return disks ; }
Source:
private void gatherNonRunningVms ( java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.VM > dbVms ) { for ( org.ovirt.engine.core.common.businessentities.VM dbVm : dbVms.values ( ) ) { if ( ! ( vdsmVms.containsKey ( dbVm.getId ( ) ) ) ) { changedVms.add ( new org.ovirt.engine.core.common.utils.Pair ( dbVm , null ) ) ; } } }

Target:
private void gatherNonRunningVms ( java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.VmDynamic > dbVms ) { for ( org.ovirt.engine.core.common.businessentities.VmDynamic dbVm : dbVms.values ( ) ) { if ( ! ( vdsmVms.containsKey ( dbVm.getId ( ) ) ) ) { changedVms.add ( new org.ovirt.engine.core.common.utils.Pair ( dbVm , null ) ) ; } } }
Source:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.hosts.HostModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.hosts.HostModel ) ( target ) ) ; model.defaultSpmPriority = ( ( java.lang.Integer ) ( returnValue ) ) ; if ( ( postponedSpmPriority ) != null ) { updateSpmPriority ( postponedSpmPriority ) ; } spmInitialized = true ; }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object result ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Provider > providers = org.ovirt.engine.ui.uicommonweb.Linq.toList ( org.ovirt.engine.ui.uicommonweb.Linq.filterNetworkProviders ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Provider > ) ( result ) ) ) ) ; providers.add ( 0 , null ) ; getExternalProviders ( ) . setItems ( providers ) ; getExternalProviders ( ) . setSelectedItem ( null ) ; }
Source:
public void testNetworkIpAddressWasSameAsHostnameAndChangedWhenIfaceDoesNotExist ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.NetworkAttachment attachment = createNetworkAttachmentWithIpConfiguration ( NetworkBootProtocol.STATIC_IP , null , null ) ; attachment.setNicName ( "nicName" ) ; org.ovirt.engine.core.bll.validator.NetworkAttachmentValidator validator = new org.ovirt.engine.core.bll.validator.NetworkAttachmentValidator ( attachment , null ) ; java.util.Map < java.lang.String , org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > nics = java.util.Collections.emptyMap ( ) ; org.junit.Assert.assertThat ( validator.networkIpAddressWasSameAsHostnameAndChanged ( nics ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }

Target:
public void testNetworkIpAddressWasSameAsHostnameAndChangedWhenIfaceDoesNotExist ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.NetworkAttachment attachment = createNetworkAttachmentWithIpConfiguration ( NetworkBootProtocol.STATIC_IP , null , null ) ; attachment.setNicName ( "nicName" ) ; org.ovirt.engine.core.bll.validator.NetworkAttachmentValidator validator = createNetworkAttachmentValidator ( attachment ) ; org.ovirt.engine.core.common.businessentities.BusinessEntityMap < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > nics = new org.ovirt.engine.core.common.businessentities.BusinessEntityMap ( java.util.Collections.< org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > emptyList ( ) ) ; org.junit.Assert.assertThat ( validator.networkIpAddressWasSameAsHostnameAndChanged ( nics ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }
Source:
private java.lang.String generatePreviewSentence ( ) { java.lang.String outOfSyncPreviewSentence = org.ovirt.engine.ui.webadmin.section.main.view.popup.host.panels.ItemInfoPopup.constants.hostOutOfSyncPreviewSentence ( ) ; outOfSyncPreviewSentence = outOfSyncPreviewSentence.replaceAll ( "Host" , org.ovirt.engine.ui.webadmin.section.main.view.popup.host.panels.ItemInfoPopup.templates.strongText ( "Host" ) . asString ( ) ) ; outOfSyncPreviewSentence = outOfSyncPreviewSentence.replaceAll ( "DC" , org.ovirt.engine.ui.webadmin.section.main.view.popup.host.panels.ItemInfoPopup.templates.strongText ( "DC" ) . asString ( ) ) ; return outOfSyncPreviewSentence ; }

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.templates.coloredText ( org.ovirt.engine.ui.webadmin.section.main.view.popup.host.panels.ItemInfoPopup.constants.hostOutOfSync ( ) , org.ovirt.engine.ui.webadmin.section.main.view.popup.host.panels.ItemInfoPopup.TEXT_COLOR ) ) ) ; com.google.gwt.safehtml.shared.SafeHtml safeHtml = com.google.gwt.safehtml.shared.SafeHtmlUtils.fromTrustedString ( generatePreviewSentence ( ) ) ; 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:
public void testGetEntityNameByIdAndTypeForVmTemplate ( ) { org.ovirt.engine.core.common.businessentities.VmTemplate vmTemplate = dbFacade.getVmTemplateDAO ( ) . get ( org.ovirt.engine.core.dao.DbFacadeDAOTest.VM_TEMPLATE_ID ) ; org.junit.Assert.assertNotNull ( vmTemplate ) ; java.lang.String name = vmTemplate.getname ( ) ; org.junit.Assert.assertTrue ( name.equals ( dbFacade.getEntityNameByIdAndType ( org.ovirt.engine.core.dao.DbFacadeDAOTest.VM_TEMPLATE_ID , VdcObjectType.VmTemplate ) ) ) ; }

Target:
public void testGetEntityNameByIdAndTypeForVmTemplate ( ) { org.ovirt.engine.core.common.businessentities.VmTemplate vmTemplate = dbFacade.getVmTemplateDao ( ) . get ( org.ovirt.engine.core.dao.DbFacadeDAOTest.VM_TEMPLATE_ID ) ; org.junit.Assert.assertNotNull ( vmTemplate ) ; java.lang.String name = vmTemplate.getname ( ) ; org.junit.Assert.assertTrue ( name.equals ( dbFacade.getEntityNameByIdAndType ( org.ovirt.engine.core.dao.DbFacadeDAOTest.VM_TEMPLATE_ID , VdcObjectType.VmTemplate ) ) ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.VmDevice createVmDeviceForDisk ( org.ovirt.engine.core.common.businessentities.VM vm , org.ovirt.engine.core.common.businessentities.Disk disk , org.ovirt.engine.core.compat.Guid snapshotId , boolean isPlugged ) { org.ovirt.engine.core.common.businessentities.VmDevice device = new org.ovirt.engine.core.common.businessentities.VmDevice ( ) ; device.setId ( new org.ovirt.engine.core.common.businessentities.VmDeviceId ( vm.getId ( ) , disk.getId ( ) ) ) ; device.setSnapshotId ( snapshotId ) ; device.setIsPlugged ( isPlugged ) ; return device ; }

Target:
private org.ovirt.engine.core.common.businessentities.VmDevice createVmDeviceForDisk ( org.ovirt.engine.core.common.businessentities.VM vm , org.ovirt.engine.core.common.businessentities.storage.Disk disk , org.ovirt.engine.core.compat.Guid snapshotId , boolean isPlugged ) { org.ovirt.engine.core.common.businessentities.VmDevice device = new org.ovirt.engine.core.common.businessentities.VmDevice ( ) ; device.setId ( new org.ovirt.engine.core.common.businessentities.VmDeviceId ( vm.getId ( ) , disk.getId ( ) ) ) ; device.setSnapshotId ( snapshotId ) ; device.setIsPlugged ( isPlugged ) ; return device ; }
Source:
private void DomainRecoveredFromProblem ( org.ovirt.engine.core.compat.Guid domainId , org.ovirt.engine.core.compat.Guid vdsId , java.lang.String vdsName ) { java.lang.String domainIdTuple = org.ovirt.engine.core.vdsbroker.irsbroker.IrsBrokerCommand.IrsProxyData.getDomainIdTuple ( domainId ) ; org.ovirt.engine.core.vdsbroker.irsbroker.IrsBrokerCommand.log.infoFormat ( "Domain {0} recovered from problem. vds: {1}" , domainIdTuple , vdsName ) ; ClearVds ( vdsId , domainId ) ; _domainsInProblem.get ( domainId ) . remove ( vdsId ) ; if ( ( _domainsInProblem.get ( domainId ) . size ( ) ) == 0 ) { org.ovirt.engine.core.vdsbroker.irsbroker.IrsBrokerCommand.log.infoFormat ( ( "Domain {0} has recovered from problem. No active host in the DC is reporting it as" + " problematic, so clearing the domain recovery timer." ) , domainIdTuple ) ; _domainsInProblem.remove ( domainId ) ; clearTimer ( domainId ) ; } }

Target:
private void domainRecoveredFromProblem ( org.ovirt.engine.core.compat.Guid domainId , org.ovirt.engine.core.compat.Guid vdsId , java.lang.String vdsName ) { java.lang.String domainIdTuple = org.ovirt.engine.core.vdsbroker.irsbroker.IrsBrokerCommand.IrsProxyData.getDomainIdTuple ( domainId ) ; org.ovirt.engine.core.vdsbroker.irsbroker.IrsBrokerCommand.log.infoFormat ( "Domain {0} recovered from problem. vds: {1}" , domainIdTuple , vdsName ) ; _domainsInProblem.get ( domainId ) . remove ( vdsId ) ; if ( ( _domainsInProblem.get ( domainId ) . size ( ) ) == 0 ) { org.ovirt.engine.core.vdsbroker.irsbroker.IrsBrokerCommand.log.infoFormat ( ( "Domain {0} has recovered from problem. No active host in the DC is reporting it as" + " problematic, so clearing the domain recovery timer." ) , domainIdTuple ) ; _domainsInProblem.remove ( domainId ) ; clearTimer ( domainId ) ; } }
Source:
private com.woorea.openstack.quantum.Quantum getClient ( ) { if ( ( client ) == null ) { client = new com.woorea.openstack.quantum.Quantum ( ( ( provider.getUrl ( ) ) + ( org.ovirt.engine.core.bll.provider.network.openstack.BaseNetworkProviderProxy.API_VERSION ) ) ) ; if ( provider.isRequiringAuthentication ( ) ) { setClientTokenProvider ( client ) ; } } return client ; }

Target:
private com.woorea.openstack.quantum.Quantum getClient ( ) { if ( ( client ) == null ) { client = new com.woorea.openstack.quantum.Quantum ( ( ( provider.getUrl ( ) ) + ( org.ovirt.engine.core.bll.provider.network.openstack.BaseNetworkProviderProxy.API_VERSION ) ) , new CustomizedRESTEasyConnector ( ) ) ; if ( provider.isRequiringAuthentication ( ) ) { setClientTokenProvider ( client ) ; } } return client ; }
Source:
public static void getVmListByClusterName ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String clusterName ) { 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 ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VM > vms = org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.VM > cast ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.IVdcQueryable > ) ( source ) ) ) ; return vms ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( ( "Vms: cluster=" + clusterName ) , org.ovirt.engine.core.common.interfaces.SearchType.VM ) , aQuery ) ; }

Target:
public static void getStorageConnectionsByDataCenterIdAndStorageType ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.common.businessentities.StorageType storageType ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.core.common.queries.GetConnectionsByDataCenterAndStorageTypeParameters params = new org.ovirt.engine.core.common.queries.GetConnectionsByDataCenterAndStorageTypeParameters ( storagePoolId , storageType ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetConnectionsByDataCenterAndStorageType , params , aQuery ) ; }
Source:
public javax.ws.rs.core.Response remove ( ) { org.ovirt.engine.core.common.scheduling.AffinityGroup group = getGroup ( ) ; if ( ( group == null ) || ( ! ( group.getEntityIds ( ) . remove ( asGuid ( id ) ) ) ) ) { throw new javax.ws.rs.WebApplicationException ( Response.Status.NOT_FOUND ) ; } return performAction ( VdcActionType.EditAffinityGroup , new org.ovirt.engine.core.common.scheduling.parameters.AffinityGroupCRUDParameters ( groupId , group ) ) ; }

Target:
public javax.ws.rs.core.Response remove ( ) { org.ovirt.engine.core.common.scheduling.AffinityGroup group = getGroup ( ) ; if ( ( group == null ) || ( ! ( group.getVmIds ( ) . remove ( asGuid ( id ) ) ) ) ) { throw new javax.ws.rs.WebApplicationException ( Response.Status.NOT_FOUND ) ; } return performAction ( VdcActionType.EditAffinityGroup , new org.ovirt.engine.core.common.scheduling.parameters.AffinityGroupCRUDParameters ( groupId , group ) ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.VM mockVm ( org.ovirt.engine.core.bll.RunVmCommand < org.ovirt.engine.core.common.action.RunVmParams > spyVmCommand ) { org.ovirt.engine.core.common.businessentities.VM vm = new org.ovirt.engine.core.common.businessentities.VM ( ) ; vm.setStatus ( VMStatus.Down ) ; org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseMockUtils.mockVmDao ( spyVmCommand , vmDAO ) ; org.mockito.Mockito.when ( vmDAO.get ( command.getParameters ( ) . getVmId ( ) ) ) . thenReturn ( vm ) ; return vm ; }

Target:
private org.ovirt.engine.core.common.businessentities.VM mockVm ( org.ovirt.engine.core.bll.RunVmCommand < org.ovirt.engine.core.common.action.RunVmParams > spyVmCommand ) { org.ovirt.engine.core.common.businessentities.VM vm = new org.ovirt.engine.core.common.businessentities.VM ( ) ; vm.setStatus ( VMStatus.Down ) ; org.mockito.Mockito.doReturn ( vmDAO ) . when ( command ) . getVmDAO ( ) ; org.mockito.Mockito.when ( vmDAO.get ( command.getParameters ( ) . getVmId ( ) ) ) . thenReturn ( vm ) ; return vm ; }
Source:
public void auditInvalidInterfaces ( java.lang.String entityName ) { if ( ! ( invalidNetworkNames.isEmpty ( ) ) ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase logable = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; logable.addCustomValue ( "EntityName" , entityName ) ; logable.addCustomValue ( "Networks" , org.apache.commons.lang.StringUtils.join ( invalidNetworkNames , ',' ) ) ; logable.addCustomValue ( "Interfaces" , org.apache.commons.lang.StringUtils.join ( invalidIfaceNames , ',' ) ) ; org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.log ( logable , logType ) ; } }

Target:
public void auditInvalidInterfaces ( java.lang.String entityName ) { if ( ! ( invalidNetworkNames.isEmpty ( ) ) ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase logable = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; logable.addCustomValue ( "EntityName" , entityName ) ; logable.addCustomValue ( "Networks" , org.apache.commons.lang.StringUtils.join ( invalidNetworkNames , ',' ) ) ; logable.addCustomValue ( "Interfaces" , org.apache.commons.lang.StringUtils.join ( invalidIfaceNames , ',' ) ) ; new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector ( ) . log ( logable , logType ) ; } }
Source:
public void shouldDetectNumaPinning ( ) { invalidVM.setvNumaNodeList ( java.util.Arrays.asList ( org.ovirt.engine.core.bll.utils.NumaTestUtils.createVmNumaNode ( 1 , java.util.Arrays.asList ( org.ovirt.engine.core.bll.utils.NumaTestUtils.createVdsNumaNode ( 1 ) ) ) ) ) ; org.hamcrest.MatcherAssert.assertThat ( validator.isVmReadyForUpgrade ( invalidVM ) , org.hamcrest.CoreMatchers.hasItem ( UPGRADE_ERROR.VM_NUMA_PINNED ) ) ; }

Target:
public void shouldDetectNumaPinning ( ) { invalidVM.setvNumaNodeList ( java.util.Arrays.asList ( org.ovirt.engine.core.bll.utils.NumaTestUtils.createVmNumaNode ( 1 , java.util.Arrays.asList ( org.ovirt.engine.core.bll.utils.NumaTestUtils.createVdsNumaNode ( 1 ) ) ) ) ) ; org.hamcrest.MatcherAssert.assertThat ( validator.checkVmReadyForUpgrade ( invalidVM ) , org.hamcrest.CoreMatchers.hasItem ( UPGRADE_ERROR.VM_NUMA_PINNED ) ) ; }
Source:
public java.lang.String getText ( java.lang.Object image ) { if ( image instanceof org.ovirt.engine.core.common.businessentities.storage.RepoImage ) { return ( ( org.ovirt.engine.core.common.businessentities.storage.RepoImage ) ( image ) ) . getRepoImageTitle ( ) ; } else if ( image instanceof org.ovirt.engine.core.common.businessentities.storage.DiskImage ) { return ( ( org.ovirt.engine.core.common.businessentities.storage.DiskImage ) ( image ) ) . getDiskAlias ( ) ; } return constants.unknown ( ) ; }

Target:
public java.lang.String getText ( java.lang.Object image ) { if ( image instanceof org.ovirt.engine.core.common.businessentities.storage.RepoImage ) { return ( ( org.ovirt.engine.core.common.businessentities.storage.RepoImage ) ( image ) ) . getRepoImageTitle ( ) ; } else if ( image instanceof org.ovirt.engine.core.common.businessentities.storage.DiskImage ) { return ( ( org.ovirt.engine.core.common.businessentities.storage.DiskImage ) ( image ) ) . getDiskAlias ( ) ; } return org.ovirt.engine.ui.webadmin.section.main.view.popup.storage.ImportExportImagePopupView.constants.unknown ( ) ; }
Source:
public static void getDiskList ( 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.DiskImage > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > ( ) ; } } ; org.ovirt.engine.core.common.queries.SearchParameters searchParams = new org.ovirt.engine.core.common.queries.SearchParameters ( "Disks:" , org.ovirt.engine.core.common.interfaces.SearchType.Disk ) ; searchParams.setMaxCount ( 9999 ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , searchParams , aQuery ) ; }

Target:
public static void getVmListByClusterName ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String clusterName ) { 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 ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VM > vms = org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.VM > cast ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.IVdcQueryable > ) ( source ) ) ) ; return vms ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( ( "Vms: cluster=" + clusterName ) , org.ovirt.engine.core.common.interfaces.SearchType.VM ) , aQuery ) ; }
Source:
public static void getTimeZoneList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.common.TimeZoneType timeZoneType ) { 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.HashMap < java.lang.String , java.lang.String > ( ) ; } return source ; } } ; org.ovirt.engine.core.common.queries.TimeZoneQueryParams params = new org.ovirt.engine.core.common.queries.TimeZoneQueryParams ( ) ; params.setTimeZoneType ( timeZoneType ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetTimeZones , params , aQuery ) ; }

Target:
public static void getExternalNetworkMap ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid providerId ) { 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.HashMap < org.ovirt.engine.core.common.businessentities.network.Network , java.util.Set < org.ovirt.engine.core.compat.Guid > > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllExternalNetworksOnProvider , new org.ovirt.engine.core.common.queries.IdQueryParameters ( providerId ) , aQuery ) ; }
Source:
protected void openDocumentation ( T model ) { java.lang.String hashName = model.getHashName ( ) ; java.lang.String documentationPath = org.ovirt.engine.ui.common.uicommon.DocumentationPathTranslator.getPath ( hashName ) ; java.lang.String documentationLibURL = model.getConfigurator ( ) . getDocumentationLibURL ( ) ; org.ovirt.engine.ui.common.utils.WebUtils.openUrlInNewWindow ( "_blank" , ( documentationLibURL + documentationPath ) ) ; }

Target:
protected void openDocumentation ( T model ) { java.lang.String helpTag = model.getHelpTag ( ) . name ; java.lang.String documentationPath = org.ovirt.engine.ui.common.uicommon.DocumentationPathTranslator.getPath ( helpTag ) ; java.lang.String documentationLibURL = model.getConfigurator ( ) . getDocumentationLibURL ( ) ; org.ovirt.engine.ui.common.utils.WebUtils.openUrlInNewWindow ( "_blank" , ( documentationLibURL + documentationPath ) ) ; }
Source:
protected boolean isInterfaceSupportedForPlugUnPlug ( org.ovirt.engine.core.common.businessentities.Disk disk ) { java.util.Set < java.lang.String > diskHotpluggableInterfaces = osRepository.getDiskHotpluggableInterfaces ( org.ovirt.engine.core.bll.AbstractDiskVmCommand.getVm ( ) . getOs ( ) , org.ovirt.engine.core.bll.AbstractDiskVmCommand.getVm ( ) . getVdsGroupCompatibilityVersion ( ) ) ; if ( ( org.springframework.util.CollectionUtils.isEmpty ( diskHotpluggableInterfaces ) ) || ( ! ( diskHotpluggableInterfaces.contains ( disk.getDiskInterface ( ) . toString ( ) ) ) ) ) { return failCanDoAction ( VdcBllMessages.ACTION_TYPE_FAILED_GUEST_OS_VERSION_IS_NOT_SUPPORTED ) ; } return true ; }

Target:
protected boolean isHotPlugSupported ( ) { if ( ( org.ovirt.engine.core.bll.AbstractDiskVmCommand.getParameters ( ) . getSnapshotId ( ) ) == null ) { return super . isHotPlugSupported ( ) ; } return isHotPlugDiskSnapshotSupported ( ) ; }
Source:
public org.ovirt.engine.core.common.AuditLogType getAuditLogTypeValue ( ) { org.ovirt.engine.core.bll.storage.disk.image.TransferImageCommand.addCustomValue ( "DiskAlias" , getImageAlias ( ) ) ; return ( org.ovirt.engine.core.bll.storage.disk.image.TransferImageCommand.getActionState ( ) ) == ( org.ovirt.engine.core.bll.CommandActionState.EXECUTE ) ? org.ovirt.engine.core.common.AuditLogType.TRANSFER_IMAGE_INITIATED : org.ovirt.engine.core.bll.storage.disk.image.TransferImageCommand.getParameters ( ) . getAuditLogType ( ) ; }

Target:
public org.ovirt.engine.core.common.AuditLogType getAuditLogTypeValue ( ) { org.ovirt.engine.core.bll.storage.disk.image.TransferImageCommand.addCustomValue ( "DiskAlias" , getImageAlias ( ) ) ; addCustomValue ( "TransferType" , org.ovirt.engine.core.bll.storage.disk.image.TransferImageCommand.getParameters ( ) . getTransferType ( ) . name ( ) ) ; return ( org.ovirt.engine.core.bll.storage.disk.image.TransferImageCommand.getActionState ( ) ) == ( org.ovirt.engine.core.bll.CommandActionState.EXECUTE ) ? org.ovirt.engine.core.common.AuditLogType.TRANSFER_IMAGE_INITIATED : org.ovirt.engine.core.bll.storage.disk.image.TransferImageCommand.getParameters ( ) . getAuditLogType ( ) ; }
Source:
public void testGetVmsByIds ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VM > result = dao.getVmsByIds ( java.util.Arrays.asList ( FixturesTool.VM_RHEL5_POOL_60 , FixturesTool.VM_RHEL5_POOL_59 ) ) ; org.junit.Assert.assertEquals ( "loaded templates list isn't in the expected size" , 2 , result.size ( ) ) ; java.util.Collection < org.ovirt.engine.core.compat.Guid > recieved = result.stream ( ) . map ( VM :: getId ) . collect ( java.util.stream.Collectors.toList ( ) ) ; org.junit.Assert.assertTrue ( "the received list didn't contain an expected VM" , recieved.contains ( FixturesTool.VM_RHEL5_POOL_60 ) ) ; org.junit.Assert.assertTrue ( "the received list didn't contain an expected VM" , recieved.contains ( FixturesTool.VM_RHEL5_POOL_59 ) ) ; }

Target:
public void testGetVmsByIds ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VM > result = dao.getVmsByIds ( java.util.Arrays.asList ( FixturesTool.VM_RHEL5_POOL_60 , FixturesTool.VM_RHEL5_POOL_59 ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( 2 , result.size ( ) , "loaded templates list isn't in the expected size" ) ; java.util.Collection < org.ovirt.engine.core.compat.Guid > recieved = result.stream ( ) . map ( VM :: getId ) . collect ( java.util.stream.Collectors.toList ( ) ) ; org.junit.jupiter.api.Assertions.assertTrue ( recieved.contains ( FixturesTool.VM_RHEL5_POOL_60 ) , "the received list didn't contain an expected VM" ) ; org.junit.jupiter.api.Assertions.assertTrue ( recieved.contains ( FixturesTool.VM_RHEL5_POOL_59 ) , "the received list didn't contain an expected VM" ) ; }
Source:
public void testBootProtocolSetForDisplayNetworkWhenBootProtocolIsNone ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.Network network = new org.ovirt.engine.core.common.businessentities.network.Network ( ) ; network.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; org.ovirt.engine.core.common.businessentities.network.NetworkAttachment attachment = createNetworkAttachmentWithIpConfiguration ( NetworkBootProtocol.NONE , null , null ) ; attachment.setNetworkId ( network.getId ( ) ) ; doTestBootProtocolSetForDisplayNetworkWhenNullValuedIpConfigurationAndWhenNetworkClusterDisplayIsFalse ( true , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( VdcBllMessages.ACTION_TYPE_FAILED_DISPLAY_NETWORK_HAS_NO_BOOT_PROTOCOL ) , network , attachment ) ; }

Target:
public void testBootProtocolSetForDisplayNetworkWhenNetworkIsNonDisplay ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.Network network = new org.ovirt.engine.core.common.businessentities.network.Network ( ) ; network.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; org.ovirt.engine.core.common.businessentities.network.NetworkAttachment attachment = createNetworkAttachmentWithIpConfiguration ( NetworkBootProtocol.NONE , null , null ) ; attachment.setNetworkId ( network.getId ( ) ) ; doTestBootProtocolSetForDisplayNetworkWhenNullValuedIpConfigurationAndWhenNetworkClusterDisplay ( false , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) , network , attachment ) ; }
Source:
private void dropAllLabelsToRemoveRelatedToRemovedBond ( ) { for ( java.util.Iterator < org.ovirt.engine.ui.uicommonweb.models.hosts.network.DataFromHostSetupNetworksModel.LabelOnNic > iterator = removedLabels.iterator ( ) ; iterator.hasNext ( ) ; ) { org.ovirt.engine.ui.uicommonweb.models.hosts.network.DataFromHostSetupNetworksModel.LabelOnNic labelOnNic = iterator.next ( ) ; org.ovirt.engine.core.compat.Guid nicId = labelOnNic.getNicId ( ) ; boolean unlabelingBondBeingRemoved = removedBondIds.contains ( nicId ) ; if ( unlabelingBondBeingRemoved ) { iterator.remove ( ) ; } } }

Target:
private void dropAllLabelsToRemoveRelatedToRemovedBond ( ) { for ( java.util.Iterator < org.ovirt.engine.core.common.businessentities.network.NicLabel > iterator = removedLabels.iterator ( ) ; iterator.hasNext ( ) ; ) { org.ovirt.engine.core.common.businessentities.network.NicLabel labelOnNic = iterator.next ( ) ; org.ovirt.engine.core.compat.Guid nicId = labelOnNic.getNicId ( ) ; boolean unlabelingBondBeingRemoved = removedBondIds.contains ( nicId ) ; if ( unlabelingBondBeingRemoved ) { iterator.remove ( ) ; } } }
Source:
private boolean noChangesDetected ( ) { return ( ( ( ( getNetworks ( ) . isEmpty ( ) ) && ( getRemovedNetworks ( ) . isEmpty ( ) ) ) && ( org.ovirt.engine.core.bll.network.host.HostSetupNetworksCommand.getParameters ( ) . getBonds ( ) . isEmpty ( ) ) ) && ( getRemovedBonds ( ) . isEmpty ( ) ) ) && ( getRemovedUnmanagedNetworks ( ) . isEmpty ( ) ) ; }

Target:
private java.util.Set < java.lang.String > getRemovedBondNames ( ) { if ( ( removedBondNames ) == null ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > existingVdsInterfaceToBeRemoved = getRemovedBonds ( ) ; java.util.Set < java.lang.String > removedBondNames = new java.util.HashSet ( existingVdsInterfaceToBeRemoved.size ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface removedBondInterface : existingVdsInterfaceToBeRemoved ) { removedBondNames.add ( removedBondInterface.getName ( ) ) ; } this . removedBondNames = removedBondNames ; } return removedBondNames ; }
Source:
public < T > java.util.List < T > executeReadList ( final java.lang.String procedureName , final org.springframework.jdbc.core.RowMapper < T > mapper , final org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource ) { java.util.Map < java.lang.String , java.lang.Object > resultsMap = executeReadAndReturnMap ( procedureName , mapper , parameterSource ) ; return ( ( java.util.List < T > ) ( resultsMap.get ( BaseDAODbFacade.RETURN_VALUE_PARAMETER ) ) ) ; }

Target:
public < T > java.util.List < T > executeReadList ( final java.lang.String procedureName , final org.springframework.jdbc.core.RowMapper < T > mapper , final org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource ) { java.util.Map < java.lang.String , java.lang.Object > resultsMap = executeImpl ( procedureName , parameterSource , createCallForRead ( procedureName , mapper , parameterSource ) ) ; return ( ( java.util.List < T > ) ( resultsMap.get ( BaseDAODbFacade.RETURN_VALUE_PARAMETER ) ) ) ; }
Source:
public void testChangeCdUsingQueryParameter ( ) throws java.lang.Exception { resource.setUriInfo ( setUpChangeCdUriQueryExpectations ( ) ) ; setUpEntityQueryExpectations ( getVm ( ) ) ; setUpActionExpectations ( VdcActionType.ChangeDisk , org.ovirt.engine.core.common.action.ChangeDiskCommandParameters.class , new java.lang.String [ ] { "CdImagePath" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendVmCdromResourceTest.A_ISO } , true , true ) ; org.ovirt.engine.api.model.Cdrom cdrom = getCdrom ( org.ovirt.engine.api.restapi.resource.BackendVmCdromResourceTest.A_ISO ) ; cdrom = resource.update ( cdrom ) ; assertTrue ( cdrom.isSetFile ( ) ) ; }

Target:
public void testChangeCdUsingQueryParameter ( ) throws java.lang.Exception { resource.setUriInfo ( setUpChangeCdUriQueryExpectations ( ) ) ; setUpEntityQueryExpectations ( getVm ( ) ) ; setUpActionExpectations ( ActionType.ChangeDisk , org.ovirt.engine.core.common.action.ChangeDiskCommandParameters.class , new java.lang.String [ ] { "CdImagePath" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendVmCdromResourceTest.A_ISO } , true , true ) ; org.ovirt.engine.api.model.Cdrom cdrom = getCdrom ( org.ovirt.engine.api.restapi.resource.BackendVmCdromResourceTest.A_ISO ) ; cdrom = resource.update ( cdrom ) ; assertTrue ( cdrom.isSetFile ( ) ) ; }
Source:
public void onFailure ( java.lang.Throwable caught ) { if ( org.ovirt.engine.ui.frontend.Frontend.ignoreFailure ( caught ) ) { return ; } org.ovirt.engine.ui.frontend.Frontend.logger.log ( java.util.logging.Level.SEVERE , ( "Failed to execute RunAction: " + caught ) , caught ) ; org.ovirt.engine.ui.frontend.Frontend.failureEventHandler ( caught ) ; org.ovirt.engine.ui.frontend.Frontend.failureEventHandler ( caught ) ; }

Target:
public static void RunAction ( final org.ovirt.engine.core.common.action.VdcActionType actionType , final org.ovirt.engine.core.common.action.VdcActionParametersBase parameters ) { org.ovirt.engine.ui.frontend.Frontend.RunAction ( actionType , parameters , org.ovirt.engine.ui.frontend.Frontend.NULLABLE_ASYNC_CALLBACK ) ; }
Source:
public static boolean isLastSuperUserPermission ( org.ovirt.engine.core.compat.Guid roleId ) { boolean retValue = false ; if ( PredefinedRoles.SUPER_USER.getId ( ) . equals ( roleId ) ) { java.util.List < org.ovirt.engine.core.common.businessentities.Permission > permissions = org.ovirt.engine.core.bll.MultiLevelAdministrationHandler.getPermissionDAO ( ) . getAllForRole ( PredefinedRoles.SUPER_USER.getId ( ) ) ; if ( ( permissions.size ( ) ) <= 1 ) { retValue = true ; } } return retValue ; }

Target:
public static boolean isLastSuperUserPermission ( org.ovirt.engine.core.compat.Guid roleId ) { boolean retValue = false ; if ( PredefinedRoles.SUPER_USER.getId ( ) . equals ( roleId ) ) { java.util.List < org.ovirt.engine.core.common.businessentities.Permission > permissions = org.ovirt.engine.core.bll.MultiLevelAdministrationHandler.getPermissionDao ( ) . getAllForRole ( PredefinedRoles.SUPER_USER.getId ( ) ) ; if ( ( permissions.size ( ) ) <= 1 ) { retValue = true ; } } return retValue ; }
Source:
public void getAllProvidersByType ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.common.businessentities.ProviderType providerType ) { 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.Provider > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllProviders , new org.ovirt.engine.core.common.queries.GetAllProvidersParameters ( providerType ) , aQuery ) ; }

Target:
public void getVnicProfilesByNetworkId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid networkId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VnicProfileView > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVnicProfilesByNetworkId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( networkId ) , aQuery ) ; }
Source:
public void testGetAllWithLeaseOnStorageDomain ( ) { java.util.List < org.ovirt.engine.core.compat.Guid > vmAndTemplatesWithLeasesIds = dao.getAllWithLeaseOnStorageDomain ( FixturesTool.STORAGE_DOMAIN_NFS2_1 ) . stream ( ) . map ( VmTemplate :: getId ) . collect ( java.util.stream.Collectors.toList ( ) ) ; org.junit.Assert.assertThat ( vmAndTemplatesWithLeasesIds , org.hamcrest.Matchers.contains ( FixturesTool.VM_TEMPLATE_RHEL5_2 ) ) ; }

Target:
public void testGetAllWithLeaseOnStorageDomain ( ) { java.util.List < org.ovirt.engine.core.compat.Guid > vmAndTemplatesWithLeasesIds = dao.getAllWithLeaseOnStorageDomain ( FixturesTool.STORAGE_DOMAIN_NFS2_1 ) . stream ( ) . map ( VmTemplate :: getId ) . collect ( java.util.stream.Collectors.toList ( ) ) ; org.hamcrest.MatcherAssert.assertThat ( vmAndTemplatesWithLeasesIds , org.hamcrest.Matchers.contains ( FixturesTool.VM_TEMPLATE_RHEL5_2 ) ) ; }
Source:
public org.ovirt.engine.core.common.businessentities.VmWatchdog resolve ( org.ovirt.engine.core.compat.Guid id ) throws org.ovirt.engine.api.restapi.resource.BackendFailureException { java.util.List < org.ovirt.engine.core.common.businessentities.VmWatchdog > watchdogs = getBackendCollection ( VdcQueryType.GetWatchdog , new org.ovirt.engine.core.common.queries.IdQueryParameters ( instanteTypeId ) ) ; for ( org.ovirt.engine.core.common.businessentities.VmWatchdog watchdog : watchdogs ) { if ( java.util.Objects.equals ( watchdog.getId ( ) , id ) ) { return watchdog ; } } return null ; }

Target:
public org.ovirt.engine.core.common.businessentities.VmWatchdog resolve ( org.ovirt.engine.core.compat.Guid id ) throws org.ovirt.engine.api.restapi.resource.BackendFailureException { java.util.List < org.ovirt.engine.core.common.businessentities.VmWatchdog > watchdogs = getBackendCollection ( QueryType.GetWatchdog , new org.ovirt.engine.core.common.queries.IdQueryParameters ( instanteTypeId ) ) ; for ( org.ovirt.engine.core.common.businessentities.VmWatchdog watchdog : watchdogs ) { if ( java.util.Objects.equals ( watchdog.getId ( ) , id ) ) { return watchdog ; } } return null ; }
Source:
public void testFilter ( ) throws org.apache.xmlrpc.XmlRpcException { java.util.List < java.lang.String > result = proxy.filter ( new java.lang.String [ ] { org.ovirt.schedulerproxy.SchedulerProxyTest.FILE_NAME } , org.ovirt.schedulerproxy.SchedulerProxyTest.HOST_ARRAY , org.ovirt.schedulerproxy.SchedulerProxyTest.VM_ID , "" ) ; org.junit.Assert.assertTrue ( ( ( result.size ( ) ) == ( org.ovirt.schedulerproxy.SchedulerProxyTest.HOST_ARRAY.length ) ) ) ; org.junit.Assert.assertTrue ( result.contains ( org.ovirt.schedulerproxy.SchedulerProxyTest.HOST_ID1 ) ) ; org.junit.Assert.assertTrue ( result.contains ( org.ovirt.schedulerproxy.SchedulerProxyTest.HOST_ID2 ) ) ; }

Target:
public void testFilter ( ) throws org.apache.xmlrpc.XmlRpcException { java.util.List < java.lang.String > result = proxy.filter ( new java.lang.String [ ] { org.ovirt.schedulerproxy.SchedulerProxyTest.CLASS_NAME } , org.ovirt.schedulerproxy.SchedulerProxyTest.HOST_ARRAY , org.ovirt.schedulerproxy.SchedulerProxyTest.VM_ID , "" ) ; org.junit.Assert.assertTrue ( ( ( result.size ( ) ) == ( org.ovirt.schedulerproxy.SchedulerProxyTest.HOST_ARRAY.length ) ) ) ; org.junit.Assert.assertTrue ( result.contains ( org.ovirt.schedulerproxy.SchedulerProxyTest.HOST_ID1 ) ) ; org.junit.Assert.assertTrue ( result.contains ( org.ovirt.schedulerproxy.SchedulerProxyTest.HOST_ID2 ) ) ; }
Source:
private static void reportInvalidInterfacesForNetwork ( java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > interfaces , org.ovirt.engine.core.common.businessentities.network.Network network , org.ovirt.engine.core.common.businessentities.VDS vds ) { if ( ( interfaces.size ( ) ) != 1 ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase logable = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( vds.getId ( ) ) ; logable.addCustomValue ( "NetworkName" , network.getName ( ) ) ; logable.addCustomValue ( "Interfaces" , org.apache.commons.lang.StringUtils.join ( org.ovirt.engine.core.common.businessentities.Entities.objectNames ( interfaces ) , "," ) ) ; org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.log ( logable , AuditLogType.BRIDGED_NETWORK_OVER_MULTIPLE_INTERFACES ) ; } }

Target:
protected static org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase createHostNetworkAuditLog ( org.ovirt.engine.core.common.businessentities.network.Network network , org.ovirt.engine.core.common.businessentities.VDS vds ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase logable = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( vds.getId ( ) ) ; logable.addCustomValue ( "NetworkName" , network.getName ( ) ) ; return logable ; }
Source:
public void getCinderVolumeTypesList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storageDomainId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter < java.util.List < org.ovirt.engine.core.common.businessentities.storage.CinderVolumeType > > ( ) { @ java.lang.Override public java.util.List < org.ovirt.engine.core.common.businessentities.storage.CinderVolumeType > Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return ( ( java.util.List < org.ovirt.engine.core.common.businessentities.storage.CinderVolumeType > ) ( source ) ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetCinderVolumeTypesByStorageDomainId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( storageDomainId ) , aQuery ) ; }

Target:
public void getClusterFeaturesByClusterId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.Set < org.ovirt.engine.core.common.businessentities.SupportedAdditionalClusterFeature > ) ( source ) ) : new java.util.HashSet < org.ovirt.engine.core.common.businessentities.SupportedAdditionalClusterFeature > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetClusterFeaturesByClusterId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( clusterId ) , aQuery ) ; }
Source:
protected boolean setAndValidateCpuProfile ( ) { getVm ( ) . getStaticData ( ) . setVdsGroupId ( org.ovirt.engine.core.bll.ImportVmCommandBase.getVdsGroupId ( ) ) ; getVm ( ) . getStaticData ( ) . setCpuProfileId ( org.ovirt.engine.core.bll.ImportVmCommandBase.getParameters ( ) . getCpuProfileId ( ) ) ; return validate ( org.ovirt.engine.core.bll.profiles.CpuProfileHelper.setAndValidateCpuProfile ( getVm ( ) . getStaticData ( ) , org.ovirt.engine.core.bll.ImportVmCommandBase.getVdsGroup ( ) . getCompatibilityVersion ( ) , org.ovirt.engine.core.bll.ImportVmCommandBase.getUserId ( ) ) ) ; }

Target:
protected boolean setAndValidateCpuProfile ( ) { getVm ( ) . getStaticData ( ) . setVdsGroupId ( org.ovirt.engine.core.bll.ImportVmCommandBase.getVdsGroupId ( ) ) ; getVm ( ) . getStaticData ( ) . setCpuProfileId ( org.ovirt.engine.core.bll.ImportVmCommandBase.getParameters ( ) . getCpuProfileId ( ) ) ; return validate ( cpuProfileHelper.setAndValidateCpuProfile ( getVm ( ) . getStaticData ( ) , org.ovirt.engine.core.bll.ImportVmCommandBase.getVdsGroup ( ) . getCompatibilityVersion ( ) , org.ovirt.engine.core.bll.ImportVmCommandBase.getUserId ( ) ) ) ; }
Source:
protected boolean isOsSupportingHotPlug ( ) { int vmOs = org.ovirt.engine.core.bll.VmCommand.getVm ( ) . getOs ( ) ; java.lang.String [ ] unsupportedOSs = org.ovirt.engine.core.common.config.Config.< java.lang.String > GetValue ( ConfigValues.HotPlugUnsupportedOsList ) . split ( "," ) ; for ( java.lang.String os : unsupportedOSs ) { if ( os.equalsIgnoreCase ( osRepository.getOsName ( vmOs ) ) ) { addCanDoActionMessage ( VdcBllMessages.ACTION_TYPE_FAILED_GUEST_OS_VERSION_IS_NOT_SUPPORTED ) ; return false ; } } return true ; }

Target:
protected boolean isNicSupportedForPlugUnPlug ( ) { if ( osRepository.hasNicHotplugSupport ( org.ovirt.engine.core.bll.VmCommand.getVm ( ) . getOs ( ) , org.ovirt.engine.core.bll.VmCommand.getVm ( ) . getVdsGroupCompatibilityVersion ( ) ) ) { return true ; } return failCanDoAction ( VdcBllMessages.ACTION_TYPE_FAILED_GUEST_OS_VERSION_IS_NOT_SUPPORTED ) ; }
Source:
public void getGlusterHookContent ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hookId , org.ovirt.engine.core.compat.Guid serverId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? source : "" ; } } ; org.ovirt.engine.core.common.queries.gluster.GlusterHookContentQueryParameters parameters = new org.ovirt.engine.core.common.queries.gluster.GlusterHookContentQueryParameters ( hookId ) ; parameters.setGlusterServerId ( serverId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterHookContent , parameters , aQuery ) ; }

Target:
public void getGlusterBricksForServer ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid serverId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? source : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterVolumeBricksByServerId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( serverId ) , aQuery ) ; }