code: private void insertPatternInTable(StepPattern pattern, ElemTemplate template)
    {
  
      String target = pattern.getTargetString();
  
      if (null != target)
      {
        String pstring = template.getMatch().getPatternString();
        TemplateSubPatternAssociation association =
          new TemplateSubPatternAssociation(template, pattern, pstring);
  
        // See if there's already one there
        boolean isWildCard = association.isWild();
        TemplateSubPatternAssociation head = isWildCard
                                             ? m_wildCardPatterns
                                             : getHead(target);
  
        if (null == head)
        {
          if (isWildCard)
            m_wildCardPatterns = association;
          else
            putHead(target, association);
        }
        else
        {
          insertAssociationIntoList(head, association, false);
        }
      }
    }
docs: Add a template to the template list.
  
  @param pattern
  @param template