This error message is usually associated with closed quotation marks, comments begin with / instead of // , etc. In your code, the only thing I see is that your third line is not finished correctly, i.e. after "\n\n\nLink to this you do not close double quotes, and instead you start a new line (thereby expecting anything but ''\n'' .
Try writing the whole line:
msg.setText("This build (" + build.getFullDisplayName() + " ) contains the following tasks:\n\nTASK\t\t\t IMPLEMENTER:\n" + taskList + "\n\n\nLink to this build: ${BUILD_URL} \n ${BUILD_LOG, maxLines=9999, escapeHtml=false}" );
or close quotes:
msg.setText("This build (" + build.getFullDisplayName() + " ) contains the following tasks:\n\nTASK\t\t\t IMPLEMENTER:\n" + taskList + "\n\n\nLink to this " + "build: ${BUILD_URL} \n ${BUILD_LOG, maxLines=9999, escapeHtml=false}" );
source share