code: private boolean namesAreEqual(Dependency dependency, Dependency nextDependency) {
          return dependency.getName() != null && dependency.getName().equals(nextDependency.getName());
      }
docs: Determine if the dependency name is equal in the given dependencies.
  
  @param dependency a dependency to compare
  @param nextDependency a dependency to compare
  @return true if the name is equal in both dependencies; otherwise false