Program: 14299
Project: 14299
Buggy source:
public List<Map<String,Object>> getBlogsBy(String byString,String[] extraFields,int limit,boolean shouldHideJetpack){
  if (db == null) {
    return new Vector<>();
  }
  if (shouldHideJetpack) {
    String hideJetpackArgs="String_Node_Str";
    if (TextUtils.isEmpty(byString)) {
      byString=hideJetpackArgs;
    }
 else {
      byString=hideJetpackArgs + "String_Node_Str" + byString;
    }
  }
  String limitStr=null;
  if (limit != 0) {
    limitStr=String.valueOf(limit);
  }
  String[] baseFields=new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
  String[] allFields=baseFields;
  if (extraFields != null) {
    allFields=(String[])ArrayUtils.addAll(baseFields,extraFields);
  }
  Cursor c=db.query(BLOGS_TABLE,allFields,byString,null,null,null,null,limitStr);
  int numRows=c.getCount();
  c.moveToFirst();
  List<Map<String,Object>> blogs=new Vector<>();
  for (int i=0; i < numRows; i++) {
    int id=c.getInt(0);
    String blogName=c.getString(1);
    String username=c.getString(2);
    int blogId=c.getInt(3);
    String url=c.getString(4);
    if (id > 0) {
      Map<String,Object> blogMap=new HashMap<>();
      blogMap.put("String_Node_Str",id);
      blogMap.put("String_Node_Str",blogName);
      blogMap.put("String_Node_Str",username);
      blogMap.put("String_Node_Str",blogId);
      blogMap.put("String_Node_Str",url);
      int extraFieldsIndex=baseFields.length;
      if (extraFields != null) {
        for (int j=0; j < extraFields.length; ++j) {
          blogMap.put(extraFields[j],c.getString(extraFieldsIndex + j));
        }
      }
      blogs.add(blogMap);
    }
    c.moveToNext();
  }
  c.close();
  Collections.sort(blogs,BlogUtils.BlogNameComparator);
  return blogs;
}

Fixed version (ground truth):
public List<Map<String,Object>> getBlogsBy(String byString,String[] extraFields,int limit,boolean shouldHideJetpack){
  if (db == null) {
    return new Vector<>();
  }
  if (shouldHideJetpack) {
    String hideJetpackArgs=String.format("String_Node_Str",encryptPassword("String_Node_Str"));
    if (TextUtils.isEmpty(byString)) {
      byString=hideJetpackArgs;
    }
 else {
      byString=hideJetpackArgs + "String_Node_Str" + byString;
    }
  }
  String limitStr=null;
  if (limit != 0) {
    limitStr=String.valueOf(limit);
  }
  String[] baseFields=new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
  String[] allFields=baseFields;
  if (extraFields != null) {
    allFields=(String[])ArrayUtils.addAll(baseFields,extraFields);
  }
  Cursor c=db.query(BLOGS_TABLE,allFields,byString,null,null,null,null,limitStr);
  int numRows=c.getCount();
  c.moveToFirst();
  List<Map<String,Object>> blogs=new Vector<>();
  for (int i=0; i < numRows; i++) {
    int id=c.getInt(0);
    String blogName=c.getString(1);
    String username=c.getString(2);
    int blogId=c.getInt(3);
    String url=c.getString(4);
    if (id > 0) {
      Map<String,Object> blogMap=new HashMap<>();
      blogMap.put("String_Node_Str",id);
      blogMap.put("String_Node_Str",blogName);
      blogMap.put("String_Node_Str",username);
      blogMap.put("String_Node_Str",blogId);
      blogMap.put("String_Node_Str",url);
      int extraFieldsIndex=baseFields.length;
      if (extraFields != null) {
        for (int j=0; j < extraFields.length; ++j) {
          blogMap.put(extraFields[j],c.getString(extraFieldsIndex + j));
        }
      }
      blogs.add(blogMap);
    }
    c.moveToNext();
  }
  c.close();
  Collections.sort(blogs,BlogUtils.BlogNameComparator);
  return blogs;
}