code: boolean processCompleteSource(String source) throws IllegalStateException {
          debug("Compiling: %s", source);
          boolean failed = false;
          boolean isActive = false;
          List<SnippetEvent> events = state.eval(source);
          for (SnippetEvent e : events) {
              // Report the event, recording failure
              failed |= handleEvent(e);
  
              // If any main snippet is active, this should be replayable
              // also ignore var value queries
              isActive |= e.causeSnippet() == null &&
                      e.status().isActive() &&
                      e.snippet().subKind() != VAR_VALUE_SUBKIND;
          }
          // If this is an active snippet and it didn't cause the backend to die,
          // add it to the replayable history
          if (isActive && live) {
              addToReplayHistory(source);
          }
  
          return failed;
      }
docs: where