Program: 81591
Project: 81591
Buggy source:
public String toJavaCode(){
  String code="String_Node_Str";
  if (extended_for != null) {
    code+=extended_for.type.name + "String_Node_Str";
    code+=extended_for.name + "String_Node_Str";
    try {
      SymbolTable.addVariableType(extended_for.name,extended_for.type.name,false,false);
    }
 catch (    VariableDeclarationException vde) {
      CompilerErrors.printErrorMessage("String_Node_Str" + vde.toString(),extended_for);
    }
catch (    SalsaNotFoundException snfe) {
      CompilerErrors.printErrorMessage("String_Node_Str" + snfe.toString(),extended_for);
    }
    if (extended_for.expression.isToken()) {
      CompilerErrors.printErrorMessage("String_Node_Str",extended_for);
    }
 else {
      code+=extended_for.expression.toJavaCode();
    }
    code+="String_Node_Str";
    SymbolTable.openScope();
  }
 else {
    if (init.isToken()) {
      CompilerErrors.printErrorMessage("String_Node_Str",init);
    }
    SymbolTable.openScope();
    if (init != null) {
      code+=init.toJavaCode();
    }
 else {
      code+="String_Node_Str";
    }
    if (conditional.isToken()) {
      CompilerErrors.printErrorMessage("String_Node_Str",conditional);
    }
    code+="String_Node_Str" + conditional.toJavaCode() + "String_Node_Str";
    for (    CExpression expression : increment_expressions) {
      if (expression.isToken()) {
        CompilerErrors.printErrorMessage("String_Node_Str",expression);
      }
    }
    for (int i=0; i < increment_expressions.size(); i++) {
      code+=increment_expressions.get(i).toJavaCode();
      if (i != increment_expressions.size() - 1)       code+="String_Node_Str";
    }
    code+="String_Node_Str";
  }
  code+=statement.toJavaCode();
  SymbolTable.closeScope();
  return code;
}

Fixed version (ground truth):
public String toJavaCode(){
  String code="String_Node_Str";
  if (extended_for != null) {
    code+=extended_for.type.name + "String_Node_Str";
    code+=extended_for.name + "String_Node_Str";
    try {
      SymbolTable.addVariableType(extended_for.name,extended_for.type.name,false,false);
    }
 catch (    VariableDeclarationException vde) {
      CompilerErrors.printErrorMessage("String_Node_Str" + vde.toString(),extended_for);
    }
catch (    SalsaNotFoundException snfe) {
      CompilerErrors.printErrorMessage("String_Node_Str" + snfe.toString(),extended_for);
    }
    if (extended_for.expression.isToken()) {
      CompilerErrors.printErrorMessage("String_Node_Str",extended_for);
    }
 else {
      code+=extended_for.expression.toJavaCode();
    }
    code+="String_Node_Str";
    SymbolTable.openScope();
  }
 else {
    if (init.isToken()) {
      CompilerErrors.printErrorMessage("String_Node_Str",init);
    }
    SymbolTable.openScope();
    if (init != null) {
      code+=init.toJavaCode();
    }
 else {
      code+="String_Node_Str";
    }
    if (conditional.isToken()) {
      CompilerErrors.printErrorMessage("String_Node_Str",conditional);
    }
    code+="String_Node_Str" + conditional.toJavaCode() + "String_Node_Str";
    for (    CExpression expression : increment_expressions) {
      if (expression.isToken()) {
        CompilerErrors.printErrorMessage("String_Node_Str",expression);
      }
    }
    for (int i=0; i < increment_expressions.size(); i++) {
      code+=increment_expressions.get(i).toJavaCode();
      if (i != increment_expressions.size() - 1)       code+="String_Node_Str";
    }
    code+="String_Node_Str";
  }
  code+=statement.toJavaCode();
  if (!(statement instanceof CBlock))   code+="String_Node_Str";
  SymbolTable.closeScope();
  return code;
}