code: private static IAtom getCommon(IBond bndA, IBond bndB) {
          IAtom beg = bndA.getBegin();
          IAtom end = bndA.getEnd();
          if (bndB.contains(beg))
              return beg;
          else if (bndB.contains(end))
              return end;
          else
              return null;
      }
docs: Access the common atom shared by two bonds.
  
  @param bndA first bond
  @param bndB second bond
  @return common atom or null if non exists