auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private void setNonOperational ( org.ovirt.engine.core.common.businessentities.NonOperationalReason reason , org.ovirt.engine.core.common.businessentities.VDS vds , java.util.Map < java.lang.String , java.lang.String > customLogValues ) { org.ovirt.engine.core.common.action.SetNonOperationalVdsParameters tempVar = new org.ovirt.engine.core.common.action.SetNonOperationalVdsParameters ( vds.getId ( ) , reason , customLogValues ) ; org.ovirt.engine.core.bll.Backend.getInstance ( ) . runInternalAction ( VdcActionType.SetNonOperationalVds , tempVar , org.ovirt.engine.core.bll.job.ExecutionHandler.createInternalJobContext ( ) ) ; }

Target:
private void setNonOperational ( org.ovirt.engine.core.common.businessentities.NonOperationalReason reason , org.ovirt.engine.core.common.businessentities.VDS vds , java.util.Map < java.lang.String , java.lang.String > customLogValues ) { org.ovirt.engine.core.common.action.SetNonOperationalVdsParameters tempVar = new org.ovirt.engine.core.common.action.SetNonOperationalVdsParameters ( vds.getId ( ) , reason , customLogValues ) ; org.ovirt.engine.core.bll.Backend.getInstance ( ) . runInternalAction ( ActionType.SetNonOperationalVds , tempVar , org.ovirt.engine.core.bll.job.ExecutionHandler.createInternalJobContext ( ) ) ; }
Source:
private java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > getImagesList ( ) { if ( ( ( org.ovirt.engine.core.bll.RestoreAllSnapshotsCommand.getParameters ( ) . getImagesList ( ) ) == null ) && ( ! ( org.ovirt.engine.core.bll.RestoreAllSnapshotsCommand.getParameters ( ) . getDstSnapshotId ( ) . equals ( Guid.Empty ) ) ) ) { org.ovirt.engine.core.bll.RestoreAllSnapshotsCommand.getParameters ( ) . setImagesList ( org.ovirt.engine.core.bll.RestoreAllSnapshotsCommand.getDiskImageDao ( ) . getAllSnapshotsForVmSnapshot ( org.ovirt.engine.core.bll.RestoreAllSnapshotsCommand.getParameters ( ) . getDstSnapshotId ( ) ) ) ; } return org.ovirt.engine.core.bll.RestoreAllSnapshotsCommand.getParameters ( ) . getImagesList ( ) ; }

Target:
private org.ovirt.engine.core.compat.Guid getSnapshotId ( ) { return org.ovirt.engine.core.bll.RestoreAllSnapshotsCommand.getParameters ( ) . getDstSnapshotId ( ) ; }
Source:
public void setUsePatternFly ( boolean use ) { super . setUsePatternFly ( use ) ; asRadioGroup ( ) . setUsePatternFly ( use ) ; if ( use ) { org.ovirt.engine.ui.common.widget.editor.ListModelRadioGroupEditor.getContentWidgetElement ( ) . removeClassName ( Styles.FORM_CONTROL ) ; removeContentWidgetStyleName ( Styles.FORM_CONTROL ) ; org.ovirt.engine.ui.common.widget.editor.ListModelRadioGroupEditor.getFormLabel ( ) . setVisible ( false ) ; } }

Target:
public void setUsePatternFly ( boolean use ) { super . setUsePatternFly ( use ) ; asRadioGroup ( ) . setUsePatternFly ( use ) ; if ( use ) { org.ovirt.engine.ui.common.widget.editor.ListModelRadioGroupEditor.getContentWidgetElement ( ) . removeClassName ( Styles.FORM_CONTROL ) ; removeContentWidgetStyleName ( Styles.FORM_CONTROL ) ; org.ovirt.engine.ui.common.widget.editor.ListModelRadioGroupEditor.getValidatedWidgetStyle ( ) . setPadding ( 0 , Unit.PX ) ; org.ovirt.engine.ui.common.widget.editor.ListModelRadioGroupEditor.getFormLabel ( ) . setVisible ( false ) ; } }
Source:
public java.util.List < org.ovirt.engine.core.common.businessentities.VDSGroup > getAllWithQuery ( java.lang.String query ) { java.util.List < org.ovirt.engine.core.common.businessentities.VDSGroup > groups = jdbcTemplate.query ( query , org.ovirt.engine.core.dao.VdsGroupDAODbFacadeImpl.VdsGroupRowMapper.instance ) ; try { return getHostsAndVmsForClusters ( groups ) ; } catch ( java.lang.Exception e ) { org.ovirt.engine.core.dao.VdsGroupDAODbFacadeImpl.log.error ( "Can't load host and vm count for cluster. Query is '{}'. Error: {}" , query , e.getMessage ( ) ) ; org.ovirt.engine.core.dao.VdsGroupDAODbFacadeImpl.log.debug ( "Excpetion" , e ) ; } return groups ; }

Target:
public java.util.List < org.ovirt.engine.core.common.businessentities.VDSGroup > getAllWithQuery ( java.lang.String query ) { java.util.List < org.ovirt.engine.core.common.businessentities.VDSGroup > groups = getJdbcTemplate ( ) . query ( query , org.ovirt.engine.core.dao.VdsGroupDAODbFacadeImpl.VdsGroupRowMapper.instance ) ; try { return getHostsAndVmsForClusters ( groups ) ; } catch ( java.lang.Exception e ) { org.ovirt.engine.core.dao.VdsGroupDAODbFacadeImpl.log.error ( "Can't load host and vm count for cluster. Query is '{}'. Error: {}" , query , e.getMessage ( ) ) ; org.ovirt.engine.core.dao.VdsGroupDAODbFacadeImpl.log.debug ( "Excpetion" , e ) ; } return groups ; }
Source:
public void getAllAttachableDisks ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.compat.Guid vmId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ( ) ; } } ; org.ovirt.engine.core.common.queries.GetAllAttachableDisks params = new org.ovirt.engine.core.common.queries.GetAllAttachableDisks ( storagePoolId ) ; params.setVmId ( vmId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllAttachableDisks , params , aQuery ) ; }

Target:
public void getNextAvailableDiskAliasNameByVMId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid vmId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetNextAvailableDiskAliasNameByVMId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) , aQuery ) ; }
Source:
private void fillDiskMap ( org.ovirt.engine.core.common.businessentities.LunDisk disk , org.ovirt.engine.core.common.businessentities.VM vm , int expectedMapSize ) { java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.Disk > diskMap = new java.util.HashMap < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.Disk > ( ) ; for ( int i = 0 ; i < expectedMapSize ; i ++ ) { diskMap.put ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) , disk ) ; } vm.setDiskMap ( diskMap ) ; }

Target:
private void fillDiskMap ( org.ovirt.engine.core.common.businessentities.LunDisk disk , org.ovirt.engine.core.common.businessentities.VM vm , int expectedMapSize ) { java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.Disk > diskMap = new java.util.HashMap < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.Disk > ( ) ; for ( int i = 0 ; i < expectedMapSize ; i ++ ) { diskMap.put ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , disk ) ; } vm.setDiskMap ( diskMap ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.storage.DiskImage getMemoryDumpDisk ( java.util.List < org.ovirt.engine.core.common.action.VdcReturnValueBase > returnValues ) { for ( org.ovirt.engine.core.common.action.VdcReturnValueBase returnValue : returnValues ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage disk = returnValue.getActionReturnValue ( ) ; if ( ( disk.getSize ( ) ) != ( org.ovirt.engine.core.bll.memory.MemoryUtils.METADATA_SIZE_IN_BYTES ) ) { return disk ; } } return null ; }

Target:
private org.ovirt.engine.core.common.businessentities.storage.DiskImage getMemoryDumpDisk ( java.util.List < org.ovirt.engine.core.common.action.ActionReturnValue > returnValues ) { for ( org.ovirt.engine.core.common.action.ActionReturnValue returnValue : returnValues ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage disk = returnValue.getActionReturnValue ( ) ; if ( ( disk.getSize ( ) ) != ( org.ovirt.engine.core.bll.memory.MemoryUtils.METADATA_SIZE_IN_BYTES ) ) { return disk ; } } return null ; }
Source:
public void canDoActionFailedVMNotFound ( ) throws java.lang.Exception { initializeCommand ( ) ; mockNullVm ( ) ; org.junit.Assert.assertFalse ( command.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( command.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( VdcBllMessages.ACTION_TYPE_FAILED_VM_NOT_FOUND.toString ( ) ) ) ; }

Target:
public void canDoActionFailedVMNotFound ( ) throws java.lang.Exception { initializeCommand ( createParameters ( ) ) ; mockNullVm ( ) ; org.junit.Assert.assertFalse ( command.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( command.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( VdcBllMessages.ACTION_TYPE_FAILED_VM_NOT_FOUND.toString ( ) ) ) ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { java.util.List < java.lang.String > pmOptions = ( ( java.util.ArrayList < java.lang.String > ) ( returnValue ) ) ; if ( pmOptions != null ) { getPmPort ( ) . setIsAvailable ( pmOptions.contains ( org.ovirt.engine.ui.uicommonweb.models.hosts.HostModel.PmPortKey ) ) ; getPmSlot ( ) . setIsAvailable ( pmOptions.contains ( org.ovirt.engine.ui.uicommonweb.models.hosts.HostModel.PmSlotKey ) ) ; getPmSecure ( ) . setIsAvailable ( pmOptions.contains ( org.ovirt.engine.ui.uicommonweb.models.hosts.HostModel.PmSecureKey ) ) ; } }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { java.util.List < java.lang.String > pmOptions = ( ( java.util.ArrayList < java.lang.String > ) ( returnValue ) ) ; if ( pmOptions != null ) { getPmSecondaryPort ( ) . setIsAvailable ( pmOptions.contains ( org.ovirt.engine.ui.uicommonweb.models.hosts.HostModel.PmPortKey ) ) ; getPmSecondarySlot ( ) . setIsAvailable ( pmOptions.contains ( org.ovirt.engine.ui.uicommonweb.models.hosts.HostModel.PmSlotKey ) ) ; getPmSecondarySecure ( ) . setIsAvailable ( pmOptions.contains ( org.ovirt.engine.ui.uicommonweb.models.hosts.HostModel.PmSecureKey ) ) ; } }
Source:
public void invoke ( org.ovirt.engine.api.extensions.ExtMap context , java.util.Map < java.lang.String , java.lang.Object > args ) { context.mput ( Schema.InvokeKeys.MODIFICATION_TYPE , Sql.ModificationTypes.INSERT ) ; context.put ( Schema.InvokeKeys.ENTITY_KEYS , org.ovirt.engine.extension.aaa.jdbc.binding.cli.Cli.getGroupKeys ( args , context.get ( org.ovirt.engine.extension.aaa.jdbc.binding.cli.Cli.ContextKeys.POSITIONAL , java.lang.String.class ) ) ) ; if ( ! ( context.containsKey ( org.ovirt.engine.extension.aaa.jdbc.binding.cli.Cli.ContextKeys.EXIT_STATUS ) ) ) { org.ovirt.engine.extension.aaa.jdbc.binding.cli.Cli.commands.get ( "_schema-modify" ) . invoke ( context ) ; context.put ( org.ovirt.engine.extension.aaa.jdbc.binding.cli.Cli.ContextKeys.EXIT_STATUS , org.ovirt.engine.extension.aaa.jdbc.binding.cli.Cli.SUCCESS ) ; } }

Target:
public void invoke ( org.ovirt.engine.api.extensions.ExtMap context , java.util.Map < java.lang.String , java.lang.Object > args ) { context.mput ( Schema.InvokeKeys.ENTITY , Schema.Entities.GROUP ) . mput ( Schema.InvokeKeys.ENTITY_KEYS , new org.ovirt.engine.api.extensions.ExtMap ( ) . mput ( Schema.GroupIdentifiers.NAME , args.get ( "group" ) ) . mput ( Schema.SharedKeys.REMOVE_GROUP , context.get ( ContextKeys.POSITIONAL ) ) ) ; org.ovirt.engine.extension.aaa.jdbc.binding.cli.Cli.commands.get ( "_schema-modify" ) . invoke ( context ) ; context.putIfAbsent ( ContextKeys.EXIT_STATUS , org.ovirt.engine.extension.aaa.jdbc.binding.cli.Cli.SUCCESS ) ; }
Source:
public static void getGlusterBricksForServer ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid serverId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? source : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterVolumeBricksByServerId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( serverId ) , aQuery ) ; }

Target:
public 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 ) ; }
Source:
protected void endWithFailure ( ) { if ( ! ( org.ovirt.engine.core.bll.storage.disk.cinder.RestoreAllCinderSnapshotsCommand.getParameters ( ) . isParentHasTasks ( ) ) ) { org.ovirt.engine.core.bll.storage.disk.cinder.RestoreAllCinderSnapshotsCommand.getParameters ( ) . getParentParameters ( ) . setTaskGroupSuccess ( false ) ; org.ovirt.engine.core.bll.storage.disk.cinder.RestoreAllCinderSnapshotsCommand.getBackend ( ) . endAction ( org.ovirt.engine.core.bll.storage.disk.cinder.RestoreAllCinderSnapshotsCommand.getParameters ( ) . getParentCommand ( ) , org.ovirt.engine.core.bll.storage.disk.cinder.RestoreAllCinderSnapshotsCommand.getParameters ( ) . getParentParameters ( ) , org.ovirt.engine.core.bll.storage.disk.cinder.RestoreAllCinderSnapshotsCommand.cloneContextAndDetachFromParent ( ) ) ; } org.ovirt.engine.core.bll.storage.disk.cinder.RestoreAllCinderSnapshotsCommand.setSucceeded ( true ) ; }

Target:
protected void endWithFailure ( ) { removeRedundantVolumesForOrphanedDisks ( ) ; if ( ! ( org.ovirt.engine.core.bll.storage.disk.cinder.RestoreAllCinderSnapshotsCommand.getParameters ( ) . isParentHasTasks ( ) ) ) { org.ovirt.engine.core.bll.storage.disk.cinder.RestoreAllCinderSnapshotsCommand.getParameters ( ) . getParentParameters ( ) . setTaskGroupSuccess ( false ) ; org.ovirt.engine.core.bll.storage.disk.cinder.RestoreAllCinderSnapshotsCommand.getBackend ( ) . endAction ( org.ovirt.engine.core.bll.storage.disk.cinder.RestoreAllCinderSnapshotsCommand.getParameters ( ) . getParentCommand ( ) , org.ovirt.engine.core.bll.storage.disk.cinder.RestoreAllCinderSnapshotsCommand.getParameters ( ) . getParentParameters ( ) , org.ovirt.engine.core.bll.storage.disk.cinder.RestoreAllCinderSnapshotsCommand.cloneContextAndDetachFromParent ( ) ) ; } org.ovirt.engine.core.bll.storage.disk.cinder.RestoreAllCinderSnapshotsCommand.setSucceeded ( true ) ; }
Source:
public static void addImportedDevices ( org.ovirt.engine.core.common.businessentities.VmBase vmBase , boolean isImportAsNewEntity ) { if ( isImportAsNewEntity ) { org.ovirt.engine.core.bll.utils.VmDeviceUtils.setNewIdInImportedCollections ( vmBase ) ; } java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > vmDevicesToAdd = new java.util.ArrayList < > ( ) ; java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > vmDevicesToUpdate = new java.util.ArrayList < > ( ) ; org.ovirt.engine.core.bll.utils.VmDeviceUtils.addImportedDiskDevices ( vmBase , vmDevicesToUpdate ) ; org.ovirt.engine.core.bll.utils.VmDeviceUtils.addImportedInterfaces ( vmBase , vmDevicesToUpdate ) ; org.ovirt.engine.core.bll.utils.VmDeviceUtils.addImportedOtherDevices ( vmBase , vmDevicesToAdd ) ; org.ovirt.engine.core.bll.utils.VmDeviceUtils.dao.saveAll ( vmDevicesToAdd ) ; org.ovirt.engine.core.bll.utils.VmDeviceUtils.dao.updateAll ( vmDevicesToUpdate ) ; }

Target:
public static void addImportedDevices ( org.ovirt.engine.core.common.businessentities.VmBase vmBase , boolean isImportAsNewEntity ) { if ( isImportAsNewEntity ) { org.ovirt.engine.core.bll.utils.VmDeviceUtils.setNewIdInImportedCollections ( vmBase ) ; } java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > vmDevicesToAdd = new java.util.ArrayList < > ( ) ; java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > vmDevicesToUpdate = new java.util.ArrayList < > ( ) ; org.ovirt.engine.core.bll.utils.VmDeviceUtils.addImportedDiskDevices ( vmBase , vmDevicesToUpdate ) ; org.ovirt.engine.core.bll.utils.VmDeviceUtils.addImportedInterfaces ( vmBase , vmDevicesToUpdate ) ; org.ovirt.engine.core.bll.utils.VmDeviceUtils.addImportedOtherDevices ( vmBase , vmDevicesToAdd ) ; org.ovirt.engine.core.bll.utils.VmDeviceUtils.vmDeviceDao.saveAll ( vmDevicesToAdd ) ; org.ovirt.engine.core.bll.utils.VmDeviceUtils.vmDeviceDao.updateAll ( vmDevicesToUpdate ) ; }
Source:
private boolean isLiveSnapshotEnabled ( ) { return org.ovirt.engine.core.common.config.Config.< java.lang.Boolean > getValue ( ConfigValues.LiveSnapshotEnabled , org.ovirt.engine.core.bll.CreateAllSnapshotsFromVmCommand.getStoragePool ( ) . getcompatibility_version ( ) . getValue ( ) ) ; }

Target:
protected boolean validateVM ( org.ovirt.engine.core.bll.validator.VmValidator vmValidator ) { org.ovirt.engine.core.bll.validator.LiveSnapshotValidator validator = new org.ovirt.engine.core.bll.validator.LiveSnapshotValidator ( org.ovirt.engine.core.bll.CreateAllSnapshotsFromVmCommand.getStoragePool ( ) . getcompatibility_version ( ) , org.ovirt.engine.core.bll.CreateAllSnapshotsFromVmCommand.getVds ( ) ) ; return ( ( ( org.ovirt.engine.core.bll.CreateAllSnapshotsFromVmCommand.getVm ( ) . isDown ( ) ) || ( validate ( validator.canDoSnapshot ( ) ) ) ) && ( validate ( vmValidator.vmNotSavingRestoring ( ) ) ) ) && ( validate ( vmValidator.validateVmStatusUsingMatrix ( VdcActionType.CreateAllSnapshotsFromVm ) ) ) ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object ReturnValue ) { this . host = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( ReturnValue ) ) . getReturnValue ( ) ; this . setAndInvokeClient ( ) ; }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { vncImpl.setOptions ( ( ( org.ovirt.engine.core.common.console.ConsoleOptions ) ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ) ) ) ; vncImpl.getOptions ( ) . setTitle ( getClientTitle ( ) ) ; vncImpl.invokeClient ( ) ; }
Source:
private org.ovirt.engine.core.common.interfaces.FutureVDSCall < org.ovirt.engine.core.common.vdscommands.VDSReturnValue > invokeSetupNetworksCommand ( int timeout ) { final org.ovirt.engine.core.common.vdscommands.HostSetupNetworksVdsCommandParameters parameters = createSetupNetworksParameters ( timeout ) ; org.ovirt.engine.core.common.interfaces.FutureVDSCall < org.ovirt.engine.core.common.vdscommands.VDSReturnValue > setupNetworksTask = org.ovirt.engine.core.bll.network.host.HostSetupNetworksCommand.getBackend ( ) . getResourceManager ( ) . runFutureVdsCommand ( FutureVDSCommandType.HostSetupNetworks , parameters ) ; if ( parameters.isRollbackOnFailure ( ) ) { org.ovirt.engine.core.bll.network.host.HostSetupNetworkPoller poller = new org.ovirt.engine.core.bll.network.host.HostSetupNetworkPoller ( ) ; while ( ! ( setupNetworksTask.isDone ( ) ) ) { poller.poll ( org.ovirt.engine.core.bll.network.host.HostSetupNetworksCommand.getVdsId ( ) ) ; } } return setupNetworksTask ; }

Target:
private org.ovirt.engine.core.common.interfaces.FutureVDSCall < org.ovirt.engine.core.common.vdscommands.VDSReturnValue > invokeSetupNetworksCommand ( int timeout ) { final org.ovirt.engine.core.common.vdscommands.HostSetupNetworksVdsCommandParameters parameters = createSetupNetworksParameters ( timeout ) ; org.ovirt.engine.core.common.interfaces.FutureVDSCall < org.ovirt.engine.core.common.vdscommands.VDSReturnValue > setupNetworksTask = org.ovirt.engine.core.bll.network.host.HostSetupNetworksCommand.getVdsBroker ( ) . runFutureVdsCommand ( FutureVDSCommandType.HostSetupNetworks , parameters ) ; if ( parameters.isRollbackOnFailure ( ) ) { org.ovirt.engine.core.bll.network.host.HostSetupNetworkPoller poller = new org.ovirt.engine.core.bll.network.host.HostSetupNetworkPoller ( ) ; while ( ! ( setupNetworksTask.isDone ( ) ) ) { poller.poll ( org.ovirt.engine.core.bll.network.host.HostSetupNetworksCommand.getVdsId ( ) ) ; } } return setupNetworksTask ; }
Source:
public static void getVmById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid vmId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) , aQuery ) ; }

Target:
public static void isClusterEmpty ( 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.Boolean > ( ) { @ java.lang.Override public java.lang.Boolean Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return ( ( java.lang.Boolean ) ( source ) ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.IsClusterEmpty , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }
Source:
static java.util.List < org.ovirt.engine.core.common.businessentities.tags > setUpTags ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.tags > tags = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.tags > ( ) ; for ( int i = 0 ; i < ( NAMES.length ) ; i ++ ) { tags.add ( new org.ovirt.engine.core.common.businessentities.tags ( DESCRIPTIONS [ i ] , org.ovirt.engine.api.restapi.resource.BackendTagsResourceTest.PARENT_GUID , false , GUIDS [ i ] , NAMES [ i ] ) ) ; } return tags ; }

Target:
static java.util.List < org.ovirt.engine.core.common.businessentities.Tags > setUpTags ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.Tags > tags = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Tags > ( ) ; for ( int i = 0 ; i < ( NAMES.length ) ; i ++ ) { tags.add ( new org.ovirt.engine.core.common.businessentities.Tags ( DESCRIPTIONS [ i ] , org.ovirt.engine.api.restapi.resource.BackendTagsResourceTest.PARENT_GUID , false , GUIDS [ i ] , NAMES [ i ] ) ) ; } return tags ; }
Source:
public java.lang.Object getConfigValue ( org.ovirt.engine.core.common.queries.ConfigurationValues configValue , java.lang.String version , org.ovirt.engine.ui.frontend.IAsyncConverter converter ) { if ( converter == null ) { return null ; } org.ovirt.engine.core.compat.KeyValuePairCompat < org.ovirt.engine.core.common.queries.ConfigurationValues , java.lang.String > key = new org.ovirt.engine.core.compat.KeyValuePairCompat ( configValue , version ) ; return converter.convert ( cachedConfigValuesPreConvert.get ( key ) , null ) ; }

Target:
public void getVnicProfilesByDcId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dcId ) { if ( ( aQuery.converterCallback ) == null ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VnicProfileView > ( ) ; } return source ; } } ; } org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVnicProfilesByDataCenterId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dcId ) , aQuery ) ; }
Source:
public org.ovirt.engine.core.bll.ValidationResult messagingBrokerProvided ( ) { return org.ovirt.engine.core.bll.ValidationResult.failWith ( VdcBllMessages.ACTION_TYPE_FAILED_MISSING_MESSAGING_BROKER_PROPERTIES ) . when ( ( ( ( ( getAgentConfiguration ( ) ) == null ) || ( ( getAgentConfiguration ( ) . getMessagingConfiguration ( ) ) == null ) ) || ( org.apache.commons.lang.StringUtils.isEmpty ( getAgentConfiguration ( ) . getMessagingConfiguration ( ) . getAddress ( ) ) ) ) ) ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult messagingBrokerProvided ( ) { return org.ovirt.engine.core.bll.ValidationResult.failWith ( EngineMessage.ACTION_TYPE_FAILED_MISSING_MESSAGING_BROKER_PROPERTIES ) . when ( ( ( ( ( getAgentConfiguration ( ) ) == null ) || ( ( getAgentConfiguration ( ) . getMessagingConfiguration ( ) ) == null ) ) || ( org.apache.commons.lang.StringUtils.isEmpty ( getAgentConfiguration ( ) . getMessagingConfiguration ( ) . getAddress ( ) ) ) ) ) ; }
Source:
private org.ovirt.engine.core.common.eventqueue.EventResult runUpdateMomPolicy ( final org.ovirt.engine.core.common.businessentities.VDSGroup cluster , final org.ovirt.engine.core.common.businessentities.VDS vds ) { org.ovirt.engine.core.common.eventqueue.EventResult result = new org.ovirt.engine.core.common.eventqueue.EventResult ( true , org.ovirt.engine.core.common.eventqueue.EventType.VDSCONNECTTOPOOL ) ; try { runVdsCommand ( VDSCommandType.SetMOMPolicyParameters , new org.ovirt.engine.core.common.vdscommands.MomPolicyVDSParameters ( vds , cluster.isEnableBallooning ( ) ) ) ; } catch ( org.ovirt.engine.core.common.errors.VdcBLLException e ) { log.errorFormat ( "Could not update MoM policy on host {0}" , vds.getName ( ) ) ; result.setSuccess ( false ) ; } return result ; }

Target:
private org.ovirt.engine.core.common.vdscommands.VDSReturnValue runUpdateMomPolicy ( final org.ovirt.engine.core.common.businessentities.VDSGroup cluster , final org.ovirt.engine.core.common.businessentities.VDS vds ) { org.ovirt.engine.core.common.vdscommands.VDSReturnValue returnValue = new org.ovirt.engine.core.common.vdscommands.VDSReturnValue ( ) ; if ( ( cluster.getcompatibility_version ( ) . compareTo ( Version.v3_3 ) ) >= 0 ) { try { returnValue = runVdsCommand ( VDSCommandType.SetMOMPolicyParameters , new org.ovirt.engine.core.common.vdscommands.MomPolicyVDSParameters ( vds , cluster.isEnableBallooning ( ) ) ) ; } catch ( org.ovirt.engine.core.common.errors.VdcBLLException e ) { log.errorFormat ( "Could not update MoM policy on host {0}" , vds.getName ( ) ) ; returnValue.setSucceeded ( false ) ; } } return returnValue ; }
Source:
public void fillReportedConfigurations ( java.util.List < org.ovirt.engine.core.common.businessentities.network.NetworkAttachment > networkAttachments , org.ovirt.engine.core.compat.Guid hostId ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > allInterfacesForHost = interfaceDao.getAllInterfacesForVds ( hostId ) ; org.ovirt.engine.core.common.businessentities.BusinessEntityMap < org.ovirt.engine.core.common.businessentities.network.Network > networkMap = new org.ovirt.engine.core.common.businessentities.BusinessEntityMap ( networkDao.getAllForCluster ( vdsDao.get ( hostId ) . getClusterId ( ) ) ) ; fillReportedConfigurations ( allInterfacesForHost , networkMap , networkAttachments ) ; }

Target:
public void fillReportedConfigurations ( java.util.List < org.ovirt.engine.core.common.businessentities.network.NetworkAttachment > networkAttachments , org.ovirt.engine.core.compat.Guid hostId ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > allInterfacesForHost = interfaceDao.getAllInterfacesForVds ( hostId ) ; org.ovirt.engine.core.compat.Guid clusterId = vdsDao.get ( hostId ) . getClusterId ( ) ; org.ovirt.engine.core.common.businessentities.BusinessEntityMap < org.ovirt.engine.core.common.businessentities.network.Network > networkMap = new org.ovirt.engine.core.common.businessentities.BusinessEntityMap ( networkDao.getAllForCluster ( clusterId ) ) ; fillReportedConfigurations ( allInterfacesForHost , networkMap , networkAttachments , clusterId ) ; }
Source:
public static java.util.List < org.ovirt.engine.core.common.businessentities.LdapUser > getAllUsers ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.LdapUser > users = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.LdapUser > ( ) ; org.ovirt.engine.core.common.businessentities.LdapUser user = org.ovirt.engine.core.bll.adbroker.InternalBrokerUtils.getUserByUserGuid ( org.ovirt.engine.core.bll.adbroker.InternalBrokerUtils.ADMIN_GUID ) ; if ( user != null ) { users.add ( user ) ; } return users ; }

Target:
public static java.util.List < org.ovirt.engine.core.common.businessentities.LdapUser > getAllUsers ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.LdapUser > users = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.LdapUser > ( ) ; org.ovirt.engine.core.common.businessentities.LdapUser user = org.ovirt.engine.core.bll.adbroker.InternalBrokerUtils.getUserById ( org.ovirt.engine.core.bll.adbroker.InternalBrokerUtils.ADMIN_ID ) ; if ( user != null ) { users.add ( user ) ; } return users ; }
Source:
public void validateFailsOnSameServer ( ) { initTestCommand ( volumeIdRepl , getBricks ( volumeIdRepl , 3 , true ) , 3 , 0 , false ) ; org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity vol = getMultiBrickVolume ( volumeIdRepl , 3 ) ; vol.setVolumeType ( GlusterVolumeType.REPLICATE ) ; vol.setReplicaCount ( 3 ) ; org.mockito.Mockito.doReturn ( vol ) . when ( volumeDao ) . getById ( volumeIdRepl ) ; org.junit.Assert.assertFalse ( cmd.validate ( ) ) ; }

Target:
public void validateFailsOnSameServer ( ) { initTestCommand ( volumeIdRepl , getBricks ( volumeIdRepl , 3 , true ) , 3 , 0 , false ) ; org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity vol = getMultiBrickVolume ( volumeIdRepl , 3 ) ; vol.setVolumeType ( GlusterVolumeType.REPLICATE ) ; vol.setReplicaCount ( 3 ) ; org.mockito.Mockito.doReturn ( vol ) . when ( volumeDao ) . getById ( volumeIdRepl ) ; org.junit.jupiter.api.Assertions.assertFalse ( cmd.validate ( ) ) ; }
Source:
protected boolean checkImagesStatus ( ) { return org.ovirt.engine.core.bll.ImagesHandler.checkImagesLocked ( org.ovirt.engine.core.bll.lsm.LiveMigrateVmDisksCommand.getVmId ( ) , org.ovirt.engine.core.bll.lsm.LiveMigrateVmDisksCommand.getReturnValue ( ) . getCanDoActionMessages ( ) ) ; }

Target:
protected boolean checkImagesStatus ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > disksToCheck = org.ovirt.engine.core.bll.ImagesHandler.filterImageDisks ( getDiskDao ( ) . getAllForVm ( org.ovirt.engine.core.bll.lsm.LiveMigrateVmDisksCommand.getVmId ( ) ) , true , false ) ; return org.ovirt.engine.core.bll.ImagesHandler.checkImagesLocked ( org.ovirt.engine.core.bll.lsm.LiveMigrateVmDisksCommand.getReturnValue ( ) . getCanDoActionMessages ( ) , disksToCheck ) ; }
Source:
protected org.ovirt.engine.core.common.businessentities.storage_domains getInverse ( org.ovirt.engine.core.common.businessentities.StorageDomainStatic to ) { org.ovirt.engine.core.common.businessentities.storage_domains inverse = new org.ovirt.engine.core.common.businessentities.storage_domains ( ) ; inverse.setId ( to.getId ( ) ) ; inverse.setstorage_name ( to.getstorage_name ( ) ) ; inverse.setstorage_domain_type ( to.getstorage_domain_type ( ) ) ; inverse.setstorage_type ( to.getstorage_type ( ) ) ; inverse.setStorageFormat ( to.getStorageFormat ( ) ) ; return inverse ; }

Target:
protected org.ovirt.engine.api.model.StorageDomain getInverse ( org.ovirt.engine.core.common.businessentities.StorageDomainStatic to ) { org.ovirt.engine.api.model.StorageDomain inverse = new org.ovirt.engine.api.model.StorageDomain ( ) ; inverse.setId ( to.getId ( ) ) ; inverse.setstorage_name ( to.getstorage_name ( ) ) ; inverse.setstorage_domain_type ( to.getstorage_domain_type ( ) ) ; inverse.setstorage_type ( to.getstorage_type ( ) ) ; inverse.setStorageFormat ( to.getStorageFormat ( ) ) ; return inverse ; }
Source:
public void getClusterGlusterServices ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { 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.gluster.GlusterVolumeAdvancedDetailsParameters parameters = new org.ovirt.engine.core.common.queries.gluster.GlusterVolumeAdvancedDetailsParameters ( clusterId , null , null , false ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterVolumeAdvancedDetails , parameters , aQuery ) ; }

Target:
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 ) ) : 0 ; } } ; getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.MaxVdsMemOverCommitForServers , getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
protected boolean isPostZero ( ) { if ( ( cachedPostZero ) == null ) { cachedPostZero = ( org.ovirt.engine.core.utils.linq.LinqUtils.filter ( getDbFacade ( ) . getDiskDao ( ) . getAllForVm ( vm.getId ( ) ) , new org.ovirt.engine.core.utils.linq.Predicate < org.ovirt.engine.core.common.businessentities.Disk > ( ) { @ java.lang.Override public boolean eval ( org.ovirt.engine.core.common.businessentities.Disk disk ) { return disk.isWipeAfterDelete ( ) ; } } ) . size ( ) ) > 0 ; } return cachedPostZero ; }

Target:
protected boolean isPostZero ( ) { if ( ( cachedPostZero ) == null ) { cachedPostZero = getDbFacade ( ) . getDiskDao ( ) . getAllForVm ( vm.getId ( ) ) . contains ( new java.lang.Object ( ) { @ java.lang.Override public boolean equals ( java.lang.Object obj ) { return ( ( org.ovirt.engine.core.common.businessentities.Disk ) ( obj ) ) . isWipeAfterDelete ( ) ; } } ) ; } return cachedPostZero ; }
Source:
protected void addInvalidSDStatusMessage ( org.ovirt.engine.core.common.businessentities.StorageDomainStatus status ) { addCanDoActionMessage ( VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_DOMAIN_STATUS_ILLEGAL2 ) ; addCanDoActionMessage ( java.lang.String.format ( "$status %1$s" , status ) ) ; }

Target:
protected boolean canDoAction ( ) { if ( ! ( validate ( createStorageDomainValidator ( ) . isInProcess ( ) ) ) ) { return false ; } if ( ! ( validate ( createStoragePoolValidator ( ) . isAnyDomainInProcess ( ) ) ) ) { return false ; } return org.ovirt.engine.core.bll.storage.ReconstructMasterDomainCommand.initializeVds ( ) ; }
Source:
public org.ovirt.engine.ui.common.presenter.AbstractModelBoundPopupPresenterWidget < ? extends org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel , ? > getConfirmModelPopup ( org.ovirt.engine.ui.uicommonweb.models.vms.hostdev.VmHostDeviceListModel source , org.ovirt.engine.ui.uicommonweb.UICommand lastExecutedCommand ) { if ( lastExecutedCommand == ( getModel ( ) . getRemoveCommand ( ) ) ) { return removeConfirmPopupProvider.get ( ) ; } return super . getConfirmModelPopup ( source , lastExecutedCommand ) ; }

Target:
public org.ovirt.engine.ui.common.presenter.AbstractModelBoundPopupPresenterWidget < ? extends org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel , ? > getConfirmModelPopup ( org.ovirt.engine.ui.uicommonweb.models.configure.labels.list.VmAffinityLabelListModel source , org.ovirt.engine.ui.uicommonweb.UICommand lastExecutedCommand ) { if ( lastExecutedCommand == ( getModel ( ) . getRemoveCommand ( ) ) ) { return removeConfirmPopupProvider.get ( ) ; } else { return super . getConfirmModelPopup ( source , lastExecutedCommand ) ; } }
Source:
protected void setUpGetEntityExpectations ( int times , boolean notFound , org.ovirt.engine.api.restapi.resource.VM entity ) throws java.lang.Exception { while ( ( times -- ) > 0 ) { setUpGetEntityExpectations ( VdcQueryType.GetVmByVmId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , ( notFound ? null : entity ) ) ; } }

Target:
protected void setUpGetEntityExpectations ( int times , boolean notFound , org.ovirt.engine.api.restapi.resource.VM entity ) throws java.lang.Exception { while ( ( times -- ) > 0 ) { setUpGetEntityExpectations ( QueryType.GetVmByVmId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , ( notFound ? null : entity ) ) ; } }
Source:
private boolean securityGroupsChanged ( java.util.List < java.lang.String > existingSecurityGroups , java.util.List < java.lang.String > desiredSecurityGroups ) { return ! ( org.apache.commons.collections.CollectionUtils.isEqualCollection ( ( existingSecurityGroups == null ? java.util.Collections.emptyList ( ) : existingSecurityGroups ) , desiredSecurityGroups ) ) ; }

Target:
private boolean securityGroupsChanged ( java.util.List < java.lang.String > existingSecurityGroups , java.util.List < java.lang.String > desiredSecurityGroups ) { existingSecurityGroups = ( existingSecurityGroups == null ) ? org.ovirt.engine.core.bll.provider.network.openstack.OpenstackNetworkProviderProxy.NO_SECURITY_GROUPS : existingSecurityGroups ; return ( ( desiredSecurityGroups == ( org.ovirt.engine.core.bll.provider.network.openstack.OpenstackNetworkProviderProxy.DEFAULT_SECURITY_GROUP ) ) && ( existingSecurityGroups.isEmpty ( ) ) ) || ( ( desiredSecurityGroups != ( org.ovirt.engine.core.bll.provider.network.openstack.OpenstackNetworkProviderProxy.DEFAULT_SECURITY_GROUP ) ) && ( ! ( org.apache.commons.collections.CollectionUtils.isEqualCollection ( existingSecurityGroups , desiredSecurityGroups ) ) ) ) ; }
Source:
protected void initTemplateWithVersion ( java.util.List < org.ovirt.engine.core.common.businessentities.VmTemplate > templates ) { java.util.List < org.ovirt.engine.ui.uicommonweb.models.templates.TemplateWithVersion > templatesWithVersion = org.ovirt.engine.ui.uicommonweb.models.vms.VmModelBehaviorBase.createTemplateWithVersionsAddLatest ( templates ) ; org.ovirt.engine.ui.uicommonweb.models.templates.TemplateWithVersion previouslySelectedTemplate = getModel ( ) . getTemplateWithVersion ( ) . getSelectedItem ( ) ; org.ovirt.engine.ui.uicommonweb.models.templates.TemplateWithVersion templateToSelect = org.ovirt.engine.ui.uicommonweb.models.vms.VmModelBehaviorBase.computeTemplateWithVersionToSelect ( templatesWithVersion , previouslySelectedTemplate ) ; getModel ( ) . getTemplateWithVersion ( ) . setItems ( templatesWithVersion ) ; if ( templateToSelect != null ) { getModel ( ) . getTemplateWithVersion ( ) . setSelectedItem ( templateToSelect ) ; } }

Target:
public void setDedicatedHostsNames ( java.util.List < java.lang.String > dedicatedHostsNames ) { this . dedicatedHostsNames = dedicatedHostsNames ; }
Source:
public void diskImagesAlreadyExistBothExist ( ) { org.mockito.Mockito.doReturn ( true ) . when ( validator ) . isDiskExists ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ; org.junit.Assert.assertThat ( validator.diskImagesAlreadyExist ( ) , org.junit.matchers.JUnitMatchers.both ( org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( VdcBllMessages.ACTION_TYPE_FAILED_IMPORT_DISKS_ALREADY_EXIST ) ) . and ( org.ovirt.engine.core.bll.validator.ValidationResultMatchers.replacements ( org.junit.matchers.JUnitMatchers.hasItem ( org.ovirt.engine.core.bll.validator.DiskImagesValidatorTest.createAliasReplacements ( disk1 , disk2 ) ) ) ) ) ; }

Target:
public void diskImagesExist ( ) { org.mockito.Mockito.doReturn ( true ) . when ( validator ) . isDiskExists ( disk1.getId ( ) ) ; org.mockito.Mockito.doReturn ( true ) . when ( validator ) . isDiskExists ( disk2.getId ( ) ) ; org.junit.Assert.assertEquals ( validator.diskImagesNotExist ( ) , ValidationResult.VALID ) ; }
Source:
public void render ( org.ovirt.engine.ui.userportal.widget.extended.vm.Context context , T value , com.google.gwt.safehtml.shared.SafeHtmlBuilder sb ) { sb.appendHtmlConstant ( "<div style=\"border-radius: 7px; border: 1px solid #c6c6c6; width: 124px; padding-top: 3px; padding-left: 3px\">" ) ; for ( com.google.gwt.cell.client.HasCell < T , ? > hasCell : hasCells ) { render ( context , value , sb , hasCell ) ; } sb.appendHtmlConstant ( "</div>" ) ; }

Target:
public void render ( org.ovirt.engine.ui.userportal.widget.extended.vm.Context context , T value , com.google.gwt.safehtml.shared.SafeHtmlBuilder sb ) { sb.appendHtmlConstant ( "<div style=\"border-radius: 7px; border: 1px solid #c6c6c6; width: 128px; padding-top: 3px; padding-left: 3px\">" ) ; for ( com.google.gwt.cell.client.HasCell < T , ? > hasCell : hasCells ) { render ( context , value , sb , hasCell ) ; } sb.appendHtmlConstant ( "</div>" ) ; }
Source:
public void onAddTabActionButton ( org.ovirt.engine.ui.common.presenter.AddTabActionButtonEvent event ) { if ( org.ovirt.engine.ui.common.presenter.AbstractTabPresenter.getProxy ( ) . getTargetHistoryToken ( ) . equals ( event.getHistoryToken ( ) ) ) { if ( ( getTable ( ) ) != null ) { getTable ( ) . addActionButton ( ( ( org.ovirt.engine.ui.common.widget.action.ActionButtonDefinition ) ( event.getButtonDefinition ( ) ) ) ) ; } } }

Target:
public void execute ( ) { addPluginActionButtons ( actionButtonPluginHandler.getButtons ( getProxy ( ) . getTargetHistoryToken ( ) ) ) ; }
Source:
protected void ProceedProxyReturnValue ( ) { org.ovirt.engine.core.common.errors.VdcBllErrors returnStatus = GetReturnValueFromStatus ( org.ovirt.engine.core.vdsbroker.vdsbroker.HSMClearTaskVDSCommand.getReturnStatus ( ) ) ; switch ( returnStatus ) { case UnknownTask : log.error ( java.lang.String.format ( "Trying to remove unknown task: %1$s" , org.ovirt.engine.core.vdsbroker.vdsbroker.HSMClearTaskVDSCommand.getParameters ( ) . getTaskId ( ) ) ) ; return ; case TaskStateError : InitializeVdsError ( returnStatus ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.HSMClearTaskVDSCommand.getVDSReturnValue ( ) . setSucceeded ( false ) ; return ; } super . ProceedProxyReturnValue ( ) ; }

Target:
protected void ProceedProxyReturnValue ( ) { org.ovirt.engine.core.common.errors.VdcBllErrors returnStatus = GetReturnValueFromStatus ( org.ovirt.engine.core.vdsbroker.vdsbroker.HSMClearTaskVDSCommand.getReturnStatus ( ) ) ; switch ( returnStatus ) { case UnknownTask : log.error ( java.lang.String.format ( "Trying to remove unknown task: %1$s" , org.ovirt.engine.core.vdsbroker.vdsbroker.HSMClearTaskVDSCommand.getParameters ( ) . getTaskId ( ) ) ) ; return ; case TaskStateError : initializeVdsError ( returnStatus ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.HSMClearTaskVDSCommand.getVDSReturnValue ( ) . setSucceeded ( false ) ; return ; } super . ProceedProxyReturnValue ( ) ; }
Source:
public 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 ) ; }

Target:
public 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 ) { if ( source == null ) { return java.util.Collections.< org.ovirt.engine.core.common.businessentities.CertificateInfo > emptyList ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetProviderCertificateChain , new org.ovirt.engine.core.common.queries.ProviderQueryParameters ( provider ) , aQuery ) ; }
Source:
private static void assertValidGetByAdElement ( java.util.List < org.ovirt.engine.core.common.businessentities.Permission > result ) { org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertFalse ( result.isEmpty ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.Permission permission : result ) { org.junit.Assert.assertEquals ( org.ovirt.engine.core.dao.PermissionDaoTest.AD_ELEMENT_ID , permission.getAdElementId ( ) ) ; } }

Target:
private static void assertValidGetByAdElement ( java.util.List < org.ovirt.engine.core.common.businessentities.Permission > result ) { org.junit.jupiter.api.Assertions.assertNotNull ( result ) ; org.junit.jupiter.api.Assertions.assertFalse ( result.isEmpty ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.Permission permission : result ) { org.junit.jupiter.api.Assertions.assertEquals ( org.ovirt.engine.core.dao.PermissionDaoTest.AD_ELEMENT_ID , permission.getAdElementId ( ) ) ; } }
Source:
public boolean equals ( java.lang.Object obj ) { if ( ( obj == null ) || ( ! ( this . getClass ( ) . equals ( obj.getClass ( ) ) ) ) ) { return false ; } org.ovirt.engine.core.notifier.filter.FirstMatchSimpleFilter.Recipient that = ( ( org.ovirt.engine.core.notifier.filter.FirstMatchSimpleFilter.Recipient ) ( obj ) ) ; return ( org.apache.commons.lang.StringUtils.equals ( this . transport , that.transport ) ) && ( org.apache.commons.lang.StringUtils.equals ( this . name , that.name ) ) ; }

Target:
public boolean equals ( java.lang.Object obj ) { if ( ( this ) == obj ) { return true ; } if ( ! ( obj instanceof org.ovirt.engine.core.notifier.filter.FirstMatchSimpleFilter.Recipient ) ) { return false ; } org.ovirt.engine.core.notifier.filter.FirstMatchSimpleFilter.Recipient other = ( ( org.ovirt.engine.core.notifier.filter.FirstMatchSimpleFilter.Recipient ) ( obj ) ) ; return ( java.util.Objects.equals ( transport , other.transport ) ) && ( java.util.Objects.equals ( name , other.name ) ) ; }
Source:
public void moveShareableDiskToGlusterDomain ( ) { initializeCommand ( new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ) ; initSrcStorageDomain ( ) ; initDestStorageDomain ( StorageType.GLUSTERFS ) ; initVmDiskImage ( true ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( command , EngineMessage.ACTION_TYPE_FAILED_CANT_MOVE_SHAREABLE_DISK_TO_GLUSTERFS ) ; }

Target:
public void moveShareableDiskToGlusterDomain ( ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage disk = new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ; disk.setShareable ( true ) ; initializeCommand ( disk , VmEntityType.VM ) ; initSrcStorageDomain ( ) ; initDestStorageDomain ( StorageType.GLUSTERFS ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( command , EngineMessage.ACTION_TYPE_FAILED_CANT_MOVE_SHAREABLE_DISK_TO_GLUSTERFS ) ; }
Source:
public org.ovirt.engine.core.common.businessentities.VdsNetworkInterface.NetworkImplementationDetails getNetworkImplementationDetails ( ) { if ( ! ( isAttached ( ) ) ) { return null ; } org.ovirt.engine.core.common.businessentities.VdsNetworkInterface nic = ( hasVlan ( ) ) ? getVlanNic ( ) . getEntity ( ) : getAttachedToNic ( ) . getEntity ( ) ; return nic.getNetworkImplementationDetails ( ) ; }

Target:
public org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface.NetworkImplementationDetails getNetworkImplementationDetails ( ) { if ( ! ( isAttached ( ) ) ) { return null ; } org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nic = ( hasVlan ( ) ) ? getVlanNic ( ) . getEntity ( ) : getAttachedToNic ( ) . getEntity ( ) ; return nic.getNetworkImplementationDetails ( ) ; }