code: public void appendSource(String source) {
          if (started) {
              throw new IllegalStateException("Cannot append code after the program had started.");
          } else {
              if (appendedCode == null) {
                  appendedCode = new ArrayList<>();
              }
              appendedCode.add(source);
          }
      }
docs: Adds more source code to be evaluated <em>after</em>
  {@link #setupProgramScope(org.mozilla.javascript.Scriptable)} is called.
  This method allows to programatically add code, e.g. for adding standard
  environment, mocking non-modeled parts for model-checking.
  
  @throws IllegalStateException if the code is appended after the bprogram
  started.
  @param source JavaScript source to be added at the end of the current source.