code: private static void setupContributionAndDoubleBonds(IAtomContainer molecule, EdgeToBondMap bonds, int[][] graph,
              int[] contribution, int[] dbs) {
          // fill the contribution and dbs vectors
          for (int v = 0; v < graph.length; v++) {
  
              // hydrogens, valence, and connectivity
              int hyd = molecule.getAtom(v).getImplicitHydrogenCount();
              int val = hyd;
              int con = hyd + graph[v].length;
  
              for (int w : graph[v]) {
                  IBond bond = bonds.get(v, w);
                  val += bond.getOrder().numeric();
                  if (bond.getOrder() == IBond.Order.DOUBLE) {
                      dbs[v] = dbs[v] == -1 ? w : -2;
                  }
              }
  
              contribution[v] = contribution(molecule.getAtom(v).getAtomicNumber(), con, val);
          }
      }
docs: Internal - sets up the 'contribution' and 'dbs' vectors. These define how many pi electrons
  an atom can contribute and provide a lookup of the double bonded neighbour.
  
  @param molecule     structure representation
  @param bonds        edge to bond map lookup
  @param graph        adjacency list graph representation of structure
  @param contribution vector of p electron contributions from each vertex
  @param dbs          vector of double-bond pairs, index stored double-bonded index