code: public static IAtomContainer setSingleOrDoubleFlags(IAtomContainer ac) {
          // note - we could check for any aromatic bonds to avoid RingSearch but
          // RingSearch is fast enough it probably wouldn't do much to check
          // before hand
          RingSearch rs = new RingSearch(ac);
          boolean singleOrDouble = false;
          for (IBond bond : rs.ringFragments().bonds()) {
              if (bond.getFlag(CDKConstants.ISAROMATIC)) {
                  bond.setFlag(SINGLE_OR_DOUBLE, true);
                  bond.getBegin().setFlag(SINGLE_OR_DOUBLE, true);
                  bond.getEnd().setFlag(SINGLE_OR_DOUBLE, true);
                  singleOrDouble = singleOrDouble | true;
              }
          }
          if (singleOrDouble) {
              ac.setFlag(CDKConstants.SINGLE_OR_DOUBLE, true);
          }
          return ac;
      }
docs: Assigns {@link CDKConstants#SINGLE_OR_DOUBLE} flags to the bonds of
  a container. The single or double flag indicates uncertainty of bond
  order and in this case is assigned to all aromatic bonds (and atoms)
  which occur in rings. If any such bonds are found the flag is also set
  on the container.
  
  <blockquote><pre>
  SmilesParser parser = new SmilesParser(...);
  parser.setPreservingAromaticity(true);
  
  IAtomContainer biphenyl = parser.parseSmiles("c1cccc(c1)c1ccccc1");
  
  AtomContainerManipulator.setSingleOrDoubleFlags(biphenyl);
  </pre></blockquote>
  
  @param ac container to which the flags are assigned
  @return the input for convenience