code: private Collection<DependencyInfo> collectChildrenDependencies(DependencyInfo dependency, List<String> groupLines) {
          logger.debug("Collect child dependencies of {}, total group-lines = {}", dependency.getGroupId(), groupLines.size());
          Collection<DependencyInfo> dependencies = new LinkedList<>();
          boolean dependencyLine = false;
          for (String line : groupLines) {
              if (!dependencyLine && line.startsWith(FOUR_SPACES + dependency.getGroupId() + Constants.WHITESPACE)) {
                  dependencyLine = true;
                  getDependencyFromLine(dependency, line);
              } else if (dependencyLine) {
                  if (line.startsWith(SIX_SPACES)) {
                      DependencyInfo childDependency = new DependencyInfo();
                      String lineWithoutSpaces = line.substring(SIX_SPACES.length());
                      childDependency.setGroupId(lineWithoutSpaces.substring(0, lineWithoutSpaces.indexOf(Constants.WHITESPACE)));
                      childDependency.setChildren(collectChildrenDependencies(childDependency, groupLines));
                      // prevent adding dependencies without sha1 or artifact id version and dependency type.
                      if(dependency.getSha1() == null && dependency.getArtifactId() == null) {
                          logger.warn(DEPENDECYERROR, dependency.getGroupId());
                      } else {
                          dependencies.add(childDependency);
                      }
                  } else {
                      // move to the next dependency parent with its children
                      break;
                  }
              }
          }
          return dependencies;
      }
docs: /* --- private methods ---