Program: 166648
Project: 166648
Buggy source:
/** 
 * Get a String representation of the sentence for display purpose
 * @return The String
 */
public CharSequence toString(final Nar nar,final boolean showStamp){
  final CharSequence contentName=term.name();
  final long t=nar.time();
  final long diff=stamp.getOccurrenceTime() - nar.time();
  final long diffabs=Math.abs(diff);
  String timediff="String_Node_Str";
  if (diffabs < nar.narParameters.DURATION) {
    timediff="String_Node_Str";
  }
 else {
    final Long Int=diffabs;
    timediff=diff > 0 ? "String_Node_Str" + String.valueOf(Int) : "String_Node_Str" + String.valueOf(Int);
  }
  if (MiscFlags.TEST_RUNNING) {
    timediff="String_Node_Str" + String.valueOf(stamp.getOccurrenceTime());
  }
  String tenseString="String_Node_Str" + timediff + "String_Node_Str";
  if (stamp.getOccurrenceTime() == Stamp.ETERNAL)   tenseString="String_Node_Str";
  final CharSequence stampString=showStamp ? stamp.name() : null;
  int stringLength=contentName.length() + tenseString.length() + 1+ 1;
  if (truth != null)   stringLength+=11;
  if (showStamp)   stringLength+=stampString.length() + 1;
  String conv="String_Node_Str";
  if (term.term_indices != null) {
    conv="String_Node_Str";
    for (int i=0; i < 4; i++) {
      conv+=String.valueOf(term.term_indices[i]) + "String_Node_Str";
    }
    conv=conv.substring(0,conv.length() - 1) + "String_Node_Str";
  }
  final StringBuilder buffer=new StringBuilder(stringLength).append(contentName).append(punctuation).append(conv);
  if (tenseString.length() > 0)   buffer.append(' ').append(tenseString);
  if (truth != null) {
    buffer.append(' ');
    truth.appendString(buffer,true);
  }
  if (showStamp)   buffer.append(' ').append(stampString);
  return buffer;
}

Fixed version (ground truth):
/** 
 * @param nar Reasoner instance
 * @param showStamp must the stamp get appended to the string?
 * @return textural representation of the sentence for humans
 */
public CharSequence toString(final Nar nar,final boolean showStamp){
  final CharSequence contentName=term.name();
  final long t=nar.time();
  final long diff=stamp.getOccurrenceTime() - nar.time();
  final long diffabs=Math.abs(diff);
  String timediff="String_Node_Str";
  if (diffabs < nar.narParameters.DURATION) {
    timediff="String_Node_Str";
  }
 else {
    final Long Int=diffabs;
    timediff=diff > 0 ? "String_Node_Str" + String.valueOf(Int) : "String_Node_Str" + String.valueOf(Int);
  }
  if (MiscFlags.TEST_RUNNING) {
    timediff="String_Node_Str" + String.valueOf(stamp.getOccurrenceTime());
  }
  String tenseString="String_Node_Str" + timediff + "String_Node_Str";
  if (stamp.getOccurrenceTime() == Stamp.ETERNAL)   tenseString="String_Node_Str";
  final CharSequence stampString=showStamp ? stamp.name() : null;
  int stringLength=contentName.length() + tenseString.length() + 1+ 1;
  if (truth != null)   stringLength+=11;
  if (showStamp)   stringLength+=stampString.length() + 1;
  String conv="String_Node_Str";
  if (term.term_indices != null) {
    conv="String_Node_Str";
    for (int i=0; i < 4; i++) {
      conv+=String.valueOf(term.term_indices[i]) + "String_Node_Str";
    }
    conv=conv.substring(0,conv.length() - 1) + "String_Node_Str";
  }
  final StringBuilder buffer=new StringBuilder(stringLength).append(contentName).append(punctuation).append(conv);
  if (tenseString.length() > 0)   buffer.append(' ').append(tenseString);
  if (truth != null) {
    buffer.append(' ');
    truth.appendString(buffer,true);
  }
  if (showStamp)   buffer.append(' ').append(stampString);
  return buffer;
}