if (annotationStart > 0) {
// create annotation
AlchemyAnnotation alchemyAnnotation = new AlchemyAnnotation(cas, annotationStart, annotationStart + entityText
.length());
alchemyAnnotation.setAlchemyType(type.toString());
alchemyAnnotation.addToIndexes();
UIMAFramework.getLogger().log(Level.INFO, new StringBuilder("added AlchemyAnnotation for ").append(alchemyAnnotation.getCoveredText()).append(" of type ").append(type.toString()).toString());
// update entity occurrences
NonEmptyFSList list = (NonEmptyFSList) fs.getOccurrences();
if (list != null) {
NonEmptyFSList newTail = new NonEmptyFSList(cas);