protected String addSourceLineIfNeeded(JCDiagnostic d, String msg) {
if (!displaySource(d))
return msg;
else {
BasicConfiguration conf = getConfiguration();
int indentSource = conf.getIndentation(DiagnosticPart.SOURCE);
String sourceLine = "\n" + formatSourceLine(d, indentSource);
boolean singleLine = msg.indexOf("\n") == -1;
if (singleLine || getConfiguration().getSourcePosition() == SourcePosition.BOTTOM)
return msg + sourceLine;
else