auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
protected void executeIrsBrokerCommand ( ) { org.ovirt.engine.core.vdsbroker.irsbroker.SPMGetVolumeInfoVDSCommand.log.info ( "Executing GetVolumeInfo using the current SPM" ) ; org.ovirt.engine.core.common.vdscommands.GetVolumeInfoVDSCommandParameters params = new org.ovirt.engine.core.common.vdscommands.GetVolumeInfoVDSCommandParameters ( org.ovirt.engine.core.vdsbroker.irsbroker.SPMGetVolumeInfoVDSCommand.getCurrentIrsProxyData ( ) . getCurrentVdsId ( ) , org.ovirt.engine.core.vdsbroker.irsbroker.SPMGetVolumeInfoVDSCommand.getParameters ( ) . getStoragePoolId ( ) , org.ovirt.engine.core.vdsbroker.irsbroker.SPMGetVolumeInfoVDSCommand.getParameters ( ) . getStorageDomainId ( ) , org.ovirt.engine.core.vdsbroker.irsbroker.SPMGetVolumeInfoVDSCommand.getParameters ( ) . getImageGroupId ( ) , org.ovirt.engine.core.vdsbroker.irsbroker.SPMGetVolumeInfoVDSCommand.getParameters ( ) . getImageId ( ) ) ; params.setExpectedEngineErrors ( org.ovirt.engine.core.vdsbroker.irsbroker.SPMGetVolumeInfoVDSCommand.getParameters ( ) . getExpectedEngineErrors ( ) ) ; setVDSReturnValue ( resourceManager.runVdsCommand ( VDSCommandType.GetVolumeInfo , params ) ) ; }

Target:
protected void executeIrsBrokerCommand ( ) { org.ovirt.engine.core.vdsbroker.irsbroker.SPMGetVolumeInfoVDSCommand.log.info ( "Executing GetVolumeInfo using the current SPM" ) ; org.ovirt.engine.core.common.vdscommands.GetVolumeInfoVDSCommandParameters params = new org.ovirt.engine.core.common.vdscommands.GetVolumeInfoVDSCommandParameters ( org.ovirt.engine.core.vdsbroker.irsbroker.SPMGetVolumeInfoVDSCommand.getCurrentIrsProxy ( ) . getCurrentVdsId ( ) , org.ovirt.engine.core.vdsbroker.irsbroker.SPMGetVolumeInfoVDSCommand.getParameters ( ) . getStoragePoolId ( ) , org.ovirt.engine.core.vdsbroker.irsbroker.SPMGetVolumeInfoVDSCommand.getParameters ( ) . getStorageDomainId ( ) , org.ovirt.engine.core.vdsbroker.irsbroker.SPMGetVolumeInfoVDSCommand.getParameters ( ) . getImageGroupId ( ) , org.ovirt.engine.core.vdsbroker.irsbroker.SPMGetVolumeInfoVDSCommand.getParameters ( ) . getImageId ( ) ) ; params.setExpectedEngineErrors ( org.ovirt.engine.core.vdsbroker.irsbroker.SPMGetVolumeInfoVDSCommand.getParameters ( ) . getExpectedEngineErrors ( ) ) ; setVDSReturnValue ( resourceManager.runVdsCommand ( VDSCommandType.GetVolumeInfo , params ) ) ; }
Source:
protected void buildVmBootOptions ( ) { if ( ! ( org.apache.commons.lang.StringUtils.isEmpty ( vm.getinitrd_url ( ) ) ) ) { createInfo.add ( VdsProperties.InitrdUrl , vm.getinitrd_url ( ) ) ; } if ( ! ( org.apache.commons.lang.StringUtils.isEmpty ( vm.getkernel_url ( ) ) ) ) { createInfo.add ( VdsProperties.KernelUrl , vm.getkernel_url ( ) ) ; if ( ! ( org.apache.commons.lang.StringUtils.isEmpty ( vm.getkernel_params ( ) ) ) ) { createInfo.add ( VdsProperties.KernelParams , vm.getkernel_params ( ) ) ; } } }

Target:
protected void buildVmBootOptions ( ) { if ( ! ( org.apache.commons.lang.StringUtils.isEmpty ( vm.getInitrdUrl ( ) ) ) ) { createInfo.add ( VdsProperties.InitrdUrl , vm.getInitrdUrl ( ) ) ; } if ( ! ( org.apache.commons.lang.StringUtils.isEmpty ( vm.getKernelUrl ( ) ) ) ) { createInfo.add ( VdsProperties.KernelUrl , vm.getKernelUrl ( ) ) ; if ( ! ( org.apache.commons.lang.StringUtils.isEmpty ( vm.getKernelParams ( ) ) ) ) { createInfo.add ( VdsProperties.KernelParams , vm.getKernelParams ( ) ) ; } } }
Source:
public static void logError ( org.ovirt.engine.core.utils.log.Log log , java.lang.String id , java.lang.Object obj , java.lang.Throwable t ) { org.ovirt.engine.core.utils.log.Logged logged = org.ovirt.engine.core.utils.log.LoggedUtils.getAnnotation ( obj ) ; if ( ( logged != null ) && ( org.ovirt.engine.core.utils.log.LoggedUtils.isLogLevelOn ( log , logged.errorLevel ( ) ) ) ) { org.ovirt.engine.core.utils.log.LoggedUtils.log ( log , logged.errorLevel ( ) , org.ovirt.engine.core.utils.log.LoggedUtils.ERROR_LOG , org.ovirt.engine.core.utils.log.LoggedUtils.determineMessage ( log , logged , obj ) , org.apache.commons.lang.exception.ExceptionUtils.getMessage ( t ) , id , t ) ; } }

Target:
public static void logError ( org.slf4j.Logger log , java.lang.String id , java.lang.Object obj , java.lang.Throwable t ) { org.ovirt.engine.core.utils.log.Logged logged = org.ovirt.engine.core.utils.log.LoggedUtils.getAnnotation ( obj ) ; if ( ( logged != null ) && ( org.ovirt.engine.core.utils.log.LoggedUtils.isLogLevelOn ( log , logged.errorLevel ( ) ) ) ) { org.ovirt.engine.core.utils.log.LoggedUtils.log ( log , logged.errorLevel ( ) , org.ovirt.engine.core.utils.log.LoggedUtils.ERROR_LOG , org.ovirt.engine.core.utils.log.LoggedUtils.determineMessage ( log , logged , obj ) , org.apache.commons.lang.exception.ExceptionUtils.getMessage ( t ) , id ) ; log.error ( "Exception" , t ) ; } }
Source:
public static void getAllProvidersByType ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.common.businessentities.ProviderType providerType ) { 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.Provider > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllProviders , new org.ovirt.engine.core.common.queries.GetAllProvidersParameters ( providerType ) , aQuery ) ; }

Target:
public static void getProviderCertificateChain ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.common.businessentities.Provider provider ) { 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.GetProviderCertificateChain , new org.ovirt.engine.core.common.queries.ProviderQueryParameters ( provider ) , aQuery ) ; }
Source:
private void initManualWidgets ( ) { nicTypeEditor = new org.ovirt.engine.ui.common.widget.editor.ListModelListBoxEditor < java.lang.Object > ( new org.ovirt.engine.ui.common.widget.renderer.EnumRenderer ( ) ) ; pluggedEditor = new org.ovirt.engine.ui.common.widget.editor.EntityModelRadioButtonEditor ( "cardStatus" ) ; unpluggedEditor = new org.ovirt.engine.ui.common.widget.editor.EntityModelRadioButtonEditor ( "cardStatus" ) ; linkedEditor = new org.ovirt.engine.ui.common.widget.editor.EntityModelRadioButtonEditor ( "linkState" ) ; unlinkedEditor = new org.ovirt.engine.ui.common.widget.editor.EntityModelRadioButtonEditor ( "linkState" ) ; enableManualMacCheckbox = new org.ovirt.engine.ui.common.widget.editor.EntityModelCheckBoxEditor ( org.ovirt.engine.ui.common.widget.Align.RIGHT ) ; }

Target:
private void initManualWidgets ( ) { nicTypeEditor = new org.ovirt.engine.ui.common.widget.editor.ListModelListBoxEditor < org.ovirt.engine.core.common.businessentities.network.VmInterfaceType > ( new org.ovirt.engine.ui.common.widget.renderer.EnumRenderer ( ) ) ; pluggedEditor = new org.ovirt.engine.ui.common.widget.editor.generic.EntityModelRadioButtonEditor ( "cardStatus" ) ; unpluggedEditor = new org.ovirt.engine.ui.common.widget.editor.generic.EntityModelRadioButtonEditor ( "cardStatus" ) ; linkedEditor = new org.ovirt.engine.ui.common.widget.editor.generic.EntityModelRadioButtonEditor ( "linkState" ) ; unlinkedEditor = new org.ovirt.engine.ui.common.widget.editor.generic.EntityModelRadioButtonEditor ( "linkState" ) ; enableManualMacCheckbox = new org.ovirt.engine.ui.common.widget.editor.generic.EntityModelCheckBoxEditor ( org.ovirt.engine.ui.common.widget.Align.RIGHT ) ; }
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:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc refreshStoragePool ( java.lang.String spUUID , java.lang.String msdUUID , int masterVersion ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "StoragePool.refresh" ) . withParameter ( "storagepoolID" , spUUID ) . withParameter ( "masterSdUUID" , msdUUID ) . withParameter ( "masterVersion" , masterVersion ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( response ) ; }

Target:
public org.ovirt.engine.core.vdsbroker.irsbroker.StatusReturnForXmlRpc verifyUntrustedVolume ( java.lang.String spID , java.lang.String sdID , java.lang.String imageID , java.lang.String volumeID ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "Volume.verify_untrusted" ) . withParameter ( "storagepoolID" , spID ) . withParameter ( "storagedomainID" , sdID ) . withParameter ( "imageID" , imageID ) . withParameter ( "volumeID" , volumeID ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) ; return new org.ovirt.engine.core.vdsbroker.irsbroker.StatusReturnForXmlRpc ( response ) ; }
Source:
protected void syncSearch ( ) { super . syncSearch ( ) ; org.ovirt.engine.core.common.queries.IdQueryParameters params = new org.ovirt.engine.core.common.queries.IdQueryParameters ( getEntity ( ) . getId ( ) ) ; params.setRefresh ( getIsQueryFirstTime ( ) ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAttachedClustersByClusterPolicyId , params , new org.ovirt.engine.ui.uicommonweb.models.configure.scheduling.SetItemsAsyncQuery ( ) ) ; setIsQueryFirstTime ( false ) ; }

Target:
protected void syncSearch ( ) { super . syncSearch ( ) ; org.ovirt.engine.core.common.queries.IdQueryParameters params = new org.ovirt.engine.core.common.queries.IdQueryParameters ( getEntity ( ) . getId ( ) ) ; params.setRefresh ( getIsQueryFirstTime ( ) ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( QueryType.GetAttachedClustersByClusterPolicyId , params , new org.ovirt.engine.ui.uicommonweb.models.configure.scheduling.SetItemsAsyncQuery ( ) ) ; setIsQueryFirstTime ( false ) ; }
Source:
public static java.util.Date UtcDateStringToLocaDate ( java.lang.String str ) { if ( org.ovirt.engine.core.compat.StringHelper.isNullOrEmpty ( str ) ) { return null ; } try { return org.ovirt.engine.core.utils.ovf.OvfParser.getDateFormat ( org.ovirt.engine.core.utils.ovf.OvfParser.utcDateFormatStr ) . parse ( str ) ; } catch ( java.text.ParseException e1 ) { try { return org.ovirt.engine.core.utils.ovf.OvfParser.getDateFormat ( org.ovirt.engine.core.utils.ovf.OvfParser.utcFallbackDateFormatStr ) . parse ( str ) ; } catch ( java.text.ParseException e ) { org.ovirt.engine.core.utils.ovf.OvfParser.log.error ( "OVF DateTime format Error, Expected: yyyy/M/dd hh:mm:ss" , e ) ; return null ; } } }

Target:
public static java.util.Date UtcDateStringToLocaDate ( java.lang.String str ) { if ( org.apache.commons.lang.StringUtils.isBlank ( str ) ) { return null ; } try { return org.ovirt.engine.core.utils.ovf.OvfParser.getDateFormat ( org.ovirt.engine.core.utils.ovf.OvfParser.utcDateFormatStr ) . parse ( str ) ; } catch ( java.text.ParseException e1 ) { try { return org.ovirt.engine.core.utils.ovf.OvfParser.getDateFormat ( org.ovirt.engine.core.utils.ovf.OvfParser.utcFallbackDateFormatStr ) . parse ( str ) ; } catch ( java.text.ParseException e ) { org.ovirt.engine.core.utils.ovf.OvfParser.log.error ( "OVF DateTime format Error, Expected: yyyy/M/dd hh:mm:ss" , e ) ; return null ; } } }
Source:
public void canDoActionFailsOnNullCluster ( ) { cmd = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.gluster.EnableGlusterHookCommand ( new org.ovirt.engine.core.common.action.gluster.GlusterHookParameters ( null , org.ovirt.engine.core.bll.gluster.EnableGlusterHookCommandTest.HOOK_ID ) ) ) ; setupMocks ( ) ; org.junit.Assert.assertFalse ( cmd.canDoAction ( ) ) ; }

Target:
public void canDoActionFailsOnNoHook ( ) { cmd = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.gluster.EnableGlusterHookCommand ( new org.ovirt.engine.core.common.action.gluster.GlusterHookParameters ( CLUSTER_ID , HOOK_ID ) ) ) ; setupMocks ( cmd , false ) ; org.junit.Assert.assertFalse ( cmd.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( cmd.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( VdcBllMessages.ACTION_TYPE_FAILED_GLUSTER_HOOK_DOES_NOT_EXIST.toString ( ) ) ) ; }
Source:
private java.lang.String getConnectionDescription ( java.util.List < org.ovirt.engine.core.common.businessentities.StorageServerConnections > connections , java.lang.String connectionId ) { org.ovirt.engine.core.compat.Guid connectionIdGuid = org.ovirt.engine.core.compat.Guid.createGuidFromStringDefaultEmpty ( connectionId ) ; for ( org.ovirt.engine.core.common.businessentities.StorageServerConnections connection : connections ) { org.ovirt.engine.core.compat.Guid connectionGuid = org.ovirt.engine.core.compat.Guid.createGuidFromStringDefaultEmpty ( connection.getid ( ) ) ; if ( connectionGuid.equals ( connectionIdGuid ) ) { java.lang.String desc = connection.getconnection ( ) ; if ( ( connection.getiqn ( ) ) != null ) { desc += " " + ( connection.getiqn ( ) ) ; } return desc ; } } return "" ; }

Target:
private java.lang.String getConnectionDescription ( java.util.List < org.ovirt.engine.core.common.businessentities.StorageServerConnections > connections , java.lang.String connectionId ) { org.ovirt.engine.core.compat.Guid connectionIdGuid = org.ovirt.engine.core.compat.Guid.createGuidFromStringDefaultEmpty ( connectionId ) ; for ( org.ovirt.engine.core.common.businessentities.StorageServerConnections connection : connections ) { org.ovirt.engine.core.compat.Guid connectionGuid = org.ovirt.engine.core.compat.Guid.createGuidFromStringDefaultEmpty ( connection.getId ( ) ) ; if ( connectionGuid.equals ( connectionIdGuid ) ) { java.lang.String desc = connection.getConnection ( ) ; if ( ( connection.getIqn ( ) ) != null ) { desc += " " + ( connection.getIqn ( ) ) ; } return desc ; } } return "" ; }
Source:
private static void removeNetworkFromHosts ( org.ovirt.engine.core.common.businessentities.network.Network network , org.ovirt.engine.core.bll.context.CommandContext context , java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > nics ) { org.ovirt.engine.core.bll.network.RemoveNetworkParametersBuilder builder = org.ovirt.engine.core.di.Injector.get ( org.ovirt.engine.core.bll.network.RemoveNetworkParametersBuilder.class ) ; java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > parameters = builder.buildParameters ( network , nics ) ; if ( ! ( parameters.isEmpty ( ) ) ) { org.ovirt.engine.core.bll.network.HostSetupNetworksParametersBuilder.updateParametersSequencing ( parameters ) ; org.ovirt.engine.core.bll.Backend.getInstance ( ) . runInternalMultipleActions ( VdcActionType.PersistentHostSetupNetworks , parameters , context ) ; } }

Target:
private static void removeNetworkFromHosts ( org.ovirt.engine.core.common.businessentities.network.Network network , org.ovirt.engine.core.bll.context.CommandContext context , java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > nics ) { org.ovirt.engine.core.bll.network.RemoveNetworkParametersBuilder builder = org.ovirt.engine.core.di.Injector.get ( org.ovirt.engine.core.bll.network.RemoveNetworkParametersBuilder.class ) ; java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > parameters = builder.buildParameters ( network , nics ) ; if ( ! ( parameters.isEmpty ( ) ) ) { org.ovirt.engine.core.bll.network.HostSetupNetworksParametersBuilder.updateParametersSequencing ( parameters ) ; org.ovirt.engine.core.bll.Backend.getInstance ( ) . runInternalMultipleActions ( ActionType.PersistentHostSetupNetworks , parameters , context ) ; } }
Source:
public void testCanEditARunningVM ( ) { prepareVmToPassCanDoAction ( ) ; vm.setStatus ( VMStatus.Up ) ; mockDiskDaoGetAllForVm ( java.util.Collections.< org.ovirt.engine.core.common.businessentities.storage.Disk > emptyList ( ) , true ) ; mockVmValidator ( ) ; org.mockito.Mockito.doReturn ( vmDeviceDao ) . when ( command ) . getVmDeviceDao ( ) ; org.mockito.Mockito.doReturn ( true ) . when ( command ) . areUpdatedFieldsLegal ( ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionSuccess ( command ) ; }

Target:
public void testCanEditARunningVM ( ) { prepareVmToPassValidate ( ) ; vm.setStatus ( VMStatus.Up ) ; mockDiskDaoGetAllForVm ( java.util.Collections.< org.ovirt.engine.core.common.businessentities.storage.Disk > emptyList ( ) , true ) ; mockVmValidator ( ) ; org.mockito.Mockito.doReturn ( vmDeviceDao ) . when ( command ) . getVmDeviceDao ( ) ; org.mockito.Mockito.doReturn ( true ) . when ( command ) . areUpdatedFieldsLegal ( ) ; command.initEffectiveCompatibilityVersion ( ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateSuccess ( command ) ; }
Source:
protected void setUpEntityQueryExpectations ( int times , java.lang.Object failure ) throws java.lang.Exception { while ( ( times -- ) > 0 ) { setUpEntityQueryExpectations ( VdcQueryType.GetVdsInterfacesByVdsId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendHostNicsResourceTest.PARENT_GUID } , org.ovirt.engine.api.restapi.resource.BackendHostNicsResourceTest.setUpInterfaces ( ) ) ; } }

Target:
protected void setUpQueryExpectations ( java.lang.String query , java.lang.Object failure ) throws java.lang.Exception { assertEquals ( "" , query ) ; setUpEntityQueryExpectations ( VdcQueryType.GetVdsInterfacesByVdsId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendHostNicsResourceTest.PARENT_GUID } , org.ovirt.engine.api.restapi.resource.BackendHostNicsResourceTest.setUpInterfaces ( ) , failure ) ; control.replay ( ) ; }
Source:
private void onSaveSanStorage ( ) { org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel confirmationModel = ( ( org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel ) ( getConfirmWindow ( ) ) ) ; if ( ( confirmationModel != null ) && ( ! ( confirmationModel.validate ( ) ) ) ) { return ; } cancelConfirm ( ) ; getWindow ( ) . startProgress ( null ) ; org.ovirt.engine.ui.uicompat.Task.Create ( this , new java.util.ArrayList < java.lang.Object > ( java.util.Arrays.asList ( new java.lang.Object [ ] { "SaveSan" } ) ) ) . Run ( ) ; }

Target:
private void onSaveSanStorage ( ) { org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel confirmationModel = ( ( org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel ) ( getConfirmWindow ( ) ) ) ; if ( ( confirmationModel != null ) && ( ! ( confirmationModel.validate ( ) ) ) ) { return ; } cancelConfirm ( ) ; getWindow ( ) . startProgress ( null ) ; org.ovirt.engine.ui.uicompat.Task.create ( this , new java.util.ArrayList < java.lang.Object > ( java.util.Arrays.asList ( new java.lang.Object [ ] { "SaveSan" } ) ) ) . Run ( ) ; }
Source:
public void serializeVdsActionParameters ( ) { org.ovirt.engine.core.common.action.ActionParametersBase params = new org.ovirt.engine.core.common.action.ActionParametersBase ( ) ; params.setLockProperties ( org.ovirt.engine.core.common.action.LockProperties.create ( Scope.None ) . withWait ( true ) ) ; org.ovirt.engine.core.utils.serialization.json.JsonObjectSerializer serializer = new org.ovirt.engine.core.utils.serialization.json.JsonObjectSerializer ( ) ; org.junit.Assert.assertTrue ( ( ( serializer.serialize ( params ) . length ( ) ) > 0 ) ) ; }

Target:
public void serializeVdsActionParameters ( ) { org.ovirt.engine.core.common.action.ActionParametersBase params = new org.ovirt.engine.core.common.action.ActionParametersBase ( ) ; params.setLockProperties ( org.ovirt.engine.core.common.action.LockProperties.create ( Scope.None ) . withWait ( true ) ) ; org.ovirt.engine.core.utils.serialization.json.JsonObjectSerializer serializer = new org.ovirt.engine.core.utils.serialization.json.JsonObjectSerializer ( ) ; org.junit.jupiter.api.Assertions.assertTrue ( ( ( serializer.serialize ( params ) . length ( ) ) > 0 ) ) ; }
Source:
public void testPatternBasedNameFails ( ) { org.ovirt.engine.core.bll.AddVmCommand < org.ovirt.engine.core.common.action.AddVmParameters > cmd = createCommand ( initializeMock ( 1 , 1 ) ) ; cmd.getParameters ( ) . getVm ( ) . setName ( "aa-??bb" ) ; org.junit.Assert.assertFalse ( "Pattern-based name should not be supported for VM" , cmd.validateInputs ( ) ) ; }

Target:
public void testBeanValidations ( ) { org.junit.Assert.assertTrue ( createCommand ( initializeMock ( 1 ) ) . validateInputs ( ) ) ; }
Source:
private boolean isRunningConfigurationNeeded ( ) { return ( org.ovirt.engine.core.bll.UpdateVmCommand.getVm ( ) . isNextRunConfigurationExists ( ) ) || ( ! ( org.ovirt.engine.core.bll.VmHandler.isUpdateValid ( org.ovirt.engine.core.bll.UpdateVmCommand.getVm ( ) . getStaticData ( ) , org.ovirt.engine.core.bll.UpdateVmCommand.getParameters ( ) . getVmStaticData ( ) , org.ovirt.engine.core.bll.UpdateVmCommand.getVm ( ) . getStatus ( ) ) ) ) ; }

Target:
private boolean isRunningConfigurationNeeded ( ) { return ( ( org.ovirt.engine.core.bll.UpdateVmCommand.getVm ( ) . isNextRunConfigurationExists ( ) ) || ( ! ( org.ovirt.engine.core.bll.VmHandler.isUpdateValid ( org.ovirt.engine.core.bll.UpdateVmCommand.getVm ( ) . getStaticData ( ) , org.ovirt.engine.core.bll.UpdateVmCommand.getParameters ( ) . getVmStaticData ( ) , org.ovirt.engine.core.bll.UpdateVmCommand.getVm ( ) . getStatus ( ) ) ) ) ) || ( ! ( org.ovirt.engine.core.bll.VmHandler.isUpdateValidForVmDevices ( getVmId ( ) , org.ovirt.engine.core.bll.UpdateVmCommand.getVm ( ) . getStatus ( ) , org.ovirt.engine.core.bll.UpdateVmCommand.getParameters ( ) ) ) ) ; }
Source:
protected void verifyCollection ( java.util.List < org.ovirt.engine.api.model.Watchdog > collection ) { org.junit.Assert.assertNotNull ( collection ) ; org.junit.Assert.assertEquals ( 1 , collection.size ( ) ) ; if ( ! ( collection.isEmpty ( ) ) ) { verifyModel ( collection.get ( 0 ) ) ; } }

Target:
protected void verifyCollection ( java.util.List < org.ovirt.engine.api.model.Watchdog > collection ) { org.junit.jupiter.api.Assertions.assertNotNull ( collection ) ; org.junit.jupiter.api.Assertions.assertEquals ( 1 , collection.size ( ) ) ; if ( ! ( collection.isEmpty ( ) ) ) { verifyModel ( collection.get ( 0 ) ) ; } }
Source:
public void getStorageConnectionsByDataCenterIdAndStorageType ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.common.businessentities.storage.StorageType storageType ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.core.common.queries.GetConnectionsByDataCenterAndStorageTypeParameters params = new org.ovirt.engine.core.common.queries.GetConnectionsByDataCenterAndStorageTypeParameters ( storagePoolId , storageType ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetConnectionsByDataCenterAndStorageType , params , aQuery ) ; }

Target:
public void getPermittedStorageDomainsByStoragePoolId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId , org.ovirt.engine.core.common.businessentities.ActionGroup actionGroup ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ( ) ; } return source ; } } ; org.ovirt.engine.core.common.queries.GetPermittedStorageDomainsByStoragePoolIdParameters params = new org.ovirt.engine.core.common.queries.GetPermittedStorageDomainsByStoragePoolIdParameters ( ) ; params.setStoragePoolId ( dataCenterId ) ; params.setActionGroup ( actionGroup ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetPermittedStorageDomainsByStoragePoolId , params , aQuery ) ; }
Source:
public javax.ws.rs.core.Response importCertificates ( org.ovirt.engine.api.model.Action action ) { org.ovirt.engine.core.common.businessentities.Provider provider = org.ovirt.engine.api.restapi.resource.BackendExternalProviderHelper.getProvider ( this , id ) ; org.ovirt.engine.core.common.action.ProviderParameters parameters = new org.ovirt.engine.core.common.action.ProviderParameters ( provider ) ; return performAction ( VdcActionType.ImportProviderCertificateChain , parameters ) ; }

Target:
public javax.ws.rs.core.Response importCertificates ( org.ovirt.engine.api.model.Action action ) { org.ovirt.engine.core.common.businessentities.Provider provider = org.ovirt.engine.api.restapi.resource.BackendExternalProviderHelper.getProvider ( this , id ) ; java.util.List < org.ovirt.engine.core.common.businessentities.CertificateInfo > entities = getBackendCollection ( org.ovirt.engine.core.common.businessentities.CertificateInfo.class , VdcQueryType.GetProviderCertificateChain , new org.ovirt.engine.core.common.queries.ProviderQueryParameters ( provider ) ) ; if ( ( entities.size ( ) ) == 0 ) { return null ; } return performAction ( VdcActionType.ImportProviderCertificate , new org.ovirt.engine.core.common.action.ImportProviderCertificateParameters ( provider , entities.get ( 0 ) . getPayload ( ) ) ) ; }
Source:
public boolean storageDomainRemoved ( org.ovirt.engine.core.common.businessentities.StorageDomainStatic storageDomain ) { java.util.List < org.ovirt.engine.core.common.businessentities.StorageServerConnections > list = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStorageServerConnectionDao ( ) . getAllForVolumeGroup ( storageDomain.getStorage ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.StorageServerConnections connection : FilterConnectionsUsedByOthers ( list , storageDomain.getStorage ( ) ) ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStorageServerConnectionDao ( ) . remove ( connection.getid ( ) ) ; } removeStorageDomainLuns ( storageDomain ) ; return true ; }

Target:
public boolean storageDomainRemoved ( org.ovirt.engine.core.common.businessentities.StorageDomainStatic storageDomain ) { java.util.List < org.ovirt.engine.core.common.businessentities.StorageServerConnections > list = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStorageServerConnectionDao ( ) . getAllForVolumeGroup ( storageDomain.getStorage ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.StorageServerConnections connection : filterConnectionsUsedByOthers ( list , storageDomain.getStorage ( ) , "" ) ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStorageServerConnectionDao ( ) . remove ( connection.getid ( ) ) ; } removeStorageDomainLuns ( storageDomain ) ; return true ; }
Source:
protected boolean validateVdsCluster ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VDSGroup > groups = org.ovirt.engine.core.bll.ImportVmCommand.getVdsGroupDAO ( ) . getAllForStoragePool ( getParameters ( ) . getStoragePoolId ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.VDSGroup group : groups ) { if ( group.getId ( ) . equals ( getParameters ( ) . getVdsGroupId ( ) ) ) { if ( ( group.getArchitecture ( ) ) != ( getVm ( ) . getClusterArch ( ) ) ) { return failCanDoAction ( VdcBllMessages.ACTION_TYPE_FAILED_VM_CANNOT_IMPORT_VM_ARCHITECTURE_NOT_SUPPORTED_BY_CLUSTER ) ; } return true ; } } return failCanDoAction ( VdcBllMessages.VDS_CLUSTER_IS_NOT_VALID ) ; }

Target:
private java.util.Collection < org.ovirt.engine.core.common.businessentities.storage.DiskImage > getVmDisksDummies ( ) { java.util.Collection < org.ovirt.engine.core.common.businessentities.storage.DiskImage > disksDummies = new java.util.LinkedList < > ( ) ; for ( org.ovirt.engine.core.compat.Guid storageDomainId : getParameters ( ) . getImageToDestinationDomainMap ( ) . values ( ) ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage diskImage = new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ; diskImage.setStorageIds ( new java.util.ArrayList < org.ovirt.engine.core.compat.Guid > ( java.util.Arrays.asList ( storageDomainId ) ) ) ; disksDummies.add ( diskImage ) ; } return disksDummies ; }
Source:
private boolean SelectedItemsContainBlankTemplate ( ) { if ( ( getSelectedItems ( ) ) != null ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmTemplate > templates = org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.VmTemplate > Cast ( getSelectedItems ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.VmTemplate template : templates ) { if ( ( template != null ) && ( template.getId ( ) . equals ( NGuid.Empty ) ) ) { return true ; } } } return false ; }

Target:
private boolean SelectedItemsContainBlankTemplate ( ) { if ( ( getSelectedItems ( ) ) != null ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmTemplate > templates = org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.VmTemplate > cast ( getSelectedItems ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.VmTemplate template : templates ) { if ( ( template != null ) && ( template.getId ( ) . equals ( NGuid.Empty ) ) ) { return true ; } } } return false ; }
Source:
protected org.ovirt.engine.core.bll.AddVmPoolWithVmsCommand < org.ovirt.engine.core.common.action.AddVmPoolWithVmsParameters > createCommand ( ) { org.ovirt.engine.core.common.action.AddVmPoolWithVmsParameters param = new org.ovirt.engine.core.common.action.AddVmPoolWithVmsParameters ( vmPools , testVm , VM_COUNT , DISK_SIZE ) ; param.setStorageDomainId ( firstStorageDomainId ) ; org.ovirt.engine.core.bll.AddVmPoolWithVmsCommand < org.ovirt.engine.core.common.action.AddVmPoolWithVmsParameters > command = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.AddVmPoolWithVmsCommand < org.ovirt.engine.core.common.action.AddVmPoolWithVmsParameters > ( param ) { @ java.lang.Override protected void initUser ( ) { } @ java.lang.Override protected void initTemplate ( ) { } } ) ; return command ; }

Target:
protected org.ovirt.engine.core.bll.AddVmPoolWithVmsCommand < org.ovirt.engine.core.common.action.AddVmPoolWithVmsParameters > createCommand ( ) { org.ovirt.engine.core.common.action.AddVmPoolWithVmsParameters param = new org.ovirt.engine.core.common.action.AddVmPoolWithVmsParameters ( vmPools , testVm , VM_COUNT , DISK_SIZE ) ; param.setStorageDomainId ( firstStorageDomainId ) ; org.ovirt.engine.core.bll.AddVmPoolWithVmsCommand < org.ovirt.engine.core.common.action.AddVmPoolWithVmsParameters > command = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.AddVmPoolWithVmsCommand < org.ovirt.engine.core.common.action.AddVmPoolWithVmsParameters > ( param , org.ovirt.engine.core.bll.context.CommandContext.createContext ( param.getSessionId ( ) ) ) { @ java.lang.Override protected void initUser ( ) { } @ java.lang.Override protected void initTemplate ( ) { } } ) ; return command ; }
Source:
public void onRemove ( ) { org.ovirt.engine.core.common.businessentities.Bookmark selectedBookmark = ( ( org.ovirt.engine.core.common.businessentities.Bookmark ) ( getSelectedItem ( ) ) ) ; org.ovirt.engine.core.common.action.BookmarksParametersBase parameters = new org.ovirt.engine.core.common.action.BookmarksParametersBase ( selectedBookmark.getbookmark_id ( ) ) ; org.ovirt.engine.ui.uicompat.IFrontendActionAsyncCallback async = new org.ovirt.engine.ui.uicompat.IFrontendActionAsyncCallback ( ) { @ java.lang.Override public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { postOnSave ( result.getReturnValue ( ) ) ; } } ; getWindow ( ) . startProgress ( null ) ; org.ovirt.engine.ui.frontend.Frontend.RunAction ( VdcActionType.RemoveBookmark , parameters , async ) ; }

Target:
public void onRemove ( ) { org.ovirt.engine.core.common.businessentities.Bookmark selectedBookmark = ( ( org.ovirt.engine.core.common.businessentities.Bookmark ) ( getSelectedItem ( ) ) ) ; org.ovirt.engine.core.common.action.BookmarksParametersBase parameters = new org.ovirt.engine.core.common.action.BookmarksParametersBase ( selectedBookmark.getbookmark_id ( ) ) ; org.ovirt.engine.ui.uicompat.IFrontendActionAsyncCallback async = new org.ovirt.engine.ui.uicompat.IFrontendActionAsyncCallback ( ) { @ java.lang.Override public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { postOnSave ( result.getReturnValue ( ) ) ; } } ; getWindow ( ) . startProgress ( null ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runAction ( VdcActionType.RemoveBookmark , parameters , async ) ; }
Source:
public void isUSBEnabledByDefault ( 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 ( ) : false ; } } ; getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.EnableUSBAsDefault , getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public void getVolumeSnapshotSchedule ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid volumeId ) { 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.GetGlusterVolumeSnapshotScheduleByVolumeId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( volumeId ) , aQuery ) ; }
Source:
protected void updateMemoryBalloon ( ) { if ( ( getModel ( ) . getSelectedCluster ( ) ) != null ) { org.ovirt.engine.core.common.businessentities.VDSGroup cluster = getModel ( ) . getSelectedCluster ( ) ; boolean hasMemoryBalloon = ( cluster.getcompatibility_version ( ) . compareTo ( VmListModel.BALLOON_DEVICE_MIN_VERSION ) ) >= 0 ; getModel ( ) . getMemoryBalloonDeviceEnabled ( ) . setIsAvailable ( hasMemoryBalloon ) ; } }

Target:
protected void updateVirtioScsiAvailability ( ) { org.ovirt.engine.core.common.businessentities.VDSGroup cluster = getModel ( ) . getSelectedCluster ( ) ; boolean isVirtioScsiEnabled = ( ( java.lang.Boolean ) ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigValuePreConverted ( ConfigurationValues.VirtIoScsiEnabled , cluster.getcompatibility_version ( ) . getValue ( ) ) ) ) ; getModel ( ) . getIsVirtioScsiEnabled ( ) . setIsAvailable ( isVirtioScsiEnabled ) ; }
Source:
public void testCompareRpmRelease ( ) { org.junit.Assert.assertEquals ( ( - 1 ) , org.ovirt.engine.core.common.utils.RpmVersionUtils.compareRpmParts ( "2.3.10.4.fc18.x86_64" , "2.3.10.4.fc19.x86_64" ) ) ; org.junit.Assert.assertEquals ( 1 , org.ovirt.engine.core.common.utils.RpmVersionUtils.compareRpmParts ( "20130821.fc18.x86_64" , "20130820.fc18.x86_64" ) ) ; org.junit.Assert.assertEquals ( ( - 1 ) , org.ovirt.engine.core.common.utils.RpmVersionUtils.compareRpmParts ( "20130820.0.fc18.x86_64" , "20130820.1.fc18.x86_64" ) ) ; org.junit.Assert.assertEquals ( 1 , org.ovirt.engine.core.common.utils.RpmVersionUtils.compareRpmParts ( "20130820.0.fc18.x86_64" , "20130820.fc18.x86_64" ) ) ; org.junit.Assert.assertEquals ( 1 , org.ovirt.engine.core.common.utils.RpmVersionUtils.compareRpmParts ( "20130820.1.3.fc18.x86_64" , "20130820.1.fc18.x86_64" ) ) ; }

Target:
public void testCompareRpmRelease ( ) { org.junit.jupiter.api.Assertions.assertEquals ( ( - 1 ) , org.ovirt.engine.core.common.utils.RpmVersionUtils.compareRpmParts ( "2.3.10.4.fc18.x86_64" , "2.3.10.4.fc19.x86_64" ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( 1 , org.ovirt.engine.core.common.utils.RpmVersionUtils.compareRpmParts ( "20130821.fc18.x86_64" , "20130820.fc18.x86_64" ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( ( - 1 ) , org.ovirt.engine.core.common.utils.RpmVersionUtils.compareRpmParts ( "20130820.0.fc18.x86_64" , "20130820.1.fc18.x86_64" ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( 1 , org.ovirt.engine.core.common.utils.RpmVersionUtils.compareRpmParts ( "20130820.0.fc18.x86_64" , "20130820.fc18.x86_64" ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( 1 , org.ovirt.engine.core.common.utils.RpmVersionUtils.compareRpmParts ( "20130820.1.3.fc18.x86_64" , "20130820.1.fc18.x86_64" ) ) ; }
Source:
protected void endWithFailure ( ) { super . endWithFailure ( ) ; }

Target:
protected void endWithFailure ( ) { if ( isConsiderSuccessful ( ) ) { auditLog ( this , AuditLogType.USER_MOVE_IMAGE_GROUP_FAILED_TO_DELETE_SRC_IMAGE ) ; this . endSuccessfully ( ) ; return ; } super . endWithFailure ( ) ; handleDestDisk ( ) ; unlockDisk ( ) ; org.ovirt.engine.core.bll.storage.lsm.LiveMigrateDiskCommand.setSucceeded ( true ) ; }
Source:
public void initialize ( ) { super . initialize ( ) ; getIsPlugged ( ) . setIsAvailable ( true ) ; if ( ( getVm ( ) . getId ( ) ) != null ) { loadAttachableDisks ( ) ; } }

Target:
public void initialize ( ) { super . initialize ( ) ; getIsPlugged ( ) . setIsAvailable ( true ) ; if ( ( getVm ( ) . getId ( ) ) != null ) { loadAttachableDisks ( ) ; } getIsBootable ( ) . setIsChangeable ( true ) ; }
Source:
private boolean importSupported ( org.ovirt.engine.core.compat.Version spVersion , org.ovirt.engine.core.compat.Version vdsGroupVersion ) { return ( ( ( Version.v3_5.compareTo ( spVersion ) ) >= 0 ) && ( ( Version.v3_6.compareTo ( vdsGroupVersion ) ) >= 0 ) ) && ( org.ovirt.engine.core.common.config.Config.< java.lang.Boolean > getValue ( ConfigValues.AutoImportHostedEngine ) ) ; }

Target:
private boolean importSupported ( org.ovirt.engine.core.compat.Version spVersion , org.ovirt.engine.core.compat.Version vdsGroupVersion ) { return ( ( spVersion.greaterOrEquals ( Version.v3_5 ) ) && ( vdsGroupVersion.greaterOrEquals ( Version.v3_6 ) ) ) && ( org.ovirt.engine.core.common.config.Config.< java.lang.Boolean > getValue ( ConfigValues.AutoImportHostedEngine ) ) ; }
Source:
public void testUpdateAll ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.VmDynamic existingVm2 = dao.get ( org.ovirt.engine.core.compat.Guid.createGuidFromString ( "77296e00-0cad-4e5a-9299-008a7b6f4356" ) ) ; existingVm.setstatus ( VMStatus.Down ) ; existingVm2.setvm_ip ( "111" ) ; dao.updateAll ( java.util.Arrays.asList ( new org.ovirt.engine.core.common.businessentities.VmDynamic [ ] { existingVm , existingVm2 } ) ) ; org.junit.Assert.assertEquals ( existingVm , dao.get ( existingVm.getId ( ) ) ) ; org.junit.Assert.assertEquals ( existingVm2 , dao.get ( existingVm2.getId ( ) ) ) ; }

Target:
public void testUpdateAll ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.VmDynamic existingVm2 = dao.get ( org.ovirt.engine.core.compat.Guid.createGuidFromString ( "77296e00-0cad-4e5a-9299-008a7b6f4356" ) ) ; existingVm.setStatus ( VMStatus.Down ) ; existingVm2.setVmIp ( "111" ) ; dao.updateAll ( java.util.Arrays.asList ( new org.ovirt.engine.core.common.businessentities.VmDynamic [ ] { existingVm , existingVm2 } ) ) ; org.junit.Assert.assertEquals ( existingVm , dao.get ( existingVm.getId ( ) ) ) ; org.junit.Assert.assertEquals ( existingVm2 , dao.get ( existingVm2.getId ( ) ) ) ; }
Source:
protected void onReveal ( ) { org.ovirt.engine.ui.uicompat.Event entityChangedEvent = getModel ( ) . getDiskViewType ( ) . getEntityChangedEvent ( ) ; if ( ! ( entityChangedEvent.getListeners ( ) . contains ( getView ( ) . getDiskTypeChangedEventListener ( ) ) ) ) { entityChangedEvent.addListener ( getView ( ) . getDiskTypeChangedEventListener ( ) ) ; } super . onReveal ( ) ; }

Target:
protected void onReveal ( ) { org.ovirt.engine.ui.uicompat.Event entityChangedEvent = getModel ( ) . getDiskViewType ( ) . getEntityChangedEvent ( ) ; if ( ! ( entityChangedEvent.getListeners ( ) . contains ( getView ( ) . getDiskTypeChangedEventListener ( ) ) ) ) { entityChangedEvent.addListener ( getView ( ) . getDiskTypeChangedEventListener ( ) ) ; } org.ovirt.engine.ui.uicompat.Event systemTreeSelectedItemChangedEvent = org.ovirt.engine.ui.uicommonweb.models.CommonModel.getInstance ( ) . getSystemTree ( ) . getSelectedItemChangedEvent ( ) ; systemTreeSelectedItemChangedEvent.addListener ( systemTreeListener ) ; super . onReveal ( ) ; getView ( ) . handleQuotaColumnVisibility ( ) ; }
Source:
public static void getTemplateById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid templateId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmTemplate , new org.ovirt.engine.core.common.queries.GetVmTemplateParameters ( templateId ) , aQuery ) ; }

Target:
public static void getTemplateNicList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ) ( source ) ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetTemplateInterfacesByTemplateId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }
Source:
public static void GetGlusterHostsNewlyAdded ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId , boolean isFingerprintRequired ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAddedGlusterServers , new org.ovirt.engine.core.common.queries.gluster.AddedGlusterServersParameters ( clusterId , isFingerprintRequired ) , aQuery ) ; }

Target:
public static void GetRpmVersionViaPublic ( 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.ProductRPMVersion , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
public void testListNonIso ( ) throws java.lang.Exception { try { javax.ws.rs.core.UriInfo uriInfo = setUpUriExpectations ( null ) ; setupGetStorageDomainExpectations ( StorageDomainType.Data ) ; collection.setUriInfo ( uriInfo ) ; verifyCollection ( getCollection ( ) ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }

Target:
public void testListNonIso ( ) throws java.lang.Exception { try { javax.ws.rs.core.UriInfo uriInfo = setUpUriExpectations ( null ) ; setupGetStorageDomainExpectations ( StorageDomainType.Data ) ; collection.setUriInfo ( uriInfo ) ; verifyCollection ( getCollection ( ) ) ; org.junit.Assert.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }
Source:
public void InternalSetVmStatus ( org.ovirt.engine.core.common.businessentities.VM vm , final org.ovirt.engine.core.common.businessentities.VMStatus status ) { vm.setStatus ( status ) ; boolean isVmStatusDown = org.ovirt.engine.core.common.businessentities.VM.isStatusDown ( status ) ; if ( isVmStatusDown || ( status == ( org.ovirt.engine.core.common.businessentities.VMStatus.Unknown ) ) ) { resetVmAttributes ( vm ) ; if ( isVmStatusDown ) { vm.setRunOnVds ( null ) ; vm.setVmPauseStatus ( VmPauseStatus.NONE ) ; } } }

Target:
public void InternalSetVmStatus ( org.ovirt.engine.core.common.businessentities.VM vm , final org.ovirt.engine.core.common.businessentities.VMStatus status , final org.ovirt.engine.core.common.businessentities.VmExitStatus exitStaus , final java.lang.String exitMessage ) { vm.setStatus ( status ) ; vm.setExitStatus ( exitStaus ) ; vm.setExitMessage ( exitMessage ) ; boolean isVmStatusDown = org.ovirt.engine.core.common.businessentities.VM.isStatusDown ( status ) ; if ( isVmStatusDown || ( status == ( org.ovirt.engine.core.common.businessentities.VMStatus.Unknown ) ) ) { resetVmAttributes ( vm ) ; if ( isVmStatusDown ) { vm.setRunOnVds ( null ) ; vm.setVmPauseStatus ( VmPauseStatus.NONE ) ; } } }
Source:
public void edit ( org.ovirt.engine.ui.uicommonweb.models.storage.GlusterStorageModel object ) { driver.edit ( object ) ; pathExampleLabel.setVisible ( ( ( object.getPath ( ) . getIsAvailable ( ) ) && ( object.getPath ( ) . getIsChangable ( ) ) ) ) ; }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event < ? extends org.ovirt.engine.ui.uicompat.EventArgs > ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { boolean showEditor = ! ( glusterStorageModel.getLinkGlusterVolume ( ) . getEntity ( ) ) ; pathEditorRow.setVisible ( showEditor ) ; pathExampleLabel.setVisible ( showEditor ) ; glusterVolumesRow.setVisible ( ( ! showEditor ) ) ; }