code: public static Geometry node(Geometry geom) {
          if (geom == null) {
              return null;
          }        
          Noder noder = new MCIndexNoder(new IntersectionAdder(new RobustLineIntersector()));
          noder.computeNodes(SegmentStringUtil.extractNodedSegmentStrings(geom));
          return SegmentStringUtil.toGeometry(noder.getNodedSubstrings(), geom.getFactory());
      }
docs: Nodes a geometry using a monotone chain and a spatial index
  @param geom
  @return