Skip to content

Rewrite journal abbrevation repository#15336

Open
LoayTarek5 wants to merge 67 commits intoJabRef:mainfrom
LoayTarek5:rewrite-journal-abbrevation-repository-12571
Open

Rewrite journal abbrevation repository#15336
LoayTarek5 wants to merge 67 commits intoJabRef:mainfrom
LoayTarek5:rewrite-journal-abbrevation-repository-12571

Conversation

@LoayTarek5
Copy link
Copy Markdown
Contributor

Related issues and pull requests

Closes #12571

PR Description

Refactors JournalAbbreviationRepository to use Postgres instead of in-memory HashMaps for built-in journal abbreviations. Abbreviations are now queried on demand via SQL instead of being fully loaded at startup, reducing memory usage and load time.

Steps to test

1- Run JabRef with the profiler, then open a .bib file
2- Select one or more entries
3- Go to Quality -> Cleanup entries
4- Select "Abbreviate (default)"
5- Click "Clean up"
6- Then go back to the profiler and stop it
capture_260313_142447
capture_260313_142536
capture_260313_142551
capture_260313_142725
capture_260313_142742

Checklist

  • I own the copyright of the code submitted and I license it under the MIT license
  • I manually tested my changes in running JabRef (always required)
  • I added JUnit tests for changes (if applicable)
  • [/] I added screenshots in the PR description (if change is visible to the user)
  • [/] I added a screenshot in the PR description showing a library with a single entry with me as author and as title the issue number
  • [/] I described the change in CHANGELOG.md in a way that can be understood by the average user (if change is visible to the user)
  • [/] I checked the user documentation for up to dateness and submitted a pull request to our user documentation repository

@qodo-free-for-open-source-projects
Copy link
Copy Markdown
Contributor

Review Summary by Qodo

Refactor JournalAbbreviationRepository to use Postgres with fuzzy matching

✨ Enhancement

Grey Divider

Walkthroughs

Description
• Migrate journal abbreviations from H2 MVStore to Postgres database
• Implement fuzzy matching using pg_trgm trigram similarity extension
• Generate SQL file instead of MVStore for built-in abbreviations
• Refactor repository API with specific getter methods for abbreviation types
• Make Abbreviation fields final for immutability and thread safety
Diagram
flowchart LR
  CSV["CSV Files<br/>Journal Lists"]
  Generator["JournalListSqlGenerator<br/>Generates SQL"]
  SQL["journal-list.sql<br/>Postgres Schema"]
  DB["Postgres Database<br/>Built-in Abbreviations"]
  Repo["JournalAbbreviationRepository<br/>Query via SQL"]
  Custom["Custom Abbreviations<br/>In-Memory"]
  
  CSV --> Generator
  Generator --> SQL
  SQL --> DB
  DB --> Repo
  Custom --> Repo
  Repo --> Fuzzy["Fuzzy Matching<br/>pg_trgm"]
Loading

Grey Divider

File Changes

1. build-support/src/main/java/JournalListMvGenerator.java Deletion +0/-108

Remove H2 MVStore generator for journal abbreviations

build-support/src/main/java/JournalListMvGenerator.java


2. build-support/src/main/java/JournalListSqlGenerator.java ✨ Enhancement +161/-0

Generate SQL file for Postgres journal abbreviations

build-support/src/main/java/JournalListSqlGenerator.java


3. build-support/src/main/java/LtwaListMvGenerator.java Dependencies +1/-1

Update H2 dependency from full to MVStore only

build-support/src/main/java/LtwaListMvGenerator.java


View more (28)
4. jabgui/src/main/java/org/jabref/gui/JabRefGUI.java ✨ Enhancement +2/-1

Initialize PostgreServer and pass DataSource to loader

jabgui/src/main/java/org/jabref/gui/JabRefGUI.java


5. jabgui/src/main/java/org/jabref/gui/preferences/journals/JournalAbbreviationsTabViewModel.java ✨ Enhancement +7/-3

Pass DataSource to journal abbreviation repository loading

jabgui/src/main/java/org/jabref/gui/preferences/journals/JournalAbbreviationsTabViewModel.java


6. jabgui/src/test/java/org/jabref/gui/preferences/journals/JournalAbbreviationsViewModelTabTest.java 🧪 Tests +5/-2

Use JournalAbbreviationTestUtil for test data source

jabgui/src/test/java/org/jabref/gui/preferences/journals/JournalAbbreviationsViewModelTabTest.java


7. jabgui/src/test/java/org/jabref/logic/journals_gui/JournalAbbreviationRepositoryTest.java 🧪 Tests +3/-2

Initialize repository with test DataSource

jabgui/src/test/java/org/jabref/logic/journals_gui/JournalAbbreviationRepositoryTest.java


8. jabkit/src/main/java/org/jabref/toolkit/JabKitLauncher.java ✨ Enhancement +4/-1

Initialize PostgreServer and pass DataSource to loader

jabkit/src/main/java/org/jabref/toolkit/JabKitLauncher.java


9. jabkit/src/main/java/org/jabref/toolkit/commands/CheckIntegrity.java ✨ Enhancement +3/-2

Use Injector for JournalAbbreviationRepository initialization

jabkit/src/main/java/org/jabref/toolkit/commands/CheckIntegrity.java


10. jablib/src/main/java/org/jabref/logic/cleanup/AbbreviateJournalCleanup.java ✨ Enhancement +13/-23

Refactor to use specific abbreviation getter methods

jablib/src/main/java/org/jabref/logic/cleanup/AbbreviateJournalCleanup.java


11. jablib/src/main/java/org/jabref/logic/cleanup/UnabbreviateJournalCleanup.java ✨ Enhancement +10/-6

Use specific repository methods for unabbreviation logic

jablib/src/main/java/org/jabref/logic/cleanup/UnabbreviateJournalCleanup.java


12. jablib/src/main/java/org/jabref/logic/exporter/TemplateExporter.java ✨ Enhancement +30/-4

Add optional JournalAbbreviationRepository parameter

jablib/src/main/java/org/jabref/logic/exporter/TemplateExporter.java


13. jablib/src/main/java/org/jabref/logic/journals/Abbreviation.java ✨ Enhancement +2/-2

Make name and dotlessAbbreviation fields final

jablib/src/main/java/org/jabref/logic/journals/Abbreviation.java


14. jablib/src/main/java/org/jabref/logic/journals/AbbreviationParser.java ✨ Enhancement +1/-1

Make readJournalListFromFile method public

jablib/src/main/java/org/jabref/logic/journals/AbbreviationParser.java


15. jablib/src/main/java/org/jabref/logic/journals/JournalAbbreviationLoader.java ✨ Enhancement +49/-22

Populate Postgres database with SQL file and refactor loading

jablib/src/main/java/org/jabref/logic/journals/JournalAbbreviationLoader.java


16. jablib/src/main/java/org/jabref/logic/journals/JournalAbbreviationRepository.java ✨ Enhancement +269/-127

Rewrite to use Postgres with fuzzy matching via pg_trgm

jablib/src/main/java/org/jabref/logic/journals/JournalAbbreviationRepository.java


17. jablib/src/main/java/org/jabref/logic/search/PostgreServer.java ✨ Enhancement +4/-0

Add public getter method for DataSource

jablib/src/main/java/org/jabref/logic/search/PostgreServer.java


18. jablib/src/test/java/org/jabref/logic/cleanup/AbbreviateJournalCleanupTest.java 🧪 Tests +33/-42

Update mocks to use specific abbreviation getter methods

jablib/src/test/java/org/jabref/logic/cleanup/AbbreviateJournalCleanupTest.java


19. jablib/src/test/java/org/jabref/logic/cleanup/UnabbreviateJournalCleanupTest.java 🧪 Tests +14/-20

Update mocks to use specific repository methods

jablib/src/test/java/org/jabref/logic/cleanup/UnabbreviateJournalCleanupTest.java


20. jablib/src/test/java/org/jabref/logic/integrity/AbbreviationCheckerTest.java 🧪 Tests +3/-2

Initialize repository with test DataSource

jablib/src/test/java/org/jabref/logic/integrity/AbbreviationCheckerTest.java


21. jablib/src/test/java/org/jabref/logic/integrity/IntegrityCheckTest.java 🧪 Tests +13/-3

Initialize repository once for all tests

jablib/src/test/java/org/jabref/logic/integrity/IntegrityCheckTest.java


22. jablib/src/test/java/org/jabref/logic/integrity/JournalInAbbreviationListCheckerTest.java 🧪 Tests +3/-2

Use JournalAbbreviationTestUtil for test data source

jablib/src/test/java/org/jabref/logic/integrity/JournalInAbbreviationListCheckerTest.java


23. jablib/src/test/java/org/jabref/logic/journals/AbbreviationsTest.java 🧪 Tests +4/-2

Initialize repository with test DataSource

jablib/src/test/java/org/jabref/logic/journals/AbbreviationsTest.java


24. jablib/src/test/java/org/jabref/logic/journals/LtwaRepositoryTest.java 🧪 Tests +4/-2

Initialize repository with test DataSource

jablib/src/test/java/org/jabref/logic/journals/LtwaRepositoryTest.java


25. jabls-cli/src/main/java/org/jabref/languageserver/cli/ServerCli.java ✨ Enhancement +3/-1

Initialize PostgreServer and pass DataSource to launcher

jabls-cli/src/main/java/org/jabref/languageserver/cli/ServerCli.java


26. jabls/src/main/java/module-info.java ⚙️ Configuration changes +2/-1

Add java.sql module requirement

jabls/src/main/java/module-info.java


27. jabls/src/main/java/org/jabref/languageserver/LspLauncher.java ✨ Enhancement +9/-7

Accept DataSource parameter in constructor

jabls/src/main/java/org/jabref/languageserver/LspLauncher.java


28. test-support/src/main/java/module-info.java ⚙️ Configuration changes +2/-0

Add java.sql and embedded-postgres module requirements

test-support/src/main/java/module-info.java


29. test-support/src/main/java/org/jabref/support/JournalAbbreviationTestUtil.java 🧪 Tests +31/-0

Create shared test utility for Postgres-backed repository

test-support/src/main/java/org/jabref/support/JournalAbbreviationTestUtil.java


30. jablib/build.gradle.kts ⚙️ Configuration changes +8/-8

Update build task to generate SQL instead of MVStore

jablib/build.gradle.kts


31. test-support/build.gradle.kts Dependencies +5/-0

Add embedded-postgres dependency for testing

test-support/build.gradle.kts


Grey Divider

Qodo Logo

@qodo-free-for-open-source-projects
Copy link
Copy Markdown
Contributor

qodo-free-for-open-source-projects bot commented Mar 13, 2026

Code Review by Qodo

🐞 Bugs (3)   📘 Rule violations (2)   📎 Requirement gaps (2)   🎨 UX Issues (0)
🐞\ ≡ Correctness (3)
📘\ ≡ Correctness (2)
📎\ ➹ Performance (2)

Grey Divider


Action required

1. loadRepository() returns null 📘
Description
JournalAbbreviationLoader.loadRepository(...) returns null on failure, which can propagate
null into callers and cause later NullPointerExceptions. This violates the requirement to avoid
null returns and prefer Optional/safer patterns.
Code

jablib/src/main/java/org/jabref/logic/journals/JournalAbbreviationLoader.java[R53-55]

LOGGER.error("Error while loading journal abbreviation repository", e);
return null;
}
Evidence
The checklist requires avoiding null returns; the modified loader method explicitly returns null
when an exception occurs.

AGENTS.md
jablib/src/main/java/org/jabref/logic/journals/JournalAbbreviationLoader.java[53-55]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
`JournalAbbreviationLoader.loadRepository(...)` returns `null` on error, which can lead to runtime crashes when callers assume a non-null repository.
## Issue Context
This method is used from GUI/CLI/LSP initialization paths; returning `null` violates the project’s preference to avoid null returns.
## Fix Focus Areas
- jablib/src/main/java/org/jabref/logic/journals/JournalAbbreviationLoader.java[42-55]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


2. Null DataSource NPE🐞
Description
JournalAbbreviationLoader.populateDatabase dereferences dataSource without null-checking, but
PostgreServer.getDataSource() can return null when embedded Postgres fails to start, causing a
NullPointerException during repository initialization.
Code

jablib/src/main/java/org/jabref/logic/journals/JournalAbbreviationLoader.java[R77-84]

+    private static void populateDatabase(DataSource dataSource) throws IOException, SQLException {
+        // Skip if table already exists — safe for parallel test execution
+        try (Connection conn = dataSource.getConnection()) {
+            try (var tables = conn.getMetaData().getTables(null, null, "journal_abbreviation", null)) {
+                if (tables.next()) {
+                    LOGGER.debug("Journal abbreviation table already exists, skipping population");
+                    return;
+                }
Evidence
PostgreServer explicitly sets dataSource to null on startup failure and exposes it via a @Nullable
getter; JabRefGUI passes this possibly-null value into JournalAbbreviationLoader.loadRepository
without guarding; populateDatabase then immediately calls dataSource.getConnection().

jablib/src/main/java/org/jabref/logic/search/PostgreServer.java[25-37]
jablib/src/main/java/org/jabref/logic/search/PostgreServer.java[93-95]
jabgui/src/main/java/org/jabref/gui/JabRefGUI.java[178-183]
jablib/src/main/java/org/jabref/logic/journals/JournalAbbreviationLoader.java[77-83]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
`PostgreServer.getDataSource()` can return `null` when embedded Postgres fails to start, but `JournalAbbreviationLoader.populateDatabase` calls `dataSource.getConnection()` unconditionally, leading to a startup-time `NullPointerException`.
### Issue Context
The GUI (and other entrypoints) call `JournalAbbreviationLoader.loadRepository(..., postgreServer.getDataSource())` without checking for null.
### Fix Focus Areas
- jablib/src/main/java/org/jabref/logic/journals/JournalAbbreviationLoader.java[42-55]
- jablib/src/main/java/org/jabref/logic/journals/JournalAbbreviationLoader.java[74-99]
- jabgui/src/main/java/org/jabref/gui/JabRefGUI.java[178-183]
- jabkit/src/main/java/org/jabref/toolkit/JabKitLauncher.java[92-99]
- jabls-cli/src/main/java/org/jabref/languageserver/cli/ServerCli.java[29-35]
- jabls/src/main/java/org/jabref/languageserver/LspLauncher.java[51-57]
- jabgui/src/main/java/org/jabref/gui/preferences/journals/JournalAbbreviationsTabViewModel.java[319-324]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


3. Exports lack real abbreviations 🐞
Description
TemplateExporter.export falls back to a demo-only JournalAbbreviationRepository when no repository
is provided, and built-in/custom TemplateExporter instances are constructed without injecting the
real repository, so JournalAbbreviator formatting in exports becomes effectively non-functional.
Code

jablib/src/main/java/org/jabref/logic/exporter/TemplateExporter.java[R203-210]

public void export(@NonNull BibDatabaseContext databaseContext,
  Path file,
  @NonNull List<BibEntry> entries) throws IOException {
-        export(databaseContext, file, entries, List.of(), JournalAbbreviationLoader.loadBuiltInRepository());
+        JournalAbbreviationRepository repository = abbreviationRepository != null
+                                                   ? abbreviationRepository
+                                                   : new JournalAbbreviationRepository(); // fallback to demo data
+        export(databaseContext, file, entries, List.of(), repository);
}
Evidence
TemplateExporter now uses demo data when abbreviationRepository is null; ExporterFactory and
JabRefCliPreferences create TemplateExporter instances without passing a repository, so export-time
journal abbreviation formatting will almost always operate on demo data only.

jablib/src/main/java/org/jabref/logic/exporter/TemplateExporter.java[203-210]
jablib/src/main/java/org/jabref/logic/exporter/ExporterFactory.java[37-56]
jablib/src/main/java/org/jabref/logic/preferences/JabRefCliPreferences.java[1844-1853]
jablib/src/main/java/org/jabref/logic/journals/JournalAbbreviationRepository.java[83-88]
jablib/src/main/java/org/jabref/logic/layout/format/JournalAbbreviator.java[22-25]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
Exports currently fall back to a demo-only abbreviation repository because exporters are constructed without injecting a real `JournalAbbreviationRepository`, breaking `\format[JournalAbbreviator]{...}` behavior in export layouts.
### Issue Context
`TemplateExporter.export()` now selects `new JournalAbbreviationRepository()` when no repository was provided; both built-in exporters and custom exporters are created without supplying one.
### Fix Focus Areas
- jablib/src/main/java/org/jabref/logic/exporter/TemplateExporter.java[203-210]
- jablib/src/main/java/org/jabref/logic/exporter/ExporterFactory.java[27-70]
- jablib/src/main/java/org/jabref/logic/preferences/JabRefCliPreferences.java[1839-1856]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


View more (1)
4. SQL generator main hidden 🐞
Description
JournalListSqlGenerator declares a package-private main method, which prevents the
generateJournalListSQL Gradle/JBang task from running and therefore prevents journal-list.sql from
being generated.
Code

build-support/src/main/java/JournalListSqlGenerator.java[R41-48]

+    static void main(String[] args) throws IOException {
+        boolean verbose = (args.length == 1) && ("--verbose".equals(args[0]));
+
+        Path abbreviationsDirectory = Path.of("jablib", "src", "main", "abbrv.jabref.org", "journals");
+        if (!Files.exists(abbreviationsDirectory)) {
+            System.out.println("Path " + abbreviationsDirectory.toAbsolutePath() + " does not exist");
+            System.exit(0);
+        }
Evidence
The Gradle task is configured to run JournalListSqlGenerator.java as a script; the class currently
exposes only a non-public main method, which is not a valid Java entrypoint for JBang/Java
execution.

build-support/src/main/java/JournalListSqlGenerator.java[34-43]
jablib/build.gradle.kts[94-103]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The SQL generator is used as an executable script by the Gradle `generateJournalListSQL` task, but its `main` method is not `public`, so the script cannot be launched.
### Issue Context
If this task fails, `journal-list.sql` will not be generated and built-in abbreviations provisioning will break.
### Fix Focus Areas
- build-support/src/main/java/JournalListSqlGenerator.java[41-43]
- jablib/build.gradle.kts[94-105]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Remediation recommended

5. Custom fuzzy match in Java 📎
Description
Fuzzy matching for custom abbreviations is still performed in application code using
StringSimilarity, rather than relying exclusively on PostgreSQL features. This conflicts with the
requirement that fuzzy matching be implemented using Postgres-only capabilities.
Code

jablib/src/main/java/org/jabref/logic/journals/JournalAbbreviationRepository.java[R138-151]

+    /// Fuzzy matches against an in-memory collection using StringSimilarity
+    /// Used for custom abbreviations typically < 20 entries
+    private Optional<Abbreviation> findBestFuzzyMatchedInMemory(Collection<Abbreviation> abbreviations, String input) {
if (input.trim().split("\\s+").length <= 1) {
-            // Some Chinese titles do not contain spaces
boolean isAscii = input.chars().allMatch(c -> c <= 0x7F);
if (isAscii) {
return Optional.empty();
}
}
-        // threshold for edit distance similarity comparison
-        final double SIMILARITY_THRESHOLD = 1.0;
+        final double editDistanceThreshold = 1.0;
List<Abbreviation> candidates = abbreviations.stream()
                                .filter(abbreviation -> similarity.isSimilar(input, abbreviation.getName()))
Evidence
The compliance checklist calls for fuzzy matching to be implemented using PostgreSQL-native
operators/functions; the repository still implements fuzzy matching logic in Java for custom
abbreviations.

Fuzzy matching implemented using Postgres-only features
jablib/src/main/java/org/jabref/logic/journals/JournalAbbreviationRepository.java[138-156]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
Custom abbreviation fuzzy matching is implemented in Java via `StringSimilarity`, contrary to the requirement to use Postgres-only fuzzy matching.
## Issue Context
Built-in abbreviations already use `pg_trgm` similarity queries; custom abbreviations could be stored/queryable in Postgres as well to keep matching consistent.
## Fix Focus Areas
- jablib/src/main/java/org/jabref/logic/journals/JournalAbbreviationRepository.java[113-136]
- jablib/src/main/java/org/jabref/logic/journals/JournalAbbreviationRepository.java[138-170]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


6. Loads full SQL into RAM 📎
Description
The built-in abbreviation population reads the entire journal-list.sql resource into a String
via readAllBytes(), which eagerly loads the full dataset into memory. This risks undermining the
stated startup-time/memory-footprint goals of the rewrite.
Code

jablib/src/main/java/org/jabref/logic/journals/JournalAbbreviationLoader.java[R87-96]

+        try (InputStream resourceAsStream = JournalAbbreviationLoader.class.getResourceAsStream("/journals/journal-list.sql")) {
+            if (resourceAsStream == null) {
+                LOGGER.warn("There is no journal-list.sql. Skipping built-in abbreviation loading.");
+                return;
+            }
+            String sql = new String(resourceAsStream.readAllBytes(), StandardCharsets.UTF_8);
+            try (Connection conn = dataSource.getConnection();
+                 Statement stmt = conn.createStatement()) {
+                stmt.execute(sql);
+            }
Evidence
The performance compliance item requires avoiding eager full-dataset loading at startup; the
population logic reads the complete SQL resource into memory before execution.

Performance goals addressed: reduce startup time and memory footprint for abbreviations
jablib/src/main/java/org/jabref/logic/journals/JournalAbbreviationLoader.java[87-96]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
Database population loads the whole `journal-list.sql` into memory with `readAllBytes()`, which may be large and can add startup memory/time overhead.
## Issue Context
The rewrite’s motivation is to reduce startup costs and RAM usage; avoid eager full-resource loading where possible.
## Fix Focus Areas
- jablib/src/main/java/org/jabref/logic/journals/JournalAbbreviationLoader.java[74-99]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


7. Test util throws Exception 📘
Description
New/modified test setup methods declare throws Exception, which is a generic exception type and
reduces clarity about expected failure modes. Prefer narrower exception types or handle setup
failures explicitly.
Code

test-support/src/main/java/org/jabref/support/JournalAbbreviationTestUtil.java[R18-29]

+    public static synchronized DataSource getDataSource() throws Exception {
+        if (pg == null) {
+            pg = EmbeddedPostgres.builder().start();
+            dataSource = pg.getPostgresDatabase();
+            try (Connection conn = dataSource.getConnection();
+                 Statement stmt = conn.createStatement()) {
+                stmt.execute("CREATE EXTENSION IF NOT EXISTS pg_trgm");
+            }
+            // Pre-populate once so parallel test workers never race on table creation
+            JournalAbbreviationLoader.loadBuiltInRepository(dataSource);
+        }
+        return dataSource;
Evidence
The compliance checklist discourages generic exception usage; the new shared test utility exposes a
broad throws Exception contract.

AGENTS.md
test-support/src/main/java/org/jabref/support/JournalAbbreviationTestUtil.java[18-29]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The new test utility declares `throws Exception`, which is overly broad.
## Issue Context
Narrow exception contracts improve clarity and align with the project’s preference for specific exception types.
## Fix Focus Areas
- test-support/src/main/java/org/jabref/support/JournalAbbreviationTestUtil.java[18-29]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


View more (1)
8. Unabbreviate ignores LaTeX-free 🐞
Description
UnabbreviateJournalCleanup now uses entry.getField(field) instead of getFieldLatexFree(field), so
LaTeX/braced journal abbreviations may not match the repository and will not be unabbreviated.
Code

jablib/src/main/java/org/jabref/logic/cleanup/UnabbreviateJournalCleanup.java[R47-51]

+        String origText = entry.getField(field).orElse("");
+        String text = database.resolveForStrings(origText);
if (!journalAbbreviationRepository.isKnownName(text)) {
return List.of(); // Cannot do anything if it is not known.
Evidence
getFieldLatexFree explicitly normalizes LaTeX content via LatexToUnicodeAdapter, while
resolveForStrings only expands BibTeX strings and does not perform LaTeX normalization. The
repository input sanitizer only trims and unescapes ampersands, so braces/LaTeX markup can remain
and prevent matching.

jablib/src/main/java/org/jabref/logic/cleanup/UnabbreviateJournalCleanup.java[47-56]
jablib/src/main/java/org/jabref/model/entry/BibEntry.java[445-463]
jablib/src/main/java/org/jabref/model/database/BibDatabase.java[365-369]
jablib/src/main/java/org/jabref/logic/journals/JournalAbbreviationRepository.java[90-92]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
Unabbreviation lookup no longer uses LaTeX-free journal text, so values containing braces/LaTeX commands may fail to match and will not be unabbreviated.
### Issue Context
`BibDatabase.resolveForStrings` only expands BibTeX strings; it does not perform LaTeX-to-Unicode normalization.
### Fix Focus Areas
- jablib/src/main/java/org/jabref/logic/cleanup/UnabbreviateJournalCleanup.java[47-66]
- jablib/src/main/java/org/jabref/model/entry/BibEntry.java[445-463]
- jablib/src/main/java/org/jabref/model/database/BibDatabase.java[365-369]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

ⓘ The new review experience is currently in Beta. Learn more

Grey Divider

Qodo Logo

Comment on lines 203 to 210
public void export(@NonNull BibDatabaseContext databaseContext,
Path file,
@NonNull List<BibEntry> entries) throws IOException {
export(databaseContext, file, entries, List.of(), JournalAbbreviationLoader.loadBuiltInRepository());
JournalAbbreviationRepository repository = abbreviationRepository != null
? abbreviationRepository
: new JournalAbbreviationRepository(); // fallback to demo data
export(databaseContext, file, entries, List.of(), repository);
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action required

3. Exports lack real abbreviations 🐞 Bug ✓ Correctness

TemplateExporter.export falls back to a demo-only JournalAbbreviationRepository when no repository
is provided, and built-in/custom TemplateExporter instances are constructed without injecting the
real repository, so JournalAbbreviator formatting in exports becomes effectively non-functional.
Agent Prompt
### Issue description
Exports currently fall back to a demo-only abbreviation repository because exporters are constructed without injecting a real `JournalAbbreviationRepository`, breaking `\format[JournalAbbreviator]{...}` behavior in export layouts.

### Issue Context
`TemplateExporter.export()` now selects `new JournalAbbreviationRepository()` when no repository was provided; both built-in exporters and custom exporters are created without supplying one.

### Fix Focus Areas
- jablib/src/main/java/org/jabref/logic/exporter/TemplateExporter.java[203-210]
- jablib/src/main/java/org/jabref/logic/exporter/ExporterFactory.java[27-70]
- jablib/src/main/java/org/jabref/logic/preferences/JabRefCliPreferences.java[1839-1856]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Comment on lines +41 to +48
static void main(String[] args) throws IOException {
boolean verbose = (args.length == 1) && ("--verbose".equals(args[0]));

Path abbreviationsDirectory = Path.of("jablib", "src", "main", "abbrv.jabref.org", "journals");
if (!Files.exists(abbreviationsDirectory)) {
System.out.println("Path " + abbreviationsDirectory.toAbsolutePath() + " does not exist");
System.exit(0);
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action required

4. Sql generator main hidden 🐞 Bug ✓ Correctness

JournalListSqlGenerator declares a package-private main method, which prevents the
generateJournalListSQL Gradle/JBang task from running and therefore prevents journal-list.sql from
being generated.
Agent Prompt
### Issue description
The SQL generator is used as an executable script by the Gradle `generateJournalListSQL` task, but its `main` method is not `public`, so the script cannot be launched.

### Issue Context
If this task fails, `journal-list.sql` will not be generated and built-in abbreviations provisioning will break.

### Fix Focus Areas
- build-support/src/main/java/JournalListSqlGenerator.java[41-43]
- jablib/build.gradle.kts[94-105]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

@testlens-app

This comment has been minimized.

@github-actions github-actions bot added status: changes-required Pull requests that are not yet complete and removed status: no-bot-comments labels Mar 13, 2026
@testlens-app

This comment has been minimized.

@testlens-app

This comment has been minimized.

@testlens-app

This comment has been minimized.

@testlens-app

This comment has been minimized.

@testlens-app

This comment has been minimized.

@testlens-app

This comment has been minimized.

@testlens-app

This comment has been minimized.

@testlens-app

This comment has been minimized.

@testlens-app

This comment has been minimized.

@github-actions github-actions bot added status: no-bot-comments and removed status: changes-required Pull requests that are not yet complete labels Mar 14, 2026
@testlens-app

This comment has been minimized.

@testlens-app

This comment has been minimized.

@koppor
Copy link
Copy Markdown
Member

koppor commented Mar 16, 2026

Any comment on the failing tests?

image

@testlens-app

This comment has been minimized.

@testlens-app

This comment has been minimized.

@LoayTarek5
Copy link
Copy Markdown
Contributor Author

Any comment on the failing tests?

image

I tried for a couple of days to solve the "Source Code Tests / Dependency Scopes (pull_request)" one,
and here's what I concluded

The original branch had the old version: "requires transitive embedded.postgres"
then i fixed it to "requires embedded.postgres"
then i merged main into my branch, during this merge, "Git" saw two versions of module-info.java:

my branch: requires embedded.postgres; (right)
main branch: requires transitive embedded.postgres; (wrong)

Git chose main's version (or created a merge commit that kept the transient version), overwriting my fix.
Every time i merged main, the same thing happened.

my local git show HEAD always showed the correct version, but the merge commit that got pushed contained the old version from main, so local looked fine but CI kept failing.

@LoayTarek5
Copy link
Copy Markdown
Contributor Author

LoayTarek5 commented Mar 16, 2026

Any comment on the failing tests?
image

I tried for a couple of days to solve the "Source Code Tests / Dependency Scopes (pull_request)" one, and here's what I concluded

The original branch had the old version: "requires transitive embedded.postgres" then i fixed it to "requires embedded.postgres" then i merged main into my branch, during this merge, "Git" saw two versions of module-info.java:

my branch: requires embedded.postgres; (right) main branch: requires transitive embedded.postgres; (wrong)

Git chose main's version (or created a merge commit that kept the transient version), overwriting my fix. Every time i merged main, the same thing happened.

my local git show HEAD always showed the correct version, but the merge commit that got pushed contained the old version from main, so local looked fine but CI kept failing.

I investigated more and i think the solution would be Squash and Merge becouace it takes all my commits (including the bad intermediate one), combines them into ONE single commit
That one commit only contains the final correct state of all files, so the bad commit simply disappears

could i use "--force-with-lease" ?

@koppor koppor added status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers good fourth issue and removed status: no-bot-comments labels Mar 16, 2026
Copy link
Copy Markdown
Member

@koppor koppor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some minor initial comments

However, how do you deal with org.jabref.logic.journals.JournalAbbreviationRepository#findBestFuzzyMatched. The issue pointed to that somehow and especially linked how postgres can do.

id("java-library")
}

dependencies {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


public static synchronized DataSource getDataSource() throws Exception {
if (pg == null) {
pg = EmbeddedPostgres.builder().start();
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When is the instance stopped?

exports org.jabref.languageserver.controller;
exports org.jabref.languageserver.util;

requires transitive org.jabref.jablib;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this one requires java.sql - so no need ffor line 20`?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

jablib uses requires java.sql (not requires transitive), so java.sql is not transitively available to jabls,
LspLauncher.java directly imports javax.sql.DataSource, jabls needs its own requires java.sql
i also ran ./gradlew :jabls:checkAllModuleInfo, which confirms the current declaration is correct, and when I delete it, it fails.

for (int i = 0; i < total; i += BATCH_SIZE) {
int end = Math.min(i + BATCH_SIZE, total);

writer.write("INSERT INTO journal_abbreviation (name, abbreviation, dotless_abbreviation, shortest_unique_abbreviation) VALUES\n");
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh, this really is hand crafted.

Maybe try with https://github.com/jOOQ/jOOQ

If this is too much, use https://github.com/querydsl/querydsl/tree/master/querydsl-sql or JDBI - https://jdbi.org/#_fluent_api

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The JournalListSqlGenerator is a JBang build-time script that generates a static .sql file, it doesn't execute SQL directly.
the hand crafted SQL uses ON CONFLICT batch inserts for efficiency
the project currently only has jooq:jool (lambda utilities), not the full jOOQ SQL DSL or JDBI,
should I add the full jOOQ SQL library as a JBang dependency to this script, or is the current approach acceptable?given it's a build time file generator, i want to avoid adding a heavy dependency just for string building, what do you think?


for (int j = i; j < end; j++) {
Abbreviation abbr = entries[j];
String dotless = abbr.getAbbreviation().replace(".", " ").replace(" ", " ").trim();
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't we have a util class for this?

@LoayTarek5 LoayTarek5 force-pushed the rewrite-journal-abbrevation-repository-12571 branch from 75c4750 to 77a1f5e Compare March 25, 2026 20:29
@testlens-app

This comment has been minimized.

@LoayTarek5 LoayTarek5 requested a review from calixtus March 25, 2026 20:36
@github-actions github-actions bot added status: changes-required Pull requests that are not yet complete and removed status: no-bot-comments labels Mar 25, 2026
@testlens-app

This comment has been minimized.

@github-actions github-actions bot added status: no-bot-comments and removed status: changes-required Pull requests that are not yet complete labels Mar 26, 2026
@testlens-app
Copy link
Copy Markdown

testlens-app bot commented Mar 31, 2026

🚨 TestLens detected 50 failed tests 🚨

Here is what you can do:

  1. Inspect the test failures carefully.
  2. If you are convinced that some of the tests are flaky, you can mute them below.
  3. Finally, trigger a rerun by checking the rerun checkbox.

Test Summary

Check Project/Task Test Runs
Fetcher Tests / Fetcher tests :jablib:fetcherTest ArXivFetcherTest > abstractIsCleanedUp()
Fetcher Tests / Fetcher tests :jablib:fetcherTest ArXivFetcherTest > findFullTextByDOI()
Fetcher Tests / Fetcher tests :jablib:fetcherTest ArXivFetcherTest > findFullTextByTitle()
Fetcher Tests / Fetcher tests :jablib:fetcherTest ArXivFetcherTest > findFullTextByTitleWithCurlyBracket()
Fetcher Tests / Fetcher tests :jablib:fetcherTest ArXivFetcherTest > findFullTextByTitleWithCurlyBracketAndPartOfAuthor()
Fetcher Tests / Fetcher tests :jablib:fetcherTest ArXivFetcherTest > searchEntryByOldId()
Fetcher Tests / Fetcher tests :jablib:fetcherTest ArXivFetcherTest > searchEntryByPartOfTitle()
Fetcher Tests / Fetcher tests :jablib:fetcherTest ArXivFetcherTest > searchEntryByPartOfTitleWithAcuteAccent()
Fetcher Tests / Fetcher tests :jablib:fetcherTest ArXivFetcherTest > supportsPhraseSearch()
Fetcher Tests / Fetcher tests :jablib:fetcherTest CompositeIdFetcherTest > performSearchByIdReturnsCorrectEntryForIdentifier(String, BibEntry, String) > 1 "performSearchByIdReturnsCorrectEntryForArXivId"
Fetcher Tests / Fetcher tests :jablib:fetcherTest CrawlerTest > whetherAllFilesAreCreated()
Fetcher Tests / Fetcher tests :jablib:fetcherTest CrossRefTest > performSearchByIdFindsPaperWithoutTitle()
Fetcher Tests / Fetcher tests :jablib:fetcherTest GrobidPlainCitationParserTest > grobidPerformSearchCorrectResultTest(String, BibEntry, String) > "example1"
Fetcher Tests / Fetcher tests :jablib:fetcherTest GrobidPlainCitationParserTest > grobidPerformSearchCorrectResultTest(String, BibEntry, String) > "example2"
Fetcher Tests / Fetcher tests :jablib:fetcherTest GrobidPlainCitationParserTest > grobidPerformSearchCorrectResultTest(String, BibEntry, String) > "example3"
Fetcher Tests / Fetcher tests :jablib:fetcherTest GrobidPlainCitationParserTest > grobidPerformSearchCorrectResultTest(String, BibEntry, String) > "example4"
Fetcher Tests / Fetcher tests :jablib:fetcherTest GrobidPlainCitationParserTest > grobidPerformSearchWithEmptyStringTest()
Fetcher Tests / Fetcher tests :jablib:fetcherTest GrobidServiceTest > extractsReferencesFromPdf()
Fetcher Tests / Fetcher tests :jablib:fetcherTest GrobidServiceTest > processEmptyStringTest()
Fetcher Tests / Fetcher tests :jablib:fetcherTest GrobidServiceTest > processPdfTest()
Fetcher Tests / Fetcher tests :jablib:fetcherTest GrobidServiceTest > processValidCitationTest()
Fetcher Tests / Fetcher tests :jablib:fetcherTest ISIDOREFetcherTest > author()
Fetcher Tests / Fetcher tests :jablib:fetcherTest ISIDOREFetcherTest > checkThesis()
Fetcher Tests / Fetcher tests :jablib:fetcherTest ISIDOREFetcherTest > noResults()
Fetcher Tests / Fetcher tests :jablib:fetcherTest LibraryOfCongressTest > performSearchById()
Fetcher Tests / Fetcher tests :jablib:fetcherTest MedlineFetcherTest > emptyEntryList()
Fetcher Tests / Fetcher tests :jablib:fetcherTest MedlineFetcherTest > multipleEntries()
Fetcher Tests / Fetcher tests :jablib:fetcherTest MedlineFetcherTest > searchByIDEndharti()
Fetcher Tests / Fetcher tests :jablib:fetcherTest MedlineFetcherTest > searchByIDIchikawa()
Fetcher Tests / Fetcher tests :jablib:fetcherTest MedlineFetcherTest > searchByIDSari()
Fetcher Tests / Fetcher tests :jablib:fetcherTest MedlineFetcherTest > searchByIDWijedasa()
Fetcher Tests / Fetcher tests :jablib:fetcherTest MedlineFetcherTest > withLuceneQueryAuthorDate()
Fetcher Tests / Fetcher tests :jablib:fetcherTest MedlineFetcherTest > withLuceneQueryAuthorDateRange()
Fetcher Tests / Fetcher tests :jablib:fetcherTest OpenAlexFetcherTest > getURLForQueryBuildsSearchUrl()
Fetcher Tests / Fetcher tests :jablib:fetcherTest OpenAlexFetcherTest > getURLForQueryWithLucene()
Fetcher Tests / Fetcher tests :jablib:fetcherTest OpenAlexFetcherTest > parserParsesResultsArray()
Fetcher Tests / Fetcher tests :jablib:fetcherTest OpenAlexFetcherTest > parserParsesSingleWorkObject()
Fetcher Tests / Fetcher tests :jablib:fetcherTest OpenAlexFetcherTest > searchByQueryFindsEntry()
Fetcher Tests / Fetcher tests :jablib:fetcherTest OpenAlexFetcherTest > searchByQuotedQueryFindsEntry()
Fetcher Tests / Fetcher tests :jablib:fetcherTest PdfMergeMetadataImporterTest > fetchArxivInformationForPdfWithArxivId()
Fetcher Tests / Fetcher tests :jablib:fetcherTest PdfMergeMetadataImporterTest > importRelativizesFilePath()
Fetcher Tests / Fetcher tests :jablib:fetcherTest PdfMergeMetadataImporterTest > pdfMetadataExtractedFrom2024SPLCBecker()
Fetcher Tests / Fetcher tests :jablib:fetcherTest SemanticScholarTest > getDocument()
Fetcher Tests / Fetcher tests :jablib:fetcherTest URLDownloadTest > downloadToTemporaryFileKeepsName()
Fetcher Tests / Fetcher tests :jablib:fetcherTest URLDownloadTest > test429ErrorThrowsFetcherClientException()
Fetcher Tests / Fetcher tests :jablib:fetcherTest URLDownloadTest > test503ErrorThrowsFetcherServerException()
Fetcher Tests / Fetcher tests :jablib:fetcherTest ZbMATHTest > searchByEntryFindsEntry()
Fetcher Tests / Fetcher tests :jablib:fetcherTest ZbMATHTest > searchByIdFindsEntry()
Fetcher Tests / Fetcher tests :jablib:fetcherTest ZbMATHTest > searchByIdInEntryFindsEntry()
Fetcher Tests / Fetcher tests :jablib:fetcherTest ZbMATHTest > searchByQueryFindsEntry()

🏷️ Commit: 8eaa5e0
▶️ Tests: 19811 executed
⚪️ Checks: 50/50 completed

Test Failures (first 5 of 50)

ArXivFetcherTest > abstractIsCleanedUp() (:jablib:fetcherTest in Fetcher Tests / Fetcher tests)
org.jabref.logic.importer.FetcherException: arXiv API request failed
URL: https://export.arxiv.org/api/query?id_list=2407.02238&start=0&max_results=1
	at org.jabref.logic.importer.fetcher.ArXivFetcher$ArXiv.callApi(ArXivFetcher.java:535)
	at org.jabref.logic.importer.fetcher.ArXivFetcher$ArXiv.queryApi(ArXivFetcher.java:477)
	at org.jabref.logic.importer.fetcher.ArXivFetcher$ArXiv.searchForEntryById(ArXivFetcher.java:417)
	at org.jabref.logic.importer.fetcher.ArXivFetcher$ArXiv.performSearchById(ArXivFetcher.java:609)
	at org.jabref.logic.importer.fetcher.ArXivFetcher$ArXiv.lambda$asyncPerformSearchById$0(ArXivFetcher.java:600)
	at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1789)
	at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1781)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:511)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1450)
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:2019)
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:187)
Caused by: java.io.IOException: Server returned HTTP response code: 429 for URL: https://export.arxiv.org/api/query?id_list=2407.02238&start=0&max_results=1
	at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:483)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1751)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1321)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1302)
	at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:223)
	at org.jabref.logic.importer.fetcher.ArXivFetcher$ArXiv.callApi(ArXivFetcher.java:532)
	... 10 more
Caused by: java.io.IOException: Server returned HTTP response code: 429 for URL: https://export.arxiv.org/api/query?id_list=2407.02238&start=0&max_results=1
	at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1700)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1302)
	at java.base/java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:493)
	at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:307)
	at org.jabref.logic.importer.fetcher.ArXivFetcher$ArXiv.callApi(ArXivFetcher.java:528)
	... 10 more
ArXivFetcherTest > findFullTextByDOI() (:jablib:fetcherTest in Fetcher Tests / Fetcher tests)
org.opentest4j.AssertionFailedError: expected: <Optional[https://arxiv.org/pdf/cond-mat/0406246v1]> but was: <Optional.empty>
	at org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:158)
	at org.junit.jupiter.api.AssertionFailureBuilder.buildAndThrow(AssertionFailureBuilder.java:139)
	at org.junit.jupiter.api.AssertEquals.failNotEqual(AssertEquals.java:201)
	at org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:184)
	at org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:179)
	at org.junit.jupiter.api.Assertions.assertEquals(Assertions.java:1188)
	at org.jabref.logic.importer.fetcher.ArXivFetcherTest.findFullTextByDOI(ArXivFetcherTest.java:202)
expected actual
Optional[https://arxiv.org/pdf/cond-mat/0406246v1] Optional.empty
ArXivFetcherTest > findFullTextByTitle() (:jablib:fetcherTest in Fetcher Tests / Fetcher tests)
org.opentest4j.AssertionFailedError: expected: <Optional[https://arxiv.org/pdf/cond-mat/0406246v1]> but was: <Optional.empty>
	at org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:158)
	at org.junit.jupiter.api.AssertionFailureBuilder.buildAndThrow(AssertionFailureBuilder.java:139)
	at org.junit.jupiter.api.AssertEquals.failNotEqual(AssertEquals.java:201)
	at org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:184)
	at org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:179)
	at org.junit.jupiter.api.Assertions.assertEquals(Assertions.java:1188)
	at org.jabref.logic.importer.fetcher.ArXivFetcherTest.findFullTextByTitle(ArXivFetcherTest.java:229)
expected actual
Optional[https://arxiv.org/pdf/cond-mat/0406246v1] Optional.empty
ArXivFetcherTest > findFullTextByTitleWithCurlyBracket() (:jablib:fetcherTest in Fetcher Tests / Fetcher tests)
org.opentest4j.AssertionFailedError: expected: <Optional[https://arxiv.org/pdf/2010.15942v3]> but was: <Optional.empty>
	at org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:158)
	at org.junit.jupiter.api.AssertionFailureBuilder.buildAndThrow(AssertionFailureBuilder.java:139)
	at org.junit.jupiter.api.AssertEquals.failNotEqual(AssertEquals.java:201)
	at org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:184)
	at org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:179)
	at org.junit.jupiter.api.Assertions.assertEquals(Assertions.java:1188)
	at org.jabref.logic.importer.fetcher.ArXivFetcherTest.findFullTextByTitleWithCurlyBracket(ArXivFetcherTest.java:236)
expected actual
Optional[https://arxiv.org/pdf/2010.15942v3] Optional.empty
ArXivFetcherTest > findFullTextByTitleWithCurlyBracketAndPartOfAuthor() (:jablib:fetcherTest in Fetcher Tests / Fetcher tests)
org.opentest4j.AssertionFailedError: expected: <Optional[https://arxiv.org/pdf/2010.15942v3]> but was: <Optional.empty>
	at org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:158)
	at org.junit.jupiter.api.AssertionFailureBuilder.buildAndThrow(AssertionFailureBuilder.java:139)
	at org.junit.jupiter.api.AssertEquals.failNotEqual(AssertEquals.java:201)
	at org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:184)
	at org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:179)
	at org.junit.jupiter.api.Assertions.assertEquals(Assertions.java:1188)
	at org.jabref.logic.importer.fetcher.ArXivFetcherTest.findFullTextByTitleWithCurlyBracketAndPartOfAuthor(ArXivFetcherTest.java:268)
expected actual
Optional[https://arxiv.org/pdf/2010.15942v3] Optional.empty

Muted Tests

Select tests to mute in this pull request:

  • ArXivFetcherTest > abstractIsCleanedUp()
  • ArXivFetcherTest > findFullTextByDOI()
  • ArXivFetcherTest > findFullTextByTitle()
  • ArXivFetcherTest > findFullTextByTitleWithCurlyBracket()
  • ArXivFetcherTest > findFullTextByTitleWithCurlyBracketAndPartOfAuthor()
  • ArXivFetcherTest > searchEntryByOldId()
  • ArXivFetcherTest > searchEntryByPartOfTitle()
  • ArXivFetcherTest > searchEntryByPartOfTitleWithAcuteAccent()
  • ArXivFetcherTest > supportsPhraseSearch()
  • CompositeIdFetcherTest > performSearchByIdReturnsCorrectEntryForIdentifier(String, BibEntry, String)
  • CrawlerTest > whetherAllFilesAreCreated()
  • CrossRefTest > performSearchByIdFindsPaperWithoutTitle()
  • GrobidPlainCitationParserTest > grobidPerformSearchCorrectResultTest(String, BibEntry, String)
  • GrobidPlainCitationParserTest > grobidPerformSearchWithEmptyStringTest()
  • GrobidServiceTest > extractsReferencesFromPdf()
  • GrobidServiceTest > processEmptyStringTest()
  • GrobidServiceTest > processPdfTest()
  • GrobidServiceTest > processValidCitationTest()
  • ISIDOREFetcherTest > author()
  • ISIDOREFetcherTest > checkThesis()
  • ISIDOREFetcherTest > noResults()
  • LibraryOfCongressTest > performSearchById()
  • MedlineFetcherTest > emptyEntryList()
  • MedlineFetcherTest > multipleEntries()
  • MedlineFetcherTest > searchByIDEndharti()
  • MedlineFetcherTest > searchByIDIchikawa()
  • MedlineFetcherTest > searchByIDSari()
  • MedlineFetcherTest > searchByIDWijedasa()
  • MedlineFetcherTest > withLuceneQueryAuthorDate()
  • MedlineFetcherTest > withLuceneQueryAuthorDateRange()
  • OpenAlexFetcherTest > getURLForQueryBuildsSearchUrl()
  • OpenAlexFetcherTest > getURLForQueryWithLucene()
  • OpenAlexFetcherTest > parserParsesResultsArray()
  • OpenAlexFetcherTest > parserParsesSingleWorkObject()
  • OpenAlexFetcherTest > searchByQueryFindsEntry()
  • OpenAlexFetcherTest > searchByQuotedQueryFindsEntry()
  • PdfMergeMetadataImporterTest > fetchArxivInformationForPdfWithArxivId()
  • PdfMergeMetadataImporterTest > importRelativizesFilePath()
  • PdfMergeMetadataImporterTest > pdfMetadataExtractedFrom2024SPLCBecker()
  • SemanticScholarTest > getDocument()
  • URLDownloadTest > downloadToTemporaryFileKeepsName()
  • URLDownloadTest > test429ErrorThrowsFetcherClientException()
  • URLDownloadTest > test503ErrorThrowsFetcherServerException()
  • ZbMATHTest > searchByEntryFindsEntry()
  • ZbMATHTest > searchByIdFindsEntry()
  • ZbMATHTest > searchByIdInEntryFindsEntry()
  • ZbMATHTest > searchByQueryFindsEntry()

Reuse successful test results:

  • ♻️ Only rerun the tests that failed or were muted before

Click the checkbox to trigger a rerun:

  • Rerun jobs

Learn more about TestLens at testlens.app.

@LoayTarek5
Copy link
Copy Markdown
Contributor Author

I think the jbang build failure is a CI issue jablib:6.0-SNAPSHOT is not available in the local Maven repo when jbang tries to resolve it, so i believe that it is unrelated to this PR.

@github-actions github-actions bot added status: changes-required Pull requests that are not yet complete and removed status: no-bot-comments labels Apr 8, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 8, 2026

Your pull request conflicts with the target branch.

Please merge with your code. For a step-by-step guide to resolve merge conflicts, see https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/addressing-merge-conflicts/resolving-a-merge-conflict-using-the-command-line.

@github-actions github-actions bot added status: no-bot-comments and removed status: changes-required Pull requests that are not yet complete labels Apr 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rewrite journal abbrevation repository

3 participants