Program: 74954
Project: 74954
Buggy source:
/** 
 * Override the base class to also set the expression of shared parameters.
 */
public void setExpression(String expression){
  boolean previousSuppress=isSuppressingPropagation();
  try {
    setSuppressingPropagation(true);
    super.setExpression(expression);
  }
  finally {
    setSuppressingPropagation(previousSuppress);
  }
  try {
    IntToken token=(IntToken)getToken();
    int value=0;
    if (token != null) {
      value=token.intValue();
    }
    if (value == 0) {
      super.setExpression(expression);
    }
 else {
      if (!isSuppressingPropagation()) {
        NamedObj toplevel=getRoot();
        if (toplevel != null) {
          Iterator sharedParameters=sharedParameterList(toplevel).iterator();
          while (sharedParameters.hasNext()) {
            PtinyOSTOSSIMPort sharedParameter=(PtinyOSTOSSIMPort)sharedParameters.next();
            if (sharedParameter != this) {
              try {
                sharedParameter.setSuppressingPropagation(true);
                value+=2;
                String newExpression=String.valueOf(value);
                if (!sharedParameter.getExpression().equals(newExpression)) {
                  sharedParameter.setExpression(newExpression);
                  sharedParameter.setPersistent(false);
                }
              }
  finally {
                sharedParameter.setSuppressingPropagation(previousSuppress);
              }
            }
          }
        }
      }
    }
  }
 catch (  IllegalActionException ex) {
    throw new InternalErrorException(ex);
  }
}

Fixed version (ground truth):
/** 
 * Override the base class to also set the expression of shared parameters.
 */
public void setExpression(String expression){
  boolean previousSuppress=isSuppressingPropagation();
  try {
    setSuppressingPropagation(true);
    super.setExpression(expression);
  }
  finally {
    setSuppressingPropagation(previousSuppress);
  }
  try {
    IntToken token=(IntToken)getToken();
    int value=_defaultValue;
    if (token != null) {
      value=token.intValue();
    }
    if (value == _defaultValue) {
      super.setExpression(expression);
    }
 else {
      if (!isSuppressingPropagation()) {
        NamedObj toplevel=getRoot();
        if (toplevel != null) {
          Iterator sharedParameters=sharedParameterList(toplevel).iterator();
          while (sharedParameters.hasNext()) {
            PtinyOSTOSSIMPort sharedParameter=(PtinyOSTOSSIMPort)sharedParameters.next();
            if (sharedParameter != this) {
              try {
                sharedParameter.setSuppressingPropagation(true);
                value+=_incrementValue;
                String newExpression=String.valueOf(value);
                if (!sharedParameter.getExpression().equals(newExpression)) {
                  sharedParameter.setExpression(newExpression);
                  sharedParameter.setPersistent(false);
                }
              }
  finally {
                sharedParameter.setSuppressingPropagation(previousSuppress);
              }
            }
          }
        }
      }
    }
  }
 catch (  IllegalActionException ex) {
    throw new InternalErrorException(ex);
  }
}