private double GetProbability(CallSite site)
        {
            var nodeName = SmilePBNRecommenderConstants.NewReceiverCallSite(site);
            var nodeId   = ConvertToLegalSmileName(nodeName);

            return(_network.GetNodeValue(nodeId)[0]);
        }
        public CoReProposal[] Query(Query query)
        {
            _network.ClearAllEvidence();
            _queriedMethods.Clear();

            AddEvidenceIfAvailable(_classContextHandle, SmilePBNRecommenderConstants.NewClassContext(query.classCtx));
            AddEvidenceIfAvailable(_methodContextHandle, SmilePBNRecommenderConstants.NewMethodContext(query.methodCtx));
            AddEvidenceIfAvailable(_definitionHandle, SmilePBNRecommenderConstants.NewDefinition(query.definition));

            foreach (var site in query.sites)
            {
                AddCallSiteEvidenceIfAvailable(site);
            }

            _network.UpdateBeliefs();

            return(CollectProposals());
        }