The result is refering, where it should
be referring. R is doubled as this is a
case of gemination (Rule 15).
In fact - the things you learn! - apparently this case is called
West Germanic Gemination,
1) the suffix begins with a vowel (V)
2) base ends in a vowel-consonant (VC) pattern
3) the vowel of the above VC pattern is stressed before the suffix
is added, and retains that stress after the suffix is added.
Hence, refer - referring but not *referrence*
Thus, to create the correct generation, we have to indicate the stress.
For the input "ref`er+ing", we get the following: