JavaException: java.lang.StringIndexOutOfBoundsException: String index out of range: 4