Visit all statements in a method in order, recording which expressions are available as you go along. When an expression is ceasing to be available, determine if it's worth introducing a temporary variable for it and do so if necessary.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.