Automatic code refactoring techniques for Java programs