Program: 43134
Project: 43134
Buggy source:
/** 
 * Perform a search of Twitter. <p> Warning: the User objects returned by a search (as part of the Status objects) are dummy-users. The only information that is set is the user's screen-name and a profile image url. This reflects the current behaviour of the Twitter API. If you need more info, call users().show() with the screen names. <p> This supports   {@link #maxResults} and pagination. A language filter canbe set via  {@link #setLanguage(String)} Location can be set via{@link #setSearchLocation(double,double,String)}Other advanced search features can be done via the query string. E.g.<br> "from:winterstein" - tweets from user winterstein<br> "to:winterstein" - tweets start with @winterstein<br> "source:jtwitter" - originating from the application JTwitter - your query must also must contain at least one keyword parameter. <br> "filter:links" - tweets contain a link<br> "apples OR pears" - or ("apples pears" would give you apples <i>and</i> pears).
 * @param searchTerm This can include several space-separated keywords, #tags and @username (for mentions), and use quotes for \"exact phrase\" searches.
 * @param callback an object whose process() method will be called on each new page of results.
 * @param rpp results per page. 100 is the default
 * @return search results - up to maxResults if maxResults is positive, orrpp if maxResults is negative/zero. See {@link #setMaxResults(int)} to use > 100.
 */
public List<Status> search(String searchTerm,ICallback callback,int rpp){
  if (rpp > 100 && maxResults < rpp)   throw new IllegalArgumentException("String_Node_Str" + rpp);
  Map vars;
  if (maxResults < 100 && maxResults > 0) {
    vars=getSearchParams(searchTerm,maxResults);
  }
 else {
    vars=getSearchParams(searchTerm,rpp);
  }
  List<Status> allResults=new ArrayList<Status>(Math.max(maxResults,rpp));
  String url=TWITTER_URL + "String_Node_Str";
  BigInteger maxId=untilId;
  do {
    vars.put("String_Node_Str",maxId);
    List<Status> stati;
    try {
      String json=http.getPage(url,vars,true);
      stati=Status.getStatusesFromSearch(this,json);
    }
 catch (    TwitterException.Parsing pex) {
      if (http.isRetryOnError()) {
        InternalUtils.sleep(250);
        String json=http.getPage(url,vars,true);
        stati=Status.getStatusesFromSearch(this,json);
      }
 else {
        throw pex;
      }
    }
    int numResults=stati.size();
    maxId=InternalUtils.getMinId(maxId,stati);
    stati=dateFilter(stati);
    allResults.addAll(stati);
    if (callback != null) {
      if (callback.process(stati)) {
        break;
      }
    }
    if (numResults < rpp) {
      break;
    }
  }
 while (allResults.size() < maxResults);
  return allResults;
}

Fixed version (ground truth):
/** 
 * Perform a search of Twitter. <p> Warning: the User objects returned by a search (as part of the Status objects) are dummy-users. The only information that is set is the user's screen-name and a profile image url. This reflects the current behaviour of the Twitter API. If you need more info, call users().show() with the screen names. <p> This supports   {@link #maxResults} and pagination. A language filter canbe set via  {@link #setLanguage(String)} Location can be set via{@link #setSearchLocation(double,double,String)}Other advanced search features can be done via the query string. E.g.<br> "from:winterstein" - tweets from user winterstein<br> "to:winterstein" - tweets start with @winterstein<br> "source:jtwitter" - originating from the application JTwitter - your query must also must contain at least one keyword parameter. <br> "filter:links" - tweets contain a link<br> "apples OR pears" - or ("apples pears" would give you apples <i>and</i> pears).
 * @param searchTerm This can include several space-separated keywords, #tags and @username (for mentions), and use quotes for \"exact phrase\" searches.
 * @param callback an object whose process() method will be called on each new page of results.
 * @param rpp results per page. 100 is the default
 * @return search results - up to maxResults if maxResults is positive, orrpp if maxResults is negative/zero. See {@link #setMaxResults(int)} to use > 100.
 */
public List<Status> search(String searchTerm,ICallback callback,int rpp){
  if (rpp > 100 && maxResults < rpp)   throw new IllegalArgumentException("String_Node_Str" + rpp);
  Map vars;
  if (maxResults < 100 && maxResults > 0) {
    vars=getSearchParams(searchTerm,maxResults);
  }
 else {
    vars=getSearchParams(searchTerm,rpp);
  }
  List<Status> allResults=new ArrayList<Status>(Math.max(maxResults,rpp));
  String url=TWITTER_URL + "String_Node_Str";
  BigInteger maxId=untilId;
  do {
    vars.put("String_Node_Str",maxId);
    List<Status> stati;
    try {
      String json=http.getPage(url,vars,true);
      stati=Status.getStatusesFromSearch(this,json);
    }
 catch (    TwitterException.Parsing pex) {
      if (http.isRetryOnError()) {
        InternalUtils.sleep(250);
        String json=http.getPage(url,vars,true);
        stati=Status.getStatusesFromSearch(this,json);
      }
 else {
        throw pex;
      }
    }
    int numResults=stati.size();
    maxId=InternalUtils.getMinId(maxId,stati);
    stati=dateFilter(stati);
    allResults.addAll(stati);
    if (callback != null) {
      if (callback.process(stati)) {
        break;
      }
    }
    if ((rpp == 100 && numResults < 70) || numResults < rpp) {
      break;
    }
  }
 while (allResults.size() < maxResults);
  return allResults;
}