auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
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 ) ; }

Target:
public void getGlusterHooks ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? source : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterHooks , new org.ovirt.engine.core.common.queries.gluster.GlusterParameters ( clusterId ) , aQuery ) ; }
Source:
protected void updateDataCenterVersion ( ) { org.ovirt.engine.ui.frontend.AsyncQuery query = new org.ovirt.engine.ui.frontend.AsyncQuery ( this , new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.VmDiskListModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.VmDiskListModel ) ( target ) ) ; org.ovirt.engine.core.common.businessentities.StoragePool storagePool = ( ( org.ovirt.engine.core.common.businessentities.StoragePool ) ( returnValue ) ) ; model.setDataCenterVersion ( storagePool.getcompatibility_version ( ) ) ; } } ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getDataCenterById ( query , getEntity ( ) . getStoragePoolId ( ) ) ; }

Target:
protected void updateDataCenterVersion ( ) { org.ovirt.engine.ui.frontend.AsyncQuery query = new org.ovirt.engine.ui.frontend.AsyncQuery ( this , new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.VmDiskListModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.VmDiskListModel ) ( target ) ) ; org.ovirt.engine.core.common.businessentities.StoragePool storagePool = ( ( org.ovirt.engine.core.common.businessentities.StoragePool ) ( returnValue ) ) ; model.setDataCenterVersion ( storagePool.getCompatibilityVersion ( ) ) ; } } ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getDataCenterById ( query , getEntity ( ) . getStoragePoolId ( ) ) ; }
Source:
private static void removeNumberOfDevices ( java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > devices , int numberOfDevicesToRemove ) { int size = devices.size ( ) ; for ( int index = 1 ; index <= numberOfDevicesToRemove ; index ++ ) { if ( size >= index ) { org.ovirt.engine.core.bll.utils.VmDeviceUtils.dao.remove ( devices.get ( ( size - index ) ) . getId ( ) ) ; } } }

Target:
public static void removeVmDevices ( java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > devices , int numberOfDevicesToRemove ) { int size = devices.size ( ) ; for ( int index = 1 ; index <= numberOfDevicesToRemove ; index ++ ) { if ( size >= index ) { org.ovirt.engine.core.bll.utils.VmDeviceUtils.dao.remove ( devices.get ( ( size - index ) ) . getId ( ) ) ; } } }
Source:
public static void getTemplateById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid templateId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVmTemplate , new org.ovirt.engine.core.common.queries.GetVmTemplateParameters ( templateId ) , aQuery ) ; }

Target:
public static void getStorageDomainById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storageDomainId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( org.ovirt.engine.core.common.businessentities.StorageDomain ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetStorageDomainById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( storageDomainId ) , aQuery ) ; }
Source:
public void testGetAllWithQuery ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterServerService > services = dao.getAllWithQuery ( ( ( "select * from gluster_server_services where status = '" + ( GlusterServiceStatus.STOPPED.name ( ) ) ) + "'" ) ) ; org.junit.Assert.assertTrue ( ( services != null ) ) ; org.junit.Assert.assertTrue ( ( ( services.size ( ) ) == 1 ) ) ; verifyServiceOnServer2 ( services.get ( 0 ) ) ; }

Target:
public void testGetAllWithQuery ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterServerService > services = dao.getAllWithQuery ( ( ( "select * from gluster_server_services_view where status = '" + ( GlusterServiceStatus.STOPPED.name ( ) ) ) + "'" ) ) ; org.junit.Assert.assertTrue ( ( services != null ) ) ; org.junit.Assert.assertTrue ( ( ( services.size ( ) ) == 1 ) ) ; verifyServiceOnServer2 ( services.get ( 0 ) ) ; }
Source:
public java.util.HashMap < java.lang.String , java.lang.String > getPmSecondaryOptionsMap ( ) { if ( ( ( ! ( isEntityModelEmpty ( getPmSecondaryIp ( ) ) ) ) || ( ! ( isEntityModelEmpty ( getPmSecondaryUserName ( ) ) ) ) ) || ( ! ( isEntityModelEmpty ( getPmSecondaryPassword ( ) ) ) ) ) { return getPmOptionsMapInternal ( getPmSecondaryPort ( ) , getPmSecondarySlot ( ) , getPmSecondarySecure ( ) , getPmSecondaryOptions ( ) ) ; } return new java.util.HashMap < java.lang.String , java.lang.String > ( ) ; }

Target:
private void updatePmModels ( ) { boolean isPm = getIsPm ( ) . getEntity ( ) ; getPmProxyPreferencesList ( ) . setIsChangeable ( getIsPm ( ) . getEntity ( ) ) ; getDisableAutomaticPowerManagement ( ) . setIsValid ( true ) ; getDisableAutomaticPowerManagement ( ) . setIsChangeable ( isPm ) ; getFenceAgentListModel ( ) . setIsChangeable ( isPm ) ; getPmKdumpDetection ( ) . setIsChangeable ( isPm ) ; getFenceAgentListModel ( ) . setIsChangeable ( isPm ) ; getFenceAgentListModel ( ) . setHost ( this ) ; }
Source:
protected org.ovirt.engine.ui.uicommonweb.models.datacenters.NetworkClusterModel createNetworkClusterModel ( org.ovirt.engine.core.common.businessentities.VDSGroup cluster ) { if ( cluster.getId ( ) . equals ( this . cluster.getId ( ) ) ) { org.ovirt.engine.ui.uicommonweb.models.datacenters.NetworkClusterModel networkClusterModel = new org.ovirt.engine.ui.uicommonweb.models.datacenters.NetworkClusterModel ( cluster ) ; networkClusterModel.setAttached ( true ) ; networkClusterModel.setIsChangable ( false ) ; return networkClusterModel ; } else { return super . createNetworkClusterModel ( cluster ) ; } }

Target:
protected org.ovirt.engine.ui.uicommonweb.models.datacenters.NetworkClusterModel createNetworkClusterModel ( org.ovirt.engine.core.common.businessentities.VDSGroup cluster ) { if ( cluster.getId ( ) . equals ( this . cluster.getId ( ) ) ) { org.ovirt.engine.ui.uicommonweb.models.datacenters.NetworkClusterModel networkClusterModel = new org.ovirt.engine.ui.uicommonweb.models.datacenters.NetworkClusterModel ( cluster ) ; networkClusterModel.setAttached ( true ) ; networkClusterModel.setRequired ( ( ! ( ( java.lang.Boolean ) ( getExport ( ) . getEntity ( ) ) ) ) ) ; networkClusterModel.setIsChangable ( false ) ; return networkClusterModel ; } else { return super . createNetworkClusterModel ( cluster ) ; } }
Source:
public void testExtraVariables ( ) { java.lang.String command = createCommand ( new org.ovirt.engine.core.common.utils.ansible.AnsibleCommandBuilder ( ) . variables ( new org.ovirt.engine.core.common.utils.Pair ( "a" , "1" ) , new org.ovirt.engine.core.common.utils.Pair ( "b" , "2" ) , new org.ovirt.engine.core.common.utils.Pair ( "c" , "3" ) ) . playbook ( org.ovirt.engine.core.common.utils.ansible.AnsibleCommandBuilderTest.ANSIBLE_PLAYBOOK ) ) ; org.junit.Assert.assertEquals ( join ( AnsibleCommandBuilder.ANSIBLE_COMMAND , org.ovirt.engine.core.common.utils.ansible.AnsibleCommandBuilderTest.ANSIBLE_LOG_LEVEL , org.ovirt.engine.core.common.utils.ansible.AnsibleCommandBuilderTest.PRIVATE_KEY , "--extra-vars=a=1" , "--extra-vars=b=2" , "--extra-vars=c=3" , org.ovirt.engine.core.common.utils.ansible.AnsibleCommandBuilderTest.ANSIBLE_PLAYBOOK_FULL_PATH ) , command ) ; }

Target:
public void testExtraVariables ( ) { java.lang.String command = createCommand ( new org.ovirt.engine.core.common.utils.ansible.AnsibleCommandBuilder ( ) . variables ( new org.ovirt.engine.core.common.utils.Pair ( "a" , "1" ) , new org.ovirt.engine.core.common.utils.Pair ( "b" , "2" ) , new org.ovirt.engine.core.common.utils.Pair ( "c" , "3" ) ) . playbook ( org.ovirt.engine.core.common.utils.ansible.AnsibleCommandBuilderTest.ANSIBLE_PLAYBOOK ) ) ; org.junit.Assert.assertEquals ( join ( AnsibleCommandBuilder.ANSIBLE_COMMAND , org.ovirt.engine.core.common.utils.ansible.AnsibleCommandBuilderTest.IGNORE_SSH_CONFIG , org.ovirt.engine.core.common.utils.ansible.AnsibleCommandBuilderTest.ANSIBLE_LOG_LEVEL , org.ovirt.engine.core.common.utils.ansible.AnsibleCommandBuilderTest.PRIVATE_KEY , "--extra-vars=a=1" , "--extra-vars=b=2" , "--extra-vars=c=3" , org.ovirt.engine.core.common.utils.ansible.AnsibleCommandBuilderTest.ANSIBLE_PLAYBOOK_FULL_PATH ) , command ) ; }
Source:
private static void removeUsbControllers ( org.ovirt.engine.core.common.businessentities.VmBase vm ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > list = org.ovirt.engine.core.bll.utils.VmDeviceUtils.dao.getVmDeviceByVmIdTypeAndDevice ( vm.getId ( ) , VmDeviceGeneralType.CONTROLLER , VmDeviceType.USB.getName ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.VmDevice vmDevice : list ) { org.ovirt.engine.core.bll.utils.VmDeviceUtils.dao.remove ( vmDevice.getId ( ) ) ; } }

Target:
public static java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > getUsbControllers ( org.ovirt.engine.core.compat.Guid vmId ) { return org.ovirt.engine.core.bll.utils.VmDeviceUtils.dao.getVmDeviceByVmIdTypeAndDevice ( vmId , VmDeviceGeneralType.CONTROLLER , VmDeviceType.USB.getName ( ) ) ; }
Source:
public void getProviderCertificateChain ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.common.businessentities.Provider provider ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return java.util.Collections.< org.ovirt.engine.core.common.businessentities.CertificateInfo > emptyList ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetProviderCertificateChain , new org.ovirt.engine.core.common.queries.ProviderQueryParameters ( provider ) , aQuery ) ; }

Target:
public void getCinderVolumeTypesList ( org.ovirt.engine.ui.frontend.AsyncQuery < java.util.List < org.ovirt.engine.core.common.businessentities.storage.CinderVolumeType > > aQuery , org.ovirt.engine.core.compat.Guid storageDomainId ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.CastingConverter < > ( ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetCinderVolumeTypesByStorageDomainId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( storageDomainId ) , aQuery ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc glusterVolumeSnapshotDelete ( java.lang.String volumeName ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "GlusterVolume.snapshotDelete" ) . withParameter ( "volumeName" , volumeName ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( response ) ; }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc glusterVolumeSnapshotDelete ( java.lang.String volumeName ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "GlusterVolume.snapshotDeleteAll" ) . withParameter ( "volumeName" , volumeName ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( response ) ; }
Source:
protected void verifyAddDelegatedCorrectly ( org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface iface , org.mockito.verification.VerificationMode addMacVerification ) { org.mockito.Mockito.verify ( macPoolManager , addMacVerification ) . forceAddMac ( iface.getMacAddress ( ) ) ; org.mockito.Mockito.verify ( vmNicDao ) . save ( iface ) ; org.mockito.Mockito.verify ( vmNetworkStatisticsDAO ) . save ( iface.getStatistics ( ) ) ; }

Target:
protected void verifyRemoveAllDelegatedCorrectly ( org.ovirt.engine.core.common.businessentities.network.VmNic iface ) { org.mockito.Mockito.verify ( macPoolManager , org.mockito.Mockito.times ( 1 ) ) . freeMac ( iface.getMacAddress ( ) ) ; org.mockito.Mockito.verify ( vmNicDao ) . remove ( iface.getId ( ) ) ; org.mockito.Mockito.verify ( vmNetworkStatisticsDAO ) . remove ( iface.getId ( ) ) ; }
Source:
public java.util.List < org.ovirt.engine.api.model.Statistic > getStatistics ( org.ovirt.engine.core.common.businessentities.VdsNetworkInterface iface ) { org.ovirt.engine.core.common.businessentities.NetworkStatistics s = iface.getStatistics ( ) ; return asList ( setDatum ( clone ( org.ovirt.engine.api.restapi.resource.HostNicStatisticalQuery.DATA_RX ) , s.getReceiveRate ( ) ) , setDatum ( clone ( org.ovirt.engine.api.restapi.resource.HostNicStatisticalQuery.DATA_TX ) , s.getTransmitRate ( ) ) , setDatum ( clone ( org.ovirt.engine.api.restapi.resource.HostNicStatisticalQuery.ERRS_RX ) , s.getReceiveDropRate ( ) ) , setDatum ( clone ( org.ovirt.engine.api.restapi.resource.HostNicStatisticalQuery.ERRS_TX ) , s.getTransmitDropRate ( ) ) ) ; }

Target:
public java.util.List < org.ovirt.engine.api.model.Statistic > getStatistics ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface ) { org.ovirt.engine.core.common.businessentities.network.NetworkStatistics s = iface.getStatistics ( ) ; return asList ( setDatum ( clone ( org.ovirt.engine.api.restapi.resource.HostNicStatisticalQuery.DATA_RX ) , s.getReceiveRate ( ) ) , setDatum ( clone ( org.ovirt.engine.api.restapi.resource.HostNicStatisticalQuery.DATA_TX ) , s.getTransmitRate ( ) ) , setDatum ( clone ( org.ovirt.engine.api.restapi.resource.HostNicStatisticalQuery.ERRS_RX ) , s.getReceiveDropRate ( ) ) , setDatum ( clone ( org.ovirt.engine.api.restapi.resource.HostNicStatisticalQuery.ERRS_TX ) , s.getTransmitDropRate ( ) ) ) ; }
Source:
public org.ovirt.engine.core.common.eventqueue.EventResult call ( ) { org.ovirt.engine.core.common.eventqueue.EventResult result = null ; if ( _domainsInProblem.containsKey ( domainId ) ) { org.ovirt.engine.core.vdsbroker.irsbroker.IrsProxyData.log.info ( ( "starting processDomainRecovery for domain " + ( org.ovirt.engine.core.vdsbroker.irsbroker.IrsProxyData.getDomainIdTuple ( domainId ) ) ) ) ; result = processDomainRecovery ( domainId ) ; } _timers.remove ( domainId ) ; return result ; }

Target:
private void updateDomainInProblemData ( org.ovirt.engine.core.compat.Guid domainId , org.ovirt.engine.core.compat.Guid vdsId , java.lang.String vdsName ) { org.ovirt.engine.core.vdsbroker.irsbroker.IrsProxyData.log.debug ( "domain '{}' still in problem. vds: '{}'" , org.ovirt.engine.core.vdsbroker.irsbroker.IrsProxyData.getDomainIdTuple ( domainId ) , vdsName ) ; _domainsInProblem.get ( domainId ) . add ( vdsId ) ; }
Source:
protected boolean canDoAction ( ) { org.ovirt.engine.core.bll.validator.VnicProfileValidator validator = new org.ovirt.engine.core.bll.validator.VnicProfileValidator ( org.ovirt.engine.core.bll.network.vm.UpdateVnicProfileCommand.getVnicProfile ( ) ) ; return ( ( ( ( validate ( validator.vnicProfileIsSet ( ) ) ) && ( validate ( validator.vnicProfileExists ( ) ) ) ) && ( validate ( validator.networkExists ( ) ) ) ) && ( validate ( validator.vnicProfileNameNotUsed ( ) ) ) ) && ( validate ( validator.networkNotChanged ( ) ) ) ; }

Target:
protected boolean canDoAction ( ) { org.ovirt.engine.core.bll.validator.VnicProfileValidator validator = new org.ovirt.engine.core.bll.validator.VnicProfileValidator ( org.ovirt.engine.core.bll.network.vm.UpdateVnicProfileCommand.getVnicProfile ( ) ) ; return ( ( ( ( validate ( validator.vnicProfileIsSet ( ) ) ) && ( validate ( validator.vnicProfileExists ( ) ) ) ) && ( validate ( validator.vnicProfileNameNotUsed ( ) ) ) ) && ( validate ( validator.networkNotChanged ( ) ) ) ) && ( validate ( validator.portMirroringNotChangedIfUsedByVms ( ) ) ) ; }
Source:
protected org.ovirt.engine.core.compat.Guid lookupClusterId ( org.ovirt.engine.api.model.VM vm ) { return vm.getCluster ( ) . isSetId ( ) ? asGuid ( vm.getCluster ( ) . getId ( ) ) : getEntity ( org.ovirt.engine.core.common.businessentities.VDSGroup.class , SearchType.Cluster , ( "Cluster: name=" + ( vm.getCluster ( ) . getName ( ) ) ) ) . getId ( ) ; }

Target:
protected org.ovirt.engine.core.compat.Guid lookupClusterId ( org.ovirt.engine.api.model.VM vm ) { return vm.getCluster ( ) . isSetId ( ) ? asGuid ( vm.getCluster ( ) . getId ( ) ) : getEntity ( org.ovirt.engine.core.common.businessentities.VDSGroup.class , VdcQueryType.GetVdsGroupByName , new org.ovirt.engine.core.common.queries.NameQueryParameters ( vm.getCluster ( ) . getName ( ) ) , ( "Cluster: name=" + ( vm.getCluster ( ) . getName ( ) ) ) ) . getId ( ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc sendHcCmdToDesktop ( java.lang.String vmId , java.lang.String hcCommand ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.sendHcCmdToDesktop ( vmId , hcCommand ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc glusterHookRemove ( java.lang.String glusterCommand , java.lang.String stage , java.lang.String hookName ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.glusterHookRemove ( glusterCommand , stage , hookName ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
Source:
public java.util.List < org.ovirt.engine.core.common.businessentities.network.NetworkQoS > Convert ( java.lang.Object returnValue , org.ovirt.engine.ui.frontend.AsyncQuery asyncQuery ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.NetworkQoS > qosList = ( returnValue == null ) ? new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.NetworkQoS > ( ) : ( ( java.util.List < org.ovirt.engine.core.common.businessentities.network.NetworkQoS > ) ( returnValue ) ) ; qosList.add ( 0 , NetworkQoSModel.EMPTY_QOS ) ; return qosList ; }

Target:
public java.util.List < org.ovirt.engine.core.common.businessentities.network.NetworkQoS > convert ( java.lang.Object returnValue , org.ovirt.engine.ui.frontend.AsyncQuery asyncQuery ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.NetworkQoS > qosList = ( returnValue == null ) ? new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.NetworkQoS > ( ) : ( ( java.util.List < org.ovirt.engine.core.common.businessentities.network.NetworkQoS > ) ( returnValue ) ) ; qosList.add ( 0 , NetworkQoSModel.EMPTY_QOS ) ; return qosList ; }
Source:
protected void executeQueryCommand ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmTemplate > vmTemplates = org.ovirt.engine.core.bll.GetTemplatesRelatedToQuotaIdQuery.getDbFacade ( ) . getVmTemplateDao ( ) . getAllTemplatesRelatedToQuotaId ( org.ovirt.engine.core.bll.GetTemplatesRelatedToQuotaIdQuery.getParameters ( ) . getId ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.VmTemplate vmTemplate : vmTemplates ) { org.ovirt.engine.core.bll.VmTemplateHandler.updateDisksFromDb ( vmTemplate ) ; } org.ovirt.engine.core.bll.GetTemplatesRelatedToQuotaIdQuery.getQueryReturnValue ( ) . setReturnValue ( vmTemplates ) ; }

Target:
protected void executeQueryCommand ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmTemplate > vmTemplates = vmTemplateDao.getAllTemplatesRelatedToQuotaId ( org.ovirt.engine.core.bll.GetTemplatesRelatedToQuotaIdQuery.getParameters ( ) . getId ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.VmTemplate vmTemplate : vmTemplates ) { org.ovirt.engine.core.bll.VmTemplateHandler.updateDisksFromDb ( vmTemplate ) ; } org.ovirt.engine.core.bll.GetTemplatesRelatedToQuotaIdQuery.getQueryReturnValue ( ) . setReturnValue ( vmTemplates ) ; }
Source:
public void testBasicConstructors ( ) { org.ovirt.engine.core.compat.TimeSpan span = new org.ovirt.engine.core.compat.TimeSpan ( 10 , 10 , 10 ) ; assertEquals ( "hours1" , 10 , span.Hours ) ; assertEquals ( "minutes1" , 10 , span.Minutes ) ; assertEquals ( "seconds1" , 10 , span.Seconds ) ; assertEquals ( "days1" , 0 , span.Days ) ; assertEquals ( "miliseconds" , 0 , span.Milliseconds ) ; }

Target:
public void testBasicConstructors ( ) { org.ovirt.engine.core.compat.TimeSpan span = new org.ovirt.engine.core.compat.TimeSpan ( 10 , 10 , 10 ) ; org.junit.Assert.assertEquals ( "hours1" , 10 , span.Hours ) ; org.junit.Assert.assertEquals ( "minutes1" , 10 , span.Minutes ) ; org.junit.Assert.assertEquals ( "seconds1" , 10 , span.Seconds ) ; org.junit.Assert.assertEquals ( "days1" , 0 , span.Days ) ; org.junit.Assert.assertEquals ( "miliseconds" , 0 , span.Milliseconds ) ; }
Source:
private static java.lang.String TranslateBoolValue ( java.lang.String value ) { java.lang.String result ; if ( ( value.equalsIgnoreCase ( org.ovirt.engine.core.utils.pm.VdsFenceOptions.TRUE_STRING ) ) || ( value.equalsIgnoreCase ( org.ovirt.engine.core.utils.pm.VdsFenceOptions.FALSE_STRING ) ) ) { if ( java.lang.Boolean.parseBoolean ( value ) ) { result = org.ovirt.engine.core.utils.pm.VdsFenceOptions.YES ; } else { result = org.ovirt.engine.core.utils.pm.VdsFenceOptions.NO ; } } else { result = value ; } return result ; }

Target:
private static java.lang.String translateBoolValue ( java.lang.String value ) { java.lang.String result ; if ( ( value.equalsIgnoreCase ( org.ovirt.engine.core.utils.pm.VdsFenceOptions.TRUE_STRING ) ) || ( value.equalsIgnoreCase ( org.ovirt.engine.core.utils.pm.VdsFenceOptions.FALSE_STRING ) ) ) { if ( java.lang.Boolean.parseBoolean ( value ) ) { result = org.ovirt.engine.core.utils.pm.VdsFenceOptions.YES ; } else { result = org.ovirt.engine.core.utils.pm.VdsFenceOptions.NO ; } } else { result = value ; } return result ; }
Source:
protected void updateMemoryBalloon ( ) { if ( ( getModel ( ) . getSelectedCluster ( ) ) != null ) { updateMemoryBalloon ( getModel ( ) . getSelectedCluster ( ) . getcompatibility_version ( ) ) ; } }

Target:
protected void updateMemoryBalloon ( ) { org.ovirt.engine.core.common.businessentities.VDSGroup cluster = getModel ( ) . getSelectedCluster ( ) ; java.lang.Integer osType = getModel ( ) . getOSType ( ) . getSelectedItem ( ) ; if ( ( cluster != null ) && ( osType != null ) ) { updateMemoryBalloon ( cluster.getCompatibilityVersion ( ) , osType ) ; } }
Source:
public void testGet ( ) throws java.lang.Exception { setUpEntityQueryExpectations ( VdcQueryType.GetNetworkById , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendClusterNetworkResourceTest.NETWORK_ID } , getEntity ( 0 ) ) ; verifyModel ( resource.get ( ) , 0 ) ; }

Target:
public void testUpdate ( ) throws java.lang.Exception { setUpEntityQueryExpectations ( 1 , false , false , false , false ) ; setUpEntityQueryExpectations ( 1 , true , true , true , true ) ; setUpClusterExpectations ( GUIDS [ 1 ] ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.UpdateNetworkOnCluster , org.ovirt.engine.core.common.action.NetworkClusterParameters.class , new java.lang.String [ ] { } , new java.lang.Object [ ] { } , true , true ) ) ; verifyUpdate ( resource.update ( getModel ( 0 ) ) ) ; }
Source:
private void UpdateVmTemplate ( ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmTemplateDao ( ) . update ( org.ovirt.engine.core.bll.UpdateVmTemplateCommand.getVmTemplate ( ) ) ; org.ovirt.engine.core.bll.utils.VmDeviceUtils.updateSmartcardDevice ( org.ovirt.engine.core.bll.UpdateVmTemplateCommand.getVmTemplateId ( ) , org.ovirt.engine.core.bll.UpdateVmTemplateCommand.getParameters ( ) . getVmTemplateData ( ) . isSmartcardEnabled ( ) ) ; }

Target:
private void UpdateVmTemplate ( ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmTemplateDao ( ) . update ( org.ovirt.engine.core.bll.UpdateVmTemplateCommand.getVmTemplate ( ) ) ; org.ovirt.engine.core.bll.utils.VmDeviceUtils.updateSmartcardDevice ( org.ovirt.engine.core.bll.UpdateVmTemplateCommand.getVmTemplateId ( ) , org.ovirt.engine.core.bll.UpdateVmTemplateCommand.getParameters ( ) . getVmTemplateData ( ) . isSmartcardEnabled ( ) ) ; org.ovirt.engine.core.bll.utils.VmDeviceUtils.updateAudioDevice ( mOldTemplate , org.ovirt.engine.core.bll.UpdateVmTemplateCommand.getVmTemplate ( ) , org.ovirt.engine.core.bll.UpdateVmTemplateCommand.getVdsGroup ( ) . getcompatibility_version ( ) , org.ovirt.engine.core.bll.UpdateVmTemplateCommand.getParameters ( ) . isSoundDeviceEnabled ( ) ) ; }
Source:
protected void proceedProxyReturnValue ( ) { org.ovirt.engine.core.common.errors.VdcBllErrors returnStatus = getReturnValueFromStatus ( org.ovirt.engine.core.vdsbroker.vdsbroker.CreateStoragePoolVDSCommand.getReturnStatus ( ) ) ; switch ( returnStatus ) { case StorageDomainAccessError : org.ovirt.engine.core.vdsbroker.vdsbroker.CreateStoragePoolVDSCommand.getVDSReturnValue ( ) . setSucceeded ( false ) ; org.ovirt.engine.core.common.errors.VDSError tempVar = new org.ovirt.engine.core.common.errors.VDSError ( ) ; tempVar.setCode ( VdcBllErrors.StorageDomainAccessError ) ; tempVar.setMessage ( org.ovirt.engine.core.vdsbroker.vdsbroker.CreateStoragePoolVDSCommand.getReturnStatus ( ) . mMessage ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.CreateStoragePoolVDSCommand.getVDSReturnValue ( ) . setVdsError ( tempVar ) ; break ; default : super . proceedProxyReturnValue ( ) ; initializeVdsError ( returnStatus ) ; break ; } }

Target:
protected void proceedProxyReturnValue ( ) { org.ovirt.engine.core.common.errors.EngineError returnStatus = getReturnValueFromStatus ( org.ovirt.engine.core.vdsbroker.vdsbroker.CreateStoragePoolVDSCommand.getReturnStatus ( ) ) ; switch ( returnStatus ) { case StorageDomainAccessError : org.ovirt.engine.core.vdsbroker.vdsbroker.CreateStoragePoolVDSCommand.getVDSReturnValue ( ) . setSucceeded ( false ) ; org.ovirt.engine.core.common.errors.VDSError tempVar = new org.ovirt.engine.core.common.errors.VDSError ( ) ; tempVar.setCode ( EngineError.StorageDomainAccessError ) ; tempVar.setMessage ( org.ovirt.engine.core.vdsbroker.vdsbroker.CreateStoragePoolVDSCommand.getReturnStatus ( ) . mMessage ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.CreateStoragePoolVDSCommand.getVDSReturnValue ( ) . setVdsError ( tempVar ) ; break ; default : super . proceedProxyReturnValue ( ) ; initializeVdsError ( returnStatus ) ; break ; } }
Source:
public void testAddIncompleteParameters ( ) { org.ovirt.engine.api.model.InstanceType model = new org.ovirt.engine.api.model.InstanceType ( ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; try { collection.add ( model ) ; org.junit.jupiter.api.Assertions.fail ( "expected WebApplicationException on incomplete parameters" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyIncompleteException ( wae , "InstanceType" , "add" , "name" ) ; } }

Target:
public void testAddIncompleteParameters ( ) { org.ovirt.engine.api.model.InstanceType model = new org.ovirt.engine.api.model.InstanceType ( ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; verifyIncompleteException ( org.junit.jupiter.api.Assertions.assertThrows ( javax.ws.rs.WebApplicationException.class , ( ) -> org.ovirt.engine.api.restapi.resource.collection.add ( model ) ) , "InstanceType" , "add" , "name" ) ; }
Source:
public void setBrickListModel ( org.ovirt.engine.ui.uicommonweb.models.gluster.VolumeBrickListModel brickListModel ) { this . brickListModel = brickListModel ; }

Target:
private void setDetailList ( final org.ovirt.engine.ui.uicommonweb.models.gluster.VolumeGeneralModel volumeGeneralModel , final org.ovirt.engine.ui.uicommonweb.models.gluster.VolumeParameterListModel volumeParameterListModel , final org.ovirt.engine.ui.uicommonweb.models.configure.PermissionListModel permissionListModel , final org.ovirt.engine.ui.uicommonweb.models.gluster.VolumeEventListModel volumeEventListModel ) { java.util.List < org.ovirt.engine.ui.uicommonweb.models.EntityModel > list = new java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.EntityModel > ( ) ; list.add ( volumeGeneralModel ) ; list.add ( volumeParameterListModel ) ; list.add ( getBrickListModel ( ) ) ; list.add ( getGeoRepListModel ( ) ) ; list.add ( permissionListModel ) ; list.add ( volumeEventListModel ) ; setDetailModels ( list ) ; }
Source:
public void dispose ( ) { org.ovirt.engine.core.vdsbroker.VdsManager.log.info ( "vdsManager::disposing" ) ; org.ovirt.engine.core.utils.timer.SchedulerUtilQuartzImpl.getInstance ( ) . deleteJob ( onTimerJobId ) ; org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcUtils.shutDownConnection ( ( ( org.ovirt.engine.core.vdsbroker.vdsbroker.VdsServerWrapper ) ( _vdsProxy ) ) . getHttpClient ( ) ) ; }

Target:
public void dispose ( ) { org.ovirt.engine.core.vdsbroker.VdsManager.log.info ( "vdsManager::disposing" ) ; org.ovirt.engine.core.utils.timer.SchedulerUtilQuartzImpl.getInstance ( ) . deleteJob ( onTimerJobId ) ; if ( org.ovirt.engine.core.vdsbroker.vdsbroker.VdsServerWrapper.class . isInstance ( _vdsProxy ) ) { org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcUtils.shutDownConnection ( ( ( org.ovirt.engine.core.vdsbroker.vdsbroker.VdsServerWrapper ) ( _vdsProxy ) ) . getHttpClient ( ) ) ; } else { ( ( org.ovirt.engine.core.vdsbroker.jsonrpc.JsonRpcVdsServer ) ( _vdsProxy ) ) . close ( ) ; } }
Source:
public org.ovirt.engine.core.dal.VdcBllMessages validate ( org.ovirt.engine.core.common.businessentities.VDS vds , java.lang.StringBuilder sb , boolean isMigrate ) { if ( ( ( vds.getcpu_cores ( ) ) != null ) && ( ( getVm ( ) . getNumOfCpus ( ) ) > ( vds.getcpu_cores ( ) ) ) ) { sb.append ( "has less cores(" ) . append ( vds.getcpu_cores ( ) ) . append ( ") than " ) . append ( getVm ( ) . getNumOfCpus ( ) ) ; return org.ovirt.engine.core.dal.VdcBllMessages.ACTION_TYPE_FAILED_VDS_VM_CPUS ; } return null ; }

Target:
public static java.lang.Integer getEffectiveCpuCores ( org.ovirt.engine.core.common.businessentities.VDS vds ) { org.ovirt.engine.core.common.businessentities.VDSGroup vdsGroup = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVdsGroupDao ( ) . get ( vds.getvds_group_id ( ) ) ; if ( ( ( ( vds.getCpuThreads ( ) ) != null ) && ( vdsGroup != null ) ) && ( java.lang.Boolean.TRUE.equals ( vdsGroup.getCountThreadsAsCores ( ) ) ) ) { return vds.getCpuThreads ( ) ; } else { return vds.getcpu_cores ( ) ; } }
Source:
protected boolean validateNoDuplicateVm ( ) { org.ovirt.engine.core.common.businessentities.VmStatic duplicateVm = getVmStaticDAO ( ) . get ( getVm ( ) . getId ( ) ) ; if ( duplicateVm != null ) { addCanDoActionMessage ( VdcBllMessages.VM_CANNOT_IMPORT_VM_EXISTS ) ; addCanDoActionMessage ( java.lang.String.format ( "$VmName %1$s" , duplicateVm.getName ( ) ) ) ; return false ; } return true ; }

Target:
protected boolean validateNoDuplicateVm ( ) { org.ovirt.engine.core.common.businessentities.VmStatic duplicateVm = org.ovirt.engine.core.bll.ImportVmCommand.getVmStaticDAO ( ) . get ( getVm ( ) . getId ( ) ) ; if ( duplicateVm != null ) { addCanDoActionMessage ( VdcBllMessages.VM_CANNOT_IMPORT_VM_EXISTS ) ; addCanDoActionMessage ( java.lang.String.format ( "$VmName %1$s" , duplicateVm.getName ( ) ) ) ; return false ; } return true ; }
Source:
public java.util.Map < java.lang.String , java.lang.String > getJobMessageProperties ( ) { if ( ( jobProperties ) == null ) { jobProperties = super . getJobMessageProperties ( ) ; jobProperties.put ( VdcObjectType.StoragePool.name ( ) . toLowerCase ( ) , org.ovirt.engine.core.bll.storage.StorageHandlingCommandBase.getStoragePoolName ( ) ) ; jobProperties.put ( VdcObjectType.VDS.name ( ) . toLowerCase ( ) , org.ovirt.engine.core.bll.storage.StorageHandlingCommandBase.getVdsName ( ) ) ; } return jobProperties ; }

Target:
public java.util.Map < java.lang.String , java.lang.String > getJobMessageProperties ( ) { if ( ( jobProperties ) == null ) { jobProperties = super . getJobMessageProperties ( ) ; jobProperties.put ( VdcObjectType.StoragePool.name ( ) . toLowerCase ( ) , org.ovirt.engine.core.bll.storage.StorageHandlingCommandBase.getStoragePoolName ( ) ) ; jobProperties.put ( VdcObjectType.Storage.name ( ) . toLowerCase ( ) , org.ovirt.engine.core.bll.storage.StorageHandlingCommandBase.getStorageDomainName ( ) ) ; jobProperties.put ( VdcObjectType.VDS.name ( ) . toLowerCase ( ) , org.ovirt.engine.core.bll.storage.StorageHandlingCommandBase.getVdsName ( ) ) ; } return jobProperties ; }
Source:
protected org.ovirt.engine.api.model.Host postPopulate ( org.ovirt.engine.api.model.Host from ) { while ( ( from.getPort ( ) ) == 0 ) { from.setPort ( org.ovirt.engine.api.restapi.types.MappingTestHelper.rand ( 65535 ) ) ; } from.setProtocol ( org.ovirt.engine.api.restapi.types.MappingTestHelper.shuffle ( org.ovirt.engine.api.model.HostProtocol.class ) . value ( ) ) ; from.getSpm ( ) . setPriority ( 3 ) ; return from ; }

Target:
protected org.ovirt.engine.api.model.Host postPopulate ( org.ovirt.engine.api.model.Host from ) { while ( ( from.getPort ( ) ) == 0 ) { from.setPort ( org.ovirt.engine.api.restapi.types.MappingTestHelper.rand ( 65535 ) ) ; } from.setProtocol ( org.ovirt.engine.api.restapi.types.MappingTestHelper.shuffle ( org.ovirt.engine.api.model.HostProtocol.class ) . value ( ) ) ; from.getSpm ( ) . setPriority ( 3 ) ; from.getPowerManagement ( ) . setPmProxies ( new org.ovirt.engine.api.model.PmProxies ( ) ) ; return from ; }
Source:
private void MovePoolToProblematicInDB ( org.ovirt.engine.core.common.businessentities.storage_pool storagePool , boolean resetSpmInDB ) { org.ovirt.engine.core.vdsbroker.ResourceManager.getInstance ( ) . getEventListener ( ) . storagePoolStatusChange ( storagePool.getId ( ) , StoragePoolStatus.Problematic , AuditLogType.SYSTEM_CHANGE_STORAGE_POOL_STATUS_PROBLEMATIC , VdcBllErrors.ENGINE ) ; if ( resetSpmInDB ) { storagePool.setspm_vds_id ( null ) ; org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStoragePoolDao ( ) . update ( storagePool ) ; } }

Target:
private void movePoolToProblematicInDB ( org.ovirt.engine.core.common.businessentities.storage_pool storagePool , boolean resetSpmInDB ) { org.ovirt.engine.core.vdsbroker.ResourceManager.getInstance ( ) . getEventListener ( ) . storagePoolStatusChange ( storagePool.getId ( ) , StoragePoolStatus.Problematic , AuditLogType.SYSTEM_CHANGE_STORAGE_POOL_STATUS_PROBLEMATIC , VdcBllErrors.ENGINE ) ; if ( resetSpmInDB ) { storagePool.setspm_vds_id ( null ) ; org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStoragePoolDao ( ) . update ( storagePool ) ; } }
Source:
protected org.ovirt.engine.core.common.utils.ToStringBuilder appendAttributes ( org.ovirt.engine.core.common.utils.ToStringBuilder tsb ) { return super . appendAttributes ( tsb ) . append ( "srcHost" , getSrcHost ( ) ) . append ( "dstVdsId" , getDstVdsId ( ) ) . append ( "dstHost" , getDstHost ( ) ) . append ( "migrationMethod" , getMigrationMethod ( ) ) . append ( "tunnelMigration" , isTunnelMigration ( ) ) . append ( "migrationDowntime" , getMigrationDowntime ( ) ) . append ( "autoConverge" , getAutoConverge ( ) ) . append ( "migrateCompressed" , getMigrateCompressed ( ) ) ; }

Target:
protected org.ovirt.engine.core.common.utils.ToStringBuilder appendAttributes ( org.ovirt.engine.core.common.utils.ToStringBuilder tsb ) { return super . appendAttributes ( tsb ) . append ( "srcHost" , getSrcHost ( ) ) . append ( "dstVdsId" , getDstVdsId ( ) ) . append ( "dstHost" , getDstHost ( ) ) . append ( "migrationMethod" , getMigrationMethod ( ) ) . append ( "tunnelMigration" , isTunnelMigration ( ) ) . append ( "migrationDowntime" , getMigrationDowntime ( ) ) . append ( "autoConverge" , getAutoConverge ( ) ) . append ( "migrateCompressed" , getMigrateCompressed ( ) ) . append ( "consoleAddress" , getConsoleAddress ( ) ) ; }
Source:
protected boolean canDoAction ( ) { if ( ( org.ovirt.engine.core.bll.pm.VdsKdumpDetectionCommand.getVds ( ) . getKdumpStatus ( ) ) != ( org.ovirt.engine.core.common.businessentities.KdumpStatus.ENABLED ) ) { addCanDoActionMessage ( EngineMessage.KDUMP_DETECTION_NOT_CONFIGURED_ON_VDS ) ; return false ; } boolean detectionEnabled = org.ovirt.engine.core.bll.pm.VdsKdumpDetectionCommand.getVds ( ) . isPmKdumpDetection ( ) ; if ( ! detectionEnabled ) { addCanDoActionMessage ( EngineMessage.KDUMP_DETECTION_NOT_ENABLED_FOR_VDS ) ; } return detectionEnabled ; }

Target:
protected boolean validate ( ) { if ( ( org.ovirt.engine.core.bll.pm.VdsKdumpDetectionCommand.getVds ( ) . getKdumpStatus ( ) ) != ( org.ovirt.engine.core.common.businessentities.KdumpStatus.ENABLED ) ) { addValidationMessage ( EngineMessage.KDUMP_DETECTION_NOT_CONFIGURED_ON_VDS ) ; return false ; } boolean detectionEnabled = org.ovirt.engine.core.bll.pm.VdsKdumpDetectionCommand.getVds ( ) . isPmKdumpDetection ( ) ; if ( ! detectionEnabled ) { addValidationMessage ( EngineMessage.KDUMP_DETECTION_NOT_ENABLED_FOR_VDS ) ; } return detectionEnabled ; }
Source:
private java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity > getBricks ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity > bricks = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity > ( ) ; org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity brick = new org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity ( ) ; brick.setId ( GUIDS [ 0 ] ) ; brick.setServerId ( org.ovirt.engine.api.restapi.resource.gluster.BackendGlusterBricksResourceTest.serverId ) ; brick.setServerName ( org.ovirt.engine.api.restapi.resource.gluster.BackendGlusterBricksResourceTest.serverName ) ; brick.setVolumeId ( org.ovirt.engine.api.restapi.resource.gluster.BackendGlusterBricksResourceTest.volumeId ) ; brick.setBrickDirectory ( org.ovirt.engine.api.restapi.resource.gluster.BackendGlusterBricksResourceTest.brickDir ) ; bricks.add ( brick ) ; return bricks ; }

Target:
private java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity > getBricks ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity > bricks = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity > ( ) ; org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity brick = new org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity ( ) ; brick.setId ( GUIDS [ 0 ] ) ; brick.setServerId ( org.ovirt.engine.api.restapi.resource.gluster.GlusterTestHelper.serverId ) ; brick.setServerName ( org.ovirt.engine.api.restapi.resource.gluster.BackendGlusterBricksResourceTest.serverName ) ; brick.setVolumeId ( org.ovirt.engine.api.restapi.resource.gluster.GlusterTestHelper.volumeId ) ; brick.setBrickDirectory ( org.ovirt.engine.api.restapi.resource.gluster.GlusterTestHelper.brickDir ) ; bricks.add ( brick ) ; return bricks ; }
Source:
protected static int getNumOfPrestartedVmsInPool ( org.ovirt.engine.core.compat.Guid poolId , java.util.ArrayList < java.lang.String > messages ) { java.util.List < org.ovirt.engine.core.common.businessentities.VM > vmsInPool = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmDao ( ) . getAllForVmPool ( poolId ) ; int numOfPrestartedVmsInPool = 0 ; if ( vmsInPool != null ) { for ( org.ovirt.engine.core.common.businessentities.VM vm : vmsInPool ) { if ( ( vm.isStartingOrUp ( ) ) && ( org.ovirt.engine.core.bll.VmPoolCommandBase.canAttachPrestartedVmToUser ( vm.getId ( ) , messages ) ) ) { ++ numOfPrestartedVmsInPool ; } } } return numOfPrestartedVmsInPool ; }

Target:
protected static int getNumOfPrestartedVmsInPool ( org.ovirt.engine.core.common.businessentities.VmPool pool , java.util.ArrayList < java.lang.String > messages ) { java.util.List < org.ovirt.engine.core.common.businessentities.VM > vmsInPool = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmDao ( ) . getAllForVmPool ( pool.getVmPoolId ( ) ) ; int numOfPrestartedVmsInPool = 0 ; if ( vmsInPool != null ) { for ( org.ovirt.engine.core.common.businessentities.VM vm : vmsInPool ) { if ( ( vm.isStartingOrUp ( ) ) && ( org.ovirt.engine.core.bll.VmPoolCommandBase.canAttachPrestartedVmToUser ( vm.getId ( ) , pool.isStateful ( ) , messages ) ) ) { ++ numOfPrestartedVmsInPool ; } } } return numOfPrestartedVmsInPool ; }
Source:
private void fetchDiskProfiles ( ) { org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetDiskProfilesByStorageDomainId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( this . getEntity ( ) . getId ( ) ) , new org.ovirt.engine.ui.frontend.AsyncQuery ( new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model1 , java.lang.Object returnValue1 ) { org.ovirt.engine.ui.uicommonweb.models.profiles.DiskProfileListModel.this . setItems ( ( ( java.util.List < org.ovirt.engine.core.common.businessentities.profiles.DiskProfile > ) ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue1 ) ) . getReturnValue ( ) ) ) ) ; } } ) ) ; }

Target:
protected org.ovirt.engine.ui.uicommonweb.models.profiles.RemoveProfileModel < org.ovirt.engine.core.common.businessentities.profiles.DiskProfile > getRemoveProfileModel ( ) { return new org.ovirt.engine.ui.uicommonweb.models.profiles.RemoveDiskProfileModel ( this , getSelectedItems ( ) ) ; }
Source:
public static void getVmListByClusterName ( 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 ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VM > vms = org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.VM > cast ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.IVdcQueryable > ) ( source ) ) ) ; return vms ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( ( "Vms: cluster=" + clusterName ) , org.ovirt.engine.core.common.interfaces.SearchType.VM ) , aQuery ) ; }

Target:
public static void getVmNicList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ) ( source ) ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmInterfacesByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }
Source:
protected boolean checkImagesStatus ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > disksToCheck = org.ovirt.engine.core.bll.storage.disk.image.DisksFilter.filterImageDisks ( org.ovirt.engine.core.bll.storage.lsm.LiveMigrateVmDisksCommand.getDiskDao ( ) . getAllForVm ( org.ovirt.engine.core.bll.storage.lsm.LiveMigrateVmDisksCommand.getVmId ( ) ) , org.ovirt.engine.core.bll.storage.disk.image.DisksFilter.ONLY_NOT_SHAREABLE , org.ovirt.engine.core.bll.storage.disk.image.DisksFilter.ONLY_ACTIVE ) ; org.ovirt.engine.core.bll.validator.storage.DiskImagesValidator diskImagesValidator = new org.ovirt.engine.core.bll.validator.storage.DiskImagesValidator ( disksToCheck ) ; return ( validate ( diskImagesValidator.diskImagesNotLocked ( ) ) ) && ( validate ( diskImagesValidator.diskImagesHaveNotExceededMaxNumberOfVolumesInImageChain ( ) ) ) ; }

Target:
protected boolean checkImagesStatus ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > disksToCheck = org.ovirt.engine.core.bll.storage.disk.image.DisksFilter.filterImageDisks ( diskDao.getAllForVm ( org.ovirt.engine.core.bll.storage.lsm.LiveMigrateVmDisksCommand.getVmId ( ) ) , org.ovirt.engine.core.bll.storage.disk.image.DisksFilter.ONLY_NOT_SHAREABLE , org.ovirt.engine.core.bll.storage.disk.image.DisksFilter.ONLY_ACTIVE ) ; org.ovirt.engine.core.bll.validator.storage.DiskImagesValidator diskImagesValidator = new org.ovirt.engine.core.bll.validator.storage.DiskImagesValidator ( disksToCheck ) ; return ( validate ( diskImagesValidator.diskImagesNotLocked ( ) ) ) && ( validate ( diskImagesValidator.diskImagesHaveNotExceededMaxNumberOfVolumesInImageChain ( ) ) ) ; }
Source:
public void onSearchableModelActivation ( org.ovirt.engine.ui.userportal.section.main.presenter.SearchableModelActivationEvent event ) { org.ovirt.engine.ui.uicommonweb.models.SearchableListModel currentModel = modelProvider.getModel ( ) ; if ( ( event.getListModel ( ) ) == currentModel ) { currentModel.getSearchCommand ( ) . execute ( ) ; } else { currentModel.setItems ( null ) ; currentModel.ensureAsyncSearchStopped ( ) ; } }

Target:
public void onSearchableModelActivation ( org.ovirt.engine.ui.userportal.section.main.presenter.SearchableModelActivationEvent event ) { org.ovirt.engine.ui.uicommonweb.models.SearchableListModel currentModel = modelProvider.getModel ( ) ; if ( ( event.getListModel ( ) ) == currentModel ) { currentModel.getSearchCommand ( ) . execute ( ) ; } else { currentModel.setItems ( null ) ; currentModel.stopRefresh ( ) ; } }