auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public org.ovirt.engine.core.common.interfaces.IVdcUser addUserToThreadContext ( java.lang.String sessionId ) { org.ovirt.engine.core.common.interfaces.IVdcUser vdcUser = org.ovirt.engine.core.utils.ThreadLocalParamsContainer.getVdcUser ( ) ; if ( vdcUser == null ) { if ( ! ( org.ovirt.engine.core.compat.StringHelper.isNullOrEmpty ( sessionId ) ) ) { vdcUser = getUser ( sessionId ) ; org.ovirt.engine.core.utils.ThreadLocalParamsContainer.setHttpSessionId ( sessionId ) ; } else { vdcUser = getUser ( ) ; } org.ovirt.engine.core.utils.ThreadLocalParamsContainer.setVdcUser ( vdcUser ) ; } return vdcUser ; }

Target:
public org.ovirt.engine.core.common.interfaces.IVdcUser addUserToThreadContext ( java.lang.String sessionId , boolean refresh ) { org.ovirt.engine.core.common.interfaces.IVdcUser vdcUser = org.ovirt.engine.core.utils.ThreadLocalParamsContainer.getVdcUser ( ) ; if ( vdcUser == null ) { if ( ! ( org.ovirt.engine.core.compat.StringHelper.isNullOrEmpty ( sessionId ) ) ) { vdcUser = getUser ( sessionId , refresh ) ; org.ovirt.engine.core.utils.ThreadLocalParamsContainer.setHttpSessionId ( sessionId ) ; } else { vdcUser = getUser ( refresh ) ; } org.ovirt.engine.core.utils.ThreadLocalParamsContainer.setVdcUser ( vdcUser ) ; } return vdcUser ; }
Source:
private void decreasePendingVms ( ) { org.ovirt.engine.core.compat.Guid vdsId = getCurrentVdsId ( ) ; org.ovirt.engine.core.common.businessentities.VM vm = org.ovirt.engine.core.bll.RunVmCommandBase.getVm ( ) ; if ( ( vdsId == null ) || ( vdsId.equals ( lastDecreasedVds ) ) ) { org.ovirt.engine.core.bll.RunVmCommandBase.log.debug ( "PendingVms for the guest '{}' running on host '{}' was already released, not releasing again" , vm.getName ( ) , vdsId ) ; return ; } lastDecreasedVds = vdsId ; org.ovirt.engine.core.bll.VmHandler.decreasePendingVms ( vm , vdsId ) ; getBlockingQueue ( vdsId ) . offer ( java.lang.Boolean.TRUE ) ; }

Target:
protected final void decreasePendingVms ( org.ovirt.engine.core.common.businessentities.VmStatic vm ) { org.ovirt.engine.core.compat.Guid vdsId = getCurrentVdsId ( ) ; if ( ( vdsId == null ) || ( vdsId.equals ( lastDecreasedVds ) ) ) { org.ovirt.engine.core.bll.RunVmCommandBase.log.debug ( "PendingVms for the guest '{}' running on host '{}' was already released, not releasing again" , vm.getName ( ) , vdsId ) ; return ; } lastDecreasedVds = vdsId ; org.ovirt.engine.core.bll.VmHandler.decreasePendingVms ( vm , vdsId ) ; getBlockingQueue ( vdsId ) . offer ( java.lang.Boolean.TRUE ) ; }
Source:
private static void getVlanParentInterface ( org.ovirt.engine.core.compat.Guid vdsID , org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface , 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.RunQuery ( VdcQueryType.GetVlanParent , new org.ovirt.engine.core.common.queries.InterfaceAndIdQueryParameters ( vdsID , iface ) , aQuery ) ; }

Target:
public static void isMTUOverrideSupported ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String 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.lang.Boolean ) ( source ) ) . booleanValue ( ) : true ; } } ; org.ovirt.engine.core.common.queries.GetConfigurationValueParameters tempVar = new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.MTUOverrideSupported ) ; tempVar.setVersion ( version ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigFromCache ( tempVar , aQuery ) ; }
Source:
public void qosCommitmentMissingNicSpeed ( ) { org.ovirt.engine.core.bll.network.host.SetupNetworksHelper helper = qosCommitmentNicSetup ( ( ( org.ovirt.engine.core.bll.network.host.SetupNetworksHelperTest.DEFAULT_SPEED ) / 2 ) , null ) ; validateAndExpectViolation ( helper , VdcBllMessages.ACTION_TYPE_FAILED_HOST_NETWORK_QOS_INVALID_INTERFACE_SPEED , org.ovirt.engine.core.bll.network.host.SetupNetworksHelperTest.BOND_NAME ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { final org.ovirt.engine.core.vdsbroker.EffectiveHostNetworkQos effectiveHostNetworkQos = new org.ovirt.engine.core.vdsbroker.EffectiveHostNetworkQos ( qosDao ) ; injectorRule.bind ( org.ovirt.engine.core.dao.network.NetworkDao.class , networkDao ) ; injectorRule.bind ( org.ovirt.engine.core.dao.network.NetworkAttachmentDao.class , networkAttachmentDao ) ; injectorRule.bind ( org.ovirt.engine.core.dao.network.InterfaceDao.class , interfaceDao ) ; injectorRule.bind ( org.ovirt.engine.core.dao.gluster.GlusterBrickDao.class , brickDao ) ; injectorRule.bind ( org.ovirt.engine.core.vdsbroker.EffectiveHostNetworkQos.class , effectiveHostNetworkQos ) ; injectorRule.bind ( org.ovirt.engine.core.vdsbroker.NetworkImplementationDetailsUtils.class , new org.ovirt.engine.core.vdsbroker.NetworkImplementationDetailsUtils ( effectiveHostNetworkQos , networkAttachmentDao , calculateBaseNic ) ) ; injectorRule.bind ( org.ovirt.engine.core.vdsbroker.CalculateBaseNic.class , calculateBaseNic ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity getBrickEntity ( org.ovirt.engine.core.compat.Guid clusterId , org.ovirt.engine.core.compat.Guid volumeId , int brickOrder , org.ovirt.engine.core.common.businessentities.VdsStatic server , java.lang.String brickDir ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity brick = new org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity ( ) ; brick.setVolumeId ( volumeId ) ; brick.setBrickOrder ( brickOrder ) ; brick.setBrickDirectory ( brickDir ) ; brick.setServerId ( server.getId ( ) ) ; brick.setServerName ( server.getHostName ( ) ) ; return brick ; }

Target:
private org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity getBrickEntity ( org.ovirt.engine.core.compat.Guid clusterId , org.ovirt.engine.core.compat.Guid volumeId , int brickOrder , org.ovirt.engine.core.common.businessentities.VdsStatic server , java.lang.String brickDir , java.lang.String networkAddress , org.ovirt.engine.core.compat.Guid networkId ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity brick = new org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity ( ) ; brick.setVolumeId ( volumeId ) ; brick.setBrickOrder ( brickOrder ) ; brick.setBrickDirectory ( brickDir ) ; brick.setServerId ( server.getId ( ) ) ; brick.setServerName ( server.getHostName ( ) ) ; brick.setNetworkAddress ( networkAddress ) ; brick.setNetworkId ( networkId ) ; return brick ; }
Source:
public static void getDataCentersByStorageDomain ( 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 ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StoragePool > ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStoragePoolsByStorageDomainId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( storageDomainId ) , 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 java.lang.String toString ( ) { return java.lang.String.format ( ( "%s, vdsSpmId = %d, storagePoolId = %s, " + ( "storagePoolName = %s, masterDomainId = %s, masterVersion = %s, " + "domainsList = [%s]" ) ) , super . toString ( ) , getVdsSpmId ( ) , getStoragePoolId ( ) , getStoragePoolName ( ) , getMasterDomainId ( ) , getMasterVersion ( ) , getPrintableDomainsList ( ) ) ; }

Target:
protected org.ovirt.engine.core.common.utils.ToStringBuilder appendAttributes ( org.ovirt.engine.core.common.utils.ToStringBuilder tsb ) { return super . appendAttributes ( tsb ) . append ( "vdsSpmId" , getVdsSpmId ( ) ) . append ( "storagePoolId" , getStoragePoolId ( ) ) . append ( "storagePoolName" , getStoragePoolName ( ) ) . append ( "masterDomainId" , getMasterDomainId ( ) ) . append ( "masterVersion" , getMasterVersion ( ) ) . append ( "domainsList" , getDomainsList ( ) ) ; }
Source:
public void nameNotUsed ( ) { org.mockito.Mockito.when ( clusterDao.getByName ( org.mockito.Matchers.any ( java.lang.String.class ) , org.mockito.Matchers.any ( java.lang.Boolean.class ) ) ) . thenReturn ( java.util.Collections.< org.ovirt.engine.core.common.businessentities.VDSGroup > emptyList ( ) ) ; org.mockito.Mockito.when ( dbFacade.getVdsGroupDao ( ) ) . thenReturn ( clusterDao ) ; validator = new org.ovirt.engine.core.bll.validator.ClusterValidator ( dbFacade , cluster ) ; org.junit.Assert.assertThat ( validator.nameNotUsed ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }

Target:
public void nameNotUsed ( ) { org.mockito.Mockito.when ( clusterDao.getByName ( org.mockito.Matchers.any ( java.lang.String.class ) , org.mockito.Matchers.any ( java.lang.Boolean.class ) ) ) . thenReturn ( java.util.Collections.< org.ovirt.engine.core.common.businessentities.VDSGroup > emptyList ( ) ) ; org.mockito.Mockito.when ( dbFacade.getVdsGroupDao ( ) ) . thenReturn ( clusterDao ) ; validator = new org.ovirt.engine.core.bll.validator.ClusterValidator ( dbFacade , cluster , cpuFlagsManagerHandler ) ; org.junit.Assert.assertThat ( validator.nameNotUsed ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.Network > networks = ( ( java.util.List < org.ovirt.engine.core.common.businessentities.network.Network > ) ( returnValue ) ) ; allNetworks = networks ; initNetworkModels ( ) ; initDcNetworkParams ( ) ; queryInterfaces ( ) ; }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValueObj ) { java.lang.Object returnValue = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValueObj ) ) . getReturnValue ( ) ; java.util.List < org.ovirt.engine.core.common.businessentities.network.HostNicVfsConfig > allHostVfs = ( ( java.util.List < org.ovirt.engine.core.common.businessentities.network.HostNicVfsConfig > ) ( returnValue ) ) ; for ( org.ovirt.engine.core.common.businessentities.network.HostNicVfsConfig vfsConfig : allHostVfs ) { nicToVfsConfig.put ( vfsConfig.getNicId ( ) , vfsConfig ) ; } queryFreeBonds ( ) ; }
Source:
private void mockStorageDomainStatic ( org.ovirt.engine.core.common.businessentities.storage.StorageType storageType ) { final org.ovirt.engine.core.dao.StorageDomainStaticDao dao = org.mockito.Mockito.mock ( org.ovirt.engine.core.dao.StorageDomainStaticDao.class ) ; final org.ovirt.engine.core.common.businessentities.StorageDomainStatic domain = new org.ovirt.engine.core.common.businessentities.StorageDomainStatic ( ) ; domain.setStorageType ( storageType ) ; org.mockito.Mockito.when ( dao.get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( domain ) ; org.mockito.Mockito.doReturn ( dao ) . when ( command ) . getStorageDomainStaticDao ( ) ; }

Target:
private void mockStorageDomainStatic ( org.ovirt.engine.core.common.businessentities.storage.StorageType storageType ) { final org.ovirt.engine.core.common.businessentities.StorageDomainStatic domain = new org.ovirt.engine.core.common.businessentities.StorageDomainStatic ( ) ; domain.setStorageType ( storageType ) ; org.mockito.Mockito.when ( storageDomainStaticDao.get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( domain ) ; }
Source:
private boolean canAddVm ( ) { boolean exists = ( ( java.lang.Boolean ) ( getBackend ( ) . runInternalQuery ( VdcQueryType.IsVmWithSameNameExist , new org.ovirt.engine.core.common.queries.IsVmWithSameNameExistParameters ( getVm ( ) . getvm_name ( ) ) ) . getReturnValue ( ) ) ) ; if ( exists ) { addCanDoActionMessage ( VdcBllMessages.VM_CANNOT_IMPORT_VM_NAME_EXISTS ) ; } return ! exists ; }

Target:
private boolean canAddVm ( ) { boolean exists = ( ( java.lang.Boolean ) ( getBackend ( ) . runInternalQuery ( VdcQueryType.IsVmWithSameNameExist , new org.ovirt.engine.core.common.queries.IsVmWithSameNameExistParameters ( getVm ( ) . getVmName ( ) ) ) . getReturnValue ( ) ) ) ; if ( exists ) { addCanDoActionMessage ( VdcBllMessages.VM_CANNOT_IMPORT_VM_NAME_EXISTS ) ; } return ! exists ; }
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 getUsbPolicyOnUpdateCurrentlyDisabledGotEnabledNativePolicyUsb ( ) { org.ovirt.engine.api.model.Usb usb = new org.ovirt.engine.api.model.Usb ( ) ; usb.setEnabled ( true ) ; usb.setType ( "native" ) ; assertEquals ( org.ovirt.engine.api.restapi.types.VmMapper.getUsbPolicyOnUpdate ( usb , UsbPolicy.DISABLED ) , UsbPolicy.ENABLED_NATIVE ) ; }
Source:
public void isTemplateNameUnique ( org.ovirt.engine.ui.frontend.AsyncQuery < java.lang.Boolean > aQuery , java.lang.String templateName , org.ovirt.engine.core.compat.Guid datacenterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.Converter < java.lang.Boolean > ( ) { @ java.lang.Override public java.lang.Boolean convert ( java.lang.Object source ) { return ( source != null ) && ( ! ( ( java.lang.Boolean ) ( source ) ) ) ; } } ; org.ovirt.engine.core.common.queries.NameQueryParameters params = new org.ovirt.engine.core.common.queries.NameQueryParameters ( templateName ) ; params.setDatacenterId ( datacenterId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.IsVmTemlateWithSameNameExist , params , aQuery ) ; }

Target:
public void isVmNameUnique ( org.ovirt.engine.ui.frontend.AsyncQuery < java.lang.Boolean > aQuery , java.lang.String name , org.ovirt.engine.core.compat.Guid datacenterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.Converter < java.lang.Boolean > ( ) { @ java.lang.Override public java.lang.Boolean convert ( java.lang.Object source ) { return ( source != null ) && ( ! ( ( java.lang.Boolean ) ( source ) ) ) ; } } ; org.ovirt.engine.core.common.queries.NameQueryParameters params = new org.ovirt.engine.core.common.queries.NameQueryParameters ( name ) ; params.setDatacenterId ( datacenterId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.IsVmWithSameNameExist , params , aQuery ) ; }
Source:
public static void GetDataCentersWithPermittedActionOnClusters ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.common.businessentities.ActionGroup actionGroup ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage_pool > ( ) ; } return source ; } } ; org.ovirt.engine.core.common.queries.GetEntitiesWithPermittedActionParameters getEntitiesWithPermittedActionParameters = new org.ovirt.engine.core.common.queries.GetEntitiesWithPermittedActionParameters ( ) ; getEntitiesWithPermittedActionParameters.setActionGroup ( actionGroup ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetDataCentersWithPermittedActionOnClusters , getEntitiesWithPermittedActionParameters , aQuery ) ; }

Target:
public static void IsTemplateNameUnique ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String name ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ! ( ( ( java.lang.Boolean ) ( source ) ) . booleanValue ( ) ) : false ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.IsVmTemlateWithSameNameExist , new org.ovirt.engine.core.common.queries.IsVmTemlateWithSameNameExistParameters ( name ) , aQuery ) ; }
Source:
public void tearDown ( ) { if ( ( client ) != null ) { try { client.executeCommand ( java.lang.String.format ( "rm -f '%1$s'" , remote ) , null , null , null ) ; } catch ( java.lang.Exception e ) { } try { client.disconnect ( ) ; } catch ( java.lang.Exception e ) { } client = null ; } if ( ( local2 ) != null ) { if ( ! ( local2.delete ( ) ) ) { } local2 = null ; } }

Target:
public void tearDown ( ) { if ( ( client ) != null ) { try { client.executeCommand ( java.lang.String.format ( "rm -f '%1$s'" , remote ) , null , null , null ) ; } catch ( java.lang.Exception e ) { } try { client.close ( ) ; } catch ( java.lang.Exception e ) { } client = null ; } if ( ( local2 ) != null ) { if ( ! ( local2.delete ( ) ) ) { } local2 = null ; } }
Source:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { java.lang.String propName = ( ( org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ) ( args ) ) . PropertyName ; if ( propName.equals ( "IsValid" ) ) { onIsValidPropertyChange ( object ) ; } else if ( propName.equals ( "IsGrouppedByTarget" ) ) { updateListByGropping ( object ) ; } }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { java.lang.String propName = ( ( org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ) ( args ) ) . propertyName ; if ( propName.equals ( "IsValid" ) ) { onIsValidPropertyChange ( object ) ; } else if ( propName.equals ( "IsGrouppedByTarget" ) ) { updateListByGropping ( object ) ; } }
Source:
public java.lang.String getServerFingerprint ( java.lang.String serverName ) { java.lang.String fingerPrint = null ; try ( final org.ovirt.engine.core.bll.utils.EngineSSHClient client = getEngineSSHClient ( ) ) { client.setHost ( serverName ) ; client.setUser ( "dummy" ) ; client.connect ( ) ; fingerPrint = client.getHostFingerprint ( ) ; } catch ( java.lang.Throwable e ) { log.error ( "Could not fetch fingerprint of host '{}': {}" , serverName , e.getMessage ( ) ) ; log.debug ( "Exception" , e ) ; } return fingerPrint ; }

Target:
public java.lang.String getServerFingerprint ( java.lang.String serverName , java.lang.Integer port ) { java.lang.String fingerPrint = null ; try ( final org.ovirt.engine.core.bll.utils.EngineSSHClient client = getEngineSSHClient ( ) ) { client.setHost ( serverName , port ) ; client.setUser ( "dummy" ) ; client.connect ( ) ; fingerPrint = client.getHostFingerprint ( ) ; } catch ( java.lang.Throwable e ) { log.error ( "Could not fetch fingerprint of host '{}:{}': {}" , serverName , port , e.getMessage ( ) ) ; log.debug ( "Exception" , e ) ; } return fingerPrint ; }
Source:
public static void GetDiskList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > ( ) ; } } ; org.ovirt.engine.core.common.queries.SearchParameters searchParams = new org.ovirt.engine.core.common.queries.SearchParameters ( "Disks:" , org.ovirt.engine.core.common.interfaces.SearchType.Disk ) ; searchParams.setMaxCount ( 9999 ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.Search , searchParams , aQuery ) ; }

Target:
public static void GetDocumentationBaseURL ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.String ) ( source ) ) : "" ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.DocsURL , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
private static void assertValidGetByAdElement ( java.util.List < org.ovirt.engine.core.common.businessentities.Permissions > result ) { org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertFalse ( result.isEmpty ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.Permissions permission : result ) { org.junit.Assert.assertEquals ( org.ovirt.engine.core.dao.PermissionDAOTest.AD_ELEMENT_ID , permission.getad_element_id ( ) ) ; } }

Target:
private static void assertValidGetByAdElement ( java.util.List < org.ovirt.engine.core.common.businessentities.Permissions > result ) { org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertFalse ( result.isEmpty ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.Permissions permission : result ) { org.junit.Assert.assertEquals ( org.ovirt.engine.core.dao.PermissionDAOTest.AD_ELEMENT_ID , permission.getAdElementId ( ) ) ; } }
Source:
private void mockDaos ( ) { mockDiskImageDao ( ) ; mockStorageDomainDao ( ) ; mockDynamicVmDao ( ) ; org.mockito.Mockito.doReturn ( snapshotDao ) . when ( spyCommand ) . getSnapshotDao ( ) ; org.mockito.Mockito.doReturn ( vmNetworkInterfaceDAO ) . when ( spyCommand ) . getVmNetworkInterfaceDao ( ) ; }

Target:
private void mockDaos ( ) { mockDiskImageDao ( ) ; mockStorageDomainDao ( ) ; mockStoragePoolDao ( ) ; mockDynamicVmDao ( ) ; org.mockito.Mockito.doReturn ( snapshotDao ) . when ( spyCommand ) . getSnapshotDao ( ) ; org.mockito.Mockito.doReturn ( vmNetworkInterfaceDAO ) . when ( spyCommand ) . getVmNetworkInterfaceDao ( ) ; }
Source:
public void getTemplateNicList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { 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 ? new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ) ( source ) ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetTemplateInterfacesByTemplateId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }

Target:
public void getLunsByVgId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String vgId , org.ovirt.engine.core.compat.Guid vdsId ) { 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.storage.LUNs > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.LUNs > ( ) ; } } ; org.ovirt.engine.core.common.queries.GetLunsByVgIdParameters params = new org.ovirt.engine.core.common.queries.GetLunsByVgIdParameters ( vgId , vdsId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetLunsByVgId , params , aQuery ) ; }
Source:
public static boolean hasVmRngDevice ( org.ovirt.engine.core.compat.Guid vmId ) { return ! ( org.ovirt.engine.core.bll.utils.VmDeviceUtils.dbFacade.getVmDeviceDao ( ) . getVmDeviceByVmIdAndType ( vmId , VmDeviceGeneralType.RNG ) . isEmpty ( ) ) ; }

Target:
public static org.ovirt.engine.core.common.businessentities.VmDevice addDiskDevice ( org.ovirt.engine.core.compat.Guid vmId , org.ovirt.engine.core.compat.Guid deviceId , java.lang.Boolean isPlugged , java.lang.Boolean isReadOnly , java.lang.String address , boolean isUsingScsiReservation ) { return org.ovirt.engine.core.bll.utils.VmDeviceUtils.addManagedDevice ( new org.ovirt.engine.core.common.businessentities.VmDeviceId ( deviceId , vmId ) , VmDeviceGeneralType.DISK , VmDeviceType.DISK , org.ovirt.engine.core.bll.utils.VmDeviceUtils.EMPTY_SPEC_PARAMS , isPlugged , isReadOnly , address , null , isUsingScsiReservation ) ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object result ) { org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterNetworkListModel clusterNetworkListModel = ( ( org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterNetworkListModel ) ( model ) ) ; java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.Network > dcNetworks = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.Network > ) ( result ) ) ; org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterNetworkManageModel networkToManage = createNetworkList ( dcNetworks ) ; clusterNetworkListModel.setWindow ( networkToManage ) ; networkToManage.setTitle ( org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getConstants ( ) . assignDetachNetworksTitle ( ) ) ; networkToManage.setHashName ( "assign_networks" ) ; }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object result ) { org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterNetworkListModel clusterNetworkListModel = ( ( org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterNetworkListModel ) ( model ) ) ; java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.Network > dcNetworks = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.Network > ) ( result ) ) ; org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterNetworkManageModel networkToManage = createNetworkList ( dcNetworks ) ; clusterNetworkListModel.setWindow ( networkToManage ) ; networkToManage.setTitle ( org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getConstants ( ) . assignDetachNetworksTitle ( ) ) ; networkToManage.setHelpTag ( HelpTag.assign_networks ) ; networkToManage.setHashName ( "assign_networks" ) ; }
Source:
protected void createNumOfDesktopEditors ( ) { numOfVmsEditor = new org.ovirt.engine.ui.common.widget.editor.EntityModelTextBoxEditor ( ) ; incraseNumOfVmsEditor = new org.ovirt.engine.ui.common.widget.editor.EntityModelTextBoxOnlyEditor ( new org.ovirt.engine.ui.common.widget.editor.EntityModelRenderer ( ) , new com.google.gwt.text.shared.Parser < java.lang.Object > ( ) { @ java.lang.Override public java.lang.Object parse ( java.lang.CharSequence text ) throws java.text.ParseException { return numOfVmsEditor.asEditor ( ) . getValue ( ) ; } } ) ; }

Target:
protected void createNumOfDesktopEditors ( ) { numOfVmsEditor = new org.ovirt.engine.ui.common.widget.editor.generic.IntegerEntityModelTextBoxEditor ( ) ; incraseNumOfVmsEditor = new org.ovirt.engine.ui.common.widget.editor.generic.EntityModelTextBoxOnlyEditor < java.lang.Integer > ( new org.ovirt.engine.ui.common.widget.editor.generic.ToStringEntityModelRenderer < java.lang.Integer > ( ) , new com.google.gwt.text.shared.Parser < java.lang.Integer > ( ) { @ java.lang.Override public java.lang.Integer parse ( java.lang.CharSequence text ) throws java.text.ParseException { return numOfVmsEditor.asEditor ( ) . getValue ( ) ; } } ) ; }
Source:
public static java.util.Map < org.ovirt.engine.core.compat.Guid , java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > > getImagesLeaf ( java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > images ) { java.util.Map < org.ovirt.engine.core.compat.Guid , java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > > retVal = new java.util.HashMap < org.ovirt.engine.core.compat.Guid , java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > > ( ) ; for ( org.ovirt.engine.core.common.businessentities.DiskImage image : images ) { org.ovirt.engine.core.utils.collections.MultiValueMapUtils.addToMap ( image.getId ( ) , image , retVal ) ; } for ( java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > list : retVal.values ( ) ) { org.ovirt.engine.core.bll.ImportVmCommand.sortImageList ( list ) ; } return retVal ; }

Target:
protected boolean isDiskExists ( org.ovirt.engine.core.compat.Guid id ) { return getBaseDiskDao ( ) . exists ( id ) ; }
Source:
protected boolean canDoAction ( ) { if ( ! ( super . canDoAction ( ) ) ) { return false ; } oldPool = org.ovirt.engine.core.bll.UpdateVmPoolWithVmsCommand.getVmPoolDAO ( ) . get ( org.ovirt.engine.core.bll.UpdateVmPoolWithVmsCommand.getVmPool ( ) . getVmPoolId ( ) ) ; if ( ( oldPool ) == null ) { return failCanDoAction ( VdcBllMessages.VM_POOL_CANNOT_UPDATE_POOL_NOT_FOUND ) ; } if ( ( org.ovirt.engine.core.bll.UpdateVmPoolWithVmsCommand.getParameters ( ) . getVmsCount ( ) ) < 0 ) { return failCanDoAction ( VdcBllMessages.VM_POOL_CANNOT_DECREASE_VMS_FROM_POOL ) ; } return true ; }

Target:
protected java.util.Map < java.lang.String , org.ovirt.engine.core.common.utils.Pair < java.lang.String , java.lang.String > > getExclusiveLocks ( ) { return java.util.Collections.singletonMap ( org.ovirt.engine.core.bll.UpdateVmPoolWithVmsCommand.getVmPoolId ( ) . toString ( ) , org.ovirt.engine.core.bll.LockMessagesMatchUtil.makeLockingPair ( LockingGroup.VM_POOL , getVmPoolIsBeingUpdatedMessage ( ) ) ) ; }
Source:
protected java.util.List < java.lang.String > getHeaderDeclarations ( java.util.List < org.ovirt.engine.sdk.entities.Header > headers ) { java.util.List < java.lang.String > paramDecls = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.sdk.entities.Header header : headers ) { java.lang.String paramName = org.ovirt.engine.sdk.generator.java.utils.FormatUtils.toJava ( header.getName ( ) ) ; java.lang.String paramType = org.ovirt.engine.sdk.generator.java.utils.TypeUtils.toJava ( org.ovirt.engine.sdk.generator.java.templates.AbstractOverloadableTemplate.XSD_STRING_TYPE ) ; org.ovirt.engine.sdk.generator.java.templates.MethodParameterTemplate paramDeclTemplate = new org.ovirt.engine.sdk.generator.java.templates.MethodParameterTemplate ( ) ; java.lang.String paramDecl = paramDeclTemplate.evaluate ( paramType , paramName ) ; paramDecls.add ( paramDecl ) ; } return paramDecls ; }

Target:
protected java.lang.String getHeaderBuilderCode ( java.util.List < org.ovirt.engine.sdk.generator.java.ParameterData > parameters ) { java.lang.StringBuilder buffer = new java.lang.StringBuilder ( ) ; for ( org.ovirt.engine.sdk.generator.java.ParameterData parameter : parameters ) { if ( ( parameter.getType ( ) ) == ( org.ovirt.engine.sdk.generator.java.ParameterType.HEADER ) ) { org.ovirt.engine.sdk.generator.java.templates.HeaderBuilderParameterTemplate template = new org.ovirt.engine.sdk.generator.java.templates.HeaderBuilderParameterTemplate ( ) ; buffer.append ( "\n" ) ; buffer.append ( template.evaluate ( parameter ) ) ; } } return buffer.toString ( ) ; }
Source:
public java.lang.Void runInTransaction ( ) { InitializeVds ( ) ; AlertIfPowerManagementNotConfigured ( getParameters ( ) . getVdsStaticData ( ) ) ; TestVdsPowerManagementStatus ( getParameters ( ) . getVdsStaticData ( ) ) ; setSucceeded ( true ) ; setActionReturnValue ( getVdsIdRef ( ) ) ; getCompensationContext ( ) . resetCompensation ( ) ; return null ; }

Target:
public java.lang.Void runInTransaction ( ) { initializeVds ( ) ; AlertIfPowerManagementNotConfigured ( getParameters ( ) . getVdsStaticData ( ) ) ; TestVdsPowerManagementStatus ( getParameters ( ) . getVdsStaticData ( ) ) ; setSucceeded ( true ) ; setActionReturnValue ( getVdsIdRef ( ) ) ; getCompensationContext ( ) . resetCompensation ( ) ; return null ; }
Source:
private void UpdateActionAvailability ( ) { java.util.List tempVar = getSelectedItems ( ) ; java.util.List selectedItems = ( tempVar != null ) ? tempVar : new java.util.ArrayList ( ) ; getRemoveCommand ( ) . setIsExecutionAllowed ( ( ( selectedItems.size ( ) ) > 0 ) ) ; }

Target:
private void updateActionAvailability ( ) { java.util.List tempVar = getSelectedItems ( ) ; java.util.List selectedItems = ( tempVar != null ) ? tempVar : new java.util.ArrayList ( ) ; getEditCommand ( ) . setIsExecutionAllowed ( ( ( selectedItems.size ( ) ) == 1 ) ) ; getRemoveCommand ( ) . setIsExecutionAllowed ( ( ( selectedItems.size ( ) ) > 0 ) ) ; }
Source:
public void getVmNicList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { 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 ? new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ) ( source ) ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmInterfacesByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }

Target:
public void getVmsFromExternalServer ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId , org.ovirt.engine.core.compat.Guid vdsId , java.lang.String url , java.lang.String username , java.lang.String password ) { 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.VM > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmsFromExternalProvider , new org.ovirt.engine.core.common.queries.GetVmsFromExternalProviderQueryParameters ( url , username , password , vdsId , dataCenterId ) , aQuery ) ; }
Source:
protected void onExecute ( ) { super . onExecute ( ) ; java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > parameters = getParameters ( ) ; if ( parameters.isEmpty ( ) ) { cancel ( ) ; return ; } org.ovirt.engine.ui.frontend.Frontend.RunMultipleAction ( getActionType ( ) , parameters , new org.ovirt.engine.ui.uicompat.IFrontendMultipleActionAsyncCallback ( ) { @ java.lang.Override public void executed ( org.ovirt.engine.ui.uicompat.FrontendMultipleActionAsyncResult result ) { org.ovirt.engine.ui.uicommonweb.models.templates.CopyDiskModel localModel = ( ( org.ovirt.engine.ui.uicommonweb.models.templates.CopyDiskModel ) ( result.getState ( ) ) ) ; localModel.cancel ( ) ; } } , this ) ; }

Target:
protected void onExecute ( ) { super . onExecute ( ) ; java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > parameters = getParameters ( ) ; if ( parameters.isEmpty ( ) ) { cancel ( ) ; return ; } org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runMultipleAction ( getActionType ( ) , parameters , new org.ovirt.engine.ui.uicompat.IFrontendMultipleActionAsyncCallback ( ) { @ java.lang.Override public void executed ( org.ovirt.engine.ui.uicompat.FrontendMultipleActionAsyncResult result ) { org.ovirt.engine.ui.uicommonweb.models.templates.CopyDiskModel localModel = ( ( org.ovirt.engine.ui.uicommonweb.models.templates.CopyDiskModel ) ( result.getState ( ) ) ) ; localModel.cancel ( ) ; } } , this ) ; }
Source:
private void onFinish ( org.ovirt.engine.core.compat.Guid cmdId ) { org.ovirt.engine.core.bll.storage.disk.image.ImagesHandler.updateImageStatus ( org.ovirt.engine.core.bll.storage.disk.cinder.CloneSingleCinderDiskCommandCallback.getCommand ( ) . getParameters ( ) . getImageId ( ) , ImageStatus.OK ) ; org.ovirt.engine.core.bll.storage.disk.cinder.CloneSingleCinderDiskCommandCallback.getCommand ( ) . endAction ( ) ; org.ovirt.engine.core.bll.tasks.CommandCoordinatorUtil.removeAllCommandsInHierarchy ( cmdId ) ; }

Target:
public void onSucceeded ( org.ovirt.engine.core.compat.Guid cmdId , java.util.List < org.ovirt.engine.core.compat.Guid > childCmdIds ) { super . onSucceeded ( cmdId , childCmdIds ) ; org.ovirt.engine.core.bll.storage.disk.image.ImagesHandler.updateImageStatus ( getDiskId ( ) , ImageStatus.OK ) ; org.ovirt.engine.core.bll.storage.disk.image.ImagesHandler.updateImageStatus ( org.ovirt.engine.core.bll.storage.disk.cinder.CloneSingleCinderDiskCommandCallback.getCommand ( ) . getParameters ( ) . getImageId ( ) , ImageStatus.OK ) ; org.ovirt.engine.core.bll.storage.disk.cinder.CloneSingleCinderDiskCommandCallback.getCommand ( ) . endAction ( ) ; }
Source:
protected void executeQueryCommand ( ) { final java.lang.String directoryName = org.ovirt.engine.core.bll.GetDirectoryGroupByIdQuery.getParameters ( ) . getDomain ( ) ; final org.ovirt.engine.core.common.utils.ExternalId id = org.ovirt.engine.core.bll.GetDirectoryGroupByIdQuery.getParameters ( ) . getId ( ) ; final org.ovirt.engine.core.aaa.Directory directory = org.ovirt.engine.core.aaa.DirectoryManager.getInstance ( ) . getDirectory ( directoryName ) ; if ( directory == null ) { org.ovirt.engine.core.bll.GetDirectoryGroupByIdQuery.getQueryReturnValue ( ) . setSucceeded ( false ) ; } else { final org.ovirt.engine.core.aaa.DirectoryGroup group = directory.findGroup ( id ) ; org.ovirt.engine.core.bll.GetDirectoryGroupByIdQuery.getQueryReturnValue ( ) . setReturnValue ( group ) ; } }

Target:
protected void executeQueryCommand ( ) { final java.lang.String directoryName = org.ovirt.engine.core.bll.GetDirectoryGroupByIdQuery.getParameters ( ) . getDomain ( ) ; final org.ovirt.engine.core.common.utils.ExternalId id = org.ovirt.engine.core.bll.GetDirectoryGroupByIdQuery.getParameters ( ) . getId ( ) ; final org.ovirt.engine.core.aaa.Directory directory = org.ovirt.engine.core.aaa.AuthenticationProfileRepository.getInstance ( ) . getDirectory ( directoryName ) ; if ( directory == null ) { org.ovirt.engine.core.bll.GetDirectoryGroupByIdQuery.getQueryReturnValue ( ) . setSucceeded ( false ) ; } else { final org.ovirt.engine.core.aaa.DirectoryGroup group = directory.findGroup ( id ) ; org.ovirt.engine.core.bll.GetDirectoryGroupByIdQuery.getQueryReturnValue ( ) . setReturnValue ( group ) ; } }
Source:
public boolean isSmartcardGloballyEnabled ( org.ovirt.engine.ui.uicommonweb.models.userportal.UserPortalItemModel item ) { org.ovirt.engine.ui.uicommonweb.models.vms.ConsoleModel consoleModel = item.getDefaultConsole ( ) ; if ( consoleModel instanceof org.ovirt.engine.ui.uicommonweb.models.vms.SpiceConsoleModel ) { return ( consoleModel.getEntity ( ) ) == null ? false : consoleModel.getEntity ( ) . isSmartcardEnabled ( ) ; } return false ; }

Target:
public boolean isSmartcardGloballyEnabled ( org.ovirt.engine.ui.uicommonweb.models.HasConsoleModel item ) { org.ovirt.engine.ui.uicommonweb.models.vms.ConsoleModel consoleModel = item.getDefaultConsoleModel ( ) ; if ( consoleModel instanceof org.ovirt.engine.ui.uicommonweb.models.vms.SpiceConsoleModel ) { return ( consoleModel.getEntity ( ) ) == null ? false : consoleModel.getEntity ( ) . isSmartcardEnabled ( ) ; } return false ; }
Source:
private void addIpv4BootProtocol ( java.util.Map < java.lang.String , java.lang.Object > opts , org.ovirt.engine.core.common.vdscommands.HostNetwork attachment ) { switch ( attachment.getIpv4BootProtocol ( ) ) { case DHCP : opts.put ( org.ovirt.engine.core.vdsbroker.vdsbroker.HostSetupNetworksVDSCommand.BOOT_PROTOCOL , org.ovirt.engine.core.vdsbroker.vdsbroker.HostSetupNetworksVDSCommand.DHCP_BOOT_PROTOCOL ) ; break ; case STATIC_IP : org.ovirt.engine.core.vdsbroker.vdsbroker.HostSetupNetworksVDSCommand.putIfNotEmpty ( opts , "ipaddr" , attachment.getIpv4Address ( ) ) ; putIpv4PrefixOrNetmaskIfNotEmpty ( opts , attachment.getIpv4Netmask ( ) ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.HostSetupNetworksVDSCommand.putIfNotEmpty ( opts , "gateway" , attachment.getIpv4Gateway ( ) ) ; break ; default : break ; } }

Target:
void addIpv4BootProtocol ( java.util.Map < java.lang.String , java.lang.Object > opts , org.ovirt.engine.core.common.vdscommands.HostNetwork attachment ) { if ( ( attachment.getIpv4BootProtocol ( ) ) == ( org.ovirt.engine.core.common.businessentities.network.Ipv4BootProtocol.DHCP ) ) { opts.put ( org.ovirt.engine.core.vdsbroker.vdsbroker.HostSetupNetworksVDSCommand.BOOT_PROTOCOL , org.ovirt.engine.core.vdsbroker.vdsbroker.HostSetupNetworksVDSCommand.DHCP_BOOT_PROTOCOL ) ; } else if ( ( attachment.getIpv4BootProtocol ( ) ) == ( org.ovirt.engine.core.common.businessentities.network.Ipv4BootProtocol.STATIC_IP ) ) { org.ovirt.engine.core.vdsbroker.vdsbroker.HostSetupNetworksVDSCommand.putIfNotEmpty ( opts , "ipaddr" , attachment.getIpv4Address ( ) ) ; putIpv4PrefixOrNetmaskIfNotEmpty ( opts , attachment.getIpv4Netmask ( ) ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.HostSetupNetworksVDSCommand.putIfNotEmpty ( opts , "gateway" , attachment.getIpv4Gateway ( ) ) ; } }
Source:
protected void onGetClusterList ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > clusterList ) { java.util.List < org.ovirt.engine.ui.uicommonweb.models.datacenters.NetworkClusterModel > items = new java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.datacenters.NetworkClusterModel > ( ) ; for ( org.ovirt.engine.core.common.businessentities.VDSGroup cluster : clusterList ) { items.add ( createNetworkClusterModel ( cluster ) ) ; } getNetworkClusterList ( ) . setItems ( items ) ; if ( firstInit ) { firstInit = false ; addCommands ( ) ; } }

Target:
private void init ( ) { setTitle ( org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getConstants ( ) . newLogicalNetworkTitle ( ) ) ; setHelpTag ( HelpTag.new_logical_network ) ; setHashName ( "new_logical_network" ) ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { java.util.List < org.ovirt.engine.ui.uicommonweb.models.EntityModel < org.ovirt.engine.core.common.businessentities.VM > > externalVms = new java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.EntityModel < org.ovirt.engine.core.common.businessentities.VM > > ( ) ; for ( org.ovirt.engine.core.common.businessentities.VM vm : ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . < java.util.List < org.ovirt.engine.core.common.businessentities.VM > > getReturnValue ( ) ) { externalVms.add ( new org.ovirt.engine.ui.uicommonweb.models.EntityModel < org.ovirt.engine.core.common.businessentities.VM > ( vm ) ) ; } this . externalVmModels.setItems ( externalVms ) ; stopProgress ( ) ; }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event < ? extends org.ovirt.engine.ui.uicompat.EventArgs > ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { org.ovirt.engine.core.common.businessentities.StoragePool dataCenter = dataCenters.getSelectedItem ( ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageDomainsByStoragePoolId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenter.getId ( ) ) , new org.ovirt.engine.ui.frontend.AsyncQuery ( this , createGetStorageDomainsByStoragePoolIdCallback ( dataCenter ) ) ) ; }
Source:
void updateButton ( ) { getButtonWidget ( ) . setVisible ( ( ( command.getIsAvailable ( ) ) && ( command.getIsVisible ( ) ) ) ) ; getButtonWidget ( ) . setEnabled ( command.getIsExecutionAllowed ( ) ) ; }

Target:
void updateButton ( ) { getButtonWidget ( ) . setVisible ( ( ( command.getIsAvailable ( ) ) && ( command.getIsVisible ( ) ) ) ) ; getButtonWidget ( ) . setEnabled ( command.getIsExecutionAllowed ( ) ) ; getButtonWidget ( ) . setTitle ( command.getTitle ( ) ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc monitorCommand ( java.lang.String vmId , java.lang.String monitorCommand ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "VM.monitorCommand" ) . withParameter ( "vmID" , vmId ) . withParameter ( "command" , monitorCommand ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( response ) ; }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.OneVmReturnForXmlRpc changeDisk ( java.lang.String vmId , java.util.Map < java.lang.String , java.lang.Object > driveSpec ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "VM.changeCD" ) . withParameter ( "vmID" , vmId ) . withParameter ( "driveSpec" , driveSpec ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) . withResponseKey ( "vmList" ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.OneVmReturnForXmlRpc ( response ) ; }
Source:
private void onNumaSupport ( ) { if ( ( getWindow ( ) ) == null ) { return ; } org.ovirt.engine.ui.uicommonweb.models.hosts.numa.NumaSupportModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.hosts.numa.NumaSupportModel ) ( getWindow ( ) ) ) ; java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > updateParamsList = model.getUpdateParameters ( ) ; if ( ! ( updateParamsList.isEmpty ( ) ) ) { org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runMultipleAction ( VdcActionType.UpdateVmNumaNodes , updateParamsList ) ; } setWindow ( null ) ; }

Target:
private void numaSupport ( ) { if ( ( org.ovirt.engine.ui.uicommonweb.models.hosts.HostListModel.getWindow ( ) ) != null ) { return ; } org.ovirt.engine.core.common.businessentities.VDS host = org.ovirt.engine.ui.uicommonweb.models.hosts.HostListModel.getSelectedItem ( ) ; java.util.List < org.ovirt.engine.core.common.businessentities.VDS > hosts = org.ovirt.engine.ui.uicommonweb.models.hosts.HostListModel.getSelectedItems ( ) ; org.ovirt.engine.ui.uicommonweb.models.hosts.numa.NumaSupportModel model = new org.ovirt.engine.ui.uicommonweb.models.hosts.numa.NumaSupportModel ( hosts , host , this ) ; setWindow ( model ) ; }