Program: 68607
Project: 68607
Buggy source:
private void generateDescriptorsForTables(RelationalProjectNode projectNode,Collection tables,boolean generateEjbs){
  if (!checkForProjectSave(projectNode))   return;
  DescriptorGenerationDialog descriptorDialog=new DescriptorGenerationDialog((MWRelationalProject)projectNode.getProject(),generateEjbs,context);
  descriptorDialog.show();
  if (descriptorDialog.wasCanceled()) {
    return;
  }
  Vector possibleRelationships=new Vector();
  Collection relationshipsToCreate=new Vector();
  boolean generateBidirectionalRelationships=false;
  if (!possibleRelationships.isEmpty()) {
    RelationshipGenerationDialog relationshipDialog=new RelationshipGenerationDialog(possibleRelationships,context);
    relationshipDialog.setGenerateBidirectionalRelationships(generateEjbs);
    relationshipDialog.show();
    if (relationshipDialog.wasCanceled()) {
      return;
    }
    relationshipsToCreate=relationshipDialog.getRelationshipsToCreate();
    generateBidirectionalRelationships=relationshipDialog.getGenerateBidirectionalRelationships();
  }
  MWDescriptorGenerator generator=new MWDescriptorGenerator();
  generator.setProject((MWRelationalProject)projectNode.getProject());
  generator.setTables(tables);
  generator.setGenerateEjbs(generateEjbs);
  generator.setPackageName(descriptorDialog.getPackageName());
  generator.setGenerateMethodAccessors(descriptorDialog.getGenerateAccessors());
  generator.setGenerateBidirectionalRelationships(generateBidirectionalRelationships);
  generator.setRelationshipsToCreate(relationshipsToCreate);
  generator.generateClassesAndDescriptors();
  String successDialogString=null;
  if (generateEjbs) {
    successDialogString="String_Node_Str";
  }
 else {
    successDialogString="String_Node_Str";
  }
  JOptionPane.showMessageDialog(context.getCurrentWindow(),resourceRepository().getString(successDialogString + "String_Node_Str"),resourceRepository().getString(successDialogString + "String_Node_Str"),JOptionPane.INFORMATION_MESSAGE);
}

Fixed version (ground truth):
private void generateDescriptorsForTables(RelationalProjectNode projectNode,Collection tables){
  if (!checkForProjectSave(projectNode))   return;
  DescriptorGenerationDialog descriptorDialog=new DescriptorGenerationDialog((MWRelationalProject)projectNode.getProject(),context);
  descriptorDialog.show();
  if (descriptorDialog.wasCanceled()) {
    return;
  }
  Vector possibleRelationships=new Vector();
  Collection relationshipsToCreate=new Vector();
  boolean generateBidirectionalRelationships=false;
  if (!possibleRelationships.isEmpty()) {
    RelationshipGenerationDialog relationshipDialog=new RelationshipGenerationDialog(possibleRelationships,context);
    relationshipDialog.show();
    if (relationshipDialog.wasCanceled()) {
      return;
    }
    relationshipsToCreate=relationshipDialog.getRelationshipsToCreate();
    generateBidirectionalRelationships=relationshipDialog.getGenerateBidirectionalRelationships();
  }
  MWDescriptorGenerator generator=new MWDescriptorGenerator();
  generator.setProject((MWRelationalProject)projectNode.getProject());
  generator.setTables(tables);
  generator.setPackageName(descriptorDialog.getPackageName());
  generator.setGenerateMethodAccessors(descriptorDialog.getGenerateAccessors());
  generator.setGenerateBidirectionalRelationships(generateBidirectionalRelationships);
  generator.setRelationshipsToCreate(relationshipsToCreate);
  generator.generateClassesAndDescriptors();
  String successDialogString="String_Node_Str";
  JOptionPane.showMessageDialog(context.getCurrentWindow(),resourceRepository().getString(successDialogString + "String_Node_Str"),resourceRepository().getString(successDialogString + "String_Node_Str"),JOptionPane.INFORMATION_MESSAGE);
}