auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public static void mockAsyncDataProvider ( ) { org.ovirt.engine.ui.uicommonweb.models.vms.BaseVmTest.adp = org.ovirt.engine.ui.uicommonweb.models.vms.BaseVmTest.setup.getMocks ( ) . asyncDataProvider ( ) ; org.mockito.Mockito.when ( org.ovirt.engine.ui.uicommonweb.models.vms.BaseVmTest.adp.getConfigValuePreConverted ( ConfigurationValues.VncKeyboardLayoutValidValues ) ) . thenReturn ( java.util.Collections.emptyList ( ) ) ; org.mockito.Mockito.when ( org.ovirt.engine.ui.uicommonweb.models.vms.BaseVmTest.adp.osNameExists ( org.ovirt.engine.ui.uicommonweb.models.vms.BaseVmTest.OS_TYPE ) ) . thenReturn ( true ) ; org.mockito.Mockito.when ( org.ovirt.engine.ui.uicommonweb.models.vms.BaseVmTest.adp.getMaxVmNameLengthWin ( ) ) . thenReturn ( 15 ) ; org.mockito.Mockito.when ( org.ovirt.engine.ui.uicommonweb.models.vms.BaseVmTest.adp.getOsDefaultIconId ( org.ovirt.engine.ui.uicommonweb.models.vms.BaseVmTest.OS_TYPE , false ) ) . thenReturn ( org.ovirt.engine.ui.uicommonweb.models.vms.BaseVmTest.LARGE_OS_DEFAULT_ICON_ID ) ; }

Target:
public static void mockAsyncDataProvider ( ) { org.ovirt.engine.ui.uicommonweb.models.vms.BaseVmTest.adp = org.ovirt.engine.ui.uicommonweb.models.vms.BaseVmTest.setup.getMocks ( ) . asyncDataProvider ( ) ; org.mockito.Mockito.when ( org.ovirt.engine.ui.uicommonweb.models.vms.BaseVmTest.adp.getConfigValuePreConverted ( ConfigurationValues.VncKeyboardLayoutValidValues ) ) . thenReturn ( java.util.Collections.emptyList ( ) ) ; org.mockito.Mockito.when ( org.ovirt.engine.ui.uicommonweb.models.vms.BaseVmTest.adp.osNameExists ( org.ovirt.engine.ui.uicommonweb.models.vms.BaseVmTest.OS_TYPE ) ) . thenReturn ( true ) ; org.mockito.Mockito.when ( org.ovirt.engine.ui.uicommonweb.models.vms.BaseVmTest.adp.getMaxVmNameLength ( ) ) . thenReturn ( 64 ) ; org.mockito.Mockito.when ( org.ovirt.engine.ui.uicommonweb.models.vms.BaseVmTest.adp.getOsDefaultIconId ( org.ovirt.engine.ui.uicommonweb.models.vms.BaseVmTest.OS_TYPE , false ) ) . thenReturn ( org.ovirt.engine.ui.uicommonweb.models.vms.BaseVmTest.LARGE_OS_DEFAULT_ICON_ID ) ; }
Source:
protected void InitDetailModels ( ) { super . InitDetailModels ( ) ; org.ovirt.engine.core.compat.ObservableCollection < org.ovirt.engine.ui.uicommonweb.models.EntityModel > list = new org.ovirt.engine.core.compat.ObservableCollection < org.ovirt.engine.ui.uicommonweb.models.EntityModel > ( ) ; list.add ( new org.ovirt.engine.ui.uicommonweb.models.networks.NetworkGeneralModel ( ) ) ; list.add ( new org.ovirt.engine.ui.uicommonweb.models.networks.NetworkClusterListModel ( ) ) ; list.add ( new org.ovirt.engine.ui.uicommonweb.models.networks.NetworkHostListModel ( ) ) ; list.add ( new org.ovirt.engine.ui.uicommonweb.models.networks.NetworkVmListModel ( ) ) ; list.add ( new org.ovirt.engine.ui.uicommonweb.models.networks.NetworkTemplateListModel ( ) ) ; list.add ( new org.ovirt.engine.ui.uicommonweb.models.configure.PermissionListModel ( ) ) ; setDetailModels ( list ) ; }

Target:
protected void InitDetailModels ( ) { super . InitDetailModels ( ) ; org.ovirt.engine.ui.uicompat.ObservableCollection < org.ovirt.engine.ui.uicommonweb.models.EntityModel > list = new org.ovirt.engine.ui.uicompat.ObservableCollection < org.ovirt.engine.ui.uicommonweb.models.EntityModel > ( ) ; list.add ( new org.ovirt.engine.ui.uicommonweb.models.networks.NetworkGeneralModel ( ) ) ; list.add ( new org.ovirt.engine.ui.uicommonweb.models.networks.NetworkClusterListModel ( ) ) ; list.add ( new org.ovirt.engine.ui.uicommonweb.models.networks.NetworkHostListModel ( ) ) ; list.add ( new org.ovirt.engine.ui.uicommonweb.models.networks.NetworkVmListModel ( ) ) ; list.add ( new org.ovirt.engine.ui.uicommonweb.models.networks.NetworkTemplateListModel ( ) ) ; list.add ( new org.ovirt.engine.ui.uicommonweb.models.configure.PermissionListModel ( ) ) ; setDetailModels ( list ) ; }
Source:
public void testGetNotFound ( ) throws java.lang.Exception { javax.ws.rs.core.UriInfo uriInfo = setUpBasicUriExpectations ( ) ; setUriInfo ( uriInfo ) ; setUpGetEntityExpectations ( 2 ) ; initParetResource ( resource.parent , uriInfo ) ; control.replay ( ) ; try { resource.get ( ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }

Target:
public void testGetNotFound ( ) throws java.lang.Exception { javax.ws.rs.core.UriInfo uriInfo = setUpBasicUriExpectations ( ) ; setUriInfo ( uriInfo ) ; setUpEntityQueryExpectations ( 1 , true ) ; control.replay ( ) ; try { resource.get ( ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }
Source:
private org.ovirt.engine.core.bll.ValidationResult validOrFirstFailure ( org.ovirt.engine.core.bll.validator.storage.MultipleStorageDomainsValidator.ValidatorPredicate predicate ) { for ( java.util.Map.Entry < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.bll.validator.storage.StorageDomainValidator > entry : domainValidators.entrySet ( ) ) { org.ovirt.engine.core.bll.ValidationResult currResult = predicate.evaluate ( entry ) ; if ( ! ( currResult.isValid ( ) ) ) { return currResult ; } } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }

Target:
private org.ovirt.engine.core.bll.ValidationResult validOrFirstFailure ( java.util.function.Function < java.util.Map.Entry < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.bll.validator.storage.StorageDomainValidator > , org.ovirt.engine.core.bll.ValidationResult > predicate ) { for ( java.util.Map.Entry < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.bll.validator.storage.StorageDomainValidator > entry : domainValidators.entrySet ( ) ) { org.ovirt.engine.core.bll.ValidationResult currResult = predicate.apply ( entry ) ; if ( ! ( currResult.isValid ( ) ) ) { return currResult ; } } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }
Source:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel ) ( target ) ) ; model.setDataCentersAndClusters ( model , dataCenters , ( ( java.util.List < org.ovirt.engine.core.common.businessentities.VDSGroup > ) ( returnValue ) ) , vm.getVdsGroupId ( ) ) ; initTemplate ( ) ; initCdImage ( ) ; initSoundCard ( vm.getId ( ) ) ; }

Target:
public void oSType_SelectedItemChanged ( ) { java.lang.Integer osType = getModel ( ) . getOSType ( ) . getSelectedItem ( ) ; if ( osType != null ) { org.ovirt.engine.core.compat.Guid id = ( basedOnCustomInstanceType ( ) ) ? vm.getId ( ) : getModel ( ) . getInstanceTypes ( ) . getSelectedItem ( ) . getId ( ) ; updateVirtioScsiEnabledWithoutDetach ( id , osType ) ; } }
Source:
private void logImportEvents ( ) { org.ovirt.engine.core.common.businessentities.VmStatic vmStaticFromOvf = getVm ( ) . getStaticData ( ) ; org.ovirt.engine.core.utils.ovf.OvfLogEventHandler < org.ovirt.engine.core.common.businessentities.VmStatic > handler = new org.ovirt.engine.core.utils.ovf.VMStaticOvfLogHandler ( vmStaticFromOvf ) ; java.util.Map < java.lang.String , java.lang.String > aliasesValuesMap = handler.getAliasesValuesMap ( ) ; for ( java.util.Map.Entry < java.lang.String , java.lang.String > entry : aliasesValuesMap.entrySet ( ) ) { java.lang.String fieldName = entry.getKey ( ) ; java.lang.String fieldValue = entry.getValue ( ) ; org.ovirt.engine.core.bll.ImportVmCommand.logField ( vmStaticFromOvf , fieldName , fieldValue ) ; } handler.resetDefaults ( org.ovirt.engine.core.bll.ImportVmCommand.vmStaticForDefaultValues ) ; }

Target:
protected void removeVmNetworkInterfaces ( ) { new org.ovirt.engine.core.bll.network.VmInterfaceManager ( org.ovirt.engine.core.bll.ImportVmCommand.getMacPool ( ) ) . removeAll ( getVmId ( ) ) ; }
Source:
protected void executeCommand ( ) { try { addVmToDb ( ) ; org.ovirt.engine.core.common.businessentities.VM vm = getVm ( ) ; if ( ! ( hasSnappableDisks ( vm ) ) ) { endVmRelatedOps ( ) ; } else { processImages ( ) ; } } catch ( java.lang.RuntimeException e ) { org.ovirt.engine.core.bll.MacPoolManager.getInstance ( ) . freeMacs ( macsAdded ) ; throw e ; } setSucceeded ( true ) ; }

Target:
protected void executeCommand ( ) { try { addVmToDb ( ) ; org.ovirt.engine.core.common.businessentities.VM vm = getVm ( ) ; if ( vm.getImages ( ) . isEmpty ( ) ) { endVmRelatedOps ( ) ; } else { processImages ( ) ; } } catch ( java.lang.RuntimeException e ) { org.ovirt.engine.core.bll.MacPoolManager.getInstance ( ) . freeMacs ( macsAdded ) ; throw e ; } setSucceeded ( true ) ; }
Source:
private void vmNetworkSetupTest ( org.hamcrest.Matcher < org.ovirt.engine.core.bll.ValidationResult > matcher , boolean vmNetwork , boolean featureSupported ) { mockConfigRule.mockConfigValue ( ConfigValues.NonVmNetworkSupported , dataCenter.getcompatibility_version ( ) , featureSupported ) ; org.mockito.Mockito.when ( network.isVmNetwork ( ) ) . thenReturn ( vmNetwork ) ; org.junit.Assert.assertThat ( validator.vmNetworkSetCorrectly ( ) , matcher ) ; }

Target:
private void vmNetworkSetupTest ( org.hamcrest.Matcher < org.ovirt.engine.core.bll.ValidationResult > matcher , boolean vmNetwork , boolean featureSupported ) { mockConfigRule.mockConfigValue ( ConfigValues.NonVmNetworkSupported , dataCenter.getCompatibilityVersion ( ) , featureSupported ) ; org.mockito.Mockito.when ( network.isVmNetwork ( ) ) . thenReturn ( vmNetwork ) ; org.junit.Assert.assertThat ( validator.vmNetworkSetCorrectly ( ) , matcher ) ; }
Source:
public static void getAllAttachableDisks ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.compat.Guid vmId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ( ) ; } } ; org.ovirt.engine.core.common.queries.GetAllAttachableDisks params = new org.ovirt.engine.core.common.queries.GetAllAttachableDisks ( storagePoolId ) ; params.setVmId ( vmId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllAttachableDisks , params , aQuery ) ; }

Target:
public void getUpHostListByCluster ( 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.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > list = org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.VDS > cast ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.IVdcQueryable > ) ( source ) ) ) ; return list ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ( ) ; } } ; getUpHostListByCluster ( aQuery , clusterName , null ) ; }
Source:
public int hashCode ( ) { int result = ( ( transport ) != null ) ? transport.hashCode ( ) : 0 ; result = ( 31 * result ) + ( ( name ) != null ? name.hashCode ( ) : 0 ) ; return result ; }

Target:
public boolean equals ( java.lang.Object obj ) { if ( ( this ) == obj ) { return true ; } if ( ! ( obj instanceof org.ovirt.engine.core.notifier.filter.FirstMatchSimpleFilter.Recipient ) ) { return false ; } org.ovirt.engine.core.notifier.filter.FirstMatchSimpleFilter.Recipient other = ( ( org.ovirt.engine.core.notifier.filter.FirstMatchSimpleFilter.Recipient ) ( obj ) ) ; return ( java.util.Objects.equals ( transport , other.transport ) ) && ( java.util.Objects.equals ( name , other.name ) ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.irsbroker.OneUuidReturnForXmlRpc glusterVolumeCreate ( java.lang.String volumeName , java.lang.String [ ] brickList , int replicaCount , int stripeCount , java.lang.String [ ] transportList ) { try { return new org.ovirt.engine.core.vdsbroker.irsbroker.OneUuidReturnForXmlRpc ( vdsServer.glusterVolumeCreate ( volumeName , brickList , replicaCount , stripeCount , transportList ) ) ; } 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 getExternalVmList ( java.lang.String uri , java.lang.String username , java.lang.String password , java.util.List < java.lang.String > vmsNames ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.getExternalVMs ( uri , username , password , vmsNames ) ; 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:
private void logOutputAndErrors ( java.lang.String output , java.lang.String errors ) { if ( ( errors != null ) && ( ( errors.length ( ) ) != 0 ) ) { org.ovirt.engine.core.utils.hostinstall.OpenSslCAWrapper.log.error ( ( "Sign Certificate request script errors:\n" + errors ) ) ; } if ( ( output != null ) && ( ( output.length ( ) ) != 0 ) ) { org.ovirt.engine.core.utils.hostinstall.OpenSslCAWrapper.log.debug ( ( "Sign Certificate request script output:\n" + output ) ) ; } }

Target:
private void logOutputAndErrors ( java.lang.String output , java.lang.String errors ) { if ( ( errors != null ) && ( ( errors.length ( ) ) != 0 ) ) { org.ovirt.engine.core.utils.hostinstall.OpenSslCAWrapper.log.error ( "Sign Certificate request script errors:\n{}" , errors ) ; } if ( ( output != null ) && ( ( output.length ( ) ) != 0 ) ) { org.ovirt.engine.core.utils.hostinstall.OpenSslCAWrapper.log.debug ( "Sign Certificate request script output:\n{}" , output ) ; } }
Source:
public void OnSuccess ( java.lang.Object target , java.lang.Object returnValue ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage_domains > storageDomainList = ( ( java.util.List < org.ovirt.engine.core.common.businessentities.storage_domains > ) ( returnValue ) ) ; if ( ( storageDomainList.size ( ) ) != 0 ) { model.getStorageTypeList ( ) . setIsChangable ( false ) ; model.getStorageTypeList ( ) . getChangeProhibitionReasons ( ) . add ( "Cannot change Repository type with Storage Domains attached to it" ) ; } }

Target:
public void OnSuccess ( java.lang.Object target , java.lang.Object returnValue ) { java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > storageDomainList = ( ( java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > ) ( returnValue ) ) ; if ( ( storageDomainList.size ( ) ) != 0 ) { model.getStorageTypeList ( ) . setChangeProhibitionReason ( "Cannot change Repository type with Storage Domains attached to it" ) ; model.getStorageTypeList ( ) . setIsChangable ( false ) ; } }
Source:
public org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface.NetworkImplementationDetails getNetworkImplementationDetails ( ) { if ( ! ( isAttached ( ) ) ) { return null ; } org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nic = ( hasVlan ( ) ) ? getVlanNic ( ) . getEntity ( ) : getAttachedToNic ( ) . getEntity ( ) ; return nic.getNetworkImplementationDetails ( ) ; }

Target:
public org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface.NetworkImplementationDetails getNetworkImplementationDetails ( ) { if ( ! ( isAttached ( ) ) ) { return null ; } org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nic = ( hasVlan ( ) ) ? getVlanNicModel ( ) . getEntity ( ) : getAttachedToNic ( ) . getEntity ( ) ; return nic.getNetworkImplementationDetails ( ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.network.Network getGlusterNetworkId ( org.ovirt.engine.core.common.businessentities.VdsStatic server , java.lang.String networkAddress ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.Network > allNetworksInCluster = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getNetworkDao ( ) . getAllForCluster ( server.getClusterId ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.network.Network network : allNetworksInCluster ) { if ( ( network.getCluster ( ) . isGluster ( ) ) && ( isSameNetworkAddress ( server.getId ( ) , network.getName ( ) , networkAddress ) ) ) { return network ; } } return null ; }

Target:
private org.ovirt.engine.core.common.businessentities.network.Network getGlusterNetworkId ( org.ovirt.engine.core.common.businessentities.VdsStatic server , java.lang.String networkAddress ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.Network > allNetworksInCluster = org.ovirt.engine.core.di.Injector.get ( org.ovirt.engine.core.dao.network.NetworkDao.class ) . getAllForCluster ( server.getClusterId ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.network.Network network : allNetworksInCluster ) { if ( ( network.getCluster ( ) . isGluster ( ) ) && ( isSameNetworkAddress ( server.getId ( ) , network.getName ( ) , networkAddress ) ) ) { return network ; } } return null ; }
Source:
public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Cluster > list = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Cluster > ) ( source ) ) ; return getClusterByServiceList ( list , supportsVirtService , supportsGlusterService ) ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Cluster > ( ) ; }

Target:
public java.util.List < org.ovirt.engine.core.common.businessentities.Tags > convert ( java.lang.Object source ) { if ( source != null ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Tags > ret = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.Tags tags : ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Tags > ) ( source ) ) ) { if ( ( tags.getType ( ) ) == ( org.ovirt.engine.core.common.businessentities.TagsType.GeneralTag ) ) { ret.add ( tags ) ; } } return ret ; } return new java.util.ArrayList < > ( ) ; }
Source:
public void testGetDiskForAllStorageDomain ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.UnregisteredDisk > unregisteredDisk = dao.getByDiskIdAndStorageDomainId ( FixturesTool.UNREGISTERED_DISK , null ) ; org.junit.Assert.assertTrue ( "Disk should exists in the UnregisteredDisks table" , ( ! ( unregisteredDisk.isEmpty ( ) ) ) ) ; org.junit.Assert.assertTrue ( "Disk should exists in the UnregisteredDisks table" , unregisteredDisk.get ( 0 ) . getVms ( ) . isEmpty ( ) ) ; }

Target:
public void testGetDiskForAllStorageDomain ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.UnregisteredDisk > unregisteredDisk = dao.getByDiskIdAndStorageDomainId ( FixturesTool.UNREGISTERED_DISK , null ) ; org.junit.jupiter.api.Assertions.assertTrue ( ( ! ( unregisteredDisk.isEmpty ( ) ) ) , "Disk should exists in the UnregisteredDisks table" ) ; org.junit.jupiter.api.Assertions.assertTrue ( unregisteredDisk.get ( 0 ) . getVms ( ) . isEmpty ( ) , "Disk should exists in the UnregisteredDisks table" ) ; }
Source:
public org.ovirt.engine.core.bll.ValidationResult qosExistsOrNull ( ) { return ( ( getProfile ( ) . getQosId ( ) ) == null ) || ( ( getDbFacade ( ) . getStorageQosDao ( ) . get ( getProfile ( ) . getQosId ( ) ) ) != null ) ? org.ovirt.engine.core.bll.ValidationResult.VALID : new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.ACTION_TYPE_FAILED_QOS_NOT_FOUND ) ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult qosExistsOrNull ( ) { return ( ( getProfile ( ) . getQosId ( ) ) == null ) || ( ( getDbFacade ( ) . getStorageQosDao ( ) . get ( getProfile ( ) . getQosId ( ) ) ) != null ) ? org.ovirt.engine.core.bll.ValidationResult.VALID : new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_QOS_NOT_FOUND ) ; }
Source:
private void setLangPageShown ( javax.servlet.http.HttpServletResponse response , boolean value ) { javax.servlet.http.Cookie cookie = new javax.servlet.http.Cookie ( org.ovirt.engine.core.utils.servlet.DocsServlet.LANG_PAGE_SHOWN , java.lang.Boolean.toString ( value ) ) ; cookie.setSecure ( true ) ; cookie.setPath ( getServletContext ( ) . getContextPath ( ) ) ; cookie.setHttpOnly ( true ) ; response.addCookie ( cookie ) ; }

Target:
private void setLangPageShown ( javax.servlet.http.HttpServletRequest request , javax.servlet.http.HttpServletResponse response , boolean value ) { javax.servlet.http.Cookie cookie = new javax.servlet.http.Cookie ( org.ovirt.engine.core.utils.servlet.DocsServlet.LANG_PAGE_SHOWN , java.lang.Boolean.toString ( value ) ) ; cookie.setSecure ( "https" . equalsIgnoreCase ( request.getScheme ( ) ) ) ; cookie.setPath ( getServletContext ( ) . getContextPath ( ) ) ; cookie.setHttpOnly ( true ) ; response.addCookie ( cookie ) ; }
Source:
private void Run ( ) { org.ovirt.engine.core.common.businessentities.VM entity = ( ( org.ovirt.engine.core.common.businessentities.VM ) ( getItem ( ) . getEntity ( ) ) ) ; boolean reinitialize = ( ! ( entity.getis_initialized ( ) ) ) && ( org.ovirt.engine.ui.uicommonweb.DataProvider.IsWindowsOsType ( entity.getvm_os ( ) ) ) ; org.ovirt.engine.core.common.action.RunVmParams tempVar = new org.ovirt.engine.core.common.action.RunVmParams ( entity.getId ( ) ) ; tempVar.setReinitialize ( reinitialize ) ; org.ovirt.engine.ui.frontend.Frontend.RunAction ( VdcActionType.RunVm , tempVar ) ; }

Target:
private void Run ( ) { org.ovirt.engine.core.common.businessentities.VM entity = ( ( org.ovirt.engine.core.common.businessentities.VM ) ( getItem ( ) . getEntity ( ) ) ) ; boolean reinitialize = ( ! ( entity.isInitialized ( ) ) ) && ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.IsWindowsOsType ( entity.getVmOs ( ) ) ) ; org.ovirt.engine.core.common.action.RunVmParams tempVar = new org.ovirt.engine.core.common.action.RunVmParams ( entity.getId ( ) ) ; tempVar.setReinitialize ( reinitialize ) ; org.ovirt.engine.ui.frontend.Frontend.RunAction ( VdcActionType.RunVm , tempVar ) ; }
Source:
public org.ovirt.engine.core.common.businessentities.VmDynamic getVmDynamicToSave ( ) { return vmDynamicToSave ; }

Target:
protected void analyze ( ) { proceedDownVms ( ) ; proceedWatchdogEvents ( ) ; proceedBalloonCheck ( ) ; proceedGuaranteedMemoryCheck ( ) ; updateRepository ( ) ; prepareGuestAgentNetworkDevicesForUpdate ( ) ; updateLunDisks ( ) ; updateVmJobs ( ) ; analyzeExternalVms ( ) ; analyzeHostedEngineVm ( ) ; if ( ( vmDynamicToSave ) != null ) { vmsMonitoring.addVmDynamicToList ( vmDynamicToSave ) ; } }
Source:
protected void executeQueryCommand ( ) { org.ovirt.engine.core.common.businessentities.storage_domain_static storage = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStorageDomainStaticDao ( ) . get ( org.ovirt.engine.core.bll.storage.GetVmsFromExportDomainQuery.getParameters ( ) . getStorageDomainId ( ) ) ; if ( ( storage.getstorage_domain_type ( ) ) == ( org.ovirt.engine.core.common.businessentities.StorageDomainType.ImportExport ) ) { org.ovirt.engine.core.common.vdscommands.VDSReturnValue retVal = executeVerb ( ) ; buildOvfReturnValue ( retVal.getReturnValue ( ) ) ; } else { org.ovirt.engine.core.bll.storage.GetVmsFromExportDomainQuery.getQueryReturnValue ( ) . setReturnValue ( new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VM > ( ) ) ; } }

Target:
protected void executeQueryCommand ( ) { org.ovirt.engine.core.common.businessentities.StorageDomainStatic storage = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStorageDomainStaticDao ( ) . get ( org.ovirt.engine.core.bll.storage.GetVmsFromExportDomainQuery.getParameters ( ) . getStorageDomainId ( ) ) ; if ( ( storage.getstorage_domain_type ( ) ) == ( org.ovirt.engine.core.common.businessentities.StorageDomainType.ImportExport ) ) { org.ovirt.engine.core.common.vdscommands.VDSReturnValue retVal = executeVerb ( ) ; buildOvfReturnValue ( retVal.getReturnValue ( ) ) ; } else { org.ovirt.engine.core.bll.storage.GetVmsFromExportDomainQuery.getQueryReturnValue ( ) . setReturnValue ( new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VM > ( ) ) ; } }
Source:
public void updateRepository_MIGRATION_FROM ( org.ovirt.engine.core.vdsbroker.monitoring.VmTestPairs data ) { initMocks ( data , true ) ; org.junit.Assume.assumeNotNull ( data.dbVm ( ) , data.vdsmVm ( ) ) ; org.junit.Assume.assumeTrue ( ( ( data.vdsmVm ( ) . getVmDynamic ( ) . getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.MigratingFrom ) ) ) ; org.mockito.Mockito.verify ( resourceManager , org.mockito.Mockito.never ( ) ) . internalSetVmStatus ( data.dbVm ( ) , VMStatus.MigratingTo ) ; }

Target:
public void updateRepository_MIGRATION_FROM ( org.ovirt.engine.core.vdsbroker.monitoring.VmTestPairs data ) { initMocks ( data , true ) ; org.junit.Assume.assumeNotNull ( data.dbVm ( ) , data.vdsmVm ( ) ) ; org.junit.Assume.assumeTrue ( ( ( data.vdsmVm ( ) . getVmDynamic ( ) . getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.MigratingFrom ) ) ) ; org.mockito.Mockito.verify ( resourceManager , org.mockito.Mockito.never ( ) ) . internalSetVmStatus ( data.dbVm ( ) . getDynamicData ( ) , VMStatus.MigratingTo ) ; }
Source:
private org.ovirt.engine.core.bll.AddQuotaCommand createCommand ( ) { org.ovirt.engine.core.common.action.QuotaCRUDParameters param = new org.ovirt.engine.core.common.action.QuotaCRUDParameters ( mockGeneralStorageQuota ( ) ) ; command = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.AddQuotaCommand ( param , null ) ) ; org.mockito.Mockito.doReturn ( quotaDao ) . when ( command ) . getQuotaDao ( ) ; return command ; }

Target:
private org.ovirt.engine.core.bll.AddQuotaCommand createCommand ( ) { org.ovirt.engine.core.common.action.QuotaCRUDParameters param = new org.ovirt.engine.core.common.action.QuotaCRUDParameters ( mockGeneralStorageQuota ( ) ) ; command = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.AddQuotaCommand ( param , null ) ) ; org.mockito.Mockito.doReturn ( quotaDao ) . when ( command ) . getQuotaDao ( ) ; org.mockito.Mockito.doReturn ( null ) . when ( quotaDao ) . getQuotaByQuotaName ( org.mockito.Matchers.any ( java.lang.String.class ) , org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ; return command ; }
Source:
public void testStart ( ) throws java.lang.Exception { setUriInfo ( setUpActionExpectations ( VdcActionType.RunVm , org.ovirt.engine.core.common.action.RunVmParams.class , new java.lang.String [ ] { "VmId" } , new java.lang.Object [ ] { GUIDS [ 0 ] } ) ) ; javax.ws.rs.core.Response response = resource.start ( new org.ovirt.engine.api.model.Action ( ) ) ; verifyActionResponse ( response ) ; verifyActionModel ( ( ( org.ovirt.engine.api.model.Action ) ( response.getEntity ( ) ) ) . getVm ( ) , 0 ) ; }

Target:
public void testStart ( ) throws java.lang.Exception { setUriInfo ( setUpActionExpectations ( ActionType.RunVm , org.ovirt.engine.core.common.action.RunVmParams.class , new java.lang.String [ ] { "VmId" } , new java.lang.Object [ ] { GUIDS [ 0 ] } ) ) ; javax.ws.rs.core.Response response = resource.start ( new org.ovirt.engine.api.model.Action ( ) ) ; verifyActionResponse ( response ) ; verifyActionModel ( ( ( org.ovirt.engine.api.model.Action ) ( response.getEntity ( ) ) ) . getVm ( ) , 0 ) ; }
Source:
public boolean IsDisplayTypeSupported ( org.ovirt.engine.core.common.businessentities.DisplayType displayType ) { switch ( displayType ) { case vnc : return true ; case qxl : return ( ( clientOsType ( ) . equalsIgnoreCase ( "Windows" ) ) && ( clientBrowserType ( ) . equalsIgnoreCase ( "Explorer" ) ) ) || ( ( clientOsType ( ) . equalsIgnoreCase ( "Linux" ) ) && ( clientBrowserType ( ) . equalsIgnoreCase ( "Firefox" ) ) ) ; } return false ; }

Target:
public boolean isClientWindownsExplorer ( ) { return ( clientOsType ( ) . equalsIgnoreCase ( "Windows" ) ) && ( clientBrowserType ( ) . equalsIgnoreCase ( "Explorer" ) ) ; }
Source:
public java.lang.String toString ( ) { return org.ovirt.engine.core.common.utils.ToStringBuilder.forInstance ( this ) . append ( "storageDomainId" , storageDomainId ) . append ( "imageGroupId" , imageGroupId ) . append ( "baseImageId" , baseImageId ) . append ( "topImageId" , topImageId ) . append ( "generation" , baseImageGeneration ) . build ( ) ; }

Target:
public java.lang.String toString ( ) { return org.ovirt.engine.core.common.utils.ToStringBuilder.forInstance ( this ) . append ( "storageDomainId" , storageDomainId ) . append ( "imageGroupId" , imageGroupId ) . append ( "baseImageId" , baseImageId ) . append ( "topImageId" , topImageId ) . append ( "baseImageGeneration" , baseImageGeneration ) . build ( ) ; }
Source:
public void getVolumesForForceSessionCreate ( ) { this . startProgress ( constants.fetchingDataMessage ( ) ) ; org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery = new org.ovirt.engine.ui.frontend.AsyncQuery ( ) ; _asyncQuery.setModel ( this ) ; _asyncQuery.asyncCallback = new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model , java.lang.Object ReturnValue ) { showAvailableVolumes ( ReturnValue ) ; } } ; org.ovirt.engine.core.common.queries.SearchParameters volumesSearchParameters = new org.ovirt.engine.core.common.queries.SearchParameters ( "Volumes:" , org.ovirt.engine.core.common.interfaces.SearchType.GlusterVolume , false ) ; volumesSearchParameters.setRefresh ( true ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , volumesSearchParameters , _asyncQuery ) ; }

Target:
public void getVolumesForForceSessionCreate ( ) { this . startProgress ( constants.fetchingDataMessage ( ) ) ; org.ovirt.engine.core.common.queries.SearchParameters volumesSearchParameters = new org.ovirt.engine.core.common.queries.SearchParameters ( "Volumes:" , org.ovirt.engine.core.common.interfaces.SearchType.GlusterVolume , false ) ; volumesSearchParameters.setRefresh ( true ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , volumesSearchParameters , new org.ovirt.engine.ui.uicommonweb.models.gluster.AsyncQuery ( new org.ovirt.engine.ui.frontend.AsyncCallback < org.ovirt.engine.core.common.queries.VdcQueryReturnValue > ( ) { @ java.lang.Override public void onSuccess ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue returnValue ) { showAvailableVolumes ( returnValue ) ; } } ) ) ; }
Source:
public static void getClusterList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > list = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ) ( source ) ) ; java.util.Collections.sort ( list , new org.ovirt.engine.core.common.businessentities.comparators.NameableComparator ( ) ) ; return list ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVdsGroupsByStoragePoolId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) , aQuery ) ; }

Target:
public static void isVirtioScsiEnabledForVm ( 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 ) { if ( source != null ) { return ( ( ( java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > ) ( source ) ) . size ( ) ) > 0 ; } return false ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVirtioScsiControllers , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) , aQuery ) ; }
Source:
public int compare ( org.ovirt.engine.core.common.businessentities.VM o1 , org.ovirt.engine.core.common.businessentities.VM o2 ) { return java.lang.Integer.valueOf ( org.ovirt.engine.core.bll.scheduling.policyunits.EvenDistributionBalancePolicyUnit.VmCpuUsageComparator.calculateCpuUsage ( o1 ) ) . compareTo ( org.ovirt.engine.core.bll.scheduling.policyunits.EvenDistributionBalancePolicyUnit.VmCpuUsageComparator.calculateCpuUsage ( o2 ) ) ; }

Target:
protected java.util.List < org.ovirt.engine.core.common.businessentities.VDS > getSecondarySources ( org.ovirt.engine.core.common.businessentities.VDSGroup cluster , java.util.List < org.ovirt.engine.core.common.businessentities.VDS > candidateHosts , java.util.Map < java.lang.String , java.lang.String > parameters ) { long requiredMemory = ( parameters.containsKey ( org.ovirt.engine.core.bll.scheduling.policyunits.LOW_MEMORY_LIMIT_FOR_OVER_UTILIZED ) ) ? java.lang.Long.valueOf ( parameters.get ( org.ovirt.engine.core.bll.scheduling.policyunits.LOW_MEMORY_LIMIT_FOR_OVER_UTILIZED ) ) : 0L ; return getOverUtilizedMemoryHosts ( candidateHosts , requiredMemory ) ; }
Source:
public void saveNICsConfig ( ) { org.ovirt.engine.ui.frontend.Frontend.RunMultipleAction ( VdcActionType.CommitNetworkChanges , new java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > ( java.util.Arrays.asList ( new org.ovirt.engine.core.common.action.VdcActionParametersBase [ ] { new org.ovirt.engine.core.common.action.VdsActionParameters ( getEntity ( ) . getId ( ) ) } ) ) , new org.ovirt.engine.ui.uicompat.IFrontendMultipleActionAsyncCallback ( ) { @ java.lang.Override public void executed ( org.ovirt.engine.ui.uicompat.FrontendMultipleActionAsyncResult result ) { } } , null ) ; }

Target:
public void saveNICsConfig ( ) { org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runMultipleAction ( VdcActionType.CommitNetworkChanges , new java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > ( java.util.Arrays.asList ( new org.ovirt.engine.core.common.action.VdcActionParametersBase [ ] { new org.ovirt.engine.core.common.action.VdsActionParameters ( getEntity ( ) . getId ( ) ) } ) ) , new org.ovirt.engine.ui.uicompat.IFrontendMultipleActionAsyncCallback ( ) { @ java.lang.Override public void executed ( org.ovirt.engine.ui.uicompat.FrontendMultipleActionAsyncResult result ) { } } , null ) ; }
Source:
protected boolean checkCpuSockets ( ) { return org.ovirt.engine.core.bll.AddVmCommand.checkCpuSockets ( org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . getVmStaticData ( ) . getNumOfSockets ( ) , org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . getVmStaticData ( ) . getCpuPerSocket ( ) , org.ovirt.engine.core.bll.AddVmCommand.getVdsGroup ( ) . getCompatibilityVersion ( ) . toString ( ) , org.ovirt.engine.core.bll.AddVmCommand.getReturnValue ( ) . getCanDoActionMessages ( ) ) ; }

Target:
protected boolean checkCpuSockets ( ) { return org.ovirt.engine.core.bll.AddVmCommand.checkCpuSockets ( org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . getVmStaticData ( ) . getNumOfSockets ( ) , org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . getVmStaticData ( ) . getCpuPerSocket ( ) , org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . getVmStaticData ( ) . getThreadsPerCpu ( ) , org.ovirt.engine.core.bll.AddVmCommand.getVdsGroup ( ) . getCompatibilityVersion ( ) . toString ( ) , org.ovirt.engine.core.bll.AddVmCommand.getReturnValue ( ) . getCanDoActionMessages ( ) ) ; }
Source:
public static void getUpHostListByCluster ( 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.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > list = org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.VDS > cast ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.IVdcQueryable > ) ( source ) ) ) ; return list ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ( ) ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getUpHostListByCluster ( aQuery , clusterName , null ) ; }

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

Target:
public void getMaxSpmPriority ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Integer ) ( source ) ) : 0 ; } } ; aQuery.asyncCallback.onSuccess ( aQuery.getModel ( ) , 10 ) ; }
Source:
public java.util.List < org.ovirt.engine.core.common.businessentities.storage.LUNs > executeGetDeviceList ( org.ovirt.engine.core.compat.Guid vdsId , org.ovirt.engine.core.common.businessentities.storage.StorageType storageType ) { org.ovirt.engine.core.common.vdscommands.GetDeviceListVDSCommandParameters parameters = new org.ovirt.engine.core.common.vdscommands.GetDeviceListVDSCommandParameters ( vdsId , storageType ) ; return ( ( java.util.List < org.ovirt.engine.core.common.businessentities.storage.LUNs > ) ( getVdsBroker ( ) . RunVdsCommand ( VDSCommandType.GetDeviceList , parameters ) . getReturnValue ( ) ) ) ; }

Target:
public java.util.List < org.ovirt.engine.core.common.businessentities.storage.LUNs > executeGetDeviceList ( org.ovirt.engine.core.compat.Guid vdsId , org.ovirt.engine.core.common.businessentities.storage.StorageType storageType , java.lang.String lunId ) { org.ovirt.engine.core.common.vdscommands.GetDeviceListVDSCommandParameters parameters = new org.ovirt.engine.core.common.vdscommands.GetDeviceListVDSCommandParameters ( vdsId , storageType , false , java.util.Arrays.asList ( lunId ) ) ; return ( ( java.util.List < org.ovirt.engine.core.common.businessentities.storage.LUNs > ) ( getVdsBroker ( ) . RunVdsCommand ( VDSCommandType.GetDeviceList , parameters ) . getReturnValue ( ) ) ) ; }
Source:
public static org.ovirt.engine.core.common.businessentities.storage_pool buildStoragePool ( org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcStruct xmlRpcStruct ) { org.ovirt.engine.core.common.businessentities.storage_pool sPool = new org.ovirt.engine.core.common.businessentities.storage_pool ( ) ; if ( xmlRpcStruct.contains ( "type" ) ) { sPool.setstorage_pool_type ( org.ovirt.engine.core.common.businessentities.StorageType.valueOf ( xmlRpcStruct.getItem ( "type" ) . toString ( ) ) ) ; } sPool.setname ( org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectsBuilder.AssignStringValue ( xmlRpcStruct , "name" ) ) ; java.lang.Integer masterVersion = org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectsBuilder.AssignIntValue ( xmlRpcStruct , "master_ver" ) ; if ( masterVersion != null ) { sPool.setmaster_domain_version ( masterVersion ) ; } return sPool ; }

Target:
public static org.ovirt.engine.core.common.businessentities.storage_pool buildStoragePool ( java.util.Map < java.lang.String , java.lang.Object > xmlRpcStruct ) { org.ovirt.engine.core.common.businessentities.storage_pool sPool = new org.ovirt.engine.core.common.businessentities.storage_pool ( ) ; if ( xmlRpcStruct.containsKey ( "type" ) ) { sPool.setstorage_pool_type ( org.ovirt.engine.core.common.businessentities.StorageType.valueOf ( xmlRpcStruct.get ( "type" ) . toString ( ) ) ) ; } sPool.setname ( org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectsBuilder.AssignStringValue ( xmlRpcStruct , "name" ) ) ; java.lang.Integer masterVersion = org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectsBuilder.AssignIntValue ( xmlRpcStruct , "master_ver" ) ; if ( masterVersion != null ) { sPool.setmaster_domain_version ( masterVersion ) ; } return sPool ; }
Source:
private void refreshVmStats ( ) { for ( org.ovirt.engine.core.common.utils.Pair < org.ovirt.engine.core.common.businessentities.VM , org.ovirt.engine.core.vdsbroker.vdsbroker.entities.VmInternalData > pair : monitoredVms ) { if ( tryLockVmForUpdate ( pair ) ) { org.ovirt.engine.core.vdsbroker.VmAnalyzer vmAnalyzer = new org.ovirt.engine.core.vdsbroker.VmAnalyzer ( pair.getFirst ( ) , pair.getSecond ( ) , this , org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirectorDelegator.getInstance ( ) ) ; vmAnalyzers.add ( vmAnalyzer ) ; vmAnalyzer.analyze ( ) ; } else { org.ovirt.engine.core.vdsbroker.VmsMonitoring.log.debug ( ( "skipping VM '{}' from this monitoring cycle" + " - the VM is locked by its VmManager " ) , getVmId ( pair ) ) ; } } }

Target:
protected boolean isTimeToUpdateVmStatistics ( ) { return timeToUpdateVmStatistics ; }
Source:
public void testGetByVolumeId ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeSnapshotEntity > snapshots = dao.getAllByVolumeId ( org.ovirt.engine.core.dao.gluster.GlusterVolumeSnapshotDaoTest.VOLUME_ID ) ; org.junit.Assert.assertTrue ( ( snapshots != null ) ) ; org.junit.Assert.assertTrue ( ( ( snapshots.size ( ) ) == 2 ) ) ; org.junit.Assert.assertTrue ( snapshots.contains ( existingSnapshot ) ) ; }

Target:
public void testGetByVolumeId ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeSnapshotEntity > snapshots = dao.getAllByVolumeId ( org.ovirt.engine.core.dao.gluster.GlusterVolumeSnapshotDaoTest.VOLUME_ID ) ; org.junit.Assert.assertNotNull ( snapshots ) ; org.junit.Assert.assertEquals ( 2 , snapshots.size ( ) ) ; org.junit.Assert.assertTrue ( snapshots.contains ( existingSnapshot ) ) ; }
Source:
void forceRefresh ( M model ) { if ( ( model instanceof org.ovirt.engine.ui.uicommonweb.models.SearchableListModel ) && ( ! ( model.getLastExecutedCommand ( ) . getIsCancel ( ) ) ) ) { org.ovirt.engine.ui.uicommonweb.models.SearchableListModel searchableList = ( ( org.ovirt.engine.ui.uicommonweb.models.SearchableListModel ) ( model ) ) ; searchableList.getForceRefreshCommand ( ) . Execute ( ) ; } }

Target:
void forceRefresh ( M model ) { if ( ( model instanceof org.ovirt.engine.ui.uicommonweb.models.SearchableListModel ) && ( ! ( model.getLastExecutedCommand ( ) . getIsCancel ( ) ) ) ) { org.ovirt.engine.ui.uicommonweb.models.SearchableListModel searchableList = ( ( org.ovirt.engine.ui.uicommonweb.models.SearchableListModel ) ( model ) ) ; searchableList.getForceRefreshCommand ( ) . execute ( ) ; } }
Source:
protected boolean setAndValidateCpuProfile ( ) { if ( ( org.ovirt.engine.core.bll.UpdateVmTemplateCommand.getVmTemplate ( ) . getTemplateType ( ) ) == ( org.ovirt.engine.core.common.businessentities.VmEntityType.INSTANCE_TYPE ) ) { return true ; } return validate ( org.ovirt.engine.core.bll.profiles.CpuProfileHelper.setAndValidateCpuProfile ( org.ovirt.engine.core.bll.UpdateVmTemplateCommand.getVmTemplate ( ) , org.ovirt.engine.core.bll.UpdateVmTemplateCommand.getVdsGroup ( ) . getCompatibilityVersion ( ) ) ) ; }

Target:
private boolean isInstanceType ( ) { return ( org.ovirt.engine.core.bll.UpdateVmTemplateCommand.getVmTemplate ( ) . getTemplateType ( ) ) == ( org.ovirt.engine.core.common.businessentities.VmEntityType.INSTANCE_TYPE ) ; }
Source:
public static void IsDirectLunDiskEnabled ( 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.Boolean ) ( source ) ) . booleanValue ( ) : true ; } } ; org.ovirt.engine.core.common.queries.GetConfigurationValueParameters params = new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.DirectLUNDiskEnabled ) ; params.setVersion ( version ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( params , aQuery ) ; }

Target:
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.core.common.config.Config.DefaultConfigurationVersion ) , aQuery ) ; }
Source:
protected boolean validateNumberOfNics ( ) { if ( org.ovirt.engine.core.common.config.Config.< java.lang.Boolean > GetValue ( ConfigValues.LimitNumberOfNetworkInterfaces , getVdsGroup ( ) . getcompatibility_version ( ) . toString ( ) ) ) { if ( ! ( org.ovirt.engine.core.bll.VmCommand.validateNumberOfNics ( getParameters ( ) . getVm ( ) . getInterfaces ( ) , null ) ) ) { return failCanDoAction ( VdcBllMessages.NETWORK_INTERFACE_EXITED_MAX_INTERFACES ) ; } } return true ; }

Target:
protected void saveBaseDisk ( org.ovirt.engine.core.common.businessentities.DiskImage disk ) { getBaseDiskDao ( ) . save ( disk ) ; }
Source:
public void calculateNetworkImplementationDetailsNetworkVmNetworkOutOfSync ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface = createNetworkDevice ( ) ; calculateNetworkImplementationDetailsAndAssertSync ( iface , false , iface.getNetworkName ( ) , ( ! ( iface.isBridged ( ) ) ) , iface.getMtu ( ) , iface.getVlanId ( ) ) ; }

Target:
public void caluculateNetworkImplementationDetailsNetworkInSyncWithoutQos ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface = createNetworkDevice ( ) ; iface.setQos ( null ) ; calculateNetworkImplementationDetailsAndAssertSync ( iface , true , iface.getNetworkName ( ) , iface.isBridged ( ) , iface.getMtu ( ) , iface.getVlanId ( ) , null ) ; }