Program: 153635
Project: 153635
Buggy source:
/** 
 * Opens a function.
 * @param anonymous Are we anonymous?
 */
private void openFunction(final boolean anonymous,final boolean alternate){
  if (anonymous)   this.addScope(new Scope(this.scope,ScopeType.BORDER));
  this.addScope(new Scope(this.scope,this.tokenizer.reserved == ReservedWord.SUB ? ScopeType.SUB : ScopeType.FUNC));
  this.block=this.scope.block=new CodeBlock();
  this.block.isAnonymousFunction=anonymous;
  final WeelFunction func=this.block.function=new WeelFunction();
  func.returnsValue=this.tokenizer.reserved == ReservedWord.FUNC;
  this.tokenizer.next();
  if (!anonymous) {
    this.checkToken(Token.NAME);
    func.name=this.tokenizer.string;
    this.tokenizer.next();
    if (this.tokenizer.token == Token.DOT || this.tokenizer.token == Token.COLON) {
      this.scope.isOop=this.tokenizer.token == Token.COLON;
      this.scope.oopVariable=this.scope.parent.findVariable(new Variable(),func.name);
      this.needGetVariable(this.scope.oopVariable);
      this.tokenizer.next();
      this.checkToken(Token.NAME);
      func.name+=(this.scope.isOop ? "String_Node_Str" : "String_Node_Str") + (this.scope.oopIndex=this.tokenizer.string);
      this.tokenizer.next();
    }
  }
 else {
    func.name="String_Node_Str";
  }
  int paramc=0;
  if (this.scope.isOop) {
    this.scope.addLocal("String_Node_Str");
    paramc++;
  }
  if ((alternate && this.tokenizer.token == Token.BRACE_OPEN) || !alternate) {
    this.checkToken(Token.BRACE_OPEN);
    this.tokenizer.next();
    while (this.tokenizer.token != Token.BRACE_CLOSE) {
      paramc++;
      this.checkToken(Token.NAME);
      this.scope.addLocal(this.tokenizer.string);
      this.tokenizer.next();
      if (this.tokenizer.token == Token.COMMA) {
        this.tokenizer.next();
        continue;
      }
      if (this.tokenizer.token != Token.BRACE_CLOSE) {
        this.syntaxError();
      }
    }
    this.tokenizer.next();
  }
  func.arguments=paramc;
  if (this.weel.findFunction(func.name,func.arguments) != null) {
    throw new WeelException(this.tokenizer.error("String_Node_Str" + func));
  }
  func.clazz=this.classWriter.className;
  func.javaName=anonymous ? "String_Node_Str" + anonCounter++ : "String_Node_Str" + func.name + "String_Node_Str"+ func.arguments;
  this.block.setMethodWriter(this.classWriter.createMethod(func.javaName,"String_Node_Str"));
  this.weel.addFunction(func.name + "String_Node_Str" + func.arguments,func,!anonymous);
  this.block.isAlternateSyntax=alternate;
}

Fixed version (ground truth):
/** 
 * Opens a function.
 * @param anonymous Are we anonymous?
 */
private void openFunction(final boolean anonymous,final boolean alternate){
  if (anonymous)   this.addScope(new Scope(this.scope,ScopeType.BORDER));
  this.addScope(new Scope(this.scope,this.tokenizer.reserved == ReservedWord.SUB ? ScopeType.SUB : ScopeType.FUNC));
  this.block=this.scope.block=new CodeBlock();
  this.block.isAnonymousFunction=anonymous;
  final WeelFunction func=this.block.function=new WeelFunction();
  func.returnsValue=this.tokenizer.reserved == ReservedWord.FUNC;
  this.tokenizer.next();
  if (!anonymous) {
    this.checkToken(Token.NAME);
    func.name=this.tokenizer.string;
    this.tokenizer.next();
    if (this.tokenizer.token == Token.DOT || this.tokenizer.token == Token.COLON) {
      this.scope.isOop=this.tokenizer.token == Token.COLON;
      this.scope.oopVariable=this.scope.parent.findVariable(new Variable(),func.name);
      this.needGetVariable(this.scope.oopVariable);
      this.tokenizer.next();
      this.checkToken(Token.NAME);
      func.name+=(this.scope.isOop ? "String_Node_Str" : "String_Node_Str") + (this.scope.oopIndex=this.tokenizer.string);
      this.tokenizer.next();
    }
  }
 else {
    func.name="String_Node_Str";
  }
  int paramc=0;
  if (this.scope.isOop) {
    this.scope.addLocal("String_Node_Str");
    paramc++;
  }
  if ((alternate && this.tokenizer.token == Token.BRACE_OPEN) || !alternate) {
    this.checkToken(Token.BRACE_OPEN);
    this.tokenizer.next();
    while (this.tokenizer.token != Token.BRACE_CLOSE) {
      paramc++;
      this.checkToken(Token.NAME);
      this.scope.addLocal(this.tokenizer.string);
      this.tokenizer.next();
      if (this.tokenizer.token == Token.COMMA) {
        this.tokenizer.next();
        continue;
      }
      if (this.tokenizer.token != Token.BRACE_CLOSE) {
        this.syntaxError();
      }
    }
    this.tokenizer.next();
  }
  func.arguments=paramc;
  if (this.weel.findFunction(func.name,func.arguments) != null) {
    throw new WeelException(this.tokenizer.error("String_Node_Str" + func));
  }
  func.clazz=this.classWriter.className;
  func.javaName=anonymous ? "String_Node_Str" + Weel.anonCounter.incrementAndGet() : func.name + "String_Node_Str" + func.arguments;
  this.block.setMethodWriter(this.classWriter.createMethod(func.javaName,"String_Node_Str"));
  this.weel.addFunction(func.name + "String_Node_Str" + func.arguments,func,!anonymous);
  this.block.isAlternateSyntax=alternate;
}