private void mergeAsTable( FragList fl, ArrayList<Version> sigla, 
        ArrayList<Group> groups, BitSet constraint ) throws Exception
    {
        BitSet bs1 = getShared();
        bs1.and( constraint );
        BitSet bs2 = fl.getShared();
        bs2.and( constraint );
        Utils.ensureExclusivity( bs1, bs2 );
        short base = (short)bs1.nextSetBit(0);
        Table table = new Table( constraint, sigla, base, 0 );
        table.setNested();
        // construct rows
        Row r = new Row( bs1, sigla, groups, base );
        r.setNested( true );
        FragList copy1 = (FragList)this.clone();
        FragList copy2 = (FragList)fl.clone();
        if ( bs1.nextSetBit(base)==base )
            copy1.setBase( true );
        else
            copy2.setBase( true );
        r.add( copy1 );
        Row s = new Row( bs2, sigla, groups, base );
        s.setNested( true );
        s.add( copy2 );
        table.addRow( r );
        table.addRow( s );
        if ( table.rows.size() != 2 )
            System.out.println("merged table does not contain two rows!");
        this.fragments.clear();
        this.fragments.add( table );
        if ( r.versions==null||r.versions.isEmpty() )
            System.out.println("row versions are empty");
        if ( s.versions==null||s.versions.isEmpty() )
            System.out.println("row versions are empty");
    }