Program: 14684
Project: 14684
Buggy source:
private static void updatePostsInTag(final String tagName,final ReaderActions.RequestDataAction updateAction,final ReaderActions.UpdateResultAndCountListener resultListener,final ReaderActions.PostBackfillListener backfillListener){
  StringBuilder sb=new StringBuilder(getEndpointForTag(tagName));
  sb.append("String_Node_Str").append(ReaderConstants.READER_MAX_POSTS_TO_REQUEST);
  sb.append("String_Node_Str");
  if (ReaderPostTable.hasPostsWithTag(tagName)) {
switch (updateAction) {
case LOAD_NEWER:
      String dateNewest=ReaderTagTable.getTagNewestDate(tagName);
    if (!TextUtils.isEmpty(dateNewest)) {
      sb.append("String_Node_Str").append(UrlUtils.urlEncode(dateNewest));
      AppLog.d(T.READER,String.format("String_Node_Str",tagName,dateNewest));
    }
  break;
case LOAD_OLDER:
String dateOldest=ReaderTagTable.getTagOldestDate(tagName);
if (TextUtils.isEmpty(dateOldest)) {
dateOldest=ReaderPostTable.getOldestPubDateWithTag(tagName);
}
if (!TextUtils.isEmpty(dateOldest)) {
sb.append("String_Node_Str").append(UrlUtils.urlEncode(dateOldest));
AppLog.d(T.READER,String.format("String_Node_Str",tagName,dateOldest));
}
break;
}
}
 else {
AppLog.d(T.READER,String.format("String_Node_Str",tagName));
}
com.wordpress.rest.RestRequest.Listener listener=new RestRequest.Listener(){
@Override public void onResponse(JSONObject jsonObject){
handleUpdatePostsWithTagResponse(tagName,updateAction,jsonObject,resultListener,backfillListener);
}
}
;
RestRequest.ErrorListener errorListener=new RestRequest.ErrorListener(){
@Override public void onErrorResponse(VolleyError volleyError){
AppLog.e(T.READER,volleyError);
if (resultListener != null) {
resultListener.onUpdateResult(ReaderActions.UpdateResult.FAILED,-1);
}
}
}
;
WordPress.getRestClientUtils().get(sb.toString(),null,null,listener,errorListener);
}

Fixed version (ground truth):
private static void updatePostsInTag(final String tagName,final ReaderActions.RequestDataAction updateAction,final ReaderActions.UpdateResultAndCountListener resultListener,final ReaderActions.PostBackfillListener backfillListener){
  String endpoint=getEndpointForTag(tagName);
  if (TextUtils.isEmpty(endpoint)) {
    if (resultListener != null) {
      resultListener.onUpdateResult(ReaderActions.UpdateResult.FAILED,-1);
    }
    return;
  }
  StringBuilder sb=new StringBuilder(endpoint);
  sb.append("String_Node_Str").append(ReaderConstants.READER_MAX_POSTS_TO_REQUEST);
  sb.append("String_Node_Str");
  if (ReaderPostTable.hasPostsWithTag(tagName)) {
switch (updateAction) {
case LOAD_NEWER:
      String dateNewest=ReaderTagTable.getTagNewestDate(tagName);
    if (!TextUtils.isEmpty(dateNewest)) {
      sb.append("String_Node_Str").append(UrlUtils.urlEncode(dateNewest));
      AppLog.d(T.READER,String.format("String_Node_Str",tagName,dateNewest));
    }
  break;
case LOAD_OLDER:
String dateOldest=ReaderTagTable.getTagOldestDate(tagName);
if (TextUtils.isEmpty(dateOldest)) {
dateOldest=ReaderPostTable.getOldestPubDateWithTag(tagName);
}
if (!TextUtils.isEmpty(dateOldest)) {
sb.append("String_Node_Str").append(UrlUtils.urlEncode(dateOldest));
AppLog.d(T.READER,String.format("String_Node_Str",tagName,dateOldest));
}
break;
}
}
 else {
AppLog.d(T.READER,String.format("String_Node_Str",tagName));
}
com.wordpress.rest.RestRequest.Listener listener=new RestRequest.Listener(){
@Override public void onResponse(JSONObject jsonObject){
handleUpdatePostsWithTagResponse(tagName,updateAction,jsonObject,resultListener,backfillListener);
}
}
;
RestRequest.ErrorListener errorListener=new RestRequest.ErrorListener(){
@Override public void onErrorResponse(VolleyError volleyError){
AppLog.e(T.READER,volleyError);
if (resultListener != null) {
resultListener.onUpdateResult(ReaderActions.UpdateResult.FAILED,-1);
}
}
}
;
WordPress.getRestClientUtils().get(sb.toString(),null,null,listener,errorListener);
}