Java Sort repository