code: private static IntervalTreeNodeData<String> createPositionHit(Match m,
        ComponentGroup group) {
      Integer start = null;
      Integer end = null;
      if (group.hitInside != null || group.hitInsideLeft != null
          || group.hitInsideRight != null) {
        start = m.startPosition;
        end = m.endPosition - 1;
      } else {
        start = null;
        end = null;
      }
      if (group.hitLeft != null) {
        start = m.startPosition;
        end = Math.max(m.startPosition + group.hitLeft.length - 1,
            m.endPosition - 1);
      }
      if (group.hitRight != null) {
        start = Math.min(m.endPosition - group.hitRight.length, m.startPosition);
        end = end == null ? (m.endPosition - 1)
            : Math.max(end, (m.endPosition - 1));
      }
      if (group.left != null) {
        start = start == null ? m.startPosition - group.left.length
            : Math.min(m.startPosition - group.left.length, start);
        end = end == null ? m.startPosition - 1
            : Math.max(m.startPosition - 1, end);
      }
      if (group.right != null) {
        start = start == null ? m.endPosition : Math.min(m.endPosition, start);
        end = end == null ? m.endPosition + group.right.length - 1
            : Math.max(m.endPosition + group.right.length - 1, end);
      }
      return new IntervalTreeNodeData<>(start, end, m.startPosition,
          m.endPosition - 1);
    }
docs: Creates the position hit.
  
  @param m
  the m
  @param group
  the group
  @return the interval tree node data