I'm getting the exact same error on a scheduler job page. However, this seems to be only a display failure when viewing the job page. The job itself gets executed and runs successfully.
In my script there is some slashy regex with bare " and ' characters. From my research Pygments' Groovy lexer has no rule for slashy strings, so those quotes open string states that never close.
This message was sent by Atlassian Jira (v9.3.0#930000-sha1:287aeb6)
If image attachments aren't displayed, see this article.