commit outdegree java, using modified algo