Program: 130519
Project: 130519
Buggy source:
@NotNull @Override public List<CompilerCheckResult> check(@NotNull CSharpLanguageVersion languageVersion,@NotNull CSharpBlockStatementImpl element){
  PsiElement parent=element.getParent();
  if (!(parent instanceof DotNetModifierListOwner)) {
    return Collections.emptyList();
  }
  val results=new ArrayList<CompilerCheckResult>();
  val names=new THashSet<String>();
  parent.accept(new CSharpRecursiveElementVisitor(){
    @Override public void visitLocalVariable(    CSharpLocalVariable variable){
      String name=variable.getName();
      if (names.contains(name)) {
        results.add(result(variable.getNameIdentifier(),name));
      }
 else {
        names.add(name);
      }
      DotNetExpression initializer=variable.getInitializer();
      if (initializer != null) {
        initializer.accept(this);
      }
    }
    @Override public void visitForeachStatement(    CSharpForeachStatementImpl statement){
      visitAndRollback(statement);
    }
    @Override public void visitForStatement(    CSharpForStatementImpl statement){
      visitAndRollback(statement);
    }
    @Override public void visitParameter(    DotNetParameter parameter){
      String name=parameter.getName();
      names.add(name);
    }
    @Override public void visitLambdaParameter(    CSharpLambdaParameterImpl parameter){
      String name=parameter.getName();
      if (names.contains(name)) {
        results.add(resultImpl(CS0136.class,parameter.getNameIdentifier(),name,name));
      }
 else {
        names.add(name);
      }
    }
    private void visitAndRollback(    PsiElement e){
      Set<String> oldSet=new HashSet<String>(names);
      visitElement(e);
      names.clear();
      names.addAll(oldSet);
    }
  }
);
  return results;
}

Fixed version (ground truth):
@NotNull @Override public List<CompilerCheckResult> check(@NotNull CSharpLanguageVersion languageVersion,@NotNull CSharpBlockStatementImpl element){
  PsiElement parent=element.getParent();
  if (!(parent instanceof DotNetModifierListOwner)) {
    return Collections.emptyList();
  }
  val results=new ArrayList<CompilerCheckResult>();
  val names=new THashSet<String>();
  parent.accept(new CSharpRecursiveElementVisitor(){
    @Override public void visitLocalVariable(    CSharpLocalVariable variable){
      String name=variable.getName();
      if (names.contains(name)) {
        results.add(result(variable.getNameIdentifier(),name));
      }
 else {
        names.add(name);
      }
      DotNetExpression initializer=variable.getInitializer();
      if (initializer != null) {
        initializer.accept(this);
      }
    }
    @Override public void visitCatchStatement(    CSharpCatchStatementImpl statement){
      visitAndRollback(statement);
    }
    @Override public void visitIfStatement(    CSharpIfStatementImpl statement){
      visitAndRollback(statement);
    }
    @Override public void visitTryStatement(    CSharpTryStatementImpl statement){
      visitAndRollback(statement);
    }
    @Override public void visitForeachStatement(    CSharpForeachStatementImpl statement){
      visitAndRollback(statement);
    }
    @Override public void visitForStatement(    CSharpForStatementImpl statement){
      visitAndRollback(statement);
    }
    @Override public void visitParameter(    DotNetParameter parameter){
      String name=parameter.getName();
      names.add(name);
    }
    @Override public void visitLambdaParameter(    CSharpLambdaParameterImpl parameter){
      String name=parameter.getName();
      if (names.contains(name)) {
        results.add(resultImpl(CS0136.class,parameter.getNameIdentifier(),name,name));
      }
 else {
        names.add(name);
      }
    }
    private void visitAndRollback(    PsiElement e){
      Set<String> oldSet=new HashSet<String>(names);
      visitElement(e);
      names.clear();
      names.addAll(oldSet);
    }
  }
);
  return results;
}