Add a partial stack trace element by specifying the source location of the soy file.
484505
RenderException addStackTraceElement(TemplateNode template, SourceLocation location) {
    // Typically, this is fast since templates aren't that deep and we only do this in error
    // situations so performance matters less.
    soyStackTrace.add(template.createStackTraceElement(location));
    return this;
  }
1113882
private void addElementToNextFreeSlot(@Nonnull final ExpressionTreeElement element) {
    if (element == null) {
      throw new PreprocessorException("[Expression]Element is null", this.sourceString, this.includeStack, null);
    }

    if (childElements.length == 0) {
      throw new PreprocessorException("[Expression]Unexpected element, may be unknown function [" + savedItem.toString() + ']', this.sourceString, this.includeStack, null);
    } else if (isFull()) {
      throw new PreprocessorException("[Expression]There is not any possibility to add new argument [" + savedItem.toString() + ']', this.sourceString, this.includeStack, null);
    } else {
      childElements[nextChildSlot++] = element;
    }
    element.parentTreeElement = this;
  }
524786
protected void addPOEntry(final String tag, final String source, final String translation, final boolean fuzzy,
            final StringBuilder poFile) {
        // perform a check to make sure the source isn't an empty string, as this could be the case after removing the comments
        if (source == null || source.length() == 0) return;

        poFile.append("\n");
        if (!isNullOrEmpty(tag)) {
            poFile.append("#. Tag: ").append(tag).append("\n");
        }
        if (fuzzy) {
            poFile.append("#, fuzzy\n");
        }
        poFile.append("#, no-c-format\n")
                .append("msgid \"").append(escapeForPOFile(source, true)).append("\"\n")
                .append("msgstr \"").append(escapeForPOFile(translation, false)).append("\"\n");
    }
824916
function addDustDependency(require_path, source_path, options, deps) {
  var name = determinePartialName(require_path, source_path, options);
  deps.push("var partial" + deps.length + " = require('" + name + "');");
  return name;
}
949012
private void addTypeSubstitutions(Map<Wrapper<ExprNode>, SoyType> substitutionsToAdd) {
    for (Map.Entry<Wrapper<ExprNode>, SoyType> entry : substitutionsToAdd.entrySet()) {
      ExprNode expr = entry.getKey().get();
      // Get the existing type
      SoyType previousType = expr.getType();
      for (TypeSubstitution subst = substitutions; subst != null; subst = subst.parent) {
        if (ExprEquivalence.get().equivalent(subst.expression, expr)) {
          previousType = subst.type;
          break;
        }
      }

      // If the new type is different than the current type, then add a new type substitution.
      if (!entry.getValue().equals(previousType)) {
        substitutions = new TypeSubstitution(substitutions, expr, entry.getValue());
      }
    }
  }
796990
public static void addSource(SourceBuilder code, AnnotationMirror annotation) {
    new ValueSourceAdder(code).visitAnnotation(annotation, null);
  }
1157662
public void addSourcePath(File sourcePath) {
		if (this.sourcePath == null) {
			this.sourcePath = new ArrayList<>();
		}
		this.sourcePath.add(sourcePath);
	}
1332402
public SourceUnit addSource(File file) {
        return addSource(new SourceUnit(file, configuration, classLoader, getErrorCollector()));
    }
346830
protected void addPOTEntry(final String tag, final String source, final StringBuilder potFile) {
        addPOEntry(tag, source, "", false, potFile);
    }
683894
@Nonnull
    public BugInstance addSourceLine(ClassContext classContext, Method method, InstructionHandle handle) {
        SourceLineAnnotation sourceLineAnnotation = SourceLineAnnotation.fromVisitedInstruction(classContext, method,
                handle.getPosition());
        if (sourceLineAnnotation != null) {
            add(sourceLineAnnotation);
        }
        return this;
    }
1252234
private void addScriptingLineInfo(Element jspElement) {
        JspId jspId = new JspId(jspElement.getAttributeNS(Constants.JSP_NAMESPACE, "id"));
        if (fileList.contains(jspId.getFilePath()) == false) {
            smapStratum.addFile(jspId.getFileName(), jspId.getFilePath());
            fileList.add(jspId.getFilePath()); //227804
        }
        if (jspId.getStartGeneratedLineNum() > 0) {
            CDATASection cdata = (CDATASection)jspElement.getChildNodes().item(0);
            BufferedReader reader = new BufferedReader(new StringReader(cdata.getData()));
            int skipLeadingCount = 0;
            int skipTrailingCount = 0;
            int lineCount = 0;
            boolean contentFound = false;
            try {
                for (String line = null;(line = reader.readLine()) != null;) {
                    lineCount++;
                    if (line.trim().length() < 1) {
                        if (contentFound) {
                            skipTrailingCount++;
                        }
                        else {
                            skipLeadingCount++;
                        }
                    }
                    else {
                        contentFound = true;
                        skipTrailingCount = 0;
                    }
                }
            }
            catch (IOException ex) {}
            smapStratum.addLineData(jspId.getStartSourceLineNum()+skipLeadingCount,
                                    jspId.getFileName(),
                                    lineCount - skipLeadingCount - skipTrailingCount,
                                    jspId.getStartGeneratedLineNum()+skipLeadingCount,
                                    1);
        }
    }
901482
private String getSourceCodePath(StackTraceElement stackTraceElement) {
        Objects.requireNonNull(stackTraceElement, Required.STACK_TRACE_ELEMENT.toString());

        String packageName = stackTraceElement.getClassName();
        int position = packageName.lastIndexOf('.');
        if (position > 0) {
            packageName = packageName.substring(0, position);
            return StringUtils.replace(packageName, ".", File.separator) + File.separator + stackTraceElement.getFileName();
        }

        return stackTraceElement.getFileName();
    }
391136
protected void addWarningMarker(File file, String message, ILexLocation location,
			String sourceId)
	{
		FileUtility.addMarker(project.findIFile( file),message,location,IMarker.SEVERITY_WARNING,sourceId,-1);
	}
829669
private void addCodeToRequireSoyNamespaces(SoyFileNode soyFile) {

    String prevCalleeNamespace = null;
    Set<String> calleeNamespaces = new TreeSet<>();
    for (CallBasicNode node : new FindCalleesNotInFileVisitor().exec(soyFile)) {
      String calleeNotInFile = node.getCalleeName();
      int lastDotIndex = calleeNotInFile.lastIndexOf('.');
      calleeNamespaces.add(calleeNotInFile.substring(0, lastDotIndex));
    }

    for (String calleeNamespace : calleeNamespaces) {
      if (calleeNamespace.length() > 0 && !calleeNamespace.equals(prevCalleeNamespace)) {
        jsCodeBuilder.addGoogRequire(GoogRequire.create(calleeNamespace));
        prevCalleeNamespace = calleeNamespace;
      }
    }
  }
1089609
@Override
  protected void visitSoyFileSetNode(SoyFileSetNode node) {
    // Figure out the generated class name for each Soy file, including adding number suffixes
    // to resolve collisions, and then adding the common suffix "SoyInfo".
    Multimap<String, SoyFileNode> baseGeneratedClassNameToSoyFilesMap = HashMultimap.create();
    for (SoyFileNode soyFile : node.getChildren()) {
      baseGeneratedClassNameToSoyFilesMap.put(
          javaClassNameSource.generateBaseClassName(soyFile), soyFile);
    }
    soyFileToJavaClassNameMap = Maps.newHashMap();
    for (String baseClassName : baseGeneratedClassNameToSoyFilesMap.keySet()) {
      Collection<SoyFileNode> soyFiles = baseGeneratedClassNameToSoyFilesMap.get(baseClassName);
      if (soyFiles.size() == 1) {
        for (SoyFileNode soyFile : soyFiles) {
          soyFileToJavaClassNameMap.put(soyFile, baseClassName + "SoyInfo");
        }
      } else {
        int numberSuffix = 1;
        for (SoyFileNode soyFile : soyFiles) {
          soyFileToJavaClassNameMap.put(soyFile, baseClassName + numberSuffix + "SoyInfo");
          numberSuffix++;
        }
      }
    }

    // Run the pass.
    for (SoyFileNode soyFile : node.getChildren()) {
      visit(soyFile);
    }
  }
149028
@VisibleForTesting
  public void addSource(InputFile file) {
    if (globalCombinedUnit != null) {
      inputs.add(new ProcessingContext(file, globalCombinedUnit));
    } else {
      inputs.add(ProcessingContext.fromFile(file, options));
    }
  }
861130
function addElementDone()
    {
        ## add trailing boundary as stream if not
        $this->_trailingBoundary = new STemporary("\r\n"."--{$this->_boundary}--");
        $this->_t__wrap_stream->addStream($this->_trailingBoundary->rewind());
    }