Since Cobertura is implemented via instrumenting class files, it is to some degree usable for JVM languages other than Java. When running Cobertura against a project written in Clojure, I had a crash because the code-colorizing parser tried to access a character before the beginning of a line in a multi-line string. This does not happen in syntactically correct Java, but IMHO crashing on unexpected input should be fixed.
The patch adds a test case for the problem and changes the logic to prevent the crash. The copyright to this patch belongs to my employer, ZenRobotics Ltd., and I have received permission to submit the patch to Cobertura.
Note: the patch is against the Subversion branch v1_9_4, as that is the newest release but the released source archive does not have all files needed for compilation.