String docText = aJCas.getDocumentText();
AnnotationIndex<Annotation> goldenGrammarErrorIndex = aJCas
.getAnnotationIndex(GoldenGrammarError.type);
for (Annotation annotation : goldenGrammarErrorIndex) {
GoldenGrammarError a = (GoldenGrammarError) annotation;
<BUG>Error s = new Error(a.getBegin(), a.getEnd(), a.getCategory());
</BUG>
targetGrammarErrors.add(s);
mFMeasure.addTarget();
mFMeasure.addTarget(a.getCategory());

String docText = aJCas.getDocumentText();
AnnotationIndex<Annotation> goldenGrammarErrorIndex = aJCas
.getAnnotationIndex(GoldenGrammarError.type);
for (Annotation annotation : goldenGrammarErrorIndex) {
GoldenGrammarError a = (GoldenGrammarError) annotation;
Error s = new Error(a.getBegin(), a.getEnd(), a.getCategory(), "TTT");
targetGrammarErrors.add(s);
mFMeasure.addTarget();
mFMeasure.addTarget(a.getCategory());
