final Coder<K> keyCoder, final AppliedCombineFn<K, InputT, AccumT, OutputT> combineFn) { final StateTag<CombiningState<InputT, AccumT, OutputT>> bufferTag; if (combineFn.getFn() instanceof CombineFnWithContext) { bufferTag = StateTags.makeSystemTagInternal( BUFFER_NAME, combineFn.getAccumulatorCoder(), (CombineFnWithContext<InputT, AccumT, OutputT>) combineFn.getFn())); BUFFER_NAME, combineFn.getAccumulatorCoder(), (CombineFn<InputT, AccumT, OutputT>) combineFn.getFn()));