auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private void fixBootProtocolOfMgmtNetworkIfNeeded ( org.ovirt.engine.core.common.businessentities.network.NetworkAttachment networkAttachment ) { org.ovirt.engine.core.common.businessentities.network.IPv4Address ipV4address = networkAttachment.getIpConfiguration ( ) . getPrimaryAddress ( ) ; if ( ( networkModel.isManagement ( ) ) && ( ( ( ipV4address.getBootProtocol ( ) ) == null ) || ( ( ipV4address.getBootProtocol ( ) ) == ( org.ovirt.engine.core.common.businessentities.network.NetworkBootProtocol.NONE ) ) ) ) { ipV4address.setBootProtocol ( NetworkBootProtocol.DHCP ) ; } }

Target:
private void fixBootProtocolOfMgmtNetworkIfNeeded ( org.ovirt.engine.core.common.businessentities.network.NetworkAttachment networkAttachment ) { org.ovirt.engine.core.common.businessentities.network.IPv4Address ipV4address = networkAttachment.getIpConfiguration ( ) . getIpv4PrimaryAddress ( ) ; if ( ( networkModel.isManagement ( ) ) && ( ( ( ipV4address.getBootProtocol ( ) ) == null ) || ( ( ipV4address.getBootProtocol ( ) ) == ( org.ovirt.engine.core.common.businessentities.network.Ipv4BootProtocol.NONE ) ) ) ) { ipV4address.setBootProtocol ( Ipv4BootProtocol.DHCP ) ; } }
Source:
private void initRadioButtonEditors ( ) { enableOvirtServiceOptionEditor = new org.ovirt.engine.ui.common.widget.editor.EntityModelRadioButtonEditor ( "service" ) ; enableGlusterServiceOptionEditor = new org.ovirt.engine.ui.common.widget.editor.EntityModelRadioButtonEditor ( "service" ) ; optimizationNoneEditor = new org.ovirt.engine.ui.common.widget.editor.EntityModelRadioButtonEditor ( "1" ) ; optimizationForServerEditor = new org.ovirt.engine.ui.common.widget.editor.EntityModelRadioButtonEditor ( "1" ) ; optimizationForDesktopEditor = new org.ovirt.engine.ui.common.widget.editor.EntityModelRadioButtonEditor ( "1" ) ; optimizationCustomEditor = new org.ovirt.engine.ui.common.widget.editor.EntityModelRadioButtonEditor ( "1" ) ; migrateOnErrorOption_YESEditor = new org.ovirt.engine.ui.common.widget.editor.EntityModelRadioButtonEditor ( "2" ) ; migrateOnErrorOption_HA_ONLYEditor = new org.ovirt.engine.ui.common.widget.editor.EntityModelRadioButtonEditor ( "2" ) ; migrateOnErrorOption_NOEditor = new org.ovirt.engine.ui.common.widget.editor.EntityModelRadioButtonEditor ( "2" ) ; }

Target:
private void initRadioButtonEditors ( ) { enableOvirtServiceOptionEditor = new org.ovirt.engine.ui.common.widget.editor.EntityModelRadioButtonEditor ( "service" ) ; enableGlusterServiceOptionEditor = new org.ovirt.engine.ui.common.widget.editor.EntityModelRadioButtonEditor ( "service" ) ; optimizationNoneEditor = new org.ovirt.engine.ui.common.widget.editor.EntityModelRadioButtonEditor ( "1" ) ; optimizationForServerEditor = new org.ovirt.engine.ui.common.widget.editor.EntityModelRadioButtonEditor ( "1" ) ; optimizationForDesktopEditor = new org.ovirt.engine.ui.common.widget.editor.EntityModelRadioButtonEditor ( "1" ) ; optimizationCustomEditor = new org.ovirt.engine.ui.common.widget.editor.EntityModelRadioButtonEditor ( "1" ) ; migrateOnErrorOption_YESEditor = new org.ovirt.engine.ui.common.widget.editor.EntityModelRadioButtonEditor ( "2" ) ; migrateOnErrorOption_HA_ONLYEditor = new org.ovirt.engine.ui.common.widget.editor.EntityModelRadioButtonEditor ( "2" ) ; migrateOnErrorOption_NOEditor = new org.ovirt.engine.ui.common.widget.editor.EntityModelRadioButtonEditor ( "2" ) ; optimizeForUtilizationEditor = new org.ovirt.engine.ui.common.widget.editor.EntityModelRadioButtonEditor ( "3" ) ; optimizeForSpeedEditor = new org.ovirt.engine.ui.common.widget.editor.EntityModelRadioButtonEditor ( "3" ) ; }
Source:
private void doTestLocaleOverride ( java.lang.String name ) { org.ovirt.engine.core.common.interfaces.ErrorTranslator et = new org.ovirt.engine.core.utils.ErrorTranslatorImpl ( name ) ; java.util.List < java.lang.String > errors = et.TranslateErrorText ( java.util.Arrays.asList ( "DB_NO_SUCH_VM" ) , java.util.Locale.ITALIAN ) ; assertEquals ( "Unexpected Size" , 1 , errors.size ( ) ) ; assertEquals ( "String should equal" , "Impossibile trovare il desktop" , errors.get ( 0 ) ) ; java.lang.String error = et.TranslateErrorTextSingle ( "DB_NO_SUCH_VM" , java.util.Locale.ITALIAN ) ; assertEquals ( "String should equal" , "Impossibile trovare il desktop" , error ) ; }

Target:
private void doTestLocaleOverride ( java.lang.String name ) { org.ovirt.engine.core.common.interfaces.ErrorTranslator et = new org.ovirt.engine.core.utils.ErrorTranslatorImpl ( name ) ; java.util.List < java.lang.String > errors = et.TranslateErrorText ( java.util.Arrays.asList ( org.ovirt.engine.core.utils.ErrorTranslatorTest.TEST_KEY_NO_REPLACEMENT ) , java.util.Locale.ITALIAN ) ; assertEquals ( "Unexpected Size" , 1 , errors.size ( ) ) ; assertEquals ( "String should equal" , "Impossibile trovare il desktop" , errors.get ( 0 ) ) ; java.lang.String error = et.TranslateErrorTextSingle ( org.ovirt.engine.core.utils.ErrorTranslatorTest.TEST_KEY_NO_REPLACEMENT , java.util.Locale.ITALIAN ) ; assertEquals ( "String should equal" , "Impossibile trovare il desktop" , error ) ; }
Source:
private void logDelayedDomain ( final org.ovirt.engine.core.compat.Guid vdsId , org.ovirt.engine.core.common.businessentities.VDSDomainsData tempData ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase logable = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; logable.setVdsId ( vdsId ) ; logable.setStorageDomainId ( tempData.getDomainId ( ) ) ; logable.addCustomValue ( "Delay" , java.lang.Double.toString ( tempData.getDelay ( ) ) ) ; org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.log ( logable , AuditLogType.VDS_DOMAIN_DELAY_INTERVAL ) ; }

Target:
private void logDelayedDomain ( final org.ovirt.engine.core.compat.Guid vdsId , org.ovirt.engine.core.common.businessentities.VDSDomainsData tempData ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase logable = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; logable.setVdsId ( vdsId ) ; logable.setStorageDomainId ( tempData.getDomainId ( ) ) ; logable.addCustomValue ( "Delay" , java.lang.Double.toString ( tempData.getDelay ( ) ) ) ; new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector ( ) . log ( logable , AuditLogType.VDS_DOMAIN_DELAY_INTERVAL ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc heartBeat ( ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.heartBeat ( ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc createVolumeContainer ( java.lang.String sdUUID , java.lang.String imgGUID , java.lang.String size , int volFormat , int diskType , java.lang.String volUUID , java.lang.String descr , java.lang.String srcImgGUID , java.lang.String srcVolUUID ) { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.createVolumeContainer ( sdUUID , imgGUID , size , volFormat , diskType , volUUID , descr , srcImgGUID , srcVolUUID ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; }
Source:
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.uicompat.PropertyChangedEventArgs e = ( ( org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ) ( args ) ) ; if ( ( e.PropertyName ) == "IsChangable" ) { proxyListBox.setEnabled ( object.getPmProxyPreferencesList ( ) . getIsChangable ( ) ) ; } }

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.uicompat.PropertyChangedEventArgs e = ( ( org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ) ( args ) ) ; if ( ( e.propertyName ) == "IsChangable" ) { proxyListBox.setEnabled ( object.getPmProxyPreferencesList ( ) . getIsChangable ( ) ) ; } }
Source:
private boolean isDiskOnBlockDevice ( org.ovirt.engine.core.common.businessentities.storage.Disk disk ) { if ( disk instanceof org.ovirt.engine.core.common.businessentities.DiskImage ) { java.util.List < org.ovirt.engine.core.common.businessentities.StorageType > diskStorageTypes = ( ( org.ovirt.engine.core.common.businessentities.DiskImage ) ( disk ) ) . getStorageTypes ( ) ; for ( org.ovirt.engine.core.common.businessentities.StorageType type : diskStorageTypes ) { if ( ! ( type.isBlockDomain ( ) ) ) { return false ; } } return true ; } return false ; }

Target:
private boolean isDiskOnBlockDevice ( org.ovirt.engine.core.common.businessentities.storage.Disk disk ) { if ( disk instanceof org.ovirt.engine.core.common.businessentities.storage.DiskImage ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.StorageType > diskStorageTypes = ( ( org.ovirt.engine.core.common.businessentities.storage.DiskImage ) ( disk ) ) . getStorageTypes ( ) ; for ( org.ovirt.engine.core.common.businessentities.storage.StorageType type : diskStorageTypes ) { if ( ! ( type.isBlockDomain ( ) ) ) { return false ; } } return true ; } return false ; }
Source:
protected < X > void render ( org.ovirt.engine.ui.webadmin.widget.table.column.Context context , T value , com.google.gwt.safehtml.shared.SafeHtmlBuilder sb , com.google.gwt.cell.client.HasCell < T , X > hasCell ) { com.google.gwt.cell.client.Cell < X > cell = hasCell.getCell ( ) ; sb.appendHtmlConstant ( "<td>" ) ; cell.render ( context , hasCell.getValue ( value ) , sb ) ; sb.appendHtmlConstant ( "</td>" ) ; }

Target:
protected < X > void render ( org.ovirt.engine.ui.webadmin.widget.table.cell.Context context , T value , com.google.gwt.safehtml.shared.SafeHtmlBuilder sb , com.google.gwt.cell.client.HasCell < T , X > hasCell ) { com.google.gwt.cell.client.Cell < X > cell = hasCell.getCell ( ) ; sb.appendHtmlConstant ( "<td>" ) ; cell.render ( context , hasCell.getValue ( value ) , sb ) ; sb.appendHtmlConstant ( "</td>" ) ; }
Source:
public org.ovirt.engine.sdk.decorators.VM add ( org.ovirt.engine.sdk.decorators.VM vm ) throws java.io.IOException , org.apache.http.client.ClientProtocolException , org.ovirt.engine.sdk.exceptions.ServerException { java.lang.String url = ( SLASH ) + ( getName ( ) ) ; return getProxy ( ) . add ( url , vm , org.ovirt.engine.sdk.entities.VM.class , org.ovirt.engine.sdk.decorators.VM.class ) ; }

Target:
public org.ovirt.engine.sdk.decorators.VM add ( org.ovirt.engine.sdk.decorators.VM vm ) throws java.io.IOException , org.apache.http.client.ClientProtocolException , org.ovirt.engine.sdk.exceptions.ServerException { java.lang.String url = ( SLASH ) + ( getName ( ) ) ; java.util.List < org.apache.http.Header > headers = new org.ovirt.engine.sdk.utils.HttpHeaderBuilder ( ) . build ( ) ; url = new org.ovirt.engine.sdk.utils.UrlBuilder ( url ) . build ( ) ; return getProxy ( ) . add ( url , vm , org.ovirt.engine.sdk.entities.VM.class , org.ovirt.engine.sdk.decorators.VM.class , headers ) ; }
Source:
public void testCleanExpiredSessionsWithRunningCommands ( ) { org.mockito.Mockito.when ( ssoSessionUtils.isSessionInUse ( org.mockito.Matchers.anyLong ( ) ) ) . thenReturn ( true ) ; initDataForClearTest ( org.ovirt.engine.core.bll.aaa.SessionDataContainerTest.TEST_KEY ) ; container.cleanExpiredUsersSessions ( ) ; org.junit.Assert.assertNotNull ( "Get found the session" , container.getData ( org.ovirt.engine.core.bll.aaa.SessionDataContainerTest.TEST_SESSION_ID , org.ovirt.engine.core.bll.aaa.SessionDataContainerTest.TEST_KEY , false ) ) ; }

Target:
public void testCleanExpiredSessionsWithRunningCommands ( ) { org.mockito.Mockito.when ( ssoSessionUtils.isSessionInUse ( org.mockito.ArgumentMatchers.anyLong ( ) ) ) . thenReturn ( true ) ; initDataForClearTest ( org.ovirt.engine.core.bll.aaa.SessionDataContainerTest.TEST_KEY ) ; container.cleanExpiredUsersSessions ( ) ; org.junit.Assert.assertNotNull ( "Get found the session" , container.getData ( org.ovirt.engine.core.bll.aaa.SessionDataContainerTest.TEST_SESSION_ID , org.ovirt.engine.core.bll.aaa.SessionDataContainerTest.TEST_KEY , false ) ) ; }
Source:
public void getUsbPolicyUsbTypeLegacy ( ) { org.ovirt.engine.api.model.Usb usb = new org.ovirt.engine.api.model.Usb ( ) ; usb.setEnabled ( true ) ; usb.setType ( "legacy" ) ; org.ovirt.engine.core.common.businessentities.VDSGroup vdsGroup = new org.ovirt.engine.core.common.businessentities.VDSGroup ( ) ; assertEquals ( org.ovirt.engine.api.restapi.types.VmMapper.getUsbPolicyOnCreate ( usb , vdsGroup.getCompatibilityVersion ( ) ) , UsbPolicy.ENABLED_LEGACY ) ; }

Target:
public void getUsbPolicyOnUpdateCurrentlyLegacyGotEnabledNotSetPolicyNotSetUsb ( ) { org.ovirt.engine.api.model.Usb usb = new org.ovirt.engine.api.model.Usb ( ) ; org.ovirt.engine.core.common.businessentities.UsbPolicy currentPolicy = org.ovirt.engine.core.common.businessentities.UsbPolicy.ENABLED_LEGACY ; assertEquals ( org.ovirt.engine.api.restapi.types.VmMapper.getUsbPolicyOnUpdate ( usb , currentPolicy ) , currentPolicy ) ; }
Source:
public static void getVmsRunningOnOrMigratingToVds ( 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 ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VM > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVmsRunningOnOrMigratingToVds , new org.ovirt.engine.core.common.queries.GetVmsRunningOnOrMigratingToVdsParameters ( id ) , aQuery ) ; }

Target:
public static void getMaxSpmPriority ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Integer ) ( source ) ) . intValue ( ) : 0 ; } } ; aQuery.asyncCallback.onSuccess ( aQuery.getModel ( ) , 10 ) ; }
Source:
public void testUpdateNonEditableFieldOnDownHost ( ) { org.ovirt.engine.core.common.businessentities.VdsStatic src = new org.ovirt.engine.core.common.businessentities.VdsStatic ( ) ; src.setServerSslEnabled ( true ) ; org.ovirt.engine.core.common.businessentities.VdsStatic dest = new org.ovirt.engine.core.common.businessentities.VdsStatic ( ) ; dest.setServerSslEnabled ( false ) ; boolean updateIsValid = org.ovirt.engine.core.bll.VdsHandler.isUpdateValid ( src , dest , VDSStatus.Down ) ; org.junit.Assert.assertFalse ( "Update should not be valid for different server SSL enabled states" , updateIsValid ) ; }

Target:
public void testUpdateNonEditableFieldOnDownHost ( ) { org.ovirt.engine.core.common.businessentities.VdsStatic src = new org.ovirt.engine.core.common.businessentities.VdsStatic ( ) ; src.setServerSslEnabled ( true ) ; org.ovirt.engine.core.common.businessentities.VdsStatic dest = new org.ovirt.engine.core.common.businessentities.VdsStatic ( ) ; dest.setServerSslEnabled ( false ) ; boolean updateIsValid = vdsHandler.isUpdateValid ( src , dest , VDSStatus.Down ) ; org.junit.Assert.assertFalse ( "Update should not be valid for different server SSL enabled states" , updateIsValid ) ; }
Source:
public void getAAAProfilesEntriesList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.Collection < org.ovirt.engine.core.aaa.ProfileEntry > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.aaa.ProfileEntry > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAAAProfileList , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }

Target:
public void getHostDevicesByHostId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hostId ) { org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetExtendedHostDevicesByHostId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( hostId ) , aQuery ) ; }
Source:
public void networkQosExists ( ) throws java.lang.Exception { org.mockito.Mockito.when ( vnicProfile.getNetworkQosId ( ) ) . thenReturn ( DEFAULT_GUID ) ; org.mockito.Mockito.when ( networkQosDao.get ( DEFAULT_GUID ) ) . thenReturn ( networkQos ) ; org.junit.Assert.assertThat ( validator.networkQosExistsOrNull ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }

Target:
public void networkQosExists ( ) throws java.lang.Exception { org.mockito.Mockito.when ( vnicProfile.getNetworkQosId ( ) ) . thenReturn ( org.ovirt.engine.core.bll.validator.VnicProfileValidatorTest.DEFAULT_GUID ) ; org.mockito.Mockito.when ( networkQosDao.get ( org.ovirt.engine.core.bll.validator.VnicProfileValidatorTest.DEFAULT_GUID ) ) . thenReturn ( networkQos ) ; org.junit.Assert.assertThat ( validator.networkQosExistsOrNull ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }
Source:
public void testAddGroupFailure ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpGetEntityExpectations ( ( ( "ADGROUP@" + ( DOMAIN ) ) + ": name=*" ) , SearchType.AdGroup , getAdGroup ( 0 ) ) ; control.replay ( ) ; org.ovirt.engine.api.model.Group model = new org.ovirt.engine.api.model.Group ( ) ; model.setName ( BAD_NAMES [ 0 ] ) ; try { javax.ws.rs.core.Response response = collection.add ( model ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { assertNotNull ( wae.getResponse ( ) ) ; assertEquals ( 404 , wae.getResponse ( ) . getStatus ( ) ) ; } }

Target:
public void testRemoveNonExistant ( ) throws java.lang.Exception { setUpGetEntityExpectations ( org.ovirt.engine.api.restapi.resource.NON_EXISTANT_GUID , true ) ; control.replay ( ) ; try { collection.remove ( org.ovirt.engine.api.restapi.resource.NON_EXISTANT_GUID.toString ( ) ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { assertNotNull ( wae.getResponse ( ) ) ; assertEquals ( 404 , wae.getResponse ( ) . getStatus ( ) ) ; } }
Source:
private org.ovirt.engine.core.common.businessentities.VmStatic getVmStatic ( ) { org.ovirt.engine.core.common.businessentities.VmStatic vmStatic = new org.ovirt.engine.core.common.businessentities.VmStatic ( ) ; vmStatic.setOsId ( OsRepository.DEFAULT_X86_OS ) ; vmStatic.setMemSizeMb ( 300 ) ; vmStatic.setStateless ( false ) ; vmStatic.setVmtGuid ( vmTemplateId ) ; return vmStatic ; }

Target:
private org.ovirt.engine.core.common.businessentities.VmStatic getVmStatic ( ) { org.ovirt.engine.core.common.businessentities.VmStatic vmStatic = new org.ovirt.engine.core.common.businessentities.VmStatic ( ) ; vmStatic.setOsId ( OsRepository.DEFAULT_X86_OS ) ; vmStatic.setNumOfMonitors ( 1 ) ; vmStatic.setMemSizeMb ( 300 ) ; vmStatic.setStateless ( false ) ; vmStatic.setVmtGuid ( vmTemplateId ) ; return vmStatic ; }
Source:
public void persistCommand ( org.ovirt.engine.core.common.action.VdcActionType parentCommand , boolean enableCallBack ) { org.ovirt.engine.core.common.action.VdcActionParametersBase parentParameters = getParentParameters ( parentCommand ) ; javax.transaction.Transaction transaction = org.ovirt.engine.core.utils.transaction.TransactionSupport.suspend ( ) ; try { org.ovirt.engine.core.bll.tasks.TaskManagerUtil.persistCommand ( org.ovirt.engine.core.common.businessentities.CommandEntity.buildCommandEntity ( getCommandId ( ) , parentParameters.getCommandId ( ) , getActionType ( ) , getParameters ( ) , commandStatus , enableCallBack , getReturnValue ( ) ) ) ; } finally { org.ovirt.engine.core.utils.transaction.TransactionSupport.resume ( transaction ) ; } }

Target:
public void setCommandExecuted ( ) { javax.transaction.Transaction transaction = org.ovirt.engine.core.utils.transaction.TransactionSupport.suspend ( ) ; try { org.ovirt.engine.core.bll.tasks.TaskManagerUtil.updateCommandExecuted ( getCommandId ( ) ) ; } finally { if ( transaction != null ) { org.ovirt.engine.core.utils.transaction.TransactionSupport.resume ( transaction ) ; } } }
Source:
private void failover ( ) { if ( ( ( ( org.ovirt.engine.core.vdsbroker.irsbroker.IrsBrokerCommand.getParameters ( ) . getIgnoreFailoverLimit ( ) ) || ( ( _failoverCounter ) < ( ( org.ovirt.engine.core.common.config.Config.< java.lang.Integer > GetValue ( ConfigValues.SpmCommandFailOverRetries ) ) - 1 ) ) ) && ( getCurrentIrsProxyData ( ) . getHasVdssForSpmSelection ( ) ) ) && ( getCurrentIrsProxyData ( ) . failover ( ) ) ) { ( _failoverCounter ) ++ ; org.ovirt.engine.core.vdsbroker.irsbroker.IrsBrokerCommand.ExecuteCommand ( ) ; } else { org.ovirt.engine.core.vdsbroker.irsbroker.IrsBrokerCommand.getVDSReturnValue ( ) . setSucceeded ( false ) ; } }

Target:
private void failover ( ) { if ( ( ( ( org.ovirt.engine.core.vdsbroker.irsbroker.IrsBrokerCommand.getParameters ( ) . getIgnoreFailoverLimit ( ) ) || ( ( _failoverCounter ) < ( ( org.ovirt.engine.core.common.config.Config.< java.lang.Integer > GetValue ( ConfigValues.SpmCommandFailOverRetries ) ) - 1 ) ) ) && ( getCurrentIrsProxyData ( ) . getHasVdssForSpmSelection ( ) ) ) && ( getCurrentIrsProxyData ( ) . failover ( ) ) ) { ( _failoverCounter ) ++ ; org.ovirt.engine.core.vdsbroker.irsbroker.IrsBrokerCommand.executeCommand ( ) ; } else { org.ovirt.engine.core.vdsbroker.irsbroker.IrsBrokerCommand.getVDSReturnValue ( ) . setSucceeded ( false ) ; } }
Source:
protected void updateMenuItem ( com.google.gwt.user.client.ui.MenuItem item , org.ovirt.engine.ui.common.widget.action.ActionButtonDefinition < T > buttonDef ) { item.setVisible ( ( ( buttonDef.isAccessible ( ) ) && ( buttonDef.isVisible ( getSelectedItems ( ) ) ) ) ) ; item.setEnabled ( buttonDef.isEnabled ( getSelectedItems ( ) ) ) ; if ( ( buttonDef.getToolTip ( ) ) != null ) { item.setTitle ( buttonDef.getToolTip ( ) ) ; } }

Target:
protected void updateMenuItem ( com.google.gwt.user.client.ui.MenuItem item , org.ovirt.engine.ui.common.widget.action.ActionButtonDefinition < T > buttonDef ) { item.setVisible ( ( ( buttonDef.isAccessible ( ) ) && ( buttonDef.isVisible ( org.ovirt.engine.ui.common.widget.action.AbstractActionPanel.getSelectedItems ( ) ) ) ) ) ; item.setEnabled ( buttonDef.isEnabled ( org.ovirt.engine.ui.common.widget.action.AbstractActionPanel.getSelectedItems ( ) ) ) ; if ( ( buttonDef.getToolTip ( ) ) != null ) { item.setTitle ( buttonDef.getToolTip ( ) ) ; } }
Source:
public org.ovirt.engine.sdk.entities.Action migrate ( org.ovirt.engine.sdk.entities.Action action ) throws java.io.IOException , org.apache.http.client.ClientProtocolException , org.ovirt.engine.sdk.exceptions.ServerException { java.lang.String url = ( ( ( ( this . parent.getHref ( ) ) + ( SLASH ) ) + ( getName ( ) ) ) + ( SLASH ) ) + "migrate" ; java.util.List < org.apache.http.Header > headers = new org.ovirt.engine.sdk.utils.HttpHeaderBuilder ( ) . build ( ) ; url = new org.ovirt.engine.sdk.utils.UrlBuilder ( url ) . build ( ) ; return getProxy ( ) . action ( url , action , org.ovirt.engine.sdk.entities.Action.class , org.ovirt.engine.sdk.entities.Action.class , headers ) ; }

Target:
public org.ovirt.engine.sdk.decorators.DataCenterClusterGlusterVolumeGlusterBrick add ( org.ovirt.engine.sdk.decorators.GlusterBrick glusterbrick ) throws java.io.IOException , org.apache.http.client.ClientProtocolException , org.ovirt.engine.sdk.exceptions.ServerException { java.lang.String url = ( ( this . parent.getHref ( ) ) + ( SLASH ) ) + ( getName ( ) ) ; org.ovirt.engine.sdk.utils.HttpHeaderBuilder headersBuilder = new org.ovirt.engine.sdk.utils.HttpHeaderBuilder ( ) ; java.util.List < org.apache.http.Header > headers = headersBuilder.build ( ) ; org.ovirt.engine.sdk.utils.UrlBuilder urlBuilder = new org.ovirt.engine.sdk.utils.UrlBuilder ( url ) ; url = urlBuilder.build ( ) ; return getProxy ( ) . add ( url , glusterbrick , org.ovirt.engine.sdk.entities.GlusterBrick.class , org.ovirt.engine.sdk.decorators.DataCenterClusterGlusterVolumeGlusterBrick.class , headers ) ; }
Source:
public void setSelectedItem ( T value ) { if ( ( selectedItem ) != value ) { onSelectedItemChanging ( value , selectedItem ) ; selectedItem = value ; onSelectedItemChanged ( ) ; getSelectedItemChangedEvent ( ) . raise ( this , EventArgs.EMPTY ) ; onPropertyChanged ( new org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ( "SelectedItem" ) ) ; } }

Target:
public void setSelectedItem ( T value , boolean fireEvent ) { if ( ( ( selectedItem ) != value ) && fireEvent ) { onSelectedItemChanging ( value , selectedItem ) ; selectedItem = value ; onSelectedItemChanged ( ) ; getSelectedItemChangedEvent ( ) . raise ( this , EventArgs.EMPTY ) ; onPropertyChanged ( new org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ( "SelectedItem" ) ) ; } }
Source:
public void testNeedToProcessHardwareCapsFalse ( ) { org.ovirt.engine.core.common.businessentities.VDS oldVds = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; oldVds.setVdsGroupId ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) ) ; oldVds.setId ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) ) ; oldVds.setCpuFlags ( "flag1" ) ; org.ovirt.engine.core.common.businessentities.VDS newVds = oldVds.clone ( ) ; org.junit.Assert.assertFalse ( virtStrategy.processHardwareCapabilitiesNeeded ( oldVds , newVds ) ) ; }

Target:
public void testNeedToProcessHardwareCapsFalse ( ) { org.ovirt.engine.core.common.businessentities.VDS oldVds = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; oldVds.setVdsGroupId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; oldVds.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; oldVds.setCpuFlags ( "flag1" ) ; org.ovirt.engine.core.common.businessentities.VDS newVds = oldVds.clone ( ) ; org.junit.Assert.assertFalse ( virtStrategy.processHardwareCapabilitiesNeeded ( oldVds , newVds ) ) ; }
Source:
protected R performUpdate ( R incoming , Q entity , R model , org.ovirt.engine.api.restapi.resource.EntityIdResolver entityResolver , org.ovirt.engine.core.common.action.VdcActionType update , org.ovirt.engine.api.restapi.resource.AbstractBackendSubResource.ParametersProvider < R , Q > updateProvider ) { validateUpdate ( incoming , model ) ; performAction ( update , updateProvider.getParameters ( incoming , entity ) ) ; return addLinks ( populate ( map ( getEntity ( entityResolver , false ) ) , entity ) ) ; }

Target:
protected final R performUpdate ( R incoming , Q entity , R model , org.ovirt.engine.api.restapi.resource.EntityIdResolver < org.ovirt.engine.core.compat.Guid > entityResolver , org.ovirt.engine.core.common.action.VdcActionType update , org.ovirt.engine.api.restapi.resource.AbstractBackendSubResource.ParametersProvider < R , Q > updateProvider ) { entity = doUpdate ( incoming , entity , model , entityResolver , update , updateProvider ) ; R model2 = org.ovirt.engine.api.restapi.resource.AbstractBackendSubResource.map ( entity ) ; org.ovirt.engine.api.restapi.resource.AbstractBackendSubResource.deprecatedPopulate ( model2 , entity ) ; return addLinks ( org.ovirt.engine.api.restapi.resource.AbstractBackendSubResource.doPopulate ( model2 , entity ) ) ; }
Source:
public void testUpdateAll ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.VmStatistics existingVm = dao.get ( org.ovirt.engine.core.dao.VmStatisticsDaoTest.EXISTING_VM_ID ) ; org.ovirt.engine.core.common.businessentities.VmStatistics existingVm2 = dao.get ( new org.ovirt.engine.core.compat.Guid ( "77296e00-0cad-4e5a-9299-008a7b6f4356" ) ) ; existingVm.setCpuSys ( 50.0 ) ; existingVm2.setCpuUser ( 50.0 ) ; dao.updateAll ( java.util.Arrays.asList ( existingVm , existingVm2 ) ) ; org.junit.Assert.assertEquals ( existingVm , dao.get ( existingVm.getId ( ) ) ) ; org.junit.Assert.assertEquals ( existingVm2 , dao.get ( existingVm2.getId ( ) ) ) ; }

Target:
public void testUpdateStatistics ( ) { org.ovirt.engine.core.common.businessentities.VmStatistics before = dao.get ( FixturesTool.VM_RHEL5_POOL_57 ) ; before.setUsageMemPercent ( 17 ) ; before.setDisksUsage ( "java.util.map { [ ] }" ) ; dao.update ( before ) ; org.ovirt.engine.core.common.businessentities.VmStatistics after = dao.get ( FixturesTool.VM_RHEL5_POOL_57 ) ; org.junit.Assert.assertEquals ( before , after ) ; }
Source:
public void eventRaised ( org.ovirt.engine.core.compat.Event ev , java.lang.Object sender , org.ovirt.engine.core.compat.EventArgs args ) { super . eventRaised ( ev , sender , args ) ; if ( ( ev.equals ( EntityModel.EntityChangedEventDefinition ) ) && ( sender == ( getUserName ( ) ) ) ) { UserName_EntityChanged ( ) ; } }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { super . eventRaised ( ev , sender , args ) ; if ( ( ev.matchesDefinition ( EntityModel.EntityChangedEventDefinition ) ) && ( sender == ( getUserName ( ) ) ) ) { UserName_EntityChanged ( ) ; } }
Source:
private void setUpGetConnection ( int times ) throws java.lang.Exception { for ( int i = 0 ; i < times ; i ++ ) { setUpGetEntityExpectations ( VdcQueryType.GetStorageServerConnectionById , org.ovirt.engine.core.common.queries.StorageServerConnectionQueryParametersBase.class , new java.lang.String [ ] { "ServerConnectionId" } , new java.lang.Object [ ] { GUIDS [ 0 ] . toString ( ) } , org.ovirt.engine.api.restapi.resource.BackendAttachedStorageDomainsResourceTest.setUpStorageServerConnection ( ) ) ; } }

Target:
private void setUpGetConnection ( int times ) throws java.lang.Exception { for ( int i = 0 ; i < times ; i ++ ) { setUpGetEntityExpectations ( QueryType.GetStorageServerConnectionById , org.ovirt.engine.core.common.queries.StorageServerConnectionQueryParametersBase.class , new java.lang.String [ ] { "ServerConnectionId" } , new java.lang.Object [ ] { GUIDS [ 0 ] . toString ( ) } , org.ovirt.engine.api.restapi.resource.BackendAttachedStorageDomainsResourceTest.setUpStorageServerConnection ( ) ) ; } }
Source:
protected void executeCommand ( ) { org.ovirt.engine.core.common.businessentities.UserProfile profile = userProfileDao.getByUserId ( org.ovirt.engine.core.bll.UpdateUserProfileCommand.getUserId ( ) ) ; profile.setSshPublicKey ( org.ovirt.engine.core.bll.UpdateUserProfileCommand.getParameters ( ) . getUserProfile ( ) . getSshPublicKey ( ) ) ; userProfileDao.update ( profile ) ; org.ovirt.engine.core.bll.UpdateUserProfileCommand.setSucceeded ( true ) ; }

Target:
protected void executeCommand ( ) { org.ovirt.engine.core.common.businessentities.UserProfile profile = userProfileDao.getByUserId ( org.ovirt.engine.core.bll.UpdateUserProfileCommand.getUserId ( ) ) ; profile.setSshPublicKey ( org.ovirt.engine.core.bll.UpdateUserProfileCommand.getParameters ( ) . getUserProfile ( ) . getSshPublicKey ( ) ) ; profile.setUserPortalVmLoginAutomatically ( org.ovirt.engine.core.bll.UpdateUserProfileCommand.getParameters ( ) . getUserProfile ( ) . isUserPortalVmLoginAutomatically ( ) ) ; userProfileDao.update ( profile ) ; org.ovirt.engine.core.bll.UpdateUserProfileCommand.setSucceeded ( true ) ; }
Source:
protected void onEntityChanged ( ) { super . onEntityChanged ( ) ; if ( ( getEntity ( ) ) != null ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity glusterVolumeEntity = ( ( org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity ) ( getEntity ( ) ) ) ; setItems ( glusterVolumeEntity.getBricks ( ) ) ; } else { setItems ( null ) ; } updateRemoveBrickActionsAvailability ( ( ( org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity ) ( getEntity ( ) ) ) ) ; }

Target:
public org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity getVolumeEntity ( ) { return volumeEntity ; }
Source:
protected void executeCommand ( ) { getProvider ( ) . setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; org.ovirt.engine.core.bll.provider.AddProviderCommand.getDbFacade ( ) . getProviderDao ( ) . save ( getProvider ( ) ) ; org.ovirt.engine.core.bll.provider.ProviderProxy providerProxy = getProviderProxy ( ) ; if ( providerProxy != null ) { providerProxy.onAddition ( ) ; } org.ovirt.engine.core.bll.provider.AddProviderCommand.getReturnValue ( ) . setActionReturnValue ( getProvider ( ) . getId ( ) ) ; org.ovirt.engine.core.bll.provider.AddProviderCommand.setSucceeded ( true ) ; }

Target:
protected void executeCommand ( ) { getProvider ( ) . setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; providerDao.save ( getProvider ( ) ) ; org.ovirt.engine.core.bll.provider.ProviderProxy providerProxy = getProviderProxy ( ) ; if ( providerProxy != null ) { providerProxy.onAddition ( ) ; } org.ovirt.engine.core.bll.provider.AddProviderCommand.getReturnValue ( ) . setActionReturnValue ( getProvider ( ) . getId ( ) ) ; org.ovirt.engine.core.bll.provider.AddProviderCommand.setSucceeded ( true ) ; }
Source:
public void OnSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.VmModelBehaviorBase behavior = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.VmModelBehaviorBase ) ( target ) ) ; cachedTimeZones = ( ( java.util.HashMap < java.lang.String , java.lang.String > ) ( returnValue ) ) . entrySet ( ) ; behavior.PostUpdateTimeZone ( ) ; }

Target:
public void OnSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.VmModelBehaviorBase behavior = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.VmModelBehaviorBase ) ( target ) ) ; cachedTimeZones.set ( index , ( ( java.util.HashMap < java.lang.String , java.lang.String > ) ( returnValue ) ) . entrySet ( ) ) ; behavior.PostUpdateTimeZone ( ) ; }
Source:
public void getClusterServerMemoryOverCommit ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Integer ) ( source ) ) . intValue ( ) : 0 ; } } ; getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.MaxVdsMemOverCommitForServers , getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public void getDataCenterMaxNameLength ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Integer ) ( source ) ) . intValue ( ) : 1 ; } } ; getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.StoragePoolNameSizeLimit , getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
protected void executeNetworkCommand ( org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkItemModel < ? > op1 , org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkItemModel < ? > op2 , java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > allNics , java.lang.Object ... params ) { }

Target:
protected void executeNetworkCommand ( org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkItemModel < ? > op1 , org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkItemModel < ? > op2 , org.ovirt.engine.ui.uicommonweb.models.hosts.network.DataFromHostSetupNetworksModel dataFromHostSetupNetworksModel , java.lang.Object ... params ) { assert op1 instanceof org.ovirt.engine.ui.uicommonweb.models.hosts.network.LogicalNetworkModel ; org.ovirt.engine.ui.uicommonweb.models.hosts.network.LogicalNetworkModel networkToDetach = ( ( org.ovirt.engine.ui.uicommonweb.models.hosts.network.LogicalNetworkModel ) ( op1 ) ) ; assert networkToDetach.isAttached ( ) ; org.ovirt.engine.core.compat.Guid networkId = networkToDetach.getNetwork ( ) . getId ( ) ; assert networkId == null ; org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkOperation.detachNetworkWithoutUpdatingHostSetupNetworksParameters ( dataFromHostSetupNetworksModel.allNics , networkToDetach ) ; dataFromHostSetupNetworksModel.removedUnmanagedNetworks.add ( networkToDetach.getNetwork ( ) . getName ( ) ) ; }
Source:
private void testManagementNetworkChange ( boolean managementAfter , boolean emptyCluster , org.hamcrest.Matcher < org.ovirt.engine.core.bll.ValidationResult > expectedResult ) { org.mockito.Mockito.when ( networkCluster.isManagement ( ) ) . thenReturn ( managementAfter ) ; org.mockito.Mockito.when ( vdsDao.getAllForCluster ( org.ovirt.engine.core.bll.network.cluster.TEST_CLUSTER_ID ) ) . thenReturn ( ( emptyCluster ? java.util.Collections.emptyList ( ) : java.util.Collections.singletonList ( null ) ) ) ; org.junit.Assert.assertThat ( validator.managementNetworkChange ( ) , expectedResult ) ; }

Target:
private void testManagementNetworkChange ( boolean managementAfter , boolean emptyCluster , org.hamcrest.Matcher < org.ovirt.engine.core.bll.ValidationResult > expectedResult ) { networkCluster.setManagement ( managementAfter ) ; org.mockito.Mockito.when ( vdsDao.getAllForCluster ( org.ovirt.engine.core.bll.network.cluster.TEST_CLUSTER_ID ) ) . thenReturn ( ( emptyCluster ? java.util.Collections.emptyList ( ) : java.util.Collections.singletonList ( null ) ) ) ; org.junit.Assert.assertThat ( validator.managementNetworkChange ( ) , expectedResult ) ; }
Source:
public void validateFailedShareableDiskOnGlusterDomain ( ) throws java.lang.Exception { org.ovirt.engine.core.common.action.UpdateVmDiskParameters parameters = createParameters ( ) ; org.ovirt.engine.core.common.businessentities.storage.DiskImage disk = createShareableDisk ( VolumeFormat.RAW ) ; org.ovirt.engine.core.common.businessentities.StorageDomain storage = addNewStorageDomainToDisk ( disk , StorageType.GLUSTERFS ) ; parameters.setDiskInfo ( disk ) ; org.mockito.Mockito.when ( diskDao.get ( diskImageGuid ) ) . thenReturn ( createDiskImage ( ) ) ; org.mockito.Mockito.when ( storageDomainStaticDao.get ( storage.getId ( ) ) ) . thenReturn ( storage.getStorageStaticData ( ) ) ; initializeCommand ( parameters ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( command , EngineMessage.ACTION_TYPE_FAILED_SHAREABLE_DISKS_NOT_SUPPORTED_ON_GLUSTER_DOMAIN ) ; }

Target:
public void validateFailedShareableDiskOnGlusterDomain ( ) throws java.lang.Exception { org.ovirt.engine.core.common.action.VmDiskOperationParameterBase parameters = createParameters ( ) ; org.ovirt.engine.core.common.businessentities.storage.DiskImage disk = createShareableDisk ( VolumeFormat.RAW ) ; org.ovirt.engine.core.common.businessentities.StorageDomain storage = addNewStorageDomainToDisk ( disk , StorageType.GLUSTERFS ) ; parameters.setDiskInfo ( disk ) ; org.mockito.Mockito.when ( diskDao.get ( diskImageGuid ) ) . thenReturn ( createDiskImage ( ) ) ; org.mockito.Mockito.when ( storageDomainStaticDao.get ( storage.getId ( ) ) ) . thenReturn ( storage.getStorageStaticData ( ) ) ; initializeCommand ( parameters ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( command , EngineMessage.ACTION_TYPE_FAILED_SHAREABLE_DISKS_NOT_SUPPORTED_ON_GLUSTER_DOMAIN ) ; }
Source:
private void expandTree ( com.google.gwt.user.cellview.client.TreeNode node , boolean collapse ) { if ( node == null ) { return ; } if ( ( node.getChildCount ( ) ) > 0 ) { for ( int i = 0 ; i < ( node.getChildCount ( ) ) ; i ++ ) { expandTree ( node.setChildOpen ( i , collapse ) , collapse ) ; } } }

Target:
private void expandTree ( com.google.gwt.user.cellview.client.TreeNode node ) { expandTree ( node , org.ovirt.engine.ui.webadmin.widget.tree.SystemTree.ALL_LEVELS ) ; }
Source:
private void StyleTextBoxEditor ( org.ovirt.engine.ui.common.widget.editor.generic.StringEntityModelTextBoxOnlyEditor editor , org.ovirt.engine.ui.uicommonweb.models.EntityModel model ) { if ( ! ( model.getIsChangable ( ) ) ) { editor.setEnabled ( true ) ; com.google.gwt.user.client.ui.ValueBox < java.lang.String > valueBox = editor.asValueBox ( ) ; valueBox.setReadOnly ( true ) ; valueBox.getElement ( ) . getStyle ( ) . setBorderWidth ( 0 , Style.Unit.PX ) ; } }

Target:
void addStyles ( ) { pathEditor.addContentWidgetContainerStyleName ( style.pathEditorContent ( ) ) ; vfsTypeEditor.addContentWidgetContainerStyleName ( style.vfsTypeTextBoxEditor ( ) ) ; mountOptionsEditor.addContentWidgetContainerStyleName ( style.mountOptionsTextBoxEditor ( ) ) ; }
Source:
public static void getGlusterSwiftServices ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid serverId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? source : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterServerService > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterServerServicesByServerId , new org.ovirt.engine.core.common.queries.gluster.GlusterServiceQueryParameters ( serverId , org.ovirt.engine.core.common.businessentities.gluster.ServiceType.GLUSTER_SWIFT ) , aQuery ) ; }

Target:
public 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:
private void logDiskEvent ( org.ovirt.engine.core.common.businessentities.storage.CinderDisk cinderDisk , org.ovirt.engine.core.common.AuditLogType cinderDiskConnectionFailure ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogable logable = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableImpl ( ) ; logable.addCustomValue ( "DiskAlias" , cinderDisk.getDiskAlias ( ) ) ; new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector ( ) . log ( logable , cinderDiskConnectionFailure ) ; }

Target:
private void logDiskEvent ( org.ovirt.engine.core.common.businessentities.storage.CinderDisk cinderDisk , org.ovirt.engine.core.common.AuditLogType cinderDiskConnectionFailure ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogable logable = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableImpl ( ) ; logable.addCustomValue ( "DiskAlias" , cinderDisk.getDiskAlias ( ) ) ; org.ovirt.engine.core.di.Injector.get ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.class ) . log ( logable , cinderDiskConnectionFailure ) ; }
Source:
protected void Connect ( ) { if ( ( ( getEntity ( ) ) == null ) || ( ( getEntity ( ) . getRunOnVds ( ) ) == null ) ) { return ; } getLogger ( ) . Debug ( "VNC console info..." ) ; org.ovirt.engine.ui.uicommonweb.UICommand setVmTicketCommand = new org.ovirt.engine.ui.uicommonweb.UICommand ( "setVmCommand" , new org.ovirt.engine.ui.uicommonweb.BaseCommandTarget ( ) { @ java.lang.Override public void ExecuteCommand ( org.ovirt.engine.ui.uicommonweb.UICommand uiCommand ) { setVmTicket ( ) ; } } ) ; executeCommandWithConsoleSafenessWarning ( setVmTicketCommand ) ; }

Target:
protected void connect ( ) { if ( ( ( getEntity ( ) ) == null ) || ( ( getEntity ( ) . getRunOnVds ( ) ) == null ) ) { return ; } getLogger ( ) . debug ( "VNC console info..." ) ; org.ovirt.engine.ui.uicommonweb.UICommand setVmTicketCommand = new org.ovirt.engine.ui.uicommonweb.UICommand ( "setVmCommand" , new org.ovirt.engine.ui.uicommonweb.BaseCommandTarget ( ) { @ java.lang.Override public void executeCommand ( org.ovirt.engine.ui.uicommonweb.UICommand uiCommand ) { setVmTicket ( ) ; } } ) ; executeCommandWithConsoleSafenessWarning ( setVmTicketCommand ) ; }
Source:
protected void ItemsCollectionChanged ( java.lang.Object sender , org.ovirt.engine.ui.uicompat.NotifyCollectionChangedEventArgs e ) { super . ItemsCollectionChanged ( sender , e ) ; if ( ( ( getSystemTreeSelectedItem ( ) ) != null ) && ( ( getSystemTreeSelectedItem ( ) . getType ( ) ) == ( org.ovirt.engine.ui.uicommonweb.models.SystemTreeItemType.Cluster ) ) ) { org.ovirt.engine.core.common.businessentities.VDSGroup cluster = ( ( org.ovirt.engine.core.common.businessentities.VDSGroup ) ( getSystemTreeSelectedItem ( ) . getEntity ( ) ) ) ; setSelectedItem ( org.ovirt.engine.ui.uicommonweb.Linq.FirstOrDefault ( org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.VDSGroup > Cast ( getItems ( ) ) , new org.ovirt.engine.ui.uicommonweb.Linq.ClusterPredicate ( cluster.getId ( ) ) ) ) ; } }

Target:
protected void itemsCollectionChanged ( java.lang.Object sender , org.ovirt.engine.ui.uicompat.NotifyCollectionChangedEventArgs e ) { super . itemsCollectionChanged ( sender , e ) ; if ( ( ( getSystemTreeSelectedItem ( ) ) != null ) && ( ( getSystemTreeSelectedItem ( ) . getType ( ) ) == ( org.ovirt.engine.ui.uicommonweb.models.SystemTreeItemType.Cluster ) ) ) { org.ovirt.engine.core.common.businessentities.VDSGroup cluster = ( ( org.ovirt.engine.core.common.businessentities.VDSGroup ) ( getSystemTreeSelectedItem ( ) . getEntity ( ) ) ) ; setSelectedItem ( org.ovirt.engine.ui.uicommonweb.Linq.FirstOrDefault ( org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.VDSGroup > Cast ( getItems ( ) ) , new org.ovirt.engine.ui.uicommonweb.Linq.ClusterPredicate ( cluster.getId ( ) ) ) ) ; } }
Source:
public static void getSpiceUsbAutoShare ( 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.Boolean ) ( source ) ) . booleanValue ( ) : true ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.SpiceUsbAutoShare , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public static 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 ) ; }
Source:
protected org.ovirt.engine.ui.uicommonweb.UICommand resolveCommand ( ) { return getModel ( ) . getMoveCommand ( ) ; }

Target:
public java.lang.String getButtonToolTip ( ) { if ( ( ( ! ( getModel ( ) . isVmDown ( ) ) ) && ( getModel ( ) . isHotPlugAvailable ( ) ) ) && ( ! ( getModel ( ) . getIsDiskHotPlugSupported ( ) ) ) ) { return constants.diskHotPlugNotSupported ( ) ; } else { return this . getTitle ( ) ; } }