auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void testGetStorageConnectionNotFound ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpEntityQueryExpectations ( 1 , getIscsiBondContainingStorageConnection ( ) ) ; setUpEntityQueryExpectations ( QueryType.GetStorageServerConnectionById , org.ovirt.engine.core.common.queries.StorageServerConnectionQueryParametersBase.class , new java.lang.String [ ] { "ServerConnectionId" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendIscsiBondStorageConnectionResourceTest.STORAGE_CONNECTION_ID.toString ( ) } , null ) ; try { resource.get ( ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }

Target:
public void testGetStorageConnectionNotFound ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpEntityQueryExpectations ( 1 , getIscsiBondContainingStorageConnection ( ) ) ; setUpEntityQueryExpectations ( QueryType.GetStorageServerConnectionById , org.ovirt.engine.core.common.queries.StorageServerConnectionQueryParametersBase.class , new java.lang.String [ ] { "ServerConnectionId" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendIscsiBondStorageConnectionResourceTest.STORAGE_CONNECTION_ID.toString ( ) } , null ) ; try { resource.get ( ) ; org.junit.Assert.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }
Source:
public void setHostList ( java.util.List < org.ovirt.engine.core.common.businessentities.VDS > hosts ) { final org.ovirt.engine.core.common.businessentities.comparators.LexoNumericComparator lexoNumeric = new org.ovirt.engine.core.common.businessentities.comparators.LexoNumericComparator ( ) ; java.util.Collections.sort ( hosts , new java.util.Comparator < org.ovirt.engine.core.common.businessentities.VDS > ( ) { @ java.lang.Override public int compare ( org.ovirt.engine.core.common.businessentities.VDS host0 , org.ovirt.engine.core.common.businessentities.VDS host1 ) { return lexoNumeric.compare ( host0.getHostName ( ) , host1.getHostName ( ) ) ; } } ) ; getServers ( ) . setItems ( hosts ) ; }

Target:
public void setHostList ( java.util.List < org.ovirt.engine.core.common.businessentities.VDS > hosts ) { java.util.Collections.sort ( hosts , java.util.Comparator.comparing ( VDS :: getHostName , new org.ovirt.engine.core.common.businessentities.comparators.LexoNumericComparator ( ) ) ) ; getServers ( ) . setItems ( hosts ) ; }
Source:
protected void initWidget ( com.google.gwt.user.client.ui.Widget wrapperWidget ) { super . initWidget ( wrapperWidget ) ; org.ovirt.engine.ui.common.widget.editor.generic.Style labelStyle = org.ovirt.engine.ui.common.widget.editor.generic.EntityModelTextBoxOnlyEditor.getLabelElement ( ) . getStyle ( ) ; labelStyle.setDisplay ( org.ovirt.engine.ui.common.widget.editor.generic.com.google.gwt.dom.client.Style ) ; org.ovirt.engine.ui.common.widget.editor.generic.Style panelStyle = org.ovirt.engine.ui.common.widget.editor.generic.EntityModelTextBoxOnlyEditor.getContentWidgetContainer ( ) . getElement ( ) . getStyle ( ) ; panelStyle.setFloat ( org.ovirt.engine.ui.common.widget.editor.generic.com.google.gwt.dom.client.Style ) ; }

Target:
protected void initWidget ( com.google.gwt.user.client.ui.Widget wrapperWidget ) { super . initWidget ( wrapperWidget ) ; org.ovirt.engine.ui.common.widget.editor.generic.EntityModelTextBoxOnlyEditor.getFormLabel ( ) . setVisible ( false ) ; org.ovirt.engine.ui.common.widget.editor.generic.Style panelStyle = org.ovirt.engine.ui.common.widget.editor.generic.EntityModelTextBoxOnlyEditor.getContentWidgetContainer ( ) . getElement ( ) . getStyle ( ) ; panelStyle.setFloat ( org.ovirt.engine.ui.common.widget.editor.generic.com.google.gwt.dom.client.Style ) ; }
Source:
public 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:
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:
public void getDataCenterList ( 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.StoragePool > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( "DataCenter: sortby name" , org.ovirt.engine.core.common.interfaces.SearchType.StoragePool ) , aQuery ) ; }

Target:
public void getClusterById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVdsGroupById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }
Source:
long getLong ( java.lang.String val ) { if ( ( val == null ) || ( ( val.trim ( ) . length ( ) ) == 0 ) ) { return 0 ; } try { return java.lang.Long.valueOf ( val ) ; } catch ( java.lang.Exception e ) { return 0 ; } }

Target:
public java.util.ArrayList getStorageDelay ( ) { return storageDelay ; }
Source:
private java.lang.Runnable handshake ( ) throws java.io.IOException { if ( ! ( handshakeInProgress ( ) ) ) { return null ; } final javax.net.ssl.SSLEngineResult.HandshakeStatus hs = this . engine.getHandshakeStatus ( ) ; switch ( hs ) { case NEED_UNWRAP : this . read ( appPeerBuffer ) ; return null ; case NEED_WRAP : this . write ( appBuffer ) ; return null ; case NEED_TASK : return engine.getDelegatedTask ( ) ; } return null ; }

Target:
public java.lang.Runnable process ( ) throws java.io.IOException { if ( ! ( handshakeInProgress ( ) ) ) { if ( ( this . callback ) != null ) { this . callback.checkAndExecute ( ) ; } return null ; } final javax.net.ssl.SSLEngineResult.HandshakeStatus hs = this . engine.getHandshakeStatus ( ) ; switch ( hs ) { case NEED_UNWRAP : this . read ( appPeerBuffer ) ; return null ; case NEED_WRAP : this . write ( appBuffer ) ; return null ; case NEED_TASK : return engine.getDelegatedTask ( ) ; } return null ; }
Source:
public org.ovirt.engine.core.common.businessentities.DbUser addUserToThreadContext ( java.lang.String sessionId , boolean refresh ) { org.ovirt.engine.core.common.businessentities.DbUser dbUser = org.ovirt.engine.core.utils.ThreadLocalParamsContainer.getUser ( ) ; if ( dbUser == null ) { if ( ! ( org.apache.commons.lang.StringUtils.isEmpty ( sessionId ) ) ) { dbUser = getUser ( sessionId , refresh ) ; org.ovirt.engine.core.utils.ThreadLocalParamsContainer.setHttpSessionId ( sessionId ) ; } else { dbUser = getUser ( refresh ) ; } org.ovirt.engine.core.utils.ThreadLocalParamsContainer.setUser ( dbUser ) ; } return dbUser ; }

Target:
public void setPrincipal ( java.lang.String sessionId , java.lang.String principal ) { setData ( sessionId , org.ovirt.engine.core.bll.session.SessionDataContainer.PRINCIPAL_PARAMETER_NAME , principal ) ; }
Source:
public com.google.gwt.resources.client.ImageResource getValue ( org.ovirt.engine.core.common.businessentities.Snapshot snapshot ) { switch ( snapshot.getStatus ( ) ) { case OK : return getCommonResources ( ) . snapshotImage ( ) ; case LOCKED : return getCommonResources ( ) . waitImage ( ) ; case IN_PREVIEW : return getCommonResources ( ) . snapshotImage ( ) ; default : return getCommonResources ( ) . snapshotImage ( ) ; } }

Target:
public com.google.gwt.resources.client.ImageResource getValue ( org.ovirt.engine.core.common.businessentities.Snapshot snapshot ) { setEnumTitle ( snapshot.getStatus ( ) ) ; switch ( snapshot.getStatus ( ) ) { case OK : return getCommonResources ( ) . snapshotImage ( ) ; case LOCKED : return getCommonResources ( ) . waitImage ( ) ; case IN_PREVIEW : return getCommonResources ( ) . snapshotImage ( ) ; default : return getCommonResources ( ) . snapshotImage ( ) ; } }
Source:
public void stringPropertiesSyntax ( ) { org.ovirt.engine.core.utils.customprop.CustomPropertiesUtils utils = new org.ovirt.engine.core.utils.customprop.CustomPropertiesUtils ( ) ; org.junit.Assert.assertTrue ( "Invalid key/value delimiter" , utils.syntaxErrorInProperties ( "speed:1024;duplex=full" ) ) ; org.junit.Assert.assertTrue ( "Missing key/value delimiter" , utils.syntaxErrorInProperties ( "speed=1024;duplex" ) ) ; org.junit.Assert.assertTrue ( "Invalid key character" , utils.syntaxErrorInProperties ( "spe*ed=1024;duplex=full" ) ) ; org.junit.Assert.assertTrue ( "Invalid value character" , utils.syntaxErrorInProperties ( "speed=1024;duplex=fu;ll" ) ) ; }

Target:
public void stringPropertiesSyntax ( ) { org.ovirt.engine.core.common.utils.customprop.CustomPropertiesUtils utils = new org.ovirt.engine.core.common.utils.customprop.CustomPropertiesUtils ( ) ; org.junit.Assert.assertTrue ( "Invalid key/value delimiter" , utils.syntaxErrorInProperties ( "speed:1024;duplex=full" ) ) ; org.junit.Assert.assertTrue ( "Missing key/value delimiter" , utils.syntaxErrorInProperties ( "speed=1024;duplex" ) ) ; org.junit.Assert.assertTrue ( "Invalid key character" , utils.syntaxErrorInProperties ( "spe*ed=1024;duplex=full" ) ) ; org.junit.Assert.assertTrue ( "Invalid value character" , utils.syntaxErrorInProperties ( "speed=1024;duplex=fu;ll" ) ) ; }
Source:
public static int GetDiskMaxSize ( ) { org.ovirt.engine.core.common.queries.VdcQueryReturnValue returnValue = org.ovirt.engine.ui.uicommonweb.DataProvider.GetConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.MaxDiskSize ) ) ; if ( ( ( returnValue != null ) && ( returnValue.getSucceeded ( ) ) ) && ( ( returnValue.getReturnValue ( ) ) != null ) ) { return ( ( java.lang.Integer ) ( returnValue.getReturnValue ( ) ) ) ; } return 2047 ; }

Target:
public static int GetDiskMaxSize ( ) { org.ovirt.engine.core.common.queries.VdcQueryReturnValue returnValue = org.ovirt.engine.ui.uicommonweb.DataProvider.GetConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.MaxBlockDiskSize ) ) ; if ( ( ( returnValue != null ) && ( returnValue.getSucceeded ( ) ) ) && ( ( returnValue.getReturnValue ( ) ) != null ) ) { return ( ( java.lang.Integer ) ( returnValue.getReturnValue ( ) ) ) ; } return 2047 ; }
Source:
protected boolean validateSpaceRequirements ( ) { for ( java.util.Map.Entry < org.ovirt.engine.core.compat.Guid , java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > > sdImageEntry : storageToDisksMap.entrySet ( ) ) { org.ovirt.engine.core.common.businessentities.StorageDomain destStorageDomain = destStorages.get ( sdImageEntry.getKey ( ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > disksList = sdImageEntry.getValue ( ) ; org.ovirt.engine.core.bll.validator.StorageDomainValidator storageDomainValidator = createStorageDomainValidator ( destStorageDomain ) ; if ( ( ! ( validateDomainsThreshold ( storageDomainValidator ) ) ) || ( ! ( validateFreeSpace ( storageDomainValidator , disksList ) ) ) ) { return false ; } } return true ; }

Target:
protected boolean validateSpaceRequirements ( ) { for ( java.util.Map.Entry < org.ovirt.engine.core.compat.Guid , java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > > sdImageEntry : storageToDisksMap.entrySet ( ) ) { org.ovirt.engine.core.common.businessentities.StorageDomain destStorageDomain = destStorages.get ( sdImageEntry.getKey ( ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > disksList = sdImageEntry.getValue ( ) ; org.ovirt.engine.core.bll.validator.storage.StorageDomainValidator storageDomainValidator = createStorageDomainValidator ( destStorageDomain ) ; if ( ( ! ( validateDomainsThreshold ( storageDomainValidator ) ) ) || ( ! ( validateFreeSpace ( storageDomainValidator , disksList ) ) ) ) { return false ; } } return true ; }
Source:
protected void init ( ) { super . init ( ) ; resource.getParent ( ) . backend = backend ; resource.getParent ( ) . sessionHelper = sessionHelper ; resource.getParent ( ) . mappingLocator = resource.mappingLocator ; }

Target:
protected void init ( ) { super . init ( ) ; resource.getParent ( ) . backend = backend ; resource.getParent ( ) . sessionHelper = sessionHelper ; resource.getParent ( ) . mappingLocator = resource.mappingLocator ; resource.getParent ( ) . httpHeaders = httpHeaders ; }
Source:
public org.ovirt.engine.core.vdsbroker.irsbroker.OneUuidReturnForXmlRpc glusterVolumeCreate ( java.lang.String volumeName , java.lang.String [ ] brickList , int replicaCount , int stripeCount , java.lang.String [ ] transportList ) { try { return new org.ovirt.engine.core.vdsbroker.irsbroker.OneUuidReturnForXmlRpc ( vdsServer.glusterVolumeCreate ( volumeName , brickList , replicaCount , stripeCount , transportList ) ) ; } 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 isolateVolume ( java.lang.String sdUUID , java.lang.String srcImageID , java.lang.String dstImageID , java.lang.String volumeID ) { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.isolateVolume ( sdUUID , srcImageID , dstImageID , volumeID ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; }
Source:
public void shouldCreateAsMuchNumaNodesAsVirtualCores ( ) { vm.setNumOfSockets ( 1 ) ; vm.setCpuPerSocket ( 2 ) ; assertTrue ( org.ovirt.engine.core.bll.numa.vm.NumaValidator.checkVmNumaNodesIntegrity ( vm , vm.getvNumaNodeList ( ) ) . isValid ( ) ) ; }

Target:
public void shouldDetectSufficientMemory ( ) { vm.setNumaTuneMode ( NumaTuneMode.STRICT ) ; vmNumaNodes.get ( 0 ) . setMemTotal ( 1000 ) ; vdsNumaNodes.get ( 0 ) . setMemTotal ( 2000 ) ; org.junit.Assert.assertTrue ( org.ovirt.engine.core.bll.numa.vm.NumaValidator.checkVmNumaNodesIntegrity ( vm , vm.getvNumaNodeList ( ) ) . isValid ( ) ) ; }
Source:
public static void getVmSnapshotList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Snapshot > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Snapshot > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllVmSnapshotsByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }

Target:
public static void getVmConfigurationBySnapshot ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid snapshotSourceId ) { 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.VM ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmConfigurationBySnapshot , new org.ovirt.engine.core.common.queries.IdQueryParameters ( snapshotSourceId ) . withoutRefresh ( ) , aQuery ) ; }
Source:
public void onRemoval ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomainStatic > domainStaticEntries = getDbFacade ( ) . getStorageDomainStaticDao ( ) . getAllByStorage ( provider.getId ( ) . toString ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.StorageDomainStatic domainStaticEntry : domainStaticEntries ) { getDbFacade ( ) . getStorageDomainDynamicDao ( ) . remove ( domainStaticEntry.getId ( ) ) ; getDbFacade ( ) . getStorageDomainStaticDao ( ) . remove ( domainStaticEntry.getId ( ) ) ; } }

Target:
public java.util.Map < java.lang.String , java.lang.String > getUploadHeaders ( ) { java.util.Map < java.lang.String , java.lang.String > httpHeaders = getDownloadHeaders ( ) ; httpHeaders.put ( "Content-Type" , "application/octet-stream" ) ; return httpHeaders ; }
Source:
protected void copyVmDevices ( ) { org.ovirt.engine.core.bll.utils.VmDeviceUtils.copyVmDevices ( getVmIdFromSnapshot ( ) , org.ovirt.engine.core.bll.AddVmFromSnapshotCommand.getVmId ( ) , newDiskImages , _vmInterfaces ) ; }

Target:
protected void copyVmDevices ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > devices = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmDevice > ( vmFromConfiguration.getVmUnamagedDeviceList ( ) ) ; devices.addAll ( vmFromConfiguration.getManagedVmDeviceMap ( ) . values ( ) ) ; org.ovirt.engine.core.bll.utils.VmDeviceUtils.copyVmDevices ( getVmIdFromSnapshot ( ) , org.ovirt.engine.core.bll.AddVmFromSnapshotCommand.getVmId ( ) , vmFromConfiguration , vmFromConfiguration.getStaticData ( ) , true , devices , newDiskImages , _vmInterfaces ) ; }
Source:
public org.ovirt.engine.ui.common.presenter.AbstractModelBoundPopupPresenterWidget < ? extends org.ovirt.engine.ui.uicommonweb.models.Model , ? > getModelPopup ( org.ovirt.engine.ui.uicommonweb.models.configure.PermissionListModel source , org.ovirt.engine.ui.uicommonweb.UICommand lastExecutedCommand , org.ovirt.engine.ui.uicommonweb.models.Model windowModel ) { if ( lastExecutedCommand == ( getModel ( ) . getAddCommand ( ) ) ) { return popupProvider.get ( ) ; } else { return super . getModelPopup ( source , lastExecutedCommand , windowModel ) ; } }

Target:
public org.ovirt.engine.ui.common.presenter.AbstractModelBoundPopupPresenterWidget < ? extends org.ovirt.engine.ui.uicommonweb.models.Model , ? > getModelPopup ( org.ovirt.engine.ui.uicommonweb.models.gluster.GlusterVolumeSnapshotListModel source , org.ovirt.engine.ui.uicommonweb.UICommand lastExecutedCommand , org.ovirt.engine.ui.uicommonweb.models.Model windowModel ) { if ( lastExecutedCommand == ( getModel ( ) . getCreateSnapshotCommand ( ) ) ) { return snapshotPopupProvider.get ( ) ; } else if ( lastExecutedCommand == ( getModel ( ) . getEditSnapshotScheduleCommand ( ) ) ) { return snapshotPopupProvider.get ( ) ; } return super . getModelPopup ( source , lastExecutedCommand , windowModel ) ; }
Source:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel ) ( target ) ) ; org.ovirt.engine.core.common.businessentities.VmTemplate template = ( ( org.ovirt.engine.core.common.businessentities.VmTemplate ) ( returnValue ) ) ; if ( useLatest ) { template = new org.ovirt.engine.ui.uicommonweb.models.templates.LatestVmTemplate ( template ) ; } setupBaseTemplate ( template.getBaseTemplateId ( ) ) ; model.getTemplate ( ) . setItems ( java.util.Collections.singletonList ( template ) ) ; model.getTemplate ( ) . setSelectedItem ( template ) ; model.getTemplate ( ) . setIsChangable ( false ) ; }

Target:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmTemplate > templatesChain = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmTemplate > ( ( ( java.util.List < org.ovirt.engine.core.common.businessentities.VmTemplate > ) ( returnValue ) ) ) ; initTemplateWithVersion ( templatesChain , templateId , useLatest ) ; }
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.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 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 ) ; }
Source:
public java.lang.String render ( org.ovirt.engine.core.compat.Version version ) { java.lang.String formattedVersion = org.ovirt.engine.ui.uicommonweb.Extensions.GetFriendlyVersion ( version ) . toString ( ) ; return new org.ovirt.engine.ui.common.widget.renderer.EmptyValueRenderer < java.lang.String > ( org.ovirt.engine.ui.webadmin.gin.ClientGinjectorProvider.instance ( ) . getApplicationConstants ( ) . unAvailablePropertyLabel ( ) ) . render ( formattedVersion ) ; }

Target:
public java.lang.String render ( org.ovirt.engine.core.compat.Version version ) { java.lang.String formattedVersion ; if ( version instanceof org.ovirt.engine.core.compat.RpmVersion ) { formattedVersion = ( ( org.ovirt.engine.core.compat.RpmVersion ) ( version ) ) . getRpmName ( ) ; } else { formattedVersion = org.ovirt.engine.ui.uicommonweb.Extensions.GetFriendlyVersion ( version ) . toString ( ) ; } return new org.ovirt.engine.ui.common.widget.renderer.EmptyValueRenderer < java.lang.String > ( org.ovirt.engine.ui.webadmin.gin.ClientGinjectorProvider.instance ( ) . getApplicationConstants ( ) . unAvailablePropertyLabel ( ) ) . render ( formattedVersion ) ; }
Source:
public static void getAllDataCenterNetworks ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId ) { 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.network.Network > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.Network > ( ) ; } } ; org.ovirt.engine.core.common.queries.IdQueryParameters params = new org.ovirt.engine.core.common.queries.IdQueryParameters ( storagePoolId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetNetworksByDataCenterId , params , aQuery ) ; }

Target:
public static void getVmConfigurationBySnapshot ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid snapshotSourceId ) { 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.VM ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmConfigurationBySnapshot , new org.ovirt.engine.core.common.queries.IdQueryParameters ( snapshotSourceId ) . withoutRefresh ( ) , aQuery ) ; }
Source:
private boolean runVm ( org.ovirt.engine.core.compat.Guid vmId , org.ovirt.engine.core.utils.lock.EngineLock lock ) { boolean succeeded = org.ovirt.engine.core.bll.Backend.getInstance ( ) . runInternalAction ( VdcActionType.RunVm , new org.ovirt.engine.core.common.action.RunVmParams ( vmId ) , org.ovirt.engine.core.bll.job.ExecutionHandler.createInternalJobContext ( lock ) ) . getSucceeded ( ) ; if ( ! succeeded ) { final org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase event = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; event.setVmId ( vmId ) ; org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.log ( event , AuditLogType.HA_VM_RESTART_FAILED ) ; } return succeeded ; }

Target:
private void logFailedAttemptToRestartHighlyAvailableVm ( org.ovirt.engine.core.compat.Guid vmId ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase event = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; event.setVmId ( vmId ) ; org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.log ( event , AuditLogType.HA_VM_RESTART_FAILED ) ; }
Source:
public static void getStorageDomainById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storageDomainId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( org.ovirt.engine.core.common.businessentities.StorageDomain ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageDomainById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( storageDomainId ) , aQuery ) ; }

Target:
public static void getRoleList ( 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.Role > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Role > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllRoles , new org.ovirt.engine.core.common.queries.MultilevelAdministrationsQueriesParameters ( ) , aQuery ) ; }
Source:
public int hashCode ( ) { return java.util.Objects.hash ( id , compatVersion , compatibilityVersion , cpuName , description , maxVdsMemoryOverCommit , countThreadsAsCores , migrateOnError , name , storagePoolId , storagePoolName , transparentHugepages , virtService , glusterService , glusterCliBasedSchedulingOn , tunnelMigration , emulatedMachine , trustedService , haReservation , clusterPolicyName , clusterPolicyProperties , requiredRngSources , enableKsm , enableBallooning , optimizationType , serialNumberPolicy , customSerialNumber , groupHostsAndVms , fencingPolicy , autoConverge , migrateCompressed , glusterTunedProfile , addtionalFeaturesSupported , maintenanceReasonRequired , ksmMergeAcrossNumaNodes ) ; }

Target:
public int hashCode ( ) { return java.util.Objects.hash ( id , compatVersion , compatibilityVersion , cpuName , description , maxVdsMemoryOverCommit , countThreadsAsCores , migrateOnError , name , storagePoolId , storagePoolName , transparentHugepages , virtService , glusterService , glusterCliBasedSchedulingOn , tunnelMigration , emulatedMachine , trustedService , haReservation , clusterPolicyName , clusterPolicyProperties , requiredRngSources , enableKsm , enableBallooning , optimizationType , serialNumberPolicy , customSerialNumber , groupHostsAndVms , fencingPolicy , autoConverge , migrateCompressed , glusterTunedProfile , addtionalFeaturesSupported , maintenanceReasonRequired , ksmMergeAcrossNumaNodes , customMigrationNetworkBandwidth , migrationBandwidthLimitType ) ; }
Source:
protected void teardown ( ) { if ( ( org.ovirt.engine.core.bll.pm.StopVdsCommand.getParameters ( ) . getKeepPolicyPMEnabled ( ) ) == false ) { org.ovirt.engine.core.bll.pm.StopVdsCommand.getVds ( ) . setPowerManagementControlledByPolicy ( false ) ; org.ovirt.engine.core.bll.pm.StopVdsCommand.getDbFacade ( ) . getVdsDynamicDao ( ) . updateVdsDynamicPowerManagementPolicyFlag ( org.ovirt.engine.core.bll.pm.StopVdsCommand.getVdsId ( ) , org.ovirt.engine.core.bll.pm.StopVdsCommand.getVds ( ) . getDynamicData ( ) . isPowerManagementControlledByPolicy ( ) ) ; } }

Target:
protected void teardown ( ) { if ( ( org.ovirt.engine.core.bll.pm.StopVdsCommand.getParameters ( ) . getKeepPolicyPMEnabled ( ) ) == false ) { org.ovirt.engine.core.bll.pm.StopVdsCommand.getVds ( ) . setPowerManagementControlledByPolicy ( false ) ; vdsDynamicDao.updateVdsDynamicPowerManagementPolicyFlag ( org.ovirt.engine.core.bll.pm.StopVdsCommand.getVdsId ( ) , org.ovirt.engine.core.bll.pm.StopVdsCommand.getVds ( ) . getDynamicData ( ) . isPowerManagementControlledByPolicy ( ) ) ; } }
Source:
public javax.ws.rs.core.Response toResponse ( org.jboss.resteasy.plugins.providers.jaxb.JAXBMarshalException ex ) { try { org.ovirt.engine.api.model.Fault fault = new org.ovirt.engine.api.model.Fault ( ) ; fault.setReason ( "Bad Request" ) ; fault.setDetail ( ex.getCause ( ) . getMessage ( ) ) ; return javax.ws.rs.core.Response.status ( Status.BAD_REQUEST ) . entity ( fault ) . build ( ) ; } catch ( java.lang.Exception e ) { throw new javax.ws.rs.WebApplicationException ( e , javax.ws.rs.core.Response.status ( Status.INTERNAL_SERVER_ERROR ) . build ( ) ) ; } }

Target:
public javax.ws.rs.core.Response toResponse ( org.jboss.resteasy.plugins.providers.jaxb.JAXBMarshalException ex ) { try { return javax.ws.rs.core.Response.status ( Status.BAD_REQUEST ) . entity ( new org.ovirt.engine.api.restapi.resource.validation.UsageFinder ( ) . getUsageMessage ( application , uriInfo , request ) ) . build ( ) ; } catch ( java.lang.Exception e ) { throw new javax.ws.rs.WebApplicationException ( e , javax.ws.rs.core.Response.status ( Response.Status.INTERNAL_SERVER_ERROR ) . build ( ) ) ; } }
Source:
public void changeProtocolNotAllowed ( ) { org.mockito.Mockito.when ( oldHost.getProtocol ( ) ) . thenReturn ( VdsProtocol.XML ) ; org.mockito.Mockito.when ( host.getProtocol ( ) ) . thenReturn ( VdsProtocol.STOMP ) ; org.mockito.Mockito.when ( oldHost.getStatus ( ) ) . thenReturn ( VDSStatus.Up ) ; org.junit.Assert.assertThat ( validator.changeProtocolAllowed ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( VdcBllMessages.VDS_STATUS_NOT_VALID_FOR_UPDATE ) ) ; }

Target:
public void changeProtocolNotAllowed ( ) { org.mockito.Mockito.when ( oldHost.getProtocol ( ) ) . thenReturn ( VdsProtocol.XML ) ; org.mockito.Mockito.when ( host.getProtocol ( ) ) . thenReturn ( VdsProtocol.STOMP ) ; org.mockito.Mockito.when ( oldHost.getStatus ( ) ) . thenReturn ( VDSStatus.Up ) ; org.junit.Assert.assertThat ( validator.changeProtocolAllowed ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.VDS_STATUS_NOT_VALID_FOR_UPDATE ) ) ; }
Source:
private void localize ( org.ovirt.engine.ui.webadmin.ApplicationConstants constants ) { nameEditor.setLabel ( constants.RoleNameLabel ( ) ) ; descriptionEditor.setLabel ( constants.RoleDescriptionLabel ( ) ) ; accountTypeLabel.setText ( constants.RoleAccount_TypeLabel ( ) ) ; userRadioButtonEditor.setText ( constants.RoleUserLabel ( ) ) ; adminRadioButtonEditor.setText ( constants.RoleAdminLabel ( ) ) ; explanationLabel.setText ( constants.RoleCheckBoxes ( ) ) ; expandAllButton.setText ( constants.RoleExpand_AllLabel ( ) ) ; collapseAllButton.setText ( constants.RoleCollapse_AllLabel ( ) ) ; }

Target:
private void localize ( ) { nameEditor.setLabel ( org.ovirt.engine.ui.webadmin.section.main.view.popup.configure.RolePopupView.constants.RoleNameLabel ( ) ) ; descriptionEditor.setLabel ( org.ovirt.engine.ui.webadmin.section.main.view.popup.configure.RolePopupView.constants.RoleDescriptionLabel ( ) ) ; accountTypeLabel.setText ( org.ovirt.engine.ui.webadmin.section.main.view.popup.configure.RolePopupView.constants.RoleAccount_TypeLabel ( ) ) ; userRadioButtonEditor.setText ( org.ovirt.engine.ui.webadmin.section.main.view.popup.configure.RolePopupView.constants.RoleUserLabel ( ) ) ; adminRadioButtonEditor.setText ( org.ovirt.engine.ui.webadmin.section.main.view.popup.configure.RolePopupView.constants.RoleAdminLabel ( ) ) ; explanationLabel.setText ( org.ovirt.engine.ui.webadmin.section.main.view.popup.configure.RolePopupView.constants.RoleCheckBoxes ( ) ) ; expandAllButton.setText ( org.ovirt.engine.ui.webadmin.section.main.view.popup.configure.RolePopupView.constants.RoleExpand_AllLabel ( ) ) ; collapseAllButton.setText ( org.ovirt.engine.ui.webadmin.section.main.view.popup.configure.RolePopupView.constants.RoleCollapse_AllLabel ( ) ) ; }
Source:
public void getTemplateDiskList ( 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 ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmTemplatesDisks , new org.ovirt.engine.core.common.queries.IdQueryParameters ( templateId ) , aQuery ) ; }

Target:
public void getTemplateDiskList ( 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 ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.DiskImage > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmTemplatesDisks , new org.ovirt.engine.core.common.queries.IdQueryParameters ( templateId ) , aQuery ) ; }
Source:
public static java.lang.Integer getSizeOfMemoryDeviceMb ( org.ovirt.engine.core.common.businessentities.VmDevice memoryDevice ) { if ( ( memoryDevice.getType ( ) ) != ( org.ovirt.engine.core.common.businessentities.VmDeviceGeneralType.MEMORY ) ) { throw new java.lang.RuntimeException ( ( ( ( "Memory device expected but device " + memoryDevice ) + " passed of type " ) + ( memoryDevice.getType ( ) ) ) ) ; } return ( ( java.lang.Integer ) ( memoryDevice.getSpecParams ( ) . get ( org.ovirt.engine.core.common.utils.VmDeviceCommonUtils.SPEC_PARAM_SIZE ) ) ) ; }

Target:
public static java.util.Optional < java.lang.Integer > getSizeOfMemoryDeviceMb ( org.ovirt.engine.core.common.businessentities.VmDevice memoryDevice ) { if ( ! ( org.ovirt.engine.core.common.utils.VmDeviceCommonUtils.isMemory ( memoryDevice ) ) ) { throw new java.lang.RuntimeException ( ( ( ( "Memory device expected but device " + memoryDevice ) + " passed of type " ) + ( memoryDevice.getType ( ) ) ) ) ; } return org.ovirt.engine.core.common.utils.VmDeviceCommonUtils.getSpecParamsIntValue ( memoryDevice , org.ovirt.engine.core.common.utils.VmDeviceCommonUtils.SPEC_PARAM_SIZE ) ; }
Source:
protected void ExecuteVdsBrokerCommand ( ) { status = org.ovirt.engine.core.vdsbroker.gluster.DisableGlusterHookVDSCommand.getBroker ( ) . glusterHookDisable ( org.ovirt.engine.core.vdsbroker.gluster.DisableGlusterHookVDSCommand.getParameters ( ) . getGlusterCommand ( ) , org.ovirt.engine.core.vdsbroker.gluster.DisableGlusterHookVDSCommand.getParameters ( ) . getHookStage ( ) . toString ( ) , org.ovirt.engine.core.vdsbroker.gluster.DisableGlusterHookVDSCommand.getParameters ( ) . getHookName ( ) ) ; org.ovirt.engine.core.vdsbroker.gluster.DisableGlusterHookVDSCommand.proceedProxyReturnValue ( ) ; }

Target:
protected void executeVdsBrokerCommand ( ) { status = org.ovirt.engine.core.vdsbroker.gluster.DisableGlusterHookVDSCommand.getBroker ( ) . glusterHookDisable ( org.ovirt.engine.core.vdsbroker.gluster.DisableGlusterHookVDSCommand.getParameters ( ) . getGlusterCommand ( ) , org.ovirt.engine.core.vdsbroker.gluster.DisableGlusterHookVDSCommand.getParameters ( ) . getHookStage ( ) . toString ( ) , org.ovirt.engine.core.vdsbroker.gluster.DisableGlusterHookVDSCommand.getParameters ( ) . getHookName ( ) ) ; org.ovirt.engine.core.vdsbroker.gluster.DisableGlusterHookVDSCommand.proceedProxyReturnValue ( ) ; }
Source:
public int hashCode ( ) { int result = ( ( icon ) != null ) ? icon.hashCode ( ) : 0 ; result = ( 31 * result ) + ( ( osDefaultIcon ) != null ? osDefaultIcon.hashCode ( ) : 0 ) ; result = ( 31 * result ) + ( ( smallIconId ) != null ? smallIconId.hashCode ( ) : 0 ) ; return result ; }

Target:
public void onSuccess ( java.lang.String currentOsDefaultIcon ) { final org.ovirt.engine.ui.uicommonweb.models.vms.IconWithOsDefault newInstance = ( isCustom ( ) ) ? new org.ovirt.engine.ui.uicommonweb.models.vms.IconWithOsDefault ( icon , currentOsDefaultIcon , smallIconId , validationResult ) : new org.ovirt.engine.ui.uicommonweb.models.vms.IconWithOsDefault ( currentOsDefaultIcon , currentOsDefaultIcon , osDefaultSmallIconId , org.ovirt.engine.ui.uicommonweb.validation.ValidationResult.ok ( ) ) ; callback.onCreated ( newInstance ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeSnapshotCreateReturnForXmlRpc glusterSnapshotCreate ( java.lang.String volumeName , java.lang.String snapshotName , java.lang.String description , boolean force ) { try { return new org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeSnapshotCreateReturnForXmlRpc ( vdsServer.glusterSnapshotCreate ( volumeName , snapshotName , description , force ) ) ; } 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 add_image_ticket ( java.lang.String ticketId , java.lang.String [ ] ops , long timeout , long size , java.lang.String url ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.add_image_ticket ( ticketId , ops , timeout , size , url ) ; 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 void eventRaised ( org.ovirt.engine.core.compat.Event ev , java.lang.Object sender , org.ovirt.engine.core.compat.EventArgs args ) { org.ovirt.engine.ui.frontend.FrontendFailureEventArgs failureArgs = ( ( org.ovirt.engine.ui.frontend.FrontendFailureEventArgs ) ( args ) ) ; if ( ( failureArgs.getMessage ( ) ) != null ) { errorPopupManager.show ( org.ovirt.engine.ui.common.uicommon.FrontendFailureEventListener.MESSAGES.uiCommonFrontendFailure ( org.ovirt.engine.ui.common.uicommon.ErrorMessageFormatter.formatMessage ( failureArgs.getMessage ( ) ) ) ) ; } else if ( ( failureArgs.getMessages ( ) ) != null ) { errorPopupManager.show ( org.ovirt.engine.ui.common.uicommon.FrontendFailureEventListener.MESSAGES.uiCommonFrontendFailure ( org.ovirt.engine.ui.common.uicommon.ErrorMessageFormatter.formatMessages ( failureArgs.getMessages ( ) ) ) ) ; } }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { org.ovirt.engine.ui.frontend.FrontendFailureEventArgs failureArgs = ( ( org.ovirt.engine.ui.frontend.FrontendFailureEventArgs ) ( args ) ) ; if ( ( failureArgs.getMessage ( ) ) != null ) { errorPopupManager.show ( org.ovirt.engine.ui.common.uicommon.FrontendFailureEventListener.MESSAGES.uiCommonRunActionFailed ( org.ovirt.engine.ui.common.uicommon.ErrorMessageFormatter.formatMessage ( failureArgs.getMessage ( ) ) ) ) ; } else if ( ( failureArgs.getMessages ( ) ) != null ) { errorPopupManager.show ( org.ovirt.engine.ui.common.uicommon.FrontendFailureEventListener.MESSAGES.uiCommonRunActionFailed ( org.ovirt.engine.ui.common.uicommon.ErrorMessageFormatter.formatMessages ( failureArgs.getMessages ( ) ) ) ) ; } }
Source:
public void Executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { org.ovirt.engine.ui.uicommonweb.models.storage.StorageListModel storageListModel = ( ( org.ovirt.engine.ui.uicommonweb.models.storage.StorageListModel ) ( result.getState ( ) ) ) ; org.ovirt.engine.core.common.action.VdcReturnValueBase vdcReturnValueBase = result.getReturnValue ( ) ; storageListModel.storageDomain.setstorage ( ( ( java.lang.String ) ( vdcReturnValueBase.getActionReturnValue ( ) ) ) ) ; }

Target:
public void Executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { org.ovirt.engine.ui.uicommonweb.models.storage.StorageListModel storageListModel = ( ( org.ovirt.engine.ui.uicommonweb.models.storage.StorageListModel ) ( result.getState ( ) ) ) ; storageListModel.CleanConnection ( storageListModel.connection , storageListModel.hostId ) ; storageListModel.OnFinish ( storageListModel.context , false , storageListModel.storageModel ) ; }
Source:
public double getActualDiskWithSnapshotsSize ( ) { if ( ( ( _actualDiskWithSnapthotsSize ) == 0 ) && ( ( getDiskMap ( ) ) != null ) ) { for ( org.ovirt.engine.core.common.businessentities.storage.Disk disk : getDiskMap ( ) . values ( ) ) { if ( ( org.ovirt.engine.core.common.businessentities.storage.Disk.DiskStorageType.IMAGE ) == ( disk.getDiskStorageType ( ) ) ) { _actualDiskWithSnapthotsSize += ( ( org.ovirt.engine.core.common.businessentities.DiskImage ) ( disk ) ) . getActualDiskWithSnapshotsSize ( ) ; } } } return _actualDiskWithSnapthotsSize ; }

Target:
public double getActualDiskWithSnapshotsSize ( ) { if ( ( ( _actualDiskWithSnapthotsSize ) == 0 ) && ( ( getDiskMap ( ) ) != null ) ) { for ( org.ovirt.engine.core.common.businessentities.storage.Disk disk : getDiskMap ( ) . values ( ) ) { if ( ( org.ovirt.engine.core.common.businessentities.storage.DiskStorageType.IMAGE ) == ( disk.getDiskStorageType ( ) ) ) { _actualDiskWithSnapthotsSize += ( ( org.ovirt.engine.core.common.businessentities.storage.DiskImage ) ( disk ) ) . getActualDiskWithSnapshotsSize ( ) ; } } } return _actualDiskWithSnapthotsSize ; }
Source:
private static void addSoundCard ( org.ovirt.engine.core.common.businessentities.VmBase vmBase , org.ovirt.engine.core.compat.Version vdsGroupCompatibilityVersion ) { java.lang.String soundDevice = OsRepositoryImpl.INSTANCE.getSoundDevice ( vmBase.getOsId ( ) , vdsGroupCompatibilityVersion ) ; org.ovirt.engine.core.bll.utils.VmDeviceUtils.addManagedDevice ( new org.ovirt.engine.core.common.businessentities.VmDeviceId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , vmBase.getId ( ) ) , VmDeviceGeneralType.SOUND , org.ovirt.engine.core.common.utils.VmDeviceType.getSoundDeviceType ( soundDevice ) , new java.util.HashMap < java.lang.String , java.lang.Object > ( ) , true , true , null ) ; }

Target:
private static void addSoundCard ( org.ovirt.engine.core.common.businessentities.VmBase vmBase , org.ovirt.engine.core.compat.Version vdsGroupCompatibilityVersion ) { java.lang.String soundDevice = org.ovirt.engine.core.bll.utils.VmDeviceUtils.osRepository.getSoundDevice ( vmBase.getOsId ( ) , vdsGroupCompatibilityVersion ) ; org.ovirt.engine.core.bll.utils.VmDeviceUtils.addManagedDevice ( new org.ovirt.engine.core.common.businessentities.VmDeviceId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , vmBase.getId ( ) ) , VmDeviceGeneralType.SOUND , org.ovirt.engine.core.common.utils.VmDeviceType.getSoundDeviceType ( soundDevice ) , new java.util.HashMap < java.lang.String , java.lang.Object > ( ) , true , true , null ) ; }
Source:
public int hashCode ( ) { return java.util.Objects.hash ( id , hostName , consoleAddress , name , otpValidity , pmEnabled , pmKdumpDetection , port , sshPort , sshUsername , serverSslEnabled , uniqueId , clusterId , vdsStrength , vdsType , disablePowerManagementPolicy , hostProviderId , openstackNetworkProviderId , currentKernelCmdline , kernelCmdlineParsable , lastStoredKernelCmdline , kernelCmdlineIommu , kernelCmdlineKvmNested , kernelCmdlinePciRealloc , kernelCmdlineUnsafeInterrupts , reinstallRequired ) ; }

Target:
public int hashCode ( ) { return java.util.Objects.hash ( id , hostName , consoleAddress , name , otpValidity , pmEnabled , pmKdumpDetection , port , sshPort , sshUsername , serverSslEnabled , uniqueId , clusterId , vdsStrength , vdsType , disablePowerManagementPolicy , hostProviderId , openstackNetworkProviderId , currentKernelCmdline , kernelCmdlineParsable , lastStoredKernelCmdline , kernelCmdlineBlacklistNouveau , kernelCmdlineIommu , kernelCmdlineKvmNested , kernelCmdlinePciRealloc , kernelCmdlineUnsafeInterrupts , reinstallRequired ) ; }
Source:
private org.ovirt.engine.ui.webadmin.widget.table.column.MenuCell < org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity > getRebalanceActivityMenu ( org.ovirt.engine.ui.webadmin.ApplicationConstants constants ) { org.ovirt.engine.ui.webadmin.widget.table.column.MenuCell < org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity > menuCell = new org.ovirt.engine.ui.webadmin.widget.table.column.MenuCell < org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity > ( ) ; menuCell.addMenuItem ( constants.statusRebalance ( ) , getMainModel ( ) . getStatusRebalanceCommand ( ) ) ; menuCell.addMenuItem ( constants.stopRebalance ( ) , getMainModel ( ) . getStopRebalanceCommand ( ) ) ; return menuCell ; }

Target:
protected boolean isVisible ( org.ovirt.engine.core.common.businessentities.gluster.GlusterTaskSupport value ) { return ( ( value.getAsyncTask ( ) ) != null ) && ( ( value.getAsyncTask ( ) . getType ( ) ) == ( org.ovirt.engine.core.common.asynctasks.gluster.GlusterTaskType.REBALANCE ) ) ; }