Skip to content

Commit ec413c0

Browse files
authored
Adapt some fetcher tests (#13370)
* Eliminate diffs, disable test Signed-off-by: subhramit <subhramit.bb@live.in> * Enable test, replace article with missing title Signed-off-by: subhramit <subhramit.bb@live.in> --------- Signed-off-by: subhramit <subhramit.bb@live.in>
1 parent 3df7a7c commit ec413c0

File tree

3 files changed

+32
-12
lines changed

3 files changed

+32
-12
lines changed

jablib/src/test/java/org/jabref/logic/importer/fetcher/CrossRefTest.java

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -123,17 +123,17 @@ void findByEntry() throws FetcherException {
123123
@Test
124124
void performSearchByIdFindsPaperWithoutTitle() throws FetcherException {
125125
BibEntry entry = new BibEntry(StandardEntryType.Article);
126-
entry.setField(StandardField.AUTHOR, "Dominik Wujastyk");
127-
entry.setField(StandardField.DOI, "10.1023/a:1003473214310");
128-
entry.setField(StandardField.ISSN, "0019-7246");
129-
entry.setField(StandardField.PAGES, "172-176");
130-
entry.setField(StandardField.VOLUME, "42");
131-
entry.setField(StandardField.YEAR, "1999");
132-
entry.setField(StandardField.JOURNAL, "Indo-Iranian Journal");
133-
entry.setField(StandardField.NUMBER, "2");
134-
entry.setField(StandardField.PUBLISHER, "Walter de Gruyter GmbH");
135-
136-
assertEquals(Optional.of(entry), fetcher.performSearchById("10.1023/a:1003473214310"));
126+
entry.setField(StandardField.AUTHOR, "Leo Breiman");
127+
entry.setField(StandardField.DOI, "10.1023/a:1010933404324");
128+
entry.setField(StandardField.ISSN, "0885-6125");
129+
entry.setField(StandardField.PAGES, "5-32");
130+
entry.setField(StandardField.VOLUME, "45");
131+
entry.setField(StandardField.YEAR, "2001");
132+
entry.setField(StandardField.JOURNAL, "Machine Learning");
133+
entry.setField(StandardField.NUMBER, "1");
134+
entry.setField(StandardField.PUBLISHER, "Springer Science and Business Media LLC");
135+
136+
assertEquals(Optional.of(entry), fetcher.performSearchById("10.1023/a:1010933404324"));
137137
}
138138

139139
@Test

jablib/src/test/java/org/jabref/logic/importer/fetcher/MedlineFetcherTest.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ void setUp() throws InterruptedException {
5252
.withField(new UnknownField("revised"), "2019-11-20")
5353
.withField(StandardField.TITLE, "Denial of long-term issues with agriculture on tropical peatlands will have devastating consequences.")
5454
.withField(StandardField.VOLUME, "23")
55+
.withField(StandardField.URL, "https://pubmed.ncbi.nlm.nih.gov/27670948/")
5556
.withField(StandardField.YEAR, "2017");
5657

5758
entryEndharti = new BibEntry(StandardEntryType.Article)
@@ -75,6 +76,7 @@ void setUp() throws InterruptedException {
7576
.withField(StandardField.PUBSTATE, "epublish")
7677
.withField(new UnknownField("revised"), "2022-04-08")
7778
.withField(StandardField.VOLUME, "16")
79+
.withField(StandardField.URL, "https://pubmed.ncbi.nlm.nih.gov/27670445/")
7880
.withField(StandardField.YEAR, "2016");
7981

8082
bibEntryIchikawa = new BibEntry(StandardEntryType.Article)
@@ -100,6 +102,7 @@ void setUp() throws InterruptedException {
100102
.withField(new UnknownField("pubmodel"), "Print-Electronic")
101103
.withField(StandardField.TITLE, "Seroprevalence of antibody to TgGRA7 antigen of Toxoplasma gondii in livestock animals from Western Java, Indonesia.")
102104
.withField(StandardField.VOLUME, "64")
105+
.withField(StandardField.URL, "https://pubmed.ncbi.nlm.nih.gov/26197440/")
103106
.withField(StandardField.YEAR, "2015");
104107

105108
bibEntrySari = new BibEntry(StandardEntryType.Article)
@@ -123,6 +126,7 @@ void setUp() throws InterruptedException {
123126
.withField(new UnknownField("pubmodel"), "Print")
124127
.withField(StandardField.TITLE, "TOXOPLASMA AND VIRAL ANTIBODIES AMONG HIV PATIENTS AND INMATES IN CENTRAL JAVA, INDONESIA.")
125128
.withField(StandardField.VOLUME, "46")
129+
.withField(StandardField.URL, "https://pubmed.ncbi.nlm.nih.gov/26867355/")
126130
.withField(StandardField.YEAR, "2015");
127131
}
128132

jablib/src/test/java/org/jabref/logic/importer/fetcher/SpringerFetcherTest.java

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,22 @@ void setUp() {
4343
@Test
4444
void searchByQueryFindsEntry() throws FetcherException {
4545

46+
BibEntry articleSupportingIdentification = new BibEntry(StandardEntryType.Article)
47+
.withField(StandardField.AUTHOR, "Iftikhar, Umar and Börstler, Jürgen and Bin Ali, Nauman and Kopp, Oliver")
48+
.withField(StandardField.DATE, "2025-04-23")
49+
.withField(StandardField.DOI, "10.1007/s11219-025-09720-9")
50+
.withField(StandardField.FILE, ":http\\://link.springer.com/openurl/pdf?id=doi\\:10.1007/s11219-025-09720-9:PDF")
51+
.withField(StandardField.ISSN, "0963-9314")
52+
.withField(StandardField.JOURNAL, "Software Quality Journal")
53+
.withField(StandardField.MONTH, "#apr#")
54+
.withField(StandardField.NUMBER, "2")
55+
.withField(StandardField.PAGES, "1--34")
56+
.withField(StandardField.PUBLISHER, "Springer")
57+
.withField(StandardField.TITLE, "Supporting the identification of prevalent quality issues in code changes by analyzing reviewers’ feedback")
58+
.withField(StandardField.VOLUME, "33")
59+
.withField(StandardField.YEAR, "2025")
60+
.withField(StandardField.ABSTRACT, "Context: Code reviewers provide valuable feedback during the code review. Identifying common issues described in the reviewers’ feedback can provide input for devising context-specific software development improvements. However, the use of reviewer feedback for this purpose is currently less explored. Objective: In this study, we assess how automation can derive more interpretable and informative themes in reviewers’ feedback and whether these themes help to identify recurring quality-related issues in code changes. Method: We conducted a participatory case study using the JabRef system to analyze reviewers’ feedback on merged and abandoned code changes. We used two promising topic modeling methods (GSDMM and BERTopic) to identify themes in 5,560 code review comments. The resulting themes were analyzed and named by a domain expert from JabRef. Results: The domain expert considered the identified themes from the two topic models to represent quality-related issues. Different quality issues are pointed out in code reviews for merged and abandoned code changes. While BERTopic provides higher objective coherence, the domain expert considered themes from short-text topic modeling more informative and easy to interpret than BERTopic-based topic modeling. Conclusions: The identified prevalent code quality issues aim to address the maintainability-focused issues. The analysis of code review comments can enhance the current practices for JabRef by improving the guidelines for new developers and focusing discussions in the developer forums. The topic model choice impacts the interpretability of the generated themes, and a higher coherence (based on objective measures) of generated topics did not lead to improved interpretability by a domain expert.");
61+
4662
BibEntry articleTagThatIssue = new BibEntry(StandardEntryType.Article)
4763
.withField(StandardField.AUTHOR, "Santos, Fabio and Vargovich, Joseph and Trinkenreich, Bianca and Santos, Italo and Penney, Jacob and Britto, Ricardo and Pimentel, João Felipe and Wiese, Igor and Steinmacher, Igor and Sarma, Anita and Gerosa, Marco A.")
4864
.withField(StandardField.DATE, "2023-08-31")
@@ -121,7 +137,7 @@ void searchByQueryFindsEntry() throws FetcherException {
121137
.withField(StandardField.ABSTRACT, "Several Open-Source Software (OSS) projects depend on the continuity of their development communities to remain sustainable. Understanding how developers become inactive or why they take breaks can help communities prevent abandonment and incentivize developers to come back. In this paper, we propose a novel method to identify developers’ inactive periods by analyzing the individual rhythm of contributions to the projects. Using this method, we quantitatively analyze the inactivity of core developers in 18 OSS organizations hosted on GitHub. We also survey core developers to receive their feedback about the identified breaks and transitions. Our results show that our method was effective for identifying developers’ breaks. About 94% of the surveyed core developers agreed with our state model of inactivity; 71% and 79% of them acknowledged their breaks and state transition, respectively. We also show that all core developers take breaks (at least once) and about a half of them (~45%) have completely disengaged from a project for at least one year. We also analyzed the probability of transitions to/from inactivity and found that developers who pause their activity have a ~35 to ~55% chance to return to an active state; yet, if the break lasts for a year or longer, then the probability of resuming activities drops to ~21–26%, with a ~54% chance of complete disengagement. These results may support the creation of policies and mechanisms to make OSS community managers aware of breaks and potential project abandonment.");
122138

123139
List<BibEntry> fetchedEntries = fetcher.performSearch("JabRef Social Barriers Steinmacher");
124-
assertEquals(List.of(articleTagThatIssue, fourthArticle, thirdArticle, firstArticle, secondArticle), fetchedEntries);
140+
assertEquals(List.of(articleSupportingIdentification, articleTagThatIssue, fourthArticle, thirdArticle, firstArticle, secondArticle), fetchedEntries);
125141
}
126142

127143
@Test

0 commit comments

Comments
 (0)