code: public static double calculateAverageBondLength(IAtomContainerSet moleculeSet) {
          double averageBondModelLength = 0.0;
          for (IAtomContainer atomContainer : moleculeSet.atomContainers()) {
              averageBondModelLength += GeometryUtil.getBondLengthAverage(atomContainer);
          }
          return averageBondModelLength / moleculeSet.getAtomContainerCount();
      }
docs: Calculate the average bond length for the bonds in a molecule set.
  
  @param moleculeSet the molecule set to use
  @return the average bond length