Program: 27426
Project: 27426
Buggy source:
/** 
 * Creates inputs from a list of source files, zips and json files. Can be overridden by subclasses who want to pull files from different places.
 * @param files A list of flag entries indicates js and zip file names
 * @param jsonFiles A list of json encoded files.
 * @param allowStdIn Whether '-' is allowed appear as a filename to representstdin. If true, '-' is only allowed to appear once.
 * @return An array of inputs
 */
protected List<SourceFile> createInputs(List<FlagEntry<JsSourceType>> files,List<JsonFileSpec> jsonFiles,boolean allowStdIn) throws FlagUsageException, IOException {
  List<SourceFile> inputs=new ArrayList<>(files.size());
  boolean usingStdin=false;
  for (  FlagEntry<JsSourceType> file : files) {
    String filename=file.value;
    if (file.flag == JsSourceType.JS_ZIP) {
      if (!"String_Node_Str".equals(filename)) {
        List<SourceFile> newFiles=SourceFile.fromZipFile(filename,inputCharset);
        inputs.addAll(newFiles);
      }
    }
 else     if (!"String_Node_Str".equals(filename)) {
      SourceFile newFile=SourceFile.fromFile(filename,inputCharset);
      inputs.add(newFile);
    }
 else {
      if (!allowStdIn) {
        throw new FlagUsageException("String_Node_Str");
      }
      if (usingStdin) {
        throw new FlagUsageException("String_Node_Str");
      }
      if (!config.outputManifests.isEmpty()) {
        throw new FlagUsageException("String_Node_Str" + "String_Node_Str");
      }
      if (!config.outputBundles.isEmpty()) {
        throw new FlagUsageException("String_Node_Str" + "String_Node_Str");
      }
      this.err.println(WAITING_FOR_INPUT_WARNING);
      inputs.add(SourceFile.fromInputStream("String_Node_Str",this.in,inputCharset));
      usingStdin=true;
    }
  }
  if (jsonFiles != null) {
    for (    JsonFileSpec jsonFile : jsonFiles) {
      inputs.add(SourceFile.fromCode(jsonFile.getPath(),jsonFile.getSrc()));
    }
  }
  return inputs;
}

Fixed version (ground truth):
/** 
 * Creates inputs from a list of source files, zips and json files. Can be overridden by subclasses who want to pull files from different places.
 * @param files A list of flag entries indicates js and zip file names
 * @param jsonFiles A list of json encoded files.
 * @param allowStdIn Whether '-' is allowed appear as a filename to representstdin. If true, '-' is only allowed to appear once.
 * @param jsModuleSpecs A list js module specs.
 * @return An array of inputs
 */
protected List<SourceFile> createInputs(List<FlagEntry<JsSourceType>> files,List<JsonFileSpec> jsonFiles,boolean allowStdIn,List<JsModuleSpec> jsModuleSpecs) throws FlagUsageException, IOException {
  List<SourceFile> inputs=new ArrayList<>(files.size());
  boolean usingStdin=false;
  int jsModuleIndex=0;
  JsModuleSpec jsModuleSpec=jsModuleSpecs.isEmpty() ? null : jsModuleSpecs.get(0);
  int cumulatedInputFilesExpected=jsModuleSpec == null ? Integer.MAX_VALUE : jsModuleSpec.numInputs;
  for (int i=0; i < files.size(); i++) {
    FlagEntry<JsSourceType> file=files.get(i);
    String filename=file.value;
    if (file.flag == JsSourceType.JS_ZIP) {
      if (!"String_Node_Str".equals(filename)) {
        List<SourceFile> newFiles=SourceFile.fromZipFile(filename,inputCharset);
        inputs.addAll(newFiles);
        if (jsModuleSpec != null) {
          jsModuleSpec.numJsFiles+=newFiles.size() - 1;
        }
      }
    }
 else     if (!"String_Node_Str".equals(filename)) {
      SourceFile newFile=SourceFile.fromFile(filename,inputCharset);
      inputs.add(newFile);
    }
 else {
      if (!allowStdIn) {
        throw new FlagUsageException("String_Node_Str");
      }
      if (usingStdin) {
        throw new FlagUsageException("String_Node_Str");
      }
      if (!config.outputManifests.isEmpty()) {
        throw new FlagUsageException("String_Node_Str" + "String_Node_Str");
      }
      if (!config.outputBundles.isEmpty()) {
        throw new FlagUsageException("String_Node_Str" + "String_Node_Str");
      }
      this.err.println(WAITING_FOR_INPUT_WARNING);
      inputs.add(SourceFile.fromInputStream("String_Node_Str",this.in,inputCharset));
      usingStdin=true;
    }
    if (i >= cumulatedInputFilesExpected - 1) {
      jsModuleIndex++;
      if (jsModuleIndex < jsModuleSpecs.size()) {
        jsModuleSpec=jsModuleSpecs.get(jsModuleIndex);
        cumulatedInputFilesExpected+=jsModuleSpec.numInputs;
      }
    }
  }
  if (jsonFiles != null) {
    for (    JsonFileSpec jsonFile : jsonFiles) {
      inputs.add(SourceFile.fromCode(jsonFile.getPath(),jsonFile.getSrc()));
    }
  }
  return inputs;
}