There is a good approach to refactoring. For example, we have this method with flag:
public void process(boolean hasLicense){ if (hasLicense){