When are you required to use a junction box extension to make it flush with the wall?
ARTICLE 314
  
  Outlet, Device, Pull, and Junction Boxes; Conduit Bodies; Fittings;
  and Handhole Enclosures
  
  314.20 In Wall or Ceiling. In walls or ceilings with a surface of concrete, tile, gypsum, plaster, or other noncombustible material,
  boxes employing a ﬂush-type cover or faceplate shall be installed so
  that the front edge of the box, plaster ring, extension ring, or
  listed extender will not be set back of the ﬁnished surface more than
  6 mm (1⁄4 in.). In walls and ceilings constructed of wood or other
  combustible surface material, boxes, plaster rings, extension rings,
  or listed extenders shall be ﬂush with the ﬁnished surface or project
  therefrom.