nus-yam/ex-repair huggingface dataset:
Program: 73855
Project: 73855
Buggy source:
/** 
 * Called each time the SAX parser sees the end of an element
 * @param uri The Namespace Uniform Resource Identifier(URI)
 * @param name Is the elements local name
 * @param qName Is the XML 1.0 name 
 */
public void endElement(String uri,String name,String qName){
  if ("String_Node_Str".equals(uri)) {
    if ("String_Node_Str".equals(qName) || "String_Node_Str".equals(qName)) {
      _startVar=false;
      _currentIndex++;
      if ("String_Node_Str".equals(qName)) {
        _fuzzyLogicVariableArray.add(_fuzzyVar);
        _fuzzyVar=new FuzzyLogicVar();
      }
    }
    if ("String_Node_Str".equals(qName)) {
    }
  }
 else {
    if (_debugging) {
      System.out.println("String_Node_Str" + uri + "String_Node_Str"+ name);
    }
  }
}

Fixed version (ground truth):
/** 
 * Called each time the SAX parser sees the end of an element.
 * @param uri The Namespace Uniform Resource Identifier(URI)
 * @param name Is the elements local name
 * @param qName Is the XML 1.0 name 
 */
public void endElement(String uri,String name,String qName){
  if ("String_Node_Str".equals(uri)) {
    if ("String_Node_Str".equals(qName) || "String_Node_Str".equals(qName)) {
      _startVar=false;
      _currentIndex++;
      if ("String_Node_Str".equals(qName)) {
        _fuzzyLogicVariableArray.add(_fuzzyVar);
        _fuzzyVar=new FuzzyLogicVar();
      }
    }
    if ("String_Node_Str".equals(qName)) {
    }
  }
 else {
    if (_debugging) {
      System.out.println("String_Node_Str" + uri + "String_Node_Str"+ name);
    }
  }
}
Program: 73856
Project: 73856
Buggy source:
/** 
 * Return an array of fuzzy logic variables read from the xml file. 
 */
public ArrayList<FuzzyLogicVar> getFuzzyLogicVariableArray(){
  return _fuzzyLogicVariableArray;
}

Fixed version (ground truth):
/** 
 * Return an array of fuzzy logic variables read from the xml file. 
 * @return Return an array of fuzzy logic variables read from the xml file.
 */
public ArrayList<FuzzyLogicVar> getFuzzyLogicVariableArray(){
  return _fuzzyLogicVariableArray;
}
Program: 73857
Project: 73857
Buggy source:
/** 
 * Return a string representation of the rules specified in the xml file.
 */
public ArrayList<String> getRules(){
  return _myRules;
}

Fixed version (ground truth):
/** 
 * Return a string representation of the rules specified in the xml file.
 * @return Return a string representation of the rules specified inthe xml file.
 */
public ArrayList<String> getRules(){
  return _myRules;
}
Program: 73858
Project: 73858
Buggy source:
/** 
 * Return the name of the architecture. 
 */
public String getName(){
  return name;
}

Fixed version (ground truth):
/** 
 * Return the name of the architecture.
 * @return The name of the architecture 
 */
public String getName(){
  return name;
}
Program: 73859
Project: 73859
Buggy source:
/** 
 * Called each time the SAX parser sees the beginning of an element.
 * @param uri The Namespace Uniform Resource Identifier(URI)
 * @param name Is the elements local name
 * @param qName Is the XML 1.0 name 
 * @param atts   an Attributes object
 */
public void startElement(String uri,String name,String qName,Attributes atts){
  if ("String_Node_Str".equals(uri)) {
    if (_debugging) {
      System.out.println("String_Node_Str" + qName);
    }
    if ("String_Node_Str".equals(qName)) {
      _startArchitecture=true;
    }
 else     if ("String_Node_Str".equals(qName)) {
      _startOption=true;
    }
 else     if ("String_Node_Str".equals(qName)) {
      _startDimension=true;
    }
  }
 else {
    if ("String_Node_Str".equals(name)) {
      _startArchitecture=true;
    }
 else     if ("String_Node_Str".equals(name)) {
      _startOption=true;
    }
 else     if ("String_Node_Str".equals(name)) {
      _startDimension=true;
    }
    if (_debugging) {
      System.out.println("String_Node_Str" + uri + "String_Node_Str"+ name);
      System.out.println("String_Node_Str");
    }
  }
}

Fixed version (ground truth):
/** 
 * Called each time the SAX parser sees the beginning of an element.
 * @param uri The Namespace Uniform Resource Identifier(URI)
 * @param name Is the elements local name
 * @param qName Is the XML 1.0 name 
 * @param atts  An Attributes object
 */
public void startElement(String uri,String name,String qName,Attributes atts){
  if ("String_Node_Str".equals(uri)) {
    if (_debugging) {
      System.out.println("String_Node_Str" + qName);
    }
    if ("String_Node_Str".equals(qName)) {
      _startArchitecture=true;
    }
 else     if ("String_Node_Str".equals(qName)) {
      _startOption=true;
    }
 else     if ("String_Node_Str".equals(qName)) {
      _startDimension=true;
    }
  }
 else {
    if ("String_Node_Str".equals(name)) {
      _startArchitecture=true;
    }
 else     if ("String_Node_Str".equals(name)) {
      _startOption=true;
    }
 else     if ("String_Node_Str".equals(name)) {
      _startDimension=true;
    }
    if (_debugging) {
      System.out.println("String_Node_Str" + uri + "String_Node_Str"+ name);
      System.out.println("String_Node_Str");
    }
  }
}
Program: 73860
Project: 73860
Buggy source:
/** 
 * Return the display name for the option. 
 */
public String displayName(){
  return _name;
}

Fixed version (ground truth):
/** 
 * Return the display name for the option.
 * @return The display name for the option. 
 */
public String displayName(){
  return _name;
}
Program: 73862
Project: 73862
Buggy source:
/** 
 * Return an array list consisting of the components/options in the architecture. 
 */
public ArrayList<String> getComponents(){
  ArrayList<String> componentNames=new ArrayList<String>();
  Option option;
  for (int i=0; i < this.myOptions.size(); i++) {
    option=(Option)myOptions.get(i);
    componentNames.add(option._name + "String_Node_Str" + option._relatedDimensions.get(0).toString());
  }
  return componentNames;
}

Fixed version (ground truth):
/** 
 * Return an array list consisting of the components/options in the architecture.
 * @return An array list consisting of the components/options in the architecture. 
 */
public ArrayList<String> getComponents(){
  ArrayList<String> componentNames=new ArrayList<String>();
  Option option;
  for (int i=0; i < this.myOptions.size(); i++) {
    option=(Option)myOptions.get(i);
    componentNames.add(option._name + "String_Node_Str" + option._relatedDimensions.get(0).toString());
  }
  return componentNames;
}
Program: 73864
Project: 73864
Buggy source:
/** 
 * There is a default configuration, which is returned.
 * @return The default configuration.
 */
abstract String startingConfiguration();

Fixed version (ground truth):
/** 
 * There is a default configuration, which is returned.
 * @return The default configuration.
 */
abstract public String startingConfiguration();
Program: 73865
Project: 73865
Buggy source:
/** 
 * Returns the RTMmodule value.
 */
public Map<String,String> getRTMmodule(){
  return RTMmodule;
}

Fixed version (ground truth):
/** 
 * Returns the RTMmodule value.
 * @return a Map object representing the RTMmodule value
 */
public Map<String,String> getRTMmodule(){
  return RTMmodule;
}
Program: 73866
Project: 73866
Buggy source:
/** 
 * Returns the id table value.
 */
public Map<String,Set<String>> getIdTable(){
  return idTable;
}

Fixed version (ground truth):
/** 
 * Returns the id table value.
 * @return a Map object representing the id table value
 */
public Map<String,Set<String>> getIdTable(){
  return idTable;
}
Program: 73868
Project: 73868
Buggy source:
/** 
 * Called by the SAX parser to report regular characters.
 * @param ch[] The array containing characters
 * @param start Is the starting point in the character array
 * @param lenght Is length of the character array 
 */
public void characters(char ch[],int start,int length){
}

Fixed version (ground truth):
/** 
 * Called by the SAX parser to report regular characters.
 * @param ch The array containing characters
 * @param start Is the starting point in the character array
 * @param length Is length of the character array 
 */
public void characters(char ch[],int start,int length){
}
Program: 73869
Project: 73869
Buggy source:
/** 
 * Set the next sampling time and return true.
 * @return True.
 * @exception IllegalActionException If the superclass throws it.
 */
public boolean postfire() throws IllegalActionException {
  Director director=getDirector();
  if (director.getModelTime().compareTo(_nextSamplingTime) == 0) {
    int width=Math.min(input.getWidth(),output.getWidth());
    if (_recordedInputs == null || _recordedInputs.length != width) {
      _recordedInputs=new Token[width];
    }
    _inputIsComplete=true;
    for (int i=0; i < width; i++) {
      if (input.hasToken(i)) {
        _recordedInputs[i]=input.get(i);
        if (_debugging) {
          _debug("String_Node_Str" + _recordedInputs[i] + "String_Node_Str"+ director.getModelTime());
        }
      }
    }
    double samplePeriodValue=((DoubleToken)samplePeriod.getToken()).doubleValue();
    _nextSamplingTime=_nextSamplingTime.add(samplePeriodValue);
    if (_debugging) {
      _debug("String_Node_Str" + _nextSamplingTime);
    }
    _fireAt(director.getModelTime());
    _fireAt(_nextSamplingTime);
  }
 else {
    _inputIsComplete=false;
  }
  return super.postfire();
}

Fixed version (ground truth):
/** 
 * Set the next sampling time and return true.
 * @return True.
 * @exception IllegalActionException If the superclass throws it.
 */
public boolean postfire() throws IllegalActionException {
  Director director=getDirector();
  if (director.getModelTime().compareTo(_nextSamplingTime) == 0) {
    int width=Math.min(input.getWidth(),output.getWidth());
    if (_recordedInputs == null || _recordedInputs.length != width) {
      _recordedInputs=new Token[width];
    }
    _inputIsComplete=true;
    for (int i=0; i < width; i++) {
      if (input.hasToken(i)) {
        _recordedInputs[i]=input.get(i);
        if (_debugging) {
          _debug("String_Node_Str" + _recordedInputs[i] + "String_Node_Str"+ director.getModelTime());
        }
      }
 else {
        _recordedInputs[i]=null;
      }
    }
    double samplePeriodValue=((DoubleToken)samplePeriod.getToken()).doubleValue();
    _nextSamplingTime=_nextSamplingTime.add(samplePeriodValue);
    if (_debugging) {
      _debug("String_Node_Str" + _nextSamplingTime);
    }
    _fireAt(director.getModelTime());
    _fireAt(_nextSamplingTime);
  }
 else {
    _inputIsComplete=false;
  }
  return super.postfire();
}
Program: 73870
Project: 73870
Buggy source:
public GiottoError(CompositeEntity container,String name) throws IllegalActionException, NameDuplicationException {
  super(container,name);
  errorAction=new StringParameter(this,"String_Node_Str");
  errorAction.setExpression("String_Node_Str");
  errorAction.addChoice("String_Node_Str");
  errorAction.addChoice("String_Node_Str");
  errorAction.addChoice("String_Node_Str");
  _attachText("String_Node_Str","String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Constructs a GiottoError object.
 * @param container  a CompositeEntity object
 * @param name       a String ...
 * @throws IllegalActionException ...
 * @throws NameDuplicationException ...
 */
public GiottoError(CompositeEntity container,String name) throws IllegalActionException, NameDuplicationException {
  super(container,name);
  errorAction=new StringParameter(this,"String_Node_Str");
  errorAction.setExpression("String_Node_Str");
  errorAction.addChoice("String_Node_Str");
  errorAction.addChoice("String_Node_Str");
  errorAction.addChoice("String_Node_Str");
  _attachText("String_Node_Str","String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
}
Program: 73872
Project: 73872
Buggy source:
public int getLCM(){
  return _lcm;
}

Fixed version (ground truth):
/** 
 * Returns the LCM value.
 */
public int getLCM(){
  return _lcm;
}
Program: 73873
Project: 73873
Buggy source:
/** 
 * This indicates that a processing instruction (other than the XML declaration) has been encountered.</p>
 * @param target <code>String</code> target of PI
 * @param data <code>String</code containing all data sent to the PI. This typically looks like one or more attribute value pairs.
 * @throws <code>SAXException</code> when things go wrong
 */
public void processingInstruction(String target,String data){
  if (_debugging) {
    System.out.println("String_Node_Str");
    System.out.println("String_Node_Str" + target + "String_Node_Str"+ data);
  }
}

Fixed version (ground truth):
/** 
 * This indicates that a processing instruction (other than the XML declaration) has been encountered.
 * @param target <code>String</code> target of PI
 * @param data <code>String</code containing all data sent to the PI. This typically looks like one or more attribute value pairs.
 * @throws <code>SAXException</code> when things go wrong
 */
public void processingInstruction(String target,String data){
  if (_debugging) {
    System.out.println("String_Node_Str");
    System.out.println("String_Node_Str" + target + "String_Node_Str"+ data);
  }
}
Program: 73878
Project: 73878
Buggy source:
private void _requestFiring() throws IllegalActionException {
  if (_debugging) {
    _debug("String_Node_Str" + _expectedNextIterationTime);
  }
  System.out.println("String_Node_Str" + _expectedNextIterationTime);
  _fireContainerAt(_expectedNextIterationTime);
}

Fixed version (ground truth):
private void _requestFiring() throws IllegalActionException {
  if (_debugging) {
    _debug("String_Node_Str" + _expectedNextIterationTime);
  }
  _fireContainerAt(_expectedNextIterationTime);
}
Program: 73881
Project: 73881
Buggy source:
public List<Inequality> constraintList() throws IllegalActionException {
  ptolemy.actor.lib.RecordAssembler actor=(ptolemy.actor.lib.RecordAssembler)getComponent();
  Object[] portArray=actor.inputPortList().toArray();
  int size=portArray.length;
  String[] labels=new String[size];
  LatticeProperty[] properties=new LatticeProperty[size];
  for (int i=0; i < size; i++) {
    labels[i]=((Port)portArray[i]).getName();
    properties[i]=_lattice.getElement("String_Node_Str");
  }
  RecordProperty declaredProperty=new RecordProperty(_lattice,labels,properties);
  setEquals(actor.output,declaredProperty);
  RecordProperty outputProperty=(RecordProperty)_solver.getProperty(actor.output);
  Iterator inputPorts=actor.inputPortList().iterator();
  while (inputPorts.hasNext()) {
    TypedIOPort inputPort=(TypedIOPort)inputPorts.next();
    String label=inputPort.getName();
    setAtLeast(outputProperty.getPropertyTerm(label),inputPort);
  }
  return super.constraintList();
}

Fixed version (ground truth):
public List<Inequality> constraintList() throws IllegalActionException {
  ptolemy.actor.lib.RecordAssembler actor=(ptolemy.actor.lib.RecordAssembler)getComponent();
  Object[] portArray=actor.inputPortList().toArray();
  int size=portArray.length;
  String[] labels=new String[size];
  LatticeProperty[] properties=new LatticeProperty[size];
  for (int i=0; i < size; i++) {
    labels[i]=((Port)portArray[i]).getName();
    properties[i]=_lattice.getElement("String_Node_Str");
  }
  RecordProperty declaredProperty=new RecordProperty(_lattice,labels,properties);
  setAtLeast(actor.output,declaredProperty);
  RecordProperty outputProperty=(RecordProperty)_solver.getProperty(actor.output);
  Iterator inputPorts=actor.inputPortList().iterator();
  while (inputPorts.hasNext()) {
    TypedIOPort inputPort=(TypedIOPort)inputPorts.next();
    String label=inputPort.getName();
    setAtLeast(outputProperty.getPropertyTerm(label),inputPort);
  }
  return super.constraintList();
}
Program: 73882
Project: 73882
Buggy source:
/** 
 * Override the base class to declare that the <i>initialState</i> and <i>impulse</i> inputs are equivalent, but not the <i>derivative</i> input port. This is because to react to inputs at either <i>initialState</i> or <i>impulse</i>, we have to know what the input at the other is.  But the input at <i>derivative</i> does not need to be known.  It will affect the future only.
 * @param input The port to find the equivalence class of.
 * @exception IllegalArgumentException If the argument is notcontained by the associated actor.
 */
public Collection<IOPort> equivalentPorts(IOPort input){
  if (input == derivative) {
    return _derivativeEquivalents;
  }
  return _otherEquivalents;
}

Fixed version (ground truth):
/** 
 * Override the base class to declare that the <i>initialState</i> and <i>impulse</i> inputs are equivalent, but not the <i>derivative</i> input port. This is because to react to inputs at either <i>initialState</i> or <i>impulse</i>, we have to know what the input at the other is.  But the input at <i>derivative</i> does not need to be known.  It will affect the future only.
 * @param input The port to find the equivalence class of.
 * @exception IllegalArgumentException If the argument is notcontained by the associated actor.
 */
public Collection<IOPort> equivalentPorts(IOPort input){
  if (input == _actor.derivative) {
    return _derivativeEquivalents;
  }
  return _otherEquivalents;
}
Program: 73883
Project: 73883
Buggy source:
public IntegratorCausalityInterface(Actor actor,Dependency defaultDependency){
  super(actor,defaultDependency);
  _derivativeEquivalents.add(derivative);
  _otherEquivalents.add(impulse);
  _otherEquivalents.add(initialState.getPort());
  removeDependency(derivative,state);
}

Fixed version (ground truth):
public IntegratorCausalityInterface(ContinuousIntegrator actor,Dependency defaultDependency){
  super(actor,defaultDependency);
  _actor=actor;
  _derivativeEquivalents.add(actor.derivative);
  _otherEquivalents.add(actor.impulse);
  _otherEquivalents.add(actor.initialState.getPort());
  removeDependency(actor.derivative,actor.state);
}
Program: 73884
Project: 73884
Buggy source:
/** 
 * Return the interface of a given actor. In the case that the given actor is a CompositeActor, we will try to infer the interface from the contained actors. Otherwise, we will simply look for annotations of the interface contract, and chose the inputs and outputs of the actor as inputs and outputs of the interface.
 * @param actor The actor whose interface we are querying.
 * @return The overall interface.
 * @throws IllegalActionException
 */
private RelationalInterface _getInterface(Actor actor) throws IllegalActionException {
  if (actor instanceof CompositeActor) {
    RelationalInterface compositeInterface=_getCompositeInterface((CompositeActor)actor);
    System.out.println("String_Node_Str" + compositeInterface.getContract());
    return compositeInterface;
  }
  final String contract=_getSMTFormula(actor);
  return new RelationalInterface(actor.inputPortList(),actor.outputPortList(),contract);
}

Fixed version (ground truth):
/** 
 * Return the interface of a given actor. To find the contract, this method first checks for a parameter named _interfaceExpr that is a Ptolemy expression. If that doesn't exist, it looks for a parameter named _interfaceStr that is a string representation. In the case that neither of those two options work, and the given actor is a CompositeActor, we can try to infer the interface from those of the contained actors.
 * @param actor The actor whose interface we are querying.
 * @return The overall interface.
 * @throws IllegalActionException
 */
private RelationalInterface _getInterface(Actor actor) throws IllegalActionException {
  final Parameter interfaceExpr=(Parameter)((Entity)actor).getAttribute("String_Node_Str");
  final Parameter interfaceStr=(Parameter)((Entity)actor).getAttribute("String_Node_Str");
  String contract;
  if (interfaceExpr != null) {
    final String expression=interfaceExpr.getExpression();
    final PtParser parser=new PtParser();
    ASTPtRootNode parseTree;
    parseTree=parser.generateParseTree(expression);
    final SMTFormulaBuilder formulaBuilder=new SMTFormulaBuilder();
    contract=formulaBuilder.parseTreeToSMTFormula(parseTree);
  }
 else   if (interfaceStr != null) {
    contract=((StringToken)interfaceStr.getToken()).stringValue();
  }
 else   if (actor instanceof CompositeActor) {
    RelationalInterface compositeInterface=_getCompositeInterface((CompositeActor)actor);
    System.out.println("String_Node_Str" + compositeInterface.getContract());
    return compositeInterface;
  }
 else {
    throw new IllegalActionException(actor,"String_Node_Str" + actor.toString());
  }
  return new RelationalInterface(actor.inputPortList(),actor.outputPortList(),contract);
}
Program: 73889
Project: 73889
Buggy source:
/** 
 * Return the output port (source port) that connects to an input port.
 * @param inputPort The input port.
 * @return Return the output port (source port) that connects toan input port.
 */
private IOPort _getConnectedOutputPort(IOPort inputPort){
  IOPort outputPort=null;
  for (Iterator inputPorts=inputPort.connectedPortList().iterator(); inputPorts.hasNext(); ) {
    IOPort port=(IOPort)inputPorts.next();
    if (port.isOutput()) {
      if (port.getContainer() instanceof SampleDelay) {
        outputPort=_getConnectedOutputPort(((SampleDelay)port.getContainer()).input);
      }
 else       outputPort=port;
      break;
    }
  }
  return outputPort;
}

Fixed version (ground truth):
/** 
 * Return the output port (source port) that connects to an input port.
 * @param inputPort The input port.
 * @return Return the output port (source port) that connects toan input port.
 */
private IOPort _getConnectedOutputPort(IOPort inputPort){
  IOPort outputPort=null;
  for (Iterator inputPorts=inputPort.sourcePortList().iterator(); inputPorts.hasNext(); ) {
    IOPort port=(IOPort)inputPorts.next();
    if (port.isOutput()) {
      if (port.getContainer() instanceof SampleDelay) {
        outputPort=_getConnectedOutputPort(((SampleDelay)port.getContainer()).input);
      }
 else       outputPort=port;
      break;
    }
  }
  return outputPort;
}
Program: 73890
Project: 73890
Buggy source:
/** 
 * Compute the depths of clusters to obtain cluster firing order.
 * @param cluster
 * @param visitedClusters
 */
private void _computeClusterDepth(FiringCluster cluster,Map visitedClusters){
  for (  FiringCluster nextCluster : cluster.nextClusters) {
    if (nextCluster.index <= cluster.index) {
      nextCluster.index=cluster.index + 1;
    }
    if (visitedClusters.get(cluster.hashCode() ^ nextCluster.hashCode()) == null) {
      Integer value=1;
      visitedClusters.put(cluster.hashCode() ^ nextCluster.hashCode(),value);
      _computeClusterDepth(nextCluster,visitedClusters);
    }
  }
  for (  FiringCluster previousCluster : cluster.previousClusters) {
    if (previousCluster.index >= cluster.index) {
      previousCluster.index=cluster.index - 1;
    }
    if (visitedClusters.get(cluster.hashCode() ^ previousCluster.hashCode()) == null) {
      Integer value=1;
      visitedClusters.put(cluster.hashCode() ^ previousCluster.hashCode(),value);
      _computeClusterDepth(previousCluster,visitedClusters);
    }
  }
}

Fixed version (ground truth):
/** 
 * Compute the depths of clusters to obtain cluster firing order.
 * @param cluster The cluster whose depth is computed.
 * @param visitedClusters the list of visited clusters.
 */
private void _computeClusterDepth(FiringCluster cluster,Map visitedClusters){
  for (  FiringCluster nextCluster : cluster.nextClusters) {
    if (nextCluster.index <= cluster.index) {
      nextCluster.index=cluster.index + 1;
    }
    if (visitedClusters.get(cluster.hashCode() ^ nextCluster.hashCode()) == null) {
      Integer value=1;
      visitedClusters.put(cluster.hashCode() ^ nextCluster.hashCode(),value);
      _computeClusterDepth(nextCluster,visitedClusters);
    }
  }
  for (  FiringCluster previousCluster : cluster.previousClusters) {
    if (previousCluster.index >= cluster.index) {
      previousCluster.index=cluster.index - 1;
    }
    if (visitedClusters.get(cluster.hashCode() ^ previousCluster.hashCode()) == null) {
      Integer value=1;
      visitedClusters.put(cluster.hashCode() ^ previousCluster.hashCode(),value);
      _computeClusterDepth(previousCluster,visitedClusters);
    }
  }
}
Program: 73892
Project: 73892
Buggy source:
/** 
 * Return the property lattice for this constraint solver.
 * @return The property lattice for this constraint solver.
 */
public PropertyLattice getLattice(){
  String propertyLatticeValue=propertyLattice.getExpression();
  _lattice=PropertyLattice.getPropertyLattice(propertyLatticeValue);
  if (_lattice == null && propertyLatticeValue.startsWith(_USER_DEFINED_LATTICE)) {
    String latticeName=propertyLatticeValue.replace(_USER_DEFINED_LATTICE,"String_Node_Str");
    PropertyLatticeAttribute latticeAttribute=(PropertyLatticeAttribute)((CompositeEntity)getContainer()).getAttribute(latticeName);
    _lattice=latticeAttribute.getPropertyLattice();
    PropertyLattice.storeLattice(_lattice,latticeName);
  }
  return _lattice;
}

Fixed version (ground truth):
/** 
 * Return the property lattice for this constraint solver.
 * @return The property lattice for this constraint solver.
 */
public PropertyLattice getLattice(){
  String propertyLatticeValue=propertyLattice.getExpression();
  return _lattice;
}
Program: 73894
Project: 73894
Buggy source:
private void _readConstraintFile(String filename) throws PropertyFailedRegressionTestException {
  File file=new File(filename);
  try {
    BufferedReader reader=null;
    try {
      reader=new BufferedReader(new FileReader(file));
      String line=reader.readLine();
      while (line != null) {
        _trainedConstraints.add(line);
        line=reader.readLine();
      }
      getStats().put("String_Node_Str",_trainedConstraints.size());
    }
  finally {
      if (reader != null) {
        reader.close();
      }
    }
  }
 catch (  IOException ex) {
    throw new PropertyFailedRegressionTestException(this,"String_Node_Str" + filename + "String_Node_Str");
  }
}

Fixed version (ground truth):
private void _readConstraintFile(String filename){
  File file=new File(filename);
  try {
    BufferedReader reader=null;
    try {
      reader=new BufferedReader(new FileReader(file));
      String line=reader.readLine();
      while (line != null) {
        _trainedConstraints.add(line);
        line=reader.readLine();
      }
      getStats().put("String_Node_Str",_trainedConstraints.size());
    }
  finally {
      if (reader != null) {
        reader.close();
      }
    }
  }
 catch (  IOException ex) {
  }
}
Program: 73895
Project: 73895
Buggy source:
/** 
 * Return the property value associated with the specified object.
 * @param object The specified object.
 * @return The property of the specified object.
 */
public Property getProperty(Object object){
  try {
    return (Property)getPropertyTerm(object).getValue();
  }
 catch (  IllegalActionException ex) {
    return null;
  }
}

Fixed version (ground truth):
/** 
 * Return the property value associated with the specified object.
 * @param object The specified object.
 * @return The property of the specified object.
 */
public Concept getProperty(Object object){
  try {
    return (Concept)getPropertyTerm(object).getValue();
  }
 catch (  IllegalActionException ex) {
    return null;
  }
}
Program: 73897
Project: 73897
Buggy source:
protected PropertyHelper _getHelper(Object component) throws IllegalActionException {
  PropertyHelper adapter=null;
  try {
    adapter=super._getHelper(component);
  }
 catch (  IllegalActionException ex) {
  }
  if (adapter == null) {
    if (component instanceof FSMActor) {
      adapter=new PropertyConstraintFSMHelper(this,(FSMActor)component);
    }
 else     if (component instanceof ptolemy.domains.modal.kernel.FSMActor) {
      adapter=new PropertyConstraintModalFSMHelper(this,(ptolemy.domains.modal.kernel.FSMActor)component);
    }
 else     if (component instanceof CompositeEntity) {
      adapter=new PropertyConstraintCompositeHelper(this,(CompositeEntity)component);
    }
 else     if (component instanceof ASTPtRootNode) {
      adapter=new PropertyConstraintASTNodeHelper(this,(ASTPtRootNode)component);
    }
 else {
      adapter=new PropertyConstraintHelper(this,component);
    }
  }
  _adapterStore.put(component,adapter);
  return adapter;
}

Fixed version (ground truth):
protected PropertyHelper _getHelper(Object component) throws IllegalActionException {
  PropertyHelper adapter=null;
  try {
    adapter=super._getHelper(component);
  }
 catch (  IllegalActionException ex) {
  }
  if (adapter == null) {
    if (component instanceof FSMActor) {
    }
 else {
      adapter=new PropertyConstraintHelper(this,component);
    }
  }
  _adapterStore.put(component,adapter);
  return adapter;
}
Program: 73898
Project: 73898
Buggy source:
/** 
 * Resolve the property values for the toplevel entity that contains this solver, given the model analyzer that invokes this.
 * @param analyzer The given model analyzer.
 */
protected void _resolveProperties(NamedObj analyzer) throws KernelException {
  NamedObj toplevel=_toplevel();
  PropertyConstraintHelper toplevelHelper=(PropertyConstraintHelper)getHelper(toplevel);
  toplevelHelper.reinitialize();
  toplevelHelper._addDefaultConstraints(_getConstraintType(actorConstraintType.stringValue()));
  toplevelHelper._setConnectionConstraintType(_getConstraintType(connectionConstraintType.stringValue()),_getConstraintType(compositeConnectionConstraintType.stringValue()),_getConstraintType(fsmConstraintType.stringValue()),_getConstraintType(expressionASTNodeConstraintType.stringValue()));
  List<Inequality> constraintList=toplevelHelper.constraintList();
  _resolveProperties(toplevel,toplevelHelper,constraintList);
  if (errorsExist()) {
    _doDeltaIteration(toplevel,toplevelHelper,constraintList);
  }
}

Fixed version (ground truth):
/** 
 * Resolve the property values for the toplevel entity that contains this solver, given the model analyzer that invokes this.
 * @param analyzer The given model analyzer.
 * @throws KernelException If the superclass throws it.
 */
protected void _resolveProperties(NamedObj analyzer) throws KernelException {
  NamedObj toplevel=_toplevel();
  PropertyConstraintHelper toplevelHelper=(PropertyConstraintHelper)getHelper(toplevel);
  toplevelHelper.reinitialize();
  toplevelHelper._addDefaultConstraints(_getConstraintType(actorConstraintType.stringValue()));
  toplevelHelper._setConnectionConstraintType(_getConstraintType(connectionConstraintType.stringValue()),_getConstraintType(compositeConnectionConstraintType.stringValue()),_getConstraintType(fsmConstraintType.stringValue()),_getConstraintType(expressionASTNodeConstraintType.stringValue()));
  List<Inequality> constraintList=toplevelHelper.constraintList();
  _resolveProperties(toplevel,toplevelHelper,constraintList);
  if (errorsExist()) {
    _doDeltaIteration(toplevel,toplevelHelper,constraintList);
  }
}
Program: 73899
Project: 73899
Buggy source:
public DeltaConstraintSolver(NamedObj container,String name) throws IllegalActionException, NameDuplicationException {
  super(container,name);
}

Fixed version (ground truth):
/** 
 * Constructs a DeltaConstraintSolver with the given name contained by the specified entity. 
 * @param container  The container.
 * @param name       The name of this DeltaConstraintSolver
 * @throws IllegalActionException If the superclass throws it.
 * @throws NameDuplicationException If the superclass throws it.
 */
public DeltaConstraintSolver(NamedObj container,String name) throws IllegalActionException, NameDuplicationException {
  super(container,name);
}
Program: 73901
Project: 73901
Buggy source:
public boolean isEffective(){
  return true;
}

Fixed version (ground truth):
/** 
 * Return true if this property term is effective.
 * @return Always return true in this base class.
 * @see #setEffective(boolean)
 */
public boolean isEffective(){
  return true;
}
Program: 73902
Project: 73902
Buggy source:
/** 
 * Set the effectiveness of this property term to the specified value. Do nothing in this base by default.
 * @param isEffective The specified effective value.
 */
public void setEffective(boolean isEffective){
}

Fixed version (ground truth):
/** 
 * Set the effectiveness of this property term to the specified value. Do nothing in this base by default.
 * @param isEffective The specified effective value, ignored by this method
 */
public void setEffective(boolean isEffective){
}
Program: 73903
Project: 73903
Buggy source:
public MeetFunction(PropertyConstraintSolver solver,Object... objects){
  _solver=solver;
  for (  Object object : objects) {
    _terms.add(_solver.getPropertyTerm(object));
  }
}

Fixed version (ground truth):
/** 
 * Construct a MeetFunction.
 * @param solver The solver.
 * @param objects The objects.
 */
public MeetFunction(PropertyConstraintSolver solver,Object... objects){
  _solver=solver;
  for (  Object object : objects) {
    _terms.add(_solver.getPropertyTerm(object));
  }
}
Program: 73904
Project: 73904
Buggy source:
public void setEffective(boolean isEffective){
  throw new AssertionError("String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Set the effectiveness of this property term to the specified value.  In this class, it is an assertion error to call this method as MeetFunction terms cannot be effective.
 * @param isEffective The specified effective value, not used by this class.
 */
public void setEffective(boolean isEffective){
  throw new AssertionError("String_Node_Str");
}
Program: 73905
Project: 73905
Buggy source:
public String toString(){
  StringBuffer result=new StringBuffer("String_Node_Str");
  for (  PropertyTerm term : _terms) {
    if (term.isEffective()) {
      result.append(term);
      break;
    }
  }
  for (  PropertyTerm term : _terms) {
    if (term.isEffective()) {
      result.append("String_Node_Str" + term);
    }
  }
  result.append("String_Node_Str");
  return result.toString();
}

Fixed version (ground truth):
/** 
 * Return the string description of this object.
 * @return the string description of this object.
 */
public String toString(){
  StringBuffer result=new StringBuffer("String_Node_Str");
  for (  PropertyTerm term : _terms) {
    if (term.isEffective()) {
      result.append(term);
      break;
    }
  }
  for (  PropertyTerm term : _terms) {
    if (term.isEffective()) {
      result.append("String_Node_Str" + term);
    }
  }
  result.append("String_Node_Str");
  return result.toString();
}
Program: 73906
Project: 73906
Buggy source:
public boolean isEffective(){
  for (  PropertyTerm term : _terms) {
    if (term.isEffective()) {
      return true;
    }
  }
  return false;
}

Fixed version (ground truth):
/** 
 * Return true if any of the meet function terms are effective. 
 * @return True if any of the meet function terms areeffective. 
 */
public boolean isEffective(){
  for (  PropertyTerm term : _terms) {
    if (term.isEffective()) {
      return true;
    }
  }
  return false;
}
Program: 73907
Project: 73907
Buggy source:
/** 
 * Construct the property constraint helper for the given property solver and AST node.
 * @param solver The given component.
 * @param node The given AST node.
 * @param useDefaultConstraints Indicate whether this helperuses the default actor constraints.
 * @exception IllegalActionException Thrown if the helper cannotbe initialized.
 */
public PropertyConstraintASTNodeHelper(PropertyConstraintSolver solver,ASTPtRootNode node,boolean useDefaultConstraints) throws IllegalActionException {
  super(solver,node,useDefaultConstraints);
}

Fixed version (ground truth):
/** 
 * Construct the property constraint helper for the given property solver and AST node.
 * @param solver The given component.
 * @param node The given AST node.
 * @param useDefaultConstraints Indicate whether this helperuses the default actor constraints.
 * @exception IllegalActionException If the helper cannotbe initialized.
 */
public PropertyConstraintASTNodeHelper(PropertyConstraintSolver solver,ASTPtRootNode node,boolean useDefaultConstraints) throws IllegalActionException {
  super(solver,node,useDefaultConstraints);
}
Program: 73908
Project: 73908
Buggy source:
public Object getValue() throws IllegalActionException ;

Fixed version (ground truth):
/** 
 * Get the value of this PropertyTerm.
 * @return the value of this PropertyTerm.   
 */
public Object getValue() throws IllegalActionException ;
Program: 73909
Project: 73909
Buggy source:
public void setEffective(boolean isEffective);

Fixed version (ground truth):
/** 
 * Set the effectiveness of this property term to the specified value.
 * @param isEffective The specified effective value.
 * @see #isEffective()
 */
public void setEffective(boolean isEffective);
Program: 73910
Project: 73910
Buggy source:
public boolean isEffective();

Fixed version (ground truth):
/** 
 * Return true if this property term is effective.
 * @return true if this property term is effective.
 * @see #setEffective(boolean)
 */
public boolean isEffective();
Program: 73911
Project: 73911
Buggy source:
/** 
 * Do nothing by default.
 * @param isEffective Not used.
 */
public void setEffective(boolean isEffective){
}

Fixed version (ground truth):
/** 
 * Set the effectiveness of this property term to the specified value. Do nothing in this base by default.
 * @param isEffective The specified effective value, not used by this class.
 */
public void setEffective(boolean isEffective){
}
Program: 73912
Project: 73912
Buggy source:
public ASTPtRootNode(PropertyConstraintSolver solver,ptolemy.data.expr.ASTPtRootNode node,boolean useDefaultConstraints) throws IllegalActionException {
  super(solver,node,useDefaultConstraints);
}

Fixed version (ground truth):
/** 
 * Construct an ASTPtRootNode helper for the given property solver and AST node.
 * @param solver The given component.
 * @param actor The given AST node.
 * @param useDefaultConstraints Indicate whether this helperuses the default actor constraints.
 * @exception IllegalActionException If the helper cannotbe initialized.
 */
public ASTPtRootNode(PropertyConstraintSolver solver,ptolemy.data.expr.ASTPtRootNode node,boolean useDefaultConstraints) throws IllegalActionException {
  super(solver,node,useDefaultConstraints);
}
Program: 73913
Project: 73913
Buggy source:
public List<Inequality> constraintList() throws IllegalActionException {
  ptolemy.actor.lib.Discard actor=(ptolemy.actor.lib.Discard)getComponent();
  Lattice lattice=(Lattice)getSolver().getLattice();
  setEquals(actor.input,lattice.FALSE);
  return super.constraintList();
}

Fixed version (ground truth):
/** 
 * Return the constraints of this component. The constraints are a list of inequalities.
 * @return The constraints of this component.
 * @exception IllegalActionException If thrown while manipulating the latticeor getting the solver.
 */
public List<Inequality> constraintList() throws IllegalActionException {
  ptolemy.actor.lib.Discard actor=(ptolemy.actor.lib.Discard)getComponent();
  Lattice lattice=(Lattice)getSolver().getLattice();
  setEquals(actor.input,lattice.FALSE);
  return super.constraintList();
}
Program: 73914
Project: 73914
Buggy source:
/** 
 * Construct an Discard helper.
 * @param actor the associated actor
 * @exception IllegalActionException
 */
public Discard(PropertyConstraintSolver solver,ptolemy.actor.lib.Discard actor) throws IllegalActionException {
  super(solver,actor,false);
}

Fixed version (ground truth):
/** 
 * Construct the Discard property constraint helper associated with the given component and solver. The constructed helper implicitly uses the default constraints set by the solver.
 * @param solver The given solver.
 * @param actor The given Discard actor
 * @exception IllegalActionException If the helper cannot beinitialized in the superclass.
 */
public Discard(PropertyConstraintSolver solver,ptolemy.actor.lib.Discard actor) throws IllegalActionException {
  super(solver,actor,false);
}
Program: 73915
Project: 73915
Buggy source:
/** 
 * Construct an MonitorValue helper.
 * @param actor the associated actor
 * @exception IllegalActionException
 */
public MonitorValue(PropertyConstraintSolver solver,ptolemy.actor.lib.MonitorValue actor) throws IllegalActionException {
  super(solver,actor,false);
}

Fixed version (ground truth):
/** 
 * Construct the Monitor property constraint helper associated with the given component and solver. The constructed helper implicitly uses the default constraints set by the solver.
 * @param solver The given solver.
 * @param actor The given Monitor actor
 * @exception IllegalActionException If the helper cannot beinitialized in the superclass.
 */
public MonitorValue(PropertyConstraintSolver solver,ptolemy.actor.lib.MonitorValue actor) throws IllegalActionException {
  super(solver,actor,false);
}
Program: 73916
Project: 73916
Buggy source:
public List<Inequality> constraintList() throws IllegalActionException {
  ptolemy.actor.lib.MonitorValue actor=(ptolemy.actor.lib.MonitorValue)getComponent();
  Lattice lattice=(Lattice)getSolver().getLattice();
  setEquals(actor.input,lattice.FALSE);
  return super.constraintList();
}

Fixed version (ground truth):
/** 
 * Return the constraints of this component. The constraints are a list of inequalities.
 * @return The constraints of this component.
 * @exception IllegalActionException If thrown while manipulating the latticeor getting the solver.
 */
public List<Inequality> constraintList() throws IllegalActionException {
  ptolemy.actor.lib.MonitorValue actor=(ptolemy.actor.lib.MonitorValue)getComponent();
  Lattice lattice=(Lattice)getSolver().getLattice();
  setEquals(actor.input,lattice.FALSE);
  return super.constraintList();
}
Program: 73917
Project: 73917
Buggy source:
public List<Inequality> constraintList() throws IllegalActionException {
  ptolemy.actor.lib.Recorder actor=(ptolemy.actor.lib.Recorder)getComponent();
  Lattice lattice=(Lattice)getSolver().getLattice();
  if (((IntToken)actor.capacity.getToken()).intValue() > 0) {
    setEquals(actor.input,lattice.TRUE);
  }
 else {
    setEquals(actor.input,lattice.FALSE);
  }
  return super.constraintList();
}

Fixed version (ground truth):
/** 
 * Return the constraints of this component. The constraints are a list of inequalities.
 * @return The constraints of this component.
 * @exception IllegalActionException If thrown while manipulating the latticeor getting the solver.
 */
public List<Inequality> constraintList() throws IllegalActionException {
  ptolemy.actor.lib.Recorder actor=(ptolemy.actor.lib.Recorder)getComponent();
  Lattice lattice=(Lattice)getSolver().getLattice();
  if (((IntToken)actor.capacity.getToken()).intValue() > 0) {
    setEquals(actor.input,lattice.TRUE);
  }
 else {
    setEquals(actor.input,lattice.FALSE);
  }
  return super.constraintList();
}
Program: 73918
Project: 73918
Buggy source:
/** 
 * Construct an Recorder helper.
 * @param actor the associated actor
 * @exception IllegalActionException
 */
public Recorder(PropertyConstraintSolver solver,ptolemy.actor.lib.Recorder actor) throws IllegalActionException {
  super(solver,actor,false);
}

Fixed version (ground truth):
/** 
 * Construct the Sink property constraint helper associated with the given component and solver. The constructed helper implicitly uses the default constraints set by the solver.
 * @param solver The given solver.
 * @param actor The given Recorder actor
 * @exception IllegalActionException If the helper cannot beinitialized in the superclass.
 */
public Recorder(PropertyConstraintSolver solver,ptolemy.actor.lib.Recorder actor) throws IllegalActionException {
  super(solver,actor,false);
}
Program: 73919
Project: 73919
Buggy source:
/** 
 * Initialize model after type resolution. In addition to calling the initialize() method of the super class, this method records the current system time as the "real" starting time of the execution. This starting time is used when the execution is synchronized to real time.
 * @exception IllegalActionException If the super class throws it.
 */
public void initialize() throws IllegalActionException {
  _isInitializing=true;
  super.initialize();
  _currentStepSize=0.0;
  if (_isEmbedded() && (_enclosingContinuousDirector() == null)) {
    _fireContainerAt(_startTime);
    if (!_stopTime.isInfinite()) {
      _fireContainerAt(_stopTime);
    }
  }
  _breakpoints.insert(new SuperdenseTime(_stopTime,0));
  _timeBase=System.currentTimeMillis();
  _commitIsPending=false;
  _postfireReturns=true;
  _isInitializing=false;
  _redoingSolverIteration=false;
  _accumulatedSuspendTime=_zeroTime;
  _lastSuspendTime=null;
}

Fixed version (ground truth):
/** 
 * Initialize model after type resolution. In addition to calling the initialize() method of the super class, this method records the current system time as the "real" starting time of the execution. This starting time is used when the execution is synchronized to real time.
 * @exception IllegalActionException If the super class throws it.
 */
public void initialize() throws IllegalActionException {
  _isInitializing=true;
  _breakpoints.clear();
  super.initialize();
  _currentStepSize=0.0;
  if (_isEmbedded() && (_enclosingContinuousDirector() == null)) {
    if (_startTime.compareTo(_currentTime) >= 0) {
      _fireContainerAt(_startTime);
    }
 else {
      _fireContainerAt(_currentTime);
    }
    if (!_stopTime.isInfinite() && _stopTime.compareTo(_currentTime) >= 0) {
      _fireContainerAt(_stopTime);
    }
  }
  if (!_stopTime.isInfinite() && _stopTime.compareTo(_currentTime) >= 0) {
    _breakpoints.insert(new SuperdenseTime(_stopTime,0));
  }
  _timeBase=System.currentTimeMillis();
  _commitIsPending=false;
  _postfireReturns=true;
  _isInitializing=false;
  _redoingSolverIteration=false;
  _accumulatedSuspendTime=_zeroTime;
  _lastSuspendTime=null;
}
Program: 73920
Project: 73920
Buggy source:
private static void _printLocalStats(Map<Object,Map> stats) throws IOException {
  BufferedWriter writer=null;
  try {
    writer=new BufferedWriter(new FileWriter(new File(_statsFilename),true));
    List headers=new LinkedList(_modelStatsHeaders);
    headers.addAll(_solverStatsHeaders);
    writer.append("String_Node_Str" + _separator);
    writer.append("String_Node_Str" + _separator);
    writer.append("String_Node_Str");
    for (    Object header : headers) {
      writer.append(_separator + header.toString());
    }
    writer.newLine();
    for (    Object key : stats.keySet()) {
      Map entry=stats.get(key);
      writer.append(key.toString());
      for (      Object header : headers) {
        writer.append(_separator);
        if (entry.containsKey(header)) {
          writer.append(entry.get(header).toString());
        }
      }
      writer.newLine();
    }
  }
  finally {
    if (writer != null) {
      writer.close();
    }
  }
}

Fixed version (ground truth):
private static void _printLocalStats(Map<Object,Map> stats) throws IOException {
  BufferedWriter writer=null;
  try {
    writer=new BufferedWriter(new FileWriter(new File(_statsFilename),true));
    List headers=new LinkedList(_modelStatsHeaders);
    headers.addAll(_solverStatsHeaders);
    writer.append("String_Node_Str" + _separator);
    writer.append("String_Node_Str" + _separator);
    writer.append("String_Node_Str");
    for (    Object header : headers) {
      writer.append(_separator + header.toString());
    }
    writer.newLine();
    for (    Object key : stats.keySet()) {
      Map.entry entry=stats.get(key);
      writer.append(key.toString());
      for (      Object header : headers) {
        writer.append(_separator);
        if (entry.containsKey(header)) {
          writer.append(entry.get(header).toString());
        }
      }
      writer.newLine();
    }
  }
  finally {
    if (writer != null) {
      writer.close();
    }
  }
}
Program: 73921
Project: 73921
Buggy source:
public static void main(String args[]) throws Exception {
  testPropertiesAndGenerateReports(args[0]);
}

Fixed version (ground truth):
/** 
 * Invoke the test harness.
 * @param args The arguments, only the first argument is passed tothe test harness.
 */
public static void main(String args[]) throws Exception {
  testPropertiesAndGenerateReports(args[0]);
}
Program: 73922
Project: 73922
Buggy source:
protected ParseTreeAnnotationEvaluator _annotationEvaluator(){
  return new ParseTreeAnnotationEvaluator();
}

Fixed version (ground truth):
/** 
 * Create an new ParseTreeAnnotationEvaluator that is tailored for the use-case.
 * @return A new ParseTreeAnnotationEvaluator.
 */
protected ParseTreeAnnotationEvaluator _annotationEvaluator(){
  return new ParseTreeAnnotationEvaluator();
}