Program: 72617
Project: 72617
Buggy source:
/** 
 * Construct an instance of the attribute.
 * @param container The container.
 * @param name The name.
 * @exception IllegalActionException If the superclass throws it.
 * @exception NameDuplicationException If the superclass throws it.
 */
public WebServer(NamedObj container,String name) throws IllegalActionException, NameDuplicationException {
  super(container,name);
  preferredPort=new Parameter(this,"String_Node_Str");
  preferredPort.setTypeEquals(BaseType.INT);
  preferredPort.setExpression(Integer.toString(WebServerUtilities.DEFAULT_PORT_NUMBER));
  applicationPath=new StringParameter(this,"String_Node_Str");
  applicationPath.setExpression("String_Node_Str");
  resourcePath=new StringParameter(this,"String_Node_Str");
  resourcePath.setExpression("String_Node_Str");
  resourceLocation=new FileParameter(this,"String_Node_Str");
  Parameter allowDirectories=new Parameter(resourceLocation,"String_Node_Str");
  allowDirectories.setToken("String_Node_Str");
  allowDirectories.setVisibility(Settable.NONE);
  Parameter allowFiles=new Parameter(resourceLocation,"String_Node_Str");
  allowFiles.setToken("String_Node_Str");
  allowFiles.setVisibility(Settable.NONE);
  URI modelURI=URIAttribute.getModelURI(this);
  String path;
  if (modelURI != null && modelURI.getPath() != null && !modelURI.getPath().isEmpty()) {
    path=modelURI.getPath();
    int slash=path.lastIndexOf("String_Node_Str");
    if (slash != -1) {
      path=path.substring(0,slash);
    }
  }
 else {
    path="String_Node_Str";
  }
  resourceLocation.setExpression(path);
  temporaryFileLocation=new FileParameter(this,"String_Node_Str");
  temporaryFileLocation.setExpression("String_Node_Str");
  deployedPort=new Parameter(this,"String_Node_Str");
  deployedPort.setExpression("String_Node_Str");
  deployedPort.setVisibility(Settable.NOT_EDITABLE);
  deployedPort.setPersistent(false);
  _dynamicPortSelection=false;
  _endpointManager=WebSocketEndpointManager.getInstance();
}

Fixed version (ground truth):
/** 
 * Construct an instance of the attribute.
 * @param container The container.
 * @param name The name.
 * @exception IllegalActionException If the superclass throws it.
 * @exception NameDuplicationException If the superclass throws it.
 */
public WebServer(NamedObj container,String name) throws IllegalActionException, NameDuplicationException {
  super(container,name);
  preferredPort=new Parameter(this,"String_Node_Str");
  preferredPort.setTypeEquals(BaseType.INT);
  preferredPort.setExpression(Integer.toString(WebServerUtilities.DEFAULT_PORT_NUMBER));
  applicationPath=new StringParameter(this,"String_Node_Str");
  applicationPath.setExpression("String_Node_Str");
  resourcePath=new StringParameter(this,"String_Node_Str");
  resourcePath.setExpression("String_Node_Str");
  resourceLocation=new FileParameter(this,"String_Node_Str");
  Parameter allowDirectories=new Parameter(resourceLocation,"String_Node_Str");
  allowDirectories.setToken("String_Node_Str");
  allowDirectories.setVisibility(Settable.NONE);
  Parameter allowFiles=new Parameter(resourceLocation,"String_Node_Str");
  allowFiles.setToken("String_Node_Str");
  allowFiles.setVisibility(Settable.NONE);
  URI modelURI=URIAttribute.getModelURI(this);
  String path;
  if (modelURI != null && modelURI.getPath() != null && !modelURI.getPath().isEmpty()) {
    path=modelURI.getPath();
    int slash=path.lastIndexOf("String_Node_Str");
    if (slash != -1) {
      path=path.substring(0,slash);
    }
  }
 else {
    path="String_Node_Str";
  }
  resourceLocation.setExpression(path);
  temporaryFileLocation=new FileParameter(this,"String_Node_Str");
  temporaryFileLocation.setExpression("String_Node_Str");
  deployedPort=new Parameter(this,"String_Node_Str");
  deployedPort.setExpression("String_Node_Str");
  deployedPort.setVisibility(Settable.NOT_EDITABLE);
  deployedPort.setPersistent(false);
  _dynamicPortSelection=false;
}