Program: 28030
Project: 28030
Buggy source:
private ObjectLiteral objectLiteral() throws IOException {
  int pos=ts.tokenBeg, lineno=ts.lineno;
  int afterComma=-1;
  List<ObjectProperty> elems=new ArrayList<ObjectProperty>();
  Set<String> getterNames=null;
  Set<String> setterNames=null;
  if (this.inUseStrictDirective) {
    getterNames=new HashSet<String>();
    setterNames=new HashSet<String>();
  }
  Comment objJsdocNode=getAndResetJsDoc();
  commaLoop:   for (; ; ) {
    String propertyName=null;
    int entryKind=PROP_ENTRY;
    int tt=peekToken();
    Comment jsdocNode=getAndResetJsDoc();
switch (tt) {
case Token.NAME:
      afterComma=-1;
    Name name=createNameNode();
  propertyName=ts.getString();
int ppos=ts.tokenBeg;
consumeToken();
if ((peekToken() != Token.COLON && ("String_Node_Str".equals(propertyName) || "String_Node_Str".equals(propertyName)))) {
boolean isGet="String_Node_Str".equals(propertyName);
entryKind=isGet ? GET_ENTRY : SET_ENTRY;
AstNode pname=objliteralProperty();
if (pname == null) {
propertyName=null;
}
 else {
propertyName=ts.getString();
ObjectProperty objectProp=getterSetterProperty(ppos,pname,isGet);
pname.setJsDocNode(jsdocNode);
elems.add(objectProp);
}
}
 else {
AstNode pname=name;
pname.setJsDocNode(jsdocNode);
elems.add(plainProperty(pname,tt));
}
break;
case Token.RC:
if (afterComma != -1) warnTrailingComma(pos,elems,afterComma);
break commaLoop;
default :
AstNode pname=objliteralProperty();
if (pname == null) {
propertyName=null;
}
 else {
afterComma=-1;
propertyName=ts.getString();
pname.setJsDocNode(jsdocNode);
elems.add(plainProperty(pname,tt));
}
break;
}
if (this.inUseStrictDirective && propertyName != null) {
switch (entryKind) {
case PROP_ENTRY:
if (getterNames.contains(propertyName) || setterNames.contains(propertyName)) {
addError("String_Node_Str",propertyName);
}
getterNames.add(propertyName);
setterNames.add(propertyName);
break;
case GET_ENTRY:
if (getterNames.contains(propertyName)) {
addError("String_Node_Str",propertyName);
}
getterNames.add(propertyName);
break;
case SET_ENTRY:
if (setterNames.contains(propertyName)) {
addError("String_Node_Str",propertyName);
}
setterNames.add(propertyName);
break;
}
}
getAndResetJsDoc();
jsdocNode=null;
if (matchToken(Token.COMMA)) {
afterComma=ts.tokenEnd;
}
 else {
break commaLoop;
}
}
mustMatchToken(Token.RC,"String_Node_Str");
ObjectLiteral pn=new ObjectLiteral(pos,ts.tokenEnd - pos);
if (objJsdocNode != null) {
pn.setJsDocNode(objJsdocNode);
}
pn.setElements(elems);
pn.setLineno(lineno);
return pn;
}

Fixed version (ground truth):
private ObjectLiteral objectLiteral() throws IOException {
  int pos=ts.tokenBeg, lineno=ts.lineno;
  int afterComma=-1;
  List<ObjectProperty> elems=new ArrayList<ObjectProperty>();
  Set<String> getterNames=null;
  Set<String> setterNames=null;
  if (this.inUseStrictDirective) {
    getterNames=new HashSet<String>();
    setterNames=new HashSet<String>();
  }
  Comment objJsdocNode=getAndResetJsDoc();
  commaLoop:   for (; ; ) {
    String propertyName=null;
    int entryKind=PROP_ENTRY;
    int tt=peekToken();
    Comment jsdocNode=getAndResetJsDoc();
switch (tt) {
case Token.NAME:
      afterComma=-1;
    Name name=createNameNode();
  propertyName=ts.getString();
int ppos=ts.tokenBeg;
consumeToken();
int peeked=peekToken();
boolean maybeGetterOrSetter="String_Node_Str".equals(propertyName) || "String_Node_Str".equals(propertyName);
if (maybeGetterOrSetter && peeked != Token.COMMA && peeked != Token.COLON && peeked != Token.RC) {
boolean isGet="String_Node_Str".equals(propertyName);
entryKind=isGet ? GET_ENTRY : SET_ENTRY;
AstNode pname=objliteralProperty();
if (pname == null) {
propertyName=null;
}
 else {
propertyName=ts.getString();
ObjectProperty objectProp=getterSetterProperty(ppos,pname,isGet);
pname.setJsDocNode(jsdocNode);
elems.add(objectProp);
}
}
 else {
AstNode pname=name;
pname.setJsDocNode(jsdocNode);
elems.add(plainProperty(pname,tt));
}
break;
case Token.RC:
if (afterComma != -1) warnTrailingComma(pos,elems,afterComma);
break commaLoop;
default :
AstNode pname=objliteralProperty();
if (pname == null) {
propertyName=null;
}
 else {
afterComma=-1;
propertyName=ts.getString();
pname.setJsDocNode(jsdocNode);
elems.add(plainProperty(pname,tt));
}
break;
}
if (this.inUseStrictDirective && propertyName != null) {
switch (entryKind) {
case PROP_ENTRY:
if (getterNames.contains(propertyName) || setterNames.contains(propertyName)) {
addError("String_Node_Str",propertyName);
}
getterNames.add(propertyName);
setterNames.add(propertyName);
break;
case GET_ENTRY:
if (getterNames.contains(propertyName)) {
addError("String_Node_Str",propertyName);
}
getterNames.add(propertyName);
break;
case SET_ENTRY:
if (setterNames.contains(propertyName)) {
addError("String_Node_Str",propertyName);
}
setterNames.add(propertyName);
break;
}
}
getAndResetJsDoc();
jsdocNode=null;
if (matchToken(Token.COMMA)) {
afterComma=ts.tokenEnd;
}
 else {
break commaLoop;
}
}
mustMatchToken(Token.RC,"String_Node_Str");
ObjectLiteral pn=new ObjectLiteral(pos,ts.tokenEnd - pos);
if (objJsdocNode != null) {
pn.setJsDocNode(objJsdocNode);
}
pn.setElements(elems);
pn.setLineno(lineno);
return pn;
}