auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private javax.ws.rs.core.Response handleConfigureConsoleError ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue configuredOptionsReturnValue ) { org.ovirt.engine.api.restapi.resource.BackendVmGraphicsConsoleResource.log.error ( localize ( Messages.BACKEND_FAILED_TEMPLATE , configuredOptionsReturnValue.getExceptionString ( ) ) ) ; if ( EngineMessage.USER_CANNOT_FORCE_RECONNECT_TO_VM.name ( ) . equals ( configuredOptionsReturnValue.getExceptionString ( ) ) ) { return javax.ws.rs.core.Response.status ( Response.Status.FORBIDDEN ) . build ( ) ; } return javax.ws.rs.core.Response.serverError ( ) . build ( ) ; }

Target:
private org.ovirt.engine.core.common.queries.VdcQueryReturnValue generateDescriptorResponse ( ) throws java.lang.Exception { org.ovirt.engine.api.model.GraphicsType graphicsType = org.ovirt.engine.api.restapi.resource.BackendGraphicsConsoleHelper.asGraphicsType ( consoleId ) ; org.ovirt.engine.core.common.console.ConsoleOptions consoleOptions = new org.ovirt.engine.core.common.console.ConsoleOptions ( graphicsType ) ; consoleOptions.setVmId ( guid ) ; org.ovirt.engine.core.common.queries.VdcQueryReturnValue configuredOptionsReturnValue = runQuery ( VdcQueryType.ConfigureConsoleOptions , new org.ovirt.engine.core.common.queries.ConfigureConsoleOptionsParams ( consoleOptions , true ) ) ; if ( ! ( configuredOptionsReturnValue.getSucceeded ( ) ) ) { throw new java.lang.Exception ( configuredOptionsReturnValue.getExceptionString ( ) ) ; } return runQuery ( VdcQueryType.GetConsoleDescriptorFile , new org.ovirt.engine.core.common.queries.ConsoleOptionsParams ( configuredOptionsReturnValue.getReturnValue ( ) ) ) ; }
Source:
private void readBytes ( java.nio.ByteBuffer ibuff ) throws java.io.IOException , org.ovirt.vdsm.jsonrpc.client.ClientConnectionException { readBuffer ( ibuff ) ; if ( ibuff.hasRemaining ( ) ) { return ; } ibuff.rewind ( ) ; emitOnMessageReceived ( ibuff.array ( ) ) ; this . ibuff = null ; this . byteBuffer.clear ( ) ; }

Target:
protected void readBytes ( java.nio.ByteBuffer ibuff ) throws java.io.IOException , org.ovirt.vdsm.jsonrpc.client.ClientConnectionException { int read = readBuffer ( ibuff ) ; if ( read <= 0 ) { return ; } ibuff.rewind ( ) ; byte [ ] message = new byte [ read ] ; ibuff.get ( message ) ; emitOnMessageReceived ( message ) ; this . ibuff = null ; }
Source:
private void handleOperationException ( org.ovirt.engine.core.bll.adbroker.LdapSearchExceptionHandlingResponse response , java.lang.Throwable throwable , org.ovirt.engine.core.bll.adbroker.LdapCredentials credentials ) { response.setServerScore ( Score.HIGH ) . setTranslatedException ( new org.ovirt.engine.core.bll.adbroker.EngineDirectoryServiceException ( org.ovirt.engine.core.utils.kerberos.AuthenticationResult.USER_ACCOUNT_DISABLED_OR_LOCKED , throwable ) ) . setTryNextServer ( false ) ; org.ovirt.engine.core.bll.adbroker.LdapBrokerUtils.logEventForUser ( credentials.getUserName ( ) , AuthenticationResult.USER_ACCOUNT_DISABLED_OR_LOCKED.getAuditLogType ( ) ) ; }

Target:
private void handleOperationException ( org.ovirt.engine.core.bll.adbroker.LdapSearchExceptionHandlingResponse response , java.lang.Throwable throwable , org.ovirt.engine.core.bll.adbroker.LdapCredentials credentials ) { response.setServerScore ( Score.HIGH ) . setTranslatedException ( new org.ovirt.engine.core.bll.adbroker.AuthenticationResultException ( org.ovirt.engine.core.utils.kerberos.AuthenticationResult.USER_ACCOUNT_DISABLED_OR_LOCKED , throwable ) ) . setTryNextServer ( false ) ; org.ovirt.engine.core.bll.adbroker.LdapBrokerUtils.logEventForUser ( credentials.getUserName ( ) , AuthenticationResult.USER_ACCOUNT_DISABLED_OR_LOCKED.getAuditLogType ( ) ) ; }
Source:
protected org.ovirt.engine.core.common.businessentities.VmDevice generateNewEntity ( ) { java.util.Map < java.lang.String , java.lang.String > customProp = new java.util.LinkedHashMap < > ( ) ; customProp.put ( "prop1" , "value1" ) ; return new org.ovirt.engine.core.common.businessentities.VmDevice ( new org.ovirt.engine.core.common.businessentities.VmDeviceId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , org.ovirt.engine.core.dao.VmDeviceDAOTest.EXISTING_VM_ID ) , org.ovirt.engine.core.common.businessentities.VmDeviceGeneralType.DISK , "floppy" , "type:'drive', controller:'0', bus:'0', unit:'1'" , 2 , new java.util.HashMap < java.lang.String , java.lang.Object > ( ) , true , false , false , "alias" , customProp , null , null ) ; }

Target:
protected org.ovirt.engine.core.common.businessentities.VmDevice generateNewEntity ( ) { return createVmDevice ( org.ovirt.engine.core.dao.VmDeviceDAOTest.EXISTING_VM_ID ) ; }
Source:
public synchronized boolean hasTasksForEntityIdAndAction ( org.ovirt.engine.core.compat.Guid id , org.ovirt.engine.core.common.action.VdcActionType type ) { boolean retVal = false ; if ( ( _tasks ) != null ) { for ( org.ovirt.engine.core.bll.SPMAsyncTask task : _tasks.values ( ) ) { if ( ( isCurrentTaskLookedFor ( id , task ) ) && ( type.equals ( task.getParameters ( ) . getDbAsyncTask ( ) . getaction_type ( ) ) ) ) { retVal = true ; break ; } } } return retVal ; }

Target:
public synchronized boolean HasTasksByStoragePoolId ( org.ovirt.engine.core.compat.Guid storagePoolID ) { boolean retVal = false ; if ( ( _tasks ) != null ) { for ( org.ovirt.engine.core.bll.SPMAsyncTask task : _tasks.values ( ) ) { if ( task.getStoragePoolID ( ) . equals ( storagePoolID ) ) { retVal = true ; break ; } } } return retVal ; }
Source:
public void getHostArchitecture ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter < org.ovirt.engine.core.common.businessentities.ArchitectureType > ( ) { @ java.lang.Override public org.ovirt.engine.core.common.businessentities.ArchitectureType Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return ( ( org.ovirt.engine.core.common.businessentities.ArchitectureType ) ( source ) ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetHostArchitecture , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }

Target:
private void runQueryByIdParameter ( org.ovirt.engine.core.common.queries.VdcQueryType queryType , org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.AsIsAsyncConverter ( ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( queryType , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }
Source:
protected void executeQueryCommand ( ) { org.ovirt.engine.core.bll.GetCACertificateQuery.getQueryReturnValue ( ) . setSucceeded ( false ) ; java.io.File path = org.ovirt.engine.core.utils.EngineLocalConfig.getInstance ( ) . getPKICACert ( ) ; if ( path.exists ( ) ) { try { org.ovirt.engine.core.bll.GetCACertificateQuery.getQueryReturnValue ( ) . setReturnValue ( org.ovirt.engine.core.utils.FileUtil.readAllText ( path.getAbsolutePath ( ) ) ) ; } catch ( java.io.IOException e ) { org.ovirt.engine.core.bll.GetCACertificateQuery.getQueryReturnValue ( ) . setExceptionString ( e.getMessage ( ) ) ; return ; } org.ovirt.engine.core.bll.GetCACertificateQuery.getQueryReturnValue ( ) . setSucceeded ( true ) ; } }

Target:
protected void executeQueryCommand ( ) { try { org.ovirt.engine.core.bll.GetCACertificateQuery.getQueryReturnValue ( ) . setSucceeded ( false ) ; org.ovirt.engine.core.bll.GetCACertificateQuery.getQueryReturnValue ( ) . setReturnValue ( org.ovirt.engine.core.utils.PKIResources.getInstance ( ) . getAsString ( PKIResources.Resource.CACertificate , PKIResources.OutputType.X509_PEM ) ) ; org.ovirt.engine.core.bll.GetCACertificateQuery.getQueryReturnValue ( ) . setSucceeded ( true ) ; } catch ( java.lang.Exception e ) { org.ovirt.engine.core.bll.GetCACertificateQuery.getQueryReturnValue ( ) . setExceptionString ( e.getMessage ( ) ) ; } }
Source:
private void calculateNetworkImplementationDetailsAndAssertManaged ( org.ovirt.engine.core.common.businessentities.VdsNetworkInterface iface , boolean expectManaged , java.util.Map < java.lang.String , org.ovirt.engine.core.common.businessentities.Network > networks ) { org.ovirt.engine.core.common.businessentities.VdsNetworkInterface.NetworkImplementationDetails networkImplementationDetails = org.ovirt.engine.core.utils.NetworkUtils.calculateNetworkImplementationDetails ( networks , iface ) ; org.junit.Assert.assertNotNull ( "Network implementation details should be filled." , networkImplementationDetails ) ; org.junit.Assert.assertEquals ( ( ( "Network implementation details should be " + ( expectManaged ? "" : "un" ) ) + "managed." ) , expectManaged , networkImplementationDetails.isManaged ( ) ) ; }

Target:
private void calculateNetworkImplementationDetailsAndAssertManaged ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface , boolean expectManaged , java.util.Map < java.lang.String , org.ovirt.engine.core.common.businessentities.network.Network > networks ) { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface.NetworkImplementationDetails networkImplementationDetails = org.ovirt.engine.core.utils.NetworkUtils.calculateNetworkImplementationDetails ( networks , iface ) ; org.junit.Assert.assertNotNull ( "Network implementation details should be filled." , networkImplementationDetails ) ; org.junit.Assert.assertEquals ( ( ( "Network implementation details should be " + ( expectManaged ? "" : "un" ) ) + "managed." ) , expectManaged , networkImplementationDetails.isManaged ( ) ) ; }
Source:
public static void addDiskImage ( org.ovirt.engine.core.common.businessentities.DiskImage image , boolean active , org.ovirt.engine.core.common.businessentities.image_storage_domain_map imageStorageDomainMap , org.ovirt.engine.core.compat.Guid vmId ) { try { org.ovirt.engine.core.bll.ImagesHandler.addImage ( image , active , imageStorageDomainMap ) ; org.ovirt.engine.core.bll.ImagesHandler.addDiskToVmIfNotExists ( image , vmId ) ; } catch ( java.lang.RuntimeException ex ) { org.ovirt.engine.core.bll.ImagesHandler.log.error ( "Failed adding new disk image and related entities to db: {}" , ex.getMessage ( ) ) ; org.ovirt.engine.core.bll.ImagesHandler.log.debug ( "Exception" , ex ) ; throw new org.ovirt.engine.core.common.errors.VdcBLLException ( org.ovirt.engine.core.common.errors.VdcBllErrors.DB , ex ) ; } }

Target:
public static void addDiskImage ( org.ovirt.engine.core.common.businessentities.storage.DiskImage image , boolean active , org.ovirt.engine.core.common.businessentities.storage.image_storage_domain_map imageStorageDomainMap , org.ovirt.engine.core.compat.Guid vmId ) { try { org.ovirt.engine.core.bll.ImagesHandler.addImage ( image , active , imageStorageDomainMap ) ; org.ovirt.engine.core.bll.ImagesHandler.addDiskToVmIfNotExists ( image , vmId ) ; } catch ( java.lang.RuntimeException ex ) { org.ovirt.engine.core.bll.ImagesHandler.log.error ( "Failed adding new disk image and related entities to db: {}" , ex.getMessage ( ) ) ; org.ovirt.engine.core.bll.ImagesHandler.log.debug ( "Exception" , ex ) ; throw new org.ovirt.engine.core.common.errors.VdcBLLException ( org.ovirt.engine.core.common.errors.VdcBllErrors.DB , ex ) ; } }
Source:
public void testCheckGlusterQuorumWithTwoServersDown ( ) { org.ovirt.engine.core.common.businessentities.Cluster cluster = getCluster ( true ) ; java.lang.Iterable < org.ovirt.engine.core.compat.Guid > hostIds = java.util.Arrays.asList ( org.ovirt.engine.core.bll.gluster.GlusterHostValidatorTest.SERVER_ID_1 , org.ovirt.engine.core.bll.gluster.GlusterHostValidatorTest.SERVER_ID_2 ) ; org.junit.Assert.assertEquals ( "Quorum check is failing" , 2 , hostValidator.checkGlusterQuorum ( cluster , hostIds ) . size ( ) ) ; org.junit.Assert.assertEquals ( java.util.Arrays.asList ( "Vol-1" , "Vol-2" ) , hostValidator.checkGlusterQuorum ( cluster , hostIds ) ) ; }

Target:
public void testCheckGlusterQuorumWithTwoServersDown ( ) { org.ovirt.engine.core.common.businessentities.Cluster cluster = getCluster ( true ) ; java.lang.Iterable < org.ovirt.engine.core.compat.Guid > hostIds = java.util.Arrays.asList ( org.ovirt.engine.core.bll.gluster.GlusterHostValidatorTest.SERVER_ID_1 , org.ovirt.engine.core.bll.gluster.GlusterHostValidatorTest.SERVER_ID_2 ) ; org.junit.jupiter.api.Assertions.assertEquals ( 2 , hostValidator.checkGlusterQuorum ( cluster , hostIds ) . size ( ) , "Quorum check is failing" ) ; org.junit.jupiter.api.Assertions.assertEquals ( java.util.Arrays.asList ( "Vol-1" , "Vol-2" ) , hostValidator.checkGlusterQuorum ( cluster , hostIds ) ) ; }
Source:
private static void addEmptyMemoryBalloon ( org.ovirt.engine.core.compat.Guid id ) { org.ovirt.engine.core.bll.utils.VmDeviceUtils.addManagedDevice ( new org.ovirt.engine.core.common.businessentities.VmDeviceId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , id ) , VmDeviceGeneralType.BALLOON , VmDeviceType.MEMBALLOON , java.util.Collections.< java.lang.String , java.lang.Object > singletonMap ( VdsProperties.Model , VdsProperties.Virtio ) , true , true , null , false ) ; }

Target:
private static java.util.Map < java.lang.String , java.lang.Object > getMemoryBalloonSpecParams ( ) { return java.util.Collections.< java.lang.String , java.lang.Object > singletonMap ( VdsProperties.Model , VdsProperties.Virtio ) ; }
Source:
public void tMap_9_error ( java.lang.Exception exception , java.lang.String errorComponent , final java.util.Map < java.lang.String , java.lang.Object > globalMap ) throws ovirt_engine_dwh.aggregationtohourly_3_6.AggregationToHourly.TalendException { end_Hash.put ( errorComponent , java.lang.System.currentTimeMillis ( ) ) ; ( ( java.util.Map ) ( threadLocal.get ( ) ) ) . put ( "status" , "failure" ) ; tJDBCInput_9_onSubJobError ( exception , errorComponent , globalMap ) ; }

Target:
public void tMap_6_error ( java.lang.Exception exception , java.lang.String errorComponent , final java.util.Map < java.lang.String , java.lang.Object > globalMap ) throws ovirt_engine_dwh.aggregationtohourly_3_6.AggregationToHourly.TalendException { end_Hash.put ( errorComponent , java.lang.System.currentTimeMillis ( ) ) ; ( ( java.util.Map ) ( threadLocal.get ( ) ) ) . put ( "status" , "failure" ) ; tJDBCInput_9_onSubJobError ( exception , errorComponent , globalMap ) ; }
Source:
protected org.ovirt.engine.core.common.businessentities.HostDevice generateNewEntity ( ) { org.ovirt.engine.core.common.businessentities.HostDevice device = new org.ovirt.engine.core.common.businessentities.HostDevice ( ) ; device.setHostId ( org.ovirt.engine.core.dao.HostDeviceDaoTest.EXISTING_HOST_ID ) ; device.setDeviceName ( ( ( org.ovirt.engine.core.dao.HostDeviceDaoTest.EXISTING_DEVICE_NAME ) + "___child" ) ) ; device.setParentDeviceName ( org.ovirt.engine.core.dao.HostDeviceDaoTest.EXISTING_DEVICE_NAME ) ; device.setCapability ( "net" ) ; return device ; }

Target:
protected org.ovirt.engine.core.common.businessentities.HostDevice generateNewEntity ( ) { org.ovirt.engine.core.common.businessentities.HostDevice device = new org.ovirt.engine.core.common.businessentities.HostDevice ( ) ; device.setHostId ( org.ovirt.engine.core.dao.HostDeviceDaoTest.EXISTING_HOST_ID ) ; device.setDeviceName ( ( ( org.ovirt.engine.core.dao.HostDeviceDaoTest.EXISTING_DEVICE_NAME ) + "___child" ) ) ; device.setParentDeviceName ( org.ovirt.engine.core.dao.HostDeviceDaoTest.EXISTING_DEVICE_NAME ) ; device.setCapability ( "pci" ) ; return device ; }
Source:
public org.ovirt.engine.core.bll.scheduling.external.ExternalSchedulerDiscoveryResult runDiscover ( ) { try { org.apache.xmlrpc.client.XmlRpcClient client = new org.apache.xmlrpc.client.XmlRpcClient ( ) ; client.setConfig ( config ) ; java.lang.Object result = client.execute ( org.ovirt.engine.core.bll.scheduling.external.ExternalSchedulerBrokerImpl.DISCOVER , org.ovirt.engine.core.bll.scheduling.external.ExternalSchedulerBrokerImpl.EMPTY ) ; return parseDiscoverResults ( result ) ; } catch ( org.apache.xmlrpc.XmlRpcException e ) { org.ovirt.engine.core.bll.scheduling.external.ExternalSchedulerBrokerImpl.log.error ( "Error communicating with the external scheduler while discovering: {}" , e.getMessage ( ) ) ; org.ovirt.engine.core.bll.scheduling.external.ExternalSchedulerBrokerImpl.log.debug ( "Exception" , e ) ; return null ; } }

Target:
public java.util.Optional < org.ovirt.engine.core.bll.scheduling.external.ExternalSchedulerDiscoveryResult > runDiscover ( ) { try { org.apache.xmlrpc.client.XmlRpcClient client = new org.apache.xmlrpc.client.XmlRpcClient ( ) ; client.setConfig ( config ) ; java.lang.Object result = client.execute ( org.ovirt.engine.core.bll.scheduling.external.ExternalSchedulerBrokerImpl.DISCOVER , org.ovirt.engine.core.bll.scheduling.external.ExternalSchedulerBrokerImpl.EMPTY ) ; return parseDiscoverResults ( result ) ; } catch ( org.apache.xmlrpc.XmlRpcException e ) { org.ovirt.engine.core.bll.scheduling.external.ExternalSchedulerBrokerImpl.log.error ( "Error communicating with the external scheduler while discovering: {}" , e.getMessage ( ) ) ; org.ovirt.engine.core.bll.scheduling.external.ExternalSchedulerBrokerImpl.log.debug ( "Exception" , e ) ; return java.util.Optional.empty ( ) ; } }
Source:
protected void localize ( org.ovirt.engine.ui.common.CommonApplicationConstants constants ) { addressEditor.setLabel ( constants.storageIscsiPopupAddressLabel ( ) ) ; portEditor.setLabel ( constants.storageIscsiPopupPortLabel ( ) ) ; useUserAuthEditor.setLabel ( constants.storageIscsiPopupUserAuthLabel ( ) ) ; chapUserEditor.setLabel ( constants.storageIscsiPopupChapUserLabel ( ) ) ; chapPassEditor.setLabel ( constants.storageIscsiPopupChapPassLabel ( ) ) ; discoverButton.setLabel ( constants.storageIscsiPopupDiscoverButtonLabel ( ) ) ; }

Target:
protected void localize ( ) { addressEditor.setLabel ( org.ovirt.engine.ui.common.widget.uicommon.storage.IscsiDiscoverTargetsView.constants.storageIscsiPopupAddressLabel ( ) ) ; portEditor.setLabel ( org.ovirt.engine.ui.common.widget.uicommon.storage.IscsiDiscoverTargetsView.constants.storageIscsiPopupPortLabel ( ) ) ; useUserAuthEditor.setLabel ( org.ovirt.engine.ui.common.widget.uicommon.storage.IscsiDiscoverTargetsView.constants.storageIscsiPopupUserAuthLabel ( ) ) ; chapUserEditor.setLabel ( org.ovirt.engine.ui.common.widget.uicommon.storage.IscsiDiscoverTargetsView.constants.storageIscsiPopupChapUserLabel ( ) ) ; chapPassEditor.setLabel ( org.ovirt.engine.ui.common.widget.uicommon.storage.IscsiDiscoverTargetsView.constants.storageIscsiPopupChapPassLabel ( ) ) ; discoverButton.setLabel ( org.ovirt.engine.ui.common.widget.uicommon.storage.IscsiDiscoverTargetsView.constants.storageIscsiPopupDiscoverButtonLabel ( ) ) ; }
Source:
public void qosOverridden ( ) { org.ovirt.engine.core.common.businessentities.network.Network network = createNetwork ( org.ovirt.engine.core.bll.network.host.SetupNetworksHelperTest.MANAGEMENT_NETWORK_NAME ) ; mockExistingNetworks ( network ) ; org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface = createNicSyncedWithNetwork ( "eth0" , network ) ; mockExistingIfaces ( iface ) ; iface.setQosOverridden ( true ) ; org.ovirt.engine.core.common.businessentities.VDS host = org.mockito.Mockito.mock ( org.ovirt.engine.core.common.businessentities.VDS.class ) ; org.ovirt.engine.core.bll.network.host.SetupNetworksHelper helper = createHelper ( createParametersForNics ( iface ) , host ) ; org.mockito.Mockito.when ( host.getVdsGroupCompatibilityVersion ( ) ) . thenReturn ( new org.ovirt.engine.core.compat.Version ( 3 , 4 ) ) ; validateAndAssertQosOverridden ( helper , iface ) ; }

Target:
public void qosOverridden ( ) { org.ovirt.engine.core.common.businessentities.network.Network network = createNetwork ( org.ovirt.engine.core.bll.network.host.SetupNetworksHelperTest.MANAGEMENT_NETWORK_NAME ) ; mockExistingNetworks ( network ) ; org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface = createNicSyncedWithNetwork ( "eth0" , network ) ; mockExistingIfaces ( iface ) ; iface.setQosOverridden ( true ) ; org.ovirt.engine.core.bll.network.host.SetupNetworksHelper helper = createHelper ( createParametersForNics ( iface ) , Version.v3_4 ) ; validateAndAssertQosOverridden ( helper , iface ) ; }
Source:
public 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 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 boolean updateConsoleUserWithOptimisticLocking ( org.ovirt.engine.core.common.businessentities.VmDynamic vm ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) . addValue ( "vm_guid" , vm.getId ( ) ) . addValue ( "console_user_id" , vm.getConsoleUserId ( ) ) . addValue ( "guest_cur_user_name" , vm.getguest_cur_user_name ( ) ) . addValue ( "console_cur_user_name" , vm.getConsole_current_user_name ( ) ) ; java.util.Map < java.lang.String , java.lang.Object > results = getCallsHandler ( ) . executeModification ( "UpdateConsoleUserWithOptimisticLocking" , parameterSource ) ; return ( ( java.lang.Boolean ) ( results.get ( "updated" ) ) ) ; }

Target:
public boolean updateConsoleUserWithOptimisticLocking ( org.ovirt.engine.core.common.businessentities.VmDynamic vm ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) . addValue ( "vm_guid" , vm.getId ( ) ) . addValue ( "console_user_id" , vm.getConsoleUserId ( ) ) . addValue ( "guest_cur_user_name" , vm.getGuestCurrentUserName ( ) ) . addValue ( "console_cur_user_name" , vm.getConsoleCurrentUserName ( ) ) ; java.util.Map < java.lang.String , java.lang.Object > results = getCallsHandler ( ) . executeModification ( "UpdateConsoleUserWithOptimisticLocking" , parameterSource ) ; return ( ( java.lang.Boolean ) ( results.get ( "updated" ) ) ) ; }
Source:
public java.lang.String getText ( java.lang.Object image ) { if ( image instanceof org.ovirt.engine.core.common.businessentities.storage.RepoImage ) { return ( ( org.ovirt.engine.core.common.businessentities.storage.RepoImage ) ( image ) ) . getFileType ( ) . toString ( ) ; } else if ( image instanceof org.ovirt.engine.core.common.businessentities.storage.DiskImage ) { return ImageFileType.Disk.toString ( ) ; } return constants.unknown ( ) ; }

Target:
public java.lang.String getText ( java.lang.Object image ) { if ( image instanceof org.ovirt.engine.core.common.businessentities.storage.RepoImage ) { return ( ( org.ovirt.engine.core.common.businessentities.storage.RepoImage ) ( image ) ) . getFileType ( ) . toString ( ) ; } else if ( image instanceof org.ovirt.engine.core.common.businessentities.storage.DiskImage ) { return ImageFileType.Disk.toString ( ) ; } return org.ovirt.engine.ui.webadmin.section.main.view.popup.storage.ImportExportImagePopupView.constants.unknown ( ) ; }
Source:
public java.lang.String render ( T size ) { if ( isUnavailable ( size ) ) { return org.ovirt.engine.ui.common.widget.renderer.DiskSizeRenderer.constants.unAvailablePropertyLabel ( ) ; } switch ( format ) { case GIGABYTE : return renderGigabyteSize ( size.longValue ( ) ) ; case HUMAN_READABLE : return renderHumanReadableSize ( size.longValue ( ) ) ; default : throw new java.lang.RuntimeException ( ( ( "Format '" + ( format ) ) + "' is not supported!" ) ) ; } }

Target:
public java.lang.String render ( T size ) { if ( isUnavailable ( size ) ) { return org.ovirt.engine.ui.common.widget.renderer.DiskSizeRenderer.constants.unAvailablePropertyLabel ( ) ; } switch ( format ) { case GIGABYTE : return renderGibibyteSize ( size.longValue ( ) ) ; case HUMAN_READABLE : return renderHumanReadableSize ( size.longValue ( ) ) ; default : throw new java.lang.RuntimeException ( ( ( "Format '" + ( format ) ) + "' is not supported!" ) ) ; } }
Source:
private static void verifyModelWithIso ( org.ovirt.engine.api.model.Cdrom model , java.lang.String isoPath ) { org.junit.Assert.assertEquals ( Guid.Empty.toString ( ) , model.getId ( ) ) ; org.junit.Assert.assertTrue ( model.isSetVm ( ) ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.api.restapi.resource.BackendVmCdromsResourceTest.VM_ID.toString ( ) , model.getVm ( ) . getId ( ) ) ; org.junit.Assert.assertTrue ( model.isSetFile ( ) ) ; org.junit.Assert.assertEquals ( isoPath , model.getFile ( ) . getId ( ) ) ; }

Target:
private static void verifyModelWithIso ( org.ovirt.engine.api.model.Cdrom model , java.lang.String isoPath ) { org.junit.jupiter.api.Assertions.assertEquals ( Guid.Empty.toString ( ) , model.getId ( ) ) ; org.junit.jupiter.api.Assertions.assertTrue ( model.isSetVm ( ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( org.ovirt.engine.api.restapi.resource.BackendVmCdromsResourceTest.VM_ID.toString ( ) , model.getVm ( ) . getId ( ) ) ; org.junit.jupiter.api.Assertions.assertTrue ( model.isSetFile ( ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( isoPath , model.getFile ( ) . getId ( ) ) ; }
Source:
protected boolean migrateVm ( org.ovirt.engine.core.common.businessentities.VM vm , org.ovirt.engine.core.bll.job.ExecutionContext parentContext ) { org.ovirt.engine.core.common.action.InternalMigrateVmParameters parameters = new org.ovirt.engine.core.common.action.InternalMigrateVmParameters ( vm.getId ( ) , org.ovirt.engine.core.bll.MaintenanceVdsCommand.getActionType ( ) ) ; parameters.setMigrationReason ( new org.ovirt.engine.core.common.migration.MigrationReason ( MigrationReason.Type.HOST_IN_MAINTENANCE ) ) ; return runInternalAction ( VdcActionType.InternalMigrateVm , parameters , createMigrateVmContext ( parentContext , vm ) ) . getSucceeded ( ) ; }

Target:
protected boolean migrateVm ( org.ovirt.engine.core.common.businessentities.VM vm , org.ovirt.engine.core.bll.job.ExecutionContext parentContext ) { org.ovirt.engine.core.common.action.MigrateVmParameters parameters = new org.ovirt.engine.core.common.action.MigrateVmParameters ( false , vm.getId ( ) ) ; parameters.setReason ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.getMessage ( AuditLogType.MIGRATION_REASON_HOST_IN_MAINTENANCE ) ) ; return runInternalAction ( VdcActionType.MigrateVm , parameters , createMigrateVmContext ( parentContext , vm ) ) . getSucceeded ( ) ; }
Source:
public void setup ( ) { initVds ( ) ; initConditions ( ) ; updater = new org.ovirt.engine.core.vdsbroker.VdsUpdateRunTimeInfo ( null , vds , org.mockito.Mockito.mock ( org.ovirt.engine.core.vdsbroker.MonitoringStrategy.class ) ) { @ java.lang.Override public org.ovirt.engine.core.dal.dbbroker.DbFacade getDbFacade ( ) { return dbFacade ; } @ java.lang.Override protected void auditLog ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase auditLogable , org.ovirt.engine.core.common.AuditLogType logType ) { org.ovirt.engine.core.common.businessentities.AuditLog al = new org.ovirt.engine.core.common.businessentities.AuditLog ( ) ; al.setlog_type ( logType ) ; mockAuditLogDao.save ( al ) ; } @ java.lang.Override protected java.util.Map [ ] getVmInfo ( java.util.List < java.lang.String > vmsToUpdate ) { return vmInfo ; } } ; }

Target:
protected java.util.List < org.ovirt.engine.core.common.businessentities.VmDynamic > getPoweringUpVms ( ) { return poweringUpVms ; }
Source:
public static < E extends org.ovirt.engine.core.common.businessentities.Nameable > java.util.Map < java.lang.String , E > entitiesByName ( java.util.List < E > entityList ) { if ( entityList != null ) { java.util.Map < java.lang.String , E > map = new java.util.HashMap < java.lang.String , E > ( ) ; for ( E e : entityList ) { map.put ( e.getName ( ) , e ) ; } return map ; } else { return java.util.Collections.emptyMap ( ) ; } }

Target:
public static < E extends org.ovirt.engine.core.common.businessentities.Nameable > java.util.Map < java.lang.String , E > entitiesByName ( java.util.Collection < E > entities ) { if ( entities != null ) { java.util.Map < java.lang.String , E > map = new java.util.HashMap < java.lang.String , E > ( ) ; for ( E e : entities ) { map.put ( e.getName ( ) , e ) ; } return map ; } else { return java.util.Collections.emptyMap ( ) ; } }
Source:
public static org.ovirt.engine.core.common.businessentities.VmDevice addManagedDevice ( org.ovirt.engine.core.common.businessentities.VmDeviceId id , org.ovirt.engine.core.common.businessentities.VmDeviceGeneralType type , org.ovirt.engine.core.common.utils.VmDeviceType device , java.util.Map < java.lang.String , java.lang.Object > specParams , boolean plugged , java.lang.Boolean readOnly , java.lang.String address , java.util.Map < java.lang.String , java.lang.String > customProp ) { org.ovirt.engine.core.common.businessentities.VmDevice managedDevice = org.ovirt.engine.core.bll.utils.VmDeviceUtils.addManagedDevice ( id , type , device , specParams , plugged , readOnly , customProp ) ; if ( org.apache.commons.lang.StringUtils.isNotBlank ( address ) ) { managedDevice.setAddress ( address ) ; } return managedDevice ; }

Target:
public static org.ovirt.engine.core.common.businessentities.VmDevice addInterface ( org.ovirt.engine.core.compat.Guid vmId , org.ovirt.engine.core.compat.Guid deviceId , boolean plugged , boolean hostDev ) { return org.ovirt.engine.core.bll.utils.VmDeviceUtils.addInterface ( vmId , deviceId , plugged , hostDev , null ) ; }
Source:
public static void getClusterListByName ( 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 ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( ( ( "Cluster: name=" + name ) + " sortby name" ) , org.ovirt.engine.core.common.interfaces.SearchType.Cluster ) , aQuery ) ; }

Target:
public static void getPoolById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid poolId ) { 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.GetVmPoolById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( poolId ) , aQuery ) ; }
Source:
public void addAll ( java.util.Collection < ? extends com.google.gwt.user.client.ui.Widget > list , boolean fadeIn ) { animatedPanel.addAll ( list , fadeIn ) ; }

Target:
public void addAll ( java.util.List < org.ovirt.engine.ui.webadmin.section.main.view.popup.host.panels.NetworkPanel > list , boolean fadeIn ) { requiredPanel.add ( requiredTitlePanel ) ; nonRequiredPanel.add ( nonRequiredTitlePanel ) ; for ( org.ovirt.engine.ui.webadmin.section.main.view.popup.host.panels.NetworkPanel networkPanel : list ) { org.ovirt.engine.ui.uicommonweb.models.hosts.network.LogicalNetworkModel networkModel = ( ( org.ovirt.engine.ui.uicommonweb.models.hosts.network.LogicalNetworkModel ) ( networkPanel.getItem ( ) ) ) ; if ( networkModel.getEntity ( ) . isRequired ( ) ) { requiredPanel.add ( networkPanel ) ; } else { nonRequiredPanel.add ( networkPanel ) ; } } animatedPanel.addAll ( unassignNetworksList , fadeIn ) ; }
Source:
public void poll ( ) { if ( vdsManager.isMonitoringNeeded ( ) ) { org.ovirt.engine.core.vdsbroker.VmsListFetcher fetcher = getVmsFetcher ( ) ; long fetchTime = java.lang.System.nanoTime ( ) ; if ( fetcher.fetch ( ) ) { getVmsMonitoring ( fetcher , fetchTime ) . perform ( ) ; } else { org.ovirt.engine.core.vdsbroker.PollVmStatsRefresher.log.info ( "Failed to fetch vms info for host '{}' - skipping VMs monitoring." , vdsManager.getVdsName ( ) ) ; } } }

Target:
public void poll ( ) { if ( vdsManager.isMonitoringNeeded ( ) ) { org.ovirt.engine.core.vdsbroker.VmsListFetcher fetcher = getVmsFetcher ( ) ; long fetchTime = java.lang.System.nanoTime ( ) ; if ( fetcher.fetch ( ) ) { getVmsMonitoring ( fetchTime ) . perform ( fetcher.getChangedVms ( ) ) ; processDevices ( fetcher.getVdsmVms ( ) . stream ( ) . map ( VmInternalData :: getVmDynamic ) , fetchTime ) ; } else { org.ovirt.engine.core.vdsbroker.PollVmStatsRefresher.log.info ( "Failed to fetch vms info for host '{}' - skipping VMs monitoring." , vdsManager.getVdsName ( ) ) ; } } }
Source:
public double getActualDiskSize ( ) { if ( ( ( actualDiskSize ) == 0 ) && ( ( getDiskImageMap ( ) ) != null ) ) { for ( org.ovirt.engine.core.common.businessentities.storage.Disk disk : getDiskImageMap ( ) . values ( ) ) { if ( ( disk.getDiskStorageType ( ) ) == ( org.ovirt.engine.core.common.businessentities.storage.Disk.DiskStorageType.IMAGE ) ) { actualDiskSize += ( ( org.ovirt.engine.core.common.businessentities.DiskImage ) ( disk ) ) . getActualSize ( ) ; } } } return actualDiskSize ; }

Target:
public double getActualDiskSize ( ) { if ( ( ( actualDiskSize ) == 0 ) && ( ( getDiskImageMap ( ) ) != null ) ) { for ( org.ovirt.engine.core.common.businessentities.storage.Disk disk : getDiskImageMap ( ) . values ( ) ) { if ( ( disk.getDiskStorageType ( ) ) == ( org.ovirt.engine.core.common.businessentities.storage.DiskStorageType.IMAGE ) ) { actualDiskSize += ( ( org.ovirt.engine.core.common.businessentities.storage.DiskImage ) ( disk ) ) . getActualSize ( ) ; } } } return actualDiskSize ; }
Source:
public static < F extends java.io.Serializable , B extends org.ovirt.engine.core.common.businessentities.BusinessEntity < F > > java.util.Map < F , B > businessEntitiesById ( java.util.List < B > entityList ) { if ( entityList != null ) { java.util.Map < F , B > map = new java.util.HashMap < F , B > ( ) ; for ( B b : entityList ) { map.put ( b.getId ( ) , b ) ; } return map ; } else { return java.util.Collections.emptyMap ( ) ; } }

Target:
public static < F extends java.io.Serializable , B extends org.ovirt.engine.core.common.businessentities.BusinessEntity < F > > java.util.Map < F , B > businessEntitiesById ( java.util.Collection < B > entities ) { if ( entities != null ) { java.util.Map < F , B > map = new java.util.HashMap < F , B > ( ) ; for ( B b : entities ) { map.put ( b.getId ( ) , b ) ; } return map ; } else { return java.util.Collections.emptyMap ( ) ; } }
Source:
public void testGetEntityNameByIdAndTypeForVM ( ) { org.ovirt.engine.core.common.businessentities.VmStatic vmStatic = dbFacade.getVmStaticDAO ( ) . get ( org.ovirt.engine.core.dao.DbFacadeDAOTest.VM_ID ) ; org.junit.Assert.assertNotNull ( vmStatic ) ; java.lang.String name = vmStatic.getvm_name ( ) ; org.junit.Assert.assertTrue ( name.equals ( dbFacade.getEntityNameByIdAndType ( org.ovirt.engine.core.dao.DbFacadeDAOTest.VM_STATIC_GUID , VdcObjectType.VM ) ) ) ; }

Target:
public void testGetEntityNameByIdAndTypeForVM ( ) { org.ovirt.engine.core.common.businessentities.VmStatic vmStatic = dbFacade.getVmStaticDao ( ) . get ( org.ovirt.engine.core.dao.DbFacadeDAOTest.VM_ID ) ; org.junit.Assert.assertNotNull ( vmStatic ) ; java.lang.String name = vmStatic.getvm_name ( ) ; org.junit.Assert.assertTrue ( name.equals ( dbFacade.getEntityNameByIdAndType ( org.ovirt.engine.core.dao.DbFacadeDAOTest.VM_STATIC_GUID , VdcObjectType.VM ) ) ) ; }
Source:
private void dataCenterWithClusterSelectedItemChanged ( java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { behavior.dataCenterWithClusterSelectedItemChanged ( ) ; org.ovirt.engine.ui.uicommonweb.models.vms.DataCenterWithCluster dataCenterWithCluster = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.DataCenterWithCluster ) ( getDataCenterWithClustersList ( ) . getSelectedItem ( ) ) ) ; if ( ( dataCenterWithCluster != null ) && ( ( dataCenterWithCluster.getDataCenter ( ) ) != null ) ) { getDisksAllocationModel ( ) . setQuotaEnforcementType ( dataCenterWithCluster.getDataCenter ( ) . getQuotaEnforcementType ( ) ) ; } updateMaximalVmMemSize ( ) ; }

Target:
private void dataCenterWithClusterSelectedItemChanged ( java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { behavior.dataCenterWithClusterSelectedItemChanged ( ) ; org.ovirt.engine.ui.uicommonweb.models.vms.DataCenterWithCluster dataCenterWithCluster = getDataCenterWithClustersList ( ) . getSelectedItem ( ) ; if ( ( dataCenterWithCluster != null ) && ( ( dataCenterWithCluster.getDataCenter ( ) ) != null ) ) { getDisksAllocationModel ( ) . setQuotaEnforcementType ( dataCenterWithCluster.getDataCenter ( ) . getQuotaEnforcementType ( ) ) ; } updateMigrationOptions ( ) ; handleQxlClusterLevel ( ) ; updateWatchdogModels ( ) ; updateBootMenu ( ) ; }
Source:
public static void getStorageConnectionById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String id , boolean isRefresh ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( org.ovirt.engine.core.common.businessentities.StorageServerConnections ) ( source ) ) : null ; } } ; org.ovirt.engine.core.common.queries.StorageServerConnectionQueryParametersBase params = new org.ovirt.engine.core.common.queries.StorageServerConnectionQueryParametersBase ( id ) ; params.setRefresh ( isRefresh ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageServerConnectionById , params , aQuery ) ; }

Target:
public static void getClustersHavingHosts ( 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 ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > list = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ) ( source ) ) ; java.util.Collections.sort ( list , new org.ovirt.engine.core.common.businessentities.comparators.NameableComparator ( ) ) ; return list ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllClustersHavingHosts , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }
Source:
private void refresh ( org.ovirt.engine.core.bll.aaa.SessionDataContainer.SessionInfo sessionInfo ) { int softLimitValue = org.ovirt.engine.core.common.config.Config.< java.lang.Integer > getValue ( ConfigValues.UserSessionTimeOutInterval ) ; if ( softLimitValue > 0 ) { sessionInfo.contentOfSession.put ( org.ovirt.engine.core.bll.aaa.SessionDataContainer.SOFT_LIMIT_PARAMETER_NAME , org.apache.commons.lang.time.DateUtils.addMinutes ( new java.util.Date ( ) , softLimitValue ) ) ; } }

Target:
private void refresh ( org.ovirt.engine.core.bll.aaa.SessionDataContainer.SessionInfo sessionInfo ) { int softLimitValue = ( ( java.lang.Integer ) ( sessionInfo.contentOfSession.get ( org.ovirt.engine.core.bll.aaa.SessionDataContainer.SOFT_LIMIT_INTERVAL_PARAMETER_NAME ) ) ) ; if ( softLimitValue > 0 ) { sessionInfo.contentOfSession.put ( org.ovirt.engine.core.bll.aaa.SessionDataContainer.SOFT_LIMIT_PARAMETER_NAME , org.apache.commons.lang.time.DateUtils.addMinutes ( new java.util.Date ( ) , softLimitValue ) ) ; } }
Source:
protected boolean checkNumberOfMonitors ( ) { return true ; }

Target:
protected boolean checkNumberOfMonitors ( ) { java.util.Collection < org.ovirt.engine.core.common.businessentities.GraphicsType > graphicsTypes = org.ovirt.engine.core.bll.VmHandler.getResultingVmGraphics ( org.ovirt.engine.core.bll.utils.VmDeviceUtils.getGraphicsTypesOfEntity ( org.ovirt.engine.core.bll.AddVmCommand.getVmTemplateId ( ) ) , org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . getGraphicsDevices ( ) ) ; int numOfMonitors = org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . getVmStaticData ( ) . getNumOfMonitors ( ) ; return org.ovirt.engine.core.bll.VmHandler.isNumOfMonitorsLegal ( graphicsTypes , numOfMonitors , org.ovirt.engine.core.bll.AddVmCommand.getReturnValue ( ) . getCanDoActionMessages ( ) ) ; }
Source:
private void addQuotaRow ( org.ovirt.engine.ui.userportal.section.main.view.tab.extended.VerticalPanel list , java.lang.String quotaName , org.ovirt.engine.ui.userportal.widget.QuotaProgressBar progressBar ) { org.ovirt.engine.ui.userportal.section.main.view.tab.extended.FlowPanel flowPanel = new org.ovirt.engine.ui.userportal.section.main.view.tab.extended.FlowPanel ( ) ; org.ovirt.engine.ui.userportal.section.main.view.tab.extended.Label quotaNameLabel = new org.ovirt.engine.ui.userportal.section.main.view.tab.extended.Label ( ) ; quotaNameLabel.setText ( quotaName ) ; flowPanel.add ( quotaNameLabel ) ; flowPanel.add ( progressBar ) ; flowPanel.setWidth ( "100%" ) ; list.add ( flowPanel ) ; }

Target:
private void addQuotaRow ( com.google.gwt.user.client.ui.VerticalPanel list , java.lang.String quotaName , org.ovirt.engine.ui.userportal.widget.QuotaProgressBar progressBar ) { com.google.gwt.user.client.ui.FlowPanel flowPanel = new com.google.gwt.user.client.ui.FlowPanel ( ) ; com.google.gwt.user.client.ui.Label quotaNameLabel = new com.google.gwt.user.client.ui.Label ( ) ; quotaNameLabel.setText ( quotaName ) ; quotaNameLabel.setStyleName ( style.quotaNameText ( ) ) ; flowPanel.add ( quotaNameLabel ) ; flowPanel.add ( progressBar ) ; list.add ( flowPanel ) ; }
Source:
private void doTestBadUpdate ( boolean valid , boolean success , java.lang.String detail ) throws java.lang.Exception { setUpGetEntityExpectations ( 1 , getEntity ( 0 ) ) ; setUpGetStorageServerConnectionExpectations ( 1 ) ; setUriInfo ( setUpActionExpectations ( ActionType.UpdateStorageDomain , org.ovirt.engine.core.common.action.StorageDomainManagementParameter.class , new java.lang.String [ ] { } , new java.lang.Object [ ] { } , valid , success ) ) ; try { resource.update ( org.ovirt.engine.api.restapi.resource.BackendStorageDomainsResourceTest.getModel ( 0 ) ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , detail ) ; } }

Target:
private void doTestBadUpdate ( boolean valid , boolean success , java.lang.String detail ) throws java.lang.Exception { setUpGetEntityExpectations ( 1 , getEntity ( 0 ) ) ; setUpGetStorageServerConnectionExpectations ( 1 ) ; setUriInfo ( setUpActionExpectations ( ActionType.UpdateStorageDomain , org.ovirt.engine.core.common.action.StorageDomainManagementParameter.class , new java.lang.String [ ] { } , new java.lang.Object [ ] { } , valid , success ) ) ; try { resource.update ( org.ovirt.engine.api.restapi.resource.BackendStorageDomainsResourceTest.getModel ( 0 ) ) ; org.junit.Assert.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , detail ) ; } }
Source:
public void getHostsForStorageOperation ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , boolean localFsOnly ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { return source ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetHostsForStorageOperation , new org.ovirt.engine.core.common.queries.GetHostsForStorageOperationParameters ( storagePoolId , localFsOnly ) , aQuery ) ; }

Target:
public void countAllTemplates ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmTemplateCount , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }
Source:
protected void sendWarningForNonExportableDisks ( org.ovirt.engine.core.common.businessentities.VM entity ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getVmDiskList ( new org.ovirt.engine.ui.frontend.AsyncQuery ( org.ovirt.engine.ui.uicommonweb.models.vms.VmListModel.getWindow ( ) , new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { final org.ovirt.engine.ui.uicommonweb.models.vms.ExportVmModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.ExportVmModel ) ( target ) ) ; @ java.lang.SuppressWarnings ( value = "unchecked" ) final java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.Disk > vmDisks = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.Disk > ) ( returnValue ) ) ; org.ovirt.engine.ui.uicommonweb.models.vms.VmModelHelper.sendWarningForNonExportableDisks ( model , vmDisks , VmModelHelper.WarningType.VM_EXPORT ) ; } } ) , entity.getId ( ) ) ; }

Target:
private void preSavePhase2 ( ) { final org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel ) ( org.ovirt.engine.ui.uicommonweb.models.vms.VmListModel.getWindow ( ) ) ) ; org.ovirt.engine.ui.uicommonweb.models.EntityModel < java.lang.String > cpuPinning = model.getCpuPinning ( ) ; if ( ( ( ! ( cpuPinning.getIsChangable ( ) ) ) && ( ( cpuPinning.getEntity ( ) ) != null ) ) && ( ! ( cpuPinning.getEntity ( ) . isEmpty ( ) ) ) ) { confirmCpuPinningLost ( ) ; } else { preSavePhase3 ( ) ; } }
Source:
public static void getNextAvailableDiskAliasNameByVMId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid vmId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetNextAvailableDiskAliasNameByVMId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) , aQuery ) ; }

Target:
public void getStorageConnectionsByDataCenterIdAndStorageType ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.common.businessentities.StorageType storageType ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.core.common.queries.GetConnectionsByDataCenterAndStorageTypeParameters params = new org.ovirt.engine.core.common.queries.GetConnectionsByDataCenterAndStorageTypeParameters ( storagePoolId , storageType ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetConnectionsByDataCenterAndStorageType , params , aQuery ) ; }