diff --git a/data/ccfAbbrFull.js b/data/ccfAbbrFull.js index 7478015..1cfc55e 100644 --- a/data/ccfAbbrFull.js +++ b/data/ccfAbbrFull.js @@ -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: diff --git a/data/ccfFullUrl.js b/data/ccfFullUrl.js index f79bece..55d7523 100644 --- a/data/ccfFullUrl.js +++ b/data/ccfFullUrl.js @@ -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", diff --git a/data/ccfRankAbbr.js b/data/ccfRankAbbr.js index 9c0177b..f222812 100644 --- a/data/ccfRankAbbr.js +++ b/data/ccfRankAbbr.js @@ -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", diff --git a/js/fetchRank.js b/js/fetchRank.js index f438e92..14f8c8f 100644 --- a/js/fetchRank.js +++ b/js/fetchRank.js @@ -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); } @@ -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")); @@ -152,73 +156,57 @@ 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"); @@ -226,6 +214,18 @@ function fetchFromDblpApi(query_url, node, title, authorA, year, site) { } } } + // 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(); }