Program: 73137
Project: 73137
Buggy source:
/** 
 * Return the visible Settables of NamedObj object. When addDecoratedAttributes is true we will also return the decorated attributes. In case the passed NamedObj is the top level container, the parameter enableBackwardTypeInference is added if not present, with default value false.
 * @param object The named object for which to show the visibleSettables
 * @param addDecoratedAttributes A flag that specifies whetherdecorated attributes should also be included.
 * @return The visible attributes.
 */
static private Set<Settable> _getVisibleSettables(final NamedObj object,boolean addDecoratedAttributes){
  Set<Settable> attributes=new HashSet<Settable>();
  Iterator<?> parameters=object.attributeList(Settable.class).iterator();
  if (object.equals(object.toplevel())) {
    try {
      Parameter onlyForward=(Parameter)object.getAttribute("String_Node_Str",Parameter.class);
      if (onlyForward == null) {
        onlyForward=new Parameter(object,"String_Node_Str");
        onlyForward.setExpression("String_Node_Str");
        attributes.add((Settable)onlyForward);
      }
      onlyForward.setTypeEquals(BaseType.BOOLEAN);
    }
 catch (    KernelException e) {
      throw new InternalErrorException(e);
    }
  }
  while (parameters.hasNext()) {
    Settable parameter=(Settable)parameters.next();
    if (isVisible(object,parameter)) {
      attributes.add(parameter);
    }
  }
  if (addDecoratedAttributes) {
    List<Decorator> decorators=DecoratedAttributesImplementation.findDecorators(object);
    for (    Decorator decorator : decorators) {
      DecoratedAttributes decoratedAttributes=object.getDecoratorAttributes(decorator);
      for (      Object attribute : decoratedAttributes.attributeList()) {
        if (attribute instanceof Settable) {
          Settable settable=(Settable)attribute;
          if (isVisible(object,settable)) {
            attributes.add(settable);
          }
        }
      }
    }
  }
  return attributes;
}

Fixed version (ground truth):
/** 
 * Return the visible Settables of NamedObj object. When addDecoratedAttributes is true we will also return the decorated attributes. In case the passed NamedObj is the top level container, the parameter enableBackwardTypeInference is added if not present, with default value false.
 * @param object The named object for which to show the visibleSettables
 * @param addDecoratedAttributes A flag that specifies whetherdecorated attributes should also be included.
 * @return The visible attributes.
 */
static private Set<Settable> _getVisibleSettables(final NamedObj object,boolean addDecoratedAttributes){
  Set<Settable> attributes=new HashSet<Settable>();
  Iterator<?> parameters=object.attributeList(Settable.class).iterator();
  if (object.equals(object.toplevel())) {
    try {
      Parameter backwardTypeInf=(Parameter)object.getAttribute("String_Node_Str",Parameter.class);
      if (backwardTypeInf == null) {
        backwardTypeInf=new Parameter(object,"String_Node_Str");
        backwardTypeInf.setExpression("String_Node_Str");
        attributes.add((Settable)backwardTypeInf);
      }
      backwardTypeInf.setTypeEquals(BaseType.BOOLEAN);
    }
 catch (    KernelException e) {
      throw new InternalErrorException(e);
    }
  }
  while (parameters.hasNext()) {
    Settable parameter=(Settable)parameters.next();
    if (isVisible(object,parameter)) {
      attributes.add(parameter);
    }
  }
  if (addDecoratedAttributes) {
    List<Decorator> decorators=DecoratedAttributesImplementation.findDecorators(object);
    for (    Decorator decorator : decorators) {
      DecoratedAttributes decoratedAttributes=object.getDecoratorAttributes(decorator);
      for (      Object attribute : decoratedAttributes.attributeList()) {
        if (attribute instanceof Settable) {
          Settable settable=(Settable)attribute;
          if (isVisible(object,settable)) {
            attributes.add(settable);
          }
        }
      }
    }
  }
  return attributes;
}