auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void validCpuMessage ( ) { org.ovirt.engine.core.common.businessentities.qos.CpuQos qos = new org.ovirt.engine.core.common.businessentities.qos.CpuQos ( ) ; qos.setCpuLimit ( org.ovirt.engine.core.bll.scheduling.QosRangeValidatorTest.OUT_OF_RANGE ) ; java.util.List < java.lang.String > canDoMsgs = org.ovirt.engine.core.common.utils.ValidationUtils.validateInputs ( java.util.Arrays.asList ( new java.lang.Class < ? > [ ] { javax.validation.groups.Default.class } ) , qos ) ; assertCanDoMsgCount ( canDoMsgs , "$range 1-100" , 1 ) ; assertCanDoMsgCount ( canDoMsgs , VdcBllMessages.ACTION_TYPE_FAILED_QOS_OUT_OF_RANGE_VALUES.name ( ) , 1 ) ; }

Target:
public void validCpuMessage ( ) { org.ovirt.engine.core.common.businessentities.qos.CpuQos qos = new org.ovirt.engine.core.common.businessentities.qos.CpuQos ( ) ; qos.setCpuLimit ( org.ovirt.engine.core.bll.scheduling.QosRangeValidatorTest.OUT_OF_RANGE ) ; java.util.List < java.lang.String > canDoMsgs = org.ovirt.engine.core.common.utils.ValidationUtils.validateInputs ( java.util.Arrays.asList ( new java.lang.Class < ? > [ ] { javax.validation.groups.Default.class } ) , qos ) ; assertCanDoMsgCount ( canDoMsgs , "$range 1-100" , 1 ) ; assertCanDoMsgCount ( canDoMsgs , EngineMessage.ACTION_TYPE_FAILED_QOS_OUT_OF_RANGE_VALUES.name ( ) , 1 ) ; }
Source:
public void testRemove ( ) throws java.lang.Exception { setUpEntityQueryExpectations ( VdcQueryType.GetVmByVmId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { PARENT_ID } , getEntity ( 0 ) , 2 ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.UpdateVm , org.ovirt.engine.core.common.action.VmManagementParametersBase.class , new java.lang.String [ ] { } , new java.lang.Object [ ] { } , true , true ) ) ; verifyRemove ( collection.remove ( GUIDS [ 0 ] . toString ( ) ) ) ; }

Target:
public void testRemove ( ) throws java.lang.Exception { setUpEntityQueryExpectations ( VdcQueryType.GetVmByVmId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { PARENT_ID } , getEntity ( 0 ) , 2 ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.UpdateVm , org.ovirt.engine.core.common.action.VmManagementParametersBase.class , new java.lang.String [ ] { } , new java.lang.Object [ ] { } , true , true ) ) ; verifyRemove ( collection.deprecatedRemove ( GUIDS [ 0 ] . toString ( ) ) ) ; }
Source:
protected void executeCommand ( ) { getNetwork ( ) . setLabel ( null ) ; org.ovirt.engine.core.common.action.VdcReturnValueBase result = runInternalAction ( ActionType.UpdateNetwork , new org.ovirt.engine.core.common.action.AddNetworkStoragePoolParameters ( getNetwork ( ) . getDataCenterId ( ) , getNetwork ( ) ) ) ; if ( ! ( result.getSucceeded ( ) ) ) { propagateFailure ( result ) ; } setSucceeded ( result.getSucceeded ( ) ) ; }

Target:
protected void executeCommand ( ) { getNetwork ( ) . setLabel ( null ) ; org.ovirt.engine.core.common.action.ActionReturnValue result = runInternalAction ( ActionType.UpdateNetwork , new org.ovirt.engine.core.common.action.AddNetworkStoragePoolParameters ( getNetwork ( ) . getDataCenterId ( ) , getNetwork ( ) ) ) ; if ( ! ( result.getSucceeded ( ) ) ) { propagateFailure ( result ) ; } setSucceeded ( result.getSucceeded ( ) ) ; }
Source:
private void unlockImageInDb ( ) { final org.ovirt.engine.core.common.businessentities.DiskImage diskImage = ( ( org.ovirt.engine.core.common.businessentities.DiskImage ) ( getOldDisk ( ) ) ) ; diskImage.setImageStatus ( ImageStatus.OK ) ; org.ovirt.engine.core.bll.ImagesHandler.updateImageStatus ( diskImage.getImageId ( ) , ImageStatus.OK ) ; }

Target:
private void lockImageInDb ( ) { final org.ovirt.engine.core.common.businessentities.storage.DiskImage diskImage = ( ( org.ovirt.engine.core.common.businessentities.storage.DiskImage ) ( getOldDisk ( ) ) ) ; org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInNewTransaction ( new org.ovirt.engine.core.utils.transaction.TransactionMethod < java.lang.Void > ( ) { @ java.lang.Override public java.lang.Void runInTransaction ( ) { getCompensationContext ( ) . snapshotEntityStatus ( diskImage.getImage ( ) ) ; getCompensationContext ( ) . stateChanged ( ) ; diskImage.setImageStatus ( ImageStatus.LOCKED ) ; org.ovirt.engine.core.bll.ImagesHandler.updateImageStatus ( diskImage.getImageId ( ) , ImageStatus.LOCKED ) ; return null ; } } ) ; }
Source:
protected boolean canDoAction ( ) { boolean result = true ; if ( ( ( org.ovirt.engine.core.bll.AddExternalEventCommand.getParameters ( ) . getEvent ( ) ) == null ) || ( org.ovirt.engine.core.bll.AddExternalEventCommand.getParameters ( ) . getEvent ( ) . getOrigin ( ) . equalsIgnoreCase ( org.ovirt.engine.core.bll.AddExternalEventCommand.OVIRT ) ) ) { addCanDoActionMessage ( EngineMessage.ACTION_TYPE_FAILED_EXTERNAL_EVENT_ILLEGAL_ORIGIN ) ; result = false ; } if ( ! result ) { addCanDoActionMessage ( EngineMessage.VAR__ACTION__ADD ) ; addCanDoActionMessage ( EngineMessage.VAR__TYPE__EXTERNAL_EVENT ) ; } return result ; }

Target:
protected boolean validate ( ) { boolean result = true ; if ( ( ( org.ovirt.engine.core.bll.AddExternalEventCommand.getParameters ( ) . getEvent ( ) ) == null ) || ( org.ovirt.engine.core.bll.AddExternalEventCommand.getParameters ( ) . getEvent ( ) . getOrigin ( ) . equalsIgnoreCase ( org.ovirt.engine.core.bll.AddExternalEventCommand.OVIRT ) ) ) { addValidationMessage ( EngineMessage.ACTION_TYPE_FAILED_EXTERNAL_EVENT_ILLEGAL_ORIGIN ) ; result = false ; } if ( ! result ) { addValidationMessage ( EngineMessage.VAR__ACTION__ADD ) ; addValidationMessage ( EngineMessage.VAR__TYPE__EXTERNAL_EVENT ) ; } return result ; }
Source:
public static void isAnyHostUpInCluster ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String clusterName ) { 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.List ) ( source ) ) . size ( ) ) > 0 ) ) { return true ; } return false ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getUpHostListByCluster ( aQuery , clusterName , 1 ) ; }

Target:
public static 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 static void getDocumentationBaseURL ( 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.uicommonweb.dataprovider.AsyncDataProvider.getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.DocsURL , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public static 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.RunPublicQuery ( VdcQueryType.GetConfigurationValue , new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.UserMessageOfTheDay , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
public org.ovirt.engine.core.utils.customprop.VmPropertiesUtils.VMCustomProperties parseProperties ( org.ovirt.engine.core.compat.Version version , java.lang.String propertiesStr ) { java.util.HashMap < java.lang.String , java.lang.String > userDefinedPropertiesMap = new java.util.HashMap < java.lang.String , java.lang.String > ( ) ; java.util.HashMap < java.lang.String , java.lang.String > predefinedPropertiesMap = new java.util.HashMap < java.lang.String , java.lang.String > ( ) ; convertCustomPropertiesStrToMaps ( version , propertiesStr , predefinedPropertiesMap , userDefinedPropertiesMap ) ; return new org.ovirt.engine.core.utils.customprop.VmPropertiesUtils.VMCustomProperties ( convertProperties ( predefinedPropertiesMap ) , convertProperties ( userDefinedPropertiesMap ) ) ; }

Target:
public org.ovirt.engine.core.common.utils.customprop.VmPropertiesUtils.VMCustomProperties parseProperties ( org.ovirt.engine.core.compat.Version version , java.lang.String propertiesStr ) { java.util.HashMap < java.lang.String , java.lang.String > userDefinedPropertiesMap = new java.util.HashMap < java.lang.String , java.lang.String > ( ) ; java.util.HashMap < java.lang.String , java.lang.String > predefinedPropertiesMap = new java.util.HashMap < java.lang.String , java.lang.String > ( ) ; convertCustomPropertiesStrToMaps ( version , propertiesStr , predefinedPropertiesMap , userDefinedPropertiesMap ) ; return new org.ovirt.engine.core.common.utils.customprop.VmPropertiesUtils.VMCustomProperties ( convertProperties ( predefinedPropertiesMap ) , convertProperties ( userDefinedPropertiesMap ) ) ; }
Source:
public java.util.List < org.ovirt.engine.core.common.businessentities.storage_server_connections > getAllForConnection ( org.ovirt.engine.core.common.businessentities.storage_server_connections connection ) { return getCallsHandler ( ) . executeReadList ( "Getstorage_server_connectionsByKey" , org.ovirt.engine.core.dao.StorageServerConnectionDAODbFacadeImpl.mapper , getCustomMapSqlParameterSource ( ) . addValue ( "iqn" , connection.getiqn ( ) ) . addValue ( "connection" , connection.getconnection ( ) ) . addValue ( "port" , connection.getport ( ) ) . addValue ( "portal" , connection.getportal ( ) ) . addValue ( "username" , connection.getuser_name ( ) ) . addValue ( "password" , org.ovirt.engine.core.dal.dbbroker.DbFacadeUtils.encryptPassword ( connection.getpassword ( ) ) ) ) ; }

Target:
public java.util.List < org.ovirt.engine.core.common.businessentities.StorageServerConnections > getAllForConnection ( org.ovirt.engine.core.common.businessentities.StorageServerConnections connection ) { return getCallsHandler ( ) . executeReadList ( "Getstorage_server_connectionsByKey" , org.ovirt.engine.core.dao.StorageServerConnectionDAODbFacadeImpl.mapper , getCustomMapSqlParameterSource ( ) . addValue ( "iqn" , connection.getiqn ( ) ) . addValue ( "connection" , connection.getconnection ( ) ) . addValue ( "port" , connection.getport ( ) ) . addValue ( "portal" , connection.getportal ( ) ) . addValue ( "username" , connection.getuser_name ( ) ) . addValue ( "password" , org.ovirt.engine.core.dal.dbbroker.DbFacadeUtils.encryptPassword ( connection.getpassword ( ) ) ) ) ; }
Source:
private static org.ovirt.engine.core.common.action.AddDiskParameters createParameters ( ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage image = new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ; image.setDiskInterface ( DiskInterface.IDE ) ; org.ovirt.engine.core.common.action.AddDiskParameters parameters = new org.ovirt.engine.core.common.action.AddDiskParameters ( new org.ovirt.engine.core.common.businessentities.storage.DiskVmElement ( null , org.ovirt.engine.core.compat.Guid.newGuid ( ) ) , image ) ; return parameters ; }

Target:
private static org.ovirt.engine.core.common.action.AddDiskParameters createParameters ( ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage image = new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ; org.ovirt.engine.core.common.businessentities.storage.DiskVmElement dve = new org.ovirt.engine.core.common.businessentities.storage.DiskVmElement ( null , org.ovirt.engine.core.bll.storage.disk.AddDiskCommandTest.vmId ) ; dve.setDiskInterface ( DiskInterface.IDE ) ; org.ovirt.engine.core.common.action.AddDiskParameters parameters = new org.ovirt.engine.core.common.action.AddDiskParameters ( dve , image ) ; return parameters ; }
Source:
public void testExistingDiscardAfterDeleteFunctionalityPreservedAllLunsHaveDiscardAfterDeleteFunctionality ( ) { storageDomain.setDiscardAfterDelete ( true ) ; org.junit.Assert.assertTrue ( discardHelper.isExistingDiscardAfterDeleteFunctionalityPreserved ( java.util.Arrays.asList ( createLunWithDiscardFunctionality ( 1024L , false ) , createLunWithDiscardFunctionality ( 2048L , true ) ) , storageDomain ) ) ; }

Target:
public void testExistingPassDiscardFunctionalityIsPreservedAllLunsHaveDiscardFunctionality ( ) { storageDomain.setSupportsDiscard ( true ) ; storageDomainDisks.add ( new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ) ; org.junit.Assert.assertTrue ( discardHelper.isExistingPassDiscardFunctionalityPreserved ( java.util.Arrays.asList ( createLunWithDiscardSupport ( 1024L ) , createLunWithDiscardSupport ( 2048L ) ) , storageDomain ) ) ; }
Source:
public void testGetPermittedStorageDomains ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > result = dao.getPermittedStorageDomainsByStoragePool ( org.ovirt.engine.core.dao.StorageDomainDaoTest.EXISTING_USER_ID , ActionGroup.CONFIGURE_VM_STORAGE , new org.ovirt.engine.core.compat.Guid ( "6d849ebf-755f-4552-ad09-9a090cda105d" ) ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertFalse ( result.isEmpty ( ) ) ; org.junit.Assert.assertEquals ( result.get ( 0 ) . getId ( ) , existingDomain.getId ( ) ) ; }

Target:
public void testGetPermittedStorageDomains ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > result = dao.getPermittedStorageDomainsByStoragePool ( FixturesTool.USER_EXISTING_ID , ActionGroup.CONFIGURE_VM_STORAGE , FixturesTool.DATA_CENTER ) ; org.junit.Assert.assertFalse ( result.isEmpty ( ) ) ; org.junit.Assert.assertEquals ( result.get ( 0 ) . getId ( ) , existingDomain.getId ( ) ) ; }
Source:
protected org.springframework.jdbc.core.simple.SimpleJdbcCall getCall ( java.lang.String procedureName , org.ovirt.engine.core.dal.dbbroker.SimpleJdbcCallsHandler.CallCreator callCreator ) { org.springframework.jdbc.core.simple.SimpleJdbcCall call = callsMap.get ( procedureName ) ; if ( call == null ) { call = callCreator.createCall ( ) ; call.compile ( ) ; callsMap.putIfAbsent ( procedureName , call ) ; } return call ; }

Target:
protected < T > org.springframework.jdbc.core.simple.SimpleJdbcCall getCall ( java.lang.String procedureName , org.ovirt.engine.core.dal.dbbroker.SimpleJdbcCallsHandler.CallCreator callCreator , org.springframework.jdbc.core.RowMapper < T > mapper ) { org.springframework.jdbc.core.simple.SimpleJdbcCall call = callsMap.get ( procedureName ) ; if ( call == null ) { call = callCreator.createCall ( ) ; call.compile ( ) ; callsMap.putIfAbsent ( procedureName , call ) ; } else if ( mapper != null ) { call.returningResultSet ( BaseDAODbFacade.RETURN_VALUE_PARAMETER , mapper ) ; } return call ; }
Source:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event < ? extends org.ovirt.engine.ui.uicompat.EventArgs > ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { validateSource ( ) ; clearVms ( ) ; clearValidations ( ) ; loadProviders ( ) ; }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event < ? extends org.ovirt.engine.ui.uicompat.EventArgs > ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { org.ovirt.engine.core.common.businessentities.StoragePool dataCenter = dataCenters.getSelectedItem ( ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageDomainsByStoragePoolId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenter.getId ( ) ) , new org.ovirt.engine.ui.frontend.AsyncQuery ( this , createGetStorageDomainsByStoragePoolIdCallback ( dataCenter ) ) ) ; }
Source:
public void testGetWithInvalidNetworkId ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpEntityQueryExpectations ( 1 , getIscsiBondWithNoMatchingNetworks ( ) ) ; try { resource.get ( ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }

Target:
public void testGetWithInvalidNetworkId ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpEntityQueryExpectations ( 1 , getIscsiBondWithNoMatchingNetworks ( ) ) ; try { resource.get ( ) ; org.junit.Assert.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }
Source:
public void run ( ) { for ( org.ovirt.engine.core.compat.Guid vmId : vmIds ) { org.ovirt.engine.core.bll.Backend.getInstance ( ) . runInternalAction ( VdcActionType.ProcessDownVm , new org.ovirt.engine.core.common.action.ProcessDownVmParameters ( vmId , true ) ) ; } org.ovirt.engine.core.bll.hostdev.HostDeviceManager hostDeviceManager = org.ovirt.engine.core.di.Injector.get ( org.ovirt.engine.core.bll.hostdev.HostDeviceManager.class ) ; hostDeviceManager.refreshHostIfAnyVmHasHostDevices ( vmIds , hostId ) ; }

Target:
private void processOnVmStopInternal ( final java.util.Collection < org.ovirt.engine.core.compat.Guid > vmIds , final org.ovirt.engine.core.compat.Guid hostId ) { for ( org.ovirt.engine.core.compat.Guid vmId : vmIds ) { backend.runInternalAction ( VdcActionType.ProcessDownVm , new org.ovirt.engine.core.common.action.ProcessDownVmParameters ( vmId , true ) ) ; } org.ovirt.engine.core.bll.hostdev.HostDeviceManager hostDeviceManager = org.ovirt.engine.core.di.Injector.get ( org.ovirt.engine.core.bll.hostdev.HostDeviceManager.class ) ; hostDeviceManager.refreshHostIfAnyVmHasHostDevices ( vmIds , hostId ) ; }
Source:
private void mockDAOs ( org.ovirt.engine.core.bll.AddVmCommand < ? > cmd ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseMockUtils.mockVmDao ( cmd , vmDAO ) ; org.mockito.Mockito.doReturn ( sdDAO ) . when ( cmd ) . getStorageDomainDAO ( ) ; org.mockito.Mockito.doReturn ( vmTemplateDAO ) . when ( cmd ) . getVmTemplateDAO ( ) ; org.mockito.Mockito.doReturn ( vdsGroupDao ) . when ( cmd ) . getVdsGroupDAO ( ) ; }

Target:
private void mockDAOs ( org.ovirt.engine.core.bll.AddVmCommand < ? > cmd ) { org.mockito.Mockito.doReturn ( vmDAO ) . when ( cmd ) . getVmDAO ( ) ; org.mockito.Mockito.doReturn ( sdDAO ) . when ( cmd ) . getStorageDomainDAO ( ) ; org.mockito.Mockito.doReturn ( vmTemplateDAO ) . when ( cmd ) . getVmTemplateDAO ( ) ; org.mockito.Mockito.doReturn ( vdsGroupDao ) . when ( cmd ) . getVdsGroupDAO ( ) ; }
Source:
private static void updateCdPath ( org.ovirt.engine.core.common.businessentities.VmBase oldVmBase , org.ovirt.engine.core.common.businessentities.VmBase newVmBase ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > cdList = org.ovirt.engine.core.bll.utils.VmDeviceUtils.getCdDevices ( oldVmBase.getId ( ) ) ; if ( ( cdList.size ( ) ) > 0 ) { org.ovirt.engine.core.common.businessentities.VmDevice cd = cdList.get ( 0 ) ; cd.getSpecParams ( ) . putAll ( org.ovirt.engine.core.bll.utils.VmDeviceUtils.getCdDeviceSpecParams ( "" , newVmBase.getIsoPath ( ) ) ) ; org.ovirt.engine.core.bll.utils.VmDeviceUtils.dao.update ( cd ) ; } }

Target:
private static void updateCdPath ( org.ovirt.engine.core.common.businessentities.VmBase oldVmBase , org.ovirt.engine.core.common.businessentities.VmBase newVmBase ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > cdList = org.ovirt.engine.core.bll.utils.VmDeviceUtils.getCdDevices ( oldVmBase.getId ( ) ) ; if ( ( cdList.size ( ) ) > 0 ) { org.ovirt.engine.core.common.businessentities.VmDevice cd = cdList.get ( 0 ) ; cd.getSpecParams ( ) . putAll ( org.ovirt.engine.core.bll.utils.VmDeviceUtils.getCdDeviceSpecParams ( "" , newVmBase.getIsoPath ( ) ) ) ; org.ovirt.engine.core.bll.utils.VmDeviceUtils.vmDeviceDao.update ( cd ) ; } }
Source:
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.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 ) ; }

Target:
public void getStorageDomainMaxNameLength ( 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 ; } } ; getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.StorageDomainNameSizeLimit , getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
public void getClusterGlusterServices ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.core.common.queries.gluster.GlusterVolumeAdvancedDetailsParameters parameters = new org.ovirt.engine.core.common.queries.gluster.GlusterVolumeAdvancedDetailsParameters ( clusterId , null , null , false ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterVolumeAdvancedDetails , parameters , aQuery ) ; }

Target:
public void 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:
protected java.util.List < org.ovirt.engine.core.common.businessentities.permissions > setUpPermissions ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.permissions > perms = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.permissions > ( ) ; for ( int i = 0 ; i < ( NAMES.length ) ; i ++ ) { perms.add ( getEntity ( i ) ) ; } return perms ; }

Target:
protected java.util.List < org.ovirt.engine.core.common.businessentities.Permissions > setUpPermissionsWithAdElementId ( org.ovirt.engine.core.compat.Guid adElementId ) { java.util.List < org.ovirt.engine.core.common.businessentities.Permissions > perms = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Permissions > ( ) ; for ( int i = 0 ; i < ( NAMES.length ) ; i ++ ) { org.ovirt.engine.core.common.businessentities.Permissions entity = getEntity ( i ) ; entity.setad_element_id ( adElementId ) ; perms.add ( entity ) ; } return perms ; }
Source:
public java.lang.Void runInTransaction ( ) { diskImage.setImageId ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) ) ; diskImage.setId ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) ) ; diskImage.setParentId ( Guid.Empty ) ; diskImage.setit_guid ( Guid.Empty ) ; org.ovirt.engine.core.bll.ImagesHandler.setDiskAlias ( diskImage , getVm ( ) ) ; org.ovirt.engine.core.bll.ImagesHandler.addDiskImage ( diskImage , getVmId ( ) ) ; return null ; }

Target:
public java.lang.Void runInTransaction ( ) { diskImage.setImageId ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) ) ; diskImage.setId ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) ) ; diskImage.setParentId ( Guid.Empty ) ; diskImage.setImageTemplateId ( Guid.Empty ) ; org.ovirt.engine.core.bll.ImagesHandler.setDiskAlias ( diskImage , getVm ( ) ) ; org.ovirt.engine.core.bll.ImagesHandler.addDiskImage ( diskImage , getVmId ( ) ) ; return null ; }
Source:
protected java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > getDisksList ( ) { if ( ( cachedSelectedActiveDisks ) == null ) { cachedSelectedActiveDisks = org.ovirt.engine.core.bll.ImagesHandler.filterImageDisks ( org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getDiskDao ( ) . getAllForVm ( org.ovirt.engine.core.bll.CreateAllSnapshotsFromVmCommand.getVmId ( ) ) , true , true , true ) ; } return cachedSelectedActiveDisks ; }

Target:
private java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > getDiskImagesForVm ( ) { return org.ovirt.engine.core.bll.ImagesHandler.filterImageDisks ( org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getDiskDao ( ) . getAllForVm ( org.ovirt.engine.core.bll.CreateAllSnapshotsFromVmCommand.getVmId ( ) ) , true , true , true ) ; }
Source:
public void testCannotUpdateOSNotSupportVirtioScsi ( ) { prepareVmToPassCanDoAction ( ) ; group.setCompatibilityVersion ( Version.v3_3 ) ; org.mockito.Mockito.when ( command.isVirtioScsiEnabledForVm ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( true ) ; org.mockito.Mockito.when ( osRepository.getDiskInterfaces ( org.mockito.Matchers.any ( java.lang.Integer.class ) , org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Version.class ) ) ) . thenReturn ( new java.util.ArrayList < > ( java.util.Arrays.asList ( "VirtIO" ) ) ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( command , EngineMessage.ACTION_TYPE_FAILED_ILLEGAL_OS_TYPE_DOES_NOT_SUPPORT_VIRTIO_SCSI ) ; }

Target:
public void testCannotUpdateOSNotSupportVirtioScsi ( ) { prepareVmToPassValidate ( ) ; group.setCompatibilityVersion ( Version.v4_0 ) ; org.mockito.Mockito.when ( command.isVirtioScsiEnabledForVm ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( true ) ; org.mockito.Mockito.when ( osRepository.getDiskInterfaces ( org.mockito.Matchers.any ( java.lang.Integer.class ) , org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Version.class ) ) ) . thenReturn ( new java.util.ArrayList < > ( java.util.Arrays.asList ( "VirtIO" ) ) ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( command , EngineMessage.ACTION_TYPE_FAILED_ILLEGAL_OS_TYPE_DOES_NOT_SUPPORT_VIRTIO_SCSI ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.VDSGroup createCluster ( int index , org.ovirt.engine.core.compat.Version v ) { org.ovirt.engine.core.common.businessentities.VDSGroup cluster = new org.ovirt.engine.core.common.businessentities.VDSGroup ( ) ; cluster.setId ( org.ovirt.engine.core.bll.gluster.GlusterGeoRepSyncJobTest.CLUSTER_GUIDS [ index ] ) ; cluster.setName ( "cluster" ) ; cluster.setGlusterService ( true ) ; cluster.setVirtService ( false ) ; cluster.setcompatibility_version ( v ) ; return cluster ; }

Target:
private org.ovirt.engine.core.common.businessentities.VDSGroup createCluster ( int index , org.ovirt.engine.core.compat.Version v ) { org.ovirt.engine.core.common.businessentities.VDSGroup cluster = new org.ovirt.engine.core.common.businessentities.VDSGroup ( ) ; cluster.setId ( org.ovirt.engine.core.bll.gluster.GlusterGeoRepSyncJobTest.CLUSTER_GUIDS [ index ] ) ; cluster.setName ( "cluster" ) ; cluster.setGlusterService ( true ) ; cluster.setVirtService ( false ) ; cluster.setCompatibilityVersion ( v ) ; return cluster ; }
Source:
public void testLoad ( ) throws java.lang.Exception { org.junit.Assert.assertTrue ( OsInfoPreferencesLoader.INSTANCE.getPreferences ( ) . nodeExists ( "/os/default/resources/maximum/ram" ) ) ; org.junit.Assert.assertEquals ( 32000 , OsInfoPreferencesLoader.INSTANCE.getPreferences ( ) . node ( "/os/default/resources/maximum/ram" ) . getInt ( "value.3.1" , ( - 1 ) ) ) ; }

Target:
public void testLoad ( ) throws java.lang.Exception { org.junit.jupiter.api.Assertions.assertTrue ( OsInfoPreferencesLoader.INSTANCE.getPreferences ( ) . nodeExists ( "/os/default/resources/maximum/ram" ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( 32000 , OsInfoPreferencesLoader.INSTANCE.getPreferences ( ) . node ( "/os/default/resources/maximum/ram" ) . getInt ( "value.3.1" , ( - 1 ) ) ) ; }
Source:
protected void failedToRunVm ( ) { org.ovirt.engine.core.utils.threadpool.ThreadPoolUtil.execute ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { processVmPoolOnStopVm ( ) ; } } ) ; org.ovirt.engine.core.bll.job.ExecutionHandler.setAsyncJob ( org.ovirt.engine.core.bll.RunVmCommandBase.getExecutionContext ( ) , false ) ; org.ovirt.engine.core.bll.job.ExecutionHandler.endJob ( org.ovirt.engine.core.bll.RunVmCommandBase.getExecutionContext ( ) , false ) ; }

Target:
private void processVmPoolOnStopVm ( ) { org.ovirt.engine.core.utils.threadpool.ThreadPoolUtil.execute ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { org.ovirt.engine.core.bll.VmPoolHandler.processVmPoolOnStopVm ( getVm ( ) . getId ( ) , org.ovirt.engine.core.bll.job.ExecutionHandler.createDefaultContexForTasks ( getExecutionContext ( ) ) ) ; } } ) ; }
Source:
public org.ovirt.engine.core.searchbackend.IConditionValueAutoCompleter getFieldValueAutoCompleter ( java.lang.String fieldName ) { if ( "STATUS" . equals ( fieldName ) ) { return new org.ovirt.engine.core.searchbackend.EnumValueAutoCompleter ( org.ovirt.engine.core.common.businessentities.ImageStatus.class ) ; } else if ( "DISK_TYPE" . equals ( fieldName ) ) { return new org.ovirt.engine.core.searchbackend.EnumValueAutoCompleter ( org.ovirt.engine.core.common.businessentities.Disk.DiskStorageType.class ) ; } else if ( ( "BOOTABLE" . equals ( fieldName ) ) || ( "SHAREABLE" . equals ( fieldName ) ) ) { return new org.ovirt.engine.core.searchbackend.BitValueAutoCompleter ( ) ; } return null ; }

Target:
public org.ovirt.engine.core.searchbackend.IConditionValueAutoCompleter getFieldValueAutoCompleter ( java.lang.String fieldName ) { if ( org.ovirt.engine.core.searchbackend.DiskConditionFieldAutoCompleter.STATUS.equals ( fieldName ) ) { return new org.ovirt.engine.core.searchbackend.EnumValueAutoCompleter ( org.ovirt.engine.core.common.businessentities.ImageStatus.class ) ; } else if ( org.ovirt.engine.core.searchbackend.DiskConditionFieldAutoCompleter.DISK_TYPE.equals ( fieldName ) ) { return new org.ovirt.engine.core.searchbackend.EnumValueAutoCompleter ( org.ovirt.engine.core.common.businessentities.Disk.DiskStorageType.class ) ; } else if ( ( org.ovirt.engine.core.searchbackend.DiskConditionFieldAutoCompleter.BOOTABLE.equals ( fieldName ) ) || ( org.ovirt.engine.core.searchbackend.DiskConditionFieldAutoCompleter.SHAREABLE.equals ( fieldName ) ) ) { return new org.ovirt.engine.core.searchbackend.BitValueAutoCompleter ( ) ; } return null ; }
Source:
public java.lang.String getButtonToolTip ( ) { if ( ( ( ! ( getModel ( ) . isVmDown ( ) ) ) && ( getModel ( ) . isHotPlugAvailable ( ) ) ) && ( ! ( getModel ( ) . getIsDiskHotPlugSupported ( ) ) ) ) { return constants.diskHotPlugNotSupported ( ) ; } else { return this . getTitle ( ) ; } }

Target:
public java.lang.String getButtonToolTip ( ) { if ( ( ( ! ( getModel ( ) . isVmDown ( ) ) ) && ( getModel ( ) . isHotPlugAvailable ( ) ) ) && ( ! ( getModel ( ) . getIsDiskHotPlugSupported ( ) ) ) ) { return org.ovirt.engine.ui.common.widget.uicommon.vm.VmDiskListModelTable.constants.diskHotPlugNotSupported ( ) ; } else { return this . getTitle ( ) ; } }
Source:
public static void isFloppySupported ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.Integer osId , org.ovirt.engine.core.compat.Version version ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter < java.lang.Boolean > ( ) { @ java.lang.Override public java.lang.Boolean Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Boolean ) ( source ) ) : java.lang.Boolean.FALSE ; } } ; org.ovirt.engine.core.common.queries.OsQueryParameters params = new org.ovirt.engine.core.common.queries.OsQueryParameters ( org.ovirt.engine.core.common.queries.OsQueryParameters.OsRepositoryVerb.GetFloppySupport , osId , version ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.OsRepository , params , aQuery ) ; }

Target:
public static void isFloppySupported ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.Integer osId , org.ovirt.engine.core.compat.Version version ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter < java.lang.Boolean > ( ) { @ java.lang.Override public java.lang.Boolean convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Boolean ) ( source ) ) : java.lang.Boolean.FALSE ; } } ; org.ovirt.engine.core.common.queries.OsQueryParameters params = new org.ovirt.engine.core.common.queries.OsQueryParameters ( org.ovirt.engine.core.common.queries.OsQueryParameters.OsRepositoryVerb.GetFloppySupport , osId , version ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.OsRepository , params , aQuery ) ; }
Source:
public void testAnotherInterfaceAlreadyLabeledWithThisLabel ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface vdsNetworkInterface = createVdsNetworkInterfaceWithName ( "name" ) ; org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface preexistingVdsNetworkInterface = createVdsNetworkInterfaceWithName ( "differentName" ) ; java.lang.String label = "label" ; vdsNetworkInterface.setLabels ( java.util.Collections.singleton ( label ) ) ; preexistingVdsNetworkInterface.setLabels ( java.util.Collections.singleton ( label ) ) ; org.ovirt.engine.core.bll.validator.HostInterfaceValidator validator = new org.ovirt.engine.core.bll.validator.HostInterfaceValidator ( vdsNetworkInterface ) ; java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > preexistingInterfaces = java.util.Arrays.asList ( preexistingVdsNetworkInterface ) ; org.junit.Assert.assertThat ( "different nics cannot have same label set." , validator.anotherInterfaceAlreadyLabeledWithThisLabel ( label , preexistingInterfaces ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( VdcBllMessages.OTHER_INTERFACE_ALREADY_LABELED ) ) ; }

Target:
public void testAnotherInterfaceAlreadyLabeledWithThisLabel ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface vdsNetworkInterface = createVdsNetworkInterfaceWithName ( "name" ) ; org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface preexistingVdsNetworkInterface = createVdsNetworkInterfaceWithName ( "differentName" ) ; java.lang.String label = "label" ; vdsNetworkInterface.setLabels ( java.util.Collections.singleton ( label ) ) ; preexistingVdsNetworkInterface.setLabels ( java.util.Collections.singleton ( label ) ) ; org.ovirt.engine.core.bll.validator.HostInterfaceValidator validator = new org.ovirt.engine.core.bll.validator.HostInterfaceValidator ( vdsNetworkInterface ) ; java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > preexistingInterfaces = java.util.Collections.singletonList ( preexistingVdsNetworkInterface ) ; org.junit.Assert.assertThat ( "different nics cannot have same label set." , validator.anotherInterfaceAlreadyLabeledWithThisLabel ( label , preexistingInterfaces ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( VdcBllMessages.OTHER_INTERFACE_ALREADY_LABELED ) ) ; }
Source:
private static void assertFailsWithCanDoActionMessage ( org.ovirt.engine.core.bll.hostdeploy.InstallVdsInternalCommand < org.ovirt.engine.core.common.action.hostdeploy.InstallVdsParameters > command , org.ovirt.engine.core.common.errors.EngineMessage message ) { org.junit.Assert.assertFalse ( command.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( command.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( message.name ( ) ) ) ; }

Target:
private static void assertFailsWithValidateMessage ( org.ovirt.engine.core.bll.hostdeploy.InstallVdsInternalCommand < org.ovirt.engine.core.common.action.hostdeploy.InstallVdsParameters > command , org.ovirt.engine.core.common.errors.EngineMessage message ) { org.junit.Assert.assertFalse ( command.validate ( ) ) ; org.junit.Assert.assertTrue ( command.getReturnValue ( ) . getValidationMessages ( ) . contains ( message.name ( ) ) ) ; }
Source:
private java.lang.Integer calcMaxVCpu ( ) { java.lang.Integer maxSockets = org.ovirt.engine.core.common.config.Config.< java.lang.Integer > getValue ( ConfigValues.MaxNumOfVmSockets , vm.getVdsGroupCompatibilityVersion ( ) . getValue ( ) ) ; java.lang.Integer maxVCpus = org.ovirt.engine.core.common.config.Config.< java.lang.Integer > getValue ( ConfigValues.MaxNumOfVmCpus , vm.getVdsGroupCompatibilityVersion ( ) . getValue ( ) ) ; maxVCpus = ( vm.getCpuPerSocket ( ) ) * ( java.lang.Math.min ( maxSockets , ( maxVCpus / ( vm.getCpuPerSocket ( ) ) ) ) ) ; return maxVCpus ; }

Target:
private java.lang.Integer calcMaxVCpu ( ) { java.lang.Integer maxSockets = org.ovirt.engine.core.common.config.Config.< java.lang.Integer > getValue ( ConfigValues.MaxNumOfVmSockets , vm.getVdsGroupCompatibilityVersion ( ) . getValue ( ) ) ; java.lang.Integer maxVCpus = org.ovirt.engine.core.common.config.Config.< java.lang.Integer > getValue ( ConfigValues.MaxNumOfVmCpus , vm.getVdsGroupCompatibilityVersion ( ) . getValue ( ) ) ; int threadsPerCore = vm.getThreadsPerCpu ( ) ; int cpuPerSocket = vm.getCpuPerSocket ( ) ; maxVCpus = ( cpuPerSocket * threadsPerCore ) * ( java.lang.Math.min ( maxSockets , ( maxVCpus / ( cpuPerSocket * threadsPerCore ) ) ) ) ; return maxVCpus ; }
Source:
public static void getDataCenterListByName ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String name ) { 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.StoragePool > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( ( ( "DataCenter: name=" + name ) + " sortby name" ) , org.ovirt.engine.core.common.interfaces.SearchType.StoragePool ) , aQuery ) ; }

Target:
public static void isClusterEmpty ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter < java.lang.Boolean > ( ) { @ java.lang.Override public java.lang.Boolean Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return ( ( java.lang.Boolean ) ( source ) ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.IsClusterEmpty , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }
Source:
public static void getDiskList ( 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.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > ( ) ; } } ; org.ovirt.engine.core.common.queries.SearchParameters searchParams = new org.ovirt.engine.core.common.queries.SearchParameters ( "Disks:" , org.ovirt.engine.core.common.interfaces.SearchType.Disk ) ; searchParams.setMaxCount ( 9999 ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , searchParams , aQuery ) ; }

Target:
public static void getAllDataCenterNetworks ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId ) { 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.core.common.queries.IdQueryParameters params = new org.ovirt.engine.core.common.queries.IdQueryParameters ( storagePoolId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetNetworksByDataCenterId , params , aQuery ) ; }
Source:
public static void GetClusterDesktopMemoryOverCommit ( 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 ( ) : 0 ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.MaxVdsMemOverCommit ) , aQuery ) ; }

Target:
public static void GetDataCentersByStorageDomain ( 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 ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage_pool > ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetStoragePoolsByStorageDomainId , new org.ovirt.engine.core.common.queries.StorageDomainQueryParametersBase ( storageDomainId ) , aQuery ) ; }
Source:
protected void runSynchronizeOperation ( org.ovirt.engine.core.bll.storage.ActivateDeactivateSingleAsyncOperationFactory factory , java.lang.Object ... addionalParams ) { java.util.List < org.ovirt.engine.core.common.businessentities.VDS > allRunningVdsInPool = getAllRunningVdssInPool ( ) ; java.util.ArrayList < java.lang.Object > parameters = initAsyncOperationParameters ( allRunningVdsInPool ) ; if ( ( addionalParams.length ) > 0 ) { parameters.addAll ( java.util.Arrays.asList ( addionalParams ) ) ; } org.ovirt.engine.core.utils.SyncronizeNumberOfAsyncOperations sync = new org.ovirt.engine.core.utils.SyncronizeNumberOfAsyncOperations ( allRunningVdsInPool.size ( ) , parameters , factory ) ; sync.Execute ( ) ; }

Target:
protected void runSynchronizeOperation ( org.ovirt.engine.core.bll.storage.ActivateDeactivateSingleAsyncOperationFactory factory , java.lang.Object ... addionalParams ) { java.util.List < org.ovirt.engine.core.common.businessentities.VDS > allRunningVdsInPool = getAllRunningVdssInPool ( ) ; java.util.ArrayList < java.lang.Object > parameters = initAsyncOperationParameters ( allRunningVdsInPool ) ; if ( ( addionalParams.length ) > 0 ) { parameters.addAll ( java.util.Arrays.asList ( addionalParams ) ) ; } org.ovirt.engine.core.utils.SyncronizeNumberOfAsyncOperations sync = new org.ovirt.engine.core.utils.SyncronizeNumberOfAsyncOperations ( allRunningVdsInPool.size ( ) , parameters , factory ) ; sync.execute ( ) ; }
Source:
protected org.ovirt.engine.core.bll.ValidationResult networkNotUsed ( java.util.Collection < java.lang.String > entitiesNames , org.ovirt.engine.core.common.errors.EngineMessage entitiesReplacementPlural , org.ovirt.engine.core.common.errors.EngineMessage entitiesReplacementSingular ) { return new org.ovirt.engine.core.common.utils.PluralMessages ( ) . getNetworkInUse ( entitiesNames , entitiesReplacementSingular , entitiesReplacementPlural ) ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult getNetworkInUse ( java.util.Collection < java.lang.String > names ) { if ( names.isEmpty ( ) ) { return org.ovirt.engine.core.bll.ValidationResult.VALID ; } int numberOfEntities = names.size ( ) ; boolean useSingular = numberOfEntities == 1 ; return useSingular ? getNetworkInUseSingular ( names ) : getNetworkInUsePlural ( names ) ; }
Source:
private java.lang.String getJsonDiskDescription ( ) { try { return org.ovirt.engine.core.bll.ImagesHandler.getJsonDiskDescription ( org.ovirt.engine.core.bll.AddImageFromScratchCommand.getParameters ( ) . getDiskInfo ( ) . getDiskAlias ( ) , org.ovirt.engine.core.bll.AddImageFromScratchCommand.getParameters ( ) . getDiskInfo ( ) . getDiskDescription ( ) ) ; } catch ( java.io.IOException e ) { log.error ( "Exception while generating json for disk. ERROR: '{}'" , e ) ; return org.apache.commons.lang.StringUtils.EMPTY ; } }

Target:
protected void endSuccessfully ( ) { super . endSuccessfully ( ) ; setActionReturnValue ( org.ovirt.engine.core.bll.AddImageFromScratchCommand.getDestinationDiskImage ( ) ) ; }
Source:
protected org.ovirt.engine.core.common.businessentities.HostDevice generateNewEntity ( ) { org.ovirt.engine.core.common.businessentities.HostDevice device = new org.ovirt.engine.core.common.businessentities.HostDevice ( ) ; device.setHostId ( org.ovirt.engine.core.dao.HostDeviceDaoTest.EXISTING_HOST_ID ) ; device.setDeviceName ( ( ( org.ovirt.engine.core.dao.HostDeviceDaoTest.EXISTING_DEVICE_NAME ) + "___child" ) ) ; device.setParentDeviceName ( org.ovirt.engine.core.dao.HostDeviceDaoTest.EXISTING_DEVICE_NAME ) ; device.setCapability ( "pci" ) ; return device ; }

Target:
protected org.ovirt.engine.core.common.businessentities.HostDevice generateNewEntity ( ) { org.ovirt.engine.core.common.businessentities.HostDevice device = new org.ovirt.engine.core.common.businessentities.HostDevice ( ) ; device.setHostId ( org.ovirt.engine.core.dao.HostDeviceDaoTest.EXISTING_HOST_ID ) ; device.setDeviceName ( ( ( org.ovirt.engine.core.dao.HostDeviceDaoTest.EXISTING_DEVICE_NAME ) + "___child" ) ) ; device.setParentDeviceName ( org.ovirt.engine.core.dao.HostDeviceDaoTest.EXISTING_DEVICE_NAME ) ; device.setCapability ( "pci" ) ; device.setDriver ( "mock driver" ) ; device.setAssignable ( true ) ; return device ; }