Program: 17016
Project: 17016
Buggy source:
@Override protected MtdInvocationExpr doTranslate(MessageSend astMsgSend){
  String methodNameStr=null;
  if (astMsgSend.getSelector() == null) {
    IExpression astReceiver=astMsgSend.getReceiver();
    BaseAst2JstTranslator translator=getTranslator(astReceiver);
    IExpr mtdIdentifier=(IExpr)translator.translate(astReceiver);
    if (mtdIdentifier instanceof JstIdentifier) {
      jstInvocation=new MtdInvocationExpr(mtdIdentifier);
    }
 else {
      jstInvocation=new MtdInvocationExpr(new JstProxyIdentifier(mtdIdentifier));
    }
  }
 else {
    methodNameStr=new String(astMsgSend.getSelector());
    jstInvocation=new MtdInvocationExpr(methodNameStr);
  }
  try {
    m_ctx.enterBlock(ScopeIds.METHOD_CALL);
    IExpression[] args=astMsgSend.getArguments();
    if (args != null) {
      int prev=0;
      int next=0;
      int len=args.length;
      for (int i=0; i < len; i++) {
        if (i == 0) {
          IExpression rec=astMsgSend.getReceiver();
          prev=(rec != null) ? rec.sourceStart() : astMsgSend.sourceStart();
        }
 else {
          prev=args[i - 1].sourceEnd();
        }
        if (i + 1 < len) {
          next=args[i + 1].sourceStart();
        }
 else {
          next=astMsgSend.statementEnd;
        }
        IExpression argExpression=args[i];
        BaseAst2JstTranslator translator;
        translator=getTranslator(argExpression);
        Object stmt=translator.translate(argExpression);
        if (stmt instanceof IExpr) {
          List<IJsCommentMeta> metaList=null;
          IExpr jstArg=null;
          if (stmt instanceof BaseJstNode) {
            metaList=TranslateHelper.findMetaFromExpr((BaseJstNode)stmt);
          }
          if (metaList != null) {
            jstArg=TranslateHelper.getCastable((IExpr)stmt,metaList,m_ctx);
          }
 else {
            jstArg=TranslateHelper.getCastable((IExpr)stmt,argExpression,prev,next,m_ctx);
          }
          jstInvocation.addArg(jstArg);
        }
 else         if (stmt instanceof JstMethod) {
          IExpr jstArg=new FuncExpr((JstMethod)stmt);
          jstArg=TranslateHelper.getCastable(jstArg,argExpression,prev,next,m_ctx);
          jstInvocation.addArg(jstArg);
        }
 else {
          if (m_ctx.getCurrentType() != null && m_ctx.getCurrentType().getName() != null) {
            String name=m_ctx.getCurrentType().getName();
            m_ctx.getErrorReporter().error("String_Node_Str" + argExpression.getClass() + "String_Node_Str"+ IExpr.class+ "String_Node_Str"+ MessageSendTranslator.class,name,0,0);
          }
        }
      }
    }
  }
  finally {
    m_ctx.exitBlock();
  }
  int sourceStart=astMsgSend.sourceStart;
  IExpression astReceiver=astMsgSend.getReceiver();
  if (astReceiver != null) {
    sourceStart=calculateSourceStart(astMsgSend,astReceiver,astMsgSend.getSelector());
  }
  if (methodNameStr != null) {
    if (astReceiver != null) {
      BaseAst2JstTranslator translator=getTranslator(astReceiver);
      IExpr jstQualifier=(IExpr)translator.translate(astReceiver);
      jstInvocation.setQualifyExpr(jstQualifier);
    }
    JstSource nameSource=TranslateHelper.getMethodSource(m_ctx.getOriginalSource(),m_ctx.getSourceUtil(),sourceStart,astMsgSend.sourceEnd,methodNameStr.length());
    ((JstIdentifier)jstInvocation.getMethodIdentifier()).setSource(nameSource);
  }
  int sourceEnd=astMsgSend.statementEnd;
  if (sourceEnd == -1) {
    sourceEnd=astMsgSend.sourceEnd;
  }
  JstSource methodSource=TranslateHelper.getMethodSource(m_ctx.getOriginalSource(),m_ctx.getSourceUtil(),astMsgSend.sourceStart,sourceEnd,sourceEnd - astMsgSend.sourceStart);
  jstInvocation.setSource(methodSource);
  return jstInvocation;
}

Fixed version (ground truth):
@Override protected MtdInvocationExpr doTranslate(MessageSend astMsgSend){
  String methodNameStr=null;
  if (astMsgSend.getSelector() == null) {
    IExpression astReceiver=astMsgSend.getReceiver();
    BaseAst2JstTranslator translator=getTranslator(astReceiver);
    IExpr mtdIdentifier=(IExpr)translator.translate(astReceiver);
    if (mtdIdentifier instanceof JstIdentifier) {
      jstInvocation=new MtdInvocationExpr(mtdIdentifier);
    }
 else {
      jstInvocation=new MtdInvocationExpr(new JstProxyIdentifier(mtdIdentifier));
    }
  }
 else {
    methodNameStr=new String(astMsgSend.getSelector());
    jstInvocation=new MtdInvocationExpr(methodNameStr);
  }
  try {
    m_ctx.enterBlock(ScopeIds.METHOD_CALL);
    IExpression[] args=astMsgSend.getArguments();
    if (args != null) {
      int prev=0;
      int next=0;
      int len=args.length;
      for (int i=0; i < len; i++) {
        if (i == 0) {
          IExpression rec=astMsgSend.getReceiver();
          prev=(rec != null) ? rec.sourceStart() : astMsgSend.sourceStart();
        }
 else {
          prev=args[i - 1].sourceEnd();
        }
        if (i + 1 < len) {
          next=args[i + 1].sourceStart();
        }
 else {
          next=astMsgSend.statementEnd;
        }
        IExpression argExpression=args[i];
        BaseAst2JstTranslator translator;
        if (argExpression instanceof ObjectLiteral && (isVjoOL(methodNameStr))) {
          translator=new VjoOLTranslator(m_ctx);
        }
 else {
          translator=getTranslator(argExpression);
        }
        Object stmt=translator.translate(argExpression);
        if (stmt instanceof IExpr) {
          List<IJsCommentMeta> metaList=null;
          IExpr jstArg=null;
          if (stmt instanceof BaseJstNode) {
            metaList=TranslateHelper.findMetaFromExpr((BaseJstNode)stmt);
          }
          if (metaList != null) {
            jstArg=TranslateHelper.getCastable((IExpr)stmt,metaList,m_ctx);
          }
 else {
            jstArg=TranslateHelper.getCastable((IExpr)stmt,argExpression,prev,next,m_ctx);
          }
          jstInvocation.addArg(jstArg);
        }
 else         if (stmt instanceof JstMethod) {
          IExpr jstArg=new FuncExpr((JstMethod)stmt);
          jstArg=TranslateHelper.getCastable(jstArg,argExpression,prev,next,m_ctx);
          jstInvocation.addArg(jstArg);
        }
 else {
          if (m_ctx.getCurrentType() != null && m_ctx.getCurrentType().getName() != null) {
            String name=m_ctx.getCurrentType().getName();
            m_ctx.getErrorReporter().error("String_Node_Str" + argExpression.getClass() + "String_Node_Str"+ IExpr.class+ "String_Node_Str"+ MessageSendTranslator.class,name,0,0);
          }
        }
      }
    }
  }
  finally {
    m_ctx.exitBlock();
  }
  int sourceStart=astMsgSend.sourceStart;
  IExpression astReceiver=astMsgSend.getReceiver();
  if (astReceiver != null) {
    sourceStart=calculateSourceStart(astMsgSend,astReceiver,astMsgSend.getSelector());
  }
  if (methodNameStr != null) {
    if (astReceiver != null) {
      BaseAst2JstTranslator translator=getTranslator(astReceiver);
      IExpr jstQualifier=(IExpr)translator.translate(astReceiver);
      jstInvocation.setQualifyExpr(jstQualifier);
    }
    JstSource nameSource=TranslateHelper.getMethodSource(m_ctx.getOriginalSource(),m_ctx.getSourceUtil(),sourceStart,astMsgSend.sourceEnd,methodNameStr.length());
    ((JstIdentifier)jstInvocation.getMethodIdentifier()).setSource(nameSource);
  }
  int sourceEnd=astMsgSend.statementEnd;
  if (sourceEnd == -1) {
    sourceEnd=astMsgSend.sourceEnd;
  }
  JstSource methodSource=TranslateHelper.getMethodSource(m_ctx.getOriginalSource(),m_ctx.getSourceUtil(),astMsgSend.sourceStart,sourceEnd,sourceEnd - astMsgSend.sourceStart);
  jstInvocation.setSource(methodSource);
  return jstInvocation;
}