Program: 81877
Project: 81877
Buggy source:
/** 
 * Generate a Java string for a given MessageFormat string.
 * @param logger
 * @param template
 * @param paramsAccessor
 * @param writer
 * @throws UnableToCompleteException
 */
private void generateString(final TreeLogger logger,final GwtLocale locale,final String template,final Parameters paramsAccessor,SourceWriter writer,final boolean isSafeHtml) throws UnableToCompleteException {
  StringBuffer outputBuf=new StringBuffer();
  final StringGenerator buf=new StringGenerator(outputBuf,isSafeHtml);
  final int n=paramsAccessor.getCount();
  try {
    for (    TemplateChunk chunk : MessageFormatParser.parse(template)) {
      chunk.accept(new DefaultTemplateChunkVisitor(){
        @Override public void visit(        ArgumentChunk argChunk) throws UnableToCompleteException {
          int argNumber=argChunk.getArgumentNumber();
          if (argNumber >= n) {
            throw error(logger,"String_Node_Str" + argNumber + "String_Node_Str"+ template);
          }
          JParameter param=paramsAccessor.getParameter(argNumber);
          String arg="String_Node_Str" + argNumber;
          if (argChunk.isList()) {
            buf.appendExpression(arg + "String_Node_Str",isSafeHtml,false,false);
          }
 else {
            JType paramType=param.getType();
            formatArg(logger,locale,buf,argChunk,paramsAccessor.getParameterExpression(argNumber),paramType,paramsAccessor);
          }
        }
        @Override public void visit(        StaticArgChunk staticArgChunk) throws UnableToCompleteException {
          buf.appendStringLiteral(staticArgChunk.getReplacement());
        }
        @Override public void visit(        StringChunk stringChunk){
          buf.appendStringLiteral(stringChunk.getString());
        }
      }
);
    }
  }
 catch (  ParseException e) {
    throw error(logger,e);
  }
  buf.completeString();
  writer.print(outputBuf.toString());
}

Fixed version (ground truth):
/** 
 * Generate a Java string for a given MessageFormat string.
 * @param logger
 * @param template
 * @param paramsAccessor
 * @param writer
 * @throws UnableToCompleteException
 */
private void generateString(final TreeLogger logger,final GwtLocale locale,final String template,final Parameters paramsAccessor,SourceWriter writer,final boolean isSafeHtml) throws UnableToCompleteException {
  StringBuffer outputBuf=new StringBuffer();
  final StringGenerator buf=new StringGenerator(outputBuf,isSafeHtml);
  final int n=paramsAccessor.getCount();
  try {
    for (    TemplateChunk chunk : MessageFormatParser.parse(template)) {
      chunk.accept(new DefaultTemplateChunkVisitor(){
        @Override public void visit(        ArgumentChunk argChunk) throws UnableToCompleteException {
          int argNumber=argChunk.getArgumentNumber();
          if (argNumber >= n) {
            throw error(logger,"String_Node_Str" + argNumber + "String_Node_Str"+ template);
          }
          JParameter param=paramsAccessor.getParameter(argNumber);
          String arg="String_Node_Str" + argNumber;
          if (argChunk.isList()) {
            buf.appendExpression(arg + "String_Node_Str",isSafeHtml,false,false);
          }
 else {
            JType paramType=param.getType();
            formatArg(logger,locale,buf,argChunk,paramsAccessor.getParameterExpression(argNumber),paramType,paramsAccessor);
          }
        }
        @Override public void visit(        StaticArgChunk staticArgChunk){
          buf.appendStringLiteral(staticArgChunk.getReplacement());
        }
        @Override public void visit(        StringChunk stringChunk){
          buf.appendStringLiteral(stringChunk.getString());
        }
      }
);
    }
  }
 catch (  ParseException e) {
    throw error(logger,e);
  }
  buf.completeString();
  writer.print(outputBuf.toString());
}