auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public static void getDataCenterById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId ) { 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.GetStoragePoolById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) , aQuery ) ; }

Target:
public static void getGlusterHook ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hookId , boolean includeServerHooks ) { 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.GetGlusterHookById , new org.ovirt.engine.core.common.queries.gluster.GlusterHookQueryParameters ( hookId , includeServerHooks ) , aQuery ) ; }
Source:
public void template_SelectedItemChanged ( ) { super . template_SelectedItemChanged ( ) ; org.ovirt.engine.core.common.businessentities.VmTemplate template = getModel ( ) . getTemplate ( ) . getSelectedItem ( ) ; if ( template == null ) { return ; } setupWindowModelFrom ( template ) ; doChangeDefautlHost ( template.getDedicatedVmForVds ( ) ) ; updateRngDevice ( template.getId ( ) ) ; }

Target:
public void template_SelectedItemChanged ( ) { super . template_SelectedItemChanged ( ) ; org.ovirt.engine.core.common.businessentities.VmTemplate template = getModel ( ) . getTemplate ( ) . getSelectedItem ( ) ; if ( template == null ) { return ; } setupWindowModelFrom ( template ) ; doChangeDefautlHost ( template.getDedicatedVmForVds ( ) ) ; updateRngDevice ( template.getId ( ) ) ; getModel ( ) . getCustomPropertySheet ( ) . deserialize ( template.getCustomProperties ( ) ) ; }
Source:
private void setUpGetEntityExpectations ( int times ) { for ( int i = 0 ; i < times ; i ++ ) { setUpEntityQueryExpectations ( VdcQueryType.GetVmTemplatesDisks , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendTemplateDiskResourceTest.TEMPLATE_ID } , getEntityList ( ) ) ; } }

Target:
private void setUpGetEntityExpectations ( int times ) { for ( int i = 0 ; i < times ; i ++ ) { setUpEntityQueryExpectations ( QueryType.GetVmTemplatesDisks , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendTemplateDiskResourceTest.TEMPLATE_ID } , getEntityList ( ) ) ; } }
Source:
protected org.ovirt.engine.api.model.Network getClusterNetwork ( org.ovirt.engine.core.compat.Guid clusterId , org.ovirt.engine.core.compat.Guid id , java.lang.String name ) { for ( org.ovirt.engine.api.model.Network entity : getBackendCollection ( org.ovirt.engine.api.model.Network.class , VdcQueryType.GetAllNetworksByClusterId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( clusterId ) ) ) { if ( ( ( id != null ) && ( id.equals ( entity.getId ( ) ) ) ) || ( ( name != null ) && ( name.equals ( entity.getName ( ) ) ) ) ) { return entity ; } } return null ; }

Target:
protected org.ovirt.engine.core.common.businessentities.network.Network getClusterNetwork ( org.ovirt.engine.core.compat.Guid clusterId , org.ovirt.engine.core.compat.Guid id , java.lang.String name ) { for ( org.ovirt.engine.api.restapi.resource.Network entity : getBackendCollection ( org.ovirt.engine.core.common.businessentities.network.Network.class , VdcQueryType.GetAllNetworksByClusterId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( clusterId ) ) ) { if ( ( ( id != null ) && ( id.equals ( entity.getId ( ) ) ) ) || ( ( name != null ) && ( name.equals ( entity.getName ( ) ) ) ) ) { return entity ; } } return null ; }
Source:
public void testSpiceSecureChannelsAdjustment ( ) { java.lang.String [ ] channels = new java.lang.String [ ] { "smain" , "dog" , "" , "sinputs" , "scursor" , "display" , "scat" , "smartcard" , "splayback" } ; java.util.List < java.lang.String > adjustedChannels = org.ovirt.engine.core.vdsbroker.builder.vminfo.LibvirtVmXmlBuilder.adjustSpiceSecureChannels ( channels ) . collect ( java.util.stream.Collectors.toList ( ) ) ; org.junit.Assert.assertEquals ( java.util.Arrays.asList ( "main" , "inputs" , "cursor" , "display" , "smartcard" , "playback" ) , adjustedChannels ) ; }

Target:
public void testSpiceSecureChannelsAdjustment ( ) { java.lang.String [ ] channels = new java.lang.String [ ] { "smain" , "dog" , "" , "sinputs" , "scursor" , "display" , "scat" , "smartcard" , "splayback" } ; java.util.List < java.lang.String > adjustedChannels = org.ovirt.engine.core.vdsbroker.builder.vminfo.LibvirtVmXmlBuilder.adjustSpiceSecureChannels ( channels ) . collect ( java.util.stream.Collectors.toList ( ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( java.util.Arrays.asList ( "main" , "inputs" , "cursor" , "display" , "smartcard" , "playback" ) , adjustedChannels ) ; }
Source:
public javax.ws.rs.core.Response add ( org.ovirt.engine.api.model.Cluster cluster ) { validateParameters ( cluster , getMandatoryParameters ( ) ) ; validateEnums ( org.ovirt.engine.api.model.Cluster.class , cluster ) ; org.ovirt.engine.core.common.businessentities.StoragePool dataCenter = getDataCenter ( cluster ) ; return performCreate ( VdcActionType.AddVdsGroup , createAddCommandParams ( cluster , dataCenter ) , new org.ovirt.engine.api.restapi.resource.QueryIdResolver < org.ovirt.engine.core.compat.Guid > ( org.ovirt.engine.core.common.queries.VdcQueryType.GetVdsGroupById , org.ovirt.engine.core.common.queries.IdQueryParameters.class ) ) ; }

Target:
public javax.ws.rs.core.Response add ( org.ovirt.engine.core.common.businessentities.Cluster cluster ) { validateParameters ( cluster , getMandatoryParameters ( ) ) ; validateEnums ( org.ovirt.engine.core.common.businessentities.Cluster.class , cluster ) ; org.ovirt.engine.core.common.businessentities.StoragePool dataCenter = getDataCenter ( cluster ) ; return performCreate ( VdcActionType.AddCluster , createAddCommandParams ( cluster , dataCenter ) , new org.ovirt.engine.api.restapi.resource.QueryIdResolver < org.ovirt.engine.core.compat.Guid > ( org.ovirt.engine.core.common.queries.VdcQueryType.GetClusterById , org.ovirt.engine.core.common.queries.IdQueryParameters.class ) ) ; }
Source:
public void iscsiBondWithTheSameNameDoesNotExistInDataCenter ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.IscsiBond > iscsiBonds = new java.util.ArrayList < > ( ) ; org.ovirt.engine.core.compat.Guid dataCenterId = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; iscsiBonds.add ( createIscsiBond ( "First" , dataCenterId ) ) ; iscsiBonds.add ( createIscsiBond ( "Second" , dataCenterId ) ) ; org.mockito.Mockito.doReturn ( iscsiBonds ) . when ( iscsiBondDao ) . getAllByStoragePoolId ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ; org.junit.Assert.assertEquals ( ValidationResult.VALID , validator.iscsiBondWithTheSameNameExistInDataCenter ( createIscsiBond ( "Third" , dataCenterId ) ) ) ; }

Target:
public void iscsiBondWithTheSameNameDoesNotExistInDataCenter ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.IscsiBond > iscsiBonds = new java.util.ArrayList < > ( ) ; org.ovirt.engine.core.compat.Guid dataCenterId = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; iscsiBonds.add ( createIscsiBond ( "First" , dataCenterId ) ) ; iscsiBonds.add ( createIscsiBond ( "Second" , dataCenterId ) ) ; org.mockito.Mockito.doReturn ( iscsiBonds ) . when ( iscsiBondDao ) . getAllByStoragePoolId ( org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ; org.junit.Assert.assertEquals ( ValidationResult.VALID , validator.iscsiBondWithTheSameNameExistInDataCenter ( createIscsiBond ( "Third" , dataCenterId ) ) ) ; }
Source:
public boolean isSpiceProxyDefined ( org.ovirt.engine.core.common.businessentities.VM vm ) { return ( ( ! ( org.ovirt.engine.core.compat.StringHelper.isNullOrEmpty ( ( ( java.lang.String ) ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getConfigValuePreConverted ( ConfigurationValues.SpiceProxyDefault ) ) ) ) ) ) || ( ! ( org.ovirt.engine.core.compat.StringHelper.isNullOrEmpty ( vm.getClusterSpiceProxy ( ) ) ) ) ) || ( ! ( org.ovirt.engine.core.compat.StringHelper.isNullOrEmpty ( vm.getVmPoolSpiceProxy ( ) ) ) ) ; }

Target:
public boolean isSpiceProxyDefined ( org.ovirt.engine.core.common.businessentities.VM vm ) { return ( ( ! ( org.ovirt.engine.core.compat.StringHelper.isNullOrEmpty ( ( ( java.lang.String ) ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getConfigValuePreConverted ( ConfigValues.SpiceProxyDefault ) ) ) ) ) ) || ( ! ( org.ovirt.engine.core.compat.StringHelper.isNullOrEmpty ( vm.getClusterSpiceProxy ( ) ) ) ) ) || ( ! ( org.ovirt.engine.core.compat.StringHelper.isNullOrEmpty ( vm.getVmPoolSpiceProxy ( ) ) ) ) ; }
Source:
private static void cacheConfigValues ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ; 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 ) { if ( returnValue != null ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.cachedConfigValuesPreConvert.putAll ( ( ( java.util.HashMap < org.ovirt.engine.core.compat.KeyValuePairCompat < org.ovirt.engine.core.common.queries.ConfigurationValues , java.lang.String > , java.lang.Object > ) ( returnValue ) ) ) ; } return org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.cachedConfigValuesPreConvert ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetConfigurationValues , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }

Target:
private 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.getInstance ( ) . runQuery ( VdcQueryType.GetVlanParent , new org.ovirt.engine.core.common.queries.InterfaceAndIdQueryParameters ( vdsID , iface ) , aQuery ) ; }
Source:
private void Run ( ) { org.ovirt.engine.core.common.businessentities.VM entity = ( ( org.ovirt.engine.core.common.businessentities.VM ) ( getItem ( ) . getEntity ( ) ) ) ; boolean reinitialize = ( ! ( entity.isInitialized ( ) ) ) && ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.IsWindowsOsType ( entity.getVmOs ( ) ) ) ; org.ovirt.engine.core.common.action.RunVmParams tempVar = new org.ovirt.engine.core.common.action.RunVmParams ( entity.getId ( ) ) ; tempVar.setReinitialize ( reinitialize ) ; org.ovirt.engine.ui.frontend.Frontend.RunAction ( VdcActionType.RunVm , tempVar ) ; }

Target:
private void run ( ) { org.ovirt.engine.core.common.businessentities.VM entity = ( ( org.ovirt.engine.core.common.businessentities.VM ) ( getItem ( ) . getEntity ( ) ) ) ; boolean reinitialize = ( ! ( entity.isInitialized ( ) ) ) && ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.isWindowsOsType ( entity.getVmOsId ( ) ) ) ; org.ovirt.engine.core.common.action.RunVmParams tempVar = new org.ovirt.engine.core.common.action.RunVmParams ( entity.getId ( ) ) ; tempVar.setReinitialize ( reinitialize ) ; org.ovirt.engine.ui.frontend.Frontend.RunAction ( VdcActionType.RunVm , tempVar ) ; }
Source:
public static boolean isSane ( java.lang.String path ) { final int length = path.length ( ) ; if ( length > ( org.ovirt.engine.core.utils.servlet.ServletUtils.PATH_MAX ) ) { org.ovirt.engine.core.utils.servlet.ServletUtils.log.error ( ( ( ( ( "The path is " + length ) + " characters long, which is longer than the maximum allowed " ) + ( org.ovirt.engine.core.utils.servlet.ServletUtils.PATH_MAX ) ) + "." ) ) ; return false ; } if ( ( ( path.contains ( ".." ) ) || ( path.contains ( "//" ) ) ) || ( path.contains ( "./" ) ) ) { org.ovirt.engine.core.utils.servlet.ServletUtils.log.error ( "The path contains potentially dangerous directory navigation sequences." ) ; return false ; } return true ; }

Target:
public static boolean isSane ( java.lang.String path ) { final int length = path.length ( ) ; if ( length > ( org.ovirt.engine.core.utils.servlet.ServletUtils.PATH_MAX ) ) { org.ovirt.engine.core.utils.servlet.ServletUtils.log.error ( "The path '{}' is characters long, which is longer than the maximum allowed {}." , path , length , org.ovirt.engine.core.utils.servlet.ServletUtils.PATH_MAX ) ; return false ; } if ( ( ( path.contains ( ".." ) ) || ( path.contains ( "//" ) ) ) || ( path.contains ( "./" ) ) ) { org.ovirt.engine.core.utils.servlet.ServletUtils.log.error ( "The path contains potentially dangerous directory navigation sequences." ) ; return false ; } return true ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StoragePool > pools = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StoragePool > ) ( returnValue ) ) ; org.ovirt.engine.core.common.businessentities.StoragePool pool = pools.get ( 0 ) ; if ( pool != null ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getStorageDomainList ( ( ( org.ovirt.engine.ui.frontend.AsyncQuery ) ( model ) ) , pool.getId ( ) ) ; } }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.osArchitectures = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ; }
Source:
public static org.ovirt.engine.core.common.businessentities.storage.DiskImage createHibernationMemoryDisk ( org.ovirt.engine.core.common.businessentities.VM vm , org.ovirt.engine.core.common.businessentities.storage.StorageType storageType , org.ovirt.engine.core.bll.utils.VmOverheadCalculator vmOverheadCalculator ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage image = org.ovirt.engine.core.bll.memory.MemoryUtils.createMemoryDisk ( vm , storageType , vmOverheadCalculator , null ) ; image.setDiskAlias ( org.ovirt.engine.core.bll.memory.MemoryUtils.generateHibernationMemoryDiskAlias ( vm.getName ( ) ) ) ; image.setDescription ( org.ovirt.engine.core.bll.memory.MemoryUtils.VM_HIBERNATION_MEMORY_DISK_DESCRIPTION ) ; return image ; }

Target:
public static org.ovirt.engine.core.common.businessentities.storage.DiskImage createHibernationMemoryDisk ( org.ovirt.engine.core.common.businessentities.VM vm , org.ovirt.engine.core.common.businessentities.storage.StorageType storageType , org.ovirt.engine.core.bll.utils.VmOverheadCalculator vmOverheadCalculator ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage image = org.ovirt.engine.core.bll.memory.MemoryUtils.createMemoryDisk ( vm , storageType , vmOverheadCalculator , null ) ; image.setDiskAlias ( org.ovirt.engine.core.bll.memory.MemoryUtils.generateHibernationMemoryDiskAlias ( vm.getName ( ) ) ) ; image.setDiskDescription ( org.ovirt.engine.core.bll.memory.MemoryUtils.VM_HIBERNATION_MEMORY_DISK_DESCRIPTION ) ; return image ; }
Source:
public static void getStorageDomainList ( 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.StorageDomain > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ( ) ; } } ; org.ovirt.engine.core.common.queries.SearchParameters searchParams = new org.ovirt.engine.core.common.queries.SearchParameters ( "Storage:" , org.ovirt.engine.core.common.interfaces.SearchType.StorageDomain ) ; searchParams.setMaxCount ( 9999 ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , searchParams , 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.LUNs > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.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:
protected void verifyModel ( org.ovirt.engine.api.model.Group model , int index ) { assertEquals ( GUIDS [ index ] . toString ( ) , model.getId ( ) ) ; assertEquals ( NAMES [ index ] , model.getName ( ) ) ; assertNotNull ( model.getDomain ( ) ) ; verifyLinks ( model ) ; }

Target:
protected void verifyModel ( org.ovirt.engine.api.model.Group model , int index ) { assertEquals ( GUIDS [ index ] . toString ( ) , model.getId ( ) ) ; assertEquals ( EXTERNAL_IDS [ index ] . toHex ( ) , model.getExternalId ( ) ) ; assertEquals ( NAMES [ index ] , model.getName ( ) ) ; assertNotNull ( model.getDomain ( ) ) ; verifyLinks ( model ) ; }
Source:
public static void getUserMessageOfTheDayViaPublic ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.String ) ( source ) ) : "" ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runPublicQuery ( VdcQueryType.GetConfigurationValue , new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.UserMessageOfTheDay , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public static void isVmNameUnique ( 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.getInstance ( ) . runQuery ( VdcQueryType.IsVmWithSameNameExist , new org.ovirt.engine.core.common.queries.NameQueryParameters ( name ) , aQuery ) ; }
Source:
protected java.util.List < org.ovirt.engine.core.common.businessentities.VM > buildFromOVFs ( java.util.List < java.lang.String > ovfList ) { org.ovirt.engine.core.bll.OvfHelper ovfHelper = new org.ovirt.engine.core.bll.OvfHelper ( ) ; java.util.List < org.ovirt.engine.core.common.businessentities.VM > vms = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VM > ( ) ; for ( java.lang.String ovf : ovfList ) { try { if ( ! ( ovfHelper.isOvfTemplate ( ovf ) ) ) { vms.add ( ovfHelper.readVmFromOvf ( ovf ) ) ; } } catch ( org.ovirt.engine.core.utils.ovf.OvfReaderException ex ) { auditLogOvfLoadError ( ex.getName ( ) ) ; } } return vms ; }

Target:
protected java.util.List < org.ovirt.engine.core.common.businessentities.VM > buildFromOVFs ( java.util.List < java.lang.String > ovfList ) { org.ovirt.engine.core.bll.OvfHelper ovfHelper = new org.ovirt.engine.core.bll.OvfHelper ( ) ; java.util.List < org.ovirt.engine.core.common.businessentities.VM > vms = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VM > ( ) ; for ( java.lang.String ovf : ovfList ) { try { if ( ! ( ovfHelper.isOvfTemplate ( ovf ) ) ) { vms.add ( ovfHelper.readVmFromOvf ( ovf ) ) ; } } catch ( org.ovirt.engine.core.utils.ovf.OvfReaderException ex ) { auditLogOvfLoadError ( ex.getName ( ) , ex.getMessage ( ) ) ; } } return vms ; }
Source:
public void checkStorageDomainNotEqualWithStatusActive ( ) { setStorageDomainStatus ( StorageDomainStatus.Active ) ; org.junit.Assert.assertFalse ( cmd.checkStorageDomainStatusNotEqual ( StorageDomainStatus.Active ) ) ; java.util.List < java.lang.String > messages = cmd.getReturnValue ( ) . getCanDoActionMessages ( ) ; org.junit.Assert.assertEquals ( messages.size ( ) , 2 ) ; org.junit.Assert.assertEquals ( messages.get ( 0 ) , VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_DOMAIN_STATUS_ILLEGAL2.toString ( ) ) ; org.junit.Assert.assertEquals ( messages.get ( 1 ) , java.lang.String.format ( "$status %1$s" , StorageDomainStatus.Active ) ) ; }

Target:
public void checkStorageDomainNotEqualWithStatusActive ( ) { setStorageDomainStatus ( StorageDomainStatus.Active ) ; org.junit.Assert.assertFalse ( cmd.checkStorageDomainStatusNotEqual ( StorageDomainStatus.Active ) ) ; java.util.List < java.lang.String > messages = cmd.getReturnValue ( ) . getCanDoActionMessages ( ) ; org.junit.Assert.assertEquals ( messages.size ( ) , 2 ) ; org.junit.Assert.assertEquals ( messages.get ( 0 ) , EngineMessage.ACTION_TYPE_FAILED_STORAGE_DOMAIN_STATUS_ILLEGAL2.toString ( ) ) ; org.junit.Assert.assertEquals ( messages.get ( 1 ) , java.lang.String.format ( "$status %1$s" , StorageDomainStatus.Active ) ) ; }
Source:
public java.util.List < org.ovirt.engine.api.model.ReportedDevice > getDevices ( org.ovirt.engine.core.compat.Guid vmId , java.lang.String mac ) { java.util.List < org.ovirt.engine.api.model.ReportedDevice > devices = new java.util.ArrayList < org.ovirt.engine.api.model.ReportedDevice > ( ) ; for ( org.ovirt.engine.core.common.businessentities.VmGuestAgentInterface iface : getDevicesCollection ( vmId ) ) { if ( org.apache.commons.lang.StringUtils.equals ( iface.getMacAddress ( ) , mac ) ) { devices.add ( org.ovirt.engine.api.utils.LinkHelper.addLinks ( getUriInfo ( ) , org.ovirt.engine.api.restapi.types.ReportedDeviceMapper.map ( iface , new org.ovirt.engine.api.model.ReportedDevice ( ) ) ) ) ; } } return devices ; }

Target:
public org.ovirt.engine.api.model.Nics list ( ) { org.ovirt.engine.api.model.Nics nics = new org.ovirt.engine.api.model.Nics ( ) ; java.util.List < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > entities = getBackendCollection ( VdcQueryType.GetVmInterfacesByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) ) ; for ( org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface entity : entities ) { org.ovirt.engine.api.model.Nic nic = populate ( map ( entity ) , entity ) ; nics.getNics ( ) . add ( addLinks ( nic ) ) ; } return nics ; }
Source:
private void SaveNfsStorage ( ) { if ( ( getWindow ( ) . getProgress ( ) ) != null ) { return ; } getWindow ( ) . StartProgress ( null ) ; org.ovirt.engine.ui.uicompat.Task.Create ( this , new java.util.ArrayList < java.lang.Object > ( java.util.Arrays.asList ( new java.lang.Object [ ] { "SaveNfs" } ) ) ) . Run ( ) ; }

Target:
private void saveNfsStorage ( ) { if ( ( getWindow ( ) . getProgress ( ) ) != null ) { return ; } getWindow ( ) . startProgress ( null ) ; org.ovirt.engine.ui.uicompat.Task.Create ( this , new java.util.ArrayList < java.lang.Object > ( java.util.Arrays.asList ( new java.lang.Object [ ] { "SaveNfs" } ) ) ) . Run ( ) ; }
Source:
public void passDiscardSupportedForCopyFloatingDiskOp ( ) { initializeCommand ( new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ) ; command.getParameters ( ) . setOperation ( ImageOperation.Copy ) ; initTemplateDiskImage ( ) ; org.junit.Assert.assertTrue ( command.validatePassDiscardSupportedForDestinationStorageDomain ( ) ) ; }

Target:
public void validateFailureOnCopyingCinderDisk ( ) { initializeCommand ( new org.ovirt.engine.core.common.businessentities.storage.CinderDisk ( ) , VmEntityType.VM ) ; command.getParameters ( ) . setOperation ( ImageOperation.Copy ) ; org.mockito.Mockito.doReturn ( new org.ovirt.engine.core.common.businessentities.VmTemplate ( ) ) . when ( command ) . getTemplateForImage ( ) ; command.init ( ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( command , EngineMessage.ACTION_TYPE_FAILED_NOT_SUPPORTED_DISK_STORAGE_TYPE ) ; }
Source:
public void deleteCompletedJobs ( ) throws java.text.ParseException { int sizeBeforeDelete = dao.getAll ( ) . size ( ) ; java.text.DateFormat df = new java.text.SimpleDateFormat ( "yyyy-MM-dd HH:mm:ss" ) ; java.util.Date dateToDelete = df.parse ( "2013-02-9 10:11:00" ) ; dao.deleteCompletedJobs ( dateToDelete , dateToDelete ) ; int sizeAfterDelete = dao.getAll ( ) . size ( ) ; org.junit.Assert.assertNotNull ( "Check job with step and no async task are not deleted" , dao.get ( new org.ovirt.engine.core.compat.Guid ( "54947df8-0e9e-4471-a2f9-9af509fb0002" ) ) ) ; org.junit.Assert.assertTrue ( "Check an entry was deleted" , ( sizeBeforeDelete > sizeAfterDelete ) ) ; }

Target:
public void deleteCompletedJobs ( ) throws java.text.ParseException { int sizeBeforeDelete = dao.getAll ( ) . size ( ) ; java.text.DateFormat df = new java.text.SimpleDateFormat ( "yyyy-MM-dd HH:mm:ss" ) ; java.util.Date dateToDelete = df.parse ( "2013-02-9 10:11:00" ) ; dao.deleteCompletedJobs ( dateToDelete , dateToDelete ) ; int sizeAfterDelete = dao.getAll ( ) . size ( ) ; org.junit.jupiter.api.Assertions.assertNotNull ( dao.get ( new org.ovirt.engine.core.compat.Guid ( "54947df8-0e9e-4471-a2f9-9af509fb0002" ) ) , "Check job with step and no async task are not deleted" ) ; org.junit.jupiter.api.Assertions.assertTrue ( ( sizeBeforeDelete > sizeAfterDelete ) , "Check an entry was deleted" ) ; }
Source:
public void onUpdatedVnuma ( org.ovirt.engine.ui.common.presenter.popup.numa.UpdatedVnumaEvent event ) { supportModel.pinVNodeToNumaNode ( event.getSourceVmGuid ( ) , event.isPinned ( ) , event.getSourceVNumaNodeIndex ( ) , event.getTargetNumaNodeIndex ( ) ) ; }

Target:
public void onUpdatedVnuma ( org.ovirt.engine.ui.common.presenter.popup.numa.UpdatedVnumaEvent event ) { if ( ( event.getTargetNumaNodeIndex ( ) ) != ( - 1 ) ) { supportModel.pinVNode ( event.getSourceVmGuid ( ) , event.getSourceVNumaNodeIndex ( ) , event.getTargetNumaNodeIndex ( ) ) ; } else { supportModel.unpinVNode ( event.getSourceVmGuid ( ) , event.getSourceVNumaNodeIndex ( ) ) ; } }
Source:
private boolean hostCompliesWithRngDeviceSources ( org.ovirt.engine.core.common.businessentities.VDS vds , org.ovirt.engine.core.common.businessentities.Cluster cluster ) { return vds.getSupportedRngSources ( ) . containsAll ( cluster.getRequiredRngSources ( ) ) ; }

Target:
private boolean hostCompliesWithRngDeviceSources ( org.ovirt.engine.core.common.businessentities.VDS vds , org.ovirt.engine.core.common.businessentities.Cluster cluster ) { return ( vds.getSupportedRngSources ( ) . containsAll ( cluster.getAdditionalRngSources ( ) ) ) && ( ( vds.getSupportedRngSources ( ) . contains ( VmRngDevice.Source.URANDOM ) ) || ( vds.getSupportedRngSources ( ) . contains ( VmRngDevice.Source.RANDOM ) ) ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc glusterVolumeSnapshotDelete ( java.lang.String volumeName ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.glusterVolumeSnapshotDelete ( volumeName ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( 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.StatusOnlyReturnForXmlRpc extend_image_ticket ( java.lang.String ticketId , long timeout ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.extend_image_ticket ( ticketId , timeout ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
Source:
public static java.lang.Integer GetVlanId ( java.lang.String ifaceName ) { java.lang.String [ ] tokens = ifaceName.split ( "[.]" , ( - 1 ) ) ; if ( ( tokens.length ) > 1 ) { java.lang.Integer vlan = org.ovirt.engine.core.compat.IntegerCompat.tryParse ( tokens [ ( ( tokens.length ) - 1 ) ] ) ; if ( vlan != null ) { return vlan ; } } return null ; }

Target:
public static java.lang.Integer getVlanId ( java.lang.String ifaceName ) { java.lang.String [ ] tokens = ifaceName.split ( "[.]" , ( - 1 ) ) ; if ( ( tokens.length ) > 1 ) { java.lang.Integer vlan = org.ovirt.engine.core.compat.IntegerCompat.tryParse ( tokens [ ( ( tokens.length ) - 1 ) ] ) ; if ( vlan != null ) { return vlan ; } } return null ; }
Source:
private void UpdateOptions ( ) { getCompulsoryActions ( ) . clear ( ) ; getOptionalActions ( ) . clear ( ) ; if ( ( getEntity ( ) ) != null ) { StartProgress ( null ) ; if ( ( getEntity ( ) . getstorage_pool_type ( ) ) != ( org.ovirt.engine.core.common.businessentities.StorageType.LOCALFS ) ) { UpdateOptionsNonLocalFSData ( ) ; } else { UpdateOptionsLocalFSData ( ) ; } } }

Target:
private void updateOptions ( ) { getCompulsoryActions ( ) . clear ( ) ; getOptionalActions ( ) . clear ( ) ; if ( ( getEntity ( ) ) != null ) { startProgress ( null ) ; if ( ( getEntity ( ) . getstorage_pool_type ( ) ) != ( org.ovirt.engine.core.common.businessentities.StorageType.LOCALFS ) ) { updateOptionsNonLocalFSData ( ) ; } else { updateOptionsLocalFSData ( ) ; } } }
Source:
private java.util.List < org.ovirt.engine.core.common.businessentities.network.Network > getNetworks ( ) { if ( ( ( org.ovirt.engine.core.bll.network.dc.AddNetworkCommand.getNetwork ( ) . getDataCenterId ( ) ) != null ) && ( ! ( org.ovirt.engine.core.bll.network.dc.AddNetworkCommand.getNetwork ( ) . getDataCenterId ( ) . getValue ( ) . equals ( Guid.Empty ) ) ) ) { return org.ovirt.engine.core.bll.network.dc.AddNetworkCommand.getNetworkDAO ( ) . getAllForDataCenter ( org.ovirt.engine.core.bll.network.dc.AddNetworkCommand.getNetwork ( ) . getDataCenterId ( ) . getValue ( ) ) ; } else { return org.ovirt.engine.core.bll.network.dc.AddNetworkCommand.getNetworkDAO ( ) . getAll ( ) ; } }

Target:
private java.util.List < org.ovirt.engine.core.common.businessentities.network.Network > getNetworks ( ) { org.ovirt.engine.core.compat.NGuid dataCenterId = org.ovirt.engine.core.bll.network.dc.AddNetworkCommand.getNetwork ( ) . getDataCenterId ( ) ; if ( ( dataCenterId != null ) && ( ! ( dataCenterId.getValue ( ) . equals ( Guid.Empty ) ) ) ) { return org.ovirt.engine.core.bll.network.dc.AddNetworkCommand.getNetworkDAO ( ) . getAllForDataCenter ( dataCenterId.getValue ( ) ) ; } else { return org.ovirt.engine.core.bll.network.dc.AddNetworkCommand.getNetworkDAO ( ) . getAll ( ) ; } }
Source:
public void getGlusterBricksForServer ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid serverId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? source : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterVolumeBricksByServerId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( serverId ) , aQuery ) ; }

Target:
public void getGlusterBricksForServer ( org.ovirt.engine.ui.frontend.AsyncQuery < java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity > > aQuery , org.ovirt.engine.core.compat.Guid serverId ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.ListConverter < > ( ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterVolumeBricksByServerId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( serverId ) , aQuery ) ; }
Source:
public void getStorageDomainsByConnection ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , java.lang.String connectionPath ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ) ( source ) ) : null ; } } ; org.ovirt.engine.core.common.queries.GetStorageDomainsByConnectionParameters param = new org.ovirt.engine.core.common.queries.GetStorageDomainsByConnectionParameters ( ) ; param.setConnection ( connectionPath ) ; if ( storagePoolId != null ) { param.setStoragePoolId ( storagePoolId ) ; } org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageDomainsByConnection , param , aQuery ) ; }

Target:
public void 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.getInstance ( ) . runQuery ( VdcQueryType.GetAllServerCpuList , new org.ovirt.engine.core.common.queries.GetAllServerCpuListParameters ( version ) , aQuery ) ; }
Source:
public boolean validateCustomProperties ( java.util.List < java.lang.String > messages ) { org.ovirt.engine.core.common.businessentities.StoragePool dataCenter = getDbFacade ( ) . getStoragePoolDao ( ) . get ( getNetwork ( ) . getDataCenterId ( ) ) ; java.util.List < org.ovirt.engine.core.utils.customprop.ValidationError > errors = org.ovirt.engine.core.utils.customprop.DevicePropertiesUtils.getInstance ( ) . validateProperties ( dataCenter.getcompatibility_version ( ) , VmDeviceGeneralType.INTERFACE , vnicProfile.getCustomProperties ( ) ) ; if ( ! ( errors.isEmpty ( ) ) ) { org.ovirt.engine.core.utils.customprop.DevicePropertiesUtils.getInstance ( ) . handleCustomPropertiesError ( errors , messages ) ; return false ; } return true ; }

Target:
public boolean validateCustomProperties ( java.util.List < java.lang.String > messages ) { org.ovirt.engine.core.common.businessentities.StoragePool dataCenter = getDbFacade ( ) . getStoragePoolDao ( ) . get ( getNetwork ( ) . getDataCenterId ( ) ) ; java.util.List < org.ovirt.engine.core.common.utils.customprop.ValidationError > errors = org.ovirt.engine.core.utils.customprop.DevicePropertiesUtils.getInstance ( ) . validateProperties ( dataCenter.getCompatibilityVersion ( ) , VmDeviceGeneralType.INTERFACE , vnicProfile.getCustomProperties ( ) ) ; if ( ! ( errors.isEmpty ( ) ) ) { org.ovirt.engine.core.utils.customprop.DevicePropertiesUtils.getInstance ( ) . handleCustomPropertiesError ( errors , messages ) ; return false ; } return true ; }
Source:
public void testGetAllByGroupAndNetwork ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmStatic > result = dao.getAllByGroupAndNetworkName ( org.ovirt.engine.core.dao.VmStaticDAOTest.VDS_GROUP_ID , "engine" ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertFalse ( result.isEmpty ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.VmStatic vm : result ) { org.junit.Assert.assertEquals ( org.ovirt.engine.core.dao.VmStaticDAOTest.VDS_GROUP_ID , vm.getvds_group_id ( ) ) ; } }

Target:
public void testGetAllByGroupAndNetwork ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmStatic > result = dao.getAllByGroupAndNetworkName ( org.ovirt.engine.core.dao.VmStaticDAOTest.VDS_GROUP_ID , "engine" ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertFalse ( result.isEmpty ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.VmStatic vm : result ) { org.junit.Assert.assertEquals ( org.ovirt.engine.core.dao.VmStaticDAOTest.VDS_GROUP_ID , vm.getVdsGroupId ( ) ) ; } }
Source:
public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { if ( ( ( result.getReturnValue ( ) ) == null ) || ( ! ( result.getReturnValue ( ) . getSucceeded ( ) ) ) ) { return ; } sourceListModel.getSearchCommand ( ) . execute ( ) ; cancel ( ) ; }

Target:
private org.ovirt.engine.core.common.businessentities.StoragePool getPreviousDataCenter ( java.util.List < org.ovirt.engine.core.common.businessentities.StoragePool > dataCenters ) { org.ovirt.engine.core.compat.Guid previousDataCenterId = getProxyHostPropertiesModel ( ) . getLastStoragePoolId ( ) ; for ( org.ovirt.engine.core.common.businessentities.StoragePool dataCenter : dataCenters ) { if ( dataCenter.getId ( ) . equals ( previousDataCenterId ) ) { return dataCenter ; } } return null ; }
Source:
private void reset ( ) { setSelectedItems ( new java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.tags.TagModel > ( ) ) ; if ( ( getItems ( ) ) != null ) { for ( java.lang.Object item : getItems ( ) ) { resetInternal ( ( ( org.ovirt.engine.ui.uicommonweb.models.tags.TagModel ) ( item ) ) ) ; } } getResetRequestedEvent ( ) . raise ( this , EventArgs.Empty ) ; }

Target:
private void reset ( ) { setSelectedItems ( new java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.tags.TagModel > ( ) ) ; if ( ( getItems ( ) ) != null ) { for ( java.lang.Object item : getItems ( ) ) { resetInternal ( ( ( org.ovirt.engine.ui.uicommonweb.models.tags.TagModel ) ( item ) ) ) ; } } getResetRequestedEvent ( ) . raise ( this , EventArgs.EMPTY ) ; }
Source:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event < ? extends org.ovirt.engine.ui.uicompat.EventArgs > ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { org.ovirt.engine.ui.uicommonweb.models.EntityModel diskViewType = ( ( org.ovirt.engine.ui.uicommonweb.models.EntityModel ) ( sender ) ) ; disksViewRadioGroup.setDiskStorageType ( ( ( org.ovirt.engine.core.common.businessentities.Disk.DiskStorageType ) ( diskViewType.getEntity ( ) ) ) ) ; if ( ( commonModelProvider.get ( ) . getSelectedItem ( ) ) instanceof org.ovirt.engine.ui.uicommonweb.models.disks.DiskListModel ) { onDiskViewTypeChanged ( ) ; } }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event < ? extends org.ovirt.engine.ui.uicompat.EventArgs > ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { org.ovirt.engine.ui.uicommonweb.models.EntityModel diskViewType = ( ( org.ovirt.engine.ui.uicommonweb.models.EntityModel ) ( sender ) ) ; disksViewRadioGroup.setDiskStorageType ( ( ( org.ovirt.engine.core.common.businessentities.storage.Disk.DiskStorageType ) ( diskViewType.getEntity ( ) ) ) ) ; if ( ( commonModelProvider.get ( ) . getSelectedItem ( ) ) instanceof org.ovirt.engine.ui.uicommonweb.models.disks.DiskListModel ) { onDiskViewTypeChanged ( ) ; } }
Source:
public static void getAllVnicProfiles ( 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 ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VnicProfileView > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllVnicProfiles , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }

Target:
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 ) ; }
Source:
public void getAAAProfilesEntriesList ( 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.Collection < org.ovirt.engine.core.aaa.ProfileEntry > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.aaa.ProfileEntry > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAAAProfileList , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }

Target:
public void getStorageDomainByName ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String storageDomainName ) { 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.GetStorageDomainByName , new org.ovirt.engine.core.common.queries.NameQueryParameters ( storageDomainName ) , aQuery ) ; }
Source:
public java.lang.String getValue ( org.ovirt.engine.core.common.businessentities.Disk object ) { if ( ( object.getLastAlignmentScan ( ) ) != null ) { java.lang.String lastScanDate = com.google.gwt.i18n.client.DateTimeFormat.getFormat ( "yyyy-MM-dd, HH:mm" ) . format ( object.getLastAlignmentScan ( ) ) ; setTitle ( org.ovirt.engine.ui.common.widget.uicommon.disks.DisksViewColumns.messages.lastDiskAlignment ( lastScanDate ) ) ; } else { setTitle ( null ) ; } return object.getAlignment ( ) . toString ( ) ; }

Target:
public com.google.gwt.safehtml.shared.SafeHtml getTooltip ( org.ovirt.engine.core.common.businessentities.storage.Disk object ) { if ( ( object.getLastAlignmentScan ( ) ) != null ) { java.lang.String lastScanDate = com.google.gwt.i18n.client.DateTimeFormat.getFormat ( "yyyy-MM-dd, HH:mm" ) . format ( object.getLastAlignmentScan ( ) ) ; return com.google.gwt.safehtml.shared.SafeHtmlUtils.fromString ( org.ovirt.engine.ui.common.widget.uicommon.disks.DisksViewColumns.messages.lastDiskAlignment ( lastScanDate ) ) ; } return null ; }
Source:
private void changeIsAttached ( org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterNetworkManageModel clusterNetworkManageModel , java.lang.Boolean value ) { clusterNetworkManageModel.setAttached ( value ) ; if ( ( ! value ) && ( clusterNetworkManageModel.isDisplayNetwork ( ) ) ) { clusterNetworkManageModel.setDisplayNetwork ( false ) ; } if ( ( ! value ) && ( clusterNetworkManageModel.isRequired ( ) ) ) { clusterNetworkManageModel.setRequired ( false ) ; } }

Target:
private void changeIsAttached ( org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterNetworkModel clusterNetworkManageModel , java.lang.Boolean value ) { clusterNetworkManageModel.setAttached ( value ) ; if ( ( ! value ) && ( clusterNetworkManageModel.isDisplayNetwork ( ) ) ) { clusterNetworkManageModel.setDisplayNetwork ( false ) ; } if ( ( ! value ) && ( clusterNetworkManageModel.isRequired ( ) ) ) { clusterNetworkManageModel.setRequired ( false ) ; } }
Source:
public static void GetTemplateById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid templateId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVmTemplate , new org.ovirt.engine.core.common.queries.GetVmTemplateParameters ( templateId ) , aQuery ) ; }

Target:
public static void getTemplateById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid templateId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVmTemplate , new org.ovirt.engine.core.common.queries.GetVmTemplateParameters ( templateId ) , aQuery ) ; }
Source:
public static org.ovirt.engine.api.model.Image map ( org.ovirt.engine.core.common.businessentities.storage.RepoImage entity , org.ovirt.engine.api.model.Image template ) { org.ovirt.engine.api.model.Image model = ( template != null ) ? template : new org.ovirt.engine.api.model.Image ( ) ; model.setId ( entity.getRepoImageId ( ) ) ; model.setName ( entity.getRepoImageName ( ) ) ; return model ; }

Target:
public static org.ovirt.engine.api.model.Image map ( org.ovirt.engine.core.common.businessentities.storage.RepoImage entity , org.ovirt.engine.api.model.Image template ) { org.ovirt.engine.api.model.Image model = ( template != null ) ? template : new org.ovirt.engine.api.model.Image ( ) ; model.setId ( entity.getRepoImageId ( ) ) ; model.setName ( entity.getRepoImageName ( ) ) ; model.setSize ( entity.getSize ( ) ) ; model.setType ( org.ovirt.engine.api.restapi.types.ImageMapper.mapImageType ( entity.getFileType ( ) ) ) ; return model ; }
Source:
public static void getHostPublicKey ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.String ) ( source ) ) : "" ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetServerSSHPublicKey , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }

Target:
public static void getHostFingerprint ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String hostAddress ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.String ) ( source ) ) : "" ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetServerSSHKeyFingerprint , new org.ovirt.engine.core.common.queries.ServerParameters ( hostAddress ) , aQuery ) ; }