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

2.11b4. Journal abbreviation duplicate detection #173

Closed
ambro2 opened this issue Sep 20, 2015 · 10 comments
Closed

2.11b4. Journal abbreviation duplicate detection #173

ambro2 opened this issue Sep 20, 2015 · 10 comments

Comments

@ambro2
Copy link
Contributor

ambro2 commented Sep 20, 2015

Journal abbreviations in personal or external list are always detected as duplicate.

In an account that never used JabRef (no admin privileges) I started JabRef from the command line. I created a new journal abbreviation and closed. Starting again from the command line I get the following output:

C:\Javasoft\JabRef_Beta>java -jar JabRef-2.11b4.jar
set 20, 2015 9:44:36 AM java.util.prefs.WindowsPreferences <init>
AVVERTENZA: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0x80000002. Windows RegCreateKeyEx(...) returned error code 5.
Sep 20, 2015 9:44:37 AM org.java.plugin.registry.xml.ManifestParser <init>
INFO: got SAX parser factory - com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl@28f67ac7
Sep 20, 2015 9:44:37 AM org.java.plugin.registry.xml.PluginRegistryImpl configure
INFO: configured, stopOnError=false, isValidating=true
Sep 20, 2015 9:44:37 AM org.java.plugin.registry.xml.PluginRegistryImpl register
INFO: plug-in and fragment descriptors registered - 2
Sep 20, 2015 9:44:37 AM net.sf.jabref.plugin.PluginCore initialize
INFO: Found 2 plugin(s):
  - net.sf.jabref.export.misq (jar:file:/C:/Javasoft/JabRef_Beta/JabRef-2.11b4.jar!/plugins/net.sf.jabref.export.misq/plugin.xml)
  - net.sf.jabref.core (jar:file:/C:/Javasoft/JabRef_Beta/JabRef-2.11b4.jar!/plugins/net.sf.jabref.core/plugin.xml)

Sep 20, 2015 9:44:37 AM org.java.plugin.standard.StandardPluginManager activatePlugin
INFO: plug-in started - net.sf.jabref.core@2.0.0.4b1 (active/total: 1 of 2)
Sep 20, 2015 9:44:37 AM org.java.plugin.standard.StandardPluginManager activatePlugin
INFO: plug-in started - net.sf.jabref.export.misq@1.0.0 (active/total: 2 of 2)
Duplicate Journal Abbreviation - old one will be overwritten by new one
OLD: Abbreviation{name=Test Journal of Motorcycle Repair, iso=Test J. Mot. Rep., medline=Test J Mot Rep}
NEW: Abbreviation{name=Test Journal of Motorcycle Repair, iso=Test J. Mot. Rep., medline=Test J Mot Rep}

See the last two lines
Same behaviour in Linux (Fedora 21).

Further, if "Use IEEE LaTeX abbreviations" is checked in preferences, then the output contains also lines like the following:

Duplicate Journal Abbreviation - old one will be overwritten by new one
OLD: Abbreviation{name=IEEE Transactions on Aerospace and Electronic Systems, iso=IEEE Trans. Aerosp. Electron. Syst., medline=IEEE Trans Aerosp Electron Syst}
NEW: Abbreviation{name=IEEE Transactions on Aerospace and Electronic Systems, iso=#IEEE_J_AES#, medline=#IEEE_J_AES#}
....
....
Duplicate Journal Abbreviation - old one will be overwritten by new one
OLD: Abbreviation{name=IEEE Distributed Systems Online, iso=IEEE Distrib. Syst. Online, medline=IEEE Distrib Syst Online}
NEW: Abbreviation{name=IEEE Distributed Systems Online, iso=#IEEE_O_DSO#, medline=#IEEE_O_DSO#}

The system is Windows 7 Professional 64 bit. Java 1.8.0.60

C:\Javasoft\JabRef_Beta>java -version
java version "1.8.0_60"
Java(TM) SE Runtime Environment (build 1.8.0_60-b27)
Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode)

Hope it helps.

@simonharrer
Copy link
Contributor

What behavior would you expect JabRef to have?

@ambro2
Copy link
Contributor Author

ambro2 commented Sep 20, 2015

I expect that JabRef wouldn't output the error message about a duplicate abbreviation if there is no real duplicate in the personal abbreviation list (see the last two lines of the first output above).
Sorry for not having explained properly.

@simonharrer
Copy link
Contributor

Ok, so you say that the duplicate check should only be done per file -> only check for duplicates in the personal abbreviation list. Replacing a default abbreviation with a personal one should not result in a duplicate warning. Is this what you mean?

@ambro2
Copy link
Contributor Author

ambro2 commented Sep 21, 2015

Not exactly. I find that if you create a new abbreviation, not present in the default list, the program warns about a duplicate.
In the example above I created an abbreviation for the fake journal "Test Journal of Motorcycle Repair", which is not in the default list, but only in the personal list. JabRef then warns that it's a duplicate:

Duplicate Journal Abbreviation - old one will be overwritten by new one
OLD: Abbreviation{name=Test Journal of Motorcycle Repair, iso=Test J. Mot. Rep., medline=Test J Mot Rep}
NEW: Abbreviation{name=Test Journal of Motorcycle Repair, iso=Test J. Mot. Rep., medline=Test J Mot Rep}

As you can see OLD and NEW are identical, so no real duplicate.

The second part of the original post, about the "IEEE LaTeX abbreviations", may not be relevant: the original abbreviations are actually replaced by different abbreviations. So, in that case the warnings make sense.

@simonharrer
Copy link
Contributor

I have implemented a fix for the first part of the issue. For the second part, I do not know what to do. Maybe we should change the log statements to debug so that they are not shown to the user?

@ambro2
Copy link
Contributor Author

ambro2 commented Sep 29, 2015

An option might be to extract the IEEE journals abbreviations from journalList.txt and creating a third list with the "plain" IEEE journals abbreviations. Then if USE_IEEE_ABRV is not set the "plain" list is loaded, otherwise the "LaTeX abbreviations" in IEEEJournalList.txt is loaded (and a single line warning is sent to output).
Will this also speed up the startup avoiding the duplicate check?

@simonharrer
Copy link
Contributor

Good thinking. This might be an easy way to solve these issues while speeding up startup time. Especially not having all this console output will speed up the start as this is an expensive IO action. The check itself should be very fast and not that problematic.

@simonharrer
Copy link
Contributor

Any comments from your side, @ambro2 ? Otherwise I will close this issue.

@ambro2
Copy link
Contributor Author

ambro2 commented Oct 8, 2015

I haven't had any chance to test the branch. I'll trust you, @simonharrer, so I vote for closing. Thanks.

@lenhard lenhard closed this as completed Oct 9, 2015
@apeyser
Copy link

apeyser commented Feb 13, 2018

Suggestion: turn it completely off. Jabref works fine with duplicates (even switching), and I happen to use that particular feature, but the slow dump of all "errors" in jabref4 makes the tool almost unstartable.

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

No branches or pull requests

4 participants