Program: 37289
Project: 37289
Buggy source:
/** 
 * Get the context for the next round of processing. Important values are propogated from round to round; other values are implicitly reset.
 */
private Context nextContext(){
  Context next=new Context();
  Options options=Options.instance(context);
  Assert.checkNonNull(options);
  next.put(Options.optionsKey,options);
  PrintWriter out=context.get(Log.outKey);
  Assert.checkNonNull(out);
  next.put(Log.outKey,out);
  final boolean shareNames=true;
  if (shareNames) {
    Names names=Names.instance(context);
    Assert.checkNonNull(names);
    next.put(Names.namesKey,names);
  }
  DiagnosticListener<?> dl=context.get(DiagnosticListener.class);
  if (dl != null)   next.put(DiagnosticListener.class,dl);
  TaskListener tl=context.get(TaskListener.class);
  if (tl != null)   next.put(TaskListener.class,tl);
  FSInfo fsInfo=context.get(FSInfo.class);
  if (fsInfo != null)   next.put(FSInfo.class,fsInfo);
  JavaFileManager jfm=context.get(JavaFileManager.class);
  Assert.checkNonNull(jfm);
  next.put(JavaFileManager.class,jfm);
  if (jfm instanceof JavacFileManager) {
    ((JavacFileManager)jfm).setContext(next);
  }
  Names names=Names.instance(context);
  Assert.checkNonNull(names);
  next.put(Names.namesKey,names);
  Keywords keywords=Keywords.instance(context);
  Assert.checkNonNull(keywords);
  next.put(Keywords.keywordsKey,keywords);
  JavaCompiler oldCompiler=JavaCompiler.instance(context);
  JavaCompiler nextCompiler=JavaCompiler.instance(next);
  nextCompiler.initRound(oldCompiler);
  filer.newRound(next);
  messager.newRound(next);
  elementUtils.setContext(next);
  typeUtils.setContext(next);
  JavacTaskImpl task=context.get(JavacTaskImpl.class);
  if (task != null) {
    next.put(JavacTaskImpl.class,task);
    task.updateContext(next);
  }
  JavacTrees trees=context.get(JavacTrees.class);
  if (trees != null) {
    next.put(JavacTrees.class,trees);
    trees.updateContext(next);
  }
  context.clear();
  return next;
}

Fixed version (ground truth):
/** 
 * Get the context for the next round of processing. Important values are propogated from round to round; other values are implicitly reset.
 */
private Context nextContext(){
  Context next=new Context(context);
  Options options=Options.instance(context);
  Assert.checkNonNull(options);
  next.put(Options.optionsKey,options);
  PrintWriter out=context.get(Log.outKey);
  Assert.checkNonNull(out);
  next.put(Log.outKey,out);
  final boolean shareNames=true;
  if (shareNames) {
    Names names=Names.instance(context);
    Assert.checkNonNull(names);
    next.put(Names.namesKey,names);
  }
  DiagnosticListener<?> dl=context.get(DiagnosticListener.class);
  if (dl != null)   next.put(DiagnosticListener.class,dl);
  TaskListener tl=context.get(TaskListener.class);
  if (tl != null)   next.put(TaskListener.class,tl);
  FSInfo fsInfo=context.get(FSInfo.class);
  if (fsInfo != null)   next.put(FSInfo.class,fsInfo);
  JavaFileManager jfm=context.get(JavaFileManager.class);
  Assert.checkNonNull(jfm);
  next.put(JavaFileManager.class,jfm);
  if (jfm instanceof JavacFileManager) {
    ((JavacFileManager)jfm).setContext(next);
  }
  Names names=Names.instance(context);
  Assert.checkNonNull(names);
  next.put(Names.namesKey,names);
  Keywords keywords=Keywords.instance(context);
  Assert.checkNonNull(keywords);
  next.put(Keywords.keywordsKey,keywords);
  JavaCompiler oldCompiler=JavaCompiler.instance(context);
  JavaCompiler nextCompiler=JavaCompiler.instance(next);
  nextCompiler.initRound(oldCompiler);
  filer.newRound(next);
  messager.newRound(next);
  elementUtils.setContext(next);
  typeUtils.setContext(next);
  JavacTaskImpl task=context.get(JavacTaskImpl.class);
  if (task != null) {
    next.put(JavacTaskImpl.class,task);
    task.updateContext(next);
  }
  JavacTrees trees=context.get(JavacTrees.class);
  if (trees != null) {
    next.put(JavacTrees.class,trees);
    trees.updateContext(next);
  }
  context.clear();
  return next;
}