Program: 33278
Project: 33278
Buggy source:
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);
  }
}

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];
              currentTitle=mDBpedia.group(1);
              currentTitle=URLDecoder.decode(currentTitle,"String_Node_Str");
              Microposts2014Annotation annotation=null;
              int offset=indexMentionAlreadySpotted(mention,currentAnns);
              int currentPos=tweet.indexOf(mention,offset);
              if (currentPos >= 0) {
                annotation=new Microposts2014Annotation(mention,currentPos,mention.length(),currentTitle);
              }
              if (annotation == null) {
                annotation=findMentionInsideTweetIgnoringHashes(tweet,mention,offset,currentTitle);
              }
              if (annotation == null) {
                LOGGER.error("String_Node_Str",mention,tweet,offset);
              }
 else {
                currentAnns.add(annotation);
                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)       LOGGER.warn("String_Node_Str" + aA.title);
 else       sA.add(new Annotation(aA.position,aA.length,wid));
    }
    HashSet<Annotation> sANonOverlapping=Annotation.deleteOverlappingAnnotations(sA);
    annotations.add(sANonOverlapping);
  }
}