Skip to content

Commit b5efcf6

Browse files
Added strict, acer and blizzard
1 parent f450739 commit b5efcf6

25 files changed

+23
-14
lines changed
-43 Bytes
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
-205 Bytes
Loading
Binary file not shown.
Binary file not shown.
Binary file not shown.

icons/bugdoctor.png

-205 Bytes
Loading

icons/bugdoctor20.png

1.04 KB
Loading

src/ca/usask/cs/srlab/bugdoctor/Activator.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public void loadDefaultConfigs() {
7373
try {
7474
IEclipsePreferences store = InstanceScope.INSTANCE.getNode("ca.usask.cs.srlab.bugdoctor");
7575

76-
store.put("HOME_DIR", "F:\\MyWorks\\Thesis Works\\PhDThesisTool");
76+
store.put("HOME_DIR", "C:\\MyWorks\\PhDThesisTool");
7777
String HOME_DIR = store.get("HOME_DIR", "C:\\MyWorks\\PhDThesisTool");
7878

7979
store.put("STOPWORD_DIR", HOME_DIR + "/pp-data");

src/ca/usask/cs/srlab/bugdoctor/views/BugDoctorDashboardView.java

+22-13
Original file line numberDiff line numberDiff line change
@@ -176,11 +176,11 @@ protected void initializeHeavyItems() {
176176
logger.info("INDEX_DIR = " + indexDir);
177177

178178
try {
179-
this.entCalc = new EntropyCalc(SELECTED_REPOSITORY, indexDir, corpusDir);
179+
// this.entCalc = new EntropyCalc(SELECTED_REPOSITORY, indexDir, corpusDir);
180180
// loading the model
181-
if (QDModelLoader.rfModelMap.isEmpty()) {
182-
QDModelLoader.loadRFModels();
183-
}
181+
/*
182+
* if (QDModelLoader.rfModelMap.isEmpty()) { QDModelLoader.loadRFModels(); }
183+
*/
184184

185185
// load class rank keys
186186
if (keyFileMap.isEmpty()) {
@@ -481,7 +481,6 @@ public void run() {
481481

482482
// populate and highlight
483483
populateResultsToTable(entities);
484-
485484
}
486485
});
487486
}
@@ -511,21 +510,31 @@ public void widgetSelected(SelectionEvent e) {
511510
IEclipsePreferences store = InstanceScope.INSTANCE.getNode("ca.usask.cs.srlab.bugdoctor");
512511
int bugID = store.getInt("SELECTED_BUGID", 0);
513512
String repoName = store.get("SELECTED_REPOSITORY", "eclipse.jdt.debug");
513+
qd.config.StaticData.HOME_DIR = StaticData.HOME_DIR;
514514
String indexFolder = store.get("INDEX_DIR", "default_index");
515515
String repoSourceFolder = store.get("REPOSITORY_SRC_DIRECTORY", "default_repo_src");
516+
516517
String searchQuery = input.getText();
517-
CodeRankQueryExpansionProvider crProvider = new CodeRankQueryExpansionProvider(repoName, bugID,
518-
searchQuery, indexFolder, repoSourceFolder, entCalc);
519-
String bestQuery = crProvider.getExtendedQuery(StaticData.BR_NL_QR_LEN);
518+
String bestQuery = new String();
519+
520+
if (acerButton.getSelection() && acerButton.getEnabled()) {
521+
CodeRankQueryExpansionProvider crProvider = new CodeRankQueryExpansionProvider(repoName, bugID,
522+
searchQuery, indexFolder, repoSourceFolder);
523+
bestQuery = crProvider.getExtendedQuery(StaticData.BR_NL_QR_LEN);
524+
} else if (bladerButton.getSelection() && bladerButton.getEnabled()) {
525+
// getting the blader query
526+
}
520527

521528
ArrayList<Result> extendedKeywords = new ArrayList<>();
529+
// adding the title result
522530
String normalizedTitle = new blizzard.text.normalizer.TextNormalizer(searchQuery).normalizeSimple();
523531
Result titleResult = new Result();
524532
titleResult.token = normalizedTitle;
525533
titleResult.totalScore = 1.00;
526-
// extendedKeywords.add(titleResult);
527-
ArrayList<String> keywords = qd.utility.MiscUtility.str2List(bestQuery);
534+
extendedKeywords.add(titleResult);
528535

536+
// adding the keywords
537+
ArrayList<String> keywords = qd.utility.MiscUtility.str2List(bestQuery);
529538
for (int index = 1; index < keywords.size(); index++) {
530539
String keyword = keywords.get(index);
531540
double relevance = 1 - (double) index / keywords.size();
@@ -541,7 +550,6 @@ public void widgetSelected(SelectionEvent e) {
541550
@Override
542551
public void widgetDefaultSelected(SelectionEvent e) {
543552
// TODO Auto-generated method stub
544-
545553
}
546554
});
547555

@@ -653,10 +661,11 @@ public void run() {
653661
String bugDoctorQuery = new String();
654662

655663
ArrayList<Result> suggestedKeywords = new ArrayList<Result>();
656-
int startIndex = 0;
664+
int startIndex = 1;
657665

658666
// concepts mode of BugDoctor
659667
if (strictButton.getSelection() && strictButton.getEnabled()) {
668+
qd.config.StaticData.HOME_DIR = store.get("HOME_DIR", "default_home");
660669
strict.ca.usask.cs.srlab.strict.config.StaticData.STOPWORD_DIR = store.get("STOPWORD_DIR",
661670
"default_stopword");
662671
strict.ca.usask.cs.srlab.strict.config.StaticData.SAMURAI_DIR = store.get("SAMURAI_DIR",
@@ -666,7 +675,7 @@ public void run() {
666675

667676
SearchTermProvider stProvider = new SearchTermProvider(SELECTED_REPOSITORY, bugID, title,
668677
bugReport);
669-
String bestQuery = stProvider.deliverBestQuery(entCalc);
678+
String bestQuery = stProvider.deliverBestQuery();
670679
System.out.println(bestQuery);
671680
bugDoctorQuery = bestQuery;
672681
}
-205 Bytes
Loading
Loading

0 commit comments

Comments
 (0)