code: public IAtom getPlacedHeavyAtom(IAtomContainer molecule, IAtom atomA, IAtom atomB) {
          List<IBond> bonds = molecule.getConnectedBondsList(atomA);
          for (IBond bond : bonds) {
              IAtom connectedAtom = bond.getOther(atomA);
              if (isPlacedHeavyAtom(connectedAtom) && !connectedAtom.equals(atomB)) {
                  return connectedAtom;
              }
          }
          return null;
      }
docs: Gets the first placed Heavy Atom around atomA which is not atomB.
  
  @param molecule
  @param  atomA  Description of the Parameter
  @param  atomB  Description of the Parameter
  @return        The placedHeavyAtom value