code: private void resolveWeakLinks(AvpRepresentation newAvp) {
      for (AvpRepresentation avp : avpMap.values()) {
        if (avp.isGrouped()) {
          if (avp.getName().equals(newAvp.getName())) {
            continue;
          }
          List<AvpRepresentation> avpChilds = avp.getChildren();
          for (int n = 0; n < avpChilds.size(); n++) {
            AvpRepresentation avpChild = avpChilds.get(n);
            if (avpChild.getName().equals(newAvp.getName())) {
              try {
                AvpRepresentationImpl strongAvp = (AvpRepresentationImpl) newAvp.clone();
                strongAvp.setMultiplicityIndicator(avpChild.getMultiplicityIndicator());
                strongAvp.markFixPosition(avpChild.getPositionIndex());
                strongAvp.markWeak(false);
  
                avpChilds.set(n, strongAvp);
  
                resolveWeakLinks(avp);
              }
              catch (CloneNotSupportedException cnse) {
                // It should not happen, but anyway
                if (logger.isWarnEnabled()) {
                  logger.warn("Unable to clone AVP " + newAvp, cnse);
                }
              }
            }
          }
        }
      }
    }
docs: For a given AVP resolves the weak links (where AVP definition in grouped
  AVPs is not yet known, and only added by Name)
  
  @param newAvp the AVP which was just defined