Fixed the method obtainFreeVariables

fixed the return result.
Javadoc Comments