Copied in sanitized JIRA code.