code excerpt

Noun
  1. A small section of source code taken from a larger program.
    The developer shared a code excerpt to illustrate the bug.