/usr/lib/libreoffice/program/classes/query.jar is in libreoffice-java-common 1:5.1.2-0ubuntu1.
This file is owned by root:root, with mode 0o777.
It is a symlink to /usr/lib/libreoffice/program/classes/../../../../share/libreoffice/program/classes/query.jar