auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public com.google.gwt.resources.client.ImageResource getValue ( org.ovirt.engine.core.common.businessentities.VM vm ) { if ( ( vm.getVmPoolId ( ) ) == null ) { org.ovirt.engine.ui.webadmin.widget.table.column.VmTypeConfig config = org.ovirt.engine.ui.webadmin.widget.table.column.VmTypeConfig.from ( vm.getVmType ( ) , vm.isStateless ( ) ) ; setTitle ( config.getTooltip ( org.ovirt.engine.ui.webadmin.widget.table.column.VmTypeColumn.constants ) ) ; return config.getImageResource ( getApplicationResources ( ) ) ; } else { return getApplicationResources ( ) . manyDesktopsImage ( ) ; } }

Target:
public com.google.gwt.resources.client.ImageResource getValue ( org.ovirt.engine.core.common.businessentities.VM vm ) { if ( ( vm.getVmPoolId ( ) ) == null ) { org.ovirt.engine.ui.webadmin.widget.table.column.VmTypeConfig config = org.ovirt.engine.ui.webadmin.widget.table.column.VmTypeConfig.from ( vm.getVmType ( ) , vm.isStateless ( ) , vm.isNextRunConfigurationExists ( ) ) ; setTitle ( config.getTooltip ( org.ovirt.engine.ui.webadmin.widget.table.column.VmTypeColumn.constants ) ) ; return config.getImageResource ( getApplicationResources ( ) ) ; } else { return getApplicationResources ( ) . manyDesktopsImage ( ) ; } }
Source:
public void testIncompleteExport ( ) { setUriInfo ( setUpBasicUriExpectations ( ) ) ; try { resource.export ( new org.ovirt.engine.api.model.Action ( ) ) ; org.junit.jupiter.api.Assertions.fail ( "expected WebApplicationException on incomplete parameters" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyIncompleteException ( wae , "Action" , "export" , "storageDomain.id|name" ) ; } }

Target:
public void testIncompleteExport ( ) { setUriInfo ( setUpBasicUriExpectations ( ) ) ; verifyIncompleteException ( org.junit.jupiter.api.Assertions.assertThrows ( javax.ws.rs.WebApplicationException.class , ( ) -> org.ovirt.engine.api.restapi.resource.resource.export ( new org.ovirt.engine.api.model.Action ( ) ) ) , "Action" , "export" , "storageDomain.id|name" ) ; }
Source:
private void queryLabels ( ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getNetworkLabelsByDataCenterId ( getEntity ( ) . getStoragePoolId ( ) , new org.ovirt.engine.ui.frontend.AsyncQuery ( new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { dcLabels = ( ( java.util.SortedSet < java.lang.String > ) ( returnValue ) ) ; initLabelModels ( ) ; queryNetworks ( ) ; } } ) ) ; }

Target:
private void queryLabels ( ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getNetworkLabelsByDataCenterId ( getEntity ( ) . getStoragePoolId ( ) , new org.ovirt.engine.ui.uicommonweb.models.hosts.AsyncQuery ( new org.ovirt.engine.ui.frontend.AsyncCallback < java.util.SortedSet < java.lang.String > > ( ) { @ java.lang.Override public void onSuccess ( java.util.SortedSet < java.lang.String > returnValue ) { dcLabels = returnValue ; initLabelModels ( ) ; queryNetworks ( ) ; } } ) ) ; }
Source:
public java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > getAllInterfacesForVds ( org.ovirt.engine.core.compat.Guid id , org.ovirt.engine.core.compat.Guid userID , boolean isFiltered ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) . addValue ( "vds_id" , id ) . addValue ( "user_id" , userID ) . addValue ( "is_filtered" , isFiltered ) ; return getCallsHandler ( ) . executeReadList ( "Getinterface_viewByvds_id" , org.ovirt.engine.core.dao.network.InterfaceDaoDbFacadeImpl.vdsNetworkInterfaceRowMapper , parameterSource ) ; }

Target:
public java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > getAllInterfacesForVds ( org.ovirt.engine.core.compat.Guid id , org.ovirt.engine.core.compat.Guid userID , boolean isFiltered ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) . addValue ( "vds_id" , id ) . addValue ( "user_id" , userID ) . addValue ( "is_filtered" , isFiltered ) ; return getCallsHandler ( ) . executeReadList ( "Getinterface_viewByvds_id" , vdsNetworkInterfaceRowMapper , parameterSource ) ; }
Source:
private void initCommandExecutor ( ) { if ( ! ( cmdExecutorInitialized ) ) { synchronized ( LOCK ) { if ( ! ( cmdExecutorInitialized ) ) { org.ovirt.engine.core.bll.CommandBase < ? > cmd ; for ( org.ovirt.engine.core.common.businessentities.CommandEntity cmdEntity : coco.getCommandsWithCallBackEnabled ( ) ) { if ( ! ( cmdEntity.isCallBackNotified ( ) ) ) { cmd = coco.retrieveCommand ( cmdEntity.getId ( ) ) ; cmdCallBackMap.put ( cmdEntity.getId ( ) , cmd.getCallBack ( ) ) ; } } cmdExecutorInitialized = true ; } } } }

Target:
private void initCommandExecutor ( ) { if ( ! ( cmdExecutorInitialized ) ) { synchronized ( LOCK ) { if ( ! ( cmdExecutorInitialized ) ) { for ( org.ovirt.engine.core.common.businessentities.CommandEntity cmdEntity : coco.getCommandsWithCallBackEnabled ( ) ) { if ( ! ( cmdEntity.isCallBackNotified ( ) ) ) { addToCallBackMap ( cmdEntity ) ; } } cmdExecutorInitialized = true ; } } } }
Source:
public void testFindMappingEntryNotFound ( ) { org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface vnic = new org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface ( ) ; vnic.setNetworkName ( ( "not" + ( org.ovirt.engine.core.bll.exportimport.MatchUserMappingToOvfVnicTest.NETWORK_NAME ) ) ) ; vnic.setVnicProfileName ( org.ovirt.engine.core.bll.exportimport.MatchUserMappingToOvfVnicTest.VNIC_PROFILE2_NAME ) ; org.ovirt.engine.core.bll.exportimport.vnics.MapVnicsContext ctx = new org.ovirt.engine.core.bll.exportimport.vnics.MapVnicsContext ( ) ; ctx.setUserMappings ( externalVnicProfileMappings ) ; ctx.setOvfVnics ( java.util.Collections.singletonList ( vnic ) ) ; underTest.handle ( ctx ) ; org.junit.Assert.assertEquals ( null , ctx.getMatched ( ) . get ( vnic ) ) ; }

Target:
public void testFindMappingEntryNotFound ( ) { org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface vnic = new org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface ( ) ; vnic.setNetworkName ( ( "not" + ( org.ovirt.engine.core.bll.exportimport.MatchUserMappingToOvfVnicTest.NETWORK_NAME ) ) ) ; vnic.setVnicProfileName ( org.ovirt.engine.core.bll.exportimport.MatchUserMappingToOvfVnicTest.VNIC_PROFILE2_NAME ) ; org.ovirt.engine.core.bll.exportimport.vnics.MapVnicsContext ctx = new org.ovirt.engine.core.bll.exportimport.vnics.MapVnicsContext ( ) ; ctx.setUserMappings ( externalVnicProfileMappings ) ; ctx.setOvfVnics ( java.util.Collections.singletonList ( vnic ) ) ; underTest.handle ( ctx ) ; org.junit.Assert.assertNull ( ctx.getMatched ( ) . get ( vnic ) ) ; }
Source:
public void validateEnoughSpace ( ) throws java.lang.Exception { initializeCommand ( new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ) ; initSnapshotValidator ( ) ; initVmForSpace ( ) ; initVmDiskImage ( false ) ; initSrcStorageDomain ( ) ; initDestStorageDomain ( StorageType.NFS ) ; org.mockito.Mockito.doReturn ( org.ovirt.engine.core.bll.storage.disk.MoveOrCopyDiskCommandTest.mockStorageDomainValidatorWithSpace ( ) ) . when ( command ) . createStorageDomainValidator ( ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateSuccess ( command ) ; }

Target:
public void validateEnoughSpace ( ) throws java.lang.Exception { initializeCommand ( new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ) ; initVmForSpace ( ) ; initVmDiskImage ( false ) ; initSrcStorageDomain ( ) ; initDestStorageDomain ( StorageType.NFS ) ; org.mockito.Mockito.doReturn ( org.ovirt.engine.core.bll.storage.disk.MoveOrCopyDiskCommandTest.mockStorageDomainValidator ( ) ) . when ( command ) . createStorageDomainValidator ( ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateSuccess ( command ) ; }
Source:
public void getStorageDomainById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storageDomainId ) { 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.StorageDomain ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageDomainById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( storageDomainId ) , aQuery ) ; }

Target:
public void getGlusterHook ( org.ovirt.engine.ui.frontend.AsyncQuery < org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity > aQuery , org.ovirt.engine.core.compat.Guid hookId , boolean includeServerHooks ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.CastingConverter < > ( ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterHookById , new org.ovirt.engine.core.common.queries.gluster.GlusterHookQueryParameters ( hookId , includeServerHooks ) , aQuery ) ; }
Source:
private void removeSessionImpl ( java.lang.String sessionId , int reason , java.lang.String message , java.lang.Object ... msgArgs ) { if ( ssoSessionUtils.isSessionInUse ( sessionId ) ) { org.ovirt.engine.core.common.businessentities.aaa.DbUser dbUser = getUser ( sessionId , false ) ; log.info ( "Not removing session '{}', session has running commands{}" , sessionId , ( dbUser == null ? "." : java.lang.String.format ( " for user '%s@%s'." , dbUser.getLoginName ( ) , dbUser.getDomain ( ) ) ) ) ; return ; } java.lang.String authzName = null ; if ( ( getProfile ( sessionId ) ) != null ) { authzName = getProfile ( sessionId ) . getAuthz ( ) . getContext ( ) . < java.lang.String > get ( Base.ContextKeys.INSTANCE_NAME ) ; } org.ovirt.engine.core.aaa.AcctUtils.reportRecords ( reason , authzName , getPrincipalName ( sessionId ) , message , msgArgs ) ; engineSessionDao.remove ( getEngineSessionSeqId ( sessionId ) ) ; sessionInfoMap.remove ( sessionId ) ; }

Target:
private void removeSessionImpl ( java.lang.String sessionId , int reason , java.lang.String message , java.lang.Object ... msgArgs ) { if ( ssoSessionUtils.isSessionInUse ( getEngineSessionSeqId ( sessionId ) ) ) { org.ovirt.engine.core.common.businessentities.aaa.DbUser dbUser = getUser ( sessionId , false ) ; log.info ( "Not removing session '{}', session has running commands{}" , sessionId , ( dbUser == null ? "." : java.lang.String.format ( " for user '%s@%s'." , dbUser.getLoginName ( ) , dbUser.getDomain ( ) ) ) ) ; return ; } java.lang.String authzName = null ; if ( ( getProfile ( sessionId ) ) != null ) { authzName = getProfile ( sessionId ) . getAuthzName ( ) ; } org.ovirt.engine.core.aaa.AcctUtils.reportRecords ( reason , authzName , getPrincipalName ( sessionId ) , message , msgArgs ) ; engineSessionDao.remove ( getEngineSessionSeqId ( sessionId ) ) ; sessionInfoMap.remove ( sessionId ) ; }
Source:
public void canDoActionDiskIsLocked ( ) throws java.lang.Exception { initializeCommand ( ImageOperation.Move ) ; initVmDiskImage ( false ) ; mockGetVmsListForDisk ( ) ; command.getImage ( ) . setImageStatus ( ImageStatus.LOCKED ) ; 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_DISKS_LOCKED.toString ( ) ) ) ; }

Target:
public void canDoActionDiskIsLocked ( ) throws java.lang.Exception { initializeCommand ( ImageOperation.Move ) ; initVmDiskImage ( false ) ; mockGetVmsListForDisk ( ) ; command.getImage ( ) . setImageStatus ( ImageStatus.LOCKED ) ; org.mockito.Mockito.doReturn ( vmDeviceDao ) . when ( command ) . getVmDeviceDao ( ) ; org.junit.Assert.assertFalse ( command.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( command.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( EngineMessage.ACTION_TYPE_FAILED_DISKS_LOCKED.toString ( ) ) ) ; }
Source:
protected void readOsSection ( org.ovirt.engine.core.compat.backendcompat.XmlNode section ) { _vm.getStaticData ( ) . setId ( new org.ovirt.engine.core.compat.Guid ( section.Attributes.get ( "ovf:id" ) . getValue ( ) ) ) ; org.ovirt.engine.core.compat.backendcompat.XmlNode node = section.SelectSingleNode ( "Description" ) ; if ( node != null ) { _vm.getStaticData ( ) . setOsId ( osRepository.getOsIdByUniqueName ( node.InnerText ) ) ; } }

Target:
protected void readOsSection ( org.ovirt.engine.core.compat.backendcompat.XmlNode section ) { _vm.getStaticData ( ) . setId ( new org.ovirt.engine.core.compat.Guid ( section.Attributes.get ( "ovf:id" ) . getValue ( ) ) ) ; org.ovirt.engine.core.compat.backendcompat.XmlNode node = section.SelectSingleNode ( "Description" ) ; if ( node != null ) { if ( node.InnerText.equals ( java.lang.String.valueOf ( OsRepository.OLD_OTHER_ID ) ) ) { node.InnerText = java.lang.String.valueOf ( OsRepository.DEFAULT_OS ) ; } _vm.getStaticData ( ) . setOsId ( osRepository.getOsIdByUniqueName ( node.InnerText ) ) ; } }
Source:
public static void getNetworkList ( 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 ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.Network > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.Network > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllNetworks , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) , aQuery ) ; }

Target:
public static void getStorageDomainsByConnection ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , java.lang.String connectionPath ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ) ( source ) ) : null ; } } ; org.ovirt.engine.core.common.queries.GetStorageDomainsByConnectionParameters param = new org.ovirt.engine.core.common.queries.GetStorageDomainsByConnectionParameters ( ) ; param.setConnection ( connectionPath ) ; if ( storagePoolId != null ) { param.setStoragePoolId ( storagePoolId ) ; } org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageDomainsByConnection , param , aQuery ) ; }
Source:
public void failsIfImported ( ) throws java.lang.Exception { org.mockito.Mockito.when ( hostedEngineHelper.getStorageDomain ( ) ) . thenReturn ( new org.ovirt.engine.core.common.businessentities.StorageDomainStatic ( ) ) ; cmd.canDoAction ( ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.assertCanDoActionMessages ( "" , cmd , EngineMessage.ACTION_TYPE_FAILED_STORAGE_DOMAIN_ALREADY_EXIST ) ; org.mockito.Mockito.verify ( backend , org.mockito.Mockito.times ( 0 ) ) . runInternalQuery ( org.mockito.Matchers.eq ( VdcQueryType.GetExistingStorageDomainList ) , org.mockito.Matchers.any ( org.ovirt.engine.core.common.queries.VdcQueryParametersBase.class ) ) ; org.mockito.Mockito.verify ( cmd , org.mockito.Mockito.times ( 0 ) ) . executeCommand ( ) ; }

Target:
public void failsIfImported ( ) throws java.lang.Exception { org.mockito.Mockito.when ( hostedEngineHelper.getStorageDomain ( ) ) . thenReturn ( new org.ovirt.engine.core.common.businessentities.StorageDomainStatic ( ) ) ; mockGetExistingDomain ( true ) ; cmd.init ( ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( "" , cmd , EngineMessage.ACTION_TYPE_FAILED_STORAGE_DOMAIN_ALREADY_EXIST ) ; org.mockito.Mockito.verify ( cmd , org.mockito.Mockito.times ( 0 ) ) . executeCommand ( ) ; }
Source:
private boolean isConsoleCommandsExecutionAllowed ( ) { final java.util.List < org.ovirt.engine.core.common.businessentities.VM > list = getSelectedItems ( ) ; if ( list == null ) { return false ; } for ( org.ovirt.engine.core.common.businessentities.VM vm : list ) { if ( consoleModelsCache.getVmConsolesForVm ( vm ) . canConnectToConsole ( ) ) { return true ; } } return false ; }

Target:
private boolean isConsoleCommandsExecutionAllowed ( ) { final java.util.List < org.ovirt.engine.core.common.businessentities.VM > list = ( ( getSelectedItem ( ) ) == null ) ? null : getSelectedItems ( ) ; if ( list == null ) { return false ; } for ( org.ovirt.engine.core.common.businessentities.VM vm : list ) { if ( consoleModelsCache.getVmConsolesForEntity ( vm ) . canConnectToConsole ( ) ) { return true ; } } return false ; }
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.maxSpmPriority = ( ( java.lang.Integer ) ( returnValue ) ) ; initSpmPriorities1 ( ) ; }

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:
protected void onSelectedItemChanged ( ) { super . onSelectedItemChanged ( ) ; UpdateActionAvailability ( ) ; if ( ( getSelectedItem ( ) ) != null ) { org.ovirt.engine.core.common.businessentities.Snapshot snapshot = ( ( org.ovirt.engine.core.common.businessentities.Snapshot ) ( getSelectedItem ( ) ) ) ; UpdateVmConfigurationBySnapshot ( snapshot.getId ( ) ) ; } }

Target:
protected void onSelectedItemChanged ( ) { super . onSelectedItemChanged ( ) ; updateActionAvailability ( ) ; if ( ( getSelectedItem ( ) ) != null ) { org.ovirt.engine.core.common.businessentities.Snapshot snapshot = ( ( org.ovirt.engine.core.common.businessentities.Snapshot ) ( getSelectedItem ( ) ) ) ; updateVmConfigurationBySnapshot ( snapshot.getId ( ) ) ; } }
Source:
public org.ovirt.engine.core.bll.ValidationResult validateNotHostedEngineDisk ( ) { boolean isHostedEngineDisk = ( ( disk.getDiskStorageType ( ) ) == ( org.ovirt.engine.core.common.businessentities.storage.DiskStorageType.LUN ) ) && ( StorageConstants.HOSTED_ENGINE_LUN_DISK_ALIAS.equals ( disk.getDiskAlias ( ) ) ) ; return isHostedEngineDisk ? new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_HOSTED_ENGINE_DISK ) : org.ovirt.engine.core.bll.ValidationResult.VALID ; }

Target:
private boolean isHostedEngineDirectLunDisk ( ) { return ( ( disk.getDiskStorageType ( ) ) == ( org.ovirt.engine.core.common.businessentities.storage.DiskStorageType.LUN ) ) && ( StorageConstants.HOSTED_ENGINE_LUN_DISK_ALIAS.equals ( disk.getDiskAlias ( ) ) ) ; }
Source:
protected org.ovirt.engine.api.model.Host postPopulate ( org.ovirt.engine.api.model.Host from ) { while ( ( from.getPort ( ) ) == 0 ) { from.setPort ( org.ovirt.engine.api.restapi.types.MappingTestHelper.rand ( 65535 ) ) ; } from.getSpm ( ) . setPriority ( 3 ) ; return from ; }

Target:
protected org.ovirt.engine.api.model.Host postPopulate ( org.ovirt.engine.api.model.Host from ) { while ( ( from.getPort ( ) ) == 0 ) { from.setPort ( org.ovirt.engine.api.restapi.types.MappingTestHelper.rand ( 65535 ) ) ; } from.setProtocol ( org.ovirt.engine.api.restapi.types.MappingTestHelper.shuffle ( org.ovirt.engine.api.model.HostProtocol.class ) . value ( ) ) ; from.getSpm ( ) . setPriority ( 3 ) ; return from ; }
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.Backend.getInstance ( ) . runInternalAction ( VdcActionType.ProcessDownVm , new org.ovirt.engine.core.common.action.IdParameters ( org.ovirt.engine.core.bll.RunVmCommand.getVm ( ) . getId ( ) ) , org.ovirt.engine.core.bll.job.ExecutionHandler.createDefaultContexForTasks ( 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:
public void getPermissionsByAdElementId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid userId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Permission > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Permission > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetPermissionsByAdElementId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( userId ) , aQuery ) ; }

Target:
public void getRoleActionGroupsByRoleId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid roleId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ActionGroup > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ActionGroup > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetRoleActionGroupsByRoleId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( roleId ) , aQuery ) ; }
Source:
public void getUserMessageOfTheDayViaPublic ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.String ) ( source ) ) : "" ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runPublicQuery ( VdcQueryType.GetConfigurationValue , new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.UserMessageOfTheDay , getDefaultConfigurationVersion ( ) ) , 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 flush ( org.ovirt.engine.core.common.businessentities.network.HostNetworkQos qos ) { qos.setOutAverageLinkshare ( getOutAverageLinkshare ( ) . getEntity ( ) ) ; qos.setOutAverageUpperlimit ( getOutAverageUpperlimit ( ) . getEntity ( ) ) ; qos.setOutAverageRealtime ( getOutAverageRealtime ( ) . getEntity ( ) ) ; }

Target:
public void flush ( org.ovirt.engine.core.common.businessentities.network.HostNetworkQos qos ) { qos.setOutAverageLinkshare ( org.ovirt.engine.ui.uicompat.external.StringUtils.parseInteger ( getOutAverageLinkshare ( ) . getEntity ( ) ) ) ; qos.setOutAverageUpperlimit ( org.ovirt.engine.ui.uicompat.external.StringUtils.parseInteger ( getOutAverageUpperlimit ( ) . getEntity ( ) ) ) ; qos.setOutAverageRealtime ( org.ovirt.engine.ui.uicompat.external.StringUtils.parseInteger ( getOutAverageRealtime ( ) . getEntity ( ) ) ) ; }
Source:
private void doTestValidateModifiedBondSlaves ( org.ovirt.engine.core.common.businessentities.network.Bond bond , java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > existingInterfaces , org.ovirt.engine.core.bll.ValidationResult interfaceExistValidationResult , org.ovirt.engine.core.bll.ValidationResult interfaceIsValidSlaveValidationResult , boolean expectedValidationResult , org.ovirt.engine.core.common.errors.VdcBllMessages expectedViolation ) { doTestValidateModifiedBondSlaves ( bond , new org.ovirt.engine.core.common.action.HostSetupNetworksParameters ( host.getId ( ) ) , existingInterfaces , interfaceExistValidationResult , interfaceIsValidSlaveValidationResult , expectedValidationResult , expectedViolation ) ; }

Target:
public org.ovirt.engine.core.common.businessentities.network.Bond createBond ( java.lang.String bondName ) { org.ovirt.engine.core.common.businessentities.network.Bond bond = new org.ovirt.engine.core.common.businessentities.network.Bond ( ) ; bond.setName ( bondName ) ; bond.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; return bond ; }
Source:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; vmID = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; snapshotId = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; pluggedDisk = createDiskImage ( true ) ; unpluggedDisk = createDiskImage ( true ) ; pluggedDiskSnapshot = createDiskImage ( false ) ; pluggedDiskSnapshot.setVmSnapshotId ( snapshotId ) ; pluggedDiskSnapshot.setActive ( false ) ; unpluggedDiskSnapshot = createDiskImage ( false ) ; unpluggedDiskSnapshot.setVmSnapshotId ( snapshotId ) ; unpluggedDiskSnapshot.setActive ( false ) ; setUpDAOMocks ( ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; vmID = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; snapshotId = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; pluggedDisk = createDiskImage ( true ) ; unpluggedDisk = createDiskImage ( true ) ; pluggedDiskSnapshot = createDiskImage ( false ) ; pluggedDiskSnapshot.setVmSnapshotId ( snapshotId ) ; pluggedDiskSnapshot.setActive ( false ) ; unpluggedDiskSnapshot = createDiskImage ( false ) ; unpluggedDiskSnapshot.setVmSnapshotId ( snapshotId ) ; unpluggedDiskSnapshot.setActive ( false ) ; setUpDaoMocks ( ) ; }
Source:
public static void getTemplateById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid templateId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVmTemplate , new org.ovirt.engine.core.common.queries.GetVmTemplateParameters ( templateId ) , aQuery ) ; }

Target:
public static void getDataCenterById ( 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 ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStoragePoolById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) , aQuery ) ; }
Source:
public static void getStorageDomainList ( 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 ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageDomainsByStoragePoolId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) , aQuery ) ; }

Target:
public static void getHostById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVdsByVdsId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }
Source:
public void testAllByConnectionId ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > domains = dao.getAllByConnectionId ( new org.ovirt.engine.core.compat.Guid ( "0cc146e8-e5ed-482c-8814-270bc48c297f" ) ) ; org.junit.Assert.assertEquals ( "Unexpected number of storage domains by connection id" , domains.size ( ) , 1 ) ; org.junit.Assert.assertEquals ( "Wrong storage domain id for search by connection id" , domains.get ( 0 ) . getId ( ) , new org.ovirt.engine.core.compat.Guid ( "c2211b56-8869-41cd-84e1-78d7cb96f31d" ) ) ; }

Target:
public void testAllByConnectionId ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > domains = dao.getAllByConnectionId ( new org.ovirt.engine.core.compat.Guid ( "0cc146e8-e5ed-482c-8814-270bc48c297f" ) ) ; org.junit.Assert.assertEquals ( "Unexpected number of storage domains by connection id" , 1 , domains.size ( ) ) ; org.junit.Assert.assertEquals ( "Wrong storage domain id for search by connection id" , FixturesTool.STORAGE_DOAMIN_NFS_MASTER , domains.get ( 0 ) . getId ( ) ) ; }
Source:
public void getNextAvailableDiskAliasNameByVMId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid vmId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetNextAvailableDiskAliasNameByVMId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) , aQuery ) ; }

Target:
public void getAllTemplatesFromExportDomain ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.compat.Guid storageDomainId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? source : new java.util.HashMap < org.ovirt.engine.core.common.businessentities.VmTemplate , java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.DiskImage > > ( ) ; } } ; org.ovirt.engine.core.common.queries.GetAllFromExportDomainQueryParameters getAllFromExportDomainQueryParamenters = new org.ovirt.engine.core.common.queries.GetAllFromExportDomainQueryParameters ( storagePoolId , storageDomainId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetTemplatesFromExportDomain , getAllFromExportDomainQueryParamenters , aQuery ) ; }
Source:
public javax.ws.rs.core.Response add ( org.ovirt.engine.api.model.Cluster cluster ) { validateParameters ( cluster , "name" , "dataCenter.name|id" ) ; validateEnums ( org.ovirt.engine.api.model.Cluster.class , cluster ) ; org.ovirt.engine.core.common.businessentities.storage_pool pool = org.ovirt.engine.api.restapi.resource.BackendDataCenterResource.getStoragePool ( cluster , this ) ; org.ovirt.engine.core.common.businessentities.VDSGroup entity = map ( cluster , map ( pool ) ) ; return performCreation ( VdcActionType.AddVdsGroup , new org.ovirt.engine.core.common.action.VdsGroupOperationParameters ( entity ) , new org.ovirt.engine.api.restapi.resource.QueryIdResolver ( org.ovirt.engine.core.common.queries.VdcQueryType.GetVdsGroupById , org.ovirt.engine.core.common.queries.GetVdsGroupByIdParameters.class ) ) ; }

Target:
public javax.ws.rs.core.Response add ( org.ovirt.engine.api.model.Cluster cluster ) { validateParameters ( cluster , "name" , "dataCenter.name|id" ) ; validateEnums ( org.ovirt.engine.api.model.Cluster.class , cluster ) ; org.ovirt.engine.core.common.businessentities.storage_pool pool = org.ovirt.engine.api.restapi.resource.BackendDataCenterResource.getStoragePool ( cluster , this ) ; org.ovirt.engine.core.common.businessentities.VDSGroup entity = map ( cluster , map ( pool ) ) ; return performCreate ( VdcActionType.AddVdsGroup , new org.ovirt.engine.core.common.action.VdsGroupOperationParameters ( entity ) , new org.ovirt.engine.api.restapi.resource.QueryIdResolver < org.ovirt.engine.core.compat.Guid > ( org.ovirt.engine.core.common.queries.VdcQueryType.GetVdsGroupById , org.ovirt.engine.core.common.queries.GetVdsGroupByIdParameters.class ) ) ; }
Source:
public void getPermittedStorageDomainsByStoragePoolId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId , org.ovirt.engine.core.common.businessentities.ActionGroup actionGroup ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ( ) ; } return source ; } } ; org.ovirt.engine.core.common.queries.GetPermittedStorageDomainsByStoragePoolIdParameters params = new org.ovirt.engine.core.common.queries.GetPermittedStorageDomainsByStoragePoolIdParameters ( ) ; params.setStoragePoolId ( dataCenterId ) ; params.setActionGroup ( actionGroup ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetPermittedStorageDomainsByStoragePoolId , params , aQuery ) ; }

Target:
public void getVmConfigurationBySnapshot ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid snapshotSourceId ) { 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.VM ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmConfigurationBySnapshot , new org.ovirt.engine.core.common.queries.IdQueryParameters ( snapshotSourceId ) . withoutRefresh ( ) , aQuery ) ; }
Source:
protected void executeCommand ( ) { if ( ( org.ovirt.engine.core.bll.AddEventSubscriptionCommand.getParameters ( ) . getEventSubscriber ( ) . gettag_name ( ) ) == null ) { org.ovirt.engine.core.bll.AddEventSubscriptionCommand.getParameters ( ) . getEventSubscriber ( ) . settag_name ( "" ) ; } org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getEventDAO ( ) . subscribe ( org.ovirt.engine.core.bll.AddEventSubscriptionCommand.getParameters ( ) . getEventSubscriber ( ) ) ; org.ovirt.engine.core.bll.AddEventSubscriptionCommand.setSucceeded ( true ) ; }

Target:
protected void executeCommand ( ) { if ( ( org.ovirt.engine.core.bll.AddEventSubscriptionCommand.getParameters ( ) . getEventSubscriber ( ) . gettag_name ( ) ) == null ) { org.ovirt.engine.core.bll.AddEventSubscriptionCommand.getParameters ( ) . getEventSubscriber ( ) . settag_name ( "" ) ; } org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getEventDao ( ) . subscribe ( org.ovirt.engine.core.bll.AddEventSubscriptionCommand.getParameters ( ) . getEventSubscriber ( ) ) ; org.ovirt.engine.core.bll.AddEventSubscriptionCommand.setSucceeded ( true ) ; }
Source:
public void testValidRemovedBondsWhenNotRemovingAnyBond ( ) throws java.lang.Exception { org.ovirt.engine.core.common.action.HostSetupNetworksParameters params = new org.ovirt.engine.core.common.action.HostSetupNetworksParameters ( host.getId ( ) ) ; params.setRemovedBonds ( java.util.Collections.< org.ovirt.engine.core.compat.Guid > emptySet ( ) ) ; org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidator validator = createHostSetupNetworksValidator ( params , null ) ; org.junit.Assert.assertThat ( validator.validRemovedBonds ( java.util.Collections.< org.ovirt.engine.core.common.businessentities.network.NetworkAttachment > emptyList ( ) ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }

Target:
public void testValidNetworkAttachmentIpConfiguration ( ) { org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidator validator = initValidator ( ) ; java.util.Collection < java.lang.String > replacements = new java.util.ArrayList < > ( ) ; org.ovirt.engine.core.common.errors.EngineMessage engineMessage = null ; initMockNetworkAttachmentIpConfigurationValidator ( engineMessage , replacements ) ; org.ovirt.engine.core.bll.ValidationResult actual = validator.validNewOrModifiedNetworkAttachments ( ) ; org.junit.Assert.assertEquals ( ValidationResult.VALID , actual ) ; }
Source:
public static java.lang.String createAndTranslate ( java.lang.Enum < ? > enumObj ) { java.lang.String title = org.ovirt.engine.ui.uicompat.EnumTranslator.constants.notAvailableLabel ( ) ; if ( enumObj != null ) { org.ovirt.engine.ui.uicompat.Translator translator = org.ovirt.engine.ui.uicompat.EnumTranslator.Create ( enumObj.getDeclaringClass ( ) ) ; title = enumObj.name ( ) ; try { title = translator.get ( enumObj ) ; } catch ( java.util.MissingResourceException e ) { org.ovirt.engine.ui.uicompat.EnumTranslator.logger.info ( ( "Missing Enum resource: " + ( e.getLocalizedMessage ( ) ) ) ) ; } } return title ; }

Target:
public static java.lang.String createAndTranslate ( java.lang.Enum < ? > enumObj ) { java.lang.String title = org.ovirt.engine.ui.uicompat.EnumTranslator.constants.notAvailableLabel ( ) ; if ( enumObj != null ) { org.ovirt.engine.ui.uicompat.Translator translator = org.ovirt.engine.ui.uicompat.EnumTranslator.create ( enumObj.getDeclaringClass ( ) ) ; title = enumObj.name ( ) ; try { title = translator.get ( enumObj ) ; } catch ( java.util.MissingResourceException e ) { org.ovirt.engine.ui.uicompat.EnumTranslator.logger.info ( ( "Missing Enum resource: " + ( e.getLocalizedMessage ( ) ) ) ) ; } } return title ; }
Source:
public static void getHostPublicKey ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.String ) ( source ) ) : "" ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetServerSSHPublicKey , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }

Target:
public void getGlusterHostsNewlyAdded ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId , boolean isFingerprintRequired ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAddedGlusterServers , new org.ovirt.engine.core.common.queries.gluster.AddedGlusterServersParameters ( clusterId , isFingerprintRequired ) , aQuery ) ; }
Source:
public void getClusterFeaturesByClusterId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.Set < org.ovirt.engine.core.common.businessentities.SupportedAdditionalClusterFeature > ) ( source ) ) : new java.util.HashSet < org.ovirt.engine.core.common.businessentities.SupportedAdditionalClusterFeature > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetClusterFeaturesByClusterId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( clusterId ) , aQuery ) ; }

Target:
public void getCinderVolumeTypesList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storageDomainId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter < java.util.List < org.ovirt.engine.core.common.businessentities.storage.CinderVolumeType > > ( ) { @ java.lang.Override public java.util.List < org.ovirt.engine.core.common.businessentities.storage.CinderVolumeType > convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return ( ( java.util.List < org.ovirt.engine.core.common.businessentities.storage.CinderVolumeType > ) ( source ) ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetCinderVolumeTypesByStorageDomainId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( storageDomainId ) , aQuery ) ; }
Source:
public com.google.gwt.event.shared.HandlerRegistration addValueChangeHandler ( final com.google.gwt.event.logical.shared.ValueChangeHandler < java.lang.Object > handler ) { return asSuggestBox ( ) . addValueChangeHandler ( new com.google.gwt.event.logical.shared.ValueChangeHandler < java.lang.String > ( ) { @ java.lang.Override public void onValueChange ( com.google.gwt.event.logical.shared.ValueChangeEvent < java.lang.String > event ) { handler.onValueChange ( new com.google.gwt.event.logical.shared.ValueChangeEvent < java.lang.Object > ( event.getValue ( ) ) { } ) ; } } ) ; }

Target:
protected java.lang.Object asEntity ( java.lang.String value ) { return value ; }
Source:
private void prepareVmToPassCanDoAction ( ) { vmStatic.setName ( "vm1" ) ; vmStatic.setMemSizeMb ( 256 ) ; vmStatic.setSingleQxlPci ( false ) ; mockVmDaoGetVm ( ) ; mockSameNameQuery ( false ) ; mockValidateCustomProperties ( ) ; mockValidatePciAndIdeLimit ( ) ; }

Target:
private void prepareVmToPassCanDoAction ( ) { vmStatic.setName ( "vm1" ) ; vmStatic.setMemSizeMb ( 256 ) ; vmStatic.setSingleQxlPci ( false ) ; mockVmDaoGetVm ( ) ; mockSameNameQuery ( false ) ; mockValidateCustomProperties ( ) ; mockValidatePciAndIdeLimit ( ) ; org.mockito.Mockito.doReturn ( true ) . when ( command ) . setAndValidateCpuProfile ( ) ; }
Source:
protected org.ovirt.engine.core.common.businessentities.ArchitectureType getArchitecture ( org.ovirt.engine.core.common.businessentities.VDSGroup group ) { if ( org.apache.commons.lang.StringUtils.isNotEmpty ( group.getCpuName ( ) ) ) { return org.ovirt.engine.core.bll.CpuFlagsManagerHandler.getArchitectureByCpuName ( group.getCpuName ( ) , group.getCompatibilityVersion ( ) ) ; } return group.getArchitecture ( ) ; }

Target:
protected org.ovirt.engine.core.common.businessentities.ArchitectureType getArchitecture ( org.ovirt.engine.core.common.businessentities.VDSGroup group ) { if ( org.apache.commons.lang.StringUtils.isNotEmpty ( group.getCpuName ( ) ) ) { return org.ovirt.engine.core.bll.HandleVdsCpuFlagsOrClusterChangedCommand.getCpuFlagsManagerHandler ( ) . getArchitectureByCpuName ( group.getCpuName ( ) , group.getCompatibilityVersion ( ) ) ; } return group.getArchitecture ( ) ; }
Source:
public com.google.gwt.resources.client.ImageResource getValue ( org.ovirt.engine.core.common.businessentities.Permissions user ) { switch ( user.getRoleType ( ) ) { case ADMIN : return getCommonResources ( ) . adminImage ( ) ; case USER : return getCommonResources ( ) . userImage ( ) ; default : return getCommonResources ( ) . userImage ( ) ; } }

Target:
public com.google.gwt.resources.client.ImageResource getValue ( org.ovirt.engine.core.common.businessentities.Permission user ) { switch ( user.getRoleType ( ) ) { case ADMIN : return org.ovirt.engine.ui.common.widget.table.column.PermissionTypeColumn.resources.adminImage ( ) ; case USER : return org.ovirt.engine.ui.common.widget.table.column.PermissionTypeColumn.resources.userImage ( ) ; default : return org.ovirt.engine.ui.common.widget.table.column.PermissionTypeColumn.resources.userImage ( ) ; } }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.VMListReturnForXmlRpc fullList ( java.lang.String [ ] vmIds ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.list ( java.lang.Boolean.TRUE.toString ( ) , vmIds ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.VMListReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.VMListReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.VMListReturnForXmlRpc fullList ( java.util.List < java.lang.String > vmIds ) { try { java.lang.String [ ] vmIdsArray = vmIds.toArray ( new java.lang.String [ vmIds.size ( ) ] ) ; java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.list ( java.lang.Boolean.TRUE.toString ( ) , vmIdsArray ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.VMListReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.VMListReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
Source:
public java.lang.String [ ] getWindowPropertyNames ( ) { java.util.List < java.lang.String > names = new java.util.ArrayList < > ( ) ; names.addAll ( java.util.Arrays.asList ( super . getWindowPropertyNames ( ) ) ) ; names.add ( VmListModel.DISK_WINDOW ) ; return names.toArray ( new java.lang.String [ names.size ( ) ] ) ; }

Target:
public java.lang.String [ ] getWindowPropertyNames ( ) { java.util.List < java.lang.String > names = new java.util.ArrayList < > ( ) ; names.addAll ( java.util.Arrays.asList ( super . getWindowPropertyNames ( ) ) ) ; names.add ( VmBaseListModel.DISK_WINDOW ) ; return names.toArray ( new java.lang.String [ names.size ( ) ] ) ; }
Source:
protected void readSnapshotsSection ( @ java.lang.SuppressWarnings ( value = "unused" ) org.ovirt.engine.core.compat.backendcompat.XmlNode section ) { }

Target:
private void readCpuItem ( org.ovirt.engine.core.utils.ovf.xml.XmlNode node ) { vmBase.setNumOfSockets ( java.lang.Integer.parseInt ( node.SelectSingleNode ( "rasd:num_of_sockets" , _xmlNS ) . innerText ) ) ; vmBase.setCpuPerSocket ( java.lang.Integer.parseInt ( node.SelectSingleNode ( "rasd:cpu_per_socket" , _xmlNS ) . innerText ) ) ; }