code: @Deprecated
      public void correctlySpends(Transaction txContainingThis, long scriptSigIndex, Script scriptPubKey)
              throws ScriptException {
          correctlySpends(txContainingThis, scriptSigIndex, scriptPubKey, ALL_VERIFY_FLAGS);
      }
docs: Verifies that this script (interpreted as a scriptSig) correctly spends the given scriptPubKey, enabling all
  validation rules.
  @param txContainingThis The transaction in which this input scriptSig resides.
  Accessing txContainingThis from another thread while this method runs results in undefined behavior.
  @param scriptSigIndex The index in txContainingThis of the scriptSig (note: NOT the index of the scriptPubKey).
  @param scriptPubKey The connected scriptPubKey containing the conditions needed to claim the value.
  @deprecated Use {@link #correctlySpends(Transaction, int, TransactionWitness, Coin, Script, Set)}
  instead so that verification flags do not change as new verification options
  are added.