Fix bugs

Fix bugs from Sonar
Reorder the modifiers (final static -> static final) to comply with the Java Language Specification.