src/main/java/ch/uzh/ifi/seal/ase/cscc/index/KaVeRecommender.java
@Override
    public Set<Tuple<IMethodName, Double>> query(IndexDocument query) {
        processQuery(query);
        Set<Tuple<IMethodName, Double>> result = new LinkedHashSet<>();
        final int CANDIDATES_TO_SUGGEST = 3;
        // get the top three
        for (ScoredIndexDocument scoreDoc : scoredCandidates.subList(0, Math.min(CANDIDATES_TO_SUGGEST, scoredCandidates.size()))) {
            IMethodName methodName = new MethodName(scoreDoc.getMethodCall());
            Double score = scoreDoc.getScore1();
            Tuple<IMethodName, Double> tuple = Tuple.newTuple(methodName, score);
            result.add(tuple);
        }
        return result;
    }
/**
     * Use the recommender-specific query format to query proposals.
     * This is the recommended way to get code completions.
     *
     * @param query the query in a format specfic to the recommender
     * @return a sorted set of the proposed methods plus probability
     */
Use the recommender-specific query format to query proposals.
This is the recommended way to get code completions.

@param query the query in a format specfic to the recommender
@return a sorted set of the proposed methods plus probability
Use the recommender - specific query format to query proposals . This is the recommended way to get code completions . @param query the query in a format specfic to the recommender @return a sorted set of the proposed methods plus probability
@Override
    public Set<Tuple<IMethodName, Double>> query(IndexDocument query) {
        processQuery(query);
        Set<Tuple<IMethodName, Double>> result = new LinkedHashSet<>();
        final int CANDIDATES_TO_SUGGEST = 3;
        for (ScoredIndexDocument scoreDoc : scoredCandidates.subList(0, Math.min(CANDIDATES_TO_SUGGEST, scoredCandidates.size()))) {
            IMethodName methodName = new MethodName(scoreDoc.getMethodCall());
            Double score = scoreDoc.getScore1();
            Tuple<IMethodName, Double> tuple = Tuple.newTuple(methodName, score);
            result.add(tuple);
        }
        return result;
    }
@ Override public Set < Tuple < IMethodName , Double > > query ( IndexDocument query ) { processQuery ( query ) ; Set < Tuple < IMethodName , Double > > result = new LinkedHashSet < > ( ) ; final int CANDIDATES_TO_SUGGEST = 3 ; for ( ScoredIndexDocument scoreDoc : scoredCandidates . subList ( 0 , Math . min ( CANDIDATES_TO_SUGGEST , scoredCandidates . size ( ) ) ) ) { IMethodName methodName = new MethodName ( scoreDoc . getMethodCall ( ) ) ; Double score = scoreDoc . getScore1 ( ) ; Tuple < IMethodName , Double > tuple = Tuple . newTuple ( methodName , score ) ; result . add ( tuple ) ; } return result ; }
Use the recommender-specific query format to query proposals.
Use the recommender - specific query format to query proposals .
// get the top three