public void addFragment( FragKind kind, int offset, BitSet versions, String frag )
    {
        BitSet missing=null;
        if ( kind == FragKind.almost )
        {
            missing = (BitSet)current.getVersions().clone();
            missing.xor(versions);
        }
        if ( sections.isEmpty() || SectionState.state(kind) != current.state )
        {
            sections.add( new Section() );
            current = sections.get(sections.size()-1 );
        }
        if ( kind == FragKind.merged && hideMerged )
            current.addFrag( kind, base, offset, versions, frag );
        else if ( kind == FragKind.almost )
        {
            current.addAlmostSet( offset, versions, missing, frag );
        }
        else
            current.addFragSet( kind, offset, versions, frag );
    }