nus-yam/ex-repair huggingface dataset:
Program: 93153
Project: 93153
Buggy source:
public ReportNotificationPopup(String link){
  super(getDisplay());
  setFadingEnabled(true);
  setDelayClose(DELAY_CLOSE_MS);
  this.message=link;
}

Fixed version (ground truth):
public ReportNotificationPopup(String link,String url){
  super(getDisplay());
  setFadingEnabled(true);
  setDelayClose(DELAY_CLOSE_MS);
  this.message=link;
  this.url=url;
}
Program: 93154
Project: 93154
Buggy source:
@Override protected void createContentArea(Composite composite){
  super.createContentArea(composite);
  composite.setLayout(new GridLayout(1,true));
  Link link=new Link(composite,SWT.WRAP);
  link.setText(message);
  link.setLayoutData(GridDataFactory.fillDefaults().hint(AbstractNotificationPopup.MAX_WIDTH,SWT.DEFAULT).create());
  link.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      Browsers.openInExternalBrowser(e.text);
    }
  }
);
}

Fixed version (ground truth):
@Override protected void createContentArea(Composite composite){
  super.createContentArea(composite);
  composite.setLayout(new GridLayout(1,true));
  Link link=new Link(composite,SWT.WRAP);
  link.setText(message);
  link.setLayoutData(GridDataFactory.fillDefaults().hint(AbstractNotificationPopup.MAX_WIDTH,SWT.DEFAULT).create());
  link.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      if (!isEmpty(url)) {
        Browsers.openInExternalBrowser(url);
      }
    }
  }
);
}
Program: 93155
Project: 93155
Buggy source:
private void openPopup(final String message){
  Display.getDefault().syncExec(new Runnable(){
    @Override public void run(){
      Window dialog=new ReportNotificationPopup(message);
      dialog.open();
    }
  }
);
}

Fixed version (ground truth):
private void openPopup(final String message,final String url){
  Display.getDefault().syncExec(new Runnable(){
    @Override public void run(){
      Window dialog=new ReportNotificationPopup(message,url);
      dialog.open();
    }
  }
);
}
Program: 93156
Project: 93156
Buggy source:
@Override public void run(){
  Window dialog=new ReportNotificationPopup(message);
  dialog.open();
}

Fixed version (ground truth):
@Override public void run(){
  Window dialog=new ReportNotificationPopup(message,url);
  dialog.open();
}
Program: 93157
Project: 93157
Buggy source:
public static void unzip(File zipFile,File destFolder) throws IOException {
  ZipInputStream zis=null;
  try {
    InputSupplier<FileInputStream> fis=Files.newInputStreamSupplier(zipFile);
    zis=new ZipInputStream(fis.getInput());
    ZipEntry entry;
    while ((entry=zis.getNextEntry()) != null) {
      if (!entry.isDirectory()) {
        final File file=new File(destFolder,entry.getName());
        Files.createParentDirs(file);
        Files.write(ByteStreams.toByteArray(zis),file);
      }
    }
  }
  finally {
    Closeables.close(zis,true);
  }
}

Fixed version (ground truth):
public static void unzip(File zipFile,File destFolder) throws IOException {
  ZipInputStream zis=null;
  try {
    InputSupplier<FileInputStream> fis=Files.newInputStreamSupplier(zipFile);
    zis=new ZipInputStream(fis.getInput());
    ZipEntry entry;
    while ((entry=zis.getNextEntry()) != null) {
      if (!entry.isDirectory()) {
        final File file=new File(destFolder,entry.getName());
        Files.createParentDirs(file);
        Files.asByteSink(file,FileWriteMode.APPEND).writeFrom(zis);
      }
    }
  }
  finally {
    Closeables.close(zis,true);
  }
}
Program: 93158
Project: 93158
Buggy source:
public static void zip(File directory,File out) throws IOException {
  ZipOutputStream zos=null;
  try {
    OutputSupplier<FileOutputStream> s=Files.newOutputStreamSupplier(out);
    zos=new ZipOutputStream(s.getOutput());
    for (    File f : FileUtils.listFiles(directory,FILE,DIRECTORY)) {
      String path=removeStart(f.getPath(),directory.getAbsolutePath() + File.separator);
      path=path.replace(File.separatorChar,'/');
      ZipEntry e=new ZipEntry(path);
      zos.putNextEntry(e);
      byte[] data=Files.toByteArray(f);
      zos.write(data);
      zos.closeEntry();
    }
  }
  finally {
    Closeables.close(zos,false);
  }
}

Fixed version (ground truth):
public static void zip(File directory,File out) throws IOException {
  ZipOutputStream zos=null;
  try {
    OutputSupplier<FileOutputStream> s=Files.newOutputStreamSupplier(out);
    zos=new ZipOutputStream(s.getOutput());
    for (    File f : FileUtils.listFiles(directory,FILE,DIRECTORY)) {
      String path=removeStart(f.getPath(),directory.getAbsolutePath() + File.separator);
      path=path.replace(File.separatorChar,'/');
      ZipEntry e=new ZipEntry(path);
      zos.putNextEntry(e);
      Files.asByteSource(f).copyTo(zos);
      zos.closeEntry();
    }
  }
  finally {
    Closeables.close(zos,false);
  }
}
Program: 93159
Project: 93159
Buggy source:
@Override public int getRelevance(){
  return (2 ^ 12) - chain.getElements().size();
}

Fixed version (ground truth):
@Override public int getRelevance(){
  return -chain.getElements().size();
}
Program: 93161
Project: 93161
Buggy source:
@Override public int compare(ICompletionProposal p1,ICompletionProposal p2){
  if (p1 instanceof SnippetProposal && p2 instanceof SnippetProposal) {
    SnippetProposal s1=(SnippetProposal)p1;
    SnippetProposal s2=(SnippetProposal)p2;
    return ComparisonChain.start().compare(s1.getRepositoryRelevance(),s2.getRepositoryRelevance()).compare(s2.getRelevance(),s1.getRelevance()).compare(s1.getSnippet().getName(),s2.getSnippet().getName()).result();
  }
 else   if (p1 instanceof RepositoryProposal && p2 instanceof RepositoryProposal) {
    RepositoryProposal s1=(RepositoryProposal)p1;
    RepositoryProposal s2=(RepositoryProposal)p2;
    return ComparisonChain.start().compare(s1.getRepositoryPriority(),s2.getRepositoryPriority()).result();
  }
 else   if (p1 instanceof RepositoryProposal && p2 instanceof SnippetProposal) {
    return compareSnippetWithRepository((SnippetProposal)p2,(RepositoryProposal)p1);
  }
 else   if (p1 instanceof SnippetProposal && p2 instanceof RepositoryProposal) {
    return compareSnippetWithRepository((SnippetProposal)p1,(RepositoryProposal)p2);
  }
 else {
    return RELEVANCE_SORTER.compare(p1,p2);
  }
}

Fixed version (ground truth):
@Override public int compare(ICompletionProposal p1,ICompletionProposal p2){
  if (p1 instanceof SnippetProposal && p2 instanceof SnippetProposal) {
    SnippetProposal s1=(SnippetProposal)p1;
    SnippetProposal s2=(SnippetProposal)p2;
    return ComparisonChain.start().compare(s1.getRepositoryRelevance(),s2.getRepositoryRelevance()).compare(s2.getRelevance(),s1.getRelevance()).compare(s1.getSnippet().getName(),s2.getSnippet().getName()).result();
  }
 else   if (p1 instanceof RepositoryProposal && p2 instanceof RepositoryProposal) {
    RepositoryProposal s1=(RepositoryProposal)p1;
    RepositoryProposal s2=(RepositoryProposal)p2;
    return ComparisonChain.start().compare(s1.getRepositoryPriority(),s2.getRepositoryPriority()).result();
  }
 else   if (p1 instanceof RepositoryProposal && p2 instanceof SnippetProposal) {
    int i=compareSnippetWithRepository((SnippetProposal)p2,(RepositoryProposal)p1);
    return i;
  }
 else   if (p1 instanceof SnippetProposal && p2 instanceof RepositoryProposal) {
    int i=-compareSnippetWithRepository((SnippetProposal)p1,(RepositoryProposal)p2);
    return i;
  }
 else {
    return RELEVANCE_SORTER.compare(p1,p2);
  }
}
Program: 93162
Project: 93162
Buggy source:
private int compareSnippetWithRepository(SnippetProposal s,RepositoryProposal r){
  int comparison=ComparisonChain.start().compare(r.getRepositoryPriority(),s.getRepositoryRelevance()).result();
  return comparison != 0 ? comparison : 1;
}

Fixed version (ground truth):
private int compareSnippetWithRepository(SnippetProposal s,RepositoryProposal r){
  int comparison=ComparisonChain.start().compare(r.getRepositoryPriority(),s.getRepositoryRelevance()).result();
  return comparison != 0 ? comparison : -1;
}
Program: 93165
Project: 93165
Buggy source:
@Override public void modifyText(ModifyEvent e){
  String query=searchText.getText().trim();
  processor.setTerms(query);
  assistant.showPossibleCompletions();
  assistant.showContextInformation();
  if (selectedProposal instanceof RepositoryProposal) {
    execute(ContentAssistant.SELECT_NEXT_PROPOSAL_COMMAND_ID);
  }
}

Fixed version (ground truth):
@Override public void modifyText(ModifyEvent e){
  String query=searchText.getText().trim();
  processor.setTerms(query);
  assistant.setEmptyMessage(Messages.COMPLETION_ENGINE_NO_SNIPPETS_FOUND);
  assistant.showPossibleCompletions();
  assistant.showContextInformation();
  if (selectedProposal instanceof RepositoryProposal) {
    execute(ContentAssistant.SELECT_NEXT_PROPOSAL_COMMAND_ID);
  }
}
Program: 93166
Project: 93166
Buggy source:
@Override protected void createContentArea(Composite composite){
  super.createContentArea(composite);
  composite.setLayout(new GridLayout(1,true));
  Link link=new Link(composite,SWT.NONE);
  link.setText(message);
  link.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      Browsers.openInExternalBrowser(e.text);
    }
  }
);
}

Fixed version (ground truth):
@Override protected void createContentArea(Composite composite){
  super.createContentArea(composite);
  composite.setLayout(new GridLayout(1,true));
  Link link=new Link(composite,SWT.WRAP);
  link.setText(message);
  link.setLayoutData(GridDataFactory.fillDefaults().hint(AbstractNotificationPopup.MAX_WIDTH,SWT.DEFAULT).create());
  link.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      Browsers.openInExternalBrowser(e.text);
    }
  }
);
}
Program: 93168
Project: 93168
Buggy source:
protected ProcessableLazyJavaTypeCompletionProposal(final CompletionProposal coreProposal,final JavaContentAssistInvocationContext context){
  super(coreProposal,context);
}

Fixed version (ground truth):
protected ProcessableLazyJavaTypeCompletionProposal(final CompletionProposal coreProposal,final JavaContentAssistInvocationContext context){
  super(coreProposal,context);
  this.coreProposal=coreProposal;
}
Program: 93169
Project: 93169
Buggy source:
private Optional<Manifest> extractManifestFromProject(DependencyInfo dependencyInfo){
  File projectFolder=dependencyInfo.getFile();
  File metaInfFolder=new File(projectFolder,"String_Node_Str");
  File manifestFile=new File(metaInfFolder,"String_Node_Str");
  if (manifestFile.exists()) {
    try {
      FileInputStream fileInputStream=new FileInputStream(manifestFile);
      Manifest manifest=new Manifest(fileInputStream);
      fileInputStream.close();
      return of(manifest);
    }
 catch (    IOException e) {
      return absent();
    }
  }
  return absent();
}

Fixed version (ground truth):
private Optional<Manifest> extractManifestFromProject(DependencyInfo dependencyInfo){
  File projectFolder=dependencyInfo.getFile();
  File metaInfFolder=new File(projectFolder,"String_Node_Str");
  File manifestFile=new File(metaInfFolder,"String_Node_Str");
  if (manifestFile.exists()) {
    InputStream in=null;
    try {
      in=new FileInputStream(manifestFile);
      Manifest manifest=new Manifest(in);
      return of(manifest);
    }
 catch (    IOException e) {
      return absent();
    }
 finally {
      IOUtils.closeQuietly(in);
    }
  }
  return absent();
}
Program: 93170
Project: 93170
Buggy source:
@Override public Multimap deserialize(final JsonElement json,final Type typeOfT,final JsonDeserializationContext context) throws JsonParseException {
  final Multimap multimap=HashMultimap.create();
  final Map map=context.deserialize(json,createMapType(typeOfT));
  for (  final Object key : map.keySet()) {
    final Collection values=(Collection)map.get(key);
    multimap.putAll(key,values);
  }
  return multimap;
}

Fixed version (ground truth):
@Override public Multimap deserialize(final JsonElement json,final Type typeOfT,final JsonDeserializationContext context) throws JsonParseException {
  final Multimap multimap=HashMultimap.create();
  final Map<Object,Collection> map=context.deserialize(json,createMapType(typeOfT));
  for (  Entry<Object,Collection> entry : map.entrySet()) {
    multimap.putAll(entry.getKey(),entry.getValue());
  }
  return multimap;
}
Program: 93171
Project: 93171
Buggy source:
@Override public int compare(Integer o1,Integer o2){
  return -Double.compare(key[o1],key[o2]);
}

Fixed version (ground truth):
@Override public int compare(Integer o1,Integer o2){
  return Double.compare(key[o2],key[o1]);
}
Program: 93172
Project: 93172
Buggy source:
private int[] sortByKey(final double[] key,int[] array){
  int[] permutation=sort(indexArray(key.length),new Comparator<Integer>(){
    @Override public int compare(    Integer o1,    Integer o2){
      return -Double.compare(key[o1],key[o2]);
    }
  }
);
  return permute(array,permutation);
}

Fixed version (ground truth):
private int[] sortByKey(final double[] key,int[] array){
  int[] permutation=sort(indexArray(key.length),new Comparator<Integer>(){
    @Override public int compare(    Integer o1,    Integer o2){
      return Double.compare(key[o2],key[o1]);
    }
  }
);
  return permute(array,permutation);
}
Program: 93173
Project: 93173
Buggy source:
@Override public Number next(){
  index++;
  return array[index - 1];
}

Fixed version (ground truth):
@Override public Number next(){
  if (index >= array.length) {
    throw new NoSuchElementException();
  }
  return array[index++];
}
Program: 93174
Project: 93174
Buggy source:
@Override public Iterator<Number> iterator(){
  return new Iterator<Number>(){
    private int index=0;
    @Override public boolean hasNext(){
      return index < array.length;
    }
    @Override public Number next(){
      index++;
      return array[index - 1];
    }
    @Override public void remove(){
      throw new UnsupportedOperationException();
    }
  }
;
}

Fixed version (ground truth):
@Override public Iterator<Number> iterator(){
  return new Iterator<Number>(){
    private int index=0;
    @Override public boolean hasNext(){
      return index < array.length;
    }
    @Override public Number next(){
      if (index >= array.length) {
        throw new NoSuchElementException();
      }
      return array[index++];
    }
    @Override public void remove(){
      throw new UnsupportedOperationException();
    }
  }
;
}
Program: 93175
Project: 93175
Buggy source:
@Override public Number next(){
  index++;
  return array[index - 1];
}

Fixed version (ground truth):
@Override public Number next(){
  if (index >= array.length) {
    throw new NoSuchElementException();
  }
  return array[index++];
}
Program: 93176
Project: 93176
Buggy source:
@Override public Iterator<Number> iterator(){
  return new Iterator<Number>(){
    private int index=0;
    @Override public boolean hasNext(){
      return index < array.length;
    }
    @Override public Number next(){
      index++;
      return array[index - 1];
    }
    @Override public void remove(){
      throw new UnsupportedOperationException();
    }
  }
;
}

Fixed version (ground truth):
@Override public Iterator<Number> iterator(){
  return new Iterator<Number>(){
    private int index=0;
    @Override public boolean hasNext(){
      return index < array.length;
    }
    @Override public Number next(){
      if (index >= array.length) {
        throw new NoSuchElementException();
      }
      return array[index++];
    }
    @Override public void remove(){
      throw new UnsupportedOperationException();
    }
  }
;
}
Program: 93177
Project: 93177
Buggy source:
public static boolean matchesSuffixPattern(String path,String suffixPattern){
  int separators=countMatches(suffixPattern,"String_Node_Str") + 1;
  int separatorIndex=path.length();
  while (separators > 0) {
    separatorIndex=path.lastIndexOf("String_Node_Str",separatorIndex - 1);
    separators--;
  }
  String substring=path.substring(separatorIndex + 1);
  return FilenameUtils.wildcardMatch(substring,suffixPattern);
}

Fixed version (ground truth):
public static boolean matchesSuffixPattern(String path,String suffixPattern){
  int separators=countMatches(suffixPattern,"String_Node_Str") + 1;
  int separatorIndex=path.length();
  while (separators > 0) {
    separatorIndex=path.lastIndexOf('/',separatorIndex - 1);
    separators--;
  }
  String substring=path.substring(separatorIndex + 1);
  return FilenameUtils.wildcardMatch(substring,suffixPattern);
}
Program: 93178
Project: 93178
Buggy source:
@Override public int compare(final Viewer viewer,final Object o1,final Object o2){
  if (direction == SWT.NONE) {
    return 0;
  }
  Comparator<Object> comparator=comparators.get(tableColumn);
  if (comparator == null) {
    return 0;
  }
  int result=comparator.compare(o1,o2);
  return (direction == SWT.DOWN) ? -result : result;
}

Fixed version (ground truth):
@Override public int compare(final Viewer viewer,final Object o1,final Object o2){
  if (direction == SWT.NONE) {
    return 0;
  }
  Comparator<Object> comparator=comparators.get(tableColumn);
  if (comparator == null) {
    return 0;
  }
  return direction == SWT.DOWN ? comparator.compare(o2,o1) : comparator.compare(o1,o2);
}
Program: 93179
Project: 93179
Buggy source:
public int compare(Object arg0,Object arg1){
  return arg0.toString().compareTo(arg1.toString());
}

Fixed version (ground truth):
@Override public int compare(Object arg0,Object arg1){
  return arg0.toString().compareTo(arg1.toString());
}
Program: 93180
Project: 93180
Buggy source:
public boolean isConsistentItem(Object item){
  return true;
}

Fixed version (ground truth):
@Override public boolean isConsistentItem(Object item){
  return true;
}
Program: 93182
Project: 93182
Buggy source:
@Override protected ItemsFilter createFilter(){
  return new ItemsFilter(){
    public boolean matchItem(    Object item){
      return matches(item.toString());
    }
    @Override public String getPattern(){
      String pattern=super.getPattern();
      if (pattern.equals("String_Node_Str")) {
        return "String_Node_Str";
      }
      return pattern;
    }
    public boolean isConsistentItem(    Object item){
      return true;
    }
  }
;
}

Fixed version (ground truth):
@Override protected ItemsFilter createFilter(){
  return new ItemsFilter(){
    @Override public boolean matchItem(    Object item){
      return matches(item.toString());
    }
    @Override public String getPattern(){
      String pattern=super.getPattern();
      if (pattern.equals("String_Node_Str")) {
        return "String_Node_Str";
      }
      return pattern;
    }
    @Override public boolean isConsistentItem(    Object item){
      return true;
    }
  }
;
}
Program: 93183
Project: 93183
Buggy source:
@Override protected Comparator getItemsComparator(){
  return new Comparator(){
    public int compare(    Object arg0,    Object arg1){
      return arg0.toString().compareTo(arg1.toString());
    }
  }
;
}

Fixed version (ground truth):
@Override protected Comparator getItemsComparator(){
  return new Comparator(){
    @Override public int compare(    Object arg0,    Object arg1){
      return arg0.toString().compareTo(arg1.toString());
    }
  }
;
}
Program: 93184
Project: 93184
Buggy source:
public boolean matchItem(Object item){
  return matches(item.toString());
}

Fixed version (ground truth):
@Override public boolean matchItem(Object item){
  return matches(item.toString());
}
Program: 93186
Project: 93186
Buggy source:
@Override public int compare(Integer o1,Integer o2){
  return -Double.compare(key[o1],key[o2]);
}

Fixed version (ground truth):
@Override public int compare(Integer o1,Integer o2){
  return Double.compare(key[o2],key[o1]);
}
Program: 93187
Project: 93187
Buggy source:
private int[] sortByKey(final double[] key,int[] array){
  int[] permutation=sort(indexArray(key.length),new Comparator<Integer>(){
    @Override public int compare(    Integer o1,    Integer o2){
      return -Double.compare(key[o1],key[o2]);
    }
  }
);
  return permute(array,permutation);
}

Fixed version (ground truth):
private int[] sortByKey(final double[] key,int[] array){
  int[] permutation=sort(indexArray(key.length),new Comparator<Integer>(){
    @Override public int compare(    Integer o1,    Integer o2){
      return Double.compare(key[o2],key[o1]);
    }
  }
);
  return permute(array,permutation);
}
Program: 93188
Project: 93188
Buggy source:
@Override public Number next(){
  index++;
  return array[index - 1];
}

Fixed version (ground truth):
@Override public Number next(){
  if (index >= array.length) {
    throw new NoSuchElementException();
  }
  return array[index++];
}
Program: 93189
Project: 93189
Buggy source:
@Override public Iterator<Number> iterator(){
  return new Iterator<Number>(){
    private int index=0;
    @Override public boolean hasNext(){
      return index < array.length;
    }
    @Override public Number next(){
      index++;
      return array[index - 1];
    }
    @Override public void remove(){
      throw new UnsupportedOperationException();
    }
  }
;
}

Fixed version (ground truth):
@Override public Iterator<Number> iterator(){
  return new Iterator<Number>(){
    private int index=0;
    @Override public boolean hasNext(){
      return index < array.length;
    }
    @Override public Number next(){
      if (index >= array.length) {
        throw new NoSuchElementException();
      }
      return array[index++];
    }
    @Override public void remove(){
      throw new UnsupportedOperationException();
    }
  }
;
}
Program: 93190
Project: 93190
Buggy source:
@Override public Number next(){
  index++;
  return array[index - 1];
}

Fixed version (ground truth):
@Override public Number next(){
  if (index >= array.length) {
    throw new NoSuchElementException();
  }
  return array[index++];
}
Program: 93191
Project: 93191
Buggy source:
@Override public Iterator<Number> iterator(){
  return new Iterator<Number>(){
    private int index=0;
    @Override public boolean hasNext(){
      return index < array.length;
    }
    @Override public Number next(){
      index++;
      return array[index - 1];
    }
    @Override public void remove(){
      throw new UnsupportedOperationException();
    }
  }
;
}

Fixed version (ground truth):
@Override public Iterator<Number> iterator(){
  return new Iterator<Number>(){
    private int index=0;
    @Override public boolean hasNext(){
      return index < array.length;
    }
    @Override public Number next(){
      if (index >= array.length) {
        throw new NoSuchElementException();
      }
      return array[index++];
    }
    @Override public void remove(){
      throw new UnsupportedOperationException();
    }
  }
;
}
Program: 93192
Project: 93192
Buggy source:
public static boolean matchesSuffixPattern(String path,String suffixPattern){
  int separators=countMatches(suffixPattern,"String_Node_Str") + 1;
  int separatorIndex=path.length();
  while (separators > 0) {
    separatorIndex=path.lastIndexOf("String_Node_Str",separatorIndex - 1);
    separators--;
  }
  String substring=path.substring(separatorIndex + 1);
  return FilenameUtils.wildcardMatch(substring,suffixPattern);
}

Fixed version (ground truth):
public static boolean matchesSuffixPattern(String path,String suffixPattern){
  int separators=countMatches(suffixPattern,"String_Node_Str") + 1;
  int separatorIndex=path.length();
  while (separators > 0) {
    separatorIndex=path.lastIndexOf('/',separatorIndex - 1);
    separators--;
  }
  String substring=path.substring(separatorIndex + 1);
  return FilenameUtils.wildcardMatch(substring,suffixPattern);
}
Program: 93193
Project: 93193
Buggy source:
@Override public int compare(final Viewer viewer,final Object o1,final Object o2){
  if (direction == SWT.NONE) {
    return 0;
  }
  Comparator<Object> comparator=comparators.get(tableColumn);
  if (comparator == null) {
    return 0;
  }
  int result=comparator.compare(o1,o2);
  return (direction == SWT.DOWN) ? -result : result;
}

Fixed version (ground truth):
@Override public int compare(final Viewer viewer,final Object o1,final Object o2){
  if (direction == SWT.NONE) {
    return 0;
  }
  Comparator<Object> comparator=comparators.get(tableColumn);
  if (comparator == null) {
    return 0;
  }
  return direction == SWT.DOWN ? comparator.compare(o2,o1) : comparator.compare(o1,o2);
}
Program: 93194
Project: 93194
Buggy source:
public int compare(Object arg0,Object arg1){
  return arg0.toString().compareTo(arg1.toString());
}

Fixed version (ground truth):
@Override public int compare(Object arg0,Object arg1){
  return arg0.toString().compareTo(arg1.toString());
}
Program: 93195
Project: 93195
Buggy source:
public boolean isConsistentItem(Object item){
  return true;
}

Fixed version (ground truth):
@Override public boolean isConsistentItem(Object item){
  return true;
}
Program: 93197
Project: 93197
Buggy source:
@Override protected ItemsFilter createFilter(){
  return new ItemsFilter(){
    public boolean matchItem(    Object item){
      return matches(item.toString());
    }
    @Override public String getPattern(){
      String pattern=super.getPattern();
      if (pattern.equals("String_Node_Str")) {
        return "String_Node_Str";
      }
      return pattern;
    }
    public boolean isConsistentItem(    Object item){
      return true;
    }
  }
;
}

Fixed version (ground truth):
@Override protected ItemsFilter createFilter(){
  return new ItemsFilter(){
    @Override public boolean matchItem(    Object item){
      return matches(item.toString());
    }
    @Override public String getPattern(){
      String pattern=super.getPattern();
      if (pattern.equals("String_Node_Str")) {
        return "String_Node_Str";
      }
      return pattern;
    }
    @Override public boolean isConsistentItem(    Object item){
      return true;
    }
  }
;
}
Program: 93198
Project: 93198
Buggy source:
@Override protected Comparator getItemsComparator(){
  return new Comparator(){
    public int compare(    Object arg0,    Object arg1){
      return arg0.toString().compareTo(arg1.toString());
    }
  }
;
}

Fixed version (ground truth):
@Override protected Comparator getItemsComparator(){
  return new Comparator(){
    @Override public int compare(    Object arg0,    Object arg1){
      return arg0.toString().compareTo(arg1.toString());
    }
  }
;
}
Program: 93199
Project: 93199
Buggy source:
public boolean matchItem(Object item){
  return matches(item.toString());
}

Fixed version (ground truth):
@Override public boolean matchItem(Object item){
  return matches(item.toString());
}
Program: 93201
Project: 93201
Buggy source:
public ProposalCollectingCompletionRequestor(final JavaContentAssistInvocationContext ctx,boolean ignoreConstructors,boolean ignoreTypes){
  super(false);
  checkNotNull(ctx);
  jdtuiContext=ctx;
  initalizeCollector(ignoreConstructors,ignoreTypes);
}

Fixed version (ground truth):
public ProposalCollectingCompletionRequestor(final JavaContentAssistInvocationContext ctx){
  super(false);
  checkNotNull(ctx);
  jdtuiContext=ctx;
  initalizeCollector();
}
Program: 93202
Project: 93202
Buggy source:
private void initalizeCollector(boolean ignoreConstructors,boolean ignoreTypes){
  if (shouldFillArgumentNames()) {
    collector=new FillArgumentNamesCompletionProposalCollector(jdtuiContext);
  }
 else {
    collector=new CompletionProposalCollector(jdtuiContext.getCompilationUnit(),false);
  }
  configureInterestedProposalTypes(ignoreConstructors,ignoreTypes);
  adjustProposalReplacementLength();
}

Fixed version (ground truth):
private void initalizeCollector(){
  if (shouldFillArgumentNames()) {
    collector=new FillArgumentNamesCompletionProposalCollector(jdtuiContext);
  }
 else {
    collector=new CompletionProposalCollector(jdtuiContext.getCompilationUnit(),false);
  }
  configureInterestedProposalTypes();
  adjustProposalReplacementLength();
}
Program: 93204
Project: 93204
Buggy source:
@Override public void init(IWorkbench workbench){
  setPreferenceStore(new ScopedPreferenceStore(InstanceScope.INSTANCE,Constants.BUNDLE_ID));
  setMessage(Messages.PREFPAGE_TITLE_SUBWORDS);
  setDescription(Messages.PREFPAGE_DESCRIPTION_SUBWORDS);
}

Fixed version (ground truth):
@Override public void init(IWorkbench workbench){
  setPreferenceStore(new ScopedPreferenceStore(InstanceScope.INSTANCE,Constants.BUNDLE_ID));
  setMessage(Messages.PREFPAGE_TITLE_SUBWORDS);
  setDescription(Messages.PREFPAGE_DESCRIPTION_SUBWORDS_PREFIX_LENGTH);
}
Program: 93205
Project: 93205
Buggy source:
@Override protected void createFieldEditors(){
  addField(new BooleanFieldEditor(Constants.PREF_COMPREHENSIVE_SUBWORDS_MATCHING_CONSTRUCTORS,Messages.FIELD_LABEL_COMPREHENSIVE_SUBWORDS_MATCHING_CONSTRUCTORS,getFieldEditorParent()));
  addField(new BooleanFieldEditor(Constants.PREF_COMPREHENSIVE_SUBWORDS_MATCHING_TYPES,Messages.FIELD_LABEL_COMPREHENSIVE_SUBWORDS_MATCHING_TYPES,getFieldEditorParent()));
}

Fixed version (ground truth):
@Override protected void createFieldEditors(){
  IntegerFieldEditor prefixLengthEditor=new IntegerFieldEditor(Constants.PREF_MIN_PREFIX_LENGTH_FOR_TYPES,Messages.PREFPAGE_LABEL_PREFIX_LENGTH,getFieldEditorParent());
  prefixLengthEditor.setValidRange(1,99);
  Text control=prefixLengthEditor.getTextControl(getFieldEditorParent());
  ControlDecoration dec=new ControlDecoration(control,SWT.TOP | SWT.LEFT,getFieldEditorParent());
  FieldDecoration infoDecoration=FieldDecorationRegistry.getDefault().getFieldDecoration(DEC_INFORMATION);
  dec.setImage(infoDecoration.getImage());
  dec.setDescriptionText(Messages.PREFPAGE_TOOLTIP_PREFIX_LENGTH);
  addField(prefixLengthEditor);
}
Program: 93206
Project: 93206
Buggy source:
@Override public void initializeDefaultPreferences(){
  IEclipsePreferences s=DefaultScope.INSTANCE.getNode(BUNDLE_ID);
  s.putBoolean(PREF_COMPREHENSIVE_SUBWORDS_MATCHING_CONSTRUCTORS,true);
  s.putBoolean(PREF_COMPREHENSIVE_SUBWORDS_MATCHING_TYPES,true);
}

Fixed version (ground truth):
@Override public void initializeDefaultPreferences(){
  IEclipsePreferences s=DefaultScope.INSTANCE.getNode(BUNDLE_ID);
  s.putInt(PREF_MIN_PREFIX_LENGTH_FOR_TYPES,2);
}
Program: 93207
Project: 93207
Buggy source:
private TreeSet<Integer> computeTriggerLocations(int offset,ASTNode completionNode,ASTNode completionNodeParent,int length){
  TreeSet<Integer> triggerlocations=Sets.newTreeSet();
  int emptyPrefix=offset - length;
  triggerlocations.add(emptyPrefix);
  if (length == 0) {
    triggerlocations.add(emptyPrefix);
    return triggerlocations;
  }
  triggerlocations.add(emptyPrefix);
  triggerlocations.add(emptyPrefix + 1);
  return triggerlocations;
}

Fixed version (ground truth):
private TreeSet<Integer> computeTriggerLocations(int offset,ASTNode completionNode,ASTNode completionNodeParent,int length){
  TreeSet<Integer> triggerlocations=Sets.newTreeSet();
  int emptyPrefix=offset - length;
  triggerlocations.add(emptyPrefix);
  int triggerOffset=Math.min(prefs.minPrefixLengthForTypes,length);
  triggerlocations.add(emptyPrefix + triggerOffset);
  return triggerlocations;
}
Program: 93208
Project: 93208
Buggy source:
private ProposalCollectingCompletionRequestor computeProposals(ICompilationUnit cu,JavaContentAssistInvocationContext coreContext,int offset){
  ProposalCollectingCompletionRequestor collector=new ProposalCollectingCompletionRequestor(coreContext,!prefs.computeAdditionalConstructorProposals,!prefs.computeAdditionalTypeProposals);
  try {
    cu.codeComplete(offset,collector,new TimeDelimitedProgressMonitor(5000));
  }
 catch (  final Exception e) {
    log(EXCEPTION_DURING_CODE_COMPLETION,e);
  }
  return collector;
}

Fixed version (ground truth):
private ProposalCollectingCompletionRequestor computeProposals(ICompilationUnit cu,JavaContentAssistInvocationContext coreContext,int offset){
  ProposalCollectingCompletionRequestor collector=new ProposalCollectingCompletionRequestor(coreContext);
  try {
    cu.codeComplete(offset,collector,new TimeDelimitedProgressMonitor(5000));
  }
 catch (  final Exception e) {
    log(EXCEPTION_DURING_CODE_COMPLETION,e);
  }
  return collector;
}
Program: 93209
Project: 93209
Buggy source:
public ProposalCollectingCompletionRequestor(final JavaContentAssistInvocationContext ctx,boolean ignoreConstructors,boolean ignoreTypes){
  super(false);
  checkNotNull(ctx);
  jdtuiContext=ctx;
  initalizeCollector(ignoreConstructors,ignoreTypes);
}

Fixed version (ground truth):
public ProposalCollectingCompletionRequestor(final JavaContentAssistInvocationContext ctx){
  super(false);
  checkNotNull(ctx);
  jdtuiContext=ctx;
  initalizeCollector();
}
Program: 93210
Project: 93210
Buggy source:
private void initalizeCollector(boolean ignoreConstructors,boolean ignoreTypes){
  if (shouldFillArgumentNames()) {
    collector=new FillArgumentNamesCompletionProposalCollector(jdtuiContext);
  }
 else {
    collector=new CompletionProposalCollector(jdtuiContext.getCompilationUnit(),false);
  }
  configureInterestedProposalTypes(ignoreConstructors,ignoreTypes);
  adjustProposalReplacementLength();
}

Fixed version (ground truth):
private void initalizeCollector(){
  if (shouldFillArgumentNames()) {
    collector=new FillArgumentNamesCompletionProposalCollector(jdtuiContext);
  }
 else {
    collector=new CompletionProposalCollector(jdtuiContext.getCompilationUnit(),false);
  }
  configureInterestedProposalTypes();
  adjustProposalReplacementLength();
}
Program: 93212
Project: 93212
Buggy source:
@Override public void init(IWorkbench workbench){
  setPreferenceStore(new ScopedPreferenceStore(InstanceScope.INSTANCE,Constants.BUNDLE_ID));
  setMessage(Messages.PREFPAGE_TITLE_SUBWORDS);
  setDescription(Messages.PREFPAGE_DESCRIPTION_SUBWORDS);
}

Fixed version (ground truth):
@Override public void init(IWorkbench workbench){
  setPreferenceStore(new ScopedPreferenceStore(InstanceScope.INSTANCE,Constants.BUNDLE_ID));
  setMessage(Messages.PREFPAGE_TITLE_SUBWORDS);
  setDescription(Messages.PREFPAGE_DESCRIPTION_SUBWORDS_PREFIX_LENGTH);
}
Program: 93213
Project: 93213
Buggy source:
@Override protected void createFieldEditors(){
  addField(new BooleanFieldEditor(Constants.PREF_COMPREHENSIVE_SUBWORDS_MATCHING_CONSTRUCTORS,Messages.FIELD_LABEL_COMPREHENSIVE_SUBWORDS_MATCHING_CONSTRUCTORS,getFieldEditorParent()));
  addField(new BooleanFieldEditor(Constants.PREF_COMPREHENSIVE_SUBWORDS_MATCHING_TYPES,Messages.FIELD_LABEL_COMPREHENSIVE_SUBWORDS_MATCHING_TYPES,getFieldEditorParent()));
}

Fixed version (ground truth):
@Override protected void createFieldEditors(){
  IntegerFieldEditor prefixLengthEditor=new IntegerFieldEditor(Constants.PREF_MIN_PREFIX_LENGTH_FOR_TYPES,Messages.PREFPAGE_LABEL_PREFIX_LENGTH,getFieldEditorParent());
  prefixLengthEditor.setValidRange(1,99);
  Text control=prefixLengthEditor.getTextControl(getFieldEditorParent());
  ControlDecoration dec=new ControlDecoration(control,SWT.TOP | SWT.LEFT,getFieldEditorParent());
  FieldDecoration infoDecoration=FieldDecorationRegistry.getDefault().getFieldDecoration(DEC_INFORMATION);
  dec.setImage(infoDecoration.getImage());
  dec.setDescriptionText(Messages.PREFPAGE_TOOLTIP_PREFIX_LENGTH);
  addField(prefixLengthEditor);
}
Program: 93214
Project: 93214
Buggy source:
@Override public void initializeDefaultPreferences(){
  IEclipsePreferences s=DefaultScope.INSTANCE.getNode(BUNDLE_ID);
  s.putBoolean(PREF_COMPREHENSIVE_SUBWORDS_MATCHING_CONSTRUCTORS,true);
  s.putBoolean(PREF_COMPREHENSIVE_SUBWORDS_MATCHING_TYPES,true);
}

Fixed version (ground truth):
@Override public void initializeDefaultPreferences(){
  IEclipsePreferences s=DefaultScope.INSTANCE.getNode(BUNDLE_ID);
  s.putInt(PREF_MIN_PREFIX_LENGTH_FOR_TYPES,2);
}
Program: 93215
Project: 93215
Buggy source:
private TreeSet<Integer> computeTriggerLocations(int offset,ASTNode completionNode,ASTNode completionNodeParent,int length){
  TreeSet<Integer> triggerlocations=Sets.newTreeSet();
  int emptyPrefix=offset - length;
  triggerlocations.add(emptyPrefix);
  if (length == 0) {
    triggerlocations.add(emptyPrefix);
    return triggerlocations;
  }
  triggerlocations.add(emptyPrefix);
  triggerlocations.add(emptyPrefix + 1);
  return triggerlocations;
}

Fixed version (ground truth):
private TreeSet<Integer> computeTriggerLocations(int offset,ASTNode completionNode,ASTNode completionNodeParent,int length){
  TreeSet<Integer> triggerlocations=Sets.newTreeSet();
  int emptyPrefix=offset - length;
  triggerlocations.add(emptyPrefix);
  int triggerOffset=Math.min(prefs.minPrefixLengthForTypes,length);
  triggerlocations.add(emptyPrefix + triggerOffset);
  return triggerlocations;
}
Program: 93216
Project: 93216
Buggy source:
private ProposalCollectingCompletionRequestor computeProposals(ICompilationUnit cu,JavaContentAssistInvocationContext coreContext,int offset){
  ProposalCollectingCompletionRequestor collector=new ProposalCollectingCompletionRequestor(coreContext,!prefs.computeAdditionalConstructorProposals,!prefs.computeAdditionalTypeProposals);
  try {
    cu.codeComplete(offset,collector,new TimeDelimitedProgressMonitor(5000));
  }
 catch (  final Exception e) {
    log(EXCEPTION_DURING_CODE_COMPLETION,e);
  }
  return collector;
}

Fixed version (ground truth):
private ProposalCollectingCompletionRequestor computeProposals(ICompilationUnit cu,JavaContentAssistInvocationContext coreContext,int offset){
  ProposalCollectingCompletionRequestor collector=new ProposalCollectingCompletionRequestor(coreContext);
  try {
    cu.codeComplete(offset,collector,new TimeDelimitedProgressMonitor(5000));
  }
 catch (  final Exception e) {
    log(EXCEPTION_DURING_CODE_COMPLETION,e);
  }
  return collector;
}
Program: 93217
Project: 93217
Buggy source:
@Override public String isValid(String newText){
  if (newText.isEmpty()) {
    return Messages.PREFPAGE_ERROR_INVALID_BRANCH_PREFIX_FORMAT;
  }
  try {
    new URI(newText);
    return null;
  }
 catch (  URISyntaxException e) {
    return e.getMessage();
  }
}

Fixed version (ground truth):
@Override public String isValid(String newText){
  if (newText.isEmpty()) {
    return Messages.PREFPAGE_ERROR_INVALID_REPO_URL;
  }
  try {
    new URI(newText);
    return null;
  }
 catch (  URISyntaxException e) {
    return e.getMessage();
  }
}
Program: 93218
Project: 93218
Buggy source:
private IType findReceiver(IRecommendersCompletionContext context) throws Exception {
  IType receiverType=context.getReceiverType().orNull();
  String receiverName=context.getReceiverName();
  if (isExplicitThis(receiverName) || isImplicitThis(receiverType,receiverName)) {
    final IMethod m=context.getEnclosingMethod().orNull();
    if (m == null || JdtFlags.isStatic(m)) {
      return receiverType;
    }
    final IType type=m.getDeclaringType();
    final ITypeHierarchy hierarchy=SuperTypeHierarchyCache.getTypeHierarchy(type);
    receiverType=hierarchy.getSuperclass(type);
  }
  return receiverType;
}

Fixed version (ground truth):
private IType findReceiver(IRecommendersCompletionContext context) throws Exception {
  IType receiverType=context.getReceiverType().orNull();
  String receiverName=context.getReceiverName();
  if (isExplicitThis(receiverName) || isImplicitThis(receiverType,receiverName)) {
    final IMethod m=context.getEnclosingMethod().orNull();
    if (m == null || JdtFlags.isStatic(m)) {
      return receiverType;
    }
    final IType type=m.getDeclaringType();
    final ITypeHierarchy hierarchy=SuperTypeHierarchyCache.getTypeHierarchy(type);
    receiverType=hierarchy.getSuperclass(type);
    if (receiverType == null) {
      String superclassTypeSignature=type.getSuperclassTypeSignature();
      if (superclassTypeSignature != null) {
        receiverType=JdtUtils.findTypeFromSignature(superclassTypeSignature,type).orNull();
      }
    }
  }
  return receiverType;
}
Program: 93219
Project: 93219
Buggy source:
public ProposalMatcher(CompletionProposal proposal,Optional<TypeBinding> receiverTypeBinding){
  final String jSignature=getSignature(proposal);
  final String[] parameterTypes=Signature.getParameterTypes(jSignature);
  final String[] methodTypeParameters=Signature.getTypeParameters(jSignature);
  jName=String.valueOf(proposal.getName());
  jParams=new ITypeName[parameterTypes.length];
  final String[] classTypeParameters=extractClassTypeParameters(receiverTypeBinding);
  for (int i=0; i < jParams.length; i++) {
    jParams[i]=asTypeName(parameterTypes[i],methodTypeParameters,classTypeParameters);
  }
}

Fixed version (ground truth):
public ProposalMatcher(CompletionProposal proposal,Optional<TypeBinding> receiverTypeBinding){
  proposedMethod=MatchingUtils.asMethodName(proposal,receiverTypeBinding);
}
Program: 93220
Project: 93220
Buggy source:
public boolean match(IMethodName rMethod){
  String rName=rMethod.getName();
  ITypeName[] rParams=rMethod.getParameterTypes();
  if (!rName.equals(jName)) {
    return false;
  }
  if (rParams.length != jParams.length) {
    return false;
  }
  for (int i=rParams.length; i-- > 0; ) {
    if (!rParams[i].equals(jParams[i])) {
      return false;
    }
  }
  return true;
}

Fixed version (ground truth):
public boolean match(IMethodName rMethod){
  String rName=rMethod.getName();
  ITypeName[] rParams=rMethod.getParameterTypes();
  if (!rName.equals(proposedMethod.getName())) {
    return false;
  }
  ITypeName[] parameterTypes=proposedMethod.getParameterTypes();
  if (rParams.length != parameterTypes.length) {
    return false;
  }
  for (int i=rParams.length; i-- > 0; ) {
    if (!rParams[i].equals(parameterTypes[i])) {
      return false;
    }
  }
  return true;
}
Program: 93222
Project: 93222
Buggy source:
public ProposalMatcher(CompletionProposal proposal,Optional<TypeBinding> receiverTypeBinding){
  final String jSignature=getSignature(proposal);
  final String[] parameterTypes=Signature.getParameterTypes(jSignature);
  final String[] methodTypeParameters=Signature.getTypeParameters(jSignature);
  jName=String.valueOf(proposal.getName());
  jParams=new ITypeName[parameterTypes.length];
  final String[] classTypeParameters=extractClassTypeParameters(receiverTypeBinding);
  for (int i=0; i < jParams.length; i++) {
    jParams[i]=asTypeName(parameterTypes[i],methodTypeParameters,classTypeParameters);
  }
}

Fixed version (ground truth):
public ProposalMatcher(CompletionProposal proposal,Optional<TypeBinding> receiverTypeBinding){
  proposedMethod=MatchingUtils.asMethodName(proposal,receiverTypeBinding);
}
Program: 93223
Project: 93223
Buggy source:
public boolean match(IMethodName rMethod){
  String rName=rMethod.getName();
  ITypeName[] rParams=rMethod.getParameterTypes();
  if (!rName.equals(jName)) {
    return false;
  }
  if (rParams.length != jParams.length) {
    return false;
  }
  for (int i=rParams.length; i-- > 0; ) {
    if (!rParams[i].equals(jParams[i])) {
      return false;
    }
  }
  return true;
}

Fixed version (ground truth):
public boolean match(IMethodName rMethod){
  String rName=rMethod.getName();
  ITypeName[] rParams=rMethod.getParameterTypes();
  if (!rName.equals(proposedMethod.getName())) {
    return false;
  }
  ITypeName[] parameterTypes=proposedMethod.getParameterTypes();
  if (rParams.length != parameterTypes.length) {
    return false;
  }
  for (int i=rParams.length; i-- > 0; ) {
    if (!rParams[i].equals(parameterTypes[i])) {
      return false;
    }
  }
  return true;
}
Program: 93225
Project: 93225
Buggy source:
private TemplateContextType createContextType(){
  JavaContextType contextType=new JavaContextType();
  contextType.setId(CONTEXT_ID);
  contextType.initializeContextTypeResolvers();
  ImportsResolver importResolver=new ImportsResolver();
  importResolver.setType("String_Node_Str");
  contextType.addResolver(importResolver);
  VarResolver varResolver=new VarResolver();
  varResolver.setType("String_Node_Str");
  contextType.addResolver(varResolver);
  TypeResolver typeResolver=new TypeResolver();
  typeResolver.setType("String_Node_Str");
  contextType.addResolver(typeResolver);
  LinkResolver linkResolver=new LinkResolver();
  linkResolver.setType("String_Node_Str");
  contextType.addResolver(linkResolver);
  NameResolver nameResolver=new NameResolver();
  nameResolver.setType("String_Node_Str");
  contextType.addResolver(nameResolver);
  ElementTypeResolver elementTypeResolver=new ElementTypeResolver();
  elementTypeResolver.setType("String_Node_Str");
  contextType.addResolver(elementTypeResolver);
  return contextType;
}

Fixed version (ground truth):
private TemplateContextType createContextType(){
  JavaContextType contextType=new JavaContextType();
  contextType.setId(CONTEXT_ID);
  contextType.initializeContextTypeResolvers();
  ImportsResolver importResolver=new ImportsResolver();
  importResolver.setType("String_Node_Str");
  contextType.addResolver(importResolver);
  StaticImportResolver staticImportResolver=new StaticImportResolver();
  staticImportResolver.setType("String_Node_Str");
  contextType.addResolver(staticImportResolver);
  VarResolver varResolver=new VarResolver();
  varResolver.setType("String_Node_Str");
  contextType.addResolver(varResolver);
  LocalVarResolver localVarResolver=new LocalVarResolver();
  localVarResolver.setType("String_Node_Str");
  contextType.addResolver(localVarResolver);
  FieldResolver fieldResolver=new FieldResolver();
  fieldResolver.setType("String_Node_Str");
  contextType.addResolver(fieldResolver);
  TypeResolver typeResolver=new TypeResolver();
  typeResolver.setType("String_Node_Str");
  contextType.addResolver(typeResolver);
  LinkResolver linkResolver=new LinkResolver();
  linkResolver.setType("String_Node_Str");
  contextType.addResolver(linkResolver);
  NameResolver nameResolver=new NameResolver();
  nameResolver.setType("String_Node_Str");
  contextType.addResolver(nameResolver);
  ElementTypeResolver elementTypeResolver=new ElementTypeResolver();
  elementTypeResolver.setType("String_Node_Str");
  contextType.addResolver(elementTypeResolver);
  TypeVariableResolver typeVariableResolver=new TypeVariableResolver();
  typeVariableResolver.setType("String_Node_Str");
  contextType.addResolver(typeVariableResolver);
  ExceptionVariableNameResolver exceptionVariableNameResolver=new ExceptionVariableNameResolver();
  exceptionVariableNameResolver.setType("String_Node_Str");
  contextType.addResolver(exceptionVariableNameResolver);
  return contextType;
}
Program: 93226
Project: 93226
Buggy source:
public ITypeName toRecType(IType jdtType){
  ensureIsNotNull(jdtType);
  jdtType=JdtUtils.resolveJavaElementProxy(jdtType);
  ITypeName recType=(ITypeName)cache.inverse().get(jdtType);
  if (recType == null) {
    String fullyQualifiedName=jdtType.getFullyQualifiedName();
    fullyQualifiedName=StringUtils.substringBefore(fullyQualifiedName,"String_Node_Str");
    recType=VmTypeName.get('L' + fullyQualifiedName.replace('.','/'));
    registerRecJdtElementPair(recType,jdtType);
  }
  return recType;
}

Fixed version (ground truth):
public ITypeName toRecType(IType jdtType){
  ensureIsNotNull(jdtType);
  jdtType=JdtUtils.resolveJavaElementProxy(jdtType);
  ITypeName recType=(ITypeName)cache.inverse().get(jdtType);
  if (recType == null) {
    String fullyQualifiedName=jdtType.getFullyQualifiedName();
    recType=VmTypeName.get('L' + fullyQualifiedName.replace('.','/'));
    registerRecJdtElementPair(recType,jdtType);
  }
  return recType;
}