Skip to content

Pseudonymization does not work correctly. #14122

@ravatex

Description

@ravatex

JabRef version

Latest development branch build (please note build date below)

Operating system

Windows

Details on version and operating system

6.16.7-arch1-1, EndeavourOS Linux x86_64

Checked with the latest development build (copy version output from About dialog)

  • I made a backup of my libraries before testing the latest development version.
  • I have tested the latest development version and the problem persists

Steps to reproduce the behaviour

  1. run $ ./gradlew run:jabkit --args='pseudonymize --input="some_bib.bib"'

output:

java.lang.NullPointerException: Cannot invoke "java.nio.file.Path.toString()" because "this.outputFile" is null
        at org.jabref.jabkit/org.jabref.cli.Pseudonymize.run(Pseudonymize.java:53)
        at info.picocli@4.7.7/picocli.CommandLine.executeUserObject(CommandLine.java:2045)
        at info.picocli@4.7.7/picocli.CommandLine.access$1500(CommandLine.java:148)
        at info.picocli@4.7.7/picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2469)
        at info.picocli@4.7.7/picocli.CommandLine$RunLast.handle(CommandLine.java:2461)
        at info.picocli@4.7.7/picocli.CommandLine$RunLast.handle(CommandLine.java:2423)
        at info.picocli@4.7.7/picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2277)
        at info.picocli@4.7.7/picocli.CommandLine$RunLast.execute(CommandLine.java:2425)
        at info.picocli@4.7.7/picocli.CommandLine.execute(CommandLine.java:2174)
        at org.jabref.jabkit/org.jabref.JabKit.main(JabKit.java:99)

> Task :jabkit:run FAILED

FAILURE: Build failed with an exception.

There is also another bug whenever you actually provide the output.

I have fixed this in a local branch but wanted to make sure that this was in fact unintended behavior before making a PR. If someone experienced in jabkit/jabref tells me this is unintended I will make the PR.

Appendix

Bib file: Chocolate.bib
@Article{Corti_2009,
  author       = {Corti, Roberto and Flammer, Andreas J. and Hollenberg, Norman K. and Lüscher, Thomas F.},
  date         = {2009-03},
  journaltitle = {Circulation},
  title        = {Cocoa and Cardiovascular Health},
  doi          = {10.1161/circulationaha.108.827022},
  issn         = {1524-4539},
  number       = {10},
  pages        = {1433--1441},
  volume       = {119},
  publisher    = {Ovid Technologies (Wolters Kluwer Health)},
}

@Article{Cooper_2007,
  author       = {Cooper, Karen A. and Donovan, Jennifer L. and Waterhouse, Andrew L. and Williamson, Gary},
  date         = {2007-08},
  journaltitle = {British Journal of Nutrition},
  title        = {Cocoa and health: a decade of research},
  doi          = {10.1017/s0007114507795296},
  issn         = {1475-2662},
  number       = {1},
  pages        = {1--11},
  volume       = {99},
  publisher    = {Cambridge University Press (CUP)},
}

@Article{Ding_2006,
  author       = {Ding, Eric L and Hutfless, Susan M and Ding, Xin and Girotra, Saket},
  date         = {2006-01},
  journaltitle = {Nutrition \& Metabolism},
  title        = {Chocolate and Prevention of Cardiovascular Disease: A Systematic Review},
  doi          = {10.1186/1743-7075-3-2},
  issn         = {1743-7075},
  number       = {1},
  volume       = {3},
  publisher    = {Springer Science and Business Media LLC},
}

@Article{Keen_2001,
  author       = {Keen, Carl L.},
  date         = {2001-10},
  journaltitle = {Journal of the American College of Nutrition},
  title        = {Chocolate: Food as Medicine/Medicine as Food},
  doi          = {10.1080/07315724.2001.10719181},
  issn         = {1541-1087},
  number       = {sup5},
  pages        = {436S--439S},
  volume       = {20},
  publisher    = {Informa UK Limited},
}

@Article{Katz_2011,
  author       = {Katz, David L. and Doughty, Kim and Ali, Ather},
  date         = {2011-11},
  journaltitle = {Antioxidants \& Redox Signaling},
  title        = {Cocoa and Chocolate in Human Health and Disease},
  doi          = {10.1089/ars.2010.3697},
  issn         = {1557-7716},
  number       = {10},
  pages        = {2779--2811},
  volume       = {15},
  publisher    = {Mary Ann Liebert Inc},
  readstatus   = {skimmed},
}

@Article{Parker_2006,
  author       = {Parker, Gordon and Parker, Isabella and Brotchie, Heather},
  date         = {2006-06},
  journaltitle = {Journal of Affective Disorders},
  title        = {Mood state effects of chocolate},
  doi          = {10.1016/j.jad.2006.02.007},
  issn         = {0165-0327},
  number       = {2–3},
  pages        = {149--159},
  volume       = {92},
  groups       = {Used},
  publisher    = {Elsevier BV},
  readstatus   = {read},
}

@Article{Scholey_2013,
  author       = {Scholey, Andrew and Owen, Lauren},
  date         = {2013-10},
  journaltitle = {Nutrition Reviews},
  title        = {Effects of chocolate on cognitive function and mood: a systematic review},
  doi          = {10.1111/nure.12065},
  issn         = {0029-6643},
  number       = {10},
  pages        = {665--681},
  volume       = {71},
  groups       = {Used},
  publisher    = {Oxford University Press (OUP)},
  readstatus   = {read},
}

@Article{Tan_2021,
  author       = {Tan, Terence Yew Chin and Lim, Xin Yi and Yeo, Julie Hsiao Hui and Lee, Shaun Wen Huey and Lai, Nai Ming},
  date         = {2021-08},
  journaltitle = {Nutrients},
  title        = {The Health Effects of Chocolate and Cocoa: A Systematic Review},
  doi          = {10.3390/nu13092909},
  issn         = {2072-6643},
  number       = {9},
  pages        = {2909},
  volume       = {13},
  publisher    = {MDPI AG},
  readstatus   = {skimmed},
}

@Article{Macht_2007,
  author       = {Macht, Michael and Mueller, Jochen},
  date         = {2007-11},
  journaltitle = {Appetite},
  title        = {Immediate effects of chocolate on experimentally induced mood states},
  doi          = {10.1016/j.appet.2007.05.004},
  issn         = {0195-6663},
  number       = {3},
  pages        = {667--674},
  volume       = {49},
  groups       = {Used},
  publisher    = {Elsevier BV},
  readstatus   = {read},
}

@Article{Tokede_2011,
  author       = {Tokede, O A and Gaziano, J M and Djoussé, L},
  date         = {2011-05},
  journaltitle = {European Journal of Clinical Nutrition},
  title        = {Effects of cocoa products/dark chocolate on serum lipids: a meta-analysis},
  doi          = {10.1038/ejcn.2011.64},
  issn         = {1476-5640},
  number       = {8},
  pages        = {879--886},
  volume       = {65},
  publisher    = {Springer Science and Business Media LLC},
}

@Article{Garcia_2018,
  author       = {Garcia, Jose P and Santana, Adrian and Baruqui, Diego Lugo and Suraci, Nicholas},
  date         = {2018-12},
  journaltitle = {Reviews in Cardiovascular Medicine},
  title        = {The Cardiovascular effects of chocolate.},
  doi          = {10.31083/j.rcm.2018.04.3187},
  issn         = {2153-8174},
  number       = {4},
  volume       = {19},
  publisher    = {IMR Press},
}

@Article{Hooper_2012,
  author       = {Hooper, Lee and Kay, Colin and Abdelhamid, Asmaa and Kroon, Paul A and Cohn, Jeffrey S and Rimm, Eric B and Cassidy, Aedín},
  date         = {2012-03},
  journaltitle = {The American Journal of Clinical Nutrition},
  title        = {Effects of chocolate, cocoa, and flavan-3-ols on cardiovascular health: a systematic review and meta-analysis of randomized trials},
  doi          = {10.3945/ajcn.111.023457},
  issn         = {0002-9165},
  number       = {3},
  pages        = {740--751},
  volume       = {95},
  publisher    = {Elsevier BV},
  readstatus   = {skimmed},
}

@Article{Di_Renzo_2012,
  author       = {Di Renzo, Gian Carlo and Brillo, Eleonora and Romanelli, Maila and Porcaro, Giuseppina and Capanna, Federica and Kanninen, Tomi T and Gerli, Sandro and Clerici, Graziano},
  date         = {2012-06},
  journaltitle = {The Journal of Maternal-Fetal \& Neonatal Medicine},
  title        = {Potential effects of chocolate on human pregnancy: a randomized controlled trial},
  doi          = {10.3109/14767058.2012.683085},
  issn         = {1476-4954},
  number       = {10},
  pages        = {1860--1867},
  volume       = {25},
  groups       = {Used},
  publisher    = {Informa UK Limited},
  readstatus   = {read},
}

@Article{Richard_2017,
  author       = {Richard, Anna and Meule, Adrian and Friese, Malte and Blechert, Jens},
  date         = {2017-09},
  journaltitle = {Frontiers in Psychology},
  title        = {Effects of Chocolate Deprivation on Implicit and Explicit Evaluation of Chocolate in High and Low Trait Chocolate Cravers},
  doi          = {10.3389/fpsyg.2017.01591},
  issn         = {1664-1078},
  volume       = {8},
  groups       = {Used},
  publisher    = {Frontiers Media SA},
  readstatus   = {read},
}

@Article{Fulton_1969,
  author       = {Fulton, James E., Jr. and Plewig, Gerd and Kligman, Albert M.},
  date         = {1969-12},
  journaltitle = {JAMA: The Journal of the American Medical Association},
  title        = {{Effect of Chocolate on Acne Vulgaris}},
  doi          = {10.1001/jama.1969.03160370055011},
  eprint       = {https://jamanetwork.com/journals/jama/articlepdf/350738/jama\_210\_11\_011.pdf},
  issn         = {0098-7484},
  number       = {11},
  pages        = {2071-2074},
  url          = {https://doi.org/10.1001/jama.1969.03160370055011},
  volume       = {210},
  publisher    = {American Medical Association (AMA)},
}

@Comment{jabref-meta: databaseType:biblatex;}

@Comment{jabref-meta: fileDirectory:pdfs;}

@Comment{jabref-meta: grouping:
0 AllEntriesGroup:;
1 SearchGroup:Entries without a group\;0\;groups !=~ .+\;0\;1\;1\;\;\;\;;
1 SearchGroup:Entries without a linked file\;0\;file !=~ .+\;0\;1\;1\;\;\;\;;
1 StaticGroup:Paywalled\;0\;1\;\;\;\;;
1 SearchGroup:To read\;0\;groups !=~ .+ and readstatus !=~ .+\;0\;1\;1\;0x008080ff\;\;\;;
1 KeywordGroup:Skimmed\;0\;readstatus\;skimmed\;0\;0\;1\;0xffff00ff\;\;\;;
1 KeywordGroup:Read\;0\;readstatus\;read\;0\;0\;0\;0x00ff00ff\;\;\;;
1 StaticGroup:Used\;0\;1\;0x0000ffff\;\;\;;
}

@Comment{jabref-meta: groups-search-syntax-version:6.0-alpha_1}

@Comment{jabref-meta: keypatterndefault:[auth]_[year];}

Metadata

Metadata

Assignees

Labels

good first issueAn issue intended for project-newcomers. Varies in difficulty.📌 Pinned📍 AssignedAssigned by assign-issue-action (or manually assigned)

Type

No fields configured for bug.

Projects

Status
Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions