auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
protected void sendWarningForNonExportableDisks ( org.ovirt.engine.core.common.businessentities.VM entity ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetVmDiskList ( new org.ovirt.engine.ui.frontend.AsyncQuery ( getWindow ( ) , new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { final org.ovirt.engine.ui.uicommonweb.models.vms.ExportVmModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.ExportVmModel ) ( target ) ) ; @ java.lang.SuppressWarnings ( value = "unchecked" ) final java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > vmDisks = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ) ( returnValue ) ) ; org.ovirt.engine.ui.uicommonweb.models.vms.VmModelHelper.sendWarningForNonExportableDisks ( model , vmDisks , VmModelHelper.WarningType.VM_EXPORT ) ; } } ) , entity.getId ( ) ) ; }

Target:
protected void sendWarningForNonExportableDisks ( org.ovirt.engine.core.common.businessentities.VM entity ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getVmDiskList ( new org.ovirt.engine.ui.frontend.AsyncQuery ( getWindow ( ) , new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { final org.ovirt.engine.ui.uicommonweb.models.vms.ExportVmModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.ExportVmModel ) ( target ) ) ; @ java.lang.SuppressWarnings ( value = "unchecked" ) final java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > vmDisks = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ) ( returnValue ) ) ; org.ovirt.engine.ui.uicommonweb.models.vms.VmModelHelper.sendWarningForNonExportableDisks ( model , vmDisks , VmModelHelper.WarningType.VM_EXPORT ) ; } } ) , entity.getId ( ) ) ; }
Source:
public static java.util.Map < org.ovirt.engine.core.common.businessentities.StorageType , java.util.List < org.ovirt.engine.core.common.businessentities.StorageServerConnections > > filterConnectionsByStorageType ( org.ovirt.engine.core.common.businessentities.LUNs lun ) { java.util.Map < org.ovirt.engine.core.common.businessentities.StorageType , java.util.List < org.ovirt.engine.core.common.businessentities.StorageServerConnections > > storageConnectionsForStorageTypeMap = new java.util.EnumMap < org.ovirt.engine.core.common.businessentities.StorageType , java.util.List < org.ovirt.engine.core.common.businessentities.StorageServerConnections > > ( org.ovirt.engine.core.common.businessentities.StorageType.class ) ; for ( org.ovirt.engine.core.common.businessentities.StorageServerConnections lunConnections : lun.getLunConnections ( ) ) { org.ovirt.engine.core.utils.MultiValueMapUtils.addToMap ( lunConnections.getstorage_type ( ) , lunConnections , storageConnectionsForStorageTypeMap ) ; } return storageConnectionsForStorageTypeMap ; }

Target:
public static java.util.Map < org.ovirt.engine.core.common.businessentities.StorageType , java.util.List < org.ovirt.engine.core.common.businessentities.StorageServerConnections > > filterConnectionsByStorageType ( org.ovirt.engine.core.common.businessentities.LUNs lun ) { java.util.Map < org.ovirt.engine.core.common.businessentities.StorageType , java.util.List < org.ovirt.engine.core.common.businessentities.StorageServerConnections > > storageConnectionsForStorageTypeMap = new java.util.EnumMap < org.ovirt.engine.core.common.businessentities.StorageType , java.util.List < org.ovirt.engine.core.common.businessentities.StorageServerConnections > > ( org.ovirt.engine.core.common.businessentities.StorageType.class ) ; for ( org.ovirt.engine.core.common.businessentities.StorageServerConnections lunConnections : lun.getLunConnections ( ) ) { org.ovirt.engine.core.utils.collections.MultiValueMapUtils.addToMap ( lunConnections.getstorage_type ( ) , lunConnections , storageConnectionsForStorageTypeMap ) ; } return storageConnectionsForStorageTypeMap ; }
Source:
protected boolean canDoAction ( ) { addCanDoActionMessage ( VdcBllMessages.VAR__ACTION__RECONSTRUCT_MASTER ) ; addCanDoActionMessage ( VdcBllMessages.VAR__TYPE__STORAGE__DOMAIN ) ; java.util.List < org.ovirt.engine.core.common.businessentities.storage_pool_iso_map > poolDomains = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStoragePoolIsoMapDAO ( ) . getAllForStoragePool ( org.ovirt.engine.core.bll.storage.ReconstructMasterDomainCommand.getStoragePool ( ) . getId ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.storage_pool_iso_map poolDomain : poolDomains ) { if ( ( poolDomain.getstatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.StorageDomainStatus.Locked ) ) { addInvalidSDStatusMessage ( poolDomain.getstatus ( ) ) ; return false ; } } return org.ovirt.engine.core.bll.storage.ReconstructMasterDomainCommand.InitializeVds ( ) ; }

Target:
protected void setActionMessageParameters ( ) { addCanDoActionMessage ( VdcBllMessages.VAR__ACTION__RECONSTRUCT_MASTER ) ; addCanDoActionMessage ( VdcBllMessages.VAR__TYPE__STORAGE__DOMAIN ) ; }
Source:
public void testMapping ( ) { org.ovirt.engine.api.restapi.model.StorageFormat storageFormat = org.ovirt.engine.api.restapi.types.StorageFormatMapper.map ( StorageFormatType.V1 , null ) ; org.junit.Assert.assertEquals ( StorageFormat.V1 , storageFormat ) ; org.ovirt.engine.core.common.businessentities.StorageFormatType storageFormatType = org.ovirt.engine.api.restapi.types.StorageFormatMapper.map ( storageFormat , null ) ; org.junit.Assert.assertEquals ( StorageFormatType.V1 , storageFormatType ) ; storageFormat = org.ovirt.engine.api.restapi.types.StorageFormatMapper.map ( StorageFormatType.V2 , null ) ; org.junit.Assert.assertEquals ( StorageFormat.V2 , storageFormat ) ; storageFormatType = org.ovirt.engine.api.restapi.types.StorageFormatMapper.map ( storageFormat , null ) ; org.junit.Assert.assertEquals ( StorageFormatType.V2 , storageFormatType ) ; }

Target:
public void testMapping ( ) { org.ovirt.engine.api.model.StorageFormat storageFormat = org.ovirt.engine.api.restapi.types.StorageFormatMapper.map ( StorageFormatType.V1 , null ) ; org.junit.Assert.assertEquals ( StorageFormat.V1 , storageFormat ) ; org.ovirt.engine.core.common.businessentities.StorageFormatType storageFormatType = org.ovirt.engine.api.restapi.types.StorageFormatMapper.map ( storageFormat , null ) ; org.junit.Assert.assertEquals ( StorageFormatType.V1 , storageFormatType ) ; storageFormat = org.ovirt.engine.api.restapi.types.StorageFormatMapper.map ( StorageFormatType.V2 , null ) ; org.junit.Assert.assertEquals ( StorageFormat.V2 , storageFormat ) ; storageFormatType = org.ovirt.engine.api.restapi.types.StorageFormatMapper.map ( storageFormat , null ) ; org.junit.Assert.assertEquals ( StorageFormatType.V2 , storageFormatType ) ; }
Source:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.hosts.HostModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.hosts.HostModel ) ( target ) ) ; model.defaultSpmPriority = ( ( java.lang.Integer ) ( returnValue ) ) ; if ( ( postponedSpmPriority ) != null ) { updateSpmPriority ( postponedSpmPriority ) ; } spmInitialized = true ; }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object result ) { java.lang.String pk = ( ( java.lang.String ) ( result ) ) ; if ( ( pk != null ) && ( ( pk.length ( ) ) > 0 ) ) { getPublicKey ( ) . setEntity ( result ) ; } }
Source:
private void stopSpm ( ) { org.ovirt.engine.core.common.businessentities.VdsSpmStatus spmStatus = org.ovirt.engine.core.bll.pm.StopVdsCommand.getDbFacade ( ) . getVdsDao ( ) . get ( org.ovirt.engine.core.bll.pm.StopVdsCommand.getVds ( ) . getId ( ) ) . getSpmStatus ( ) ; if ( spmStatus != ( org.ovirt.engine.core.common.businessentities.VdsSpmStatus.None ) ) { org.ovirt.engine.core.bll.pm.StopVdsCommand.getBackend ( ) . getResourceManager ( ) . RunVdsCommand ( VDSCommandType.SpmStop , new org.ovirt.engine.core.common.vdscommands.SpmStopVDSCommandParameters ( org.ovirt.engine.core.bll.pm.StopVdsCommand.getVds ( ) . getId ( ) , org.ovirt.engine.core.bll.pm.StopVdsCommand.getVds ( ) . getStoragePoolId ( ) ) ) ; } }

Target:
private void stopSpm ( ) { org.ovirt.engine.core.common.businessentities.VdsSpmStatus spmStatus = org.ovirt.engine.core.bll.pm.StopVdsCommand.getDbFacade ( ) . getVdsDao ( ) . get ( org.ovirt.engine.core.bll.pm.StopVdsCommand.getVds ( ) . getId ( ) ) . getSpmStatus ( ) ; if ( spmStatus != ( org.ovirt.engine.core.common.businessentities.VdsSpmStatus.None ) ) { runVdsCommand ( VDSCommandType.SpmStop , new org.ovirt.engine.core.common.vdscommands.SpmStopVDSCommandParameters ( org.ovirt.engine.core.bll.pm.StopVdsCommand.getVds ( ) . getId ( ) , org.ovirt.engine.core.bll.pm.StopVdsCommand.getVds ( ) . getStoragePoolId ( ) ) ) ; } }
Source:
public javax.ws.rs.core.Response remove ( ) { org.ovirt.engine.core.common.businessentities.network.ExternalSubnet subnet = lookupSubnetById ( id ) ; if ( subnet != null ) { org.ovirt.engine.core.common.action.ExternalSubnetParameters parameters = new org.ovirt.engine.core.common.action.ExternalSubnetParameters ( ) ; parameters.setSubnet ( subnet ) ; return performAction ( VdcActionType.RemoveSubnetFromProvider , parameters ) ; } throw new javax.ws.rs.WebApplicationException ( Response.Status.NOT_FOUND ) ; }

Target:
public javax.ws.rs.core.Response remove ( ) { org.ovirt.engine.core.common.businessentities.network.ExternalSubnet subnet = lookupSubnetById ( id ) ; if ( subnet != null ) { org.ovirt.engine.core.common.action.ExternalSubnetParameters parameters = new org.ovirt.engine.core.common.action.ExternalSubnetParameters ( ) ; parameters.setSubnet ( subnet ) ; return performAction ( ActionType.RemoveSubnetFromProvider , parameters ) ; } throw new javax.ws.rs.WebApplicationException ( Response.Status.NOT_FOUND ) ; }
Source:
public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { initiateResumeUploadCheckStatus ( result ) ; }

Target:
private void initiateResumeUpload ( ) { startProgress ( null ) ; final org.ovirt.engine.core.common.action.TransferImageStatusParameters parameters = new org.ovirt.engine.core.common.action.TransferImageStatusParameters ( ) ; parameters.setDiskId ( getDiskModel ( ) . getDisk ( ) . getId ( ) ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runAction ( VdcActionType.TransferImageStatus , parameters , new org.ovirt.engine.ui.uicompat.IFrontendActionAsyncCallback ( ) { @ java.lang.Override public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { initiateResumeUploadCheckStatus ( result ) ; } } , this ) ; }
Source:
protected org.ovirt.engine.core.dao.network.VmNetworkInterfaceDao getVmNetworkInterfaceDao ( ) { return vmNetworkInterfaceDao ; }

Target:
protected org.ovirt.engine.core.common.businessentities.VM getVmWithoutConfiguration ( org.ovirt.engine.core.compat.Guid vmId , org.ovirt.engine.core.compat.Guid snapshotId ) { org.ovirt.engine.core.common.businessentities.VM vm = vmDao.get ( vmId ) ; java.util.List < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > interfaces = vmNetworkInterfaceDao.getAllForVm ( vm.getId ( ) ) ; vm.setInterfaces ( interfaces ) ; java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > disks = diskImageDao.getAllSnapshotsForVmSnapshot ( snapshotId ) ; vm.setImages ( new java.util.ArrayList ( disks ) ) ; for ( org.ovirt.engine.core.common.businessentities.storage.DiskImage currDisk : disks ) { currDisk.setActive ( true ) ; } return vm ; }
Source:
private org.ovirt.engine.core.common.vdscommands.HostSetupNetworksVdsCommandParameters createSetupNetworksParameters ( int timeout ) { final org.ovirt.engine.core.common.vdscommands.HostSetupNetworksVdsCommandParameters hostCmdParams = new org.ovirt.engine.core.common.vdscommands.HostSetupNetworksVdsCommandParameters ( org.ovirt.engine.core.bll.network.host.HostSetupNetworksCommand.getVds ( ) , getNetworks ( ) , getRemovedNetworks ( ) , org.ovirt.engine.core.bll.network.host.HostSetupNetworksCommand.getParameters ( ) . getBonds ( ) , getRemovedBonds ( ) ) ; hostCmdParams.setRollbackOnFailure ( org.ovirt.engine.core.bll.network.host.HostSetupNetworksCommand.getParameters ( ) . rollbackOnFailure ( ) ) ; hostCmdParams.setConectivityTimeout ( timeout ) ; boolean hostNetworkQosSupported = org.ovirt.engine.core.common.FeatureSupported.hostNetworkQos ( org.ovirt.engine.core.bll.network.host.HostSetupNetworksCommand.getVds ( ) . getVdsGroupCompatibilityVersion ( ) ) ; hostCmdParams.setHostNetworkQosSupported ( hostNetworkQosSupported ) ; return hostCmdParams ; }

Target:
private org.ovirt.engine.core.common.vdscommands.HostSetupNetworksVdsCommandParameters createSetupNetworksParameters ( int timeout ) { final org.ovirt.engine.core.common.vdscommands.HostSetupNetworksVdsCommandParameters hostCmdParams = new org.ovirt.engine.core.common.vdscommands.HostSetupNetworksVdsCommandParameters ( org.ovirt.engine.core.bll.network.host.HostSetupNetworksCommand.getVds ( ) , getNetworksToConfigure ( ) , getAllNetworksToRemove ( ) , org.ovirt.engine.core.bll.network.host.HostSetupNetworksCommand.getParameters ( ) . getBonds ( ) , getRemovedBondNames ( ) ) ; hostCmdParams.setRollbackOnFailure ( org.ovirt.engine.core.bll.network.host.HostSetupNetworksCommand.getParameters ( ) . rollbackOnFailure ( ) ) ; hostCmdParams.setConectivityTimeout ( timeout ) ; boolean hostNetworkQosSupported = org.ovirt.engine.core.common.FeatureSupported.hostNetworkQos ( org.ovirt.engine.core.bll.network.host.HostSetupNetworksCommand.getVds ( ) . getVdsGroupCompatibilityVersion ( ) ) ; hostCmdParams.setHostNetworkQosSupported ( hostNetworkQosSupported ) ; return hostCmdParams ; }
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.ENTITY , Schema.Entities.USER ) . mput ( Schema.InvokeKeys.ENTITY_KEYS , new org.ovirt.engine.api.extensions.ExtMap ( ) . mput ( Schema.UserIdentifiers.USERNAME , args.get ( "user" ) ) . mput ( Schema.SharedKeys.REMOVE_GROUP , context.get ( org.ovirt.engine.extension.aaa.jdbc.binding.cli.Cli.ContextKeys.POSITIONAL ) ) ) ; org.ovirt.engine.extension.aaa.jdbc.binding.cli.Cli.commands.get ( "_schema-modify" ) . invoke ( context ) ; context.putIfAbsent ( 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 ) { if ( ! ( context.containsKey ( ContextKeys.EXIT_STATUS ) ) ) { context.put ( Schema.InvokeKeys.MODIFICATION_TYPE , Sql.ModificationTypes.UPDATE ) ; context.put ( Schema.InvokeKeys.ENTITY_KEYS , new org.ovirt.engine.api.extensions.ExtMap ( ) . mput ( Schema.UserIdentifiers.USERNAME , context.get ( ContextKeys.POSITIONAL ) ) . mput ( Schema.UserKeys.UNLOCK_TIME , java.lang.System.currentTimeMillis ( ) ) ) ; 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 void testSetStatusForNonRequiredNetworkUpdated ( ) { networkCluster.setRequired ( false ) ; networkCluster.setStatus ( NetworkStatus.NON_OPERATIONAL ) ; underTest.setStatus ( org.ovirt.engine.core.bll.network.cluster.NetworkClusterHelperTest.CLUSTER_ID , createNetwork ( org.ovirt.engine.core.bll.network.cluster.NetworkClusterHelperTest.NETWORK_ID , org.ovirt.engine.core.bll.network.cluster.NetworkClusterHelperTest.NETWORK_NAME ) ) ; org.mockito.Mockito.verify ( networkClusterDao ) . updateStatus ( org.mockito.ArgumentMatchers.same ( networkCluster ) ) ; org.junit.Assert.assertThat ( networkCluster.getStatus ( ) , org.hamcrest.Matchers.is ( NetworkStatus.OPERATIONAL ) ) ; }

Target:
public void testSetStatusForRequiredNetworkPresentOnHost ( ) { networkCluster.setStatus ( NetworkStatus.OPERATIONAL ) ; testSetStatusForRequiredNetwork ( org.ovirt.engine.core.bll.network.cluster.NetworkClusterHelperTest.NETWORK_NAME ) ; org.mockito.Mockito.verify ( networkClusterDao , org.mockito.Mockito.never ( ) ) . updateStatus ( org.mockito.Matchers.same ( networkCluster ) ) ; org.junit.Assert.assertThat ( networkCluster.getStatus ( ) , org.hamcrest.Matchers.is ( NetworkStatus.OPERATIONAL ) ) ; }
Source:
protected void initDisksStorageDomainsList ( ) { for ( java.lang.Object item : getItems ( ) ) { org.ovirt.engine.core.common.businessentities.VmTemplate template = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.ImportTemplateData ) ( item ) ) . getTemplate ( ) ; for ( org.ovirt.engine.core.common.businessentities.Disk disk : template.getDiskList ( ) ) { org.ovirt.engine.core.common.businessentities.DiskImage diskImage = ( ( org.ovirt.engine.core.common.businessentities.DiskImage ) ( disk ) ) ; addDiskImportData ( diskImage.getId ( ) , filteredStorageDomains , diskImage.getVolumeType ( ) , new org.ovirt.engine.ui.uicommonweb.models.EntityModel ( true ) ) ; } } postInitDisks ( ) ; }

Target:
protected void initDisksStorageDomainsList ( ) { for ( java.lang.Object item : getItems ( ) ) { org.ovirt.engine.core.common.businessentities.VmTemplate template = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.ImportTemplateData ) ( item ) ) . getTemplate ( ) ; for ( org.ovirt.engine.core.common.businessentities.storage.Disk disk : template.getDiskList ( ) ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage diskImage = ( ( org.ovirt.engine.core.common.businessentities.storage.DiskImage ) ( disk ) ) ; addDiskImportData ( diskImage.getId ( ) , filteredStorageDomains , diskImage.getVolumeType ( ) , new org.ovirt.engine.ui.uicommonweb.models.EntityModel ( true ) ) ; } } postInitDisks ( ) ; }
Source:
public void setUserName ( java.lang.String userName ) { this . userName.setTitle ( userName ) ; this . userName.getWidget ( 0 ) . removeStyleName ( Styles.FONT_AWESOME_BASE ) ; this . userName.getWidget ( 0 ) . removeStyleName ( IconType.USER.getCssName ( ) ) ; this . userName.getWidget ( 0 ) . addStyleName ( PatternflyIconType.PF_BASE.getCssName ( ) ) ; this . userName.getWidget ( 0 ) . addStyleName ( PatternflyIconType.PF_USER.getCssName ( ) ) ; }

Target:
public void setUserName ( java.lang.String userName ) { userNameTooltip.setText ( userName ) ; com.google.gwt.user.client.ui.Widget userNameWidget = this . userName.getWidget ( 0 ) ; userNameWidget.removeStyleName ( Styles.FONT_AWESOME_BASE ) ; userNameWidget.removeStyleName ( IconType.USER.getCssName ( ) ) ; userNameWidget.addStyleName ( PatternflyIconType.PF_BASE.getCssName ( ) ) ; userNameWidget.addStyleName ( PatternflyIconType.PF_USER.getCssName ( ) ) ; }
Source:
protected void executeCommand ( ) { org.ovirt.engine.core.bll.storage.connection.AddStorageServerConnectionExtensionCommand.getStorageServerConnectionExtensionDao ( ) . save ( org.ovirt.engine.core.bll.storage.connection.AddStorageServerConnectionExtensionCommand.getParameters ( ) . getStorageServerConnectionExtension ( ) ) ; org.ovirt.engine.core.bll.storage.connection.AddStorageServerConnectionExtensionCommand.getReturnValue ( ) . setActionReturnValue ( org.ovirt.engine.core.bll.storage.connection.AddStorageServerConnectionExtensionCommand.getParameters ( ) . getStorageServerConnectionExtension ( ) . getId ( ) ) ; org.ovirt.engine.core.bll.storage.connection.AddStorageServerConnectionExtensionCommand.getReturnValue ( ) . setSucceeded ( true ) ; }

Target:
protected void executeCommand ( ) { storageServerConnectionExtensionDao.save ( org.ovirt.engine.core.bll.storage.connection.AddStorageServerConnectionExtensionCommand.getParameters ( ) . getStorageServerConnectionExtension ( ) ) ; org.ovirt.engine.core.bll.storage.connection.AddStorageServerConnectionExtensionCommand.getReturnValue ( ) . setActionReturnValue ( org.ovirt.engine.core.bll.storage.connection.AddStorageServerConnectionExtensionCommand.getParameters ( ) . getStorageServerConnectionExtension ( ) . getId ( ) ) ; org.ovirt.engine.core.bll.storage.connection.AddStorageServerConnectionExtensionCommand.getReturnValue ( ) . setSucceeded ( true ) ; }
Source:
protected org.ovirt.engine.core.dal.dbbroker.CustomMapSqlParameterSource getParamsSource ( org.ovirt.engine.core.common.businessentities.Tags tag ) { org.ovirt.engine.core.dal.dbbroker.CustomMapSqlParameterSource paramsSource = new org.ovirt.engine.core.dal.dbbroker.CustomMapSqlParameterSource ( dbFacade.getDbEngineDialect ( ) ) ; paramsSource.addValue ( "description" , tag.getDescription ( ) ) . addValue ( "tag_id" , tag.getTagId ( ) ) . addValue ( "tag_name" , tag.getTagName ( ) ) . addValue ( "parent_id" , tag.getParentId ( ) ) . addValue ( "readonly" , tag.getIsReadonly ( ) ) . addValue ( "type" , tag.getType ( ) ) ; return paramsSource ; }

Target:
protected org.ovirt.engine.core.dal.dbbroker.CustomMapSqlParameterSource getParamsSource ( org.ovirt.engine.core.common.businessentities.Tags tag ) { org.ovirt.engine.core.dal.dbbroker.CustomMapSqlParameterSource paramsSource = new org.ovirt.engine.core.dal.dbbroker.CustomMapSqlParameterSource ( dbEngineDialect ) ; paramsSource.addValue ( "description" , tag.getDescription ( ) ) . addValue ( "tag_id" , tag.getTagId ( ) ) . addValue ( "tag_name" , tag.getTagName ( ) ) . addValue ( "parent_id" , tag.getParentId ( ) ) . addValue ( "readonly" , tag.getIsReadonly ( ) ) . addValue ( "type" , tag.getType ( ) ) ; return paramsSource ; }
Source:
protected void asyncSearch ( ) { super . asyncSearch ( ) ; syncSearch ( ) ; }

Target:
protected java.util.Set < org.ovirt.engine.core.compat.Guid > getExcludeUsers ( ) { java.util.Set < org.ovirt.engine.core.compat.Guid > excludeUsers = new java.util.HashSet < org.ovirt.engine.core.compat.Guid > ( ) ; if ( ( getExcludeItems ( ) ) != null ) { for ( java.lang.Object item : getExcludeItems ( ) ) { org.ovirt.engine.core.common.businessentities.DbUser a = ( ( org.ovirt.engine.core.common.businessentities.DbUser ) ( item ) ) ; excludeUsers.add ( a.getId ( ) ) ; } } return excludeUsers ; }
Source:
protected boolean disconnectStorage ( ) { return org.ovirt.engine.core.bll.Backend.getInstance ( ) . getResourceManager ( ) . RunVdsCommand ( VDSCommandType.DisconnectStorageServer , new org.ovirt.engine.core.common.vdscommands.StorageServerConnectionManagementVDSParameters ( org.ovirt.engine.core.bll.storage.DisconnectStorageServerConnectionCommand.getParameters ( ) . getVdsId ( ) , org.ovirt.engine.core.bll.storage.DisconnectStorageServerConnectionCommand.getParameters ( ) . getStoragePoolId ( ) , org.ovirt.engine.core.bll.storage.DisconnectStorageServerConnectionCommand.getParameters ( ) . getStorageServerConnection ( ) . getstorage_type ( ) , new java.util.ArrayList ( java.util.Arrays.asList ( new org.ovirt.engine.core.common.businessentities.StorageServerConnections [ ] { org.ovirt.engine.core.bll.storage.DisconnectStorageServerConnectionCommand.getConnection ( ) } ) ) ) ) . getSucceeded ( ) ; }

Target:
protected boolean disconnectStorage ( ) { return org.ovirt.engine.core.bll.Backend.getInstance ( ) . getResourceManager ( ) . RunVdsCommand ( VDSCommandType.DisconnectStorageServer , new org.ovirt.engine.core.common.vdscommands.StorageServerConnectionManagementVDSParameters ( org.ovirt.engine.core.bll.storage.DisconnectStorageServerConnectionCommand.getParameters ( ) . getVdsId ( ) , org.ovirt.engine.core.compat.Guid.Empty , org.ovirt.engine.core.bll.storage.DisconnectStorageServerConnectionCommand.getParameters ( ) . getStorageServerConnection ( ) . getstorage_type ( ) , new java.util.ArrayList ( java.util.Arrays.asList ( new org.ovirt.engine.core.common.businessentities.StorageServerConnections [ ] { org.ovirt.engine.core.bll.storage.DisconnectStorageServerConnectionCommand.getConnection ( ) } ) ) ) ) . getSucceeded ( ) ; }
Source:
protected void OnSelectedItemChanged ( ) { super . OnSelectedItemChanged ( ) ; UpdateActionAvailability ( ) ; }

Target:
public void OnSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.core.common.businessentities.StorageServerConnections connection = ( ( org.ovirt.engine.core.common.businessentities.StorageServerConnections ) ( returnValue ) ) ; model.getPath ( ) . setEntity ( connection.getconnection ( ) ) ; model.getVfsType ( ) . setEntity ( connection.getVfsType ( ) ) ; model.getMountOptions ( ) . setEntity ( connection.getMountOptions ( ) ) ; }
Source:
private void removeVmStatlessImages ( ) { isFailedStatlessSnapshot = true ; org.ovirt.engine.core.bll.VmPoolHandler.ProcessVmPoolOnStopVm ( org.ovirt.engine.core.bll.RunVmCommand.getVm ( ) . getId ( ) , new org.ovirt.engine.core.bll.context.CommandContext ( org.ovirt.engine.core.bll.RunVmCommand.getExecutionContext ( ) , org.ovirt.engine.core.bll.RunVmCommand.getLock ( ) ) ) ; org.ovirt.engine.core.bll.RunVmCommand.setLock ( null ) ; org.ovirt.engine.core.bll.RunVmCommand.setSucceeded ( true ) ; }

Target:
private void removeVmStatlessImages ( ) { isFailedStatlessSnapshot = true ; org.ovirt.engine.core.bll.VmPoolHandler.processVmPoolOnStopVm ( org.ovirt.engine.core.bll.RunVmCommand.getVm ( ) . getId ( ) , new org.ovirt.engine.core.bll.context.CommandContext ( org.ovirt.engine.core.bll.RunVmCommand.getExecutionContext ( ) , org.ovirt.engine.core.bll.RunVmCommand.getLock ( ) ) ) ; org.ovirt.engine.core.bll.RunVmCommand.setLock ( null ) ; org.ovirt.engine.core.bll.RunVmCommand.setSucceeded ( true ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.GraphicsDevice getGraphicsDevOfType ( org.ovirt.engine.core.common.businessentities.GraphicsType type ) { org.ovirt.engine.core.common.queries.VdcQueryReturnValue query = org.ovirt.engine.core.bll.UpdateVmCommand.getBackend ( ) . runInternalQuery ( VdcQueryType.GetGraphicsDevices , new org.ovirt.engine.core.common.queries.IdQueryParameters ( org.ovirt.engine.core.bll.UpdateVmCommand.getParameters ( ) . getVmId ( ) ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.GraphicsDevice > graphicsDevices = query.getReturnValue ( ) ; for ( org.ovirt.engine.core.common.businessentities.GraphicsDevice dev : graphicsDevices ) { if ( ( dev.getGraphicsType ( ) ) == type ) { return dev ; } } return null ; }

Target:
private java.util.List < org.ovirt.engine.core.common.businessentities.GraphicsDevice > getGraphicsDevices ( ) { if ( ( cachedGraphics ) == null ) { cachedGraphics = org.ovirt.engine.core.bll.UpdateVmCommand.getBackend ( ) . runInternalQuery ( VdcQueryType.GetGraphicsDevices , new org.ovirt.engine.core.common.queries.IdQueryParameters ( org.ovirt.engine.core.bll.UpdateVmCommand.getParameters ( ) . getVmId ( ) ) ) . getReturnValue ( ) ; } return cachedGraphics ; }
Source:
public void getValueWithMultipleVersions ( ) throws java.lang.Exception { final java.lang.String key = "MaxNumOfVmSockets" ; org.ovirt.engine.core.config.EngineConfigTest.log.info ( ( "getValue: Testing fetch multiple version of " + key ) ) ; java.util.List < org.ovirt.engine.core.config.entity.ConfigKey > keys = config.getEngineConfigLogic ( ) . getConfigDAO ( ) . getKeysForName ( key ) ; for ( org.ovirt.engine.core.config.entity.ConfigKey configKey : keys ) { org.ovirt.engine.core.config.EngineConfigTest.log.info ( ( ( ( configKey.getDisplayValue ( ) ) + " version: " ) + ( configKey.getVersion ( ) ) ) ) ; } junit.framework.Assert.assertTrue ( ( ( keys.size ( ) ) > 0 ) ) ; }

Target:
public void getValueWithMultipleVersions ( ) throws java.lang.Exception { final java.lang.String key = "MaxNumOfVmSockets" ; org.ovirt.engine.core.config.EngineConfigTest.log.info ( ( "getValue: Testing fetch multiple version of " + key ) ) ; java.util.List < org.ovirt.engine.core.config.entity.ConfigKey > keys = config.getEngineConfigLogic ( ) . getConfigDAO ( ) . getKeysForName ( key ) ; for ( org.ovirt.engine.core.config.entity.ConfigKey configKey : keys ) { org.ovirt.engine.core.config.EngineConfigTest.log.info ( ( ( ( configKey.getDisplayValue ( ) ) + " version: " ) + ( configKey.getVersion ( ) ) ) ) ; } org.junit.Assert.assertTrue ( ( ( keys.size ( ) ) > 0 ) ) ; }
Source:
protected boolean hostToRunExist ( ) { java.util.List < org.ovirt.engine.core.compat.Guid > dedicatedHostsList = org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . getVmStaticData ( ) . getDedicatedVmForVdsList ( ) ; if ( dedicatedHostsList.isEmpty ( ) ) { return true ; } for ( org.ovirt.engine.core.compat.Guid candidateHostGuid : dedicatedHostsList ) { if ( ( org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVdsDao ( ) . get ( candidateHostGuid ) ) == null ) { addCanDoActionMessage ( VdcBllMessages.ACTION_TYPE_FAILED_HOST_NOT_EXIST ) ; return false ; } } return true ; }

Target:
protected boolean hostToRunExist ( ) { java.util.List < org.ovirt.engine.core.compat.Guid > dedicatedHostsList = org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . getVmStaticData ( ) . getDedicatedVmForVdsList ( ) ; if ( dedicatedHostsList.isEmpty ( ) ) { return true ; } for ( org.ovirt.engine.core.compat.Guid candidateHostGuid : dedicatedHostsList ) { if ( ( org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVdsDao ( ) . get ( candidateHostGuid ) ) == null ) { addCanDoActionMessage ( EngineMessage.ACTION_TYPE_FAILED_HOST_NOT_EXIST ) ; return false ; } } return true ; }
Source:
protected java.lang.String getHiddenColumnWidthKey ( com.google.gwt.user.cellview.client.Column < T , ? > column ) { if ( columnResizePersistenceEnabled ) { return ( ( ( ( ( ( org.ovirt.engine.ui.common.widget.table.ColumnResizeCellTable.GRID_HIDDEN ) + "_" ) + ( org.ovirt.engine.ui.common.widget.table.ColumnResizeCellTable.GRID_COLUMN_WIDTH_PREFIX ) ) + "_" ) + ( getGridElementId ( ) ) ) + "_" ) + ( getColumnIndex ( column ) ) ; } return null ; }

Target:
protected java.lang.String getColumnWidthKey ( com.google.gwt.user.cellview.client.Column < T , ? > column ) { if ( columnResizePersistenceEnabled ) { return ( ( ( ( org.ovirt.engine.ui.common.widget.table.ColumnResizeCellTable.GRID_COLUMN_WIDTH_PREFIX ) + "_" ) + ( getGridElementId ( ) ) ) + "_" ) + ( determineOriginalIndex ( getColumnIndex ( column ) ) ) ; } return null ; }
Source:
protected void AsyncSearch ( ) { super . AsyncSearch ( ) ; org.ovirt.engine.core.common.businessentities.VM vm = getEntity ( ) ; setAsyncResult ( org.ovirt.engine.ui.frontend.Frontend.RegisterQuery ( VdcQueryType.GetVmInterfacesByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vm.getId ( ) ) ) ) ; setItems ( getAsyncResult ( ) . getData ( ) ) ; }

Target:
protected void asyncSearch ( ) { super . asyncSearch ( ) ; org.ovirt.engine.core.common.businessentities.VM vm = getEntity ( ) ; setAsyncResult ( org.ovirt.engine.ui.frontend.Frontend.RegisterQuery ( VdcQueryType.GetVmInterfacesByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vm.getId ( ) ) ) ) ; setItems ( getAsyncResult ( ) . getData ( ) ) ; }
Source:
private java.lang.Runnable pendingOperations ( ) throws java.io.IOException , org.ovirt.vdsm.jsonrpc.client.ClientConnectionException { if ( ( this . nioEngine ) == null ) { return null ; } return nioEngine.process ( ) ; }

Target:
private java.lang.Runnable pendingOperations ( ) throws java.io.IOException , org.ovirt.vdsm.jsonrpc.client.ClientConnectionException { if ( ( this . nioEngine ) == null ) { return null ; } if ( ( this . certCallback ) != null ) { this . certCallback.registerSslSession ( this . nioEngine.getSSLEngine ( ) . getSession ( ) ) ; } return nioEngine.process ( ) ; }
Source:
protected static void addContextMessage ( org.ovirt.engine.api.extensions.ExtMap context , boolean error , java.lang.String message ) { org.ovirt.engine.api.extensions.ExtKey key ; if ( error ) { key = org.ovirt.engine.extension.aaa.jdbc.binding.cli.ContextKeys.ERR_MESSAGES ; } else { key = org.ovirt.engine.extension.aaa.jdbc.binding.cli.ContextKeys.OUT_MESSAGES ; } ( ( java.util.List < java.lang.String > ) ( context.get ( key , java.util.List.class ) ) ) . add ( message ) ; }

Target:
protected static void addContextMessage ( org.ovirt.engine.api.extensions.ExtMap context , boolean error , java.lang.String message ) { org.ovirt.engine.api.extensions.ExtKey key ; if ( error ) { key = org.ovirt.engine.extension.aaa.jdbc.binding.cli.ContextKeys.ERR_MESSAGES ; } else { key = org.ovirt.engine.extension.aaa.jdbc.binding.cli.ContextKeys.OUT_MESSAGES ; } context.< java.util.List < java.lang.String > > get ( key ) . add ( message ) ; }
Source:
protected void handleCopyResult ( org.ovirt.engine.core.common.businessentities.DiskImage copiedDiskImage , org.ovirt.engine.core.common.action.VdcActionParametersBase parameters , org.ovirt.engine.core.common.action.VdcReturnValueBase result ) { if ( ! ( result.getSucceeded ( ) ) ) { throw new org.ovirt.engine.core.common.errors.VdcBLLException ( org.ovirt.engine.core.common.errors.VdcBllErrors.VolumeCreationError ) ; } else { org.ovirt.engine.core.bll.ImagesHandler.addDiskImageWithNoVmDevice ( copiedDiskImage ) ; org.ovirt.engine.core.bll.AddVmAndCloneImageCommand.getTaskIdList ( ) . addAll ( result.getInternalVdsmTaskIdList ( ) ) ; newDiskImages.add ( copiedDiskImage ) ; } }

Target:
private void handleCopyResult ( org.ovirt.engine.core.common.businessentities.DiskImage srcDiskImage , org.ovirt.engine.core.common.businessentities.DiskImage copiedDiskImage , org.ovirt.engine.core.common.action.VdcReturnValueBase result ) { if ( ! ( result.getSucceeded ( ) ) ) { throw new org.ovirt.engine.core.common.errors.VdcBLLException ( org.ovirt.engine.core.common.errors.VdcBllErrors.VolumeCreationError ) ; } else { org.ovirt.engine.core.bll.ImagesHandler.addDiskImageWithNoVmDevice ( copiedDiskImage ) ; org.ovirt.engine.core.bll.AddVmAndCloneImageCommand.getTaskIdList ( ) . addAll ( result.getInternalVdsmTaskIdList ( ) ) ; org.ovirt.engine.core.bll.AddVmAndCloneImageCommand.getSrcDiskIdToTargetDiskIdMapping ( ) . put ( srcDiskImage.getId ( ) , copiedDiskImage.getId ( ) ) ; } }
Source:
public org.ovirt.engine.core.bll.tasks.SPMAsyncTask concreteCreateTask ( org.ovirt.engine.core.compat.Guid taskId , org.ovirt.engine.core.bll.CommandBase command , org.ovirt.engine.core.common.asynctasks.AsyncTaskCreationInfo asyncTaskCreationInfo , org.ovirt.engine.core.common.action.VdcActionType parentCommand ) { org.ovirt.engine.core.common.asynctasks.AsyncTaskParameters p = new org.ovirt.engine.core.common.asynctasks.AsyncTaskParameters ( asyncTaskCreationInfo , getAsyncTask ( taskId , command , asyncTaskCreationInfo , parentCommand ) ) ; p.setEntityInfo ( command.getParameters ( ) . getEntityInfo ( ) ) ; return createTask ( internalGetTaskType ( command ) , p ) ; }

Target:
public void addOrUpdateTaskInDB ( final org.ovirt.engine.core.common.businessentities.AsyncTasks asyncTask ) { coCoAsyncTaskHelper.addOrUpdateTaskInDB ( asyncTask ) ; }
Source:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel ) ( target ) ) ; org.ovirt.engine.core.common.businessentities.StoragePool dataCenter = ( ( org.ovirt.engine.core.common.businessentities.StoragePool ) ( returnValue ) ) ; model.SetDataCenter ( model , new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StoragePool > ( java.util.Arrays.asList ( new org.ovirt.engine.core.common.businessentities.StoragePool [ ] { dataCenter } ) ) ) ; model.getDataCenter ( ) . setIsChangable ( false ) ; }

Target:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel ) ( target ) ) ; org.ovirt.engine.core.common.businessentities.StoragePool dataCenter = ( ( org.ovirt.engine.core.common.businessentities.StoragePool ) ( returnValue ) ) ; model.setDataCenter ( model , new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StoragePool > ( java.util.Arrays.asList ( new org.ovirt.engine.core.common.businessentities.StoragePool [ ] { dataCenter } ) ) ) ; model.getDataCenter ( ) . setIsChangable ( false ) ; }
Source:
protected org.ovirt.engine.core.common.businessentities.AdUser populateUserData ( org.ovirt.engine.core.common.businessentities.AdUser user , java.lang.String domain ) { if ( user == null ) { return null ; } user.setDomainControler ( domain ) ; java.util.HashMap < java.lang.String , org.ovirt.engine.core.common.businessentities.ad_groups > groupsDict = new java.util.HashMap < java.lang.String , org.ovirt.engine.core.common.businessentities.ad_groups > ( ) ; org.ovirt.engine.core.bll.adbroker.GroupsDNQueryGenerator generator = new org.ovirt.engine.core.bll.adbroker.GroupsDNQueryGenerator ( ) ; proceedGroupsSearchResult ( user.getMemberof ( ) , groupsDict , generator ) ; user.setGroups ( groupsDict ) ; return user ; }

Target:
protected org.ovirt.engine.core.common.businessentities.LdapUser populateUserData ( org.ovirt.engine.core.common.businessentities.LdapUser user , java.lang.String domain ) { if ( user == null ) { return null ; } user.setDomainControler ( domain ) ; java.util.HashMap < java.lang.String , org.ovirt.engine.core.common.businessentities.LdapGroup > groupsDict = new java.util.HashMap < java.lang.String , org.ovirt.engine.core.common.businessentities.LdapGroup > ( ) ; org.ovirt.engine.core.bll.adbroker.GroupsDNQueryGenerator generator = new org.ovirt.engine.core.bll.adbroker.GroupsDNQueryGenerator ( ) ; proceedGroupsSearchResult ( user.getMemberof ( ) , groupsDict , generator ) ; user.setGroups ( groupsDict ) ; return user ; }
Source:
private void logException ( java.lang.RuntimeException ex ) { log.error ( "Command '{}' execution failed: {}" , this , ex.getMessage ( ) ) ; log.debug ( "Exception" , ex ) ; }

Target:
private void logException ( java.lang.RuntimeException ex ) { if ( ( ( ex.getMessage ( ) ) == null ) || ( ! ( ex.getMessage ( ) . contains ( "Policy reset" ) ) ) ) { log.error ( "Command '{}' execution failed: {}" , this , ex.getMessage ( ) ) ; log.debug ( "Exception" , ex ) ; } }
Source:
public static boolean isRangeValid ( java.lang.String start , java.lang.String end ) { return ! ( org.ovirt.engine.core.utils.MacAddressRangeUtils.innerInitRange ( start , end , 1 ) . isEmpty ( ) ) ; }

Target:
public static boolean isRangeValid ( java.lang.String start , java.lang.String end ) { long startNum = org.ovirt.engine.core.utils.MacAddressRangeUtils.macToLong ( start ) ; long endNum = org.ovirt.engine.core.utils.MacAddressRangeUtils.macToLong ( end ) ; return ! ( org.ovirt.engine.core.utils.MacAddressRangeUtils.innerInitRange ( 1 , startNum , endNum ) . isEmpty ( ) ) ; }
Source:
public java.lang.Integer runInTransaction ( ) { org.ovirt.engine.core.common.businessentities.AsyncTasks asyncTask = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getAsyncTaskDao ( ) . getByVdsmTaskId ( vdsmTaskId ) ; int retVal = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getAsyncTaskDao ( ) . removeByVdsmTaskId ( vdsmTaskId ) ; if ( ( asyncTask != null ) && ( ! ( org.ovirt.engine.core.compat.Guid.isNullOrEmpty ( asyncTask.getCommandId ( ) ) ) ) ) { commandsCache.remove ( asyncTask.getCommandId ( ) ) ; } return retVal ; }

Target:
public org.ovirt.engine.core.common.businessentities.AsyncTasks getByVdsmTaskId ( org.ovirt.engine.core.compat.Guid vdsmTaskId ) { return coCoAsyncTaskHelper.getByVdsmTaskId ( vdsmTaskId ) ; }
Source:
public void testCannotDisableVirtioScsi ( ) { prepareVmToPassCanDoAction ( ) ; command.getParameters ( ) . setVirtioScsiEnabled ( false ) ; org.ovirt.engine.core.common.businessentities.storage.Disk disk = new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ; disk.setDiskInterface ( DiskInterface.VirtIO_SCSI ) ; disk.setPlugged ( true ) ; mockDiskDaoGetAllForVm ( java.util.Collections.singletonList ( disk ) , true ) ; mockVmValidator ( ) ; command.initEffectiveCompatibilityVersion ( ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( command , EngineMessage.CANNOT_DISABLE_VIRTIO_SCSI_PLUGGED_DISKS ) ; }

Target:
public void testCannotUpdateOSNotSupportVirtioScsi ( ) { prepareVmToPassValidate ( ) ; group.setCompatibilityVersion ( Version.v4_0 ) ; org.mockito.Mockito.when ( command.isVirtioScsiEnabledForVm ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( true ) ; org.mockito.Mockito.when ( osRepository.getDiskInterfaces ( org.mockito.Matchers.any ( java.lang.Integer.class ) , org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Version.class ) ) ) . thenReturn ( new java.util.ArrayList < > ( java.util.Arrays.asList ( "VirtIO" ) ) ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( command , EngineMessage.ACTION_TYPE_FAILED_ILLEGAL_OS_TYPE_DOES_NOT_SUPPORT_VIRTIO_SCSI ) ; }
Source:
protected org.ovirt.engine.api.model.Tag lookupTagByName ( java.lang.String name ) { for ( org.ovirt.engine.core.common.businessentities.Tags tag : getBackendCollection ( org.ovirt.engine.core.common.businessentities.Tags.class , QueryType.GetAllTags , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) ) ) { if ( tag.getTagName ( ) . equals ( name ) ) { return map ( tag ) ; } } return handleError ( new org.ovirt.engine.api.restapi.resource.EntityNotFoundException ( name ) , false ) ; }

Target:
protected org.ovirt.engine.api.model.Tag lookupTagByName ( java.lang.String name ) { for ( org.ovirt.engine.core.common.businessentities.Tags tag : getBackendCollection ( org.ovirt.engine.core.common.businessentities.Tags.class , QueryType.GetAllTags , new org.ovirt.engine.core.common.queries.QueryParametersBase ( ) ) ) { if ( tag.getTagName ( ) . equals ( name ) ) { return map ( tag ) ; } } return handleError ( new org.ovirt.engine.api.restapi.resource.EntityNotFoundException ( name ) , false ) ; }
Source:
public void getVdsWithVm ( ) { final org.ovirt.engine.core.common.businessentities.VDS vds = null ; final org.ovirt.engine.core.common.businessentities.VM vm = new org.ovirt.engine.core.common.businessentities.VM ( ) ; vm.setRunOnVds ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.GUID2 ) ; final org.ovirt.engine.core.compat.Guid vdsId = null ; b.setVds ( vds ) ; b.setVdsId ( vdsId ) ; b.setVm ( vm ) ; final org.ovirt.engine.core.common.businessentities.VDS v = b.getVds ( ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.GUID2 , v.getId ( ) ) ; }

Target:
public void getVdsWithVm ( ) { final org.ovirt.engine.core.common.businessentities.VDS vds = null ; final org.ovirt.engine.core.common.businessentities.VM vm = new org.ovirt.engine.core.common.businessentities.VM ( ) ; vm.setRunOnVds ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.GUID2 ) ; final org.ovirt.engine.core.compat.Guid vdsId = null ; b.setVds ( vds ) ; b.setVdsId ( vdsId ) ; b.setVm ( vm ) ; final org.ovirt.engine.core.common.businessentities.VDS v = b.getVds ( ) ; org.junit.jupiter.api.Assertions.assertEquals ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.GUID2 , v.getId ( ) ) ; }
Source:
private static void addFloppyDetails ( org.ovirt.engine.core.common.businessentities.VmDevice vmDevice , org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcStruct struct ) { struct.add ( VdsProperties.Type , vmDevice.getType ( ) ) ; struct.add ( VdsProperties.Device , vmDevice.getDevice ( ) ) ; struct.add ( VdsProperties.Index , "0" ) ; struct.add ( VdsProperties.Iface , VdsProperties.Fdc ) ; struct.add ( VdsProperties.ReadOnly , java.lang.String.valueOf ( vmDevice.getIsReadOnly ( ) ) ) ; struct.add ( VdsProperties.Shareable , java.lang.Boolean.FALSE.toString ( ) ) ; }

Target:
private static void addFloppyDetails ( org.ovirt.engine.core.common.businessentities.VmDevice vmDevice , org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcStruct struct ) { struct.add ( VdsProperties.Type , vmDevice.getType ( ) ) ; struct.add ( VdsProperties.Device , vmDevice.getDevice ( ) ) ; struct.add ( VdsProperties.Index , "0" ) ; struct.add ( VdsProperties.NETWORK_INTERFACE , VdsProperties.Fdc ) ; struct.add ( VdsProperties.ReadOnly , java.lang.String.valueOf ( vmDevice.getIsReadOnly ( ) ) ) ; struct.add ( VdsProperties.Shareable , java.lang.Boolean.FALSE.toString ( ) ) ; }
Source:
public void onBrowserEvent ( com.google.gwt.cell.client.Cell.Context context , com.google.gwt.dom.client.Element elem , com.google.gwt.dom.client.NativeEvent event ) { getCell ( ) . onBrowserEvent ( context , elem , org.ovirt.engine.ui.common.widget.table.header.AbstractHeader.getValue ( ) , org.ovirt.engine.ui.common.widget.table.header.AbstractHeader.getTooltip ( ) , event , updater ) ; }

Target:
public void onBrowserEvent ( com.google.gwt.cell.client.Cell.Context context , com.google.gwt.dom.client.Element elem , com.google.gwt.dom.client.NativeEvent event ) { getCell ( ) . onBrowserEvent ( context , elem , org.ovirt.engine.ui.common.widget.table.header.AbstractHeader.getValue ( ) , org.ovirt.engine.ui.common.widget.table.header.AbstractHeader.getTooltip ( ) , event , updater ) ; if ( ( BrowserEvents.CONTEXTMENU.equals ( event.getType ( ) ) ) && ( ( contextMenuHandler ) != null ) ) { contextMenuHandler.onContextMenu ( event ) ; } }
Source:
private static void assertDiskDescriptionMap ( java.lang.String diskAlias , java.lang.String diskDescription ) throws java.io.IOException { org.junit.Assert.assertEquals ( "Should be map of disk alias and disk description" , java.lang.String.format ( ( "{\"DiskAlias\":\"%s\"," + "\"DiskDescription\":\"%s\"}" ) , diskAlias , org.apache.commons.lang.StringUtils.defaultString ( diskDescription ) ) , org.ovirt.engine.core.bll.ImagesHandler.getJsonDiskDescription ( diskAlias , diskDescription ) ) ; }

Target:
private static void assertDiskDescriptionMap ( org.ovirt.engine.core.common.businessentities.Disk disk ) throws java.io.IOException { org.junit.Assert.assertEquals ( "Should be map of disk alias and disk description" , java.lang.String.format ( ( "{\"DiskAlias\":\"%s\"," + "\"DiskDescription\":\"%s\"}" ) , disk.getDiskAlias ( ) , org.apache.commons.lang.StringUtils.defaultString ( disk.getDiskDescription ( ) ) ) , org.ovirt.engine.core.bll.ImagesHandler.getJsonDiskDescription ( disk ) ) ; }
Source:
public void canDoActionDiskIsOvfStore ( ) throws java.lang.Exception { initializeCommand ( ImageOperation.Move ) ; initVmDiskImage ( ) ; command.getImage ( ) . setOvfStore ( true ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( command , VdcBllMessages.ACTION_TYPE_FAILED_OVF_DISK_NOT_SUPPORTED ) ; }

Target:
public void canDoActionVmIsNotDown ( ) throws java.lang.Exception { initializeCommand ( ImageOperation.Move ) ; initVmDiskImage ( false ) ; mockGetVmsListForDisk ( ) ; initSrcStorageDomain ( ) ; initDestStorageDomain ( StorageType.NFS ) ; org.mockito.Mockito.doReturn ( vmDeviceDao ) . when ( command ) . getVmDeviceDAO ( ) ; org.junit.Assert.assertFalse ( command.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( command.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( VdcBllMessages.ACTION_TYPE_FAILED_VM_IS_NOT_DOWN.toString ( ) ) ) ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValueObj ) { org.ovirt.engine.core.common.queries.VdcQueryReturnValue returnValue = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValueObj ) ) ; java.lang.Object returnValue2 = returnValue.getReturnValue ( ) ; java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > allNics = ( ( java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > ) ( returnValue2 ) ) ; this . allNics = allNics ; queryFreeBonds ( ) ; }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > bonds = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ; allBonds = bonds ; queryLabels ( ) ; }