Repository java code