code: @Override
      public DescriptorValue calculate(IAtomContainer atomContainer) {
          IAtomContainer ac;
          try {
              ac = (IAtomContainer) atomContainer.clone();
          } catch (CloneNotSupportedException e) {
              return new DescriptorValue(getSpecification(), getParameterNames(), getParameters(), new IntegerResult(
                      (int) Double.NaN), getDescriptorNames(), new CDKException("Error during clone"));
          }
  
          int aromaticBondsCount = 0;
          if (checkAromaticity) {
              try {
                  AtomContainerManipulator.percieveAtomTypesAndConfigureAtoms(ac);
              } catch (CDKException e) {
                  return new DescriptorValue(getSpecification(), getParameterNames(), getParameters(), new IntegerResult(
                          (int) Double.NaN), getDescriptorNames(), new CDKException("Error during atom type perception"));
              }
              try {
                  Aromaticity.cdkLegacy().apply(ac);
              } catch (CDKException e) {
                  return new DescriptorValue(getSpecification(), getParameterNames(), getParameters(), new IntegerResult(
                          (int) Double.NaN), getDescriptorNames(), new CDKException(
                          "Error during aromaticity detection: " + e.getMessage()));
              }
          }
          Iterator bonds = ac.bonds().iterator();
          while (bonds.hasNext()) {
              IBond bond = (IBond) bonds.next();
              if (bond.getFlag(CDKConstants.ISAROMATIC)) {
                  aromaticBondsCount += 1;
              }
          }
          return new DescriptorValue(getSpecification(), getParameterNames(), getParameters(), new IntegerResult(
                  aromaticBondsCount), getDescriptorNames());
      }
docs: Calculate the count of aromatic atoms in the supplied {@link IAtomContainer}.
  
  The method take a boolean checkAromaticity: if the boolean is true, it means that
  aromaticity has to be checked.
  
  @param  atomContainer  The {@link IAtomContainer} for which this descriptor is to be calculated
  @return the number of aromatic atoms of this AtomContainer
  @see #setParameters