code: private void closeTransition(final ADTTransition<I, O> transition) {
  
          if (!transition.needsSifting()) {
              return;
          }
  
          final Word<I> accessSequence = transition.getSource().getAccessSequence();
          final I symbol = transition.getInput();
  
          this.oracle.reset();
          for (final I i : accessSequence) {
              this.oracle.query(i);
          }
  
          transition.setOutput(this.oracle.query(symbol));
  
          final Word<I> longPrefix = accessSequence.append(symbol);
          final ADTNode<ADTState<I, O>, I, O> finalNode =
                  this.adt.sift(this.oracle, longPrefix, transition.getSiftNode());
  
          assert ADTUtil.isLeafNode(finalNode);
  
          final ADTState<I, O> targetState;
  
          // new state discovered while sifting
          if (finalNode.getHypothesisState() == null) {
              targetState = this.hypothesis.addState();
              targetState.setAccessSequence(longPrefix);
  
              finalNode.setHypothesisState(targetState);
              transition.setIsSpanningTreeEdge(true);
  
              this.observationTree.addState(targetState, longPrefix, transition.getOutput());
  
              for (final I i : this.alphabet) {
                  this.openTransitions.add(this.hypothesis.createOpenTransition(targetState, i, this.adt.getRoot()));
              }
          } else {
              targetState = finalNode.getHypothesisState();
          }
  
          transition.setTarget(targetState);
      }
docs: Close the given transitions by means of sifting the associated long prefix through the ADT.
  
  @param transition
  the transition to close