code: private IAtomContainer setFlags(IAtomContainer container, IAtomContainer ac, boolean b) {
          for (Iterator<IAtom> it = container.atoms().iterator(); it.hasNext();) {
              int positionA = ac.indexOf(it.next());
              ac.getAtom(positionA).setFlag(CDKConstants.REACTIVE_CENTER, b);
          }
          for (Iterator<IBond> it = container.bonds().iterator(); it.hasNext();) {
              int positionB = ac.indexOf(it.next());
              ac.getBond(positionB).setFlag(CDKConstants.REACTIVE_CENTER, b);
  
          }
          return ac;
      }
docs: Set the Flags to atoms and bonds from an atomContainer.
  
  @param container Container with the flags
  @param ac        Container to put the flags
  @param b         True, if the the flag is true
  @return          Container with added flags