Program: 73422
Project: 73422
Buggy source:
/** 
 * Return the function output from the given input arguments. The output concept is a UnitConcept that is the result of multiplication or division of the two input UnitConcepts, or the top of the ontology lattice if there is no UnitConcept in the ontology that represents the product or quotient of the two input concepts.
 * @param argValues The 2 UnitConcept input arguments.
 * @return The output UnitConcept.
 * @throws IllegalActionException Thrown if there is a problem creatingthe output RecordConcept.
 */
protected Concept _evaluateFunction(List<Concept> argValues) throws IllegalActionException {
  Concept arg1=argValues.get(0);
  Concept arg2=argValues.get(1);
  if (arg1.equals(_bottomOfTheLattice) || arg2.equals(_bottomOfTheLattice)) {
    return _bottomOfTheLattice;
  }
 else   if (arg1.equals(_topOfTheLattice) || arg2.equals(_topOfTheLattice)) {
    return _topOfTheLattice;
  }
 else   if (arg1 instanceof DimensionlessConcept && arg2 instanceof DimensionlessConcept) {
    return _unitOntology.getConceptGraph().leastUpperBound(arg1,arg2);
  }
 else   if (arg1 instanceof UnitConcept && arg2 instanceof DimensionlessConcept) {
    return arg1;
  }
 else   if (arg1 instanceof DimensionlessConcept && arg2 instanceof UnitConcept) {
    if (_isMultiply) {
      return arg2;
    }
 else {
      return _findInverseUnitConcept((UnitConcept)arg2);
    }
  }
 else   if (arg1 instanceof UnitConcept && arg2 instanceof UnitConcept) {
    return _findComposedUnitConcept((UnitConcept)arg1,(UnitConcept)arg2);
  }
 else {
    throw new IllegalActionException("String_Node_Str" + "String_Node_Str" + "String_Node_Str" + arg1 + "String_Node_Str"+ arg2+ "String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * Return the function output from the given input arguments. The output concept is a UnitConcept that is the result of multiplication or division of the two input UnitConcepts, or the top of the ontology lattice if there is no UnitConcept in the ontology that represents the product or quotient of the two input concepts.
 * @param argValues The 2 UnitConcept input arguments.
 * @return The output UnitConcept.
 * @throws IllegalActionException Thrown if there is a problem creatingthe output UnitConcept.
 */
protected Concept _evaluateFunction(List<Concept> argValues) throws IllegalActionException {
  Concept arg1=argValues.get(0);
  Concept arg2=argValues.get(1);
  if (arg1.equals(_bottomOfTheLattice) || arg2.equals(_bottomOfTheLattice)) {
    return _bottomOfTheLattice;
  }
 else   if (arg1.equals(_topOfTheLattice) || arg2.equals(_topOfTheLattice)) {
    return _topOfTheLattice;
  }
 else   if (arg1 instanceof DimensionlessConcept && arg2 instanceof DimensionlessConcept) {
    return _unitOntology.getConceptGraph().leastUpperBound(arg1,arg2);
  }
 else   if (arg1 instanceof UnitConcept && arg2 instanceof DimensionlessConcept) {
    return arg1;
  }
 else   if (arg1 instanceof DimensionlessConcept && arg2 instanceof UnitConcept) {
    if (_isMultiply) {
      return arg2;
    }
 else {
      return _findInverseUnitConcept((UnitConcept)arg2);
    }
  }
 else   if (arg1 instanceof UnitConcept && arg2 instanceof UnitConcept) {
    return _findComposedUnitConcept((UnitConcept)arg1,(UnitConcept)arg2);
  }
 else {
    throw new IllegalActionException("String_Node_Str" + "String_Node_Str" + "String_Node_Str" + arg1 + "String_Node_Str"+ arg2+ "String_Node_Str");
  }
}