Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove predatory journal checker due to false positives #11066

Merged
merged 6 commits into from
Mar 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ Note that this project **does not** adhere to [Semantic Versioning](https://semv

### Removed

- We removed the predatory journal checks due to a high rate of false positives. [#11066](https://github.com/JabRef/jabref/pull/11066)

## [5.12] – 2023-12-24

### Added
Expand Down
14 changes: 2 additions & 12 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -346,18 +346,8 @@ tasks.register("generateJournalListMV", JavaExec) {
}
}

tasks.register("generatePredatoryJournalListMV", JavaExec) {
group = "JabRef"
description = "Load predatory journal information from online sources to a H2 MVStore"
classpath = sourceSets.main.runtimeClasspath
mainClass = "org.jabref.cli.PredatoryJournalsMvGenerator"
onlyIf {
!file("build/resources/main/journals/predatory-journals.mv").exists()
}
}

jar.dependsOn("generateJournalListMV", "generatePredatoryJournalListMV")
compileTestJava.dependsOn("generateJournalListMV","generatePredatoryJournalListMV")
jar.dependsOn("generateJournalListMV")
compileTestJava.dependsOn("generateJournalListMV")

tasks.register('generateCitaviSource', XjcTask) {
group = 'JabRef'
Expand Down
4 changes: 0 additions & 4 deletions src/main/java/org/jabref/Launcher.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
import org.jabref.gui.JabRefGUI;
import org.jabref.logic.UiCommand;
import org.jabref.logic.journals.JournalAbbreviationLoader;
import org.jabref.logic.journals.predatory.PredatoryJournalListLoader;
import org.jabref.logic.net.ProxyAuthenticator;
import org.jabref.logic.net.ProxyPreferences;
import org.jabref.logic.net.ProxyRegisterer;
Expand Down Expand Up @@ -188,9 +187,6 @@ private static void initGlobals(PreferencesService preferences) {
// Read list(s) of journal names and abbreviations
Globals.journalAbbreviationRepository = JournalAbbreviationLoader
.loadRepository(preferences.getJournalAbbreviationPreferences());
Globals.predatoryJournalRepository = PredatoryJournalListLoader
.loadRepository();

Globals.entryTypesManager = preferences.getCustomEntryTypesRepository();
Globals.protectedTermsLoader = new ProtectedTermsLoader(preferences.getProtectedTermsPreferences());
}
Expand Down
47 changes: 0 additions & 47 deletions src/main/java/org/jabref/cli/PredatoryJournalsMvGenerator.java

This file was deleted.

3 changes: 0 additions & 3 deletions src/main/java/org/jabref/gui/Globals.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import org.jabref.gui.util.DefaultTaskExecutor;
import org.jabref.gui.util.TaskExecutor;
import org.jabref.logic.journals.JournalAbbreviationRepository;
import org.jabref.logic.journals.predatory.PredatoryJournalRepository;
import org.jabref.logic.protectedterms.ProtectedTermsLoader;
import org.jabref.logic.remote.RemotePreferences;
import org.jabref.logic.remote.server.RemoteListenerServerManager;
Expand Down Expand Up @@ -51,8 +50,6 @@ public class Globals {
* Only GUI code is allowed to access it, logic code should use dependency injection.
*/
public static JournalAbbreviationRepository journalAbbreviationRepository;
public static PredatoryJournalRepository predatoryJournalRepository;

/**
* This field is initialized upon startup.
* <p>
Expand Down
1 change: 0 additions & 1 deletion src/main/java/org/jabref/gui/JabRefFrame.java
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,6 @@ private void initLayout() {
taskExecutor,
dialogService,
Globals.journalAbbreviationRepository,
Globals.predatoryJournalRepository,
entryTypesManager,
undoManager,
Globals.getClipboardManager());
Expand Down
5 changes: 0 additions & 5 deletions src/main/java/org/jabref/gui/JabRefGUI.java
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,6 @@ public void stop() {
OOBibBaseConnect.closeOfficeConnection();
Globals.stopBackgroundTasks();
Globals.shutdownThreadPools();
try {
Globals.predatoryJournalRepository.close();
} catch (Exception e) {
LOGGER.warn("Cloud not shut down predatoryJournalRepository", e);
}
}

private void setupProxy() {
Expand Down
6 changes: 1 addition & 5 deletions src/main/java/org/jabref/gui/MainMenu.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@
import org.jabref.logic.importer.IdFetcher;
import org.jabref.logic.importer.WebFetchers;
import org.jabref.logic.journals.JournalAbbreviationRepository;
import org.jabref.logic.journals.predatory.PredatoryJournalRepository;
import org.jabref.logic.l10n.Localization;
import org.jabref.logic.util.OS;
import org.jabref.model.entry.BibEntryTypesManager;
Expand All @@ -84,7 +83,6 @@ public class MainMenu extends MenuBar {
private final TaskExecutor taskExecutor;
private final DialogService dialogService;
private final JournalAbbreviationRepository abbreviationRepository;
private final PredatoryJournalRepository predatoryJournalRepository;
private final BibEntryTypesManager entryTypesManager;
private final UndoManager undoManager;
private final ClipBoardManager clipBoardManager;
Expand All @@ -98,7 +96,6 @@ public MainMenu(JabRefFrame frame,
TaskExecutor taskExecutor,
DialogService dialogService,
JournalAbbreviationRepository abbreviationRepository,
PredatoryJournalRepository predatoryJournalRepository,
BibEntryTypesManager entryTypesManager,
UndoManager undoManager,
ClipBoardManager clipBoardManager) {
Expand All @@ -111,7 +108,6 @@ public MainMenu(JabRefFrame frame,
this.taskExecutor = taskExecutor;
this.dialogService = dialogService;
this.abbreviationRepository = abbreviationRepository;
this.predatoryJournalRepository = predatoryJournalRepository;
this.entryTypesManager = entryTypesManager;
this.undoManager = undoManager;
this.clipBoardManager = clipBoardManager;
Expand Down Expand Up @@ -229,7 +225,7 @@ private void createMenu() {
quality.getItems().addAll(
factory.createMenuItem(StandardActions.FIND_DUPLICATES, new DuplicateSearch(frame::getCurrentLibraryTab, dialogService, stateManager, preferencesService, entryTypesManager, taskExecutor)),
factory.createMenuItem(StandardActions.MERGE_ENTRIES, new MergeEntriesAction(dialogService, stateManager, preferencesService)),
factory.createMenuItem(StandardActions.CHECK_INTEGRITY, new IntegrityCheckAction(frame::getCurrentLibraryTab, preferencesService, dialogService, stateManager, taskExecutor, abbreviationRepository, predatoryJournalRepository)),
factory.createMenuItem(StandardActions.CHECK_INTEGRITY, new IntegrityCheckAction(frame::getCurrentLibraryTab, preferencesService, dialogService, stateManager, taskExecutor, abbreviationRepository)),
factory.createMenuItem(StandardActions.CLEANUP_ENTRIES, new CleanupAction(frame::getCurrentLibraryTab, preferencesService, dialogService, stateManager, taskExecutor, undoManager)),

new SeparatorMenuItem(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
import org.jabref.logic.integrity.IntegrityCheck;
import org.jabref.logic.integrity.IntegrityMessage;
import org.jabref.logic.journals.JournalAbbreviationRepository;
import org.jabref.logic.journals.predatory.PredatoryJournalRepository;
import org.jabref.logic.l10n.Localization;
import org.jabref.model.database.BibDatabaseContext;
import org.jabref.model.entry.BibEntry;
Expand All @@ -31,23 +30,19 @@ public class IntegrityCheckAction extends SimpleCommand {
private final PreferencesService preferencesService;
private final StateManager stateManager;
private final JournalAbbreviationRepository abbreviationRepository;
private final PredatoryJournalRepository predatoryJournalRepository;

public IntegrityCheckAction(Supplier<LibraryTab> tabSupplier,
PreferencesService preferencesService,
DialogService dialogService,
StateManager stateManager,
TaskExecutor taskExecutor,
JournalAbbreviationRepository abbreviationRepository,
PredatoryJournalRepository predatoryJournalRepository) {
JournalAbbreviationRepository abbreviationRepository) {
this.tabSupplier = tabSupplier;
this.stateManager = stateManager;
this.taskExecutor = taskExecutor;
this.preferencesService = preferencesService;
this.dialogService = dialogService;
this.abbreviationRepository = abbreviationRepository;
this.predatoryJournalRepository = predatoryJournalRepository;

this.executable.bind(needsDatabase(this.stateManager));
}

Expand All @@ -58,7 +53,6 @@ public void execute() {
preferencesService.getFilePreferences(),
preferencesService.getCitationKeyPatternPreferences(),
abbreviationRepository,
predatoryJournalRepository,
preferencesService.getEntryEditorPreferences().shouldAllowIntegerEditionBibtex());

Task<List<IntegrityMessage>> task = new Task<>() {
Expand Down
8 changes: 2 additions & 6 deletions src/main/java/org/jabref/logic/integrity/IntegrityCheck.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

import org.jabref.logic.citationkeypattern.CitationKeyPatternPreferences;
import org.jabref.logic.journals.JournalAbbreviationRepository;
import org.jabref.logic.journals.predatory.PredatoryJournalRepository;
import org.jabref.model.database.BibDatabase;
import org.jabref.model.database.BibDatabaseContext;
import org.jabref.model.entry.BibEntry;
Expand All @@ -23,7 +22,6 @@ public IntegrityCheck(BibDatabaseContext bibDatabaseContext,
FilePreferences filePreferences,
CitationKeyPatternPreferences citationKeyPatternPreferences,
JournalAbbreviationRepository journalAbbreviationRepository,
PredatoryJournalRepository predatoryJournalRepository,
boolean allowIntegerEdition) {
this.bibDatabaseContext = bibDatabaseContext;

Expand All @@ -42,10 +40,8 @@ public IntegrityCheck(BibDatabaseContext bibDatabaseContext,
new CitationKeyDuplicationChecker(bibDatabaseContext.getDatabase()),
new AmpersandChecker(),
new LatexIntegrityChecker(),
new JournalInAbbreviationListChecker(StandardField.JOURNAL, journalAbbreviationRepository),
new PredatoryJournalChecker(predatoryJournalRepository,
List.of(StandardField.JOURNAL, StandardField.PUBLISHER, StandardField.BOOKTITLE))
));
new JournalInAbbreviationListChecker(StandardField.JOURNAL, journalAbbreviationRepository)));

if (bibDatabaseContext.isBiblatexMode()) {
entryCheckers.add(new UTF8Checker(bibDatabaseContext.getMetaData().getEncoding().orElse(StandardCharsets.UTF_8)));
} else {
Expand Down

This file was deleted.

This file was deleted.

Loading
Loading