1. A method in a data processing system for second-order predictive commoning, the method comprising: collecting at least one induction variable reference from a software program, wherein the software program includes at least one loop; determining at least one distance between a plurality of sub-expressions within the at least one loop, wherein the at least one distance is a number of iterations in the at least one loop; detecting at least one sequence from a plurality of sequences with a maximal coverage using the at least one distance; and maximizing at least one sub-expression from the plurality of sub-expressions in the at least one sequence using the at least one induction variable reference.