If your table similar only hold one colum it is pretty much useless, I'd say. What would it do?
Think about how you define similar. Will it just be a grouping of functionalities? In that case you could have a lookup table functional types:
<ft_id><ft_label>
[1][date checking]
[2][email validation]
[3][array sorting]
and a table with your code, as defined in your post
and in between a table holding the relations (Assuming a many-tomay relation: Every snippet can belong to multiple functional types, and every type can contain multiple snippets):
<snippet_nr><type_nr>