question: public static List < TestDiagnosticLine > readDiagnosticsJfo ( JavaFileObject toRead , boolean omitEmptyDiagnostics ) { List < TestDiagnosticLine > lines = new ArrayList < > ( ) ; JavaDiagnosticReader reader = new JavaDiagnosticReader ( toRead , JAVA_COMMENT_CODEC ) ; while ( reader . hasNext ( ) ) { TestDiagnosticLine line = reader . next ( ) ; if ( ! omitEmptyDiagnostics || line . hasDiagnostics ( ) ) { lines . add ( line ) ; } } reader . close ( ) ; return lines ; }
target:  Reads diagnostic lines from the comments of a set of Java file.