public static List<IAtomContainer> getOverlaps(IAtomContainer sourceGraph, IAtomContainer targetGraph,
            boolean shouldMatchBonds) throws CDKException {
        List<List<CDKRMap>> rMapsList = search(sourceGraph, targetGraph, new BitSet(), new BitSet(), true, false,
                shouldMatchBonds);

        // projection on G1
        ArrayList<IAtomContainer> graphList = projectList(rMapsList, sourceGraph, ID1);

        // reduction of set of solution (isomorphism and substructure
        // with different 'mappings'

        return getMaximum(graphList, shouldMatchBonds);
    }
public static List < IAtomContainer > getOverlaps ( IAtomContainer sourceGraph , IAtomContainer targetGraph , boolean shouldMatchBonds ) throws CDKException { List < List < CDKRMap > > rMapsList = search ( sourceGraph , targetGraph , new BitSet ( ) , new BitSet ( ) , true , false , shouldMatchBonds ) ; ArrayList < IAtomContainer > graphList = projectList ( rMapsList , sourceGraph , ID1 ) ; return getMaximum ( graphList , shouldMatchBonds ) ; }
Returns all the maximal common substructure between 2 atom containers.

@param  sourceGraph  first molecule. Must not be an IQueryAtomContainer.
@param  targetGraph  second molecule. May be an IQueryAtomContainer.
@param shouldMatchBonds
@return     the list of all the maximal common substructure
found projected of sourceGraph (list of AtomContainer )
@throws CDKException