Program: 75586
Project: 75586
Buggy source:
/** 
 * For each Argument, a port of the same name is created, belonging to this argument.
 * @return void
 */
public void createPorts(){
  Iterator arguments=argumentsList().iterator();
  TypedIOPort port;
  boolean exist=false;
  while (arguments.hasNext()) {
    Argument argument=(Argument)arguments.next();
    port=(TypedIOPort)this.getPort(argument.getName());
    if (port == null) {
      if (argument.isReturn())       try {
        port=(TypedIOPort)this.newPort(argument.getName());
        port.setInput(false);
        port.setOutput(true);
        port.setTypeEquals(BaseType.GENERAL);
      }
 catch (      Exception ex) {
        MessageHandler.error("String_Node_Str",ex);
      }
 else       if (argument.isInput() && argument.isOutput()) {
        try {
          port=(TypedIOPort)this.newPort(argument.getName() + "String_Node_Str");
          port.setInput(argument.isInput());
          port.setTypeEquals(BaseType.GENERAL);
          port=(TypedIOPort)this.newPort(argument.getName() + "String_Node_Str");
          port.setOutput(argument.isOutput());
          port.setTypeEquals(BaseType.GENERAL);
        }
 catch (        Exception ex) {
          MessageHandler.error("String_Node_Str",ex);
        }
      }
 else {
        try {
          port=(TypedIOPort)this.newPort(argument.getName());
          port.setInput(argument.isInput());
          port.setOutput(argument.isOutput());
          port.setTypeEquals(BaseType.GENERAL);
        }
 catch (        Exception ex) {
          MessageHandler.error("String_Node_Str",ex);
        }
      }
    }
 else {
      if (argument.isReturn()) {
        port.setInput(false);
        port.setOutput(true);
        port.setTypeEquals(BaseType.GENERAL);
      }
 else {
        port.setInput(argument.isInput());
        port.setOutput(argument.isOutput());
        port.setTypeEquals(BaseType.GENERAL);
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * For each Argument, a port of the same name is created, belonging to this argument.
 * @return void
 */
public void createPorts(){
  Iterator arguments=this.argumentsList().iterator();
  TypedIOPort port;
  boolean exist=false;
  while (arguments.hasNext()) {
    Argument argument=(Argument)arguments.next();
    port=(TypedIOPort)this.getPort(argument.getName());
    if (port == null) {
      if (argument.isReturn())       try {
        port=(TypedIOPort)this.newPort(argument.getName());
        port.setInput(false);
        port.setOutput(true);
        port.setTypeEquals(BaseType.GENERAL);
      }
 catch (      Exception ex) {
        MessageHandler.error("String_Node_Str",ex);
      }
 else       if (argument.isInput() && argument.isOutput()) {
        try {
          port=(TypedIOPort)this.newPort(argument.getName() + "String_Node_Str");
          port.setInput(argument.isInput());
          port.setTypeEquals(BaseType.GENERAL);
          port=(TypedIOPort)this.newPort(argument.getName() + "String_Node_Str");
          port.setOutput(argument.isOutput());
          port.setTypeEquals(BaseType.GENERAL);
        }
 catch (        Exception ex) {
          MessageHandler.error("String_Node_Str",ex);
        }
      }
 else {
        try {
          port=(TypedIOPort)this.newPort(argument.getName());
          port.setInput(argument.isInput());
          port.setOutput(argument.isOutput());
          port.setTypeEquals(BaseType.GENERAL);
        }
 catch (        Exception ex) {
          MessageHandler.error("String_Node_Str",ex);
        }
      }
    }
 else {
      if (argument.isReturn()) {
        port.setInput(false);
        port.setOutput(true);
        port.setTypeEquals(BaseType.GENERAL);
      }
 else {
        port.setInput(argument.isInput());
        port.setOutput(argument.isOutput());
        port.setTypeEquals(BaseType.GENERAL);
      }
    }
  }
}