auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private boolean validateAttachment ( ) { org.ovirt.engine.core.bll.network.cluster.NetworkClusterValidator validator = new org.ovirt.engine.core.bll.network.cluster.NetworkClusterValidator ( getNetworkCluster ( ) , org.ovirt.engine.core.bll.network.cluster.AttachNetworkToVdsGroupCommand.getVdsGroup ( ) . getcompatibility_version ( ) ) ; return ( ( ! ( org.ovirt.engine.core.utils.NetworkUtils.isManagementNetwork ( getNetwork ( ) ) ) ) || ( validate ( validator.managementNetworkAttachment ( getNetworkName ( ) ) ) ) ) && ( validate ( validator.migrationPropertySupported ( getNetworkName ( ) ) ) ) ; }

Target:
private boolean validateAttachment ( ) { org.ovirt.engine.core.bll.network.cluster.NetworkClusterValidator validator = new org.ovirt.engine.core.bll.network.cluster.NetworkClusterValidator ( getNetworkCluster ( ) , org.ovirt.engine.core.bll.network.cluster.AttachNetworkToVdsGroupCommand.getVdsGroup ( ) . getcompatibility_version ( ) ) ; return ( ( ( ! ( org.ovirt.engine.core.utils.NetworkUtils.isManagementNetwork ( getNetwork ( ) ) ) ) || ( validate ( validator.managementNetworkAttachment ( getNetworkName ( ) ) ) ) ) && ( validate ( validator.migrationPropertySupported ( getNetworkName ( ) ) ) ) ) && ( ( ( getPersistedNetwork ( ) . getProvidedBy ( ) ) == null ) || ( validateExternalNetwork ( validator ) ) ) ; }
Source:
public static org.ovirt.engine.core.common.businessentities.image_storage_domain_map saveImage ( org.ovirt.engine.core.common.businessentities.DiskImage diskImage ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getImageDao ( ) . save ( diskImage.getImage ( ) ) ; org.ovirt.engine.core.common.businessentities.image_storage_domain_map image_storage_domain_map = new org.ovirt.engine.core.common.businessentities.image_storage_domain_map ( diskImage.getImageId ( ) , diskImage.getStorageIds ( ) . get ( 0 ) , diskImage.getQuotaId ( ) ) ; org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getImageStorageDomainMapDao ( ) . save ( image_storage_domain_map ) ; return image_storage_domain_map ; }

Target:
public static org.ovirt.engine.core.common.businessentities.image_storage_domain_map saveImage ( org.ovirt.engine.core.common.businessentities.DiskImage diskImage ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getImageDao ( ) . save ( diskImage.getImage ( ) ) ; org.ovirt.engine.core.common.businessentities.image_storage_domain_map image_storage_domain_map = new org.ovirt.engine.core.common.businessentities.image_storage_domain_map ( diskImage.getImageId ( ) , diskImage.getStorageIds ( ) . get ( 0 ) , diskImage.getQuotaId ( ) , diskImage.getDiskProfileId ( ) ) ; org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getImageStorageDomainMapDao ( ) . save ( image_storage_domain_map ) ; return image_storage_domain_map ; }
Source:
private void removeMemoryVolumes ( java.lang.String memoryVolume , org.ovirt.engine.core.compat.Guid vmId ) { org.ovirt.engine.core.common.action.VdcReturnValueBase retVal = org.ovirt.engine.core.bll.ImportVmCommand.getBackend ( ) . runInternalAction ( VdcActionType.RemoveMemoryVolumes , new org.ovirt.engine.core.common.action.RemoveMemoryVolumesParameters ( memoryVolume , vmId ) ) ; if ( ! ( retVal.getSucceeded ( ) ) ) { org.ovirt.engine.core.bll.ImportVmCommand.log.errorFormat ( "Failed to remove memory volumes: {0}" , memoryVolume ) ; } }

Target:
private void endVmRelatedOps ( ) { org.ovirt.engine.core.bll.ImportVmCommand.setVm ( null ) ; if ( ( getVm ( ) ) != null ) { org.ovirt.engine.core.bll.VmHandler.unLockVm ( getVm ( ) ) ; } else { org.ovirt.engine.core.bll.ImportVmCommand.setCommandShouldBeLogged ( false ) ; org.ovirt.engine.core.bll.ImportVmCommand.log.warn ( "ImportVmCommand::EndImportCommand: Vm is null - not performing full endAction" ) ; } }
Source:
protected void updateScsiReservationChangeability ( ) { boolean isSgioUnfiltered = getIsSgIoUnfiltered ( ) . getEntity ( ) ; if ( ( getVm ( ) ) != null ) { if ( isSgioUnfiltered ) { getIsUsingScsiReservation ( ) . setIsChangable ( true ) ; } else { getIsUsingScsiReservation ( ) . setIsChangable ( false ) ; getIsUsingScsiReservation ( ) . setEntity ( false ) ; } } else { getIsUsingScsiReservation ( ) . setIsAvailable ( false ) ; getIsUsingScsiReservation ( ) . setEntity ( false ) ; getIsUsingScsiReservation ( ) . setIsChangable ( false ) ; } }

Target:
protected void updateScsiReservationChangeability ( ) { boolean isSgioUnfiltered = getIsSgIoUnfiltered ( ) . getEntity ( ) ; if ( ( getVm ( ) ) != null ) { if ( isSgioUnfiltered ) { getIsUsingScsiReservation ( ) . setIsChangeable ( true ) ; } else { getIsUsingScsiReservation ( ) . setIsChangeable ( false ) ; getIsUsingScsiReservation ( ) . setEntity ( false ) ; } } else { getIsUsingScsiReservation ( ) . setIsAvailable ( false ) ; getIsUsingScsiReservation ( ) . setEntity ( false ) ; getIsUsingScsiReservation ( ) . setIsChangeable ( false ) ; } }
Source:
public void testHotsetUpdateableWhenHotsetRequestedWithStatus ( ) { org.ovirt.engine.core.utils.ObjectIdentityChecker oic = new org.ovirt.engine.core.utils.ObjectIdentityChecker ( org.ovirt.engine.core.utils.Jedi.class ) ; oic.AddField ( VMStatus.Down , "name" ) ; oic.AddHotsetFields ( "name" ) ; org.junit.Assert.assertTrue ( "hot set requested for hot set fields should be true" , oic.IsFieldUpdatable ( VMStatus.Down , "name" , null , true ) ) ; }

Target:
public void testHotsetUpdateableWhenHotsetRequestedWithStatus ( ) { org.ovirt.engine.core.utils.ObjectIdentityChecker oic = new org.ovirt.engine.core.utils.ObjectIdentityChecker ( org.ovirt.engine.core.utils.Jedi.class ) ; oic.addField ( VMStatus.Down , "name" ) ; oic.addHotsetFields ( "name" ) ; org.junit.Assert.assertTrue ( "hot set requested for hot set fields should be true" , oic.isFieldUpdatable ( VMStatus.Down , "name" , null , true ) ) ; }
Source:
public void setVmsWithvNumaNodeList ( java.util.List < org.ovirt.engine.core.common.businessentities.VM > vmsWithvNumaNodeList ) { super . setVmsWithvNumaNodeList ( vmsWithvNumaNodeList ) ; if ( org.ovirt.engine.core.compat.Guid.isNullOrEmpty ( vm.getId ( ) ) ) { vmsWithvNumaNodeList.add ( vm ) ; } }

Target:
public void setVmsWithvNumaNodeList ( java.util.List < org.ovirt.engine.core.common.businessentities.VM > vmsWithvNumaNodeList ) { super . setVmsWithvNumaNodeList ( vmsWithvNumaNodeList ) ; if ( org.ovirt.engine.core.compat.Guid.isNullOrEmpty ( vm.getId ( ) ) ) { vmsWithvNumaNodeList.add ( vm ) ; } else { for ( org.ovirt.engine.core.common.businessentities.VM vmFromDb : vmsWithvNumaNodeList ) { if ( vmFromDb.getId ( ) . equals ( vm.getId ( ) ) ) { vmFromDb.setvNumaNodeList ( vm.getvNumaNodeList ( ) ) ; break ; } } } }
Source:
private void mockVmDevice ( org.ovirt.engine.core.common.businessentities.VmDevice vmDevice ) { org.mockito.Mockito.when ( vmDeviceDao.getVmDeviceByVmIdAndType ( vm.getId ( ) , vmDevice.getType ( ) ) ) . thenReturn ( java.util.Arrays.asList ( vmDevice ) ) ; org.mockito.Mockito.doReturn ( vmDeviceDao ) . when ( dbFacade ) . getVmDeviceDao ( ) ; }

Target:
private void mockVmDevice ( org.ovirt.engine.core.common.businessentities.VmDevice vmDevice ) { org.mockito.Mockito.when ( vmDeviceDao.getVmDeviceByVmIdAndType ( vm.getId ( ) , vmDevice.getType ( ) ) ) . thenReturn ( java.util.Arrays.asList ( vmDevice ) ) ; org.mockito.Mockito.doReturn ( vmDeviceDao ) . when ( dbFacade ) . getVmDeviceDao ( ) ; org.ovirt.engine.core.bll.utils.VmDeviceUtils.init ( ) ; }
Source:
public < T > T createLockingInstance ( T instance , java.lang.Class < T > interfaceClass , java.util.concurrent.locks.ReentrantReadWriteLock lock ) { java.util.Objects.requireNonNull ( instance ) ; return ( ( T ) ( java.lang.reflect.Proxy.newProxyInstance ( interfaceClass.getClassLoader ( ) , new java.lang.Class < ? > [ ] { interfaceClass } , new org.ovirt.engine.core.utils.lock.LockedObjectFactory.LockingInvocationHandler ( instance , lock ) ) ) ) ; }

Target:
public < T > T createLockingInstance ( T instance , java.lang.Class < T > interfaceClass , java.util.concurrent.locks.ReentrantReadWriteLock lock ) { java.util.Objects.requireNonNull ( instance ) ; org.ovirt.engine.core.utils.lock.LockedObjectFactory.log.debug ( "Creating locking proxy for using lock: {}" , instance , lock ) ; return ( ( T ) ( java.lang.reflect.Proxy.newProxyInstance ( interfaceClass.getClassLoader ( ) , new java.lang.Class < ? > [ ] { interfaceClass } , new org.ovirt.engine.core.utils.lock.LockedObjectFactory.LockingInvocationHandler ( instance , lock ) ) ) ) ; }
Source:
public void getAllProvidersByType ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.common.businessentities.ProviderType providerType ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Provider > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllProviders , new org.ovirt.engine.core.common.queries.GetAllProvidersParameters ( providerType ) , aQuery ) ; }

Target:
public void getProviderCertificateChain ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.common.businessentities.Provider provider ) { 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 java.util.Collections.< org.ovirt.engine.core.common.businessentities.CertificateInfo > emptyList ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetProviderCertificateChain , new org.ovirt.engine.core.common.queries.ProviderQueryParameters ( provider ) , aQuery ) ; }
Source:
public org.ovirt.engine.core.bll.CommandBase < ? > retrieveCommand ( org.ovirt.engine.core.compat.Guid commandId ) { org.ovirt.engine.core.bll.CommandBase < ? > command = null ; org.ovirt.engine.core.common.businessentities.CommandEntity cmdEntity = commandsCache.get ( commandId ) ; if ( cmdEntity != null ) { command = org.ovirt.engine.core.bll.CommandsFactory.createCommand ( cmdEntity.getCommandType ( ) , cmdEntity.getActionParameters ( ) ) ; } return command ; }

Target:
public org.ovirt.engine.core.bll.CommandBase < ? > retrieveCommand ( org.ovirt.engine.core.compat.Guid commandId ) { return buildCommand ( commandsCache.get ( commandId ) ) ; }
Source:
protected boolean canDoAction ( ) { if ( ( getDisk ( ) ) == null ) { return failCanDoAction ( VdcBllMessages.ACTION_TYPE_FAILED_VM_IMAGE_DOES_NOT_EXIST ) ; } return ( validateAllVmsForDiskAreDown ( ) ) && ( canRemoveDiskBasedOnStorageTypeCheck ( ) ) ; }

Target:
protected boolean canDoAction ( ) { if ( ( getDisk ( ) ) == null ) { return failCanDoAction ( VdcBllMessages.ACTION_TYPE_FAILED_VM_IMAGE_DOES_NOT_EXIST ) ; } org.ovirt.engine.core.bll.validator.DiskValidator oldDiskValidator = new org.ovirt.engine.core.bll.validator.DiskValidator ( getDisk ( ) ) ; return ( ( validate ( oldDiskValidator.validateNotHostedEngineDisk ( ) ) ) && ( validateAllVmsForDiskAreDown ( ) ) ) && ( canRemoveDiskBasedOnStorageTypeCheck ( ) ) ; }
Source:
protected boolean canDoAction ( ) { if ( ! ( super . canDoAction ( ) ) ) { return false ; } return true ; }

Target:
protected boolean canDoAction ( ) { if ( ! ( super . canDoAction ( ) ) ) { return false ; } for ( org.ovirt.engine.core.common.businessentities.gluster.GlusterGeoRepSession session : georepSessions ) { if ( ( ( session.getSlaveVolumeId ( ) ) == null ) || ( ( session.getSlaveNodeUuid ( ) ) == null ) ) { return failCanDoAction ( VdcBllMessages.ACTION_TYPE_FAILED_REMOTE_CLUSTER_NOT_MAINTAINED_BY_ENGINE ) ; } } return true ; }
Source:
public void vnicProfileInUseByTemplates ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.VmTemplate template = org.mockito.Mockito.mock ( org.ovirt.engine.core.common.businessentities.VmTemplate.class ) ; org.mockito.Mockito.when ( template.getName ( ) ) . thenReturn ( NAMEABLE_NAME ) ; vnicProfileNotUsedByTemplatesTest ( failsWithVnicProfileInUse ( ) , java.util.Collections.singletonList ( template ) ) ; }

Target:
public void vnicProfileInUseByTemplates ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.VmTemplate template = org.mockito.Mockito.mock ( org.ovirt.engine.core.common.businessentities.VmTemplate.class ) ; org.mockito.Mockito.when ( template.getName ( ) ) . thenReturn ( org.ovirt.engine.core.bll.validator.VnicProfileValidatorTest.NAMEABLE_NAME ) ; vnicProfileNotUsedByTemplatesTest ( org.ovirt.engine.core.bll.validator.VnicProfileValidatorTest.failsWithVnicProfileInUse ( ) , java.util.Collections.singletonList ( template ) ) ; }
Source:
private void sortVms ( java.util.Collection < org.ovirt.engine.ui.uicommonweb.models.EntityModel < org.ovirt.engine.core.common.businessentities.VM > > vms ) { java.util.List < org.ovirt.engine.core.common.businessentities.VM > vmsList = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.ui.uicommonweb.models.EntityModel < org.ovirt.engine.core.common.businessentities.VM > vm : vms ) { vmsList.add ( vm.getEntity ( ) ) ; } java.util.Collections.sort ( vmsList , new org.ovirt.engine.core.common.businessentities.comparators.LexoNumericNameableComparator ( ) ) ; vms.clear ( ) ; for ( org.ovirt.engine.core.common.businessentities.VM vm : vmsList ) { vms.add ( new org.ovirt.engine.ui.uicommonweb.models.EntityModel ( vm ) ) ; } }

Target:
private boolean validateSameArchitecture ( java.util.List < org.ovirt.engine.core.common.businessentities.VM > vmsToImport ) { final org.ovirt.engine.core.common.businessentities.ArchitectureType architectureOfFirst = vmsToImport.get ( 0 ) . getClusterArch ( ) ; for ( org.ovirt.engine.core.common.businessentities.VM vm : vmsToImport ) { if ( ! ( java.util.Objects.equals ( architectureOfFirst , vm.getClusterArch ( ) ) ) ) { showErrorPopup ( constants.sameArchitectureRequired ( ) ) ; return false ; } } return true ; }
Source:
protected void executeVdsBrokerCommand ( ) { _result = org.ovirt.engine.core.vdsbroker.vdsbroker.GetStorageDomainStatsVDSCommand.getBroker ( ) . getStorageDomainStats ( org.ovirt.engine.core.vdsbroker.vdsbroker.GetStorageDomainStatsVDSCommand.getParameters ( ) . getStorageDomainId ( ) . toString ( ) ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.GetStorageDomainStatsVDSCommand.proceedProxyReturnValue ( ) ; org.ovirt.engine.core.common.businessentities.StorageDomain domain = org.ovirt.engine.core.vdsbroker.vdsbroker.GetStorageDomainStatsVDSCommand.BuildStorageDynamicFromXmlRpcStruct ( _result.mStorageStats ) ; domain.setId ( org.ovirt.engine.core.vdsbroker.vdsbroker.GetStorageDomainStatsVDSCommand.getParameters ( ) . getStorageDomainId ( ) ) ; setReturnValue ( domain ) ; }

Target:
protected void executeVdsBrokerCommand ( ) { _result = org.ovirt.engine.core.vdsbroker.vdsbroker.GetStorageDomainStatsVDSCommand.getBroker ( ) . getStorageDomainStats ( org.ovirt.engine.core.vdsbroker.vdsbroker.GetStorageDomainStatsVDSCommand.getParameters ( ) . getStorageDomainId ( ) . toString ( ) ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.GetStorageDomainStatsVDSCommand.proceedProxyReturnValue ( ) ; org.ovirt.engine.core.common.businessentities.StorageDomain domain = org.ovirt.engine.core.vdsbroker.vdsbroker.GetStorageDomainStatsVDSCommand.buildStorageDynamicFromXmlRpcStruct ( _result.mStorageStats ) ; domain.setId ( org.ovirt.engine.core.vdsbroker.vdsbroker.GetStorageDomainStatsVDSCommand.getParameters ( ) . getStorageDomainId ( ) ) ; setReturnValue ( domain ) ; }
Source:
protected void updateMenuItem ( com.google.gwt.user.client.ui.MenuItem item , org.ovirt.engine.ui.common.widget.action.ActionButtonDefinition < T > buttonDef ) { item.setVisible ( ( ( buttonDef.isAccessible ( ) ) && ( buttonDef.isVisible ( org.ovirt.engine.ui.common.widget.action.AbstractActionPanel.getSelectedItems ( ) ) ) ) ) ; item.setEnabled ( buttonDef.isEnabled ( org.ovirt.engine.ui.common.widget.action.AbstractActionPanel.getSelectedItems ( ) ) ) ; if ( ( buttonDef.getToolTip ( ) ) != null ) { item.setTitle ( buttonDef.getToolTip ( ) ) ; } }

Target:
protected void updateMenuItem ( com.google.gwt.user.client.ui.MenuItem item , org.ovirt.engine.ui.common.widget.action.ActionButtonDefinition < T > buttonDef ) { item.setVisible ( ( ( buttonDef.isAccessible ( org.ovirt.engine.ui.common.widget.action.AbstractActionPanel.getSelectedItems ( ) ) ) && ( buttonDef.isVisible ( org.ovirt.engine.ui.common.widget.action.AbstractActionPanel.getSelectedItems ( ) ) ) ) ) ; item.setEnabled ( buttonDef.isEnabled ( org.ovirt.engine.ui.common.widget.action.AbstractActionPanel.getSelectedItems ( ) ) ) ; if ( ( buttonDef.getMenuItemToolTip ( ) ) != null ) { item.setTitle ( buttonDef.getMenuItemToolTip ( ) ) ; } }
Source:
public void testSave ( ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterServer newEntity = new org.ovirt.engine.core.common.businessentities.gluster.GlusterServer ( ) ; newEntity.setId ( org.ovirt.engine.core.dao.gluster.GlusterServerDaoTest.SERVER_ID2 ) ; newEntity.setGlusterServerUuid ( FixturesTool.GLUSTER_SERVER_UUID2 ) ; dao.save ( newEntity ) ; org.ovirt.engine.core.common.businessentities.gluster.GlusterServer entity = dao.getByServerId ( newEntity.getId ( ) ) ; org.junit.Assert.assertEquals ( newEntity , entity ) ; }

Target:
public void testSave ( ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterServer newEntity = new org.ovirt.engine.core.common.businessentities.gluster.GlusterServer ( ) ; newEntity.setId ( org.ovirt.engine.core.dao.gluster.GlusterServerDaoTest.SERVER_ID2 ) ; newEntity.setGlusterServerUuid ( FixturesTool.GLUSTER_SERVER_UUID2 ) ; newEntity.setPeerStatus ( PeerStatus.CONNECTED ) ; dao.save ( newEntity ) ; org.ovirt.engine.core.common.businessentities.gluster.GlusterServer entity = dao.getByServerId ( newEntity.getId ( ) ) ; org.junit.Assert.assertEquals ( newEntity , entity ) ; }
Source:
public void testGetAllInterfacesForVmFilteredWithoutPermissionsAndWithoutFiltering ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmNetworkInterface > result = dao.getAllForVm ( org.ovirt.engine.core.dao.VmNetworkInterfaceDAOTest.VM_ID , org.ovirt.engine.core.dao.VmNetworkInterfaceDAOTest.UNPRIVILEGED_USER_ID , false ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertFalse ( result.isEmpty ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.VmNetworkInterface iface : result ) { org.junit.Assert.assertEquals ( org.ovirt.engine.core.dao.VmNetworkInterfaceDAOTest.VM_ID , iface.getVmId ( ) ) ; } }

Target:
public void testGetAllInterfacesForVmFilteredWithoutPermissionsAndWithoutFiltering ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > result = dao.getAllForVm ( org.ovirt.engine.core.dao.VmNetworkInterfaceDAOTest.VM_ID , org.ovirt.engine.core.dao.VmNetworkInterfaceDAOTest.UNPRIVILEGED_USER_ID , false ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertFalse ( result.isEmpty ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface iface : result ) { org.junit.Assert.assertEquals ( org.ovirt.engine.core.dao.VmNetworkInterfaceDAOTest.VM_ID , iface.getVmId ( ) ) ; } }
Source:
protected boolean canDoAction ( ) { org.ovirt.engine.core.common.businessentities.VDSGroup cluster = org.ovirt.engine.core.bll.gluster.SyncStorageDevicesCommand.getVdsGroup ( ) ; if ( ( ! ( cluster.supportsGlusterService ( ) ) ) || ( ! ( getGlusterUtil ( ) . isGlusterBrickProvisioningSupported ( cluster.getCompatibilityVersion ( ) , org.ovirt.engine.core.bll.gluster.SyncStorageDevicesCommand.getVdsGroup ( ) . getId ( ) ) ) ) ) { return failCanDoAction ( VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_PROVISIONING_NOT_SUPPORTED_BY_CLUSTER ) ; } org.ovirt.engine.core.bll.VdsValidator validator = new org.ovirt.engine.core.bll.VdsValidator ( org.ovirt.engine.core.bll.gluster.SyncStorageDevicesCommand.getVds ( ) ) ; return validate ( validator.isUp ( ) ) ; }

Target:
protected boolean canDoAction ( ) { org.ovirt.engine.core.common.businessentities.VDSGroup cluster = org.ovirt.engine.core.bll.gluster.SyncStorageDevicesCommand.getVdsGroup ( ) ; if ( ( ! ( cluster.supportsGlusterService ( ) ) ) || ( ! ( getGlusterUtil ( ) . isGlusterBrickProvisioningSupported ( cluster.getCompatibilityVersion ( ) , org.ovirt.engine.core.bll.gluster.SyncStorageDevicesCommand.getVdsGroup ( ) . getId ( ) ) ) ) ) { return failCanDoAction ( EngineMessage.ACTION_TYPE_FAILED_STORAGE_PROVISIONING_NOT_SUPPORTED_BY_CLUSTER ) ; } org.ovirt.engine.core.bll.VdsValidator validator = new org.ovirt.engine.core.bll.VdsValidator ( org.ovirt.engine.core.bll.gluster.SyncStorageDevicesCommand.getVds ( ) ) ; return validate ( validator.isUp ( ) ) ; }
Source:
public void countAllTemplates ( 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 ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmTemplateCount , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }

Target:
public void getClusterNetworkList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { if ( ( aQuery.converterCallback ) == null ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.Network > ( ) ; } return source ; } } ; } org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllNetworksByClusterId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( clusterId ) , aQuery ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity getGlusterVolume ( org.ovirt.engine.core.compat.Guid id ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity volumeEntity = new org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity ( ) ; java.util.HashSet < org.ovirt.engine.core.common.businessentities.gluster.TransportType > transportType = new java.util.HashSet < org.ovirt.engine.core.common.businessentities.gluster.TransportType > ( ) ; java.util.HashSet < org.ovirt.engine.core.common.businessentities.gluster.AccessProtocol > accessProtocol = new java.util.HashSet < org.ovirt.engine.core.common.businessentities.gluster.AccessProtocol > ( ) ; accessProtocol.add ( AccessProtocol.GLUSTER ) ; transportType.add ( TransportType.TCP ) ; volumeEntity.setId ( id ) ; volumeEntity.setName ( "test-vol" ) ; volumeEntity.setAccessProtocols ( accessProtocol ) ; volumeEntity.setTransportTypes ( transportType ) ; volumeEntity.setVolumeType ( GlusterVolumeType.DISTRIBUTE ) ; return volumeEntity ; }

Target:
private org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity getGlusterVolume ( org.ovirt.engine.core.compat.Guid volumeId ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity volumeEntity = new org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity ( ) ; volumeEntity.setId ( volumeId ) ; volumeEntity.setName ( "test-vol" ) ; volumeEntity.addAccessProtocol ( AccessProtocol.GLUSTER ) ; volumeEntity.addTransportType ( TransportType.TCP ) ; volumeEntity.setVolumeType ( GlusterVolumeType.DISTRIBUTE ) ; volumeEntity.setStatus ( ( volumeId.equals ( startedVolumeId ) ? org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeStatus.UP : org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeStatus.DOWN ) ) ; volumeEntity.setClusterId ( CLUSTER_ID ) ; return volumeEntity ; }
Source:
protected final void verifyModel ( org.ovirt.engine.core.common.businessentities.network.NetworkAttachment model , int index ) { assertEquals ( GUIDS [ index ] . toString ( ) , model.getId ( ) ) ; assertEquals ( GUIDS [ index ] . toString ( ) , model.getNetwork ( ) . getId ( ) ) ; verifyModel ( model ) ; verifyLinks ( model ) ; }

Target:
protected final void verifyModel ( org.ovirt.engine.core.common.businessentities.network.NetworkAttachment model , int index ) { org.junit.Assert.assertEquals ( GUIDS [ index ] . toString ( ) , model.getId ( ) ) ; org.junit.Assert.assertEquals ( GUIDS [ index ] . toString ( ) , model.getNetwork ( ) . getId ( ) ) ; verifyModel ( model ) ; verifyLinks ( model ) ; }
Source:
public static void getGlusterSwiftServices ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid serverId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? source : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterServerService > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterServerServicesByServerId , new org.ovirt.engine.core.common.queries.gluster.GlusterServiceQueryParameters ( serverId , org.ovirt.engine.core.common.businessentities.gluster.ServiceType.GLUSTER_SWIFT ) , aQuery ) ; }

Target:
public static void getGlusterVolumeGeoRepRecommendationViolations ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid masterVolumeId , org.ovirt.engine.core.compat.Guid slaveVolumeId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object returnValue , org.ovirt.engine.ui.frontend.AsyncQuery asyncQuery ) { return returnValue == null ? new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterGeoRepNonEligibilityReason > ( ) : ( ( java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterGeoRepNonEligibilityReason > ) ( returnValue ) ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetNonEligibilityReasonsOfVolumeForGeoRepSession , new org.ovirt.engine.core.common.queries.gluster.GlusterVolumeGeoRepEligibilityParameters ( masterVolumeId , slaveVolumeId ) , aQuery ) ; }
Source:
public java.lang.Void runInTransaction ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.Network > networks = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getNetworkDao ( ) . getAllForCluster ( vds.getvds_group_id ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.Network net : networks ) { org.ovirt.engine.core.bll.AttachNetworkToVdsGroupCommand.SetNetworkStatus ( vds.getvds_group_id ( ) , net ) ; } return null ; }

Target:
public java.lang.Void runInTransaction ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.Network > networks = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getNetworkDao ( ) . getAllForCluster ( vds.getvds_group_id ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.Network net : networks ) { org.ovirt.engine.core.bll.network.cluster.NetworkClusterHelper.setStatus ( vds.getvds_group_id ( ) , net ) ; } return null ; }
Source:
private void verifyIps ( org.ovirt.engine.api.model.ReportedDevice device ) { java.util.List < org.ovirt.engine.api.model.Ip > ips = device.getIps ( ) . getIps ( ) ; assertEquals ( org.ovirt.engine.api.restapi.resource.BackendVmReportedDevicesResourceTest.ADDRESSES.length , ips.size ( ) ) ; for ( int i = 0 ; i < ( org.ovirt.engine.api.restapi.resource.BackendVmReportedDevicesResourceTest.ADDRESSES.length ) ; i ++ ) { assertEquals ( org.ovirt.engine.api.restapi.resource.BackendVmReportedDevicesResourceTest.ADDRESSES [ i ] , ips.get ( i ) . getAddress ( ) ) ; } }

Target:
private void verifyIps ( org.ovirt.engine.api.model.ReportedDevice device ) { java.util.List < org.ovirt.engine.api.model.Ip > ips = device.getIps ( ) . getIps ( ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.api.restapi.resource.BackendVmReportedDevicesResourceTest.ADDRESSES.length , ips.size ( ) ) ; for ( int i = 0 ; i < ( org.ovirt.engine.api.restapi.resource.BackendVmReportedDevicesResourceTest.ADDRESSES.length ) ; i ++ ) { org.junit.Assert.assertEquals ( org.ovirt.engine.api.restapi.resource.BackendVmReportedDevicesResourceTest.ADDRESSES [ i ] , ips.get ( i ) . getAddress ( ) ) ; } }
Source:
public static < T extends java.lang.Enum < ? > > org.ovirt.engine.ui.uicompat.Translator create ( java.lang.Class < T > type ) { org.ovirt.engine.ui.uicompat.EnumTranslator translator = org.ovirt.engine.ui.uicompat.EnumTranslator.translatorsMap.get ( type ) ; if ( translator == null ) { translator = new org.ovirt.engine.ui.uicompat.EnumTranslator < T > ( type ) ; org.ovirt.engine.ui.uicompat.EnumTranslator.translatorsMap.put ( type , translator ) ; } return translator ; }

Target:
public static org.ovirt.engine.ui.uicompat.EnumTranslator getInstance ( ) { return org.ovirt.engine.ui.uicompat.EnumTranslator.INSTANCE ; }
Source:
public void testRemove ( ) throws java.lang.Exception { setUpGetEntityExpectations ( 0 ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.RemoveBookmark , org.ovirt.engine.core.common.action.BookmarksParametersBase.class , new java.lang.String [ ] { "BookmarkId" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , true , true ) ) ; verifyRemove ( resource.remove ( ) ) ; }

Target:
public void testRemove ( ) throws java.lang.Exception { setUpGetEntityExpectations ( 0 ) ; setUriInfo ( setUpActionExpectations ( ActionType.RemoveBookmark , org.ovirt.engine.core.common.action.BookmarksParametersBase.class , new java.lang.String [ ] { "BookmarkId" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , true , true ) ) ; verifyRemove ( resource.remove ( ) ) ; }
Source:
protected org.ovirt.engine.core.bll.ValidationResult macAvailable ( ) { java.lang.String macAddress = org.ovirt.engine.core.bll.network.vm.ActivateDeactivateVmNicCommand.getParameters ( ) . getNic ( ) . getMacAddress ( ) ; return new org.ovirt.engine.core.bll.validator.MacAddressValidator ( org.ovirt.engine.core.bll.network.vm.ActivateDeactivateVmNicCommand.getMacPool ( ) , macAddress ) . isMacAssignableValidator ( ) ; }

Target:
protected org.ovirt.engine.core.bll.ValidationResult macAvailable ( ) { java.lang.Boolean allowDupMacs = org.ovirt.engine.core.common.config.Config.< java.lang.Boolean > getValue ( ConfigValues.AllowDuplicateMacAddresses ) ; org.ovirt.engine.core.bll.network.VmInterfaceManager vmInterfaceManager = new org.ovirt.engine.core.bll.network.VmInterfaceManager ( org.ovirt.engine.core.bll.network.vm.ActivateDeactivateVmNicCommand.getMacPool ( ) ) ; if ( allowDupMacs || ( ! ( vmInterfaceManager.existsPluggedInterfaceWithSameMac ( org.ovirt.engine.core.bll.network.vm.ActivateDeactivateVmNicCommand.getParameters ( ) . getNic ( ) ) ) ) ) { return org.ovirt.engine.core.bll.ValidationResult.VALID ; } else { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.NETWORK_MAC_ADDRESS_IN_USE ) ; } }
Source:
private boolean isEditConsoleEnabled ( org.ovirt.engine.ui.uicommonweb.models.userportal.UserPortalItemModel item ) { if ( ( ( ! ( item.isPool ( ) ) ) && ( ( consoleUtils.determineConnectionProtocol ( item ) ) != null ) ) && ( item.getStatus ( ) . equals ( VMStatus.Up ) ) ) { return true ; } return false ; }

Target:
private boolean isEditConsoleEnabled ( org.ovirt.engine.ui.uicommonweb.models.userportal.UserPortalItemModel item ) { return ( ( item.getVM ( ) ) != null ) && ( item.getVM ( ) . isRunningOrPaused ( ) ) ; }
Source:
private org.ovirt.engine.core.compat.Guid getClusterIdOfSelectedHosts ( ) { org.ovirt.engine.core.compat.Guid clusterId = null ; for ( java.lang.Object item : org.ovirt.engine.ui.uicommonweb.models.hosts.HostListModel.getSelectedItems ( ) ) { org.ovirt.engine.core.common.businessentities.VDS host = ( ( org.ovirt.engine.core.common.businessentities.VDS ) ( item ) ) ; if ( clusterId == null ) { clusterId = host.getVdsGroupId ( ) ; } else if ( ! ( clusterId.equals ( host.getVdsGroupId ( ) ) ) ) { clusterId = null ; break ; } } return clusterId ; }

Target:
private org.ovirt.engine.core.compat.Guid getClusterIdOfSelectedHosts ( ) { org.ovirt.engine.core.compat.Guid clusterId = null ; for ( java.lang.Object item : org.ovirt.engine.ui.uicommonweb.models.hosts.HostListModel.getSelectedItems ( ) ) { org.ovirt.engine.core.common.businessentities.VDS host = ( ( org.ovirt.engine.core.common.businessentities.VDS ) ( item ) ) ; if ( clusterId == null ) { clusterId = host.getClusterId ( ) ; } else if ( ! ( clusterId.equals ( host.getClusterId ( ) ) ) ) { clusterId = null ; break ; } } return clusterId ; }
Source:
public static void getVnicProfilesByDcId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dcId ) { if ( ( aQuery.converterCallback ) == null ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VnicProfileView > ( ) ; } return source ; } } ; } org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVnicProfilesByDataCenterId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dcId ) , aQuery ) ; }

Target:
public static void getVnicProfilesByNetworkId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid networkId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VnicProfileView > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVnicProfilesByNetworkId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( networkId ) , aQuery ) ; }
Source:
private void createVDSandStoragePool ( ) { vds = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; vds.setId ( vdsId ) ; vds.setVdsName ( "TestVDS" ) ; vds.setStoragePoolId ( storagePoolId ) ; vds.setStatus ( VDSStatus.Up ) ; vds.setSpmStatus ( VdsSpmStatus.None ) ; vds.setVdsSpmPriority ( 10 ) ; storagePool = new org.ovirt.engine.core.common.businessentities.StoragePool ( ) ; storagePool.setId ( storagePoolId ) ; }

Target:
private void createVDSandStoragePool ( ) { vds = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; vds.setId ( vdsId ) ; vds.setVdsName ( "TestVDS" ) ; vds.setStoragePoolId ( storagePoolId ) ; vds.setStatus ( VDSStatus.Up ) ; vds.setSpmStatus ( VdsSpmStatus.None ) ; vds.setVdsSpmPriority ( 10 ) ; storagePool = new org.ovirt.engine.core.common.businessentities.StoragePool ( ) ; storagePool.setId ( storagePoolId ) ; storagePool.setStatus ( StoragePoolStatus.Up ) ; }
Source:
public void setTabIndex ( int index ) { asSuggestBox ( ) . setTabIndex ( index ) ; }

Target:
public void setAcceptableValues ( java.util.Collection < java.lang.Object > values ) { java.util.Collection < java.lang.String > stringValues = org.ovirt.engine.ui.uicommonweb.Linq.cast ( values ) ; com.google.gwt.user.client.ui.MultiWordSuggestOracle suggestOracle = ( ( com.google.gwt.user.client.ui.MultiWordSuggestOracle ) ( asSuggestBox ( ) . getSuggestOracle ( ) ) ) ; suggestOracle.clear ( ) ; suggestOracle.addAll ( stringValues ) ; suggestOracle.setDefaultSuggestionsFromText ( stringValues ) ; }
Source:
public void executeCommandWhenFailed ( ) { cmd = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.gluster.DisableGlusterHookCommand ( new org.ovirt.engine.core.common.action.gluster.GlusterHookParameters ( CLUSTER_ID , HOOK_ID ) ) ) ; setupMocks ( cmd ) ; mockBackend ( cmd , false ) ; cmd.executeCommand ( ) ; org.junit.Assert.assertFalse ( cmd.getReturnValue ( ) . getSucceeded ( ) ) ; org.junit.Assert.assertEquals ( cmd.getAuditLogTypeValue ( ) , AuditLogType.GLUSTER_HOOK_DISABLE_FAILED ) ; }

Target:
public void executeCommand ( ) { cmd = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.gluster.DisableGlusterHookCommand < 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.assertTrue ( cmd.getReturnValue ( ) . getSucceeded ( ) ) ; org.junit.Assert.assertEquals ( cmd.getAuditLogTypeValue ( ) , AuditLogType.GLUSTER_HOOK_DISABLE ) ; }
Source:
public void getUsbPolicyOnUpdateCurrentlyDisabledGotEnabledPolicyNotSetUsbOnPre3_1Cluster ( ) { org.ovirt.engine.api.model.Usb usb = new org.ovirt.engine.api.model.Usb ( ) ; usb.setEnabled ( true ) ; org.ovirt.engine.core.common.businessentities.VDSGroup vdsGroup = new org.ovirt.engine.core.common.businessentities.VDSGroup ( ) ; vdsGroup.setCompatibilityVersion ( Version.v3_0 ) ; assertEquals ( org.ovirt.engine.api.restapi.types.VmMapper.getUsbPolicyOnUpdate ( usb , UsbPolicy.DISABLED , vdsGroup.getCompatibilityVersion ( ) ) , UsbPolicy.ENABLED_LEGACY ) ; }

Target:
public void getUsbPolicyIsSetDisabled ( ) { org.ovirt.engine.api.model.Usb usb = new org.ovirt.engine.api.model.Usb ( ) ; assertEquals ( org.ovirt.engine.api.restapi.types.VmMapper.getUsbPolicyOnCreate ( usb ) , UsbPolicy.DISABLED ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeGeoRepStatusForXmlRpc glusterVolumeGeoRepStatus ( ) { try { java.util.Map < java.lang.String , java.lang.Object > response = vdsServer.glusterVolumeGeoRepStatus ( ) ; 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 glusterVolumeGeoRepSessionStart ( java.lang.String volumeName , java.lang.String remoteHost , java.lang.String remoteVolumeName , java.lang.String userName , java.lang.Boolean force ) { try { return new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( vdsServer.glusterVolumeGeoRepSessionStart ( volumeName , remoteHost , remoteVolumeName , userName , force ) ) ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
Source:
public void getAAANamespaces ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.HashMap < java.lang.String , java.util.List < java.lang.String > > ) ( source ) ) : new java.util.HashMap < java.lang.String , java.util.List < java.lang.String > > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAvailableNamespaces , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }

Target:
public void getStorageDomainById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storageDomainId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( org.ovirt.engine.core.common.businessentities.StorageDomain ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageDomainById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( storageDomainId ) , aQuery ) ; }
Source:
public void scoreLdapServer ( java.net.URI ldapURI , org.ovirt.engine.core.bll.adbroker.Score score ) { org.ovirt.engine.core.bll.adbroker.ScorableLDAPServer server = ldapServers.get ( ldapURI ) ; if ( server != null ) { server.setScore ( score.getValue ( ) ) ; if ( org.ovirt.engine.core.bll.adbroker.Domain.log.isDebugEnabled ( ) ) { org.ovirt.engine.core.bll.adbroker.Domain.log.debug ( ( ( ( "LDAP server " + ( ldapURI.toString ( ) ) ) + " has been scored " ) + score ) ) ; } } }

Target:
public java.util.List < java.net.URI > getLdapServers ( ) { lock.readLock ( ) . lock ( ) ; try { return new java.util.ArrayList < java.net.URI > ( ldapServers ) ; } finally { lock.readLock ( ) . unlock ( ) ; } }
Source:
private void assertEqualsTagsVdsMap ( org.ovirt.engine.core.common.businessentities.TagsVdsMap existing , org.ovirt.engine.core.common.businessentities.TagsVdsMap result ) { org.junit.Assert.assertEquals ( "Tag ID is not equal" , existing.getTagId ( ) , result.getTagId ( ) ) ; org.junit.Assert.assertEquals ( "VDS ID is not equal" , existing.getVdsId ( ) , result.getVdsId ( ) ) ; org.junit.Assert.assertEquals ( "Object equation" , existing , result ) ; }

Target:
private void assertEqualsTagsVdsMap ( org.ovirt.engine.core.common.businessentities.TagsVdsMap existing , org.ovirt.engine.core.common.businessentities.TagsVdsMap result ) { org.junit.jupiter.api.Assertions.assertEquals ( existing.getTagId ( ) , result.getTagId ( ) , "Tag ID is not equal" ) ; org.junit.jupiter.api.Assertions.assertEquals ( existing.getVdsId ( ) , result.getVdsId ( ) , "VDS ID is not equal" ) ; org.junit.jupiter.api.Assertions.assertEquals ( existing , result , "Object equation" ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.ServerConnectionListReturnForXmlRpc getStorageConnectionsList ( java.lang.String spUUID ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.getStorageConnectionsList ( spUUID ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.ServerConnectionListReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.ServerConnectionListReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.OneMapReturnForXmlRpc get_image_transfer_session_stats ( java.lang.String ticketId ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.get_image_transfer_session_stats ( ticketId ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.OneMapReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.OneMapReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
Source:
public static void GetCPUList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Version version ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ServerCpu > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ServerCpu > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllServerCpuList , new org.ovirt.engine.core.common.queries.GetAllServerCpuListParameters ( version ) , aQuery ) ; }

Target:
public static void GetDataCenterMaxNameLength ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Integer ) ( source ) ) . intValue ( ) : 1 ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.StoragePoolNameSizeLimit , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
public void mapNonsenseFromRestToBackend ( ) throws java.lang.Exception { org.ovirt.engine.api.model.Sso restSso = new org.ovirt.engine.api.model.Sso ( ) ; restSso.setMethods ( new org.ovirt.engine.api.model.Methods ( ) ) ; org.ovirt.engine.api.model.Method unknownMethod = new org.ovirt.engine.api.model.Method ( ) ; unknownMethod.setId ( "žbrkmrkfrk" ) ; restSso.getMethods ( ) . getMethods ( ) . add ( unknownMethod ) ; junit.framework.Assert.assertEquals ( null , org.ovirt.engine.api.restapi.types.SsoMapper.map ( restSso , null ) ) ; }

Target:
public void mapNonsenseFromRestToBackend ( ) throws java.lang.Exception { org.ovirt.engine.api.model.Sso restSso = new org.ovirt.engine.api.model.Sso ( ) ; restSso.setMethods ( new org.ovirt.engine.api.model.Methods ( ) ) ; org.ovirt.engine.api.model.Method unknownMethod = new org.ovirt.engine.api.model.Method ( ) ; unknownMethod.setId ( "žbrkmrkfrk" ) ; restSso.getMethods ( ) . getMethods ( ) . add ( unknownMethod ) ; org.junit.Assert.assertEquals ( null , org.ovirt.engine.api.restapi.types.SsoMapper.map ( restSso , null ) ) ; }
Source:
private void setupSelectionContext ( org.ovirt.engine.core.common.businessentities.VM vm ) { for ( org.ovirt.engine.ui.uicommonweb.models.vms.ConsoleModel model : cachedConsoleModels.get ( vm.getId ( ) ) ) { model.setSelectionContext ( new org.ovirt.engine.ui.uicommonweb.models.vms.ConsoleSelectionContext ( vm.getVmOs ( ) , vm.getDefaultDisplayType ( ) ) ) ; } }

Target:
private boolean selectionContextChanged ( org.ovirt.engine.core.common.businessentities.VM vm ) { org.ovirt.engine.core.common.businessentities.DisplayType vmDisplay = ( vm.isRunningOrPaused ( ) ) ? vm.getDisplayType ( ) : vm.getDefaultDisplayType ( ) ; org.ovirt.engine.ui.uicommonweb.models.vms.ConsoleSelectionContext newContext = new org.ovirt.engine.ui.uicommonweb.models.vms.ConsoleSelectionContext ( vm.getVmOs ( ) , vmDisplay ) ; org.ovirt.engine.ui.uicommonweb.models.vms.ConsoleModel selectedConsole = resolveUserSelectedConsoleModel ( vm.getId ( ) ) ; if ( selectedConsole == null ) { return true ; } return ! ( newContext.equals ( selectedConsole.getSelectionContext ( ) ) ) ; }