public static void AddWordFromTagCloud(string query, string header, string word)
        {
            var sb = new StringBuilder();

            sb.AppendLine("Select a tag.");
            DataCollectionLogEventHandlers.WriteInfoLogMessage("TagCloud", sb.ToString());
        }
        public static void TagCloudShowing(string query)
        {
            var sb = new StringBuilder();

            sb.Append("Render a tag cloud.");
            DataCollectionLogEventHandlers.WriteInfoLogMessage("TagCloud", sb.ToString());
        }
Exemple #3
0
 public static void SelectingRecommendationItem(Object sender, int rank)
 {
     if (rank > 0)
     {
         if (sender != null)
         {
             DataCollectionLogEventHandlers.WriteInfoLogMessage(sender.GetType().ToString(), "Recommendation item selected: SelectedRecommendationRank=" + rank);
         }
     }
 }
 public static void AddSearchTermsToOriginal(IReformedQuery query)
 {
     if (!query.OriginalQueryString.Equals(query.QueryString))
     {
         var sb = new StringBuilder();
         sb.Append("Add search terms automatically.");
         sb.Append(CreateReformedQueryMessage(query));
         DataCollectionLogEventHandlers.WriteInfoLogMessage("Post-search recommendation", sb.ToString());
     }
 }
 public static void SelectSwumRecommendation(string query)
 {
     if (query.Trim().Split().Count() == 1)
     {
         DataCollectionLogEventHandlers.WriteInfoLogMessage("Pre-search recommendation", "Identifier");
     }
     else
     {
         DataCollectionLogEventHandlers.WriteInfoLogMessage("Pre-search recommendation", "Verb-DO pair");
     }
 }
 public static void IssueRecommendedQueries(IReformedQuery[] allQueries)
 {
     if (allQueries.Any())
     {
         var sb = new StringBuilder();
         sb.Append("Created links.");
         sb.Append(allQueries.Select(CreateReformedQueryMessage).Aggregate
                       ((n1, n2) => n1 + n2));
         DataCollectionLogEventHandlers.WriteInfoLogMessage("Post-search recommendation",
                                                            sb.ToString());
     }
 }
Exemple #7
0
        public static void OpeningCodeSearchResult(CodeSearchResult result, int rank, string queryMatchDescription)
        {
            string lang       = "OtherLang";
            var    resultFile = result.FileName;

            if (resultFile.EndsWith(".cs"))
            {
                lang = "C#";
            }
            if (resultFile.EndsWith(".cpp") || resultFile.EndsWith(".c") || resultFile.EndsWith(".h") || resultFile.EndsWith(".cc"))
            {
                lang = "C++";
            }
            DataCollectionLogEventHandlers.WriteInfoLogMessage("FileOpener", "User double-clicked a result: TypeOfResult=" + result.ProgramElementType.ToString() +
                                                               ", QueryToResultSimilarityDescription=" + queryMatchDescription +
                                                               ", ResultLanguage=" + lang +
                                                               ", ResultLuceneScore=" + result.Score +
                                                               ", DoubleClickedResultRank=" + rank);
        }
Exemple #8
0
 public static void SolutionOpened(Object sender, string solutionName)
 {
     DataCollectionLogEventHandlers.UploadLogFiles();
     DataCollectionLogEventHandlers.WriteInfoLogMessage(sender.GetType().ToString(), "Solution opened: SolutionHash=" + solutionName.GetHashCode());
 }
Exemple #9
0
 public static void SelectingCodeSearchResult(Object sender, int rank)
 {
     DataCollectionLogEventHandlers.WriteInfoLogMessage(sender.GetType().ToString(), "User single-clicked a result: SingleClickedResultRank=" + rank);
 }
Exemple #10
0
 public static void HighlightingNpe(Object sender)
 {
     DataCollectionLogEventHandlers.WriteInfoLogMessage(sender.GetType().ToString(), "Problem during query highlighting: A result was generated that has no summary.");
 }
Exemple #11
0
 public static void InvalidCharactersInQuery(Object sender)
 {
     DataCollectionLogEventHandlers.WriteInfoLogMessage(sender.GetType().ToString(), "Query Error: Invalid characters found in query, search aborted.");
 }
Exemple #12
0
 public static void PostSearch(Object sender, int numOfResults, int maxNumOfResults, double avgscore, double stddevscore)
 {
     DataCollectionLogEventHandlers.WriteInfoLogMessage(sender.GetType().ToString(), "Sando returned results: NumberOfResults=" + numOfResults + ", MaxNumberOfResultsPossible=" + maxNumOfResults);
     DataCollectionLogEventHandlers.WriteInfoLogMessage(sender.GetType().ToString(), "Post retrieval metrics: AvgScore=" + avgscore + ", StdDevScore=" + stddevscore);
 }
Exemple #13
0
 public static void PreSearch(Object sender, double maxidf, double avgidf, double avgsqc, double avgvar)
 {
     DataCollectionLogEventHandlers.WriteInfoLogMessage(sender.GetType().ToString(), "Pre retrieval metrics: MaxIDF=" + maxidf + ", AvgIDF=" + avgidf + ", AvgSQC=" + avgsqc + ", AvgVAR=" + avgvar);
 }
Exemple #14
0
 public static void PreSearchQueryAnalysis(Object sender, string queryDescription, double diceCoeff)
 {
     DataCollectionLogEventHandlers.WriteInfoLogMessage(sender.GetType().ToString(), "Query submitted by user: QueryDescription=" + queryDescription + " ; DiceCoefficientToPreviousQuery=" + diceCoeff);
 }
 public static void SelectHistoryItem()
 {
     DataCollectionLogEventHandlers.WriteInfoLogMessage("Pre-search recommendation", "History");
 }
 public static void SelectRecommendedQuery(String query, int index)
 {
     DataCollectionLogEventHandlers.WriteInfoLogMessage("Post-search recommendation",
                                                        "Clicked link: " + index);
 }