nus-yam/ex-repair huggingface dataset:
Program: 134488
Project: 134488
Buggy source:
public void updateFoldingRegions(Module yangModule){
  fPositionToElement=new HashMap();
  try {
    ProjectionAnnotationModel model=(ProjectionAnnotationModel)fEditor.getAdapter(ProjectionAnnotationModel.class);
    if (model == null) {
      return;
    }
    final List root=new ArrayList();
    yangModule.accept(new ASTVisitor(){
      @Override public void preVisit(      ASTNode node){
        root.add(node);
      }
    }
);
    List currentRegions=new ArrayList<>();
    addFoldingNonASTregions(currentRegions);
    addFoldingRegions(currentRegions,root);
    updateFoldingRegions(model,currentRegions);
  }
 catch (  BadLocationException be) {
  }
}

Fixed version (ground truth):
public void updateFoldingRegions(Module yangModule){
  if (yangModule != null) {
    fPositionToElement=new HashMap();
    try {
      ProjectionAnnotationModel model=(ProjectionAnnotationModel)fEditor.getAdapter(ProjectionAnnotationModel.class);
      if (model == null) {
        return;
      }
      final List root=new ArrayList();
      yangModule.accept(new ASTVisitor(){
        @Override public void preVisit(        ASTNode node){
          root.add(node);
        }
      }
);
      List currentRegions=new ArrayList<>();
      addFoldingNonASTregions(currentRegions);
      addFoldingRegions(currentRegions,root);
      updateFoldingRegions(model,currentRegions);
    }
 catch (    BadLocationException be) {
    }
  }
}
Program: 134490
Project: 134490
Buggy source:
private IDocumentPartitioner createDocumentPartitioner(){
  return new FastPartitioner(new YangPartitionScanner(),new String[]{YangPartitionScanner.YANG_COMMENT,YangPartitionScanner.YANG_STRING});
}

Fixed version (ground truth):
private IDocumentPartitioner createDocumentPartitioner(){
  return new FastPartitioner(new YangPartitionScanner(),new String[]{YangPartitionScanner.YANG_COMMENT,YangPartitionScanner.YANG_STRING,YangPartitionScanner.YANG_STRING_SQ});
}
Program: 134491
Project: 134491
Buggy source:
@Override public ITextHover getTextHover(ISourceViewer sourceViewer,String contentType){
  YangTextHover yangTextHover=new YangTextHover();
  yangTextHover.setEditor(editor);
  return yangTextHover;
}

Fixed version (ground truth):
@Override public ITextHover getTextHover(ISourceViewer sourceViewer,String contentType){
  YangTextHover yangTextHover=new YangTextHover(sourceViewer);
  yangTextHover.setEditor(editor);
  return yangTextHover;
}
Program: 134493
Project: 134493
Buggy source:
@Override public void syntaxError(String msg,int lineNumber,int charStart,int charEnd){
  errors.set(true);
  annotationModel.addProblem(new YangProblem(new YangSyntaxAnnotation(null),new Position(charStart,charEnd - charStart)));
}

Fixed version (ground truth):
@Override public void syntaxError(String msg,int lineNumber,int charStart,int charEnd){
  errors.set(true);
  annotationModel.addProblem(new YangProblem(new YangSyntaxAnnotation(msg),new Position(charStart,charEnd - charStart)));
}
Program: 134494
Project: 134494
Buggy source:
@Override public void validationError(String msg,int lineNumber,int charStart,int charEnd){
  errors.set(true);
  annotationModel.addProblem(new YangProblem(new YangSyntaxAnnotation(null),new Position(charStart,charEnd - charStart)));
}

Fixed version (ground truth):
@Override public void validationError(String msg,int lineNumber,int charStart,int charEnd){
  errors.set(true);
  annotationModel.addProblem(new YangProblem(new YangSyntaxAnnotation(msg),new Position(charStart,charEnd - charStart)));
}
Program: 134496
Project: 134496
Buggy source:
/** 
 * @param node
 * @return
 */
private String getLocalHoverInfo(ASTNode node){
  StringBuffer buffer=new StringBuffer();
  String name=node.getNodeName();
  if (node instanceof ASTNamedNode) {
    name+="String_Node_Str" + ((ASTNamedNode)node).getName();
  }
  HTMLPrinter.addSmallHeader(buffer,name);
  HTMLPrinter.addParagraph(buffer,formatValue(node.getDescription()));
  buffer.append("String_Node_Str");
  if (node instanceof Module) {
    Module module=(Module)node;
    addValue(buffer,"String_Node_Str",module.getNamespace() != null ? module.getNamespace().toASCIIString() : null);
    addValue(buffer,"String_Node_Str",module.getOrganization() != null ? module.getOrganization().getValue() : null);
    addValue(buffer,"String_Node_Str",module.getContact() != null ? module.getContact().getValue() : null);
  }
  addValue(buffer,"String_Node_Str",node.getReference());
  addValue(buffer,"String_Node_Str",node.getStatus());
  buffer.append("String_Node_Str");
  HTMLPrinter.insertPageProlog(buffer,0,getStyleSheet());
  HTMLPrinter.addPageEpilog(buffer);
  return buffer.toString();
}

Fixed version (ground truth):
private String getLocalHoverInfo(ASTNode node){
  StringBuffer buffer=new StringBuffer();
  String name=node.getNodeName();
  if (node instanceof ASTNamedNode) {
    name+="String_Node_Str" + ((ASTNamedNode)node).getName();
  }
  HTMLPrinter.addSmallHeader(buffer,name);
  HTMLPrinter.addParagraph(buffer,formatValue(node.getDescription()));
  buffer.append("String_Node_Str");
  if (node instanceof Module) {
    Module module=(Module)node;
    addValue(buffer,"String_Node_Str",module.getNamespace() != null ? module.getNamespace().toASCIIString() : null);
    addValue(buffer,"String_Node_Str",module.getOrganization() != null ? module.getOrganization().getValue() : null);
    addValue(buffer,"String_Node_Str",module.getContact() != null ? module.getContact().getValue() : null);
  }
  addValue(buffer,"String_Node_Str",node.getReference());
  addValue(buffer,"String_Node_Str",node.getStatus());
  buffer.append("String_Node_Str");
  HTMLPrinter.insertPageProlog(buffer,0,getStyleSheet());
  HTMLPrinter.addPageEpilog(buffer);
  return buffer.toString();
}
Program: 134498
Project: 134498
Buggy source:
@Override public boolean execute(IProgressMonitor progressMonitor){
  if (this.isCancelled || progressMonitor != null && progressMonitor.isCanceled()) {
    return true;
  }
  try {
    manager.remove(file);
    System.err.println(toString());
    YangFileInfo info=(YangFileInfo)YangCorePlugin.createYangFile(file).getElementInfo(progressMonitor);
    manager.addModule(info.getModule(),file.getProject(),file.getFullPath(),"String_Node_Str");
  }
 catch (  YangModelException e) {
  }
  return true;
}

Fixed version (ground truth):
@Override public boolean execute(IProgressMonitor progressMonitor){
  if (this.isCancelled || progressMonitor != null && progressMonitor.isCanceled()) {
    return true;
  }
  try {
    manager.remove(file);
    YangFileInfo info=(YangFileInfo)YangCorePlugin.createYangFile(file).getElementInfo(progressMonitor);
    manager.addModule(info.getModule(),file.getProject(),file.getFullPath(),"String_Node_Str");
    manager.fileAddedToIndex(file.getFullPath(),file.getModificationStamp());
  }
 catch (  YangModelException e) {
  }
  return true;
}
Program: 134499
Project: 134499
Buggy source:
@Override public boolean execute(IProgressMonitor progressMonitor){
  if (this.isCancelled || progressMonitor != null && progressMonitor.isCanceled()) {
    return true;
  }
  try (JarFile jarFile=new JarFile(path.toFile())){
    Enumeration<JarEntry> entries=jarFile.entries();
    while (entries.hasMoreElements()) {
      JarEntry entry=entries.nextElement();
      if (entry.getName().startsWith("String_Node_Str") && CoreUtil.isYangLikeFileName(entry.getName())) {
        IPath jarEntryPath=path.append(entry.getName());
        manager.removeIndex(jarEntryPath);
        YangJarEntry element=YangCorePlugin.createJarEntry(path,entry.getName());
        YangFileInfo info=(YangFileInfo)element.getElementInfo(progressMonitor);
        manager.addModule(info.getModule(),project,path,entry.getName());
      }
    }
  }
 catch (  IOException e) {
    YangCorePlugin.log(e);
  }
catch (  YangModelException e) {
    YangCorePlugin.log(e);
  }
  return true;
}

Fixed version (ground truth):
@Override public boolean execute(IProgressMonitor progressMonitor){
  if (this.isCancelled || progressMonitor != null && progressMonitor.isCanceled()) {
    return true;
  }
  try (JarFile jarFile=new JarFile(path.toFile())){
    Enumeration<JarEntry> entries=jarFile.entries();
    while (entries.hasMoreElements()) {
      JarEntry entry=entries.nextElement();
      if (entry.getName().startsWith("String_Node_Str") && CoreUtil.isYangLikeFileName(entry.getName())) {
        IPath jarEntryPath=path.append(entry.getName());
        manager.removeIndex(jarEntryPath);
        YangJarEntry element=YangCorePlugin.createJarEntry(path,entry.getName());
        YangFileInfo info=(YangFileInfo)element.getElementInfo(progressMonitor);
        manager.addModule(info.getModule(),project,path,entry.getName());
      }
    }
    manager.fileAddedToIndex(path,path.toFile().lastModified());
  }
 catch (  IOException e) {
    YangCorePlugin.log(e);
  }
catch (  YangModelException e) {
    YangCorePlugin.log(e);
  }
  return true;
}
Program: 134500
Project: 134500
Buggy source:
public void addJarFile(IProject project,IPath file){
  request(new IndexJarFileRequest(project,file,this));
}

Fixed version (ground truth):
public void addJarFile(IProject project,IPath file){
  if (idxResources.containsKey(file.toString()) && idxResources.get(file.toString()) == file.toFile().lastModified()) {
    System.err.println("String_Node_Str" + file);
    return;
  }
  request(new IndexJarFileRequest(project,file,this));
}
Program: 134501
Project: 134501
Buggy source:
public synchronized void removeIndex(IPath containerPath){
  Iterator<Tuple6<String,String,String,ElementIndexType,String,ElementIndexInfo>> iterator=idxKeywords.iterator();
  while (iterator.hasNext()) {
    Tuple6<String,String,String,ElementIndexType,String,ElementIndexInfo> entry=iterator.next();
    if (containerPath.isPrefixOf(new Path(entry.e))) {
      iterator.remove();
    }
  }
}

Fixed version (ground truth):
public synchronized void removeIndex(IPath containerPath){
  Iterator<Tuple6<String,String,String,ElementIndexType,String,ElementIndexInfo>> iterator=idxKeywords.iterator();
  while (iterator.hasNext()) {
    Tuple6<String,String,String,ElementIndexType,String,ElementIndexInfo> entry=iterator.next();
    if (containerPath.isPrefixOf(new Path(entry.e))) {
      iterator.remove();
    }
  }
  idxResources.remove(containerPath.toString());
}
Program: 134502
Project: 134502
Buggy source:
@Override public boolean accept(File dir,String name){
  return name.startsWith("String_Node_Str");
}

Fixed version (ground truth):
@Override public boolean accept(File dir,String name){
  return name.startsWith("String_Node_Str") && (cleanAll || !name.startsWith("String_Node_Str" + INDEX_VERSION));
}
Program: 134503
Project: 134503
Buggy source:
public IndexManager(){
  File indexFile=YangCorePlugin.getDefault().getStateLocation().append("String_Node_Str").toFile();
  try {
    this.db=DBMaker.newFileDB(indexFile).closeOnJvmShutdown().make();
    this.idxKeywords=db.getTreeSet("String_Node_Str");
    if (!idxKeywords.isEmpty() && !(idxKeywords.first() instanceof Fun.Tuple6)) {
      cleanDB(indexFile);
    }
  }
 catch (  Throwable e) {
    cleanDB(indexFile);
  }
}

Fixed version (ground truth):
public IndexManager(){
  File indexFile=YangCorePlugin.getDefault().getStateLocation().append(INDEX_PATH).toFile();
  try {
    initDB(indexFile,false);
    if (!idxKeywords.isEmpty() && !(idxKeywords.first() instanceof Fun.Tuple6)) {
      initDB(indexFile,true);
    }
  }
 catch (  Throwable e) {
    initDB(indexFile,true);
  }
}
Program: 134504
Project: 134504
Buggy source:
public synchronized void removeIndexFamily(IProject project){
  Iterator<Tuple6<String,String,String,ElementIndexType,String,ElementIndexInfo>> iterator=idxKeywords.iterator();
  while (iterator.hasNext()) {
    Tuple6<String,String,String,ElementIndexType,String,ElementIndexInfo> entry=iterator.next();
    if (project.getFullPath().toString().equals(entry.f.getProject())) {
      iterator.remove();
    }
  }
}

Fixed version (ground truth):
public synchronized void removeIndexFamily(IProject project){
  Iterator<Tuple6<String,String,String,ElementIndexType,String,ElementIndexInfo>> iterator=idxKeywords.iterator();
  while (iterator.hasNext()) {
    Tuple6<String,String,String,ElementIndexType,String,ElementIndexInfo> entry=iterator.next();
    if (project.getName().equals(entry.f.getProject())) {
      iterator.remove();
    }
  }
}
Program: 134505
Project: 134505
Buggy source:
public synchronized ElementIndexInfo[] search(String module,String revision,String name,ElementIndexType type,IProject project,IPath scope){
  ArrayList<ElementIndexInfo> infos=null;
  for (  Tuple6<String,String,String,ElementIndexType,String,ElementIndexInfo> entry : idxKeywords) {
    if (module != null && module.length() > 0 && !module.equals(entry.a)) {
      continue;
    }
    if (revision != null && revision.length() > 0 && !revision.equals(entry.b)) {
      continue;
    }
    if (type != null && type != entry.d) {
      continue;
    }
    if (name != null && name.length() > 0 && !entry.c.startsWith(name)) {
      continue;
    }
    if (project != null && !entry.f.getProject().equals(project.getName())) {
      continue;
    }
    if (scope != null && !scope.isPrefixOf(new Path(entry.e))) {
      continue;
    }
    if (infos == null) {
      infos=new ArrayList<ElementIndexInfo>();
    }
    infos.add(entry.f);
  }
  if (infos != null) {
    return infos.toArray(new ElementIndexInfo[infos.size()]);
  }
  return NO_ELEMENTS;
}

Fixed version (ground truth):
public synchronized ElementIndexInfo[] search(String module,String revision,String name,ElementIndexType type,IProject project,IPath scope){
  ArrayList<ElementIndexInfo> infos=null;
  for (  Tuple6<String,String,String,ElementIndexType,String,ElementIndexInfo> entry : idxKeywords) {
    if (module != null && module.length() > 0 && !module.equals(entry.a)) {
      continue;
    }
    if (revision != null && revision.length() > 0 && !revision.equals(entry.b)) {
      continue;
    }
    if (type != null && type != entry.d) {
      continue;
    }
    if (name != null && name.length() > 0 && !entry.c.equals(name)) {
      continue;
    }
    if (project != null && !entry.f.getProject().equals(project.getName())) {
      continue;
    }
    if (scope != null && !scope.isPrefixOf(new Path(entry.e))) {
      continue;
    }
    if (infos == null) {
      infos=new ArrayList<ElementIndexInfo>();
    }
    infos.add(entry.f);
  }
  if (infos != null) {
    return infos.toArray(new ElementIndexInfo[infos.size()]);
  }
  return NO_ELEMENTS;
}
Program: 134506
Project: 134506
Buggy source:
public void addSource(IFile file){
  request(new IndexFileRequest(file,this));
}

Fixed version (ground truth):
public void addSource(IFile file){
  if ("String_Node_Str".equals(file.getProjectRelativePath().segment(0))) {
    return;
  }
  String path=file.getFullPath().toString();
  if (idxResources.containsKey(path) && idxResources.get(path) == file.getModificationStamp()) {
    System.err.println("String_Node_Str" + file);
    return;
  }
  request(new IndexFileRequest(file,this));
}
Program: 134507
Project: 134507
Buggy source:
public Object getAdapter(Class key){
  if (projectionSupport != null) {
    Object adapter=projectionSupport.getAdapter(getSourceViewer(),key);
    if (adapter != null) {
      return adapter;
    }
  }
  return super.getAdapter(key);
}

Fixed version (ground truth):
@Override public Object getAdapter(Class key){
  if (projectionSupport != null) {
    Object adapter=projectionSupport.getAdapter(getSourceViewer(),key);
    if (adapter != null) {
      return adapter;
    }
  }
  return super.getAdapter(key);
}
Program: 134508
Project: 134508
Buggy source:
public void projectionEnabled(){
  fFoldingStructureProvider=new YangFoldingStructureProvider(this);
  fFoldingStructureProvider.setDocument(getDocumentProvider().getDocument(getEditorInput()));
  Module module=YangParserUtil.parseYangFile(getDocumentProvider().getDocument(getEditorInput()).get().toCharArray());
  fFoldingStructureProvider.updateFoldingRegions(module);
}

Fixed version (ground truth):
@Override public void projectionEnabled(){
  fFoldingStructureProvider=new YangFoldingStructureProvider(this);
  fFoldingStructureProvider.setDocument(getDocumentProvider().getDocument(getEditorInput()));
  Module module=YangParserUtil.parseYangFile(getDocumentProvider().getDocument(getEditorInput()).get().toCharArray());
  fFoldingStructureProvider.updateFoldingRegions(module);
}
Program: 134509
Project: 134509
Buggy source:
@Override public void dispose(){
  colorManager.dispose();
  super.dispose();
  IEditorInput input=getEditorInput();
  if (input != null && input instanceof IFileEditorInput) {
    IFile file=((IFileEditorInput)input).getFile();
    if (file != null) {
      try {
        YangModelManager.getYangModelManager().removeInfoAndChildren(YangCorePlugin.createYangFile(file));
        YangModelManager.getIndexManager().addSource(file);
      }
 catch (      YangModelException e) {
      }
    }
  }
}

Fixed version (ground truth):
@Override public void dispose(){
  colorManager.dispose();
  super.dispose();
  IEditorInput input=getEditorInput();
  if (input != null && input instanceof IFileEditorInput) {
    IFile file=((IFileEditorInput)input).getFile();
    if (file != null) {
      try {
        YangModelManager.getYangModelManager().removeInfoAndChildren(YangCorePlugin.createYangFile(file));
        YangModelManager.getIndexManager().addWorkingCopy(file);
      }
 catch (      YangModelException e) {
      }
    }
  }
}
Program: 134510
Project: 134510
Buggy source:
@Override public boolean execute(IProgressMonitor progressMonitor){
  if (this.isCancelled || progressMonitor != null && progressMonitor.isCanceled()) {
    return true;
  }
  try {
    manager.remove(file);
    YangFileInfo info=(YangFileInfo)YangCorePlugin.createYangFile(file).getElementInfo(progressMonitor);
    manager.addModule(info.getModule(),file.getProject(),file.getFullPath(),"String_Node_Str");
    manager.fileAddedToIndex(file.getFullPath(),file.getModificationStamp());
  }
 catch (  YangModelException e) {
  }
  return true;
}

Fixed version (ground truth):
@Override public boolean execute(IProgressMonitor progressMonitor){
  if (this.isCancelled || progressMonitor != null && progressMonitor.isCanceled()) {
    return true;
  }
  try {
    manager.remove(file);
    YangFileInfo info=(YangFileInfo)YangCorePlugin.createYangFile(file).getElementInfo(progressMonitor);
    manager.addModule(info.getModule(),file.getProject(),file.getFullPath(),"String_Node_Str");
    manager.fileAddedToIndex(file.getProject(),file.getFullPath(),file.getModificationStamp());
  }
 catch (  YangModelException e) {
  }
  return true;
}
Program: 134511
Project: 134511
Buggy source:
@Override public boolean execute(IProgressMonitor progressMonitor){
  if (this.isCancelled || progressMonitor != null && progressMonitor.isCanceled()) {
    return true;
  }
  try (JarFile jarFile=new JarFile(path.toFile())){
    Enumeration<JarEntry> entries=jarFile.entries();
    while (entries.hasMoreElements()) {
      JarEntry entry=entries.nextElement();
      if (entry.getName().startsWith("String_Node_Str") && CoreUtil.isYangLikeFileName(entry.getName())) {
        IPath jarEntryPath=path.append(entry.getName());
        manager.removeIndex(jarEntryPath);
        YangJarEntry element=YangCorePlugin.createJarEntry(path,entry.getName());
        YangFileInfo info=(YangFileInfo)element.getElementInfo(progressMonitor);
        manager.addModule(info.getModule(),project,path,entry.getName());
      }
    }
    manager.fileAddedToIndex(path,path.toFile().lastModified());
  }
 catch (  IOException e) {
    YangCorePlugin.log(e);
  }
catch (  YangModelException e) {
    YangCorePlugin.log(e);
  }
  return true;
}

Fixed version (ground truth):
@Override public boolean execute(IProgressMonitor progressMonitor){
  if (this.isCancelled || progressMonitor != null && progressMonitor.isCanceled()) {
    return true;
  }
  try (JarFile jarFile=new JarFile(path.toFile())){
    Enumeration<JarEntry> entries=jarFile.entries();
    while (entries.hasMoreElements()) {
      JarEntry entry=entries.nextElement();
      if (entry.getName().startsWith("String_Node_Str") && CoreUtil.isYangLikeFileName(entry.getName())) {
        IPath jarEntryPath=path.append(entry.getName());
        manager.removeIndex(project,jarEntryPath);
        YangJarEntry element=YangCorePlugin.createJarEntry(path,entry.getName());
        YangFileInfo info=(YangFileInfo)element.getElementInfo(progressMonitor);
        manager.addModule(info.getModule(),project,path,entry.getName());
      }
    }
    manager.fileAddedToIndex(project,path,path.toFile().lastModified());
  }
 catch (  IOException e) {
    YangCorePlugin.log(e);
  }
catch (  YangModelException e) {
    YangCorePlugin.log(e);
  }
  return true;
}
Program: 134512
Project: 134512
Buggy source:
/** 
 * Inits database by cleans old version of DB and recreate current index file if necessary.
 * @param indexFile index file
 * @param cleanAll if <code>true</code> remove old version and current index also otherwiseremove only old version of index DB.
 */
private void initDB(File indexFile,final boolean cleanAll){
  if (this.db != null) {
    this.db.close();
  }
  File[] files=indexFile.getParentFile().listFiles(new FilenameFilter(){
    @Override public boolean accept(    File dir,    String name){
      return name.startsWith("String_Node_Str") && (cleanAll || !name.startsWith("String_Node_Str" + INDEX_VERSION));
    }
  }
);
  if (files != null) {
    for (    File file : files) {
      file.delete();
    }
  }
  this.db=DBMaker.newFileDB(indexFile).closeOnJvmShutdown().make();
  this.idxKeywords=db.getTreeSet("String_Node_Str");
  this.idxResources=db.getTreeMap("String_Node_Str");
  indexAllProjects();
}

Fixed version (ground truth):
/** 
 * Inits database by cleans old version of DB and recreate current index file if necessary.
 * @param indexFile index file
 * @param cleanAll if <code>true</code> remove old version and current index also otherwiseremove only old version of index DB.
 */
private void initDB(File indexFile,final boolean cleanAll){
  if (this.db != null) {
    this.db.close();
  }
  File[] files=indexFile.getParentFile().listFiles(new FilenameFilter(){
    @Override public boolean accept(    File dir,    String name){
      return name.startsWith("String_Node_Str") && (cleanAll || !name.startsWith("String_Node_Str" + INDEX_VERSION));
    }
  }
);
  if (files != null) {
    for (    File file : files) {
      file.delete();
    }
  }
  this.db=DBMaker.newFileDB(indexFile).closeOnJvmShutdown().make();
  this.idxKeywords=db.getTreeSet("String_Node_Str");
  this.idxResources=db.getTreeSet("String_Node_Str");
  indexAllProjects();
}
Program: 134513
Project: 134513
Buggy source:
public void addJarFile(IProject project,IPath file){
  if (idxResources.containsKey(file.toString()) && idxResources.get(file.toString()) == file.toFile().lastModified()) {
    System.err.println("String_Node_Str" + file);
    return;
  }
  request(new IndexJarFileRequest(project,file,this));
}

Fixed version (ground truth):
public void addJarFile(IProject project,IPath file){
  Iterable<Long> it=Fun.filter(idxResources,project.getName(),file.toString());
  for (  Long modStamp : it) {
    if (modStamp == file.toFile().lastModified()) {
      System.err.println("String_Node_Str" + file);
      return;
    }
  }
  request(new IndexJarFileRequest(project,file,this));
}
Program: 134514
Project: 134514
Buggy source:
public synchronized void removeIndex(IPath containerPath){
  Iterator<Tuple6<String,String,String,ElementIndexType,String,ElementIndexInfo>> iterator=idxKeywords.iterator();
  while (iterator.hasNext()) {
    Tuple6<String,String,String,ElementIndexType,String,ElementIndexInfo> entry=iterator.next();
    if (containerPath.isPrefixOf(new Path(entry.e))) {
      iterator.remove();
    }
  }
  idxResources.remove(containerPath.toString());
}

Fixed version (ground truth):
public synchronized void removeIndex(IProject project,IPath containerPath){
  Iterator<Tuple6<String,String,String,ElementIndexType,String,ElementIndexInfo>> iterator=idxKeywords.iterator();
  while (iterator.hasNext()) {
    Tuple6<String,String,String,ElementIndexType,String,ElementIndexInfo> entry=iterator.next();
    if (project.getName().equals(entry.f.getProject()) && containerPath.isPrefixOf(new Path(entry.e))) {
      iterator.remove();
    }
  }
  Iterator<Tuple3<String,String,Long>> it=idxResources.iterator();
  while (it.hasNext()) {
    Tuple3<String,String,Long> idxr=it.next();
    if (project.getName().equals(idxr.a) && containerPath.isPrefixOf(new Path(idxr.b))) {
      it.remove();
    }
  }
}
Program: 134515
Project: 134515
Buggy source:
public synchronized void remove(IFile file){
  removeIndex(file.getFullPath());
}

Fixed version (ground truth):
public synchronized void remove(IFile file){
  removeIndex(file.getProject(),file.getFullPath());
}
Program: 134516
Project: 134516
Buggy source:
protected void fileAddedToIndex(IPath path,long modificationStamp){
  idxResources.put(path.toString(),modificationStamp);
}

Fixed version (ground truth):
protected void fileAddedToIndex(IProject project,IPath path,long modificationStamp){
  idxResources.add(Fun.t3(project.getName(),path.toString(),modificationStamp));
}
Program: 134517
Project: 134517
Buggy source:
public synchronized void removeIndexFamily(IProject project){
  Iterator<Tuple6<String,String,String,ElementIndexType,String,ElementIndexInfo>> iterator=idxKeywords.iterator();
  while (iterator.hasNext()) {
    Tuple6<String,String,String,ElementIndexType,String,ElementIndexInfo> entry=iterator.next();
    if (project.getName().equals(entry.f.getProject())) {
      iterator.remove();
    }
  }
}

Fixed version (ground truth):
public synchronized void removeIndexFamily(IProject project){
  Iterator<Tuple6<String,String,String,ElementIndexType,String,ElementIndexInfo>> iterator=idxKeywords.iterator();
  while (iterator.hasNext()) {
    Tuple6<String,String,String,ElementIndexType,String,ElementIndexInfo> entry=iterator.next();
    if (project.getName().equals(entry.f.getProject())) {
      iterator.remove();
    }
  }
  Iterator<Long> it=Fun.filter(idxResources,project.getName(),null).iterator();
  while (it.hasNext()) {
    it.next();
    it.remove();
  }
}
Program: 134518
Project: 134518
Buggy source:
public void addSource(IFile file){
  if ("String_Node_Str".equals(file.getProjectRelativePath().segment(0))) {
    return;
  }
  String path=file.getFullPath().toString();
  if (idxResources.containsKey(path) && idxResources.get(path) == file.getModificationStamp()) {
    System.err.println("String_Node_Str" + file);
    return;
  }
  request(new IndexFileRequest(file,this));
}

Fixed version (ground truth):
public void addSource(IFile file){
  if ("String_Node_Str".equals(file.getProjectRelativePath().segment(0))) {
    return;
  }
  Iterable<Long> it=Fun.filter(idxResources,file.getProject().getName(),file.getFullPath().toString());
  for (  Long modStamp : it) {
    if (modStamp == file.getModificationStamp()) {
      System.err.println("String_Node_Str" + file);
      return;
    }
  }
  request(new IndexFileRequest(file,this));
}
Program: 134520
Project: 134520
Buggy source:
public boolean updateCurrentDeltaAndIndex(IResourceDelta delta){
  YangElement element;
switch (delta.getKind()) {
case IResourceDelta.ADDED:
    element=YangCorePlugin.create(delta.getResource());
  updateIndex(element,delta);
elementAdded(element,delta);
return false;
case IResourceDelta.REMOVED:
element=YangCorePlugin.create(delta.getResource());
updateIndex(element,delta);
elementRemoved(element,delta);
return false;
case IResourceDelta.CHANGED:
int flags=delta.getFlags();
if ((flags & IResourceDelta.CONTENT) != 0 || (flags & IResourceDelta.ENCODING) != 0) {
element=YangCorePlugin.create(delta.getResource());
if (element == null) {
return false;
}
updateIndex(element,delta);
contentChanged(element);
}
 else if (delta.getResource().getType() == IResource.PROJECT) {
if ((flags & IResourceDelta.OPEN) != 0) {
IProject res=(IProject)delta.getResource();
element=YangCorePlugin.create(res);
if (res.isOpen()) {
addToParentInfo(element);
this.manager.indexManager.indexAll(res);
}
 else {
close(element);
removeFromParentInfo(element);
this.manager.indexManager.discardJobs(element.getName());
this.manager.indexManager.removeIndexFamily(res);
}
return false;
}
}
return true;
}
return true;
}

Fixed version (ground truth):
public boolean updateCurrentDeltaAndIndex(IResourceDelta delta){
  YangElement element;
switch (delta.getKind()) {
case IResourceDelta.ADDED:
    element=YangCorePlugin.create(delta.getResource());
  updateIndex(element,delta);
elementAdded(element,delta);
return false;
case IResourceDelta.REMOVED:
element=YangCorePlugin.create(delta.getResource());
updateIndex(element,delta);
elementRemoved(element,delta);
return false;
case IResourceDelta.CHANGED:
int flags=delta.getFlags();
if ((flags & IResourceDelta.CONTENT) != 0 || (flags & IResourceDelta.ENCODING) != 0) {
element=YangCorePlugin.create(delta.getResource());
if (element == null) {
return false;
}
updateIndex(element,delta);
contentChanged(element);
}
 else if (delta.getResource().getType() == IResource.PROJECT) {
if ((flags & IResourceDelta.OPEN) != 0) {
IProject res=(IProject)delta.getResource();
element=YangCorePlugin.create(res);
if (res.isOpen()) {
addToParentInfo(element);
this.manager.indexManager.indexAll(res);
}
 else {
close(element);
removeFromParentInfo(element);
this.manager.indexManager.discardJobs(element.getName());
this.manager.indexManager.removeIndexFamily(res);
}
return false;
}
 else {
IJavaProject javaProject=JavaCore.create((IProject)delta.getResource());
if (javaProject.isOpen()) {
try {
IClasspathEntry[] classpath=javaProject.getRawClasspath();
YangProject yangProject=(YangProject)YangCorePlugin.create(delta.getResource());
if (yangProject.isClasspathChanged(classpath)) {
yangProject.makeConsistent(null);
this.manager.indexManager.indexAll((IProject)delta.getResource());
}
}
 catch (YangModelException|JavaModelException e) {
YangCorePlugin.log(e);
}
}
}
}
return true;
}
return true;
}
Program: 134521
Project: 134521
Buggy source:
@Override public boolean execute(IProgressMonitor progressMonitor){
  if (this.isCancelled || progressMonitor != null && progressMonitor.isCanceled()) {
    return true;
  }
  try {
    manager.remove(file);
    System.err.println(toString());
    YangFileInfo info=(YangFileInfo)YangCorePlugin.createYangFile(file).getElementInfo(progressMonitor);
    manager.addModule(info.getModule(),file.getProject(),file.getFullPath(),"String_Node_Str");
  }
 catch (  YangModelException e) {
    YangCorePlugin.log(e);
  }
  return true;
}

Fixed version (ground truth):
@Override public boolean execute(IProgressMonitor progressMonitor){
  if (this.isCancelled || progressMonitor != null && progressMonitor.isCanceled()) {
    return true;
  }
  try {
    manager.remove(file);
    System.err.println(toString());
    YangFileInfo info=(YangFileInfo)YangCorePlugin.createYangFile(file).getElementInfo(progressMonitor);
    manager.addModule(info.getModule(),file.getProject(),file.getFullPath(),"String_Node_Str");
  }
 catch (  YangModelException e) {
  }
  return true;
}
Program: 134522
Project: 134522
Buggy source:
public void addModule(Module module,final IProject project,final IPath path,final String entry){
  if (module != null && module.getRevision() != null && module.getRevision() != null) {
    final String revision=module.getRevision();
    final String moduleName=module.getName();
    module.accept(new ASTVisitor(){
      @Override public boolean visit(      Module module){
        addElementIndexInfo(new ElementIndexInfo(module,moduleName,revision,ElementIndexType.MODULE,project,path,entry));
        return true;
      }
      @Override public boolean visit(      SubModule module){
        addElementIndexInfo(new ElementIndexInfo(module,moduleName,revision,ElementIndexType.SUBMODULE,project,path,entry));
        return true;
      }
      @Override public boolean visit(      TypeDefinition typeDefinition){
        addElementIndexInfo(new ElementIndexInfo(typeDefinition,moduleName,revision,ElementIndexType.TYPE,project,path,entry));
        return true;
      }
      @Override public boolean visit(      GroupingDefinition groupingDefinition){
        addElementIndexInfo(new ElementIndexInfo(groupingDefinition,moduleName,revision,ElementIndexType.GROUPING,project,path,entry));
        return true;
      }
    }
);
  }
}

Fixed version (ground truth):
public void addModule(Module module,final IProject project,final IPath path,final String entry){
  if (module != null && module.getRevision() != null && module.getRevision() != null) {
    final String revision=module.getRevision();
    final String moduleName=module.getName();
    module.accept(new ASTVisitor(){
      @Override public boolean visit(      Module module){
        addElementIndexInfo(new ElementIndexInfo(module,moduleName,revision,ElementIndexType.MODULE,project,path,entry));
        return true;
      }
      @Override public boolean visit(      SubModule module){
        addElementIndexInfo(new ElementIndexInfo(module,moduleName,revision,ElementIndexType.SUBMODULE,project,path,entry));
        return true;
      }
      @Override public boolean visit(      TypeDefinition typeDefinition){
        addElementIndexInfo(new ElementIndexInfo(typeDefinition,moduleName,revision,ElementIndexType.TYPE,project,path,entry));
        return true;
      }
      @Override public boolean visit(      GroupingDefinition groupingDefinition){
        addElementIndexInfo(new ElementIndexInfo(groupingDefinition,moduleName,revision,ElementIndexType.GROUPING,project,path,entry));
        return true;
      }
    }
);
    db.commit();
  }
}
Program: 134523
Project: 134523
Buggy source:
public synchronized void addElementIndexInfo(ElementIndexInfo info){
  System.err.println("String_Node_Str" + info.getModule() + "String_Node_Str"+ info.getRevision()+ "String_Node_Str"+ info.getName()+ "String_Node_Str"+ info.getType());
  idxKeywords.add(Fun.t6(info.getModule(),info.getRevision(),info.getName(),info.getType(),info.getPath(),info));
  db.commit();
}

Fixed version (ground truth):
public synchronized void addElementIndexInfo(ElementIndexInfo info){
  System.err.println("String_Node_Str" + info.getModule() + "String_Node_Str"+ info.getRevision()+ "String_Node_Str"+ info.getName()+ "String_Node_Str"+ info.getType());
  idxKeywords.add(Fun.t6(info.getModule(),info.getRevision(),info.getName(),info.getType(),info.getPath(),info));
}
Program: 134524
Project: 134524
Buggy source:
public IResource getResource(){
  return null;
}

Fixed version (ground truth):
@Override public IResource getResource(){
  return null;
}
Program: 134525
Project: 134525
Buggy source:
public String getName(){
  return getPath().toString();
}

Fixed version (ground truth):
@Override public String getName(){
  return getPath().toString();
}
Program: 134526
Project: 134526
Buggy source:
public IBuffer getBuffer() throws YangModelException {
  if (hasBuffer()) {
    Object info=getElementInfo(null);
    IBuffer buffer=getBufferManager().getBuffer(this);
    if (buffer == null) {
      buffer=openBuffer(null,info);
    }
    if (buffer instanceof NullBuffer) {
      return null;
    }
    return buffer;
  }
 else {
    return null;
  }
}

Fixed version (ground truth):
@Override public IBuffer getBuffer() throws YangModelException {
  if (hasBuffer()) {
    Object info=getElementInfo(null);
    IBuffer buffer=getBufferManager().getBuffer(this);
    if (buffer == null) {
      buffer=openBuffer(null,info);
    }
    if (buffer instanceof NullBuffer) {
      return null;
    }
    return buffer;
  }
 else {
    return null;
  }
}
Program: 134527
Project: 134527
Buggy source:
public void save(IProgressMonitor progress,boolean force) throws YangModelException {
  if (isReadOnly()) {
    throw new YangModelException("String_Node_Str");
  }
  IBuffer buf=getBuffer();
  if (buf != null) {
    buf.save(progress,force);
    makeConsistent(progress);
  }
}

Fixed version (ground truth):
@Override public void save(IProgressMonitor progress,boolean force) throws YangModelException {
  if (isReadOnly()) {
    throw new YangModelException("String_Node_Str");
  }
  IBuffer buf=getBuffer();
  if (buf != null) {
    buf.save(progress,force);
    makeConsistent(progress);
  }
}
Program: 134528
Project: 134528
Buggy source:
public boolean isStructureKnown() throws YangModelException {
  return false;
}

Fixed version (ground truth):
@Override public boolean isStructureKnown() throws YangModelException {
  return false;
}
Program: 134529
Project: 134529
Buggy source:
public void bufferChanged(BufferChangedEvent event){
  if (event.getBuffer().isClosed()) {
    YangModelManager.getYangModelManager().getElementsOutOfSynchWithBuffers().remove(this);
    getBufferManager().removeBuffer(event.getBuffer());
  }
 else {
    YangModelManager.getYangModelManager().getElementsOutOfSynchWithBuffers().add(this);
  }
}

Fixed version (ground truth):
@Override public void bufferChanged(BufferChangedEvent event){
  if (event.getBuffer().isClosed()) {
    YangModelManager.getYangModelManager().getElementsOutOfSynchWithBuffers().remove(this);
    getBufferManager().removeBuffer(event.getBuffer());
  }
 else {
    YangModelManager.getYangModelManager().getElementsOutOfSynchWithBuffers().add(this);
  }
}
Program: 134530
Project: 134530
Buggy source:
public boolean isReadOnly(){
  return false;
}

Fixed version (ground truth):
@Override public boolean isReadOnly(){
  return false;
}
Program: 134531
Project: 134531
Buggy source:
public IPath getPath(){
  return null;
}

Fixed version (ground truth):
@Override public IPath getPath(){
  return null;
}
Program: 134532
Project: 134532
Buggy source:
public IOpenable getPrimaryElement(){
  return null;
}

Fixed version (ground truth):
@Override public IOpenable getPrimaryElement(){
  return null;
}
Program: 134533
Project: 134533
Buggy source:
public void close() throws YangModelException {
  if (hasBuffer()) {
    IBuffer buffer=getBufferManager().getBuffer(this);
    if (buffer != null) {
      buffer.close();
      buffer.removeBufferChangedListener(this);
    }
  }
  YangModelManager.getYangModelManager().removeInfoAndChildren(this);
}

Fixed version (ground truth):
@Override public void close() throws YangModelException {
  if (hasBuffer()) {
    IBuffer buffer=getBufferManager().getBuffer(this);
    if (buffer != null) {
      buffer.close();
      buffer.removeBufferChangedListener(this);
    }
  }
  YangModelManager.getYangModelManager().removeInfoAndChildren(this);
}
Program: 134534
Project: 134534
Buggy source:
public boolean hasUnsavedChanges() throws YangModelException {
  return false;
}

Fixed version (ground truth):
@Override public boolean hasUnsavedChanges() throws YangModelException {
  return false;
}
Program: 134535
Project: 134535
Buggy source:
public IOpenable getParent(){
  return this.parent;
}

Fixed version (ground truth):
@Override public IOpenable getParent(){
  return this.parent;
}
Program: 134536
Project: 134536
Buggy source:
protected void generateInfos(OpenableElementInfo info,HashMap<IOpenable,OpenableElementInfo> newElements,IProgressMonitor monitor) throws YangModelException {
  openAncestors(newElements,monitor);
  IResource underlResource=getResource();
  IStatus status=validateExistence(underlResource);
  if (!status.isOK()) {
    throw new YangModelException(status.getException(),status.getCode());
  }
  if (monitor != null && monitor.isCanceled()) {
    throw new OperationCanceledException();
  }
  newElements.put(this,info);
  try {
    OpenableElementInfo openableElementInfo=(OpenableElementInfo)info;
    boolean isStructureKnown=buildStructure(openableElementInfo,monitor,newElements,underlResource);
    openableElementInfo.setIsStructureKnown(isStructureKnown);
  }
 catch (  YangModelException e) {
    newElements.remove(this);
    throw e;
  }
  YangModelManager.getYangModelManager().getElementsOutOfSynchWithBuffers().remove(this);
}

Fixed version (ground truth):
protected void generateInfos(OpenableElementInfo info,HashMap<IOpenable,OpenableElementInfo> newElements,IProgressMonitor monitor) throws YangModelException {
  openAncestors(newElements,monitor);
  IResource underlResource=getResource();
  IStatus status=validateExistence(underlResource);
  if (!status.isOK()) {
    if (status.getException() != null) {
      throw new YangModelException(status.getException(),status.getCode());
    }
 else {
      throw new YangModelException(status.getMessage());
    }
  }
  if (monitor != null && monitor.isCanceled()) {
    throw new OperationCanceledException();
  }
  newElements.put(this,info);
  try {
    OpenableElementInfo openableElementInfo=info;
    boolean isStructureKnown=buildStructure(openableElementInfo,monitor,newElements,underlResource);
    openableElementInfo.setIsStructureKnown(isStructureKnown);
  }
 catch (  YangModelException e) {
    newElements.remove(this);
    throw e;
  }
  YangModelManager.getYangModelManager().getElementsOutOfSynchWithBuffers().remove(this);
}
Program: 134537
Project: 134537
Buggy source:
public boolean isOpen(){
  return YangModelManager.getYangModelManager().getInfo(this) != null;
}

Fixed version (ground truth):
@Override public boolean isOpen(){
  return YangModelManager.getYangModelManager().getInfo(this) != null;
}
Program: 134538
Project: 134538
Buggy source:
public String toStringWithAncestors(){
  StringBuffer sb=new StringBuffer(getName());
  IOpenable p=getParent();
  if (p != null) {
    sb.append("String_Node_Str").append(p.toStringWithAncestors()).append("String_Node_Str");
  }
  return sb.toString();
}

Fixed version (ground truth):
@Override public String toStringWithAncestors(){
  StringBuffer sb=new StringBuffer(getName());
  IOpenable p=getParent();
  if (p != null) {
    sb.append("String_Node_Str").append(p.toStringWithAncestors()).append("String_Node_Str");
  }
  return sb.toString();
}
Program: 134539
Project: 134539
Buggy source:
public boolean equals(Object o){
  if (this == o) {
    return true;
  }
  if (this.parent == null) {
    return super.equals(o);
  }
  YangElement other=(YangElement)o;
  return getName().equals(other.getName()) && this.parent.equals(other.parent);
}

Fixed version (ground truth):
@Override public boolean equals(Object o){
  if (this == o) {
    return true;
  }
  if (this.parent == null) {
    return super.equals(o);
  }
  YangElement other=(YangElement)o;
  return getName().equals(other.getName()) && this.parent.equals(other.parent);
}
Program: 134540
Project: 134540
Buggy source:
public boolean exists(){
  try {
    getElementInfo(null);
    return true;
  }
 catch (  YangModelException e) {
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean exists(){
  try {
    getElementInfo(null);
    return true;
  }
 catch (  YangModelException e) {
  }
  return false;
}
Program: 134541
Project: 134541
Buggy source:
public void makeConsistent(IProgressMonitor progress) throws YangModelException {
}

Fixed version (ground truth):
@Override public void makeConsistent(IProgressMonitor progress) throws YangModelException {
}
Program: 134542
Project: 134542
Buggy source:
public void open(IProgressMonitor progress) throws YangModelException {
  getElementInfo(progress);
}

Fixed version (ground truth):
@Override public void open(IProgressMonitor progress) throws YangModelException {
  getElementInfo(progress);
}
Program: 134543
Project: 134543
Buggy source:
public boolean isConsistent() throws YangModelException {
  return !YangModelManager.getYangModelManager().getElementsOutOfSynchWithBuffers().contains(this);
}

Fixed version (ground truth):
@Override public boolean isConsistent() throws YangModelException {
  return !YangModelManager.getYangModelManager().getElementsOutOfSynchWithBuffers().contains(this);
}
Program: 134547
Project: 134547
Buggy source:
@Override public void enterModule_header_stmts(Module_header_stmtsContext ctx){
  for (int i=0; i < ctx.getChildCount(); ++i) {
    final ParseTree treeNode=ctx.getChild(i);
    if (treeNode instanceof Namespace_stmtContext) {
      final String namespaceStr=stringFromNode(treeNode);
      namespace=URI.create(namespaceStr);
      SimpleNode<URI> astNode=new SimpleNode<URI>(module,((Namespace_stmtContext)treeNode).NAMESPACE_KEYWORD().getText(),namespace);
      updateNodePosition(astNode,treeNode);
      module.setNamespaceNode(astNode);
    }
 else     if (treeNode instanceof Prefix_stmtContext) {
      yangModelPrefix=stringFromNode(treeNode);
      SimpleNode<String> astNode=new SimpleNode<String>(module,((Prefix_stmtContext)treeNode).PREFIX_KEYWORD().getText(),yangModelPrefix);
      updateNodePosition(astNode,treeNode);
      module.setPrefix(astNode);
    }
 else     if (treeNode instanceof Yang_version_stmtContext) {
      SimpleNode<String> astNode=new SimpleNode<String>(module,((Yang_version_stmtContext)treeNode).YANG_VERSION_KEYWORD().getText(),stringFromNode(treeNode));
      updateNodePosition(astNode,treeNode);
      module.setYangVersion(astNode);
    }
  }
}

Fixed version (ground truth):
@Override public void enterModule_header_stmts(Module_header_stmtsContext ctx){
  for (int i=0; i < ctx.getChildCount(); ++i) {
    final ParseTree treeNode=ctx.getChild(i);
    if (treeNode instanceof Namespace_stmtContext) {
      final String namespaceStr=stringFromNode(treeNode);
      try {
        namespace=URI.create(namespaceStr);
      }
 catch (      Exception e) {
      }
      SimpleNode<URI> astNode=new SimpleNode<URI>(module,((Namespace_stmtContext)treeNode).NAMESPACE_KEYWORD().getText(),namespace);
      updateNodePosition(astNode,treeNode);
      module.setNamespaceNode(astNode);
    }
 else     if (treeNode instanceof Prefix_stmtContext) {
      yangModelPrefix=stringFromNode(treeNode);
      SimpleNode<String> astNode=new SimpleNode<String>(module,((Prefix_stmtContext)treeNode).PREFIX_KEYWORD().getText(),yangModelPrefix);
      updateNodePosition(astNode,treeNode);
      module.setPrefix(astNode);
    }
 else     if (treeNode instanceof Yang_version_stmtContext) {
      SimpleNode<String> astNode=new SimpleNode<String>(module,((Yang_version_stmtContext)treeNode).YANG_VERSION_KEYWORD().getText(),stringFromNode(treeNode));
      updateNodePosition(astNode,treeNode);
      module.setYangVersion(astNode);
    }
  }
}
Program: 134548
Project: 134548
Buggy source:
@Override public void dispose(){
  colorManager.dispose();
  super.dispose();
}

Fixed version (ground truth):
@Override public void dispose(){
  colorManager.dispose();
  super.dispose();
  IEditorInput input=getEditorInput();
  if (input != null && input instanceof IFileEditorInput) {
    IFile file=((IFileEditorInput)input).getFile();
    if (file != null) {
      try {
        YangModelManager.getYangModelManager().removeInfoAndChildren(YangCorePlugin.createYangFile(file));
        YangModelManager.getIndexManager().addSource(file);
      }
 catch (      YangModelException e) {
      }
    }
  }
}
Program: 134550
Project: 134550
Buggy source:
@Override public void syntaxError(String msg,int lineNumber,int charStart,int charEnd){
  annotationModel.addAnnotation(new YangSyntaxAnnotation(msg),new Position(charStart,charEnd - charStart));
}

Fixed version (ground truth):
@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));
}
Program: 134551
Project: 134551
Buggy source:
@Override public void validationError(String msg,int lineNumber,int charStart,int charEnd){
  annotationModel.addAnnotation(new YangSyntaxAnnotation(msg),new Position(charStart,charEnd - charStart));
}

Fixed version (ground truth):
@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));
}