Source code refactoring. Extracted common functionality into merged methods

Source code refactoring. Extracted common functionality into merged methods
Introducing these two booleans and two if-statements will actually hurt the readability of this code. I think a better way to put it is:

void Generator::PrintServiceClass(...) {
  <code to print the service class>
  PrintDescriptorKeyAndModuleName();
}

void Generator::PrintServiceStub(...) {
  <code to print the stub>
  PrintDescriptorKeyAndModuleName();
}

void Generator::PrintDescriptorKeyAndModuleName(...) {
  ...
}