nus-yam/ex-repair huggingface dataset:
Program: 83818
Project: 83818
Buggy source:
@Override public void writeExpression(MethodWriter writer){
  if (this.requiredType == Types.VOID) {
    this.writeStatement(writer);
    return;
  }
  org.objectweb.asm.Label start=new org.objectweb.asm.Label();
  org.objectweb.asm.Label end=new org.objectweb.asm.Label();
  writer.writeLabel(start);
  int count=writer.registerLocal();
  int len=this.valueCount - 1;
  if (this.labels == null) {
    for (int i=0; i < len; i++) {
      this.values[i].writeStatement(writer);
    }
    this.values[len].writeExpression(writer);
  }
 else {
    for (int i=0; i < len; i++) {
      Label l=this.labels[i];
      if (l != null) {
        writer.writeLabel(l.target);
      }
      this.values[i].writeStatement(writer);
    }
    Label l=this.labels[len];
    if (l != null) {
      writer.writeLabel(l.target);
    }
    this.values[len].writeExpression(writer);
  }
  if (!(this.context instanceof IMethod)) {
    writer.resetLocals(count);
  }
  writer.writeLabel(end);
  if (this.variables == null) {
    return;
  }
  for (  Entry<Name,Variable> entry : this.variables.entrySet()) {
    Variable var=entry.getValue();
    writer.writeLocal(var.name.qualified,var.type.getExtendedName(),var.type.getSignature(),start,end,var.index);
  }
}

Fixed version (ground truth):
@Override public void writeExpression(MethodWriter writer){
  if (this.requiredType == Types.VOID) {
    this.writeStatement(writer);
    return;
  }
  org.objectweb.asm.Label start=new org.objectweb.asm.Label();
  org.objectweb.asm.Label end=new org.objectweb.asm.Label();
  writer.writeLabel(start);
  int count=writer.registerLocal();
  int len=this.valueCount - 1;
  if (this.labels == null) {
    for (int i=0; i < len; i++) {
      this.values[i].writeStatement(writer);
    }
    this.values[len].writeExpression(writer);
  }
 else {
    for (int i=0; i < len; i++) {
      Label l=this.labels[i];
      if (l != null) {
        writer.writeLabel(l.target);
      }
      this.values[i].writeStatement(writer);
    }
    Label l=this.labels[len];
    if (l != null) {
      writer.writeLabel(l.target);
    }
    this.values[len].writeExpression(writer);
  }
  writer.resetLocals(count);
  writer.writeLabel(end);
  if (this.variables == null) {
    return;
  }
  for (  Entry<Name,Variable> entry : this.variables.entrySet()) {
    Variable var=entry.getValue();
    writer.writeLocal(var.name.qualified,var.type.getExtendedName(),var.type.getSignature(),start,end,var.index);
  }
}
Program: 83819
Project: 83819
Buggy source:
public static void saveClass(File file,IClass iclass){
  createFile(file);
  try (OutputStream os=new BufferedOutputStream(new FileOutputStream(file))){
    org.objectweb.asm.ClassWriter writer=new org.objectweb.asm.ClassWriter(DyvilCompiler.asmVersion | org.objectweb.asm.ClassWriter.COMPUTE_FRAMES);
    iclass.write(writer);
    writer.visitEnd();
    byte[] bytes=writer.toByteArray();
    os.write(bytes,0,bytes.length);
  }
 catch (  Exception ex) {
    DyvilCompiler.logger.throwing("String_Node_Str","String_Node_Str",ex);
  }
}

Fixed version (ground truth):
public static void saveClass(File file,IClass iclass){
  createFile(file);
  try (OutputStream os=new BufferedOutputStream(new FileOutputStream(file))){
    int ver=DyvilCompiler.asmVersion | org.objectweb.asm.ClassWriter.COMPUTE_FRAMES;
    org.objectweb.asm.ClassWriter writer=new org.objectweb.asm.ClassWriter(ver);
    iclass.write(writer);
    writer.visitEnd();
    byte[] bytes=writer.toByteArray();
    os.write(bytes,0,bytes.length);
  }
 catch (  Throwable ex) {
    DyvilCompiler.logger.throwing("String_Node_Str","String_Node_Str",ex);
  }
}
Program: 83820
Project: 83820
Buggy source:
@Override public void writeInsn(int opcode){
  if (this.hasReturn && this.inlineEnd != null) {
    this.writeInlineReturn();
  }
  this.hasReturn=false;
  if (opcode > 255) {
    this.visitSpecialInsn(opcode);
    return;
  }
  this.mv.visitInsn(opcode);
}

Fixed version (ground truth):
@Override public void writeInsn(int opcode){
  if (this.hasReturn && this.inlineEnd != null) {
    this.writeInlineReturn();
  }
  this.hasReturn=false;
  if (opcode > 255) {
    this.visitSpecialInsn(opcode);
    return;
  }
  if (opcode >= IRETURN && opcode <= RETURN) {
    this.hasReturn=true;
    if (this.inlineEnd != null) {
      return;
    }
  }
  this.mv.visitInsn(opcode);
}
Program: 83821
Project: 83821
Buggy source:
@Override public AnnotationVisitor visitAnnotation(String type,boolean visible){
  String packName=ClassFormat.extendedToPackage(type);
  if (packName.equals("String_Node_Str")) {
    this.method.addModifier(Modifiers.INLINE);
    this.inline=true;
  }
  if (this.method.addRawAnnotation(packName)) {
    Annotation annotation=new Annotation(new dyvil.tools.compiler.ast.type.Type(packName));
    return new AnnotationVisitorImpl(this.method,annotation);
  }
  return null;
}

Fixed version (ground truth):
@Override public AnnotationVisitor visitAnnotation(String type,boolean visible){
  String packName=ClassFormat.extendedToPackage(type);
  if ("String_Node_Str".equals(packName)) {
    this.method.addModifier(Modifiers.INLINE);
    this.inline=true;
  }
  if (this.method.addRawAnnotation(packName)) {
    Annotation annotation=new Annotation(new dyvil.tools.compiler.ast.type.Type(packName));
    return new AnnotationVisitorImpl(this.method,annotation);
  }
  return null;
}
Program: 83823
Project: 83823
Buggy source:
@Override public void resolveTypes(){
  for (  Import i : this.imports) {
    i.resolveTypes(this.markers);
  }
  for (  Import i : this.staticImports) {
    i.resolveTypes(this.markers);
  }
  for (  IClass i : this.classes) {
    i.resolveTypes(this.markers,Package.rootPackage);
  }
}

Fixed version (ground truth):
@Override public void resolveTypes(){
  for (  Import i : this.imports) {
    i.resolveTypes(this.markers);
  }
  for (  Import i : this.staticImports) {
    i.resolveTypes(this.markers);
  }
  for (  IClass i : this.classes) {
    i.resolveTypes(this.markers,this);
  }
}
Program: 83824
Project: 83824
Buggy source:
@Override public void visitLocalVariable(String name,String desc,String signature,Label start,Label end,int index){
  if (this.method.hasModifier(Modifiers.STATIC)) {
    if (index != 0 && index <= this.method.parameterCount()) {
      this.method.getParameter(index - 1).setName(Name.getQualified(name));
    }
  }
 else   if (index < this.method.parameterCount()) {
    this.method.getParameter(index).setName(Name.getQualified(name));
  }
}

Fixed version (ground truth):
@Override public void visitLocalVariable(String name,String desc,String signature,Label start,Label end,int index){
  if (this.method.hasModifier(Modifiers.STATIC)) {
    if (index < this.method.parameterCount()) {
      this.method.getParameter(index).setName(Name.getQualified(name));
    }
  }
 else   if (index != 0 && index <= this.method.parameterCount()) {
    this.method.getParameter(index - 1).setName(Name.getQualified(name));
  }
}
Program: 83825
Project: 83825
Buggy source:
@Override public void parse(IParserManager pm,IToken token) throws SyntaxError {
  int type=token.type();
  if (this.mode == KEY) {
    if (ParserUtil.isIdentifier(type)) {
      this.mode=EQUALS;
      this.key=token.nameValue();
      return;
    }
    throw new SyntaxError(token,"String_Node_Str");
  }
  if (this.mode == EQUALS) {
    if (type == Tokens.EQUALS) {
      this.mode=VALUE;
      return;
    }
    throw new SyntaxError(token,"String_Node_Str");
  }
 else   if (this.mode == VALUE) {
    if (type == Symbols.OPEN_SQUARE_BRACKET) {
      this.mode=ARRAY;
      return;
    }
    this.setProperty(this.key,token);
    this.mode=KEY;
    this.key=null;
    return;
  }
 else   if (this.mode == ARRAY) {
    if (type == Symbols.CLOSE_SQUARE_BRACKET) {
      this.mode=KEY;
      this.key=null;
      return;
    }
    this.setProperty(this.key,token);
    return;
  }
}

Fixed version (ground truth):
@Override public void parse(IParserManager pm,IToken token) throws SyntaxError {
  int type=token.type();
  if (this.mode == KEY) {
    if (ParserUtil.isIdentifier(type)) {
      this.mode=EQUALS;
      this.key=token.nameValue();
      return;
    }
    throw new SyntaxError(token,"String_Node_Str");
  }
  if (this.mode == EQUALS) {
    if (type == Symbols.EQUALS) {
      this.mode=VALUE;
      return;
    }
    throw new SyntaxError(token,"String_Node_Str");
  }
 else   if (this.mode == VALUE) {
    if (type == Symbols.OPEN_SQUARE_BRACKET) {
      this.mode=ARRAY;
      return;
    }
    this.setProperty(this.key,token);
    this.mode=KEY;
    this.key=null;
    return;
  }
 else   if (this.mode == ARRAY) {
    if (type == Symbols.CLOSE_SQUARE_BRACKET) {
      this.mode=KEY;
      this.key=null;
      return;
    }
    this.setProperty(this.key,token);
    return;
  }
}
Program: 83826
Project: 83826
Buggy source:
private static int getMode(char c,String code,int i){
switch (c) {
case '"':
    return STRING;
case '\'':
  return CHAR;
case '/':
char n=code.charAt(i + 1);
if (n == '*') {
return BLOCK_COMMENT;
}
 else if (n == '/') {
return LINE_COMMENT;
}
 else {
return IDENTIFIER | MOD_SYMBOL;
}
case '@':
n=code.charAt(i + 1);
if (n == '"') {
return STRING_2;
}
return IDENTIFIER | MOD_SYMBOL;
case '0':
n=code.charAt(i + 1);
if (n == 'b') {
return INT | MOD_BIN;
}
 else if (n == 'x') {
return INT | MOD_HEX;
}
 else if (isDigit(n)) {
return INT | MOD_OCT;
}
return INT;
case '(':
return Symbols.OPEN_PARENTHESIS;
case ')':
return Symbols.CLOSE_PARENTHESIS;
case '[':
return Symbols.OPEN_SQUARE_BRACKET;
case ']':
return Symbols.CLOSE_SQUARE_BRACKET;
case '{':
return Symbols.OPEN_CURLY_BRACKET;
case '}':
return Symbols.CLOSE_CURLY_BRACKET;
case '.':
n=code.charAt(i + 1);
if (n == '.') {
return IDENTIFIER | MOD_DOTS;
}
return DOT;
case ';':
return SEMICOLON;
case ',':
return COMMA;
}
if (isDigit(c)) {
return INT;
}
 else if (isIdentifierSymbol(c)) {
return IDENTIFIER | MOD_SYMBOL;
}
 else if (isIdentifierPart(c)) {
return IDENTIFIER | MOD_LETTER;
}
return 0;
}

Fixed version (ground truth):
private static int getMode(char c,String code,int i){
switch (c) {
case '"':
    return STRING;
case '\'':
  return CHAR;
case '/':
char n=code.charAt(i + 1);
if (n == '*') {
return BLOCK_COMMENT;
}
 else if (n == '/') {
return LINE_COMMENT;
}
 else {
return IDENTIFIER | MOD_SYMBOL;
}
case '@':
n=code.charAt(i + 1);
if (n == '"') {
return STRING_2;
}
return IDENTIFIER | MOD_SYMBOL;
case '0':
n=code.charAt(i + 1);
if (n == 'b') {
return INT | MOD_BIN;
}
 else if (n == 'x') {
return INT | MOD_HEX;
}
 else if (isDigit(n)) {
return INT | MOD_OCT;
}
return INT;
case '(':
return Symbols.OPEN_PARENTHESIS;
case ')':
return Symbols.CLOSE_PARENTHESIS;
case '[':
return Symbols.OPEN_SQUARE_BRACKET;
case ']':
return Symbols.CLOSE_SQUARE_BRACKET;
case '{':
return Symbols.OPEN_CURLY_BRACKET;
case '}':
return Symbols.CLOSE_CURLY_BRACKET;
case '.':
n=code.charAt(i + 1);
if (n == '.') {
return IDENTIFIER | MOD_DOTS;
}
return Symbols.DOT;
case ';':
return Symbols.SEMICOLON;
case ',':
return Symbols.COMMA;
}
if (isDigit(c)) {
return INT;
}
 else if (isIdentifierSymbol(c)) {
return IDENTIFIER | MOD_SYMBOL;
}
 else if (isIdentifierPart(c)) {
return IDENTIFIER | MOD_LETTER;
}
return 0;
}
Program: 83827
Project: 83827
Buggy source:
@Override public int type(){
  return Tokens.SEMICOLON;
}

Fixed version (ground truth):
@Override public int type(){
  return Symbols.SEMICOLON;
}
Program: 83828
Project: 83828
Buggy source:
@Override public int endIndex(){
  return this.type == Tokens.ARROW_OPERATOR ? this.start + 2 : this.start + 1;
}

Fixed version (ground truth):
@Override public int endIndex(){
  return this.type == Symbols.ARROW_OPERATOR ? this.start + 2 : this.start + 1;
}
Program: 83829
Project: 83829
Buggy source:
/** 
 * Returns true if the given   {@link IToken} {@code token} should be parsed.If not, it gets removed from the Token Chain.
 * @param value the value of the token
 * @param token the token
 * @return true, if the token should be parsed or removed from the tokenstream
 */
public boolean retainToken(IToken token,IToken prev){
  if (!this.semicolonInference) {
    return true;
  }
  if (prev == null) {
    return true;
  }
  int prevLN=prev.endLine();
  if (prevLN == token.startLine()) {
    return true;
  }
  int type=token.type();
  if (type != Symbols.OPEN_SQUARE_BRACKET && (type & (Tokens.SYMBOL | Tokens.KEYWORD | Tokens.IDENTIFIER)) == 0) {
    return true;
  }
  int type1=prev.type();
  if (ParserUtil.isSeperator(type1)) {
    return true;
  }
  int prevEnd=prev.endIndex();
  IToken semicolon=new InferredSemicolon(prevLN,prevEnd);
  semicolon.setNext(token);
  prev.setNext(semicolon);
  return true;
}

Fixed version (ground truth):
/** 
 * Returns true if the given   {@link IToken} {@code token} should be parsed.If not, it gets removed from the Token Chain.
 * @param value the value of the token
 * @param token the token
 * @return true, if the token should be parsed or removed from the tokenstream
 */
public boolean retainToken(IToken token,IToken prev){
  if (!this.semicolonInference) {
    return true;
  }
  if (prev == null) {
    return true;
  }
  int prevLN=prev.endLine();
  if (prevLN == token.startLine()) {
    return true;
  }
  int type=token.type();
  if ((type & (Tokens.SYMBOL | Tokens.KEYWORD | Tokens.IDENTIFIER| Tokens.BRACKET)) == 0) {
    return true;
  }
  if (type == Symbols.OPEN_CURLY_BRACKET) {
    return true;
  }
  int type1=prev.type();
  if (ParserUtil.isSeperator(type1)) {
    return true;
  }
  int prevEnd=prev.endIndex();
  IToken semicolon=new InferredSemicolon(prevLN,prevEnd);
  semicolon.setNext(token);
  prev.setNext(semicolon);
  return true;
}
Program: 83830
Project: 83830
Buggy source:
@Override public void parse(IParserManager pm,IToken token) throws SyntaxError {
  int type=token.type();
  if (this.mode == NAME) {
    if (ParserUtil.isIdentifier(type)) {
      Name name=token.nameValue();
      this.annotation.name=name;
      this.annotation.type=new AnnotationType(token,name);
      this.mode=PARAMETERS_START;
      return;
    }
    throw new SyntaxError(token,"String_Node_Str");
  }
  if (this.mode == PARAMETERS_START) {
    if (type == Symbols.OPEN_PARENTHESIS) {
      IToken next=token.next();
      if (ParserUtil.isIdentifier(next.type()) && next.next().type() == Tokens.COLON) {
        ArgumentMap map=new ArgumentMap();
        this.annotation.arguments=map;
        pm.pushParser(new ExpressionMapParser(map));
      }
 else {
        ArgumentList list=new ArgumentList();
        this.annotation.arguments=list;
        pm.pushParser(new ExpressionListParser(list));
      }
      this.mode=PARAMETERS_END;
      return;
    }
    if (!ParserUtil.isIdentifier(type) && !ParserUtil.isTerminator2(type)) {
      SingleArgument arg=new SingleArgument();
      this.annotation.arguments=arg;
      pm.popParser();
      pm.pushParser(new ExpressionParser(arg),true);
      return;
    }
    pm.popParser(true);
    return;
  }
  if (this.mode == PARAMETERS_END) {
    if (type == Symbols.CLOSE_PARENTHESIS) {
      pm.popParser();
      return;
    }
    throw new SyntaxError(token,"String_Node_Str");
  }
}

Fixed version (ground truth):
@Override public void parse(IParserManager pm,IToken token) throws SyntaxError {
  int type=token.type();
  if (this.mode == NAME) {
    if (ParserUtil.isIdentifier(type)) {
      Name name=token.nameValue();
      this.annotation.name=name;
      this.annotation.type=new AnnotationType(token,name);
      this.mode=PARAMETERS_START;
      return;
    }
    throw new SyntaxError(token,"String_Node_Str");
  }
  if (this.mode == PARAMETERS_START) {
    if (type == Symbols.OPEN_PARENTHESIS) {
      IToken next=token.next();
      if (ParserUtil.isIdentifier(next.type()) && next.next().type() == Symbols.COLON) {
        ArgumentMap map=new ArgumentMap();
        this.annotation.arguments=map;
        pm.pushParser(new ExpressionMapParser(map));
      }
 else {
        ArgumentList list=new ArgumentList();
        this.annotation.arguments=list;
        pm.pushParser(new ExpressionListParser(list));
      }
      this.mode=PARAMETERS_END;
      return;
    }
    if (!ParserUtil.isIdentifier(type) && !ParserUtil.isTerminator2(type)) {
      SingleArgument arg=new SingleArgument();
      this.annotation.arguments=arg;
      pm.popParser();
      pm.pushParser(new ExpressionParser(arg),true);
      return;
    }
    pm.popParser(true);
    return;
  }
  if (this.mode == PARAMETERS_END) {
    if (type == Symbols.CLOSE_PARENTHESIS) {
      pm.popParser();
      return;
    }
    throw new SyntaxError(token,"String_Node_Str");
  }
}
Program: 83831
Project: 83831
Buggy source:
@Override public void parse(IParserManager pm,IToken token) throws SyntaxError {
  int type=token.type();
  if (type == Tokens.SEMICOLON) {
    return;
  }
  if (type == Symbols.CLOSE_CURLY_BRACKET) {
    pm.popParser(true);
    return;
  }
  if (this.mode == INSTRUCTION) {
    IInstruction insn=null;
    if (type == Keywords.GOTO) {
      IToken next=token.next();
      if (!ParserUtil.isIdentifier(next.type())) {
        throw new SyntaxError(token,"String_Node_Str");
      }
      pm.skip();
      insn=new JumpInstruction(Opcodes.GOTO,new Label(next.nameValue()));
    }
    if (ParserUtil.isIdentifier(type)) {
      Name name=token.nameValue();
      if (token.next().type() == Tokens.COLON) {
        pm.skip();
        this.label=name;
        return;
      }
      int opcode=Opcodes.parseOpcode(name.qualified);
      if (opcode == -1) {
        throw new SyntaxError(token,"String_Node_Str" + name + "String_Node_Str");
      }
      insn=handleOpcode(pm,token,opcode);
    }
    if (insn != null) {
      if (this.label != null) {
        this.bytecode.addInstruction(insn,new Label(this.label));
        this.label=null;
        return;
      }
      this.bytecode.addInstruction(insn);
      return;
    }
    throw new SyntaxError(token,"String_Node_Str");
  }
}

Fixed version (ground truth):
@Override public void parse(IParserManager pm,IToken token) throws SyntaxError {
  int type=token.type();
  if (type == Symbols.SEMICOLON) {
    return;
  }
  if (type == Symbols.CLOSE_CURLY_BRACKET) {
    pm.popParser(true);
    return;
  }
  if (this.mode == INSTRUCTION) {
    IInstruction insn=null;
    if (type == Keywords.GOTO) {
      IToken next=token.next();
      if (!ParserUtil.isIdentifier(next.type())) {
        throw new SyntaxError(token,"String_Node_Str");
      }
      pm.skip();
      insn=new JumpInstruction(Opcodes.GOTO,new Label(next.nameValue()));
    }
    if (ParserUtil.isIdentifier(type)) {
      Name name=token.nameValue();
      if (token.next().type() == Symbols.COLON) {
        pm.skip();
        this.label=name;
        return;
      }
      int opcode=Opcodes.parseOpcode(name.qualified);
      if (opcode == -1) {
        throw new SyntaxError(token,"String_Node_Str" + name + "String_Node_Str");
      }
      insn=handleOpcode(pm,token,opcode);
    }
    if (insn != null) {
      if (this.label != null) {
        this.bytecode.addInstruction(insn,new Label(this.label));
        this.label=null;
        return;
      }
      this.bytecode.addInstruction(insn);
      return;
    }
    throw new SyntaxError(token,"String_Node_Str");
  }
}
Program: 83832
Project: 83832
Buggy source:
@Override public void parse(IParserManager pm,IToken token) throws SyntaxError {
  int type=token.type();
  if (type == Tokens.SEMICOLON) {
    pm.popParser(true);
    return;
  }
  if (this.mode == OWNER) {
    pm.pushParser(new InternalTypeParser(this),true);
    this.mode=DOT;
    return;
  }
  if (this.mode == DOT) {
    if (type != Tokens.DOT) {
      throw new SyntaxError(token,"String_Node_Str");
    }
    this.mode=COLON;
    IToken next=token.next();
    if (!ParserUtil.isIdentifier(next.type())) {
      throw new SyntaxError(next,"String_Node_Str");
    }
    pm.skip();
    this.fieldInstruction.setFieldName(next.nameValue().qualified);
    return;
  }
  if (this.mode == COLON) {
    if (type != Tokens.COLON) {
      throw new SyntaxError(token,"String_Node_Str");
    }
    pm.pushParser(new InternalTypeParser(this));
    return;
  }
}

Fixed version (ground truth):
@Override public void parse(IParserManager pm,IToken token) throws SyntaxError {
  int type=token.type();
  if (type == Symbols.SEMICOLON) {
    pm.popParser(true);
    return;
  }
  if (this.mode == OWNER) {
    pm.pushParser(new InternalTypeParser(this),true);
    this.mode=DOT;
    return;
  }
  if (this.mode == DOT) {
    if (type != Symbols.DOT) {
      throw new SyntaxError(token,"String_Node_Str");
    }
    this.mode=COLON;
    IToken next=token.next();
    if (!ParserUtil.isIdentifier(next.type())) {
      throw new SyntaxError(next,"String_Node_Str");
    }
    pm.skip();
    this.fieldInstruction.setFieldName(next.nameValue().qualified);
    return;
  }
  if (this.mode == COLON) {
    if (type != Symbols.COLON) {
      throw new SyntaxError(token,"String_Node_Str");
    }
    pm.pushParser(new InternalTypeParser(this));
    return;
  }
}
Program: 83833
Project: 83833
Buggy source:
@Override public void parse(IParserManager pm,IToken token) throws SyntaxError {
  int type=token.type();
  if (type == Tokens.SEMICOLON) {
    pm.popParser(true);
    return;
  }
  if (this.mode == OWNER) {
    if (type == Keywords.INTERFACE) {
      this.methodInstruction.setInterface(true);
    }
    pm.pushParser(new InternalTypeParser(this),true);
    this.mode=DOT;
    return;
  }
  if (this.mode == DOT) {
    if (type != Tokens.DOT) {
      throw new SyntaxError(token,"String_Node_Str");
    }
    this.mode=PARAMETERS;
    IToken next=token.next();
    if (!ParserUtil.isIdentifier(next.type())) {
      throw new SyntaxError(next,"String_Node_Str");
    }
    pm.skip();
    this.methodInstruction.setMethodName(next.nameValue().qualified);
    return;
  }
  if (this.mode == PARAMETERS) {
    if (type == Symbols.OPEN_PARENTHESIS) {
      pm.pushParser(new InternalTypeParser(this));
      this.mode=PARAMETERS_END;
      return;
    }
    throw new SyntaxError(token,"String_Node_Str");
  }
  if (this.mode == PARAMETERS_END) {
    if (type == Tokens.COMMA) {
      pm.pushParser(new InternalTypeParser(this));
      return;
    }
    if (type == Symbols.CLOSE_PARENTHESIS) {
      this.mode=COLON;
      return;
    }
    throw new SyntaxError(token,"String_Node_Str");
  }
  if (this.mode == COLON) {
    if (type != Tokens.COLON) {
      throw new SyntaxError(token,"String_Node_Str");
    }
    pm.pushParser(new InternalTypeParser(this));
    return;
  }
}

Fixed version (ground truth):
@Override public void parse(IParserManager pm,IToken token) throws SyntaxError {
  int type=token.type();
  if (type == Symbols.SEMICOLON) {
    pm.popParser(true);
    return;
  }
  if (this.mode == OWNER) {
    if (type == Keywords.INTERFACE) {
      this.methodInstruction.setInterface(true);
    }
    pm.pushParser(new InternalTypeParser(this),true);
    this.mode=DOT;
    return;
  }
  if (this.mode == DOT) {
    if (type != Symbols.DOT) {
      throw new SyntaxError(token,"String_Node_Str");
    }
    this.mode=PARAMETERS;
    IToken next=token.next();
    if (!ParserUtil.isIdentifier(next.type())) {
      throw new SyntaxError(next,"String_Node_Str");
    }
    pm.skip();
    this.methodInstruction.setMethodName(next.nameValue().qualified);
    return;
  }
  if (this.mode == PARAMETERS) {
    if (type == Symbols.OPEN_PARENTHESIS) {
      pm.pushParser(new InternalTypeParser(this));
      this.mode=PARAMETERS_END;
      return;
    }
    throw new SyntaxError(token,"String_Node_Str");
  }
  if (this.mode == PARAMETERS_END) {
    if (type == Symbols.COMMA) {
      pm.pushParser(new InternalTypeParser(this));
      return;
    }
    if (type == Symbols.CLOSE_PARENTHESIS) {
      this.mode=COLON;
      return;
    }
    throw new SyntaxError(token,"String_Node_Str");
  }
  if (this.mode == COLON) {
    if (type != Symbols.COLON) {
      throw new SyntaxError(token,"String_Node_Str");
    }
    pm.pushParser(new InternalTypeParser(this));
    return;
  }
}
Program: 83835
Project: 83835
Buggy source:
@Override public void parse(IParserManager jcp,IToken token) throws SyntaxError {
  int type=token.type();
  if (this.isInMode(PACKAGE)) {
    if (type == Keywords.PACKAGE) {
      this.mode=IMPORT | CLASS;
      PackageDecl pack=new PackageDecl(token.raw());
      this.unit.setPackageDeclaration(pack);
      jcp.pushParser(new PackageParser(pack));
      return;
    }
  }
  if (this.isInMode(IMPORT)) {
    if (type == Keywords.IMPORT) {
      this.mode=IMPORT | CLASS;
      Import i=new Import(token.raw());
      this.unit.addImport(i);
      jcp.pushParser(new ImportParser(null,i));
      return;
    }
    if (type == Keywords.USING) {
      this.mode=IMPORT | CLASS;
      Import i=new Import(token.raw());
      i.isStatic=true;
      this.unit.addStaticImport(i);
      jcp.pushParser(new ImportParser(null,i));
      return;
    }
  }
  if (this.isInMode(CLASS)) {
    if (token.type() == Tokens.SEMICOLON) {
      return;
    }
    CodeClass c=new CodeClass(null,this.unit);
    this.unit.addClass(c);
    jcp.pushParser(new ClassDeclarationParser(c),true);
    return;
  }
  throw new SyntaxError(token,"String_Node_Str");
}

Fixed version (ground truth):
@Override public void parse(IParserManager jcp,IToken token) throws SyntaxError {
  int type=token.type();
  if (this.isInMode(PACKAGE)) {
    if (type == Keywords.PACKAGE) {
      this.mode=IMPORT | CLASS;
      PackageDecl pack=new PackageDecl(token.raw());
      this.unit.setPackageDeclaration(pack);
      jcp.pushParser(new PackageParser(pack));
      return;
    }
  }
  if (this.isInMode(IMPORT)) {
    if (type == Keywords.IMPORT) {
      this.mode=IMPORT | CLASS;
      Import i=new Import(token.raw());
      this.unit.addImport(i);
      jcp.pushParser(new ImportParser(null,i));
      return;
    }
    if (type == Keywords.USING) {
      this.mode=IMPORT | CLASS;
      Import i=new Import(token.raw());
      i.isStatic=true;
      this.unit.addStaticImport(i);
      jcp.pushParser(new ImportParser(null,i));
      return;
    }
  }
  if (this.isInMode(CLASS)) {
    if (token.type() == Symbols.SEMICOLON) {
      return;
    }
    CodeClass c=new CodeClass(null,this.unit);
    this.unit.addClass(c);
    jcp.pushParser(new ClassDeclarationParser(c),true);
    return;
  }
  throw new SyntaxError(token,"String_Node_Str");
}
Program: 83836
Project: 83836
Buggy source:
@Override public void parse(IParserManager pm,IToken token) throws SyntaxError {
  int type=token.type();
  if (type == Tokens.SEMICOLON) {
    this.mode=0;
    return;
  }
  if (type == Symbols.CLOSE_CURLY_BRACKET) {
    pm.popParser();
    return;
  }
  if (this.mode == 0) {
    if (type == Keywords.GET) {
      this.mode=GET;
      return;
    }
    if (type == Keywords.SET) {
      this.mode=SET;
      return;
    }
    throw new SyntaxError(token,"String_Node_Str",false);
  }
  if (this.mode > 0) {
    if (type == Tokens.COLON) {
      pm.pushParser(new ExpressionParser(this));
      return;
    }
    throw new SyntaxError(token,"String_Node_Str");
  }
}

Fixed version (ground truth):
@Override public void parse(IParserManager pm,IToken token) throws SyntaxError {
  int type=token.type();
  if (type == Symbols.SEMICOLON) {
    this.mode=0;
    return;
  }
  if (type == Symbols.CLOSE_CURLY_BRACKET) {
    pm.popParser();
    return;
  }
  if (this.mode == 0) {
    if (type == Keywords.GET) {
      this.mode=GET;
      return;
    }
    if (type == Keywords.SET) {
      this.mode=SET;
      return;
    }
    throw new SyntaxError(token,"String_Node_Str",false);
  }
  if (this.mode > 0) {
    if (type == Symbols.COLON) {
      pm.pushParser(new ExpressionParser(this));
      return;
    }
    throw new SyntaxError(token,"String_Node_Str");
  }
}
Program: 83837
Project: 83837
Buggy source:
@Override public void parse(IParserManager pm,IToken token) throws SyntaxError {
  int type=token.type();
  if (type == Symbols.CLOSE_SQUARE_BRACKET) {
    pm.popParser(true);
    return;
  }
  if (this.mode == 0) {
    this.mode=1;
    pm.pushParser(new DWTValueParser(this),true);
    return;
  }
  if (this.mode == 1) {
    if (type == Tokens.COMMA) {
      this.mode=0;
      return;
    }
    pm.pushParser(new DWTValueParser(this),true);
    return;
  }
}

Fixed version (ground truth):
@Override public void parse(IParserManager pm,IToken token) throws SyntaxError {
  int type=token.type();
  if (type == Symbols.CLOSE_SQUARE_BRACKET) {
    pm.popParser(true);
    return;
  }
  if (this.mode == 0) {
    this.mode=1;
    pm.pushParser(new DWTValueParser(this),true);
    return;
  }
  if (this.mode == 1) {
    if (type == Symbols.COMMA) {
      this.mode=0;
      return;
    }
    pm.pushParser(new DWTValueParser(this),true);
    return;
  }
}
Program: 83838
Project: 83838
Buggy source:
@Override public void parse(IParserManager pm,IToken token) throws SyntaxError {
  int type=token.type();
  if (this.mode == NAME) {
    this.mode=BODY;
    if (ParserUtil.isIdentifier(type)) {
      this.node.setPosition(token.raw());
      this.node.name=token.nameValue();
      return;
    }
    throw new SyntaxError(token,"String_Node_Str");
  }
  if (this.mode == BODY) {
    if (type == Symbols.OPEN_CURLY_BRACKET) {
      this.mode=PROPERTY_NAME;
      return;
    }
    throw new SyntaxError(token,"String_Node_Str");
  }
  if (type == Symbols.CLOSE_CURLY_BRACKET) {
    pm.popParser();
    return;
  }
  if (this.mode == PROPERTY_NAME) {
    if (ParserUtil.isIdentifier(type)) {
      this.mode=EQUALS;
      this.name=token.nameValue().qualified;
      return;
    }
    this.mode=PROPERTY_NAME;
    throw new SyntaxError(token,"String_Node_Str");
  }
  if (this.mode == EQUALS) {
    if (type == Tokens.EQUALS || type == Tokens.COLON) {
      pm.pushParser(new DWTValueParser(this));
      return;
    }
    this.mode=PROPERTY_NAME;
    throw new SyntaxError(token,"String_Node_Str");
  }
  if (this.mode == BODY_END) {
    throw new SyntaxError(token,"String_Node_Str");
  }
}

Fixed version (ground truth):
@Override public void parse(IParserManager pm,IToken token) throws SyntaxError {
  int type=token.type();
  if (this.mode == NAME) {
    this.mode=BODY;
    if (ParserUtil.isIdentifier(type)) {
      this.node.setPosition(token.raw());
      this.node.name=token.nameValue();
      return;
    }
    throw new SyntaxError(token,"String_Node_Str");
  }
  if (this.mode == BODY) {
    if (type == Symbols.OPEN_CURLY_BRACKET) {
      this.mode=PROPERTY_NAME;
      return;
    }
    throw new SyntaxError(token,"String_Node_Str");
  }
  if (type == Symbols.CLOSE_CURLY_BRACKET) {
    pm.popParser();
    return;
  }
  if (this.mode == PROPERTY_NAME) {
    if (ParserUtil.isIdentifier(type)) {
      this.mode=EQUALS;
      this.name=token.nameValue().qualified;
      return;
    }
    this.mode=PROPERTY_NAME;
    throw new SyntaxError(token,"String_Node_Str");
  }
  if (this.mode == EQUALS) {
    if (type == Symbols.EQUALS || type == Symbols.COLON) {
      pm.pushParser(new DWTValueParser(this));
      return;
    }
    this.mode=PROPERTY_NAME;
    throw new SyntaxError(token,"String_Node_Str");
  }
  if (this.mode == BODY_END) {
    throw new SyntaxError(token,"String_Node_Str");
  }
}
Program: 83839
Project: 83839
Buggy source:
@Override public void checkTypes(MarkerList markers,IContext context){
  if (this.instance != null) {
    this.instance.checkTypes(markers,context);
    if (this.field != null && this.field.hasModifier(Modifiers.STATIC) && this.instance.getValueType() != CLASS_ACCESS) {
      markers.add(this.position,"String_Node_Str",this.name);
      this.instance=null;
      return;
    }
  }
 else   if (this.field.isField()) {
    markers.add(this.position,"String_Node_Str",this.name);
    this.instance=new ThisValue(this.position,this.field.getTheClass().getType());
  }
}

Fixed version (ground truth):
@Override public void checkTypes(MarkerList markers,IContext context){
  if (this.instance != null) {
    this.instance.checkTypes(markers,context);
    if (this.field != null && this.field.hasModifier(Modifiers.STATIC) && this.instance.getValueType() != CLASS_ACCESS) {
      markers.add(this.position,"String_Node_Str",this.name);
      this.instance=null;
      return;
    }
  }
 else   if (this.field != null && this.field.isField()) {
    markers.add(this.position,"String_Node_Str",this.name);
    this.instance=new ThisValue(this.position,this.field.getTheClass().getType());
  }
}
Program: 83840
Project: 83840
Buggy source:
@Override public void writeStatement(MethodWriter writer){
  this.variable.writeSet(writer,null,this.variable.value);
}

Fixed version (ground truth):
@Override public void writeStatement(MethodWriter writer){
  this.variable.value.writeExpression(writer);
  this.variable.index=writer.registerLocal(this.variable.type);
  this.variable.writeSet(writer,null,null);
}
Program: 83841
Project: 83841
Buggy source:
@Override public boolean resolve(IContext context,MarkerList markers){
  int len=this.arguments.size();
  if (len == 1) {
    IValue argument=this.arguments.getFirstValue();
    IValue operator;
    if (this.instance != null) {
      if ("String_Node_Str".equals(this.name)) {
        MatchExpression me=Operators.getMatchExpression(this.instance,argument);
        if (me != null) {
          me.resolve(markers,context);
          me.position=this.position;
          this.replacement=me;
          return false;
        }
      }
      argument=argument.resolve(markers,context);
      operator=Operators.get(this.instance,this.name,argument);
    }
 else {
      argument=argument.resolve(markers,context);
      operator=Operators.get(this.name,argument);
    }
    if (operator != null) {
      operator.setPosition(this.position);
      this.replacement=operator;
      return false;
    }
    this.arguments.setFirstValue(argument);
  }
 else {
    this.arguments.resolve(markers,context);
  }
  IMethod method=IAccess.resolveMethod(context,this.instance,this.qualifiedName,this.arguments);
  if (method != null) {
    this.method=method;
    return true;
  }
  if (len == 1 && this.instance != null && this.qualifiedName.endsWith("String_Node_Str")) {
    String s=this.qualifiedName.substring(0,this.qualifiedName.length() - 3);
    MethodMatch method1=this.instance.getType().resolveMethod(null,s,this.arguments);
    if (method1 != null) {
      AssignMethodCall call=new AssignMethodCall(this.position);
      call.method=method1.theMethod;
      call.instance=this.instance;
      call.arguments=this.arguments;
      call.name=this.name.substring(0,this.name.length() - 1);
      call.qualifiedName=s;
      call.dotless=this.dotless;
      this.replacement=call;
    }
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean resolve(IContext context,MarkerList markers){
  IValue op=this.resolveOperator(markers,context);
  if (op != null) {
    this.replacement=op;
    return false;
  }
  IMethod method=IAccess.resolveMethod(context,this.instance,this.qualifiedName,this.arguments);
  if (method != null) {
    this.method=method;
    return true;
  }
  if (this.arguments.size() == 1 && this.instance != null && this.qualifiedName.endsWith("String_Node_Str")) {
    String s=this.qualifiedName.substring(0,this.qualifiedName.length() - 3);
    MethodMatch method1=this.instance.getType().resolveMethod(null,s,this.arguments);
    if (method1 != null) {
      AssignMethodCall call=new AssignMethodCall(this.position);
      call.method=method1.theMethod;
      call.instance=this.instance;
      call.arguments=this.arguments;
      call.name=this.name.substring(0,this.name.length() - 1);
      call.qualifiedName=s;
      call.dotless=this.dotless;
      this.replacement=call;
    }
  }
  return false;
}
Program: 83842
Project: 83842
Buggy source:
@Override public void writeStatement(MethodWriter writer,int varIndex,Label elseLabel){
  int locals=writer.localCount();
  this.pattern.writeJump(writer,varIndex,elseLabel);
  if (this.condition != null) {
    this.condition.writeInvJump(writer,elseLabel);
  }
  this.value.writeStatement(writer);
  writer.removeLocals(writer.localCount() - locals);
}

Fixed version (ground truth):
@Override public void writeStatement(MethodWriter writer,int varIndex,Label elseLabel){
  int locals=writer.localCount();
  this.pattern.writeJump(writer,varIndex,elseLabel);
  if (this.condition != null) {
    this.condition.writeInvJump(writer,elseLabel);
  }
  this.value.writeStatement(writer);
  writer.resetLocals(locals);
}
Program: 83843
Project: 83843
Buggy source:
@Override public void writeStatement(MethodWriter writer){
  IType type=this.value.getType();
  int var=writer.registerLocal(type);
  this.value.writeExpression(writer);
  writer.writeVarInsn(type.getStoreOpcode(),var);
  Label elseLabel=new Label();
  Label endLabel=new Label();
  for (int i=0; i < this.caseCount; ) {
    this.cases[i].writeStatement(writer,var,elseLabel);
    writer.writeJumpInsn(Opcodes.GOTO,endLabel);
    writer.writeFrameLabel(elseLabel);
    if (++i < this.caseCount) {
      elseLabel=new Label();
    }
  }
  writer.writeFrameLabel(elseLabel);
  this.writeError(writer,type,type.getLoadOpcode(),var);
  writer.removeLocals(1);
  writer.writeFrameLabel(endLabel);
}

Fixed version (ground truth):
@Override public void writeStatement(MethodWriter writer){
  int locals=writer.localCount();
  IType type=this.value.getType();
  int var=writer.registerLocal(type);
  this.value.writeExpression(writer);
  writer.writeVarInsn(type.getStoreOpcode(),var);
  Label elseLabel=new Label();
  Label endLabel=new Label();
  for (int i=0; i < this.caseCount; ) {
    this.cases[i].writeStatement(writer,var,elseLabel);
    writer.writeJumpInsn(Opcodes.GOTO,endLabel);
    writer.writeFrameLabel(elseLabel);
    if (++i < this.caseCount) {
      elseLabel=new Label();
    }
  }
  writer.writeFrameLabel(elseLabel);
  this.writeError(writer,type,type.getLoadOpcode(),var);
  writer.resetLocals(locals);
  writer.writeFrameLabel(endLabel);
}
Program: 83844
Project: 83844
Buggy source:
@Override public IValue resolve(MarkerList markers,IContext context){
  IType type=this.value.getType();
  this.value=this.value.resolve(markers,context);
  for (int i=0; i < this.caseCount; i++) {
    ICase c=this.cases[i];
    if (this.exhaustive) {
      markers.add(c.getPosition(),"String_Node_Str");
    }
    IPattern pattern=c.getPattern();
    if (pattern.getPatternType() == IPattern.WILDCARD) {
      if (c.getCondition() == null) {
        this.exhaustive=true;
      }
    }
 else     if (!pattern.isType(type)) {
      Marker marker=markers.create(pattern.getPosition(),"String_Node_Str");
      marker.addInfo("String_Node_Str" + pattern.getType());
      marker.addInfo("String_Node_Str" + type);
    }
    this.cases[i]=c.resolve(markers,context);
  }
  if (type == Type.BOOLEAN && this.caseCount >= 2) {
    this.exhaustive=true;
  }
  return this;
}

Fixed version (ground truth):
@Override public IValue resolve(MarkerList markers,IContext context){
  IType type=this.value.getType();
  this.value=this.value.resolve(markers,context);
  for (int i=0; i < this.caseCount; i++) {
    this.cases[i]=this.cases[i].resolve(markers,context);
  }
  if (type == Type.BOOLEAN && this.caseCount >= 2) {
    this.exhaustive=true;
  }
  return this;
}
Program: 83845
Project: 83845
Buggy source:
@Override public void writeExpression(MethodWriter writer){
  IType type=this.value.getType();
  int var=writer.registerLocal(type);
  this.value.writeExpression(writer);
  writer.writeVarInsn(type.getStoreOpcode(),var);
  Label elseLabel=new Label();
  Label endLabel=new Label();
  for (int i=0; i < this.caseCount; ) {
    this.cases[i].writeExpression(writer,var,elseLabel);
    writer.writeJumpInsn(Opcodes.GOTO,endLabel);
    writer.writeFrameLabel(elseLabel);
    if (++i < this.caseCount) {
      elseLabel=new Label();
    }
  }
  writer.writeFrameLabel(elseLabel);
  this.writeError(writer,type,type.getLoadOpcode(),var);
  writer.removeLocals(1);
  writer.writeFrameLabel(endLabel);
}

Fixed version (ground truth):
@Override public void writeExpression(MethodWriter writer){
  int locals=writer.localCount();
  IType type=this.value.getType();
  int var=writer.registerLocal(type);
  this.value.writeExpression(writer);
  writer.writeVarInsn(type.getStoreOpcode(),var);
  Label elseLabel=new Label();
  Label endLabel=new Label();
  for (int i=0; i < this.caseCount; ) {
    this.cases[i].writeExpression(writer,var,elseLabel);
    writer.writeJumpInsn(Opcodes.GOTO,endLabel);
    writer.writeFrameLabel(elseLabel);
    if (++i < this.caseCount) {
      elseLabel=new Label();
    }
  }
  writer.writeFrameLabel(elseLabel);
  this.writeError(writer,type,type.getLoadOpcode(),var);
  writer.resetLocals(locals);
  writer.writeFrameLabel(endLabel);
}
Program: 83846
Project: 83846
Buggy source:
@Override public void checkTypes(MarkerList markers,IContext context){
  this.value.checkTypes(markers,context);
  for (int i=0; i < this.caseCount; i++) {
    this.cases[i].checkTypes(markers,context);
  }
}

Fixed version (ground truth):
@Override public void checkTypes(MarkerList markers,IContext context){
  this.value.checkTypes(markers,context);
  for (int i=0; i < this.caseCount; i++) {
    ICase c=this.cases[i];
    if (this.exhaustive) {
      markers.add(c.getPosition(),"String_Node_Str");
    }
    IPattern pattern=c.getPattern();
    if (pattern.getPatternType() == IPattern.WILDCARD) {
      if (c.getCondition() == null) {
        this.exhaustive=true;
      }
    }
 else     if (!pattern.isType(type)) {
      Marker marker=markers.create(pattern.getPosition(),"String_Node_Str");
      marker.addInfo("String_Node_Str" + pattern.getType());
      marker.addInfo("String_Node_Str" + type);
    }
    this.cases[i].checkTypes(markers,context);
  }
}
Program: 83848
Project: 83848
Buggy source:
@Override public void writeStatement(MethodWriter writer){
  org.objectweb.asm.Label start=new org.objectweb.asm.Label();
  org.objectweb.asm.Label end=new org.objectweb.asm.Label();
  writer.writeLabel(start);
  int count=0;
  for (  Entry<String,Variable> entry : this.variables.entrySet()) {
    Variable var=entry.getValue();
    var.index=writer.registerLocal(var.type);
    count++;
  }
  for (int i=0; i < this.valueCount; i++) {
    IValue v=this.values[i];
    if (this.labels != null) {
      Label l=this.labels[i];
      if (l != null) {
        writer.writeFrameLabel(l.target);
      }
    }
    v.writeStatement(writer);
  }
  if (count > 0 && (this.parent != null || !(this.context instanceof IMethod))) {
    writer.removeLocals(count);
    writer.writeFrameLabel(end);
  }
 else {
    writer.writeLabel(end);
  }
  for (  Entry<String,Variable> entry : this.variables.entrySet()) {
    Variable var=entry.getValue();
    writer.writeLocal(var.qualifiedName,var.type.getExtendedName(),var.type.getSignature(),start,end,var.index);
  }
}

Fixed version (ground truth):
@Override public void writeStatement(MethodWriter writer){
  org.objectweb.asm.Label start=new org.objectweb.asm.Label();
  org.objectweb.asm.Label end=new org.objectweb.asm.Label();
  writer.writeLabel(start);
  int count=writer.localCount();
  for (int i=0; i < this.valueCount; i++) {
    IValue v=this.values[i];
    if (this.labels != null) {
      Label l=this.labels[i];
      if (l != null) {
        writer.writeFrameLabel(l.target);
      }
    }
    v.writeStatement(writer);
  }
  writer.resetLocals(count);
  writer.writeLabel(end);
  for (  Entry<String,Variable> entry : this.variables.entrySet()) {
    Variable var=entry.getValue();
    writer.writeLocal(var.qualifiedName,var.type.getExtendedName(),var.type.getSignature(),start,end,var.index);
  }
}
Program: 83849
Project: 83849
Buggy source:
@Override public int registerLocal(Object type){
  int index=this.localIndex;
  if (type == LONG || type == DOUBLE) {
    this.ensureLocals(index + 2);
    this.locals[index]=type;
    this.locals[index + 1]=type;
    this.localIndex+=2;
  }
 else {
    this.ensureLocals(index + 1);
    this.locals[index]=type;
    this.localIndex++;
  }
  return index;
}

Fixed version (ground truth):
@Override public int registerLocal(Object type){
  int index=this.localIndex;
  if (type == LONG || type == DOUBLE) {
    this.ensureLocals(index + 2);
    this.locals[index]=type;
    this.locals[index + 1]=TOP;
    this.localIndex+=2;
  }
 else {
    this.ensureLocals(index + 1);
    this.locals[index]=type;
    this.localIndex++;
  }
  return index;
}
Program: 83850
Project: 83850
Buggy source:
@Override public void removeLocals(int count){
  for (int i=0; i < count; i++) {
    this.localCount--;
    Object o=this.locals[--this.localIndex];
    if (o == LONG || o == DOUBLE) {
      this.localIndex--;
    }
  }
}

Fixed version (ground truth):
@Override public void removeLocals(int count){
  this.localCount-=count;
  this.localIndex-=count;
}
Program: 83851
Project: 83851
Buggy source:
@Override public void parse(IParserManager pm,IToken token) throws SyntaxError {
  int type=token.type();
  if (ParserUtil.isCloseBracket(type)) {
    pm.popParser(true);
    return;
  }
  if (this.mode == 0) {
    if (token.next().type() == Tokens.COLON) {
      this.label=token.value();
      pm.skip();
      return;
    }
    this.mode=1;
    pm.pushParser(new ExpressionParser(this),true);
    return;
  }
  if (this.mode == 1) {
    if (type == Tokens.COMMA) {
      this.valueList.setArray(true);
      this.mode=0;
      return;
    }
    if (type == Tokens.SEMICOLON) {
      this.mode=0;
      return;
    }
    if (token.prev().type() == Tokens.CLOSE_CURLY_BRACKET) {
      pm.pushParser(new ExpressionParser(this),true);
      return;
    }
    throw new SyntaxError(token,"String_Node_Str" + token.value() + "String_Node_Str");
  }
}

Fixed version (ground truth):
@Override public void parse(IParserManager pm,IToken token) throws SyntaxError {
  int type=token.type();
  if (ParserUtil.isCloseBracket(type)) {
    pm.popParser(true);
    return;
  }
  if (this.mode == 0) {
    if (token.next().type() == Tokens.COLON) {
      this.label=token.value();
      pm.skip();
      return;
    }
    this.mode=1;
    pm.pushParser(new ExpressionParser(this),true);
    return;
  }
  if (this.mode == 1) {
    if (type == Tokens.COMMA) {
      this.valueList.setArray(true);
      this.mode=0;
      return;
    }
    if (type == Tokens.SEMICOLON) {
      this.mode=0;
      return;
    }
    if (token.prev().type() == Tokens.CLOSE_CURLY_BRACKET) {
      pm.pushParser(new ExpressionParser(this),true);
      return;
    }
    throw new SyntaxError(token,"String_Node_Str");
  }
}
Program: 83852
Project: 83852
Buggy source:
@Override public void parse(IParserManager pm,IToken token) throws SyntaxError {
  if (this.mode == -1) {
    pm.popParser(true);
    return;
  }
  int type=token.type();
  if (this.mode == IF) {
    this.mode=CONDITION_END;
    pm.pushParser(new ExpressionParser(this));
    if (type == Tokens.OPEN_PARENTHESIS) {
      return;
    }
    throw new SyntaxError(token,"String_Node_Str",true);
  }
  if (this.mode == CONDITION_END) {
    this.mode=THEN;
    if (type == Tokens.CLOSE_PARENTHESIS) {
      return;
    }
    throw new SyntaxError(token,"String_Node_Str",true);
  }
  if (ParserUtil.isTerminator(type)) {
    if (!token.isInferred()) {
      pm.popParser(true);
    }
    return;
  }
  if (this.mode == THEN) {
    pm.pushParser(new ExpressionParser(this),true);
    this.mode=ELSE;
    return;
  }
  if (this.mode == ELSE) {
    if (type == Tokens.ELSE) {
      pm.pushParser(new ExpressionParser(this));
      this.mode=-1;
      return;
    }
    pm.popParser(true);
  }
}

Fixed version (ground truth):
@Override public void parse(IParserManager pm,IToken token) throws SyntaxError {
  if (this.mode == -1) {
    pm.popParser(true);
    return;
  }
  int type=token.type();
  if (this.mode == IF) {
    this.mode=CONDITION_END;
    pm.pushParser(new ExpressionParser(this));
    if (type == Tokens.OPEN_PARENTHESIS) {
      return;
    }
    throw new SyntaxError(token,"String_Node_Str",true);
  }
  if (this.mode == CONDITION_END) {
    this.mode=THEN;
    if (type == Tokens.CLOSE_PARENTHESIS) {
      return;
    }
    throw new SyntaxError(token,"String_Node_Str",true);
  }
  if (ParserUtil.isTerminator(type)) {
    if (!token.isInferred()) {
      pm.popParser(true);
    }
    return;
  }
  if (this.mode == THEN) {
    pm.pushParser(new ExpressionParser(this),true);
    this.mode=ELSE;
    return;
  }
  if (this.mode == ELSE) {
    if (type == Tokens.ELSE) {
      pm.pushParser(new ExpressionParser(this));
      this.mode=-1;
      return;
    }
    pm.popParser(true);
    return;
  }
}