fragment vs snippet

fragment

noun
  • An incomplete portion of code. 

  • A sentence not containing a subject or a predicate. 

  • A portion of a URL referring to a subordinate resource or anchor (such as a specific point on a web page), introduced by the # sign. 

  • A part broken off; a small, detached portion; an imperfect part, either physically or not 

verb
  • To break apart. 

  • To break up and disperse (a file) into non-contiguous areas of a disk. 

  • To cause to be broken into pieces. 

snippet

noun
  • A text file containing a relatively small amount of code, useless by itself, along with instructions for inserting that code into a larger codebase. 

  • A small part of something, such as a song or fabric; sample. 

verb
  • To produce a snippet (small part) of; to excerpt. 

  • To make small cuts, to snip, particularly with scissors. 

How often have the words fragment and snippet occurred in a corpus of books? (source: Google Ngram Viewer )