auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
protected void postConnect ( org.ovirt.vdsm.jsonrpc.client.utils.OneTimeCallback callback ) throws org.ovirt.vdsm.jsonrpc.client.ClientConnectionException { try { this . nioEngine = new org.ovirt.vdsm.jsonrpc.client.reactors.SSLEngineNioHelper ( channel , createSSLEngine ( false ) , callback , this ) ; this . nioEngine.beginHandshake ( ) ; int interestedOps = java.nio.channels.SelectionKey.OP_READ ; reactor.wakeup ( ) ; key = this . channel.register ( selector , ( interestedOps |= java.nio.channels.SelectionKey.OP_WRITE ) , this ) ; } catch ( java.nio.channels.ClosedChannelException | javax.net.ssl.SSLException e ) { org.ovirt.vdsm.jsonrpc.client.reactors.stomp.SSLStompListener.log.error ( "Connection issues during ssl client creation" , e ) ; throw new org.ovirt.vdsm.jsonrpc.client.ClientConnectionException ( e ) ; } }

Target:
protected void postConnect ( org.ovirt.vdsm.jsonrpc.client.utils.OneTimeCallback callback ) throws org.ovirt.vdsm.jsonrpc.client.ClientConnectionException { try { this . nioEngine = new org.ovirt.vdsm.jsonrpc.client.reactors.SSLEngineNioHelper ( channel , createSSLEngine ( false ) , callback , this ) ; this . nioEngine.beginHandshake ( ) ; int interestedOps = java.nio.channels.SelectionKey.OP_READ ; reactor.wakeup ( ) ; key = this . channel.register ( selector , ( interestedOps |= java.nio.channels.SelectionKey.OP_WRITE ) , this ) ; } catch ( java.nio.channels.ClosedChannelException | javax.net.ssl.SSLException e ) { org.ovirt.vdsm.jsonrpc.client.utils.JsonUtils.logException ( org.ovirt.vdsm.jsonrpc.client.reactors.stomp.SSLStompListener.log , "Connection issues during ssl client creation" , e ) ; throw new org.ovirt.vdsm.jsonrpc.client.ClientConnectionException ( e ) ; } }
Source:
public void executeCommand ( ) { cmd.setGlusterVolumeId ( volumeId1 ) ; cmd.executeCommand ( ) ; org.junit.Assert.assertEquals ( AuditLogType.GLUSTER_VOLUME_DETAILS_REFRESH , cmd.getAuditLogTypeValue ( ) ) ; org.mockito.Mockito.verify ( syncJob , org.mockito.Mockito.times ( 1 ) ) . refreshVolumeDetails ( org.mockito.ArgumentMatchers.any ( ) , org.mockito.ArgumentMatchers.any ( ) ) ; }

Target:
public void executeCommand ( ) { cmd.setGlusterVolumeId ( volumeId1 ) ; cmd.executeCommand ( ) ; org.junit.jupiter.api.Assertions.assertEquals ( AuditLogType.GLUSTER_VOLUME_DETAILS_REFRESH , cmd.getAuditLogTypeValue ( ) ) ; org.mockito.Mockito.verify ( syncJob , org.mockito.Mockito.times ( 1 ) ) . refreshVolumeDetails ( org.mockito.ArgumentMatchers.any ( ) , org.mockito.ArgumentMatchers.any ( ) ) ; }
Source:
public static void getTemplateById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid templateId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmTemplate , new org.ovirt.engine.core.common.queries.GetVmTemplateParameters ( templateId ) , aQuery ) ; }

Target:
public static void getHostsForStorageOperation ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , boolean localFsOnly ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { return source ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetHostsForStorageOperation , new org.ovirt.engine.core.common.queries.GetHostsForStorageOperationParameters ( storagePoolId , localFsOnly ) , aQuery ) ; }
Source:
private static org.ovirt.engine.core.common.businessentities.VmTemplate createVmTemplate ( ) { org.ovirt.engine.core.common.businessentities.VmTemplate template = new org.ovirt.engine.core.common.businessentities.VmTemplate ( ) ; template.setname ( "test-template" ) ; template.setOrigin ( OriginType.OVIRT ) ; template.setId ( new org.ovirt.engine.core.compat.Guid ( ) ) ; template.setDescription ( "test-description" ) ; template.setDbGeneration ( 2L ) ; return template ; }

Target:
private static org.ovirt.engine.core.common.businessentities.VmTemplate createVmTemplate ( ) { org.ovirt.engine.core.common.businessentities.VmTemplate template = new org.ovirt.engine.core.common.businessentities.VmTemplate ( ) ; template.setName ( "test-template" ) ; template.setOrigin ( OriginType.OVIRT ) ; template.setId ( new org.ovirt.engine.core.compat.Guid ( ) ) ; template.setDescription ( "test-description" ) ; template.setDbGeneration ( 2L ) ; return template ; }
Source:
private int getTotalMemoryStatesSizeGb ( ) { long sizeInBytes = 0 ; for ( org.ovirt.engine.core.common.businessentities.Snapshot snapshot : snapshotsWithMemory ) { org.ovirt.engine.core.common.businessentities.VM vm = getVmFromSnapshot ( snapshot ) ; sizeInBytes += ( vm.getTotalMemorySizeInBytes ( ) ) + ( HibernateVmCommand.META_DATA_SIZE_IN_BYTES ) ; } return ( ( int ) ( java.lang.Math.ceil ( ( ( 1.0 * sizeInBytes ) / ( BYTES_IN_GB ) ) ) ) ) ; }

Target:
private int getTotalMemoryStatesSizeGb ( ) { long sizeInBytes = 0 ; for ( org.ovirt.engine.core.common.businessentities.Snapshot snapshot : snapshotsWithMemory ) { org.ovirt.engine.core.common.businessentities.VM vm = getVmFromSnapshot ( snapshot ) ; sizeInBytes += ( vm.getTotalMemorySizeInBytes ( ) ) + ( org.ovirt.engine.core.bll.memory.MemoryUtils.META_DATA_SIZE_IN_BYTES ) ; } return ( ( int ) ( java.lang.Math.ceil ( ( ( 1.0 * sizeInBytes ) / ( BYTES_IN_GB ) ) ) ) ) ; }
Source:
public void isVirtioScsiEnabledDefaultedToTrue ( ) { cmd.getParameters ( ) . getVm ( ) . setClusterId ( cluster.getId ( ) ) ; cmd.initEffectiveCompatibilityVersion ( ) ; org.mockito.Mockito.when ( vmValidationUtils.isDiskInterfaceSupportedByOs ( org.mockito.ArgumentMatchers.anyInt ( ) , org.mockito.ArgumentMatchers.any ( ) , org.mockito.ArgumentMatchers.eq ( DiskInterface.VirtIO_SCSI ) ) ) . thenReturn ( true ) ; org.junit.Assert.assertTrue ( "isVirtioScsiEnabled hasn't been defaulted to true on cluster >= 3.3." , cmd.isVirtioScsiEnabled ( ) ) ; }

Target:
public void isVirtioScsiEnabledDefaultedToTrue ( ) { cmd.getParameters ( ) . getVm ( ) . setClusterId ( cluster.getId ( ) ) ; cmd.initEffectiveCompatibilityVersion ( ) ; org.mockito.Mockito.when ( vmValidationUtils.isDiskInterfaceSupportedByOs ( org.mockito.ArgumentMatchers.anyInt ( ) , org.mockito.ArgumentMatchers.any ( ) , org.mockito.ArgumentMatchers.eq ( DiskInterface.VirtIO_SCSI ) ) ) . thenReturn ( true ) ; org.junit.jupiter.api.Assertions.assertTrue ( cmd.isVirtioScsiEnabled ( ) , "isVirtioScsiEnabled hasn't been defaulted to true on cluster >= 3.3." ) ; }
Source:
protected java.lang.Object getEntity ( ) { try { java.lang.reflect.Method m = resolveGet ( ) ; if ( m == null ) { return null ; } java.lang.Object entity = m.invoke ( this ) ; return getEntityWithIdAndHref ( entity ) ; } catch ( java.lang.Exception e ) { org.ovirt.engine.api.restapi.resource.BackendResource.LOG.error ( "Getting resource after action failed." , e ) ; return null ; } }

Target:
protected java.lang.Object getEntity ( ) { try { java.lang.reflect.Method m = resolveGet ( ) ; if ( m == null ) { return null ; } java.lang.Object entity = m.invoke ( this ) ; return getEntityWithIdAndHref ( entity ) ; } catch ( java.lang.Exception e ) { org.ovirt.engine.api.restapi.resource.BackendResource.log.error ( "Getting resource after action failed." , e ) ; return null ; } }
Source:
public javax.ws.rs.core.Response toResponse ( org.ovirt.engine.api.restapi.utils.MappingException exception ) { org.ovirt.engine.api.restapi.resource.validation.MappingExceptionMapper.LOGGER.error ( exception ) ; final org.ovirt.engine.api.model.Fault fault = new org.ovirt.engine.api.model.Fault ( ) ; fault.setReason ( "Operation Failed" ) ; return javax.ws.rs.core.Response.status ( Response.Status.INTERNAL_SERVER_ERROR ) . entity ( fault ) . build ( ) ; }

Target:
public javax.ws.rs.core.Response toResponse ( org.ovirt.engine.api.restapi.utils.MappingException exception ) { org.ovirt.engine.api.restapi.resource.validation.MappingExceptionMapper.log.error ( "Exception" , exception ) ; final org.ovirt.engine.api.model.Fault fault = new org.ovirt.engine.api.model.Fault ( ) ; fault.setReason ( "Operation Failed" ) ; return javax.ws.rs.core.Response.status ( Response.Status.INTERNAL_SERVER_ERROR ) . entity ( fault ) . build ( ) ; }
Source:
public void testGetPermittedStorageDomains ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > result = dao.getPermittedStorageDomainsByStoragePool ( org.ovirt.engine.core.dao.StorageDomainDaoTest.EXISTING_USER_ID , ActionGroup.CONFIGURE_VM_STORAGE , new org.ovirt.engine.core.compat.Guid ( "6d849ebf-755f-4552-ad09-9a090cda105d" ) ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertFalse ( result.isEmpty ( ) ) ; org.junit.Assert.assertEquals ( result.get ( 0 ) . getId ( ) , existingDomain.getId ( ) ) ; }

Target:
public void testGetPermittedStorageDomains ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > result = dao.getPermittedStorageDomainsByStoragePool ( FixturesTool.USER_EXISTING_ID , ActionGroup.CONFIGURE_VM_STORAGE , FixturesTool.DATA_CENTER ) ; org.junit.Assert.assertFalse ( result.isEmpty ( ) ) ; org.ovirt.engine.core.common.businessentities.StorageDomain domain = result.get ( 0 ) ; org.junit.Assert.assertEquals ( existingDomain.getId ( ) , domain.getId ( ) ) ; org.junit.Assert.assertEquals ( "Wrong committed disk size" , 8 , domain.getCommittedDiskSize ( ) ) ; org.junit.Assert.assertEquals ( "Wrong actual disk size" , 4 , domain.getActualImagesSize ( ) ) ; }
Source:
public int compare ( org.ovirt.engine.core.common.utils.PairQueryable < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface , org.ovirt.engine.core.common.businessentities.VmTemplate > paramT1 , org.ovirt.engine.core.common.utils.PairQueryable < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface , org.ovirt.engine.core.common.businessentities.VmTemplate > paramT2 ) { int compareValue = paramT1.getSecond ( ) . getVdsGroupName ( ) . compareTo ( paramT2.getSecond ( ) . getVdsGroupName ( ) ) ; if ( compareValue != 0 ) { return compareValue ; } return paramT1.getSecond ( ) . getName ( ) . compareTo ( paramT2.getSecond ( ) . getName ( ) ) ; }

Target:
public int compare ( org.ovirt.engine.core.common.utils.PairQueryable < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface , org.ovirt.engine.core.common.businessentities.VmTemplate > paramT1 , org.ovirt.engine.core.common.utils.PairQueryable < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface , org.ovirt.engine.core.common.businessentities.VmTemplate > paramT2 ) { int compareValue = paramT1.getSecond ( ) . getClusterName ( ) . compareTo ( paramT2.getSecond ( ) . getClusterName ( ) ) ; if ( compareValue != 0 ) { return compareValue ; } return paramT1.getSecond ( ) . getName ( ) . compareTo ( paramT2.getSecond ( ) . getName ( ) ) ; }
Source:
protected void verify ( org.ovirt.engine.api.model.Filter model , org.ovirt.engine.api.model.Filter transform ) { assertNotNull ( transform ) ; assertEquals ( model.getId ( ) , transform.getId ( ) ) ; assertEquals ( model.getSchedulingPolicyUnit ( ) . getId ( ) , transform.getSchedulingPolicyUnit ( ) . getId ( ) ) ; assertEquals ( model.getPosition ( ) , transform.getPosition ( ) ) ; }

Target:
protected void verify ( org.ovirt.engine.api.model.Filter model , org.ovirt.engine.api.model.Filter transform ) { org.junit.Assert.assertNotNull ( transform ) ; org.junit.Assert.assertEquals ( model.getId ( ) , transform.getId ( ) ) ; org.junit.Assert.assertEquals ( model.getSchedulingPolicyUnit ( ) . getId ( ) , transform.getSchedulingPolicyUnit ( ) . getId ( ) ) ; org.junit.Assert.assertEquals ( model.getPosition ( ) , transform.getPosition ( ) ) ; }
Source:
private boolean isStorageFormatCompatibleWithDomain ( ) { org.ovirt.engine.core.common.businessentities.StorageFormatType storageFormat = org.ovirt.engine.core.bll.storage.AddStorageDomainCommand.getStorageDomain ( ) . getStorageFormat ( ) ; org.ovirt.engine.core.common.businessentities.StorageType storageType = org.ovirt.engine.core.bll.storage.AddStorageDomainCommand.getStorageDomain ( ) . getStorageType ( ) ; org.ovirt.engine.core.common.businessentities.StorageDomainType storageDomainFunction = org.ovirt.engine.core.bll.storage.AddStorageDomainCommand.getStorageDomain ( ) . getStorageDomainType ( ) ; if ( storageFormat == ( org.ovirt.engine.core.common.businessentities.StorageFormatType.V2 ) ) { return ( storageDomainFunction.isDataDomain ( ) ) && ( storageType.isBlockDomain ( ) ) ; } if ( storageFormat == ( org.ovirt.engine.core.common.businessentities.StorageFormatType.V3 ) ) { return storageDomainFunction.isDataDomain ( ) ; } return true ; }

Target:
public org.ovirt.engine.core.bll.validator.storage.StorageDomainValidator getStorageDomainValidator ( ) { return new org.ovirt.engine.core.bll.validator.storage.StorageDomainValidator ( org.ovirt.engine.core.bll.storage.AddStorageDomainCommand.getStorageDomain ( ) ) ; }
Source:
public static org.ovirt.engine.core.common.businessentities.VDSGroup map ( org.ovirt.engine.core.common.businessentities.StoragePool pool , org.ovirt.engine.core.common.businessentities.VDSGroup template ) { org.ovirt.engine.core.common.businessentities.VDSGroup entity = ( template != null ) ? template : new org.ovirt.engine.core.common.businessentities.VDSGroup ( ) ; if ( ( pool.getCompatibilityVersion ( ) ) != null ) { entity.setCompatibilityVersion ( pool.getCompatibilityVersion ( ) ) ; } return entity ; }

Target:
public static org.ovirt.engine.core.common.businessentities.Cluster map ( org.ovirt.engine.core.common.businessentities.StoragePool pool , org.ovirt.engine.core.common.businessentities.Cluster template ) { org.ovirt.engine.core.common.businessentities.Cluster entity = ( template != null ) ? template : new org.ovirt.engine.core.common.businessentities.Cluster ( ) ; if ( ( pool.getCompatibilityVersion ( ) ) != null ) { entity.setCompatibilityVersion ( pool.getCompatibilityVersion ( ) ) ; } return entity ; }
Source:
public java.util.Set < java.lang.String > removeSnapshots ( org.ovirt.engine.core.compat.Guid vmId ) { final java.util.List < org.ovirt.engine.core.common.businessentities.Snapshot > vmSnapshots = getSnapshotDao ( ) . getAll ( vmId ) ; for ( org.ovirt.engine.core.common.businessentities.Snapshot snapshot : vmSnapshots ) { getSnapshotDao ( ) . remove ( snapshot.getId ( ) ) ; } return org.ovirt.engine.core.bll.memory.MemoryUtils.getMemoryVolumesFromSnapshots ( vmSnapshots ) ; }

Target:
public java.util.Set < java.lang.String > removeSnapshots ( org.ovirt.engine.core.compat.Guid vmId ) { final java.util.List < org.ovirt.engine.core.common.businessentities.Snapshot > vmSnapshots = snapshotDao.getAll ( vmId ) ; for ( org.ovirt.engine.core.common.businessentities.Snapshot snapshot : vmSnapshots ) { snapshotDao.remove ( snapshot.getId ( ) ) ; } return org.ovirt.engine.core.bll.memory.MemoryUtils.getMemoryVolumesFromSnapshots ( vmSnapshots ) ; }
Source:
private boolean isGatewayInSync ( ) { java.lang.String gatewayDesiredValue = getPrimaryAddress ( ) . getGateway ( ) ; java.lang.String gatewayActualValue = iface.getIpv4Gateway ( ) ; boolean bothBlank = ( org.apache.commons.lang.StringUtils.isBlank ( gatewayDesiredValue ) ) && ( org.apache.commons.lang.StringUtils.isBlank ( gatewayActualValue ) ) ; return bothBlank || ( java.util.Objects.equals ( gatewayDesiredValue , gatewayActualValue ) ) ; }

Target:
private boolean isIpv4GatewayInSync ( ) { java.lang.String gatewayDesiredValue = getIpv4PrimaryAddress ( ) . getGateway ( ) ; java.lang.String gatewayActualValue = iface.getIpv4Gateway ( ) ; boolean bothBlank = ( org.apache.commons.lang.StringUtils.isBlank ( gatewayDesiredValue ) ) && ( org.apache.commons.lang.StringUtils.isBlank ( gatewayActualValue ) ) ; return bothBlank || ( java.util.Objects.equals ( gatewayDesiredValue , gatewayActualValue ) ) ; }
Source:
protected void setUpTestServlet ( ) throws java.security.NoSuchAlgorithmException { testServlet = getTestServletSpy ( ) ; testServlet.setBackend ( mockBackend ) ; testServlet.init ( ) ; testServlet.setBrandingManager ( mockBrandingManager ) ; org.ovirt.engine.ui.frontend.server.gwt.AbstractGwtDynamicHostPageServletTest.doReturn ( mockDigest ) . when ( testServlet ) . createMd5Digest ( ) ; }

Target:
protected void setUpTestServlet ( ) throws java.security.NoSuchAlgorithmException { testServlet = getTestServletSpy ( ) ; testServlet.setBackend ( mockBackend ) ; testServlet.init ( new org.codehaus.jackson.map.ObjectMapper ( ) , mockBrandingManager ) ; org.ovirt.engine.ui.frontend.server.gwt.AbstractGwtDynamicHostPageServletTest.doReturn ( mockDigest ) . when ( testServlet ) . createMd5Digest ( ) ; }
Source:
public void setRefreshRate ( int interval ) { if ( ( getRefreshRate ( ) ) == interval ) { return ; } reset ( ) ; org.ovirt.engine.ui.uicommonweb.models.GridTimer.logger.fine ( ( ( ( "GridTimer[" + ( name ) ) + "]: Refresh Rate set to: " ) + interval ) ) ; normalInterval = interval ; com.google.gwt.event.logical.shared.ValueChangeEvent.fire ( this , getRefreshRate ( ) ) ; }

Target:
public void start ( ) { org.ovirt.engine.ui.uicommonweb.models.GridTimer.logger.fine ( ( ( "GridTimer[" + ( name ) ) + "].start()" ) ) ; active = true ; scheduleRepeating ( getRefreshRate ( ) ) ; com.google.gwt.event.logical.shared.ValueChangeEvent.fire ( this , getValue ( ) ) ; }
Source:
public void testNicExists_WhenNicNameIsNotNull ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.NetworkAttachment attachment = new org.ovirt.engine.core.common.businessentities.network.NetworkAttachment ( ) ; attachment.setNicId ( null ) ; attachment.setNicName ( "whatever" ) ; org.junit.Assert.assertThat ( new org.ovirt.engine.core.bll.validator.NetworkAttachmentValidator ( attachment , new org.ovirt.engine.core.common.businessentities.VDS ( ) ) . nicExists ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }

Target:
public void testNicExistsWhenNicNameIsNotNull ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.NetworkAttachment attachment = new org.ovirt.engine.core.common.businessentities.network.NetworkAttachment ( ) ; attachment.setNicId ( null ) ; attachment.setNicName ( "whatever" ) ; org.junit.Assert.assertThat ( createNetworkAttachmentValidator ( attachment ) . nicExists ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }
Source:
private void HandleVdsInformation ( ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVdsDynamicDao ( ) . updatePartialVdsDynamicCalc ( org.ovirt.engine.core.vdsbroker.CreateVmVDSCommand.getVds ( ) . getId ( ) , 1 , org.ovirt.engine.core.vdsbroker.CreateVmVDSCommand.getParameters ( ) . getVm ( ) . getNumOfCpus ( ) , org.ovirt.engine.core.vdsbroker.CreateVmVDSCommand.getParameters ( ) . getVm ( ) . getMinAllocatedMem ( ) , org.ovirt.engine.core.vdsbroker.CreateVmVDSCommand.getParameters ( ) . getVm ( ) . getVmMemSizeMb ( ) , org.ovirt.engine.core.vdsbroker.CreateVmVDSCommand.getParameters ( ) . getVm ( ) . getNumOfCpus ( ) ) ; }

Target:
private void handleVdsInformation ( ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVdsDynamicDao ( ) . updatePartialVdsDynamicCalc ( org.ovirt.engine.core.vdsbroker.CreateVmVDSCommand.getVds ( ) . getId ( ) , 1 , org.ovirt.engine.core.vdsbroker.CreateVmVDSCommand.getParameters ( ) . getVm ( ) . getNumOfCpus ( ) , org.ovirt.engine.core.vdsbroker.CreateVmVDSCommand.getParameters ( ) . getVm ( ) . getMinAllocatedMem ( ) , org.ovirt.engine.core.vdsbroker.CreateVmVDSCommand.getParameters ( ) . getVm ( ) . getVmMemSizeMb ( ) , org.ovirt.engine.core.vdsbroker.CreateVmVDSCommand.getParameters ( ) . getVm ( ) . getNumOfCpus ( ) ) ; }
Source:
private void VolumeType_SelectedItemChanged ( ) { UpdateVolumeFormat ( ) ; }

Target:
private void updateShareable ( org.ovirt.engine.core.common.businessentities.VolumeType volumeType , org.ovirt.engine.core.common.businessentities.StorageType storageType ) { getIsShareable ( ) . setEntity ( false ) ; getIsShareable ( ) . setIsChangable ( ( ! ( ( storageType.isBlockDomain ( ) ) && ( volumeType == ( org.ovirt.engine.core.common.businessentities.VolumeType.Sparse ) ) ) ) ) ; getIsShareable ( ) . getChangeProhibitionReasons ( ) . add ( org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getConstants ( ) . shareableDiskNotSupportedByConfiguration ( ) ) ; }
Source:
public org.ovirt.engine.api.resource.DeviceResource < D > getDeviceSubResource ( java.lang.String id ) { return org.ovirt.engine.api.restapi.resource.AbstractBackendDevicesResource.inject ( new org.ovirt.engine.api.restapi.resource.BackendDeviceResource < D , C , Q > ( modelType , entityType , org.ovirt.engine.api.restapi.resource.AbstractBackendDevicesResource.asGuidOr404 ( id ) , this , updateType , getUpdateParametersProvider ( ) , getRequiredUpdateFields ( ) ) ) ; }

Target:
public org.ovirt.engine.api.resource.DeviceResource < D > getDeviceResource ( java.lang.String id ) { return org.ovirt.engine.api.restapi.resource.AbstractBackendDevicesResource.inject ( new org.ovirt.engine.api.restapi.resource.BackendDeviceResource < D , C , Q > ( modelType , entityType , org.ovirt.engine.api.restapi.resource.AbstractBackendDevicesResource.asGuidOr404 ( id ) , this , updateType , getUpdateParametersProvider ( ) , getRequiredUpdateFields ( ) ) ) ; }
Source:
protected org.ovirt.engine.core.common.businessentities.CommandEntity generateNewEntity ( ) { org.ovirt.engine.core.common.businessentities.CommandEntity commandEntity = new org.ovirt.engine.core.common.businessentities.CommandEntity ( ) ; commandEntity.setCommandType ( VdcActionType.AddBond ) ; commandEntity.setCreatedAt ( new java.util.Date ( java.lang.System.currentTimeMillis ( ) ) ) ; commandEntity.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; commandEntity.setCommandStatus ( CommandStatus.ACTIVE ) ; org.ovirt.engine.core.common.action.VdcActionParametersBase params = new org.ovirt.engine.core.common.action.VdcActionParametersBase ( ) ; commandEntity.setActionParameters ( params ) ; return commandEntity ; }

Target:
protected org.ovirt.engine.core.common.businessentities.CommandEntity generateNewEntity ( ) { org.ovirt.engine.core.common.businessentities.CommandEntity commandEntity = new org.ovirt.engine.core.common.businessentities.CommandEntity ( ) ; commandEntity.setCommandType ( VdcActionType.AddBond ) ; commandEntity.setCreatedAt ( new java.util.Date ( java.lang.System.currentTimeMillis ( ) ) ) ; commandEntity.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; commandEntity.setCommandStatus ( CommandStatus.ACTIVE ) ; org.ovirt.engine.core.common.action.VdcActionParametersBase params = new org.ovirt.engine.core.common.action.VdcActionParametersBase ( ) ; commandEntity.setCommandParameters ( params ) ; return commandEntity ; }
Source:
protected void executeQueryCommand ( ) { java.lang.String directoryName = org.ovirt.engine.core.bll.GetDirectoryUserByIdQuery.getParameters ( ) . getDomain ( ) ; java.lang.String id = org.ovirt.engine.core.bll.GetDirectoryUserByIdQuery.getParameters ( ) . getId ( ) ; org.ovirt.engine.core.aaa.Directory directory = org.ovirt.engine.core.aaa.AuthenticationProfileRepository.getInstance ( ) . getDirectory ( directoryName ) ; if ( directory == null ) { org.ovirt.engine.core.bll.GetDirectoryUserByIdQuery.getQueryReturnValue ( ) . setSucceeded ( false ) ; } else { org.ovirt.engine.core.aaa.DirectoryUser user = directory.findUserById ( id ) ; org.ovirt.engine.core.bll.GetDirectoryUserByIdQuery.getQueryReturnValue ( ) . setReturnValue ( user ) ; } }

Target:
protected void executeQueryCommand ( ) { java.lang.String directoryName = org.ovirt.engine.core.bll.GetDirectoryUserByIdQuery.getParameters ( ) . getDomain ( ) ; java.lang.String id = org.ovirt.engine.core.bll.GetDirectoryUserByIdQuery.getParameters ( ) . getId ( ) ; org.ovirt.engine.core.extensions.mgr.ExtensionProxy authz = org.ovirt.engine.core.aaa.AuthenticationProfileRepository.getInstance ( ) . getAuthz ( directoryName ) ; if ( authz == null ) { org.ovirt.engine.core.bll.GetDirectoryUserByIdQuery.getQueryReturnValue ( ) . setSucceeded ( false ) ; } else { org.ovirt.engine.core.aaa.DirectoryUser user = org.ovirt.engine.core.aaa.AuthzUtils.findPrincipalById ( authz , id ) ; org.ovirt.engine.core.bll.GetDirectoryUserByIdQuery.getQueryReturnValue ( ) . setReturnValue ( user ) ; } }
Source:
public static void GetGlusterHosts ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String hostAddress , java.lang.String rootPassword , java.lang.String fingerprint ) { 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.gluster.GlusterServersQueryParameters parameters = new org.ovirt.engine.core.common.queries.gluster.GlusterServersQueryParameters ( hostAddress , rootPassword ) ; parameters.setFingerprint ( fingerprint ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetGlusterServers , parameters , aQuery ) ; }

Target:
public static void GetGlusterHosts ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String hostAddress , java.lang.String rootPassword , java.lang.String fingerprint ) { org.ovirt.engine.core.common.queries.gluster.GlusterServersQueryParameters parameters = new org.ovirt.engine.core.common.queries.gluster.GlusterServersQueryParameters ( hostAddress , rootPassword ) ; parameters.setFingerprint ( fingerprint ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetGlusterServersForImport , parameters , aQuery ) ; }
Source:
public static org.ovirt.engine.api.extensions.ExtMap fetchPrincipalRecord ( final org.ovirt.engine.core.extensions.mgr.ExtensionProxy extension , org.ovirt.engine.api.extensions.ExtMap authRecord ) { return extension.invoke ( new org.ovirt.engine.api.extensions.ExtMap ( ) . mput ( Base.InvokeKeys.COMMAND , Authz.InvokeCommands.FETCH_PRINCIPAL_RECORD ) . mput ( Authn.InvokeKeys.AUTH_RECORD , authRecord ) ) . < org.ovirt.engine.api.extensions.ExtMap > get ( Authz.InvokeKeys.PRINCIPAL_RECORD ) ; }

Target:
public static org.ovirt.engine.api.extensions.ExtMap fetchPrincipalRecord ( final org.ovirt.engine.core.extensions.mgr.ExtensionProxy extension , org.ovirt.engine.api.extensions.ExtMap authRecord ) { org.ovirt.engine.api.extensions.ExtMap ret = null ; org.ovirt.engine.api.extensions.ExtMap output = extension.invoke ( new org.ovirt.engine.api.extensions.ExtMap ( ) . mput ( Base.InvokeKeys.COMMAND , Authz.InvokeCommands.FETCH_PRINCIPAL_RECORD ) . mput ( Authn.InvokeKeys.AUTH_RECORD , authRecord ) ) ; if ( ( output.< java.lang.Integer > get ( Authz.InvokeKeys.STATUS ) ) == ( Authz.Status.SUCCESS ) ) { ret = output.< org.ovirt.engine.api.extensions.ExtMap > get ( Authz.InvokeKeys.PRINCIPAL_RECORD ) ; } return ret ; }
Source:
private static java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > getPluggedInterfaces ( java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > devices ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > result = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmDevice > ( ) ; for ( org.ovirt.engine.core.common.businessentities.VmDevice device : devices ) { if ( ( org.ovirt.engine.core.common.utils.VmDeviceCommonUtils.isBridge ( device ) ) && ( device.getIsPlugged ( ) ) ) { result.add ( device ) ; } } return result ; }

Target:
private static java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > getPluggedManagedInterfaces ( java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > devices ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > result = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmDevice > ( ) ; for ( org.ovirt.engine.core.common.businessentities.VmDevice device : devices ) { if ( ( ( org.ovirt.engine.core.common.utils.VmDeviceCommonUtils.isBridge ( device ) ) && ( device.getIsPlugged ( ) ) ) && ( device.getIsManaged ( ) ) ) { result.add ( device ) ; } } return result ; }
Source:
private org.ovirt.engine.core.bll.ValidationResult nicActuallyExistsOrReferencesNewBond ( org.ovirt.engine.core.common.businessentities.network.NetworkAttachment attachment ) { java.lang.String targetNicName = attachment.getNicName ( ) ; boolean attachmentReferencesExistingNic = ( existingInterfacesMap.get ( attachment.getNicId ( ) , targetNicName ) ) != null ; if ( attachmentReferencesExistingNic ) { return org.ovirt.engine.core.bll.ValidationResult.VALID ; } boolean attachmentReferencesNewlyCreatedBond = ( targetNicName != null ) && ( ( bondsMap.get ( targetNicName ) ) != null ) ; if ( attachmentReferencesNewlyCreatedBond ) { return org.ovirt.engine.core.bll.ValidationResult.VALID ; } return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.HOST_NETWORK_INTERFACE_NOT_EXIST ) ; }

Target:
private boolean isNicToConfigureContainTheLabel ( java.lang.String nicName , java.lang.String label ) { java.util.Set < java.lang.String > labelsToConfigure = getLabelsToConfigureOnNic ( nicName ) ; return ( labelsToConfigure != null ) && ( labelsToConfigure.contains ( label ) ) ; }
Source:
protected boolean canDoAction ( ) { if ( ! ( super . canDoAction ( ) ) ) { return false ; } upServer = getUpServer ( ) ; if ( ( upServer ) == null ) { addCanDoActionMessageVariable ( "clusterName" , org.ovirt.engine.core.bll.gluster.GlusterCommandBase.getVdsGroup ( ) . getName ( ) ) ; addCanDoActionMessage ( EngineMessage.ACTION_TYPE_FAILED_NO_UP_SERVER_FOUND ) ; return false ; } return true ; }

Target:
protected boolean validate ( ) { if ( ! ( super . validate ( ) ) ) { return false ; } upServer = getUpServer ( ) ; if ( ( upServer ) == null ) { addValidationMessageVariable ( "clusterName" , org.ovirt.engine.core.bll.gluster.GlusterCommandBase.getVdsGroup ( ) . getName ( ) ) ; addValidationMessage ( EngineMessage.ACTION_TYPE_FAILED_NO_UP_SERVER_FOUND ) ; return false ; } return true ; }
Source:
protected org.jboss.resteasy.client.ClientExecutor createClientExecutor ( ) { int socketTimeOut = ( org.ovirt.engine.core.common.config.Config.< java.lang.Integer > getValue ( ConfigValues.ExternalNetworkProviderTimeout ) ) * 1000 ; int connectionTimeOut = ( org.ovirt.engine.core.common.config.Config.< java.lang.Integer > getValue ( ConfigValues.ExternalNetworkProviderConnectionTimeout ) ) * 1000 ; org.apache.http.impl.client.DefaultHttpClient httpClient = new org.apache.http.impl.client.DefaultHttpClient ( ) ; org.apache.http.params.HttpParams params = httpClient.getParams ( ) ; org.apache.http.params.HttpConnectionParams.setConnectionTimeout ( params , connectionTimeOut ) ; org.apache.http.params.HttpConnectionParams.setSoTimeout ( params , socketTimeOut ) ; return new org.jboss.resteasy.client.core.executors.ApacheHttpClient4Executor ( httpClient ) ; }

Target:
private void configureTimeouts ( org.apache.http.impl.client.DefaultHttpClient httpClient ) { long socketTimeOut = java.util.concurrent.TimeUnit.SECONDS.toMillis ( org.ovirt.engine.core.common.config.Config.< java.lang.Integer > getValue ( ConfigValues.ExternalNetworkProviderTimeout ) ) ; long connectionTimeOut = java.util.concurrent.TimeUnit.SECONDS.toMillis ( org.ovirt.engine.core.common.config.Config.< java.lang.Integer > getValue ( ConfigValues.ExternalNetworkProviderConnectionTimeout ) ) ; org.apache.http.params.HttpParams params = httpClient.getParams ( ) ; org.apache.http.params.HttpConnectionParams.setConnectionTimeout ( params , java.lang.Math.toIntExact ( connectionTimeOut ) ) ; org.apache.http.params.HttpConnectionParams.setSoTimeout ( params , java.lang.Math.toIntExact ( socketTimeOut ) ) ; }
Source:
public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { initiateResumeUploadCheckStatus ( result ) ; }

Target:
public org.ovirt.engine.ui.uicommonweb.validation.ValidationResult validate ( java.lang.Object value ) { org.ovirt.engine.ui.uicommonweb.validation.ValidationResult result = new org.ovirt.engine.ui.uicommonweb.validation.ValidationResult ( ) ; if ( ( value == null ) || ( org.ovirt.engine.core.compat.StringHelper.isNullOrEmpty ( ( ( java.lang.String ) ( value ) ) ) ) ) { result.setSuccess ( false ) ; result.getReasons ( ) . add ( org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getConstants ( ) . emptyImagePath ( ) ) ; } return result ; }
Source:
public static java.lang.String getJsonDiskDescription ( java.lang.String diskAlias , java.lang.String diskDescription ) throws java.io.IOException { java.util.Map < java.lang.String , java.lang.Object > description = new java.util.HashMap < > ( ) ; description.put ( org.ovirt.engine.core.bll.ImagesHandler.DISK_ALIAS , diskAlias ) ; description.put ( org.ovirt.engine.core.bll.ImagesHandler.DISK_DESCRIPTION , ( diskDescription != null ? diskDescription : "" ) ) ; return org.ovirt.engine.core.utils.JsonHelper.mapToJson ( description , false ) ; }

Target:
public static java.lang.String getJsonDiskDescription ( java.lang.String diskAlias , java.lang.String diskDescription ) throws java.io.IOException { java.util.Map < java.lang.String , java.lang.Object > description = new java.util.TreeMap < > ( ) ; description.put ( org.ovirt.engine.core.bll.ImagesHandler.DISK_ALIAS , diskAlias ) ; description.put ( org.ovirt.engine.core.bll.ImagesHandler.DISK_DESCRIPTION , ( diskDescription != null ? diskDescription : "" ) ) ; return org.ovirt.engine.core.utils.JsonHelper.mapToJson ( description , false ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturn allocateVolume ( java.lang.String spUUID , java.lang.String sdUUID , java.lang.String imgGUID , java.lang.String volUUID , java.lang.String size ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "Volume.allocate" ) . withParameter ( "volumeID" , volUUID ) . withParameter ( "storagepoolID" , spUUID ) . withParameter ( "storagedomainID" , sdUUID ) . withParameter ( "imageID" , imgGUID ) . withParameter ( "size" , size ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) . withResponseKey ( "uuid" ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturn ( response ) ; }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturn glusterWebhookAdd ( java.lang.String url , java.lang.String bearerToken ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "GlusterEvent.webhookAdd" ) . withParameter ( "url" , url ) . withParameter ( "bearerToken" , bearerToken ) . 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 void onRemove ( ) { java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > pb = new java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > ( ) ; for ( java.lang.Object a : sourceListModel.getSelectedItems ( ) ) { org.ovirt.engine.core.common.businessentities.network.Network network = ( ( org.ovirt.engine.core.common.businessentities.network.Network ) ( a ) ) ; pb.add ( new org.ovirt.engine.core.common.action.AddNetworkStoragePoolParameters ( network.getDataCenterId ( ) , network ) ) ; } org.ovirt.engine.ui.frontend.Frontend.RunMultipleAction ( VdcActionType.RemoveNetwork , pb ) ; sourceListModel.setConfirmWindow ( null ) ; }

Target:
public void onRemove ( ) { java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > pb = new java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > ( ) ; for ( java.lang.Object a : sourceListModel.getSelectedItems ( ) ) { org.ovirt.engine.core.common.businessentities.network.Network network = ( ( org.ovirt.engine.core.common.businessentities.network.Network ) ( a ) ) ; pb.add ( new org.ovirt.engine.core.common.action.AddNetworkStoragePoolParameters ( network.getDataCenterId ( ) , network ) ) ; } org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runMultipleAction ( VdcActionType.RemoveNetwork , pb ) ; sourceListModel.setConfirmWindow ( null ) ; }
Source:
public java.lang.String toString ( ) { return java.lang.String.format ( "%s, ticket=%s, validTime=%s,m userName=%s, userId=%s" , super . toString ( ) , getTicket ( ) , getValidTime ( ) , getUserName ( ) , getUserId ( ) ) ; }

Target:
protected org.ovirt.engine.core.common.utils.ToStringBuilder appendAttributes ( org.ovirt.engine.core.common.utils.ToStringBuilder tsb ) { return super . appendAttributes ( tsb ) . append ( "protocol" , graphicsType ) . append ( "ticket" , getTicket ( ) ) . append ( "validTime" , getValidTime ( ) ) . append ( "userName" , getUserName ( ) ) . append ( "userId" , getUserId ( ) ) . append ( "disconnectAction" , getDisconnectAction ( ) ) ; }
Source:
private org.ovirt.engine.core.bll.ValidationResult callHasUniqueName ( org.ovirt.engine.core.compat.Guid macPool1Id , org.ovirt.engine.core.compat.Guid macPool2Id , java.lang.String macPool1Name , java.lang.String macPool2Name ) { org.mockito.Mockito.when ( macPoolDaoMock.getAll ( ) ) . thenReturn ( java.util.Arrays.asList ( createMacPool ( macPool1Id , macPool1Name ) ) ) ; return new org.ovirt.engine.core.bll.MacPoolValidator ( createMacPool ( macPool2Id , macPool2Name ) ) . hasUniqueName ( ) ; }

Target:
public void testNotRemovingDefaultPool ( ) throws java.lang.Exception { macPool.setDefaultPool ( true ) ; org.junit.Assert.assertThat ( macPoolValidator.notRemovingDefaultPool ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( VdcBllMessages.ACTION_TYPE_FAILED_CANNOT_REMOVE_DEFAULT_MAC_POOL ) ) ; }
Source:
public java.lang.String render ( org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterGeneralModel.ClusterType object ) { switch ( object ) { case BOTH : return ( ( constants.virt ( ) ) + ( constants.andBreak ( ) ) ) + ( constants.gluster ( ) ) ; case GLUSTER : return constants.gluster ( ) ; case VIRT : return constants.virt ( ) ; default : return "" ; } }

Target:
public java.lang.String render ( org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterGeneralModel.ClusterType object ) { switch ( object ) { case BOTH : return ( ( org.ovirt.engine.ui.common.widget.renderer.ClusterTypeRenderer.constants.virt ( ) ) + ( org.ovirt.engine.ui.common.widget.renderer.ClusterTypeRenderer.constants.andBreak ( ) ) ) + ( org.ovirt.engine.ui.common.widget.renderer.ClusterTypeRenderer.constants.gluster ( ) ) ; case GLUSTER : return org.ovirt.engine.ui.common.widget.renderer.ClusterTypeRenderer.constants.gluster ( ) ; case VIRT : return org.ovirt.engine.ui.common.widget.renderer.ClusterTypeRenderer.constants.virt ( ) ; default : return "" ; } }
Source:
private boolean isHostContainLabel ( java.lang.String label ) { for ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nic : getNics ( org.ovirt.engine.core.bll.ChangeVDSClusterCommand.ChangeClusterParametersBuilder.getVdsId ( ) ) ) { if ( ( org.ovirt.engine.core.utils.NetworkUtils.isLabeled ( nic ) ) && ( nic.getLabels ( ) . contains ( label ) ) ) { return true ; } } return false ; }

Target:
private boolean isHostContainLabel ( org.ovirt.engine.core.compat.Guid hostId , java.lang.String label ) { for ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nic : getNics ( hostId ) ) { if ( ( org.ovirt.engine.core.utils.NetworkUtils.isLabeled ( nic ) ) && ( nic.getLabels ( ) . contains ( label ) ) ) { return true ; } } return false ; }
Source:
public static java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmInterfaceType > getNicTypeList ( org.ovirt.engine.core.common.businessentities.VmOsType osType , boolean hasDualmode ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmInterfaceType > list = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmInterfaceType > ( java.util.Arrays.asList ( org.ovirt.engine.core.common.businessentities.network.VmInterfaceType.values ( ) ) ) ; list.remove ( VmInterfaceType.rtl8139_pv ) ; if ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.isWindowsOsType ( osType ) ) { if ( ( osType == ( org.ovirt.engine.core.common.businessentities.VmOsType.WindowsXP ) ) && hasDualmode ) { list.add ( VmInterfaceType.rtl8139_pv ) ; } } return list ; }

Target:
public static void GetExternalProviderHostList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid providerId , boolean filterOutExistingHosts , java.lang.String searchFilter ) { 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.VDS > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetHostListFromExternalProvider , new org.ovirt.engine.core.common.queries.GetHostListFromExternalProviderParameters ( providerId , filterOutExistingHosts , searchFilter ) , aQuery ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeGeoRepStatusForXmlRpc glusterVolumeGeoRepStatus ( java.lang.String volumeName , java.lang.String slaveHost , java.lang.String slaveVolumeName ) { try { java.util.Map < java.lang.String , java.lang.Object > response ; response = vdsServer.glusterVolumeGeoRepStatus ( volumeName , slaveHost , slaveVolumeName ) ; return new org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeGeoRepStatusForXmlRpc ( response ) ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc glusterVolumeGeoRepSessionDelete ( java.lang.String volumeName , java.lang.String remoteHost , java.lang.String remoteVolumeName , java.lang.String userName ) { try { return new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( vdsServer.glusterVolumeGeoRepSessionDelete ( volumeName , remoteHost , remoteVolumeName , userName ) ) ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
Source:
public org.ovirt.engine.core.common.AuditLogType getAuditLogTypeValue ( ) { switch ( org.ovirt.engine.core.bll.AddDiskCommand.getActionState ( ) ) { case EXECUTE : if ( ( org.ovirt.engine.core.bll.AddDiskCommand.getParameters ( ) . getDiskInfo ( ) . getDiskStorageType ( ) ) == ( org.ovirt.engine.core.common.businessentities.Disk.DiskStorageType.IMAGE ) ) { return getExecuteAuditLogTypeValue ( org.ovirt.engine.core.bll.AddDiskCommand.getSucceeded ( ) ) ; } else { return getEndSuccessAuditLogTypeValue ( org.ovirt.engine.core.bll.AddDiskCommand.getSucceeded ( ) ) ; } case END_SUCCESS : return getEndSuccessAuditLogTypeValue ( org.ovirt.engine.core.bll.AddDiskCommand.getSucceeded ( ) ) ; default : return org.ovirt.engine.core.common.AuditLogType.USER_ADD_DISK_FINISHED_FAILURE ; } }

Target:
private boolean isDiskStorageTypeRequiresExecuteState ( ) { return ( ( org.ovirt.engine.core.bll.AddDiskCommand.getParameters ( ) . getDiskInfo ( ) . getDiskStorageType ( ) ) == ( org.ovirt.engine.core.common.businessentities.storage.DiskStorageType.IMAGE ) ) || ( ( org.ovirt.engine.core.bll.AddDiskCommand.getParameters ( ) . getDiskInfo ( ) . getDiskStorageType ( ) ) == ( org.ovirt.engine.core.common.businessentities.storage.DiskStorageType.CINDER ) ) ; }
Source:
public void UpdateIsENGINEUser ( org.ovirt.engine.core.common.users.VdcUser LoggedUser ) { setENGINEUserActionGroupList ( new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ActionGroup > ( ) ) ; this . setLoggedUser ( LoggedUser ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetRoleActionGroupsByRoleId ( new org.ovirt.engine.ui.frontend.AsyncQuery ( this , 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.models.userportal.UserPortalLoginModel loginModel = ( ( org.ovirt.engine.ui.uicommonweb.models.userportal.UserPortalLoginModel ) ( target ) ) ; loginModel.setENGINEUserActionGroupList ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ActionGroup > ) ( returnValue ) ) ) ; loginModel.GetUserRoles ( loginModel ) ; } } ) , new org.ovirt.engine.core.compat.Guid ( org.ovirt.engine.ui.uicommonweb.models.userportal.UserPortalLoginModel.ENGINEUserRoleId ) ) ; }

Target:
public void UpdateIsENGINEUser ( org.ovirt.engine.core.common.users.VdcUser LoggedUser ) { setENGINEUserActionGroupList ( new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ActionGroup > ( ) ) ; this . setLoggedUser ( LoggedUser ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetRoleActionGroupsByRoleId ( new org.ovirt.engine.ui.frontend.AsyncQuery ( this , 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.models.userportal.UserPortalLoginModel loginModel = ( ( org.ovirt.engine.ui.uicommonweb.models.userportal.UserPortalLoginModel ) ( target ) ) ; loginModel.setENGINEUserActionGroupList ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ActionGroup > ) ( returnValue ) ) ) ; loginModel.GetUserRoles ( loginModel ) ; } } ) , ApplicationGuids.engineUser.asGuid ( ) ) ; }
Source:
public void testNetworkNotChangedWhenDifferentNetworkIds ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.NetworkAttachment oldAttachment = new org.ovirt.engine.core.common.businessentities.network.NetworkAttachment ( ) ; oldAttachment.setNetworkId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; org.ovirt.engine.core.common.businessentities.network.NetworkAttachment attachment = new org.ovirt.engine.core.common.businessentities.network.NetworkAttachment ( ) ; attachment.setNetworkId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; org.junit.Assert.assertThat ( createNetworkAttachmentValidator ( attachment ) . networkNotChanged ( oldAttachment ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( VdcBllMessages.CANNOT_CHANGE_ATTACHED_NETWORK ) ) ; }

Target:
public void testNetworkNotChangedWhenDifferentNetworkIds ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.NetworkAttachment oldAttachment = new org.ovirt.engine.core.common.businessentities.network.NetworkAttachment ( ) ; oldAttachment.setNetworkId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; org.ovirt.engine.core.common.businessentities.network.NetworkAttachment attachment = new org.ovirt.engine.core.common.businessentities.network.NetworkAttachment ( ) ; attachment.setNetworkId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; org.junit.Assert.assertThat ( createNetworkAttachmentValidator ( attachment ) . networkNotChanged ( oldAttachment ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.CANNOT_CHANGE_ATTACHED_NETWORK ) ) ; }