Broken neighbor splitting code