Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the bug introduced when merging the PRs (processing the conflicts). #126

Merged
merged 4 commits into from
Dec 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions data/ccfAbbrFull.js
Original file line number Diff line number Diff line change
Expand Up @@ -252,8 +252,8 @@ ccf.abbrFull = {
PLDI: "ACM SIGPLAN SYMPOSIUM ON PROGRAMMING LANGUAGE DESIGN & IMPLEMENTATION",
POPL: "ACM SIGPLAN-SIGACT SYMPOSIUM ON PRINCIPLES OF PROGRAMMING LANGUAGES",
"FSE/ESEC":
"ACM SIGSOFT SYMPOSIUM ON THE FOUNDATION OF SOFTWARE ENGINEERING/ EUROPEAN SOFTWARE ENGINEERING CONFERENCE",
"FSE ":
"ACM SIGSOFT SYMPOSIUM ON THE FOUNDATION OF SOFTWARE ENGINEERING/EUROPEAN SOFTWARE ENGINEERING CONFERENCE",
"FSE":
"ACM INTERNATIONAL CONFERENCE ON THE FOUNDATIONS OF SOFTWARE ENGINEERING",
SOSP: "ACM SYMPOSIUM ON OPERATING SYSTEMS PRINCIPLES",
OOPSLA:
Expand Down
2 changes: 1 addition & 1 deletion data/ccfFullUrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ ccf.fullUrl = {
"/conf/pldi/pldi",
"ACM SIGPLAN-SIGACT SYMPOSIUM ON PRINCIPLES OF PROGRAMMING LANGUAGES":
"/conf/popl/popl",
"ACM SIGSOFT SYMPOSIUM ON THE FOUNDATION OF SOFTWARE ENGINEERING/ EUROPEAN SOFTWARE ENGINEERING CONFERENCE":
"ACM SIGSOFT SYMPOSIUM ON THE FOUNDATION OF SOFTWARE ENGINEERING/EUROPEAN SOFTWARE ENGINEERING CONFERENCE":
"/conf/sigsoft/fse",
"ACM INTERNATIONAL CONFERENCE ON THE FOUNDATIONS OF SOFTWARE ENGINEERING":
"/conf/sigsoft/fse",
Expand Down
2 changes: 1 addition & 1 deletion data/ccfRankAbbr.js
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ ccf.rankAbbrName = {
"/journals/pacmpl/pacmpl": "PACM PL",
"/conf/pldi/pldi": "PLDI",
"/conf/popl/popl": "POPL",
"/conf/sigsoft/fse": "FSE ",
"/conf/sigsoft/fse": "FSE",
"/conf/sosp/sosp": "SOSP",
"/conf/oopsla/oopsla": "OOPSLA",
"/conf/kbse/ase": "ASE",
Expand Down
200 changes: 100 additions & 100 deletions js/fetchRank.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ function fetchRank(node, title, authorA, year, site) {
version;

let cached = apiCache.getItem(query_url);
// console.log("cached: ", cached);
if (cached) fetchFromCache(cached, node, title, authorA, year, site);
else fetchFromDblpApi(query_url, node, title, authorA, year, site);
}
Expand All @@ -25,60 +26,63 @@ function fetchFromCache(cached, node, title, authorA, year, site) {
let dblp_url = cached.dblp_url;
let resp = cached.resp;
let resp_flag = cached.flag;
// console.log("dblp_url: ", dblp_url);

//Find a new vul: rankDB lacks of `tacas` etc., but it does occur in file `dataGen`.
if (typeof dblp_url == "undefined" && resp_flag != false) {
dblp_abbr = resp.hit[0].info.number;
if (typeof dblp_abbr != "undefined" && isNaN(dblp_abbr)) {
// console.log("dblp_abbr: ", dblp_abbr);
} else {
dblp_abbr = resp.hit[0].info.venue;
}

for (let getRankSpan of site.rankSpanList) {
// console.log("with abbr");
$(node).after(getRankSpan(dblp_abbr, "abbr"));
}

} else if (dblp_url == "/journals/pacmpl/pacmpl") {
// @kaixuan: Here, we need to process the four PL confs (oopsla, popl, pldi, and icfp) in two branches.
// Details can be accessed at the same location in the `fetchFromDblpApi` function.
else if (dblp_url == "/journals/pacmpl/pacmpl"){

let number_raw = resp.hit[0]?.info?.number; // may miss the number info in some cases, e.g., recently publised papers
let number = number_raw ? number_raw.toString().toLowerCase() : "";

// a hacky way to handle the missing number issue
// travese the resp.hit array to find a element with number info
if (number == "") {
for (let i = 0; i < resp["@sent"]; i++) {
let number_raw = resp.hit[i]?.info?.number;
if (number_raw) {
number = number_raw.toString().toLowerCase();
break;
}
}
}

if (number == "oopsla1" || number == "oopsla2"){
dblp_url = "/conf/oopsla/oopsla";
}
else if (number == "popl"){
dblp_url = "/conf/popl/popl";
}
else if (number == "pldi"){
dblp_url = "/conf/pldi/pldi";
}
else if (number == "icfp"){
dblp_url = "/conf/icfp/icfp";
// console.log("already enter this branch");
}
for (let getRankSpan of site.rankSpanList) {
// console.log("with url");
$(node).after(getRankSpan(dblp_url, "url"));
let number_raw = resp.hit[0]?.info?.number; // may miss the number info in some cases, e.g., recently publised papers
let number = number_raw ? number_raw.toString().toLowerCase() : "";

// a hacky way to handle the missing number issue
// travese the resp.hit array to find a element with number info
if (number == "") {
for (let i = 0; i < resp["@sent"]; i++) {
let number_raw = resp.hit[i]?.info?.number;
if (number_raw) {
number = number_raw.toString().toLowerCase();
break;
}
}
} else {
// console.log("number is not empty");
}

if (number == "oopsla1" || number == "oopsla2" || number == "oopsla") {
// previously, the number is "oopsla", now it is "oopsla1" or "oopsla2" due to the two cycles of oopsla
dblp_url = "/conf/oopsla/oopsla";
} else if (number == "popl") {
dblp_url = "/conf/popl/popl";
} else if (number == "pldi") {
dblp_url = "/conf/pldi/pldi";
} else if (number == "icfp") {
dblp_url = "/conf/icfp/icfp";
// console.log("already enter this branch");
} else {
// console.log("number is not in the list");
}
else{
for (let getRankSpan of site.rankSpanList) {
// console.log("with url");
$(node).after(getRankSpan(dblp_url, "url"));
}

for (let getRankSpan of site.rankSpanList) {
// console.log("with url");
$(node).after(getRankSpan(dblp_url, "url"));
}

} else {
// console.log("dblp_url is not empty");
for (let getRankSpan of site.rankSpanList) {
// console.log("with url");
$(node).after(getRankSpan(dblp_url, "url"));
Expand Down Expand Up @@ -152,80 +156,76 @@ function fetchFromDblpApi(query_url, node, title, authorA, year, site) {
flag: resp_flag,
});

//Find a new vul: rankDB lacks of `tacas` etc., but it does occur in file `dataGen`.
if(typeof(dblp_url) == "undefined" && resp_flag != false){
dblp_abbr = resp.hit[0].info.number;
if(typeof(dblp_abbr) != "undefined" && isNaN(dblp_abbr)){
}
else{
dblp_abbr = resp.hit[0].info.venue;
}
for (let getRankSpan of site.rankSpanList) {
// console.log("with abbr");
$(node).after(getRankSpan(dblp_abbr, "abbr"));
}
}

// @kaixuan: Here, we need to process the four PL confs (oopsla, popl, pldi, and icfp) in two branches.
// They are wrongly recognized as journals in the dblp api since they are published in PACMPL.
// So, we need to parse the number info from the response and determine the dblp_url accordingly.
// The same logic is applied to func `fetchFromCache`.

else if (dblp_url == "/journals/pacmpl/pacmpl"){
// we need to process the confs including oopsla, popl, and pldi in the same way
let number_raw = resp.hit[0]?.info?.number; // may miss the number info in some cases, e.g., recently publised papers
let number = number_raw ? number_raw.toString().toLowerCase() : "";

// a hacky way to handle the missing number issue
// travese the resp.hit array to find a element with number info
if (number == "") {
for (let i = 0; i < resp["@sent"]; i++) {
let number_raw = resp.hit[i]?.info?.number;
if (number_raw) {
number = number_raw.toString().toLowerCase();
break;
}
}
}

if (number == "oopsla1" || number == "oopsla2"){
dblp_url = "/conf/oopsla/oopsla";
}
else if (number == "popl"){
dblp_url = "/conf/popl/popl";
}
else if (number == "pldi"){
dblp_url = "/conf/pldi/pldi";
}
else if (number == "icfp"){
dblp_url = "/conf/icfp/icfp";
}

for (let getRankSpan of site.rankSpanList) {
// console.log("with url");
$(node).after(getRankSpan(dblp_url, "url"));
}

}

else{
for (let getRankSpan of site.rankSpanList) {
// console.log("with url");
$(node).after(getRankSpan(dblp_url, "url"));
}
}
//Find a new vul: rankDB lacks of `tacas` etc., but it does occur in file `dataGen`.
if (typeof (dblp_url) == "undefined" && resp_flag != false) {
dblp_abbr = resp.hit[0].info.number;
if (typeof (dblp_abbr) != "undefined" && isNaN(dblp_abbr)) {
}
else {
dblp_abbr = resp.hit[0].info.venue;
}
for (let getRankSpan of site.rankSpanList) {
// console.log("with abbr");
$(node).after(getRankSpan(dblp_abbr, "abbr"));
}
}
// @kaixuan: Here, we need to process the four PL confs (oopsla, popl, pldi, and icfp) in two branches.
// They are wrongly recognized as journals in the dblp api since they are published in PACMPL.
// So, we need to parse the number info from the response and determine the dblp_url accordingly.
// The same logic is applied to func `fetchFromCache`.
else if (dblp_url == "/journals/pacmpl/pacmpl") {
// we need to process the confs including oopsla, popl, and pldi in the same way
let number_raw = resp.hit[0]?.info?.number; // may miss the number info in some cases, e.g., recently publised papers
let number = number_raw ? number_raw.toString().toLowerCase() : "";

// a hacky way to handle the missing number issue
// travese the resp.hit array to find a element with number info
if (number == "") {
for (let i = 0; i < resp["@sent"]; i++) {
let number_raw = resp.hit[i]?.info?.number;
if (number_raw) {
number = number_raw.toString().toLowerCase();
break;
}
}
}

if (number == "oopsla1" || number == "oopsla2") {
dblp_url = "/conf/oopsla/oopsla";
} else if (number == "popl") {
dblp_url = "/conf/popl/popl";
} else if (number == "pldi") {
dblp_url = "/conf/pldi/pldi";
} else if (number == "icfp") {
dblp_url = "/conf/icfp/icfp";
} else {
// console.log("number is not in the list");
}

for (let getRankSpan of site.rankSpanList) {
// console.log("with url");
$(node).after(getRankSpan(dblp_url, "url"));
}

} else {
for (let getRankSpan of site.rankSpanList) {
// console.log("with url");
$(node).after(getRankSpan(dblp_url, "url"));
}
}
}
// for (let getRankSpan of site.rankSpanList) {
// // console.log("with abbr");
// $(node).after(getRankSpan(dblp_abbr, "abbr"));
// }

else {
for (let getRankSpan of site.rankSpanList) {
// console.log("with abbr");
$(node).after(getRankSpan(dblp_abbr, "abbr")); // I am not sure the difference between "abbr" and "url"
}
}

};
xhr.send();
}
Loading