auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void clearPoolTimers ( ) { org.ovirt.engine.core.vdsbroker.irsbroker.IrsProxyData.log.info ( ( "clear domain error-timers for pool " + ( _storagePoolId ) ) ) ; for ( java.lang.String jobId : _timers.values ( ) ) { try { org.ovirt.engine.core.utils.timer.SchedulerUtilQuartzImpl.getInstance ( ) . deleteJob ( jobId ) ; } catch ( java.lang.Exception e ) { org.ovirt.engine.core.vdsbroker.irsbroker.IrsProxyData.log.warn ( ( "failed deleting job " + jobId ) ) ; } } }

Target:
public void clearCache ( ) { org.ovirt.engine.core.vdsbroker.irsbroker.IrsProxyData.log.info ( "clearing cache for problematic entities in pool '{}'." , _storagePoolId ) ; _timers.clear ( ) ; _domainsInProblem.clear ( ) ; }
Source:
public int compare ( org.ovirt.engine.core.common.businessentities.MacPool o1 , org.ovirt.engine.core.common.businessentities.MacPool o2 ) { if ( o1.isDefaultPool ( ) ) { return - 1 ; } else if ( o2.isDefaultPool ( ) ) { return 1 ; } else { return lexoNumeric.compare ( o1.getName ( ) , o2.getName ( ) ) ; } }

Target:
public int compare ( org.ovirt.engine.core.common.businessentities.MacPool o1 , org.ovirt.engine.core.common.businessentities.MacPool o2 ) { int retVal = ( - 1 ) * ( java.lang.Boolean.compare ( o1.isDefaultPool ( ) , o2.isDefaultPool ( ) ) ) ; if ( retVal != 0 ) { return retVal ; } return lexoNumeric.compare ( o1.getName ( ) , o2.getName ( ) ) ; }
Source:
private java.util.List < java.lang.String > getExisitingHostNetworkNames ( ) { java.util.List < java.lang.String > list = new java.util.ArrayList < java.lang.String > ( getExistingIfaces ( ) . size ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.VdsNetworkInterface iface : getExistingIfaces ( ) . values ( ) ) { if ( org.apache.commons.lang.StringUtils.isNotBlank ( iface.getNetworkName ( ) ) ) { list.add ( iface.getNetworkName ( ) ) ; } } return list ; }

Target:
private void extractRemovedNetworks ( ) { for ( org.ovirt.engine.core.common.businessentities.VdsNetworkInterface iface : getExistingIfaces ( ) . values ( ) ) { java.lang.String net = iface.getNetworkName ( ) ; if ( ( org.apache.commons.lang.StringUtils.isNotBlank ( net ) ) && ( ! ( attachedNetworksNames.contains ( net ) ) ) ) { removedNetworks.add ( net ) ; } } }
Source:
private void insertSpmIdToDb ( int expected , int ... given ) { java.util.List < org.ovirt.engine.core.common.businessentities.vds_spm_id_map > list = java.util.Arrays.stream ( given ) . mapToObj ( ( i ) -> new org.ovirt.engine.core.common.businessentities.vds_spm_id_map ( spId , vdsId , i ) ) . collect ( java.util.stream.Collectors.toList ( ) ) ; cmd.insertSpmIdToDb ( list ) ; org.mockito.Mockito.verify ( vdsSpmIdMapDao ) . save ( new org.ovirt.engine.core.common.businessentities.vds_spm_id_map ( spId , vdsId , expected ) ) ; }

Target:
private void insertSpmIdToDb ( int expected , int ... given ) { java.util.List < org.ovirt.engine.core.common.businessentities.VdsSpmIdMap > list = java.util.Arrays.stream ( given ) . mapToObj ( ( i ) -> new org.ovirt.engine.core.common.businessentities.VdsSpmIdMap ( spId , vdsId , i ) ) . collect ( java.util.stream.Collectors.toList ( ) ) ; cmd.insertSpmIdToDb ( list ) ; org.mockito.Mockito.verify ( vdsSpmIdMapDao ) . save ( new org.ovirt.engine.core.common.businessentities.VdsSpmIdMap ( spId , vdsId , expected ) ) ; }
Source:
protected boolean validateSpaceRequirements ( ) { for ( java.util.Map.Entry < org.ovirt.engine.core.compat.Guid , java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > > sdImageEntry : storageToDisksMap.entrySet ( ) ) { org.ovirt.engine.core.common.businessentities.StorageDomain destStorageDomain = destStorages.get ( sdImageEntry.getKey ( ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > disksList = sdImageEntry.getValue ( ) ; org.ovirt.engine.core.bll.validator.StorageDomainValidator storageDomainValidator = createStorageDomainValidator ( destStorageDomain ) ; if ( ( ! ( validateDomainsThreshold ( storageDomainValidator ) ) ) || ( ! ( validateFreeSpace ( storageDomainValidator , disksList ) ) ) ) { return false ; } } return true ; }

Target:
private boolean validateDomainsThreshold ( org.ovirt.engine.core.bll.validator.storage.StorageDomainValidator storageDomainValidator ) { return validate ( storageDomainValidator.isDomainWithinThresholds ( ) ) ; }
Source:
public void edit ( final org.ovirt.engine.ui.uicommonweb.models.hosts.HostBondInterfaceModel object ) { super . edit ( object ) ; bondSuggestEditor.setVisible ( true ) ; bondEditor.setVisible ( false ) ; info.setVisible ( false ) ; message.setVisible ( false ) ; layoutPanel.remove ( infoPanel ) ; layoutPanel.getElement ( ) . getStyle ( ) . setOverflow ( Overflow.HIDDEN ) ; asPopupPanel ( ) . setPixelSize ( 400 , 275 ) ; }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event < ? extends org.ovirt.engine.ui.uicompat.EventArgs > ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { org.ovirt.engine.ui.uicommonweb.models.ListModel < java.util.Map.Entry < java.lang.String , org.ovirt.engine.ui.uicommonweb.models.EntityModel < java.lang.String > > > list = ( ( org.ovirt.engine.ui.uicommonweb.models.ListModel < java.util.Map.Entry < java.lang.String , org.ovirt.engine.ui.uicommonweb.models.EntityModel < java.lang.String > > > ) ( sender ) ) ; updateBondOptions ( list ) ; }
Source:
private static void setBootProtocolAndGateway ( org.ovirt.engine.core.vdsbroker.vdsbroker.BootProtocolResolver bootProtocolResolver , org.ovirt.engine.core.vdsbroker.vdsbroker.IpInfoFetcher ipInfoFetcher , java.util.function.Consumer < org.ovirt.engine.core.common.businessentities.network.NetworkBootProtocol > bootProtocolSetter , java.util.function.Consumer < java.lang.String > gatewaySetter ) { final org.ovirt.engine.core.common.businessentities.network.NetworkBootProtocol bootProtocol = bootProtocolResolver.resolve ( ipInfoFetcher ) ; bootProtocolSetter.accept ( bootProtocol ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectsBuilder.setGateway ( bootProtocol , ipInfoFetcher , gatewaySetter ) ; }

Target:
private static void setBootProtocolAndGateway ( org.ovirt.engine.core.vdsbroker.vdsbroker.BootProtocolResolver bootProtocolResolver , org.ovirt.engine.core.vdsbroker.vdsbroker.IpInfoFetcher ipInfoFetcher , java.util.function.Consumer < org.ovirt.engine.core.common.businessentities.network.Ipv4BootProtocol > bootProtocolSetter , java.util.function.Consumer < java.lang.String > gatewaySetter ) { final org.ovirt.engine.core.common.businessentities.network.Ipv4BootProtocol bootProtocol = bootProtocolResolver.resolve ( ipInfoFetcher ) ; bootProtocolSetter.accept ( bootProtocol ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectsBuilder.setGateway ( bootProtocol , ipInfoFetcher , gatewaySetter ) ; }
Source:
protected boolean validateVdsCluster ( ) { org.ovirt.engine.core.common.businessentities.VDSGroup vdsGroup = org.ovirt.engine.core.bll.ImportVmCommandBase.getVdsGroupDao ( ) . get ( org.ovirt.engine.core.bll.ImportVmCommandBase.getVdsGroupId ( ) ) ; return vdsGroup == null ? failCanDoAction ( VdcBllMessages.VDS_CLUSTER_IS_NOT_VALID ) : ( vdsGroup.getArchitecture ( ) ) != ( org.ovirt.engine.core.bll.ImportVmCommandBase.getVm ( ) . getClusterArch ( ) ) ? failCanDoAction ( VdcBllMessages.ACTION_TYPE_FAILED_VM_CANNOT_IMPORT_VM_ARCHITECTURE_NOT_SUPPORTED_BY_CLUSTER ) : true ; }

Target:
protected boolean validateVdsCluster ( ) { org.ovirt.engine.core.common.businessentities.VDSGroup vdsGroup = org.ovirt.engine.core.bll.ImportVmCommandBase.getVdsGroupDao ( ) . get ( org.ovirt.engine.core.bll.ImportVmCommandBase.getVdsGroupId ( ) ) ; return vdsGroup == null ? failCanDoAction ( EngineMessage.VDS_CLUSTER_IS_NOT_VALID ) : ( vdsGroup.getArchitecture ( ) ) != ( org.ovirt.engine.core.bll.ImportVmCommandBase.getVm ( ) . getClusterArch ( ) ) ? failCanDoAction ( EngineMessage.ACTION_TYPE_FAILED_VM_CANNOT_IMPORT_VM_ARCHITECTURE_NOT_SUPPORTED_BY_CLUSTER ) : true ; }
Source:
public java.lang.String toString ( ) { java.lang.StringBuilder builder = new java.lang.StringBuilder ( ) ; builder.append ( "\n" ) ; builder.append ( super . toString ( ) ) ; builder.append ( "\n" ) ; org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcObjectDescriptor.ToStringBuilder ( lunList , builder ) ; return builder.toString ( ) ; }

Target:
public java.lang.String toString ( ) { java.lang.StringBuilder builder = new java.lang.StringBuilder ( ) ; builder.append ( "\n" ) ; builder.append ( super . toString ( ) ) ; builder.append ( "\n" ) ; org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcObjectDescriptor.toStringBuilder ( lunList , builder ) ; return builder.toString ( ) ; }
Source:
private boolean validateDestStorage ( org.ovirt.engine.core.compat.Guid imageId , org.ovirt.engine.core.compat.Guid destDomainId ) { org.ovirt.engine.core.bll.validator.StorageDomainValidator validator = getValidator ( destDomainId , org.ovirt.engine.core.bll.lsm.LiveMigrateVmDisksCommand.getStoragePoolId ( ) . getValue ( ) ) ; return ( validate ( validator.isDomainExistAndActive ( ) ) ) && ( validate ( validator.domainIsValidDestination ( ) ) ) ; }

Target:
private boolean validateSourceStorageDomain ( org.ovirt.engine.core.compat.Guid imageId ) { org.ovirt.engine.core.common.businessentities.DiskImage diskImage = getDiskImageById ( imageId ) ; org.ovirt.engine.core.compat.Guid domainId = diskImage.getStorageIds ( ) . get ( 0 ) ; org.ovirt.engine.core.bll.validator.StorageDomainValidator validator = getValidator ( domainId , org.ovirt.engine.core.bll.lsm.LiveMigrateVmDisksCommand.getStoragePoolId ( ) ) ; return validate ( validator.isDomainExistAndActive ( ) ) ; }
Source:
public void validateDomainNotWithinThreshold ( ) { setupForStorageTests ( ) ; org.mockito.Mockito.doReturn ( new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_DISK_SPACE_LOW_ON_STORAGE_DOMAIN ) ) . when ( multipleSdValidator ) . allDomainsWithinThresholds ( ) ; org.junit.Assert.assertFalse ( command.validate ( ) ) ; org.junit.Assert.assertTrue ( command.getReturnValue ( ) . getValidationMessages ( ) . contains ( EngineMessage.ACTION_TYPE_FAILED_DISK_SPACE_LOW_ON_STORAGE_DOMAIN.toString ( ) ) ) ; org.mockito.Mockito.verify ( multipleSdValidator ) . allDomainsWithinThresholds ( ) ; org.mockito.Mockito.verify ( multipleSdValidator , org.mockito.Mockito.never ( ) ) . allDomainsHaveSpaceForNewDisks ( org.mockito.ArgumentMatchers.any ( ) ) ; }

Target:
public void validateDomainNotWithinThreshold ( ) { setupForStorageTests ( ) ; org.mockito.Mockito.doReturn ( new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_DISK_SPACE_LOW_ON_STORAGE_DOMAIN ) ) . when ( multipleSdValidator ) . allDomainsWithinThresholds ( ) ; org.junit.jupiter.api.Assertions.assertFalse ( command.validate ( ) ) ; org.junit.jupiter.api.Assertions.assertTrue ( command.getReturnValue ( ) . getValidationMessages ( ) . contains ( EngineMessage.ACTION_TYPE_FAILED_DISK_SPACE_LOW_ON_STORAGE_DOMAIN.toString ( ) ) ) ; org.mockito.Mockito.verify ( multipleSdValidator ) . allDomainsWithinThresholds ( ) ; org.mockito.Mockito.verify ( multipleSdValidator , org.mockito.Mockito.never ( ) ) . allDomainsHaveSpaceForNewDisks ( org.mockito.ArgumentMatchers.any ( ) ) ; }
Source:
org.ovirt.engine.core.bll.ValidationResult networksUniquelyConfiguredOnHost ( java.util.Collection < org.ovirt.engine.core.common.businessentities.network.NetworkAttachment > attachmentsToConfigure ) { java.util.Set < org.ovirt.engine.core.compat.Guid > usedNetworkIds = new java.util.HashSet ( attachmentsToConfigure.size ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.network.NetworkAttachment attachment : attachmentsToConfigure ) { boolean alreadyUsedNetworkId = usedNetworkIds.contains ( attachment.getNetworkId ( ) ) ; if ( alreadyUsedNetworkId ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.NETWORKS_ALREADY_ATTACHED_TO_IFACES ) ; } else { usedNetworkIds.add ( attachment.getNetworkId ( ) ) ; } } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }

Target:
org.ovirt.engine.core.bll.ValidationResult networksUniquelyConfiguredOnHost ( java.util.Collection < org.ovirt.engine.core.common.businessentities.network.NetworkAttachment > attachmentsToConfigure ) { java.util.Set < org.ovirt.engine.core.compat.Guid > usedNetworkIds = new java.util.HashSet ( attachmentsToConfigure.size ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.network.NetworkAttachment attachment : attachmentsToConfigure ) { boolean alreadyUsedNetworkId = usedNetworkIds.contains ( attachment.getNetworkId ( ) ) ; if ( alreadyUsedNetworkId ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.NETWORKS_ALREADY_ATTACHED_TO_IFACES ) ; } else { usedNetworkIds.add ( attachment.getNetworkId ( ) ) ; } } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }
Source:
public void testQueryForInvalidVolumeId ( ) { org.mockito.Mockito.doReturn ( Guid.Empty ) . when ( getQueryParameters ( ) ) . getVolumeId ( ) ; org.mockito.Mockito.doReturn ( null ) . when ( volumeDao ) . getById ( Guid.Empty ) ; getQuery ( ) . executeQueryCommand ( ) ; }

Target:
public void testQueryForInvalidVolumeId ( ) { org.mockito.Mockito.doReturn ( Guid.Empty ) . when ( getQueryParameters ( ) ) . getVolumeId ( ) ; org.mockito.Mockito.doReturn ( null ) . when ( volumeDao ) . getById ( Guid.Empty ) ; getQuery ( ) . executeQueryCommand ( ) ; org.ovirt.engine.core.common.queries.VdcQueryReturnValue returnValue = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( getQuery ( ) . getReturnValue ( ) ) ) ; org.junit.Assert.assertEquals ( VdcBllMessages.GLUSTER_VOLUME_ID_INVALID , returnValue.getExceptionString ( ) ) ; }
Source:
public static void getPermittedStorageDomainsByStoragePoolId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId , org.ovirt.engine.core.common.businessentities.ActionGroup actionGroup ) { 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.StorageDomain > ( ) ; } return source ; } } ; org.ovirt.engine.core.common.queries.GetPermittedStorageDomainsByStoragePoolIdParameters params = new org.ovirt.engine.core.common.queries.GetPermittedStorageDomainsByStoragePoolIdParameters ( ) ; params.setStoragePoolId ( dataCenterId ) ; params.setActionGroup ( actionGroup ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetPermittedStorageDomainsByStoragePoolId , params , aQuery ) ; }

Target:
public static void getNextAvailableDiskAliasNameByVMId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , 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 ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetNextAvailableDiskAliasNameByVMId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) , aQuery ) ; }
Source:
private java.util.Set < java.lang.String > hostNameSet ( java.util.List < org.ovirt.engine.core.common.businessentities.VDS > hosts ) { java.util.Set < java.lang.String > existingHostNames = new java.util.HashSet < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.VDS host : hosts ) { existingHostNames.add ( host.getHostName ( ) ) ; } return existingHostNames ; }

Target:
private java.util.Set < java.lang.String > hostNameSet ( java.util.List < org.ovirt.engine.core.common.businessentities.VDS > hosts ) { return hosts.stream ( ) . map ( VDS :: getHostName ) . collect ( java.util.stream.Collectors.toSet ( ) ) ; }
Source:
public void executeCommand ( ) { cmd = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.gluster.EnableGlusterHookCommand ( new org.ovirt.engine.core.common.action.gluster.GlusterHookParameters ( CLUSTER_ID , HOOK_ID ) ) ) ; setupMocks ( cmd ) ; mockBackend ( cmd , true ) ; cmd.executeCommand ( ) ; org.mockito.Mockito.verify ( cmd , org.mockito.Mockito.atLeast ( 1 ) ) . addServerHookInDb ( org.mockito.Matchers.any ( org.ovirt.engine.core.common.businessentities.gluster.GlusterServerHook.class ) ) ; org.junit.Assert.assertEquals ( cmd.getAuditLogTypeValue ( ) , AuditLogType.GLUSTER_HOOK_ENABLE ) ; }

Target:
public void executeCommand ( ) { cmd = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.gluster.EnableGlusterHookCommand < org.ovirt.engine.core.common.action.gluster.GlusterHookParameters > ( new org.ovirt.engine.core.common.action.gluster.GlusterHookParameters ( HOOK_ID ) ) ) ; setupMocks ( cmd ) ; mockBackendStatusChange ( cmd , true ) ; cmd.executeCommand ( ) ; org.junit.Assert.assertEquals ( cmd.getAuditLogTypeValue ( ) , AuditLogType.GLUSTER_HOOK_ENABLE ) ; }
Source:
protected java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > getDisksList ( ) { if ( ( cachedSelectedActiveDisks ) == null ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > imagesAndCinderForVm = getDiskImagesForVm ( ) ; if ( ( getParameters ( ) . getDisks ( ) ) == null ) { cachedSelectedActiveDisks = imagesAndCinderForVm ; } else { cachedSelectedActiveDisks = org.ovirt.engine.core.bll.ImagesHandler.imagesIntersection ( imagesAndCinderForVm , getParameters ( ) . getDisks ( ) ) ; } } return cachedSelectedActiveDisks ; }

Target:
protected java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > getDisksList ( ) { if ( ( cachedSelectedActiveDisks ) == null ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > imagesAndCinderForVm = getDiskImagesForVm ( ) ; if ( ( getParameters ( ) . getDisks ( ) ) == null ) { cachedSelectedActiveDisks = imagesAndCinderForVm ; } else { cachedSelectedActiveDisks = org.ovirt.engine.core.bll.storage.disk.image.ImagesHandler.imagesIntersection ( imagesAndCinderForVm , getParameters ( ) . getDisks ( ) ) ; } } return cachedSelectedActiveDisks ; }
Source:
public void testGetExtendedHostDevicesByHostId ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.HostDeviceView > hostDevices = dao.getExtendedHostDevicesByHostId ( org.ovirt.engine.core.dao.HostDeviceDaoTest.EXISTING_HOST_ID ) ; org.junit.Assert.assertEquals ( getEntitiesTotalCount ( ) , hostDevices.size ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.HostDeviceView hostDevice : hostDevices ) { org.junit.Assert.assertEquals ( org.ovirt.engine.core.dao.HostDeviceDaoTest.EXISTING_HOST_ID , hostDevice.getHostId ( ) ) ; } }

Target:
public void testGetExtendedHostDevicesByHostId ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.HostDeviceView > hostDevices = dao.getExtendedHostDevicesByHostId ( FixturesTool.VDS_RHEL6_NFS_SPM ) ; org.junit.Assert.assertEquals ( getEntitiesTotalCount ( ) , hostDevices.size ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.HostDeviceView hostDevice : hostDevices ) { org.junit.Assert.assertEquals ( FixturesTool.VDS_RHEL6_NFS_SPM , hostDevice.getHostId ( ) ) ; } }
Source:
public void BuildVirtualSystem ( ) { _writer.WriteStartElement ( "Content" ) ; _writer.WriteAttributeString ( org.ovirt.engine.core.utils.ovf.OVF_URI , "id" , "out" ) ; _writer.WriteAttributeString ( org.ovirt.engine.core.utils.ovf.XSI_URI , "type" , ( ( OVF_PREFIX ) + ":VirtualSystem_Type" ) ) ; WriteGeneralData ( ) ; WriteAppList ( ) ; WriteContentItems ( ) ; _writer.WriteEndElement ( ) ; }

Target:
public void BuildVirtualSystem ( ) { _writer.WriteStartElement ( "Content" ) ; _writer.WriteAttributeString ( org.ovirt.engine.core.utils.ovf.OVF_URI , "id" , "out" ) ; _writer.WriteAttributeString ( org.ovirt.engine.core.utils.ovf.XSI_URI , "type" , ( ( OVF_PREFIX ) + ":VirtualSystem_Type" ) ) ; writeGeneralData ( ) ; WriteAppList ( ) ; WriteContentItems ( ) ; _writer.WriteEndElement ( ) ; }
Source:
public void testValidUpdateOfHotSetEditableFieldOnRunningVm ( ) { int srcNumOfSockets = 2 ; int destNumOfSockets = 4 ; org.ovirt.engine.core.common.businessentities.VmStatic src = new org.ovirt.engine.core.common.businessentities.VmStatic ( ) ; src.setNumOfSockets ( srcNumOfSockets ) ; org.ovirt.engine.core.common.businessentities.VmStatic dest = new org.ovirt.engine.core.common.businessentities.VmStatic ( ) ; dest.setNumOfSockets ( destNumOfSockets ) ; boolean updateIsValid = vmHandler.isUpdateValid ( src , dest , VMStatus.Up , true ) ; org.junit.Assert.assertTrue ( "Update should be valid for different number of sockets on a running VM" , updateIsValid ) ; }

Target:
public void testValidUpdateOfHotSetEditableFieldOnRunningVm ( ) { int srcNumOfSockets = 2 ; int destNumOfSockets = 4 ; org.ovirt.engine.core.common.businessentities.VmStatic src = new org.ovirt.engine.core.common.businessentities.VmStatic ( ) ; src.setNumOfSockets ( srcNumOfSockets ) ; org.ovirt.engine.core.common.businessentities.VmStatic dest = new org.ovirt.engine.core.common.businessentities.VmStatic ( ) ; dest.setNumOfSockets ( destNumOfSockets ) ; boolean updateIsValid = vmHandler.isUpdateValid ( src , dest , VMStatus.Up , true ) ; org.junit.jupiter.api.Assertions.assertTrue ( updateIsValid , "Update should be valid for different number of sockets on a running VM" ) ; }
Source:
private org.apache.http.conn.ClientConnectionManager createPoolingClientConnectionManager ( java.lang.String url , int port ) { org.apache.http.conn.scheme.SchemeRegistry schemeRegistry = createSchemeRegistry ( url , port ) ; org.apache.http.impl.conn.PoolingClientConnectionManager cm = new org.apache.http.impl.conn.PoolingClientConnectionManager ( schemeRegistry ) ; cm.setMaxTotal ( org.ovirt.engine.sdk.web.ConnectionsPoolBuilder.MAX_CONNECTIONS ) ; cm.setDefaultMaxPerRoute ( org.ovirt.engine.sdk.web.ConnectionsPoolBuilder.MAX_CONNECTIONS_PER_ROUTE ) ; cm.setMaxPerRoute ( new org.apache.http.conn.routing.HttpRoute ( new org.apache.http.HttpHost ( getHost ( url ) , getPort ( url , port ) ) ) , org.ovirt.engine.sdk.web.ConnectionsPoolBuilder.MAX_CONNECTIONS_PER_HOST ) ; new org.ovirt.engine.sdk.web.IdleConnectionMonitorThread ( cm , org.ovirt.engine.sdk.web.ConnectionsPoolBuilder.WAIT_IDLE_CHECK_TTL , org.ovirt.engine.sdk.web.ConnectionsPoolBuilder.WAIT_IDLE_CLOSE_TTL ) . start ( ) ; return cm ; }

Target:
public org.ovirt.engine.sdk.web.ConnectionsPool build ( ) { return new org.ovirt.engine.sdk.web.ConnectionsPool ( createDefaultHttpClient ( url , username , password , key_file , cert_file , ca_file , port , timeout ) , this . urlobj , org.ovirt.engine.sdk.web.ConnectionsPoolBuilder.WAIT_IDLE_CHECK_TTL , org.ovirt.engine.sdk.web.ConnectionsPoolBuilder.WAIT_IDLE_CLOSE_TTL ) ; }
Source:
public void insertAsyncTaskEntity ( org.ovirt.engine.core.compat.Guid taskId , org.ovirt.engine.core.compat.Guid entityId , org.ovirt.engine.core.common.VdcObjectType entityType ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) ; parameterSource.addValue ( "task_id" , taskId ) . addValue ( "entity_id" , entityId ) . addValue ( "entity_type" , entityType ) ; getCallsHandler ( ) . executeModification ( "InsertAsyncTaskEntities" , parameterSource ) ; }

Target:
public java.util.List < org.ovirt.engine.core.common.businessentities.AsyncTaskEntity > getAllAsyncTaskEntitiesByTaskId ( org.ovirt.engine.core.compat.Guid taskId ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) . addValue ( "task_id" , taskId ) ; return getCallsHandler ( ) . executeReadList ( "GetAsyncTaskEntitiesByTaskId" , org.ovirt.engine.core.dao.AsyncTaskDAODbFacadeImpl.AsyncTaskEntityRowMapper.instance , parameterSource ) ; }
Source:
default int compareTo ( org.ovirt.api.metamodel.concepts.Named that ) { return this . getName ( ) . compareTo ( that.getName ( ) ) ; }

Target:
default int compareTo ( org.ovirt.api.metamodel.concepts.Named that ) { org.ovirt.api.metamodel.concepts.Name thisName = this . getName ( ) ; org.ovirt.api.metamodel.concepts.Name thatName = that.getName ( ) ; if ( ( thisName == null ) && ( thatName != null ) ) { return - 1 ; } if ( thisName == null ) { return 0 ; } if ( thatName == null ) { return 1 ; } return thisName.compareTo ( thatName ) ; }
Source:
public void getStorageDomainsByConnection ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , java.lang.String connectionPath ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ) ( source ) ) : null ; } } ; org.ovirt.engine.core.common.queries.GetStorageDomainsByConnectionParameters param = new org.ovirt.engine.core.common.queries.GetStorageDomainsByConnectionParameters ( ) ; param.setConnection ( connectionPath ) ; if ( storagePoolId != null ) { param.setStoragePoolId ( storagePoolId ) ; } org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageDomainsByConnection , param , aQuery ) ; }

Target:
public void getExistingStorageDomainList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hostId , org.ovirt.engine.core.common.businessentities.StorageDomainType domainType , org.ovirt.engine.core.common.businessentities.storage.StorageType storageType , java.lang.String path ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetExistingStorageDomainList , new org.ovirt.engine.core.common.queries.GetExistingStorageDomainListParameters ( hostId , storageType , domainType , path ) , aQuery ) ; }
Source:
private java.util.List < org.ovirt.engine.core.common.businessentities.UserSession > searchSessions ( ) { final java.util.List < org.ovirt.engine.core.common.businessentities.EngineSession > engineSessions = genericSearch ( org.ovirt.engine.core.bll.SearchQuery.getDbFacade ( ) . getEngineSessionDao ( ) , false ) ; return org.ovirt.engine.core.utils.linq.LinqUtils.transformToList ( engineSessions , new org.ovirt.engine.core.utils.linq.Function < org.ovirt.engine.core.common.businessentities.EngineSession , org.ovirt.engine.core.common.businessentities.UserSession > ( ) { @ java.lang.Override public org.ovirt.engine.core.common.businessentities.UserSession eval ( org.ovirt.engine.core.common.businessentities.EngineSession engineSession ) { return new org.ovirt.engine.core.common.businessentities.UserSession ( engineSession ) ; } } ) ; }

Target:
private java.util.List < org.ovirt.engine.core.common.businessentities.UserSession > searchSessions ( ) { return genericSearch ( org.ovirt.engine.core.bll.SearchQuery.getDbFacade ( ) . getEngineSessionDao ( ) , false ) . stream ( ) . map ( UserSession :: new ) . collect ( java.util.stream.Collectors.toList ( ) ) ; }
Source:
private static org.ovirt.engine.core.common.businessentities.storage_domain_static CloneStorageDomainStatic ( org.ovirt.engine.core.common.businessentities.storage_domain_static instance ) { org.ovirt.engine.core.common.businessentities.storage_domain_static obj = new org.ovirt.engine.core.common.businessentities.storage_domain_static ( ) ; obj.setConnection ( instance.getConnection ( ) ) ; obj.setId ( instance.getId ( ) ) ; obj.setstorage ( instance.getstorage ( ) ) ; obj.setstorage_domain_type ( instance.getstorage_domain_type ( ) ) ; obj.setstorage_type ( instance.getstorage_type ( ) ) ; obj.setstorage_name ( instance.getstorage_name ( ) ) ; obj.setStorageFormat ( instance.getStorageFormat ( ) ) ; return obj ; }

Target:
private static org.ovirt.engine.core.common.businessentities.StorageDomainStatic CloneStorageDomainStatic ( org.ovirt.engine.core.common.businessentities.StorageDomainStatic instance ) { org.ovirt.engine.core.common.businessentities.StorageDomainStatic obj = new org.ovirt.engine.core.common.businessentities.StorageDomainStatic ( ) ; obj.setConnection ( instance.getConnection ( ) ) ; obj.setId ( instance.getId ( ) ) ; obj.setstorage ( instance.getstorage ( ) ) ; obj.setstorage_domain_type ( instance.getstorage_domain_type ( ) ) ; obj.setstorage_type ( instance.getstorage_type ( ) ) ; obj.setstorage_name ( instance.getstorage_name ( ) ) ; obj.setStorageFormat ( instance.getStorageFormat ( ) ) ; return obj ; }
Source:
public void testAlreadyExistStorageDomain ( ) { org.mockito.Mockito.when ( command.getStorageDomainStaticDao ( ) . get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( org.ovirt.engine.core.bll.storage.domain.AddExistingBlockStorageDomainCommandTest.getStorageDomain ( ) ) ; org.junit.Assert.assertFalse ( "Storage Domain already exists" , command.canAddDomain ( ) ) ; org.junit.Assert.assertTrue ( "Import block Storage Domain should have failed due to already existing Storage Domain" , command.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( EngineMessage.ACTION_TYPE_FAILED_STORAGE_DOMAIN_ALREADY_EXIST.toString ( ) ) ) ; }

Target:
public void testAlreadyExistStorageDomain ( ) { org.mockito.Mockito.when ( command.getStorageDomainStaticDao ( ) . get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( org.ovirt.engine.core.bll.storage.domain.AddExistingBlockStorageDomainCommandTest.getStorageDomain ( ) ) ; org.junit.Assert.assertFalse ( "Storage Domain already exists" , command.canAddDomain ( ) ) ; org.junit.Assert.assertTrue ( "Import block Storage Domain should have failed due to already existing Storage Domain" , command.getReturnValue ( ) . getValidationMessages ( ) . contains ( EngineMessage.ACTION_TYPE_FAILED_STORAGE_DOMAIN_ALREADY_EXIST.toString ( ) ) ) ; }
Source:
protected org.ovirt.engine.core.common.businessentities.LdapGroup getEntity ( int index ) { org.ovirt.engine.core.common.businessentities.LdapGroup entity = new org.ovirt.engine.core.common.businessentities.LdapGroup ( ) ; entity.setid ( GUIDS [ index ] ) ; entity.setname ( NAMES [ index ] ) ; entity.setdomain ( org.ovirt.engine.api.restapi.resource.DOMAIN ) ; return entity ; }

Target:
protected org.ovirt.engine.core.common.businessentities.DbGroup getEntity ( int index ) { org.ovirt.engine.core.common.businessentities.DbGroup entity = new org.ovirt.engine.core.common.businessentities.DbGroup ( ) ; entity.setId ( GUIDS [ index ] ) ; entity.setName ( NAMES [ index ] ) ; entity.setDomain ( org.ovirt.engine.api.restapi.resource.DOMAIN ) ; entity.setExternalId ( new org.ovirt.engine.core.common.utils.ExternalId ( GUIDS [ index ] . toByteArray ( ) ) ) ; return entity ; }
Source:
protected void init ( ) { super . init ( ) ; resource.getParent ( ) . backend = backend ; resource.getParent ( ) . sessionHelper = sessionHelper ; resource.getParent ( ) . mappingLocator = resource.mappingLocator ; resource.getParent ( ) . httpHeaders = httpHeaders ; resource.getParent ( ) . messageBundle = messageBundle ; org.ovirt.engine.api.restapi.utils.OsTypeMockUtils.mockOsTypes ( ) ; }

Target:
protected void init ( ) { super . init ( ) ; resource.getParent ( ) . backend = backend ; resource.getParent ( ) . sessionHelper = sessionHelper ; resource.getParent ( ) . mappingLocator = resource.mappingLocator ; resource.getParent ( ) . httpHeaders = httpHeaders ; resource.getParent ( ) . messageBundle = messageBundle ; org.ovirt.engine.api.restapi.utils.OsTypeMockUtils.mockOsTypes ( ) ; initBackendResource ( vmHelper ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc glusterVolumeGeoRepConfigReset ( java.lang.String volumeName , java.lang.String slaveHost , java.lang.String slaveVolumeName , java.lang.String configKey ) { try { return new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( vdsServer.glusterVolumeGeoRepConfigReset ( volumeName , slaveHost , slaveVolumeName , configKey ) ) ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }

Target:
public org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeGeoRepConfigListXmlRpc glusterVolumeGeoRepConfigList ( java.lang.String volumeName , java.lang.String slaveHost , java.lang.String slaveVolumeName , java.lang.String userName ) { try { return new org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeGeoRepConfigListXmlRpc ( vdsServer.glusterVolumeGeoRepConfigList ( volumeName , slaveHost , slaveVolumeName , userName ) ) ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
Source:
private static java.util.List < java.lang.String > getListOfIsoFiles ( java.io.File directory ) { java.util.List < java.lang.String > isoFileList = new java.util.ArrayList < java.lang.String > ( ) ; java.io.File [ ] filterOvirtFiles = org.ovirt.engine.core.bll.GetoVirtISOsQuery.filterOvirtFiles ( directory , org.ovirt.engine.core.bll.GetoVirtISOsQuery.isoPattern ) ; for ( java.io.File file : filterOvirtFiles ) { isoFileList.add ( file.getName ( ) ) ; } return isoFileList ; }

Target:
private static java.util.List < java.lang.String > getListOfIsoFiles ( java.io.File directory ) { java.util.List < java.lang.String > isoFileList = new java.util.ArrayList < java.lang.String > ( ) ; java.io.File [ ] filterOvirtFiles = org.ovirt.engine.core.bll.GetoVirtISOsQuery.filterOvirtFiles ( directory , org.ovirt.engine.core.bll.GetoVirtISOsQuery.getIsoPattern ( ) ) ; for ( java.io.File file : filterOvirtFiles ) { isoFileList.add ( file.getName ( ) ) ; } return isoFileList ; }
Source:
public void testGetAllWithQuery ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterServerService > services = dao.getAllWithQuery ( ( ( "select * from gluster_server_services_view where status = '" + ( GlusterServiceStatus.STOPPED.name ( ) ) ) + "'" ) ) ; org.junit.Assert.assertNotNull ( services ) ; org.junit.Assert.assertEquals ( 1 , services.size ( ) ) ; verifyServiceOnServer2 ( services.get ( 0 ) ) ; }

Target:
public void testGetAllWithQuery ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterServerService > services = dao.getAllWithQuery ( ( ( "select * from gluster_server_services_view where status = '" + ( GlusterServiceStatus.STOPPED.name ( ) ) ) + "'" ) ) ; org.junit.jupiter.api.Assertions.assertNotNull ( services ) ; org.junit.jupiter.api.Assertions.assertEquals ( 1 , services.size ( ) ) ; verifyServiceOnServer2 ( services.get ( 0 ) ) ; }
Source:
private void containerChanged ( ) { if ( ( getContainer ( ) ) == null ) { return ; } org.ovirt.engine.ui.uicommonweb.models.ListModel dataCenter = getContainer ( ) . getDataCenter ( ) ; dataCenter.getSelectedItemChangedEvent ( ) . addListener ( new org.ovirt.engine.core.compat.IEventListener ( ) { @ java.lang.Override public void eventRaised ( org.ovirt.engine.core.compat.Event ev , java.lang.Object sender , org.ovirt.engine.core.compat.EventArgs args ) { containerDataCenterChanged ( ) ; } } ) ; if ( ( dataCenter.getSelectedItem ( ) ) != null ) { containerDataCenterChanged ( ) ; } }

Target:
private void containerChanged ( ) { if ( ( getContainer ( ) ) == null ) { return ; } org.ovirt.engine.ui.uicommonweb.models.ListModel dataCenter = getContainer ( ) . getDataCenter ( ) ; dataCenter.getSelectedItemChangedEvent ( ) . 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 ) { containerDataCenterChanged ( ) ; } } ) ; if ( ( dataCenter.getSelectedItem ( ) ) != null ) { containerDataCenterChanged ( ) ; } }
Source:
protected org.ovirt.engine.api.model.Groups mapDomainGroupsCollection ( java.util.List < org.ovirt.engine.core.common.businessentities.ad_groups > entities ) { org.ovirt.engine.api.model.Groups collection = new org.ovirt.engine.api.model.Groups ( ) ; for ( org.ovirt.engine.core.common.businessentities.ad_groups entity : entities ) { collection.getGroups ( ) . add ( addLinks ( modifyDomain ( mapAdGroup ( entity ) ) , true ) ) ; } return collection ; }

Target:
protected org.ovirt.engine.api.model.Groups mapDomainGroupsCollection ( java.util.List < org.ovirt.engine.core.common.businessentities.LdapGroup > entities ) { org.ovirt.engine.api.model.Groups collection = new org.ovirt.engine.api.model.Groups ( ) ; for ( org.ovirt.engine.core.common.businessentities.LdapGroup entity : entities ) { collection.getGroups ( ) . add ( addLinks ( modifyDomain ( mapAdGroup ( entity ) ) , true ) ) ; } return collection ; }
Source:
protected boolean canDoAction ( ) { if ( ! ( super . canDoAction ( ) ) ) { return false ; } java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > watchdogs = getWatchdogs ( ) ; if ( watchdogs.isEmpty ( ) ) { return failCanDoAction ( VdcBllMessages.WATCHDOG_NOT_FOUND ) ; } if ( ( ! ( getParameters ( ) . isClusterIndependent ( ) ) ) && ( ! ( validate ( validateModelCompatibleWithOs ( ) ) ) ) ) { return false ; } return true ; }

Target:
protected boolean canDoAction ( ) { if ( ! ( super . canDoAction ( ) ) ) { return false ; } java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > watchdogs = getWatchdogs ( ) ; if ( watchdogs.isEmpty ( ) ) { return failCanDoAction ( EngineMessage.WATCHDOG_NOT_FOUND ) ; } if ( ( ! ( getParameters ( ) . isClusterIndependent ( ) ) ) && ( ! ( validate ( validateModelCompatibleWithOs ( ) ) ) ) ) { return false ; } return true ; }
Source:
public static void getHostFingerprint ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String hostAddress ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.String ) ( source ) ) : "" ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetServerSSHKeyFingerprint , new org.ovirt.engine.core.common.queries.ServerParameters ( hostAddress ) , aQuery ) ; }

Target:
public static void getHostPublicKey ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.String ) ( source ) ) : "" ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetServerSSHPublicKey , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }
Source:
public static void IsTemplateNameUnique ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String name ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ! ( ( ( java.lang.Boolean ) ( source ) ) . booleanValue ( ) ) : false ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.IsVmTemlateWithSameNameExist , new org.ovirt.engine.core.common.queries.IsVmTemlateWithSameNameExistParameters ( name ) , aQuery ) ; }

Target:
public static void GetDataCentersWithPermittedActionOnClusters ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.common.businessentities.ActionGroup actionGroup ) { 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.storage_pool > ( ) ; } return source ; } } ; org.ovirt.engine.core.common.queries.GetEntitiesWithPermittedActionParameters getEntitiesWithPermittedActionParameters = new org.ovirt.engine.core.common.queries.GetEntitiesWithPermittedActionParameters ( ) ; getEntitiesWithPermittedActionParameters.setActionGroup ( actionGroup ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetDataCentersWithPermittedActionOnClusters , getEntitiesWithPermittedActionParameters , aQuery ) ; }
Source:
public void qosNotConfiguredOnAllNetworks ( ) { java.lang.String nicName = "nic0" ; org.ovirt.engine.core.bll.network.host.SetupNetworksHelper helper = setupCompositeQosConfiguration ( nicName , false ) ; validateAndExpectViolation ( helper , VdcBllMessages.ACTION_TYPE_FAILED_HOST_NETWORK_QOS_INTERFACES_WITHOUT_QOS , nicName ) ; }

Target:
public void invalidQosInconsistentValues ( ) { org.ovirt.engine.core.common.businessentities.network.HostNetworkQos qos = new org.ovirt.engine.core.common.businessentities.network.HostNetworkQos ( ) ; qos.setOutAverageLinkshare ( 10 ) ; qos.setOutAverageUpperlimit ( org.ovirt.engine.core.bll.network.host.SetupNetworksHelperTest.LOW_BANDWIDTH ) ; qos.setOutAverageRealtime ( org.ovirt.engine.core.bll.network.host.SetupNetworksHelperTest.HIGH_BANDWIDTH ) ; org.ovirt.engine.core.bll.network.host.SetupNetworksHelper helper = qosValuesTest ( qos ) ; validateAndExpectViolation ( helper , VdcBllMessages.ACTION_TYPE_FAILED_HOST_NETWORK_QOS_SETUP_NETWORKS_INCONSISTENT_VALUES , org.ovirt.engine.core.bll.network.host.SetupNetworksHelperTest.MANAGEMENT_NETWORK_NAME ) ; }
Source:
private void applyModeCustomizations ( ) { if ( ( org.ovirt.engine.ui.uicommonweb.models.ApplicationModeHelper.getUiMode ( ) ) == ( org.ovirt.engine.core.common.mode.ApplicationMode.GlusterOnly ) ) { optimizationTab.setVisible ( false ) ; resiliencePolicyTab.setVisible ( false ) ; clusterPolicyTab.setVisible ( false ) ; dataCenterPanel.addStyleName ( style.generalTabTopDecoratorEmpty ( ) ) ; } }

Target:
private void applyModeCustomizations ( ) { if ( ( org.ovirt.engine.ui.uicommonweb.models.ApplicationModeHelper.getUiMode ( ) ) == ( org.ovirt.engine.core.common.mode.ApplicationMode.GlusterOnly ) ) { optimizationTab.setVisible ( false ) ; resiliencePolicyTab.setVisible ( false ) ; clusterPolicyTab.setVisible ( false ) ; consoleTab.setVisible ( false ) ; fencingPolicyTab.setVisible ( false ) ; dataCenterPanel.addStyleName ( style.generalTabTopDecoratorEmpty ( ) ) ; } }
Source:
private void addMissingLink ( org.ovirt.engine.sdk.entities.RSDL rsdl , java.lang.String href , java.lang.String type ) { org.ovirt.engine.sdk.entities.DetailedLink link = new org.ovirt.engine.sdk.entities.DetailedLink ( ) ; link.setHref ( href ) ; link.setRel ( "get" ) ; org.ovirt.engine.sdk.entities.Response response = new org.ovirt.engine.sdk.entities.Response ( ) ; response.setType ( type ) ; link.setResponse ( response ) ; rsdl.getLinks ( ) . getLinks ( ) . add ( link ) ; }

Target:
private void addMissingLink ( org.ovirt.engine.sdk.entities.Rsdl rsdl , java.lang.String href , java.lang.String type ) { org.ovirt.engine.sdk.entities.DetailedLink link = new org.ovirt.engine.sdk.entities.DetailedLink ( ) ; link.setHref ( href ) ; link.setRel ( "get" ) ; org.ovirt.engine.sdk.entities.Response response = new org.ovirt.engine.sdk.entities.Response ( ) ; response.setType ( type ) ; link.setResponse ( response ) ; rsdl.getLinks ( ) . getLinks ( ) . add ( link ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc convertVmFromExternalSystem ( java.lang.String uri , java.lang.String username , java.lang.String password , java.util.Map < java.lang.String , java.lang.Object > vm , java.lang.String jobUUID ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "Host.convertExternalVm" ) . withParameter ( "uri" , uri ) . withParameter ( "username" , username ) . withParameter ( "password" , password ) . withParameter ( "vminfo" , vm ) . withParameter ( "jobid" , jobUUID ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( response ) ; }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturn convertVmFromExternalSystem ( java.lang.String uri , java.lang.String username , java.lang.String password , java.util.Map < java.lang.String , java.lang.Object > vm , java.lang.String jobUUID ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "Host.convertExternalVm" ) . withParameter ( "uri" , uri ) . withParameter ( "username" , username ) . withParameter ( "password" , password ) . withParameter ( "vminfo" , vm ) . withParameter ( "jobid" , jobUUID ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturn ( response ) ; }
Source:
public boolean eval ( org.ovirt.engine.core.common.businessentities.VDS p ) { return ( ( p.getUsageCpuPercent ( ) ) + ( calcSpmCpuConsumption ( p ) ) ) < highVdsCount ; }

Target:
protected java.util.List < org.ovirt.engine.core.common.businessentities.VDS > getSecondarySources ( org.ovirt.engine.core.common.businessentities.VDSGroup cluster , java.util.List < org.ovirt.engine.core.common.businessentities.VDS > candidateHosts , java.util.Map < java.lang.String , java.lang.String > parameters ) { long requiredMemory = ( parameters.containsKey ( org.ovirt.engine.core.bll.scheduling.policyunits.LOW_MEMORY_LIMIT_FOR_OVER_UTILIZED ) ) ? java.lang.Long.valueOf ( parameters.get ( org.ovirt.engine.core.bll.scheduling.policyunits.LOW_MEMORY_LIMIT_FOR_OVER_UTILIZED ) ) : 0L ; return getOverUtilizedMemoryHosts ( candidateHosts , requiredMemory ) ; }
Source:
public org.ovirt.engine.core.common.businessentities.LdapGroup mapRow ( final java.sql.ResultSet rs , final int rowNum ) throws java.sql.SQLException { org.ovirt.engine.core.common.businessentities.LdapGroup entity = new org.ovirt.engine.core.common.businessentities.LdapGroup ( ) ; entity.setid ( org.ovirt.engine.core.compat.Guid.createGuidFromString ( rs.getString ( "id" ) ) ) ; entity.setname ( rs.getString ( "name" ) ) ; entity.setstatus ( org.ovirt.engine.core.common.businessentities.LdapRefStatus.forValue ( rs.getInt ( "status" ) ) ) ; entity.setdomain ( rs.getString ( "domain" ) ) ; entity.setDistinguishedName ( rs.getString ( "distinguishedname" ) ) ; return entity ; }

Target:
public org.ovirt.engine.core.common.businessentities.LdapGroup mapRow ( final java.sql.ResultSet rs , final int rowNum ) throws java.sql.SQLException { org.ovirt.engine.core.common.businessentities.LdapGroup entity = new org.ovirt.engine.core.common.businessentities.LdapGroup ( ) ; entity.setid ( org.ovirt.engine.core.compat.Guid.createGuidFromStringDefaultEmpty ( rs.getString ( "id" ) ) ) ; entity.setname ( rs.getString ( "name" ) ) ; entity.setstatus ( org.ovirt.engine.core.common.businessentities.LdapRefStatus.forValue ( rs.getInt ( "status" ) ) ) ; entity.setdomain ( rs.getString ( "domain" ) ) ; entity.setDistinguishedName ( rs.getString ( "distinguishedname" ) ) ; return entity ; }