Program: 33277
Project: 33277
Buggy source:
public Microposts2014Dataset(String file,WikipediaApiInterface wikiApi) throws IOException, XPathExpressionException, ParserConfigurationException, SAXException {
  List<HashSet<Microposts2014Annotation>> mAnns=new Vector<HashSet<Microposts2014Annotation>>();
  List<String> titlesToPrefetch=new Vector<String>();
  BufferedReader r=new BufferedReader(new InputStreamReader(new FileInputStream(file),Charset.forName("String_Node_Str")));
  String line;
  HashSet<Microposts2014Annotation> currentAnns=null;
  String currentTitle=null;
  while ((line=r.readLine()) != null) {
    int currentPos=1;
    currentAnns=new HashSet<Microposts2014Annotation>();
    mAnns.add(currentAnns);
    Matcher mRecord=recordPattern.matcher(line);
    if (mRecord.matches()) {
      String tweetQuoted=(mRecord.group(2)).trim();
      Matcher mTweet=textPattern.matcher(tweetQuoted);
      if (mTweet.matches()) {
        tweets.add(new MutableString(mTweet.group(1)));
        String pairs=mRecord.group(4);
        if (pairs != null && !pairs.equals("String_Node_Str")) {
          String[] tAnn=pairs.split("String_Node_Str");
          for (int i=0; i < tAnn.length; i=i + 2) {
            System.out.println(mRecord.group(1));
            Matcher m=dbpediaUrlPattern.matcher(tAnn[i + 1]);
            if (m.matches()) {
              currentTitle=m.group(1);
              currentTitle=URLDecoder.decode(currentTitle,"String_Node_Str");
              currentAnns.add(new Microposts2014Annotation(currentPos,currentTitle));
              titlesToPrefetch.add(currentTitle);
              currentPos++;
            }
          }
        }
      }
    }
 else {
      r.close();
      throw new AnnotationException("String_Node_Str" + "String_Node_Str" + "String_Node_Str");
    }
  }
  r.close();
  wikiApi.prefetchTitles(titlesToPrefetch);
  for (  HashSet<Microposts2014Annotation> s : mAnns) {
    HashSet<Annotation> sA=new HashSet<Annotation>();
    for (    Microposts2014Annotation aA : s) {
      int wid=wikiApi.getIdByTitle(aA.title);
      if (wid == -1)       System.out.println("String_Node_Str" + aA.title);
 else       sA.add(new Annotation(aA.position,aA.title.length(),wid));
    }
    HashSet<Annotation> sANonOverlapping=Annotation.deleteOverlappingAnnotations(sA);
    annotations.add(sANonOverlapping);
  }
}

Fixed version (ground truth):
public Microposts2014Dataset(String file,WikipediaApiInterface wikiApi) throws IOException, XPathExpressionException, ParserConfigurationException, SAXException {
  List<List<Microposts2014Annotation>> mAnns=new ArrayList<List<Microposts2014Annotation>>();
  List<String> titlesToPrefetch=new Vector<String>();
  BufferedReader r=new BufferedReader(new InputStreamReader(new FileInputStream(file),Charset.forName("String_Node_Str")));
  String line;
  List<Microposts2014Annotation> currentAnns=null;
  String currentTitle=null;
  while ((line=r.readLine()) != null) {
    currentAnns=new ArrayList<Microposts2014Annotation>();
    mAnns.add(currentAnns);
    Matcher mRecord=recordPattern.matcher(line);
    if (mRecord.matches()) {
      String tweetQuoted=(mRecord.group(2)).trim();
      Matcher mTweet=textPattern.matcher(tweetQuoted);
      if (mTweet.matches()) {
        String tweet=mTweet.group(1);
        tweets.add(new MutableString(tweet));
        String pairs=mRecord.group(4);
        if (pairs != null && !pairs.equals("String_Node_Str")) {
          String[] tAnn=pairs.split("String_Node_Str");
          for (int i=0; i < tAnn.length; i=i + 2) {
            Matcher mDBpedia=dbpediaUrlPattern.matcher(tAnn[i + 1]);
            if (mDBpedia.matches()) {
              String mention=tAnn[i];
              int offset=indexMentionAlreadySpotted(mention,currentAnns);
              int currentPos=tweet.indexOf(mention,offset);
              currentTitle=mDBpedia.group(1);
              currentTitle=URLDecoder.decode(currentTitle,"String_Node_Str");
              currentAnns.add(new Microposts2014Annotation(mention,currentPos,mention.length(),currentTitle));
              System.out.println(mention + "String_Node_Str" + currentPos+ "String_Node_Str"+ mention.length()+ "String_Node_Str"+ currentTitle);
              titlesToPrefetch.add(currentTitle);
            }
          }
        }
      }
    }
 else {
      r.close();
      throw new AnnotationException("String_Node_Str" + "String_Node_Str" + "String_Node_Str");
    }
  }
  r.close();
  wikiApi.prefetchTitles(titlesToPrefetch);
  for (  List<Microposts2014Annotation> s : mAnns) {
    HashSet<Annotation> sA=new HashSet<Annotation>();
    for (    Microposts2014Annotation aA : s) {
      int wid=wikiApi.getIdByTitle(aA.title);
      if (wid == -1)       System.out.println("String_Node_Str" + aA.title);
 else       sA.add(new Annotation(aA.position,aA.length,wid));
    }
    HashSet<Annotation> sANonOverlapping=Annotation.deleteOverlappingAnnotations(sA);
    annotations.add(sANonOverlapping);
  }
}