code: public void decideBondOrder(IAtomContainer atomContainer, boolean atomsSaturated) throws CDKException {
          if (atomContainer.getBondCount() == 0)
          // In this case the atom only has implicit bonds, and then it wan't be aromatic
              return;
          startBond = 0;
          int saturnatedAtoms = 0;
          int[] bestGuess = {startBond, saturnatedAtoms};
          if (atomsSaturated) {
              do {
                  if (startBond == atomContainer.getBondCount()) {
                      if (bestGuess[1] == 0)
                          throw new CDKException("Can't find any solution");
                      else {
                          decideBondOrder(atomContainer, bestGuess[0]);
                          double satAtoms = ((bestGuess[1] * 1.0) / atomContainer.getAtomCount()) * 10000;
                          satAtoms = Math.round(satAtoms) / 100;
                          //						System.out.println("Staring on bond "+bestGuess[0]+
                          //								" gives "+satAtoms+"% saturated atoms.");
                          logger.warn("Can't find any solution where all atoms " + "are saturated. A best guess gives "
                                  + satAtoms + "% Saturated atoms.");
                          return;
                      }
                  }
  
                  decideBondOrder(atomContainer, startBond);
  
                  saturnatedAtoms = 0;
                  for (IAtom atom : atomContainer.atoms()) {
                      if (isSaturated(atom, atomContainer)) saturnatedAtoms++;
                  }
  
                  if (bestGuess[1] < saturnatedAtoms) {
                      bestGuess[0] = startBond;
                      bestGuess[1] = saturnatedAtoms;
                  }
  
                  startBond++;
              } while (!isSaturated(atomContainer));
          } else
              decideBondOrder(atomContainer, startBond);
      }
docs: This method decides the bond order on bonds that has the
  <code>SINGLE_OR_DOUBLE</code>-flag raised.
  
  @param atomContainer The molecule to investigate
  @param atomsSaturated Set to true if you want to make sure that all
  atoms are saturated.
  @throws CDKException