'STAB' does not apply to attacks that exert a specific amount of damage each turn and thus does not follow the typical battle formula (For example, if Dragonite was using Dragon Rage then the move would not receive any attack bonus), another example of this is Seismic Toss.
The Same Type Attack Bonus was introduced in Generation I and has remained unchanged since.
Due to the STAB's undocumented status amongst fans, several misconceptions are made when taking the following into consideration:
Contrary to popular belief, Normal Type attacks are affected by the Same Type Attack Bonus, and the same type attack bonus is still viable and as effective for Duel Type Pokémon also.
Hidden Power does in fact receive the attack bonus only if the IV's cause the attack to be the same type as the user. For example if a Fire Type Pokémon used Hidden Power Fire then STAB would affect the damage inflicted. However, even though this move is classified as a Normal Type attack, normal type Pokemon do not receive the bonus because the game data causes the typing match for the attack not to have the affects of a normal type move. The only way this proves incorrect is is the Normal Type is dueled with another type, know the move Camouflage, or have either the Normalize ability or Color Change ability.