Program: 76634
Project: 76634
Buggy source:
/** 
 * Return a description of the object specified by verbosity. If versobity = RECEIVERS(7), then returns a String containing the receivers of this port. The returned String has the same  format as the Receivers array, ie. each row corresponding to  a channel, and all the elements in a row are receiving the  clone of the same token. Each element in the receivers array  has the form: container's_full_name.receiver_type,  e.g. e0.p0.Mailbox. Every null element in the array is  is a string "null" in the returned String.  If versobity = REMOTE_RECEIVERS(7), then returns a String  containing the remote receivers of this port. The returned String has the same  format as the remoteReceivers array, ie. each row corresponding to  a channel, and all the elements in a row are the destination  receiving the  clone of the same token. Each element in the receivers array  has the form: container's_full_name.receiver_type,  e.g. e0.p0.Mailbox.  FIXME: The information of getReceivers(IORelation) and  getRemoteReceivers(IORelation) is not included.
 * @param verbosity The level of verbosity.
 */
public String description(int verbosity){
  String results=new String();
  Receiver[][] recvrs;
switch (verbosity) {
case RECEIVERS:
    recvrs=getReceivers();
  break;
case REMOTE_RECEIVERS:
recvrs=getRemoteReceivers();
break;
default :
return super.description(verbosity);
}
if (recvrs == null) {
return "String_Node_Str";
}
for (int i=0; i < recvrs.length; i++) {
if (recvrs[i] == null) {
results+="String_Node_Str";
}
 else {
for (int j=0; j < recvrs[i].length; j++) {
results=results.concat((recvrs[i][j].getContainer()).getFullName() + "String_Node_Str" + (recvrs[i][j].getClass()).getName()+ "String_Node_Str");
}
}
results+="String_Node_Str";
}
return results;
}

Fixed version (ground truth):
/** 
 * Return a description of the object specified by verbosity. If verbosity = RECEIVERS(7), then returns a String containing the receivers of this port. The returned String has the same  format as the Receivers array, ie. each row corresponding to  a channel, and all the elements in a row are receiving the  clone of the same token. Each element in the receivers array  has the form: container's_full_name.receiver_type,  e.g. e0.p0.pt.actors.Mailbox. Every null element in the array is  is a string "null" in the returned String.  If verbosity = REMOTE_RECEIVERS(8), then returns a String  containing the remote receivers of this port. The returned String has the same  format as the remoteReceivers array, ie. each row corresponding to  a channel, and all the elements in a row are the destination  receiving the  clone of the same token. Each element in the receivers array  has the form: container's_full_name.receiver_type,  e.g. e0.p0.pt.acotrs.Mailbox.  NOTE: The information of getReceivers(IORelation) and  getRemoteReceivers(IORelation) is not included.
 * @param verbosity The level of verbosity.
 */
public String description(int verbosity){
  String results=new String();
  Receiver[][] recvrs;
switch (verbosity) {
case RECEIVERS:
    recvrs=getReceivers();
  break;
case REMOTE_RECEIVERS:
recvrs=getRemoteReceivers();
break;
default :
return super.description(verbosity);
}
if (recvrs == null) {
return "String_Node_Str";
}
for (int i=0; i < recvrs.length; i++) {
if (recvrs[i] == null) {
results+="String_Node_Str";
}
 else {
for (int j=0; j < recvrs[i].length; j++) {
results=results.concat((recvrs[i][j].getContainer()).getFullName() + "String_Node_Str" + (recvrs[i][j].getClass()).getName()+ "String_Node_Str");
}
}
results+="String_Node_Str";
}
return results;
}