[de] avoid false alarms; fix warnings
small code cleanup; adding tests
[de] avoid false alarm (https://sourceforge.net/p/languagetool/bugs/103/)