auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void OnSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.userportal.VmItemBehavior behavior = ( ( org.ovirt.engine.ui.uicommonweb.models.userportal.VmItemBehavior ) ( target ) ) ; org.ovirt.engine.core.common.businessentities.vm_pools pool = ( ( org.ovirt.engine.core.common.businessentities.vm_pools ) ( returnValue ) ) ; boolean isManualPool = ( pool.getvm_pool_type ( ) ) == ( org.ovirt.engine.core.common.businessentities.VmPoolType.Manual ) ; behavior.UpdateCommandsAccordingToPoolType ( isManualPool ) ; }

Target:
public void OnSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.userportal.VmItemBehavior behavior = ( ( org.ovirt.engine.ui.uicommonweb.models.userportal.VmItemBehavior ) ( target ) ) ; org.ovirt.engine.core.common.businessentities.VmPool pool = ( ( org.ovirt.engine.core.common.businessentities.VmPool ) ( returnValue ) ) ; boolean isManualPool = ( pool.getVmPoolType ( ) ) == ( org.ovirt.engine.core.common.businessentities.VmPoolType.Manual ) ; behavior.UpdateCommandsAccordingToPoolType ( isManualPool ) ; }
Source:
public void canRemoveBrickEmptyList ( ) { org.ovirt.engine.core.bll.ValidationResult validationResult = brickValidator.canRemoveBrick ( java.util.Collections.emptyList ( ) , getDistributedVolume ( volumeId1 , 1 ) , 3 , false ) ; org.junit.Assert.assertFalse ( validationResult.isValid ( ) ) ; org.junit.Assert.assertEquals ( EngineMessage.ACTION_TYPE_FAILED_BRICKS_REQUIRED , validationResult.getMessage ( ) ) ; }

Target:
public void canRemoveBrickEmptyList ( ) { org.ovirt.engine.core.bll.ValidationResult validationResult = brickValidator.canRemoveBrick ( java.util.Collections.emptyList ( ) , getDistributedVolume ( volumeId1 , 1 ) , 3 , false ) ; org.junit.Assert.assertThat ( validationResult , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.ACTION_TYPE_FAILED_BRICKS_REQUIRED ) ) ; }
Source:
private void acquireLockAndWait ( ) { if ( ( commandLock ) == null ) { java.util.Map < java.lang.String , java.lang.String > exclusiveLocks = getExclusiveLocks ( ) ; if ( exclusiveLocks != null ) { org.ovirt.engine.core.utils.lock.EngineLock lock = new org.ovirt.engine.core.utils.lock.EngineLock ( exclusiveLocks , null ) ; getLockManager ( ) . acquireLockWait ( lock ) ; commandLock = lock ; } } }

Target:
private void acquireLockAndWait ( ) { if ( ( commandLock ) == null ) { java.util.Map < java.lang.String , org.ovirt.engine.core.common.utils.Pair < java.lang.String , java.lang.String > > exclusiveLocks = getExclusiveLocks ( ) ; if ( exclusiveLocks != null ) { org.ovirt.engine.core.utils.lock.EngineLock lock = new org.ovirt.engine.core.utils.lock.EngineLock ( exclusiveLocks , null ) ; getLockManager ( ) . acquireLockWait ( lock ) ; commandLock = lock ; } } }
Source:
protected void endWithFailure ( ) { org.ovirt.engine.core.bll.storage.disk.image.CreateImageTemplateCommand.unLockImage ( ) ; setVmTemplate ( org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmTemplateDao ( ) . get ( org.ovirt.engine.core.bll.storage.disk.image.CreateImageTemplateCommand.getVmTemplateId ( ) ) ) ; if ( ( org.ovirt.engine.core.bll.storage.disk.image.CreateImageTemplateCommand.getDestinationDiskImage ( ) ) != null ) { revertTasks ( ) ; } org.ovirt.engine.core.bll.storage.disk.image.CreateImageTemplateCommand.setSucceeded ( true ) ; }

Target:
protected void endWithFailure ( ) { org.ovirt.engine.core.bll.storage.disk.image.CreateImageTemplateCommand.unLockImage ( ) ; setVmTemplate ( vmTemplateDao.get ( org.ovirt.engine.core.bll.storage.disk.image.CreateImageTemplateCommand.getVmTemplateId ( ) ) ) ; if ( ( org.ovirt.engine.core.bll.storage.disk.image.CreateImageTemplateCommand.getDestinationDiskImage ( ) ) != null ) { revertTasks ( ) ; } org.ovirt.engine.core.bll.storage.disk.image.CreateImageTemplateCommand.setSucceeded ( true ) ; }
Source:
protected N performAdd ( N incoming ) { org.ovirt.engine.core.common.scheduling.ClusterPolicy entity = getClusterPolicy ( ) ; performAction ( VdcActionType.EditClusterPolicy , getAddParametersProvider ( ) . getParameters ( incoming , entity ) ) ; entity = getClusterPolicy ( ) ; updateIncomingId ( incoming ) ; N model = map ( entity , incoming ) ; return addLinks ( doPopulate ( model , entity ) ) ; }

Target:
protected javax.ws.rs.core.Response performAdd ( N incoming ) { org.ovirt.engine.core.common.scheduling.ClusterPolicy entity = getClusterPolicy ( ) ; performAction ( VdcActionType.EditClusterPolicy , getAddParametersProvider ( ) . getParameters ( incoming , entity ) ) ; entity = getClusterPolicy ( ) ; updateIncomingId ( incoming ) ; N model = map ( entity , incoming ) ; model = addLinks ( doPopulate ( model , entity ) ) ; return javax.ws.rs.core.Response.ok ( model ) . build ( ) ; }
Source:
private org.ovirt.engine.core.bll.network.host.SetupNetworksHelper qosCommitmentBondSetup ( int totalCommitment , java.lang.Integer slaveSpeed , java.lang.Integer bondSpeed , java.lang.String bondOptions ) { return qosCommitmentSetup ( true , totalCommitment , slaveSpeed , bondSpeed , bondOptions ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { final org.ovirt.engine.core.vdsbroker.EffectiveHostNetworkQos effectiveHostNetworkQos = new org.ovirt.engine.core.vdsbroker.EffectiveHostNetworkQos ( qosDao ) ; injectorRule.bind ( org.ovirt.engine.core.dao.network.NetworkDao.class , networkDao ) ; injectorRule.bind ( org.ovirt.engine.core.dao.network.NetworkAttachmentDao.class , networkAttachmentDao ) ; injectorRule.bind ( org.ovirt.engine.core.dao.network.InterfaceDao.class , interfaceDao ) ; injectorRule.bind ( org.ovirt.engine.core.dao.gluster.GlusterBrickDao.class , brickDao ) ; injectorRule.bind ( org.ovirt.engine.core.vdsbroker.EffectiveHostNetworkQos.class , effectiveHostNetworkQos ) ; injectorRule.bind ( org.ovirt.engine.core.vdsbroker.NetworkImplementationDetailsUtils.class , new org.ovirt.engine.core.vdsbroker.NetworkImplementationDetailsUtils ( effectiveHostNetworkQos , networkAttachmentDao , calculateBaseNic ) ) ; injectorRule.bind ( org.ovirt.engine.core.vdsbroker.CalculateBaseNic.class , calculateBaseNic ) ; }
Source:
private java.lang.String determineProtocolMessage ( org.ovirt.engine.ui.uicommonweb.models.ConsoleProtocol protocol , org.ovirt.engine.ui.uicommonweb.models.HasConsoleModel item ) { if ( ( consoleUtils.isSmartcardGloballyEnabled ( item ) ) && ( ! ( consoleUtils.isSmartcardEnabledOverriden ( item ) ) ) ) { return messages.consoleWithSmartcard ( protocol.displayName ) ; } return protocol.displayName ; }

Target:
private java.lang.String determineProtocolMessage ( org.ovirt.engine.ui.uicommonweb.models.ConsoleProtocol protocol , org.ovirt.engine.ui.uicommonweb.models.HasConsoleModel item ) { if ( ( consoleUtils.isSmartcardGloballyEnabled ( item ) ) && ( ! ( consoleUtils.isSmartcardEnabledOverriden ( item ) ) ) ) { return messages.consoleWithSmartcard ( consoleTypeToName.get ( protocol ) ) ; } return consoleTypeToName.get ( protocol ) ; }
Source:
public org.ovirt.engine.ui.uicommonweb.models.macpool.SharedMacPoolListModel getModel ( ) { return getCommonModel ( ) . getSharedMacPoolListModel ( ) ; }

Target:
public org.ovirt.engine.ui.common.presenter.AbstractModelBoundPopupPresenterWidget < ? extends org.ovirt.engine.ui.uicommonweb.models.Model , ? > getModelPopup ( org.ovirt.engine.ui.uicommonweb.models.macpool.SharedMacPoolListModel source , org.ovirt.engine.ui.uicommonweb.UICommand lastExecutedCommand , org.ovirt.engine.ui.uicommonweb.models.Model windowModel ) { if ( ( lastExecutedCommand == ( getModel ( ) . getNewCommand ( ) ) ) || ( lastExecutedCommand == ( getModel ( ) . getEditCommand ( ) ) ) ) { return sharedMacPoolPopupProvider.get ( ) ; } else { return super . getModelPopup ( source , lastExecutedCommand , windowModel ) ; } }
Source:
public void validateSucceedsWhenHasPeersThrowsException ( ) throws java.lang.Exception { setupGlusterMock ( true , new org.ovirt.engine.core.common.businessentities.VDS ( ) , true ) ; org.mockito.Mockito.when ( glusterUtil.getPeers ( org.mockito.Matchers.any ( org.ovirt.engine.core.bll.utils.EngineSSHClient.class ) ) ) . thenThrow ( new java.lang.RuntimeException ( ) ) ; org.junit.Assert.assertTrue ( command.validate ( ) ) ; }

Target:
public void validateSucceedsWhenHasPeersThrowsException ( ) throws java.lang.Exception { setupGlusterMock ( true , new org.ovirt.engine.core.common.businessentities.VDS ( ) , true ) ; org.mockito.Mockito.when ( glusterUtil.getPeers ( org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.bll.utils.EngineSSHClient.class ) ) ) . thenThrow ( new java.lang.RuntimeException ( ) ) ; org.junit.Assert.assertTrue ( command.validate ( ) ) ; }
Source:
public static org.ovirt.engine.api.model.HostStorage map ( org.ovirt.engine.core.common.businessentities.storage.LUNs entity , org.ovirt.engine.api.model.HostStorage template ) { org.ovirt.engine.api.model.HostStorage model = ( template != null ) ? template : new org.ovirt.engine.api.model.HostStorage ( ) ; model.setId ( entity.getLUN_id ( ) ) ; model.setType ( org.ovirt.engine.api.restapi.types.StorageDomainMapper.map ( entity.getLunType ( ) , null ) ) ; model.setLogicalUnits ( new org.ovirt.engine.api.model.LogicalUnits ( ) ) ; model.getLogicalUnits ( ) . getLogicalUnits ( ) . add ( org.ovirt.engine.api.restapi.types.StorageLogicalUnitMapper.map ( entity , ( ( org.ovirt.engine.api.model.LogicalUnit ) ( null ) ) ) ) ; return model ; }

Target:
public static org.ovirt.engine.api.model.HostStorage map ( org.ovirt.engine.core.common.businessentities.storage.LUNs entity , org.ovirt.engine.api.model.HostStorage template ) { org.ovirt.engine.api.model.HostStorage model = ( template != null ) ? template : new org.ovirt.engine.api.model.HostStorage ( ) ; model.setId ( entity.getLUNId ( ) ) ; model.setType ( org.ovirt.engine.api.restapi.types.StorageDomainMapper.map ( entity.getLunType ( ) , null ) ) ; model.setLogicalUnits ( new org.ovirt.engine.api.model.LogicalUnits ( ) ) ; model.getLogicalUnits ( ) . getLogicalUnits ( ) . add ( org.ovirt.engine.api.restapi.types.StorageLogicalUnitMapper.map ( entity , ( ( org.ovirt.engine.api.model.LogicalUnit ) ( null ) ) ) ) ; return model ; }
Source:
protected void initDetailModels ( ) { super . initDetailModels ( ) ; org.ovirt.engine.ui.uicompat.ObservableCollection < org.ovirt.engine.ui.uicommonweb.models.EntityModel > list = new org.ovirt.engine.ui.uicompat.ObservableCollection < org.ovirt.engine.ui.uicommonweb.models.EntityModel > ( ) ; list.add ( new org.ovirt.engine.ui.uicommonweb.models.providers.ProviderGeneralModel ( ) ) ; setDetailModels ( list ) ; }

Target:
protected void initDetailModels ( ) { super . initDetailModels ( ) ; org.ovirt.engine.ui.uicompat.ObservableCollection < org.ovirt.engine.ui.uicommonweb.models.EntityModel > list = new org.ovirt.engine.ui.uicompat.ObservableCollection < org.ovirt.engine.ui.uicommonweb.models.EntityModel > ( ) ; list.add ( new org.ovirt.engine.ui.uicommonweb.models.providers.ProviderGeneralModel ( ) ) ; list.add ( new org.ovirt.engine.ui.uicommonweb.models.providers.ProviderNetworkListModel ( ) ) ; setDetailModels ( list ) ; }
Source:
public static boolean isGraphicsAndDisplaySupported ( int osId , java.util.Collection < org.ovirt.engine.core.common.businessentities.GraphicsType > graphics , org.ovirt.engine.core.common.businessentities.DisplayType displayType , java.util.List < java.lang.String > reasons , org.ovirt.engine.core.compat.Version clusterVersion ) { boolean result = org.ovirt.engine.core.bll.validator.VmValidationUtils.isGraphicsAndDisplaySupported ( osId , clusterVersion , graphics , displayType ) ; if ( ! result ) { reasons.add ( VdcBllMessages.ACTION_TYPE_FAILED_ILLEGAL_VM_DISPLAY_TYPE_IS_NOT_SUPPORTED_BY_OS.name ( ) ) ; } return result ; }

Target:
public static boolean isGraphicsAndDisplaySupported ( int osId , java.util.Collection < org.ovirt.engine.core.common.businessentities.GraphicsType > graphics , org.ovirt.engine.core.common.businessentities.DisplayType displayType , java.util.List < java.lang.String > reasons , org.ovirt.engine.core.compat.Version clusterVersion ) { boolean result = org.ovirt.engine.core.bll.validator.VmValidationUtils.isGraphicsAndDisplaySupported ( osId , clusterVersion , graphics , displayType ) ; if ( ! result ) { reasons.add ( EngineMessage.ACTION_TYPE_FAILED_ILLEGAL_VM_DISPLAY_TYPE_IS_NOT_SUPPORTED_BY_OS.name ( ) ) ; } return result ; }
Source:
public java.lang.Void runInTransaction ( ) { org.ovirt.engine.core.common.businessentities.VdsDynamic vdsDynamic = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVdsDynamicDao ( ) . get ( getVds ( ) . getId ( ) ) ; vdsDynamic.setnet_config_dirty ( getVds ( ) . getnet_config_dirty ( ) ) ; org.ovirt.engine.core.vdsbroker.ResourceManager.getInstance ( ) . runVdsCommand ( VDSCommandType.UpdateVdsDynamicData , new org.ovirt.engine.core.common.vdscommands.UpdateVdsDynamicDataVDSCommandParameters ( vdsDynamic ) ) ; return null ; }

Target:
public java.lang.Void runInTransaction ( ) { org.ovirt.engine.core.common.businessentities.VdsDynamic vdsDynamic = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVdsDynamicDao ( ) . get ( getVds ( ) . getId ( ) ) ; vdsDynamic.setnet_config_dirty ( getVds ( ) . getNetConfigDirty ( ) ) ; org.ovirt.engine.core.vdsbroker.ResourceManager.getInstance ( ) . runVdsCommand ( VDSCommandType.UpdateVdsDynamicData , new org.ovirt.engine.core.common.vdscommands.UpdateVdsDynamicDataVDSCommandParameters ( vdsDynamic ) ) ; return null ; }
Source:
public void rollbackQuota ( org.ovirt.engine.core.common.businessentities.storage_pool storagePool , java.util.List < org.ovirt.engine.core.compat.Guid > quotaList ) { rollbackQuota ( storagePool.getId ( ) , quotaList ) ; }

Target:
public void rollbackQuota ( org.ovirt.engine.core.common.businessentities.storage_pool storagePool , java.util.List < org.ovirt.engine.core.compat.Guid > quotaList ) { if ( storagePool == null ) { if ( ( quotaList == null ) || ( quotaList.isEmpty ( ) ) ) { return ; } storagePool = extractStoragePoolFromQuota ( quotaList.get ( 0 ) ) ; } rollbackQuota ( storagePool.getId ( ) , quotaList ) ; }
Source:
protected boolean canEdit ( org.ovirt.engine.ui.uicommonweb.models.EntityModel model ) { org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterNetworkModel clusterNetworkModel = ( ( org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterNetworkModel ) ( model ) ) ; java.lang.Boolean migrationNetworkEnabled = ( ( java.lang.Boolean ) ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigValuePreConverted ( ConfigurationValues.MigrationNetworkEnabled , clusterNetworkModel.getCluster ( ) . getcompatibility_version ( ) . toString ( ) ) ) ) ; return migrationNetworkEnabled && ( clusterNetworkModel.isAttached ( ) ) ; }

Target:
protected boolean canEdit ( org.ovirt.engine.ui.uicommonweb.models.EntityModel model ) { org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterNetworkModel clusterNetworkModel = ( ( org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterNetworkModel ) ( model ) ) ; java.lang.Boolean migrationNetworkEnabled = ( ( java.lang.Boolean ) ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigValuePreConverted ( ConfigurationValues.MigrationNetworkEnabled , clusterNetworkModel.getCluster ( ) . getcompatibility_version ( ) . toString ( ) ) ) ) ; return migrationNetworkEnabled && ( clusterNetworkModel.isAttached ( ) ) ; }
Source:
protected boolean checkStorageDomainNameLengthValid ( ) { boolean result = true ; if ( ( org.ovirt.engine.core.bll.storage.domain.StorageDomainCommandBase.getStorageDomain ( ) . getStorageName ( ) . length ( ) ) > ( org.ovirt.engine.core.common.config.Config.< java.lang.Integer > getValue ( ConfigValues.StorageDomainNameSizeLimit ) ) ) { addCanDoActionMessage ( EngineMessage.ACTION_TYPE_FAILED_NAME_LENGTH_IS_TOO_LONG ) ; result = false ; } return result ; }

Target:
protected boolean checkStorageDomainNameLengthValid ( ) { boolean result = true ; if ( ( org.ovirt.engine.core.bll.storage.domain.StorageDomainCommandBase.getStorageDomain ( ) . getStorageName ( ) . length ( ) ) > ( org.ovirt.engine.core.common.config.Config.< java.lang.Integer > getValue ( ConfigValues.StorageDomainNameSizeLimit ) ) ) { addValidationMessage ( EngineMessage.ACTION_TYPE_FAILED_NAME_LENGTH_IS_TOO_LONG ) ; result = false ; } return result ; }
Source:
public org.ovirt.engine.api.model.Network update ( org.ovirt.engine.api.model.Network incoming ) { return performUpdate ( incoming , new org.ovirt.engine.api.restapi.resource.BackendClusterNetworkResource.UpdatedNetworkResolver ( ) , VdcActionType.UpdateNetworkOnCluster , new org.ovirt.engine.api.restapi.resource.BackendClusterNetworkResource.UpdateParametersProvider ( ) ) ; }

Target:
public org.ovirt.engine.api.model.Network update ( org.ovirt.engine.api.model.Network incoming ) { org.ovirt.engine.api.model.Network network = map ( incoming , map ( get ( ) ) ) ; network.getCluster ( ) . setNetworkId ( network.getId ( ) ) ; network.getCluster ( ) . setClusterId ( cluster.getCluster ( ) . getId ( ) ) ; performAction ( VdcActionType.UpdateNetworkOnCluster , new org.ovirt.engine.core.common.action.NetworkClusterParameters ( network.getCluster ( ) ) ) ; return get ( ) ; }
Source:
protected void startSubStep ( ) { asyncTaskStep = org.ovirt.engine.core.bll.job.ExecutionHandler.addSubStep ( this . getExecutionContext ( ) , org.ovirt.engine.core.bll.gluster.GlusterAsyncCommandBase.getExecutionContext ( ) . getJob ( ) . getStep ( StepEnum.EXECUTING ) , getStepType ( ) , org.ovirt.engine.core.dal.job.ExecutionMessageDirector.resolveStepMessage ( getStepType ( ) , getStepMessageMap ( ) ) ) ; }

Target:
protected void setActionMessageParameters ( ) { addCanDoActionMessage ( VdcBllMessages.VAR__TYPE__GLUSTER_VOLUME ) ; addCanDoActionMessage ( java.lang.String.format ( "$volumeName %1$s" , org.ovirt.engine.core.bll.gluster.GlusterAsyncCommandBase.getGlusterVolumeName ( ) ) ) ; addCanDoActionMessage ( java.lang.String.format ( "$vdsGroup %1$s" , org.ovirt.engine.core.bll.gluster.GlusterAsyncCommandBase.getVdsGroupName ( ) ) ) ; }
Source:
public void testAddGroupFailure ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpGetEntityExpectations ( ( ( "ADGROUP@" + ( DOMAIN ) ) + ": name=*" ) , SearchType.AdGroup , getAdGroup ( 0 ) ) ; control.replay ( ) ; org.ovirt.engine.api.model.Group model = new org.ovirt.engine.api.model.Group ( ) ; model.setName ( BAD_NAMES [ 0 ] ) ; try { javax.ws.rs.core.Response response = collection.add ( model ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { assertNotNull ( wae.getResponse ( ) ) ; assertEquals ( 404 , wae.getResponse ( ) . getStatus ( ) ) ; } }

Target:
public void testListCrashClientLocale ( ) throws java.lang.Exception { javax.ws.rs.core.UriInfo uriInfo = setUpUriExpectations ( null ) ; locales.add ( org.ovirt.engine.api.restapi.resource.CLIENT_LOCALE ) ; java.lang.Throwable t = new java.lang.RuntimeException ( FAILURE ) ; setUpQueryExpectations ( org.ovirt.engine.api.restapi.resource.BackendGroupsResourceTest.QUERY , t ) ; collection.setUriInfo ( uriInfo ) ; try { getCollection ( ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , org.ovirt.engine.api.restapi.resource.BACKEND_FAILED_CLIENT_LOCALE , t ) ; } finally { locales.clear ( ) ; } }
Source:
protected void executeCommand ( ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStorageDomainStaticDao ( ) . update ( org.ovirt.engine.core.bll.storage.UpdateStorageDomainCommand.getStorageDomain ( ) . getStorageStaticData ( ) ) ; if ( ( _storageDomainNameChanged ) && ( ( org.ovirt.engine.core.bll.storage.UpdateStorageDomainCommand.getStoragePool ( ) ) != null ) ) { runVdsCommand ( VDSCommandType.SetStorageDomainDescription , new org.ovirt.engine.core.common.vdscommands.SetStorageDomainDescriptionVDSCommandParameters ( org.ovirt.engine.core.bll.storage.UpdateStorageDomainCommand.getStoragePool ( ) . getId ( ) , org.ovirt.engine.core.bll.storage.UpdateStorageDomainCommand.getStorageDomain ( ) . getId ( ) , org.ovirt.engine.core.bll.storage.UpdateStorageDomainCommand.getStorageDomain ( ) . getStorageName ( ) ) ) ; } org.ovirt.engine.core.bll.storage.UpdateStorageDomainCommand.setSucceeded ( true ) ; }

Target:
protected void executeCommand ( ) { org.ovirt.engine.core.bll.storage.UpdateStorageDomainCommand.getStorageDomainStaticDAO ( ) . update ( org.ovirt.engine.core.bll.storage.UpdateStorageDomainCommand.getStorageDomain ( ) . getStorageStaticData ( ) ) ; if ( ( _storageDomainNameChanged ) && ( ( org.ovirt.engine.core.bll.storage.UpdateStorageDomainCommand.getStoragePool ( ) ) != null ) ) { runVdsCommand ( VDSCommandType.SetStorageDomainDescription , new org.ovirt.engine.core.common.vdscommands.SetStorageDomainDescriptionVDSCommandParameters ( org.ovirt.engine.core.bll.storage.UpdateStorageDomainCommand.getStoragePool ( ) . getId ( ) , org.ovirt.engine.core.bll.storage.UpdateStorageDomainCommand.getStorageDomain ( ) . getId ( ) , org.ovirt.engine.core.bll.storage.UpdateStorageDomainCommand.getStorageDomain ( ) . getStorageName ( ) ) ) ; } org.ovirt.engine.core.bll.storage.UpdateStorageDomainCommand.setSucceeded ( true ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.VDSGroup mockVdsGroup ( ) { org.ovirt.engine.core.common.businessentities.VDSGroup group = new org.ovirt.engine.core.common.businessentities.VDSGroup ( ) ; group.setvds_group_id ( vdsGroupId ) ; group.setcompatibility_version ( new org.ovirt.engine.core.compat.Version ( ) ) ; group.setStoragePoolId ( storagePoolId ) ; group.setcpu_name ( "Intel Conroe Family" ) ; group.setArchitecture ( ArchitectureType.x86_64 ) ; return group ; }

Target:
private org.ovirt.engine.core.common.businessentities.VDSGroup mockVdsGroup ( ) { org.ovirt.engine.core.common.businessentities.VDSGroup group = new org.ovirt.engine.core.common.businessentities.VDSGroup ( ) ; group.setVdsGroupId ( vdsGroupId ) ; group.setCompatibilityVersion ( new org.ovirt.engine.core.compat.Version ( ) ) ; group.setStoragePoolId ( storagePoolId ) ; group.setCpuName ( "Intel Conroe Family" ) ; group.setArchitecture ( ArchitectureType.x86_64 ) ; return group ; }
Source:
public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.RepoImage > repoList = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.RepoImage > ) ( source ) ) ; java.util.ArrayList < java.lang.String > fileNameList = new java.util.ArrayList < java.lang.String > ( ) ; for ( org.ovirt.engine.core.common.businessentities.RepoImage repoImage : repoList ) { fileNameList.add ( repoImage.getRepoImageId ( ) ) ; } java.util.Collections.sort ( fileNameList , java.lang.String.CASE_INSENSITIVE_ORDER ) ; return fileNameList ; } return new java.util.ArrayList < java.lang.String > ( ) ; }

Target:
protected boolean desiredImage ( org.ovirt.engine.core.common.businessentities.storage.RepoImage repoImage ) { return ( org.ovirt.engine.core.common.businessentities.storage.ImageFileType.Unknown ) == ( repoImage.getFileType ( ) ) ; }
Source:
public java.lang.String getValue ( org.ovirt.engine.core.common.businessentities.QuotaVdsGroup object ) { if ( ( ( object.getVdsGroupName ( ) ) == null ) || ( ( object.getVdsGroupName ( ) . length ( ) ) == 0 ) ) { return org.ovirt.engine.ui.webadmin.section.main.view.popup.quota.QuotaPopupView.constants.ultQuotaForAllClustersQuotaPopup ( ) ; } return object.getVdsGroupName ( ) ; }

Target:
public java.lang.String getValue ( org.ovirt.engine.core.common.businessentities.QuotaCluster object ) { if ( ( ( object.getClusterName ( ) ) == null ) || ( ( object.getClusterName ( ) . length ( ) ) == 0 ) ) { return org.ovirt.engine.ui.webadmin.section.main.view.popup.quota.QuotaPopupView.constants.ultQuotaForAllClustersQuotaPopup ( ) ; } return object.getClusterName ( ) ; }
Source:
public static org.ovirt.engine.core.common.businessentities.network.VnicProfile createVnicProfile ( org.ovirt.engine.core.common.businessentities.network.Network net ) { org.ovirt.engine.core.common.businessentities.network.VnicProfile profile = new org.ovirt.engine.core.common.businessentities.network.VnicProfile ( ) ; profile.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; profile.setName ( net.getName ( ) ) ; profile.setNetworkId ( net.getId ( ) ) ; profile.setPortMirroring ( false ) ; return profile ; }

Target:
public static org.ovirt.engine.core.common.businessentities.network.VnicProfile createVnicProfile ( org.ovirt.engine.core.common.businessentities.network.Network net , org.ovirt.engine.core.dao.network.NetworkFilterDao networkFilterDao ) { org.ovirt.engine.core.common.businessentities.network.VnicProfile profile = new org.ovirt.engine.core.common.businessentities.network.VnicProfile ( ) ; profile.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; profile.setName ( net.getName ( ) ) ; profile.setNetworkId ( net.getId ( ) ) ; profile.setPortMirroring ( false ) ; org.ovirt.engine.core.common.businessentities.network.NetworkFilter defaultNetworkFilter = org.ovirt.engine.core.bll.network.cluster.NetworkHelper.resolveVnicProfileDefaultNetworkFilter ( networkFilterDao ) ; profile.setNetworkFilterId ( ( defaultNetworkFilter == null ? null : defaultNetworkFilter.getId ( ) ) ) ; return profile ; }
Source:
protected org.ovirt.engine.core.common.action.ManagementNetworkOnClusterOperationParameters createAddCommandParams ( org.ovirt.engine.api.model.Cluster cluster , org.ovirt.engine.core.common.businessentities.StoragePool dataCenter ) { org.ovirt.engine.core.common.businessentities.VDSGroup clusterEntity = map ( cluster , map ( dataCenter ) ) ; if ( ! ( ( cluster.isSetErrorHandling ( ) ) && ( cluster.getErrorHandling ( ) . isSetOnError ( ) ) ) ) { clusterEntity.setMigrateOnError ( null ) ; } final org.ovirt.engine.core.compat.Guid managementNetworkId = getManagementNetworkId ( cluster , dataCenter.getId ( ) ) ; return new org.ovirt.engine.core.common.action.ManagementNetworkOnClusterOperationParameters ( clusterEntity , managementNetworkId ) ; }

Target:
protected org.ovirt.engine.api.model.Clusters mapCollection ( java.util.List < org.ovirt.engine.core.common.businessentities.VDSGroup > entities ) { org.ovirt.engine.api.model.Clusters collection = new org.ovirt.engine.api.model.Clusters ( ) ; for ( org.ovirt.engine.core.common.businessentities.VDSGroup entity : entities ) { collection.getClusters ( ) . add ( addLinks ( populate ( map ( entity ) , entity ) ) ) ; } return collection ; }
Source:
public void getClusterList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId ) { 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 ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > list = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ) ( source ) ) ; java.util.Collections.sort ( list , new org.ovirt.engine.core.common.businessentities.comparators.NameableComparator ( ) ) ; return list ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVdsGroupsByStoragePoolId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) , aQuery ) ; }

Target:
public void getMaxNumOfThreadsPerCpu ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String version ) { 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 ) ) : 1 ; } } ; org.ovirt.engine.core.common.queries.GetConfigurationValueParameters tempVar = new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.MaxNumOfThreadsPerCpu ) ; tempVar.setVersion ( version ) ; getConfigFromCache ( tempVar , aQuery ) ; }
Source:
public void testUpdate ( ) throws java.lang.Exception { setUpGetEntityExpectations ( 2 , getEntity ( 0 ) ) ; setUpGetStorageServerConnectionExpectations ( 2 ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.UpdateStorageDomain , org.ovirt.engine.core.common.action.StorageDomainManagementParameter.class , new java.lang.String [ ] { } , new java.lang.Object [ ] { } , true , true ) ) ; verifyModel ( resource.update ( org.ovirt.engine.api.restapi.resource.BackendStorageDomainsResourceTest.getModel ( 0 ) ) , 0 ) ; }

Target:
public void testUpdate ( ) throws java.lang.Exception { setUpGetEntityExpectations ( 2 , getEntity ( 0 ) ) ; setUpGetStorageServerConnectionExpectations ( 2 ) ; setUriInfo ( setUpActionExpectations ( ActionType.UpdateStorageDomain , org.ovirt.engine.core.common.action.StorageDomainManagementParameter.class , new java.lang.String [ ] { } , new java.lang.Object [ ] { } , true , true ) ) ; verifyModel ( resource.update ( org.ovirt.engine.api.restapi.resource.BackendStorageDomainsResourceTest.getModel ( 0 ) ) , 0 ) ; }
Source:
protected boolean updateVnicForBackwardCompatibility ( ) { if ( ! ( validate ( org.ovirt.engine.core.bll.network.vm.VnicProfileHelper.updateNicForBackwardCompatibility ( org.ovirt.engine.core.bll.network.vm.AbstractVmInterfaceCommand.getParameters ( ) . getInterface ( ) , org.ovirt.engine.core.bll.network.vm.AbstractVmInterfaceCommand.getVm ( ) . getStaticData ( ) , org.ovirt.engine.core.bll.network.vm.AbstractVmInterfaceCommand.getCurrentUser ( ) . getUserId ( ) ) ) ) ) { return false ; } return true ; }

Target:
protected boolean updateVnicForBackwardCompatibility ( ) { if ( ! ( validate ( org.ovirt.engine.core.bll.network.vm.VnicProfileHelper.updateNicForBackwardCompatibility ( org.ovirt.engine.core.bll.network.vm.AbstractVmInterfaceCommand.getParameters ( ) . getInterface ( ) , org.ovirt.engine.core.bll.network.vm.AbstractVmInterfaceCommand.getParameters ( ) . getNetworkName ( ) , org.ovirt.engine.core.bll.network.vm.AbstractVmInterfaceCommand.getParameters ( ) . isPortMirroring ( ) , org.ovirt.engine.core.bll.network.vm.AbstractVmInterfaceCommand.getVm ( ) . getStaticData ( ) , org.ovirt.engine.core.bll.network.vm.AbstractVmInterfaceCommand.getCurrentUser ( ) . getId ( ) ) ) ) ) { return false ; } return true ; }
Source:
protected void syncSearch ( ) { if ( ( getEntity ( ) ) == null ) { return ; } org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity glusterVolumeEntity = ( ( org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity ) ( getEntity ( ) ) ) ; setItems ( glusterVolumeEntity.getBricks ( ) ) ; }

Target:
protected void syncSearch ( ) { if ( ( getEntity ( ) ) != null ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity glusterVolumeEntity = ( ( org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity ) ( getEntity ( ) ) ) ; if ( ( getItems ( ) ) == ( glusterVolumeEntity.getBricks ( ) ) ) { getItemsChangedEvent ( ) . raise ( this , EventArgs.EMPTY ) ; } else { setItems ( glusterVolumeEntity.getBricks ( ) ) ; } } else { setItems ( null ) ; } }
Source:
protected java.lang.Object runPublicQuery ( org.ovirt.engine.core.common.queries.QueryType queryType , org.ovirt.engine.core.common.queries.VdcQueryParametersBase queryParams , java.lang.String sessionId ) { initQueryParams ( queryParams , sessionId ) ; org.ovirt.engine.core.common.queries.VdcQueryReturnValue result = backend.runPublicQuery ( queryType , queryParams ) ; return ( result != null ) && ( result.getSucceeded ( ) ) ? result.getReturnValue ( ) : null ; }

Target:
protected java.lang.Object runPublicQuery ( org.ovirt.engine.core.common.queries.QueryType queryType , org.ovirt.engine.core.common.queries.QueryParametersBase queryParams , java.lang.String sessionId ) { initQueryParams ( queryParams , sessionId ) ; org.ovirt.engine.core.common.queries.VdcQueryReturnValue result = backend.runPublicQuery ( queryType , queryParams ) ; return ( result != null ) && ( result.getSucceeded ( ) ) ? result.getReturnValue ( ) : null ; }
Source:
public void dataCenterDoesNotExist ( ) { org.mockito.Mockito.when ( cluster.getStoragePoolId ( ) ) . thenReturn ( org.mockito.Mockito.mock ( org.ovirt.engine.core.compat.Guid.class ) ) ; org.mockito.Mockito.when ( dbFacade.getStoragePoolDao ( ) ) . thenReturn ( dataCenterDao ) ; validator = new org.ovirt.engine.core.bll.validator.ClusterValidator ( dbFacade , cluster ) ; org.junit.Assert.assertThat ( validator.dataCenterExists ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_POOL_NOT_EXIST ) ) ; }

Target:
public void dataCenterDoesNotExist ( ) { org.mockito.Mockito.when ( cluster.getStoragePoolId ( ) ) . thenReturn ( org.mockito.Mockito.mock ( org.ovirt.engine.core.compat.Guid.class ) ) ; org.mockito.Mockito.when ( dbFacade.getStoragePoolDao ( ) ) . thenReturn ( dataCenterDao ) ; validator = new org.ovirt.engine.core.bll.validator.ClusterValidator ( dbFacade , cluster ) ; org.junit.Assert.assertThat ( validator.dataCenterExists ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.ACTION_TYPE_FAILED_STORAGE_POOL_NOT_EXIST ) ) ; }
Source:
public static synchronized void initResources ( ) { if ( ( org.ovirt.engine.sdk.codegen.templates.AbstractOverloadableTemplate.headerBuilderParameterTemplate ) == null ) { org.ovirt.engine.sdk.codegen.templates.AbstractOverloadableTemplate.headerBuilderParameterTemplate = new org.ovirt.engine.sdk.codegen.templates.HeaderBuilderParameterTemplate ( ) ; } if ( ( org.ovirt.engine.sdk.codegen.templates.AbstractOverloadableTemplate.extraMethodParameterTemplate ) == null ) { org.ovirt.engine.sdk.codegen.templates.AbstractOverloadableTemplate.extraMethodParameterTemplate = new org.ovirt.engine.sdk.codegen.templates.ExtraMethodParameterTemplate ( ) ; } if ( ( org.ovirt.engine.sdk.codegen.templates.AbstractOverloadableTemplate.urlBuilderParameterTemplate ) == null ) { org.ovirt.engine.sdk.codegen.templates.AbstractOverloadableTemplate.urlBuilderParameterTemplate = new org.ovirt.engine.sdk.codegen.templates.UrlBuilderParameterTemplate ( ) ; } }

Target:
protected java.lang.String getUrlBuilderCode ( java.util.List < org.ovirt.engine.sdk.entities.Parameter > parameters ) { java.lang.StringBuilder buffer = new java.lang.StringBuilder ( ) ; for ( org.ovirt.engine.sdk.entities.Parameter parameter : parameters ) { org.ovirt.engine.sdk.codegen.templates.UrlBuilderParameterTemplate template = new org.ovirt.engine.sdk.codegen.templates.UrlBuilderParameterTemplate ( ) ; buffer.append ( "\n" ) ; buffer.append ( template.getTemplate ( parameter.getName ( ) , org.ovirt.engine.sdk.codegen.utils.UrlUtils.toQueryParam ( parameter.getName ( ) ) , org.ovirt.engine.sdk.codegen.utils.UrlUtils.toParamType ( parameter.getContext ( ) ) ) ) ; } return buffer.toString ( ) ; }
Source:
public boolean AddMac ( java.lang.String mac ) { boolean retVal = true ; synchronized ( mLocObj ) { if ( mAllocatedMacs.contains ( mac ) ) { retVal = false ; } else { if ( mAvailableMacs.contains ( mac ) ) { retVal = CommitNewMac ( mac ) ; } else if ( mAllocatedCustomMacs.contains ( mac ) ) { retVal = false ; } else { mAllocatedCustomMacs.add ( mac ) ; } } } return retVal ; }

Target:
public void freeMac ( java.lang.String mac ) { org.ovirt.engine.core.bll.MacPoolManager.log.infoFormat ( "MacPoolManager::freeMac(mac = '{0}') - entered" , mac ) ; mLocObj.writeLock ( ) . lock ( ) ; try { if ( ! ( mInitialized ) ) { throw new org.ovirt.engine.core.common.errors.VdcBLLException ( org.ovirt.engine.core.common.errors.VdcBllErrors.MAC_POOL_NOT_INITIALIZED ) ; } internalFreeMac ( mac ) ; } finally { mLocObj.writeLock ( ) . unlock ( ) ; } }
Source:
private void setUpVolumeCreationExpectations ( boolean force ) { setUpCreationExpectations ( VdcActionType.CreateGlusterVolume , org.ovirt.engine.core.common.action.gluster.CreateGlusterVolumeParameters.class , new java.lang.String [ ] { "Volume.Name" , "Volume.VolumeType" , "Force" } , new java.lang.Object [ ] { "testVol1" , org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeType.DISTRIBUTE , force } , true , true , org.ovirt.engine.api.restapi.resource.gluster.BackendGlusterVolumesResourceTest.volumeId , VdcQueryType.GetGlusterVolumeById , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.gluster.BackendGlusterVolumesResourceTest.volumeId } , getEntity ( 1 ) ) ; }

Target:
private void setUpVolumeCreationExpectations ( boolean force ) { setUpCreationExpectations ( ActionType.CreateGlusterVolume , org.ovirt.engine.core.common.action.gluster.CreateGlusterVolumeParameters.class , new java.lang.String [ ] { "Volume.Name" , "Volume.VolumeType" , "Force" } , new java.lang.Object [ ] { "testVol1" , org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeType.DISTRIBUTE , force } , true , true , org.ovirt.engine.api.restapi.resource.gluster.BackendGlusterVolumesResourceTest.volumeId , VdcQueryType.GetGlusterVolumeById , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.gluster.BackendGlusterVolumesResourceTest.volumeId } , getEntity ( 1 ) ) ; }
Source:
public void onMouseOver ( com.google.gwt.event.dom.client.MouseOverEvent event ) { if ( ! ( isSelected ( ) ) ) { getView ( ) . setMouseOverStyle ( ) ; } if ( canShowConsole ( ) ) { getView ( ) . showDoubleClickBanner ( ) ; } }

Target:
public void onMouseOver ( com.google.gwt.event.dom.client.MouseOverEvent event ) { if ( ! ( isSelected ( ) ) ) { getView ( ) . setMouseOverStyle ( ) ; } if ( ( ! ( model.isPool ( ) ) ) && ( model.getVmConsoles ( ) . canConnectToConsole ( ) ) ) { getView ( ) . showDoubleClickBanner ( ) ; } }
Source:
public static void GetStorageConnectionById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String id , boolean isRefresh ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( org.ovirt.engine.core.common.businessentities.storage_server_connections ) ( source ) ) : null ; } } ; org.ovirt.engine.core.common.queries.StorageServerConnectionQueryParametersBase params = new org.ovirt.engine.core.common.queries.StorageServerConnectionQueryParametersBase ( id ) ; params.setRefresh ( isRefresh ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetStorageServerConnectionById , params , aQuery ) ; }

Target:
public static void GetDataCenterMaxNameLength ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Integer ) ( source ) ) . intValue ( ) : 1 ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.StoragePoolNameSizeLimit , org.ovirt.engine.core.common.config.Config.DefaultConfigurationVersion ) , aQuery ) ; }
Source:
public void loadVmsFromVmware ( ) { clearProblem ( ) ; if ( ! ( validateVmwareConfiguration ( ) ) ) { return ; } loadVMsFromExternalProvider ( OriginType.VMWARE , getUrl ( ) , getUsername ( ) . getEntity ( ) , getPassword ( ) . getEntity ( ) ) ; }

Target:
public void loadVmsFromVmware ( ) { clearProblem ( ) ; if ( ! ( validateVmwareConfiguration ( ) ) ) { return ; } org.ovirt.engine.core.compat.Guid proxyId = ( ( getProxyHosts ( ) . getSelectedItem ( ) ) != null ) ? getProxyHosts ( ) . getSelectedItem ( ) . getId ( ) : null ; loadVMsFromExternalProvider ( OriginType.VMWARE , getUrl ( ) , getUsername ( ) . getEntity ( ) , getPassword ( ) . getEntity ( ) , proxyId ) ; }
Source:
private void addLinks ( javax.ws.rs.core.UriInfo uriInfo ) { action.setHref ( javax.ws.rs.core.UriBuilder.fromPath ( getPath ( uriInfo ) ) . path ( action.getId ( ) ) . build ( ) . toString ( ) ) ; java.lang.String parentHref = org.ovirt.engine.api.common.util.LinkHelper.addLinks ( uriInfo , parent ) . getHref ( ) ; if ( parentHref != null ) { addLink ( "parent" , parentHref ) ; } addLink ( "replay" , getPath ( uriInfo ) ) ; }

Target:
private void addLinks ( javax.ws.rs.core.UriInfo uriInfo ) { action.setHref ( javax.ws.rs.core.UriBuilder.fromPath ( getPath ( uriInfo ) ) . path ( action.getId ( ) ) . build ( ) . toString ( ) ) ; java.lang.String parentHref = org.ovirt.engine.api.utils.LinkHelper.addLinks ( uriInfo , parent ) . getHref ( ) ; if ( parentHref != null ) { addLink ( "parent" , parentHref ) ; } addLink ( "replay" , getPath ( uriInfo ) ) ; }
Source:
public static void GetExternalProviderHostList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid providerId , boolean filterOutExistingHosts , java.lang.String searchFilter ) { 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.VDS > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetHostListFromExternalProvider , new org.ovirt.engine.core.common.queries.GetHostListFromExternalProviderParameters ( providerId , filterOutExistingHosts , searchFilter ) , aQuery ) ; }

Target:
public static void GetProviderCertificateChain ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.common.businessentities.Provider provider ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetProviderCertificateChain , new org.ovirt.engine.core.common.queries.ProviderQueryParameters ( provider ) , aQuery ) ; }
Source:
private void updateShareable ( org.ovirt.engine.core.common.businessentities.VolumeType volumeType , org.ovirt.engine.core.common.businessentities.StorageType storageType ) { if ( ( storageType.isBlockDomain ( ) ) && ( volumeType == ( org.ovirt.engine.core.common.businessentities.VolumeType.Sparse ) ) ) { getIsShareable ( ) . setChangeProhibitionReason ( org.ovirt.engine.ui.uicommonweb.models.vms.AbstractDiskModel.CONSTANTS.shareableDiskNotSupportedByConfiguration ( ) ) ; getIsShareable ( ) . setIsChangable ( false ) ; getIsShareable ( ) . setEntity ( false ) ; } else { getIsShareable ( ) . setIsChangable ( true ) ; } }

Target:
private void updateDirectLunDiskEnabled ( org.ovirt.engine.core.common.businessentities.StoragePool datacenter ) { boolean isInternal = ( ( java.lang.Boolean ) ( getIsInternal ( ) . getEntity ( ) ) ) ; if ( isInternal ) { return ; } boolean isDirectLUNDiskkEnabled = ( ( java.lang.Boolean ) ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigValuePreConverted ( ConfigurationValues.DirectLUNDiskEnabled , datacenter.getcompatibility_version ( ) . getValue ( ) ) ) ) ; getIsDirectLunDiskAvaialable ( ) . setEntity ( isDirectLUNDiskkEnabled ) ; setMessage ( ( ! isDirectLUNDiskkEnabled ? org.ovirt.engine.ui.uicommonweb.models.vms.AbstractDiskModel.CONSTANTS.directLUNDiskNotSupported ( ) : "" ) ) ; }
Source:
public void testRemoveNonExistant ( ) throws java.lang.Exception { setUpGetEntityExpectations ( QueryType.GetVmByVmId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , null ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; try { resource.remove ( ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { assertNotNull ( wae.getResponse ( ) ) ; assertEquals ( 404 , wae.getResponse ( ) . getStatus ( ) ) ; } }

Target:
public void testRemoveNonExistant ( ) throws java.lang.Exception { setUpGetEntityExpectations ( QueryType.GetVmByVmId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , null ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; try { resource.remove ( ) ; org.junit.Assert.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { org.junit.Assert.assertNotNull ( wae.getResponse ( ) ) ; org.junit.Assert.assertEquals ( 404 , wae.getResponse ( ) . getStatus ( ) ) ; } }
Source:
public org.ovirt.engine.core.common.businessentities.VDSGroup getByName ( java.lang.String name , org.ovirt.engine.core.compat.Guid userID , boolean isFiltered ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) . addValue ( "vds_group_name" , name ) . addValue ( "user_id" , userID ) . addValue ( "is_filtered" , isFiltered ) ; return ( ( org.ovirt.engine.core.common.businessentities.VDSGroup ) ( org.ovirt.engine.core.dal.dbbroker.DbFacadeUtils.asSingleResult ( getCallsHandler ( ) . executeReadList ( "GetVdsGroupForUserByVdsGroupName" , org.ovirt.engine.core.dao.VdsGroupDaoImpl.VdsGroupRowMapper.instance , parameterSource ) ) ) ) ; }

Target:
public org.ovirt.engine.core.common.businessentities.Cluster getByName ( java.lang.String name , org.ovirt.engine.core.compat.Guid userID , boolean isFiltered ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) . addValue ( "cluster_name" , name ) . addValue ( "user_id" , userID ) . addValue ( "is_filtered" , isFiltered ) ; return ( ( org.ovirt.engine.core.common.businessentities.Cluster ) ( org.ovirt.engine.core.dal.dbbroker.DbFacadeUtils.asSingleResult ( getCallsHandler ( ) . executeReadList ( "GetClusterForUserByClusterName" , org.ovirt.engine.core.dao.ClusterDaoImpl.ClusterRowMapper.instance , parameterSource ) ) ) ) ; }
Source:
protected void callbackAddMessage ( java.lang.String message ) { if ( haveCallback ( ) ) { callback.addMessage ( message ) ; } }

Target:
public void close ( ) { if ( ( bbuffer.position ( ) ) != 0 ) { java.lang.String message ; try { message = new java.lang.String ( buffer , 0 , bbuffer.position ( ) , "UTF-8" ) ; } catch ( java.io.UnsupportedEncodingException e ) { org.ovirt.engine.core.utils.hostinstall.VdsInstallerSSH.log.error ( "Cannot decode message" , e ) ; message = "[unable to decode message]" ; } bbuffer.clear ( ) ; org.ovirt.engine.core.utils.hostinstall.VdsInstallerSSH.log.debug ( message ) ; _callbackAddMessage ( message ) ; } }