Skip to content

Conversation

@InAnYan
Copy link
Member

@InAnYan InAnYan commented Nov 2, 2025

Closes https://github.com/JabRef/jabref-issue-melting-pot/issues/1063

Tried to run a duplicate check after SLR.

Remarks:

  • In general, this should not happen and internally SLR must remove (move, merge, treat) duplicate papers.
  • I'm not sure that the chosen approach of AutomaticDuplicateRemover is right.

Steps to test

  1. Checkout to the latest main branch
  2. Run SLR with any query (I used for testing: greek, greeks, ancient greeks)
  3. I got around 458 entries

After I run a duplicate finder with clicking "Keep merged", I got 449 entries.

Then:

  1. Checkout to this PR
  2. Run the same SLR
  3. See that you got 449 entries

Mandatory checks

  • 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 described the change in CHANGELOG.md in a way that is understandable for the average user (if change is visible to the user)
  • I checked the user documentation: Is the information available and up to date? If not, I created an issue at https://github.com/JabRef/user-documentation/issues or, even better, I submitted a pull request updating file(s) in https://github.com/JabRef/user-documentation/tree/main/en.

@jabref-machine
Copy link
Collaborator

Your code currently does not meet JabRef's code guidelines. IntelliJ auto format covers some cases. There seem to be issues with your code style and autoformat configuration. Please reformat your code (Ctrl+Alt+L) and commit, then push.

In special cases, consider using // formatter:off and // formatter:on annotations to allow deviation from the code style.

BibDatabase database = databaseContext.getDatabase();
List<BibEntry> entries = database.getEntries();
List<BibEntry> entriesToRemove = new ArrayList<>();
Set<BibEntry> handledEntries = new HashSet<>();
Copy link
Member

Choose a reason for hiding this comment

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

The way the looping is done now, it is guaranteed that you won't "handle" the same pair of entries twice, so the handledEntries set and the conditions are redundant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants