Program: 134549
Project: 134549
Buggy source:
@Override public void reconcile(IRegion partition){
  if (editor == null || editor.getEditorInput() == null || !(editor.getEditorInput() instanceof IFileEditorInput)) {
    return;
  }
  IFile file=((IFileEditorInput)editor.getEditorInput()).getFile();
  final IAnnotationModel annotationModel=getAnnotationModel();
  ArrayList<Annotation> toRemove=new ArrayList<Annotation>();
  Iterator<?> it=annotationModel.getAnnotationIterator();
  while (it.hasNext()) {
    Annotation annotation=(Annotation)it.next();
    if (annotation.getType().equals(YangSyntaxAnnotation.TYPE)) {
      toRemove.add(annotation);
    }
  }
  for (  Annotation annotation : toRemove) {
    annotationModel.removeAnnotation(annotation);
  }
  YangFile yangFile=YangCorePlugin.createYangFile(file);
  Module module=YangParserUtil.parseYangFile(document.get().toCharArray(),new IYangValidationListener(){
    @Override public void validationError(    String msg,    int lineNumber,    int charStart,    int charEnd){
      annotationModel.addAnnotation(new YangSyntaxAnnotation(msg),new Position(charStart,charEnd - charStart));
    }
    @Override public void syntaxError(    String msg,    int lineNumber,    int charStart,    int charEnd){
      annotationModel.addAnnotation(new YangSyntaxAnnotation(msg),new Position(charStart,charEnd - charStart));
    }
  }
);
  try {
    YangFileInfo fileInfo=(YangFileInfo)yangFile.getElementInfo(monitor);
    fileInfo.setModule(module);
    fileInfo.setIsStructureKnown(true);
    YangModelManager.getIndexManager().addSource(file);
  }
 catch (  YangModelException e) {
  }
}

Fixed version (ground truth):
@Override public void reconcile(IRegion partition){
  if (editor == null || editor.getEditorInput() == null || !(editor.getEditorInput() instanceof IFileEditorInput)) {
    return;
  }
  IFile file=((IFileEditorInput)editor.getEditorInput()).getFile();
  final IAnnotationModel annotationModel=getAnnotationModel();
  ArrayList<Annotation> toRemove=new ArrayList<Annotation>();
  Iterator<?> it=annotationModel.getAnnotationIterator();
  while (it.hasNext()) {
    Annotation annotation=(Annotation)it.next();
    if (annotation.getType().equals(YangSyntaxAnnotation.TYPE)) {
      toRemove.add(annotation);
    }
  }
  for (  Annotation annotation : toRemove) {
    annotationModel.removeAnnotation(annotation);
  }
  YangFile yangFile=YangCorePlugin.createYangFile(file);
  try {
    final AtomicBoolean errors=new AtomicBoolean(false);
    Module module=YangParserUtil.parseYangFile(document.get().toCharArray(),new IYangValidationListener(){
      @Override public void validationError(      String msg,      int lineNumber,      int charStart,      int charEnd){
        errors.set(true);
        annotationModel.addAnnotation(new YangSyntaxAnnotation(msg),new Position(charStart,charEnd - charStart));
      }
      @Override public void syntaxError(      String msg,      int lineNumber,      int charStart,      int charEnd){
        errors.set(true);
        annotationModel.addAnnotation(new YangSyntaxAnnotation(msg),new Position(charStart,charEnd - charStart));
      }
    }
);
    if (!errors.get()) {
      YangFileInfo fileInfo=(YangFileInfo)yangFile.getElementInfo(monitor);
      fileInfo.setModule(module);
      fileInfo.setIsStructureKnown(true);
      YangModelManager.getIndexManager().addSource(file);
    }
  }
 catch (  Exception e) {
  }
}