Program: 73423
Project: 73423
Buggy source:
/** 
 * Annotates the model so that when it is displayed it will be color coded and have tooltips that will convey various aspects of the solution.
 */
public void annotateGraph(){
  if (_debug) {
    trace();
  }
  String color;
  StringBuffer moml=new StringBuffer();
  for (int j=0; j < _numVariables; j++) {
    String explanation=_varBindings[j];
    color=null;
    if (_varState[j] == _CONSISTENT) {
      color="String_Node_Str";
    }
 else     if (_varState[j] == _INCONSISTENT) {
      color="String_Node_Str";
    }
    moml.append("String_Node_Str" + _variables[j] + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ color+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ explanation+ "String_Node_Str"+ "String_Node_Str");
  }
  for (int constraintNum=0; constraintNum < _numConstraints; constraintNum++) {
    NamedObj source=_source[constraintNum];
    String expression=_constraintExplanations[constraintNum];
    color=null;
    if (_constraintState[constraintNum] == _CONSISTENT) {
      color="String_Node_Str";
    }
 else     if (_constraintState[constraintNum] == _INCONSISTENT) {
      color="String_Node_Str";
    }
    if (source instanceof IOPort) {
      IOPort port=(IOPort)source;
      ComponentEntity actor=(ComponentEntity)(port.getContainer());
      moml.append("String_Node_Str" + actor.getName() + "String_Node_Str"+ _momlAnnotate(port,color,expression)+ "String_Node_Str");
    }
 else     if (source instanceof IORelation) {
      IORelation relation=(IORelation)source;
      moml.append(_momlAnnotate(relation,color,expression));
    }
 else     if (source instanceof ComponentEntity) {
      ComponentEntity componentEntity=(ComponentEntity)source;
      moml.append(_momlAnnotate(componentEntity,color,expression));
    }
  }
  if (moml.length() > 0) {
    String momlUpdate="String_Node_Str" + moml.toString() + "String_Node_Str";
    MoMLChangeRequest request=new MoMLChangeRequest(this,_model,momlUpdate);
    request.setUndoable(true);
    request.setPersistent(false);
    _debug("String_Node_Str" + momlUpdate);
    _model.requestChange(request);
  }
}

Fixed version (ground truth):
/** 
 * Annotates the model so that when it is displayed it will be color coded and have tooltips that will convey various aspects of the solution.
 */
public void annotateGraph(){
  if (_debug) {
    trace();
  }
  String colorString;
  StringBuffer moml=new StringBuffer();
  for (int j=0; j < _numVariables; j++) {
    String explanation=_varBindings[j];
    Color colorValue=null;
    if (_varState[j] == _CONSISTENT) {
      colorValue=Color.GREEN;
    }
 else     if (_varState[j] == _INCONSISTENT) {
      colorValue=Color.RED;
    }
    colorString=_getColorString(colorValue);
    moml.append("String_Node_Str" + _variables[j] + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ colorString+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ explanation+ "String_Node_Str"+ "String_Node_Str");
  }
  for (int constraintNum=0; constraintNum < _numConstraints; constraintNum++) {
    NamedObj source=_source[constraintNum];
    String expression=_constraintExplanations[constraintNum];
    Color colorValue=null;
    if (_constraintState[constraintNum] == _CONSISTENT) {
      colorValue=Color.GREEN;
    }
 else     if (_constraintState[constraintNum] == _INCONSISTENT) {
      colorValue=Color.RED;
    }
    colorString=_getColorString(colorValue);
    if (source instanceof IOPort) {
      IOPort port=(IOPort)source;
      ComponentEntity actor=(ComponentEntity)(port.getContainer());
      moml.append("String_Node_Str" + actor.getName() + "String_Node_Str"+ _momlAnnotate(port,colorString,expression)+ "String_Node_Str");
    }
 else     if (source instanceof IORelation) {
      IORelation relation=(IORelation)source;
      moml.append(_momlAnnotate(relation,colorString,expression));
    }
 else     if (source instanceof ComponentEntity) {
      ComponentEntity componentEntity=(ComponentEntity)source;
      moml.append(_momlAnnotate(componentEntity,colorString,expression));
    }
  }
  if (moml.length() > 0) {
    String momlUpdate="String_Node_Str" + moml.toString() + "String_Node_Str";
    MoMLChangeRequest request=new MoMLChangeRequest(this,_model,momlUpdate);
    request.setUndoable(true);
    request.setPersistent(false);
    _debug("String_Node_Str" + momlUpdate);
    _model.requestChange(request);
  }
}