Add group pseudonymization support (fixes #14117)#15258
Conversation
|
Hey @f0restron07! 👋 Thank you for contributing to JabRef! We have automated checks in place, based on which you will soon get feedback if any of them are failing. We also use Qodo for review assistance. It will update your pull request description with a review help and offer suggestions to improve the pull request. After all automated checks pass, a maintainer will also review your contribution. Once that happens, you can go through their comments in the "Files changed" tab and act on them, or reply to the conversation if you have further inputs. You can read about the whole pull request process in our contribution guide. Please ensure that your pull request is in line with our AI Usage Policy and make necessary disclosures. |
Review Summary by QodoAdd group pseudonymization support for library anonymization
WalkthroughsDescription• Add group tree pseudonymization to library anonymization process • Groups renamed to sequential identifiers (group-1, group-2, etc.) • Recursively pseudonymize group hierarchies preserving tree structure • Remove file field from test data and update expected output Diagramflowchart LR
A["BibDatabaseContext"] -->|extract groups| B["GroupTreeNode"]
B -->|pseudonymizeGroupTree| C["Renamed Groups<br/>group-1, group-2..."]
C -->|add to metadata| D["Pseudonymized<br/>BibDatabaseContext"]
E["valueMapping"] -->|track mappings| D
File Changes1. jablib/src/main/java/org/jabref/logic/pseudonymization/Pseudonymization.java
|
Code Review by Qodo
1.
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
2026-03-03.15-14-59.mp4 |
koppor
left a comment
There was a problem hiding this comment.
- Tests missing
- file field removed
- int[] is a hack. Should be made differentlt
"Steps to test" removed. Indicator for too much AI usage. Therefore only brief review.
|
Thanks for the review.. I'll address each of the pt:
|
This comment has been minimized.
This comment has been minimized.
|
Hey @koppor
Should I change this back and leave this as a separate issue? |
Is strange. Isn't it possible with normal recursion? In tests we use "withField", not setField "pt" in comment text strange |
This comment has been minimized.
This comment has been minimized.
No screenshot or video recording is provided in the description. Please add them. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
@koppor
|
|
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. |
da5ee4c to
ac1dfa8
Compare
ac1dfa8 to
1a08b09
Compare
1a08b09 to
965e5b7
Compare
|
please don't rebase/force-push. |
|
@subhramit @koppor sorry for the force push stuff earlier didnt intend to do it but i needed to recover from corrupted merge state had pulled a bad rebase of unrelatd commit from main . |
| String originalName = keyword.toString(); | ||
| String pseudoName = groupNameMapping.get(originalName); | ||
| if (pseudoName == null) { | ||
| pseudoName = "group-" + (groupNameMapping.size() + 1); |
There was a problem hiding this comment.
"group-" should become a constant GROUP_PREFIX
@f0restron07 could you fix that? I know this PR has been hanging around for long - so feel free to just address @InAnYan's comments here and fix this in a follow-up PR. Edit - I am fine if this search groups is left as-is. As per discussion with @InAnYan on call, this needs to be thought about a bit more if it carries any semantic meaning (and thus if it also needs to be pseudonymized). |
|
@InAnYan i have extracted the group_prefix const and also reformatted Pseudonymizationtest setup/action/check blocks with blank lines and @subhramit i have left the search group syntax fix as is pending and lmk if any changes needed further. |
* upstream/main: (29 commits) Chore(deps): Bump dev.langchain4j:langchain4j-bom in /versions (JabRef#15853) Chore(deps): Bump org.glassfish.jaxb:jaxb-runtime in /versions (JabRef#15854) Chore(deps): Bump com.gradleup.shadow:shadow-gradle-plugin (JabRef#15852) Chore(deps): Bump com.gradleup.shadow:shadow-gradle-plugin (JabRef#15849) Chore(deps): Bump com.autonomousapps:dependency-analysis-gradle-plugin (JabRef#15850) Update dependency org.apache.maven.plugins:maven-surefire-plugin to v3.5.6 (JabRef#15844) Fix reset and import of AiPreferences (JabRef#15843) Fix Comparable Contract Violation in SharedBibEntryData (JabRef#15806) (JabRef#15842) Chore(deps): Bump com.dlsc.gemsfx:gemsfx from 4.0.5 to 4.1.0 in /versions (JabRef#15841) Chore(deps): Bump jablib/src/main/resources/csl-styles (JabRef#15840) New Crowdin updates (JabRef#15839) Add group pseudonymization support (fixes JabRef#14117) (JabRef#15258) Feature parse MeSH terms in PubMed MEDLINE records (JabRef#15529) Fix/non latin author parsed as name prefix (JabRef#15823) Fix not on fx thread cleanup (JabRef#15835) Fix garbled BibEntry Javadoc example (JabRef#15834) Revert "Fix cleanup operationn setFiles not on fx thread causes exceptiosn" Revert "changelog" changelog Fix cleanup operationn setFiles not on fx thread causes exceptiosn ...


Description
added group pseudonymization before this only entries were pseudonymized now groups get pseudonymized too for eg group-1,group-2,...etc
Changes
Testing
Before (original groups):
After (pseudonymized groups):
Fixes #14117
AI Disclosure
I used Chatgpt AI to assist with understanding the codebase and debugging.
Checklist