Program: 185870
Project: 185870
Buggy source:
protected Expression transformMethodCallExpression(MethodCallExpression mce){
  Expression args=transform(mce.getArguments());
  Expression method=transform(mce.getMethod());
  Expression object=transform(mce.getObjectExpression());
  boolean isExplicitThisOrSuper=false;
  if (object instanceof VariableExpression) {
    VariableExpression ve=(VariableExpression)object;
    isExplicitThisOrSuper=!mce.isImplicitThis() && (ve.getName().equals("String_Node_Str") || ve.getName().equals("String_Node_Str"));
  }
  if (mce.isImplicitThis() || isExplicitThisOrSuper) {
    if (mce.isImplicitThis()) {
      Expression ret=findStaticMethodImportFromModule(method,args);
      if (ret != null) {
        if (!((StaticMethodCallExpression)ret).getMethod().equals(method.getText())) {
          ret.setNodeMetaData("String_Node_Str",method.getText());
        }
        setSourcePosition(ret,mce);
        return ret;
      }
      if (method instanceof ConstantExpression && !inLeftExpression) {
        String methodName=(String)((ConstantExpression)method).getValue();
        ret=findStaticFieldOrPropAccessorImportFromModule(methodName);
        if (ret != null) {
          ret=new MethodCallExpression(ret,"String_Node_Str",args);
          setSourcePosition(ret,mce);
          return ret;
        }
      }
    }
    if (method instanceof ConstantExpression) {
      ConstantExpression ce=(ConstantExpression)method;
      Object value=ce.getValue();
      if (value instanceof String) {
        String methodName=(String)value;
        boolean lookForPossibleStaticMethod=!methodName.equals("String_Node_Str");
        if (currentMethod != null && !currentMethod.isStatic()) {
          if (currentClass.hasPossibleMethod(methodName,args)) {
            lookForPossibleStaticMethod=false;
          }
        }
        if (inSpecialConstructorCall || (lookForPossibleStaticMethod && currentClass.hasPossibleStaticMethod(methodName,args))) {
          StaticMethodCallExpression smce=new StaticMethodCallExpression(currentClass,methodName,args);
          setSourcePosition(smce,mce);
          return smce;
        }
      }
    }
  }
  MethodCallExpression result=new MethodCallExpression(object,method,args);
  result.setSafe(mce.isSafe());
  result.setImplicitThis(mce.isImplicitThis());
  result.setSpreadSafe(mce.isSpreadSafe());
  result.setMethodTarget(mce.getMethodTarget());
  result.setGenericsTypes(mce.getGenericsTypes());
  setSourcePosition(result,mce);
  return result;
}

Fixed version (ground truth):
protected Expression transformMethodCallExpression(MethodCallExpression mce){
  Expression args=transform(mce.getArguments());
  Expression method=transform(mce.getMethod());
  Expression object=transform(mce.getObjectExpression());
  boolean isExplicitThisOrSuper=false;
  if (object instanceof VariableExpression) {
    VariableExpression ve=(VariableExpression)object;
    isExplicitThisOrSuper=!mce.isImplicitThis() && (ve.getName().equals("String_Node_Str") || ve.getName().equals("String_Node_Str"));
  }
  if (mce.isImplicitThis() || isExplicitThisOrSuper) {
    if (mce.isImplicitThis()) {
      Expression ret=findStaticMethodImportFromModule(method,args);
      if (ret != null) {
        if (!((StaticMethodCallExpression)ret).getMethod().equals(method.getText())) {
          ret.putNodeMetaData("String_Node_Str",method.getText());
        }
        setSourcePosition(ret,mce);
        return ret;
      }
      if (method instanceof ConstantExpression && !inLeftExpression) {
        String methodName=(String)((ConstantExpression)method).getValue();
        ret=findStaticFieldOrPropAccessorImportFromModule(methodName);
        if (ret != null) {
          ret=new MethodCallExpression(ret,"String_Node_Str",args);
          setSourcePosition(ret,mce);
          return ret;
        }
      }
    }
    if (method instanceof ConstantExpression) {
      ConstantExpression ce=(ConstantExpression)method;
      Object value=ce.getValue();
      if (value instanceof String) {
        String methodName=(String)value;
        boolean lookForPossibleStaticMethod=!methodName.equals("String_Node_Str");
        if (currentMethod != null && !currentMethod.isStatic()) {
          if (currentClass.hasPossibleMethod(methodName,args)) {
            lookForPossibleStaticMethod=false;
          }
        }
        if (inSpecialConstructorCall || (lookForPossibleStaticMethod && currentClass.hasPossibleStaticMethod(methodName,args))) {
          StaticMethodCallExpression smce=new StaticMethodCallExpression(currentClass,methodName,args);
          setSourcePosition(smce,mce);
          return smce;
        }
      }
    }
  }
  MethodCallExpression result=new MethodCallExpression(object,method,args);
  result.setSafe(mce.isSafe());
  result.setImplicitThis(mce.isImplicitThis());
  result.setSpreadSafe(mce.isSpreadSafe());
  result.setMethodTarget(mce.getMethodTarget());
  result.setGenericsTypes(mce.getGenericsTypes());
  setSourcePosition(result,mce);
  return result;
}