Program: 31106
Project: 31106
Buggy source:
private boolean analyzeEquals0(IntrinsicModel model,ExprNode node,ExprNode a,ExprNode b,RecordMetadata m) throws ParserException {
  if (Chars.equals(a.token,b.token)) {
    node.intrinsicValue=IntrinsicValue.TRUE;
    return true;
  }
  if (a.type == ExprNode.LITERAL && b.type == ExprNode.CONSTANT) {
    if (isTimestamp(a)) {
      boolean reversible=parseInterval(model,quoteEraser.ofQuoted(b.token),b.position);
      node.intrinsicValue=IntrinsicValue.TRUE;
      if (reversible) {
        timestampNodes.add(node);
      }
      return true;
    }
 else {
      if (m.getColumnIndexQuiet(a.token) == -1) {
        throw QueryError.invalidColumn(a.position,a.token);
      }
      RecordColumnMetadata meta=m.getColumn(a.token);
switch (meta.getType()) {
case ColumnType.SYMBOL:
case ColumnType.STRING:
case ColumnType.LONG:
case ColumnType.INT:
        if (meta.isIndexed()) {
          if (preferredKeyColumn != null && !preferredKeyColumn.equals(a.token)) {
            return false;
          }
          boolean newColumn=true;
          if (model.keyColumn != null && (newColumn=!model.keyColumn.equals(a.token)) && meta.getBucketCount() <= m.getColumn(model.keyColumn).getBucketCount()) {
            return false;
          }
          String value=Chars.equals("String_Node_Str",b.token) ? null : Chars.stripQuotes(b.token);
          if (newColumn) {
            model.keyColumn=a.token;
            model.keyValues.clear();
            model.keyValuePositions.clear();
            model.keyValues.add(value);
            model.keyValuePositions.add(b.position);
            for (int n=0, k=keyNodes.size(); n < k; n++) {
              keyNodes.getQuick(n).intrinsicValue=IntrinsicValue.UNDEFINED;
            }
            keyNodes.clear();
          }
 else {
            if (model.keyValues.contains(value)) {
              model.keyValues.clear();
              model.keyValuePositions.clear();
              model.keyValues.add(value);
              model.keyValuePositions.add(b.position);
            }
 else {
              model.intrinsicValue=IntrinsicValue.FALSE;
              return false;
            }
          }
          keyNodes.add(node);
          node.intrinsicValue=IntrinsicValue.TRUE;
          return true;
        }
default :
      return false;
  }
}
}
return false;
}

Fixed version (ground truth):
private boolean analyzeEquals0(AliasTranslator translator,IntrinsicModel model,ExprNode node,ExprNode a,ExprNode b,RecordMetadata m) throws ParserException {
  if (Chars.equals(a.token,b.token)) {
    node.intrinsicValue=IntrinsicValue.TRUE;
    return true;
  }
  if (a.type == ExprNode.LITERAL && b.type == ExprNode.CONSTANT) {
    if (isTimestamp(a)) {
      boolean reversible=parseInterval(model,quoteEraser.ofQuoted(b.token),b.position);
      node.intrinsicValue=IntrinsicValue.TRUE;
      if (reversible) {
        timestampNodes.add(node);
      }
      return true;
    }
 else {
      String column=translator.translateAlias(a.token).toString();
      int index=m.getColumnIndexQuiet(column);
      if (index == -1) {
        throw QueryError.invalidColumn(a.position,a.token);
      }
      RecordColumnMetadata meta=m.getColumn(index);
switch (meta.getType()) {
case ColumnType.SYMBOL:
case ColumnType.STRING:
case ColumnType.LONG:
case ColumnType.INT:
        if (meta.isIndexed()) {
          if (preferredKeyColumn != null && !preferredKeyColumn.equals(column)) {
            return false;
          }
          boolean newColumn=true;
          if (model.keyColumn != null && (newColumn=!model.keyColumn.equals(column)) && meta.getBucketCount() <= m.getColumn(model.keyColumn).getBucketCount()) {
            return false;
          }
          String value=Chars.equals("String_Node_Str",b.token) ? null : Chars.stripQuotes(b.token);
          if (newColumn) {
            model.keyColumn=column;
            model.keyValues.clear();
            model.keyValuePositions.clear();
            model.keyValues.add(value);
            model.keyValuePositions.add(b.position);
            for (int n=0, k=keyNodes.size(); n < k; n++) {
              keyNodes.getQuick(n).intrinsicValue=IntrinsicValue.UNDEFINED;
            }
            keyNodes.clear();
          }
 else {
            if (model.keyValues.contains(value)) {
              model.keyValues.clear();
              model.keyValuePositions.clear();
              model.keyValues.add(value);
              model.keyValuePositions.add(b.position);
            }
 else {
              model.intrinsicValue=IntrinsicValue.FALSE;
              return false;
            }
          }
          keyNodes.add(node);
          node.intrinsicValue=IntrinsicValue.TRUE;
          return true;
        }
default :
      return false;
  }
}
}
return false;
}