nus-yam/ex-repair huggingface dataset:
Program: 88539
Project: 88539
Buggy source:
public List<Element> getViewProcessOrder(Element start,Map<Element,List<Element>> view2view){
  List<Element> res=new ArrayList<Element>();
  Queue<Element> toProcess=new LinkedList<Element>();
  toProcess.add(start);
  while (!toProcess.isEmpty()) {
    Element next=toProcess.remove();
    res.add(next);
    if (view2view.containsKey(next)) {
      toProcess.addAll(view2view.get(next));
    }
  }
  return res;
}

Fixed version (ground truth):
public List<Element> getViewProcessOrder(Element start,Map<Element,List<Element>> view2view){
  List<Element> res=new ArrayList<>();
  Queue<Element> toProcess=new LinkedList<>();
  HashSet<Element> processed=new HashSet<>();
  toProcess.add(start);
  while (!toProcess.isEmpty()) {
    Element next=toProcess.remove();
    res.add(next);
    processed.add(next);
    if (view2view.containsKey(next)) {
      for (      Element element : view2view.get(next)) {
        if (!processed.contains(element)) {
          toProcess.add(element);
        }
 else {
          Application.getInstance().getGUILog().log("String_Node_Str" + element.getHumanName() + "String_Node_Str");
        }
      }
    }
  }
  return res;
}
Program: 88542
Project: 88542
Buggy source:
@Override public void projectPreSaved(Project project,boolean savedInServer){
  deltaSyncRunner=null;
  if ((project.isRemote() && !savedInServer) || !StereotypesHelper.hasStereotype(project.getModel(),"String_Node_Str") || CoordinatedSyncProjectEventListenerAdapter.getProjectMapping(project).isDisabled()|| JMSSyncProjectEventListenerAdapter.getProjectMapping(project).getJmsMessageListener().isDisabled()) {
    return;
  }
  if (!TicketUtils.isTicketValid(project)) {
    Application.getInstance().getGUILog().log("String_Node_Str");
    new Thread(){
      public void run(){
        MMSLoginAction.loginAction(project);
      }
    }
.start();
    return;
  }
  deltaSyncRunner=new DeltaSyncRunner(true,true,true);
  ProgressStatusRunner.runWithProgressStatus(deltaSyncRunner,"String_Node_Str",true,0);
}

Fixed version (ground truth):
@Override public void projectPreSaved(Project project,boolean savedInServer){
  deltaSyncRunner=null;
  if ((project.isRemote() && !savedInServer) || !StereotypesHelper.hasStereotype(project.getModel(),"String_Node_Str") || CoordinatedSyncProjectEventListenerAdapter.getProjectMapping(project).isDisabled()|| JMSSyncProjectEventListenerAdapter.getProjectMapping(project).getJmsMessageListener().isDisabled()) {
    return;
  }
  deltaSyncRunner=new DeltaSyncRunner(true,true,true);
  ProgressStatusRunner.runWithProgressStatus(deltaSyncRunner,"String_Node_Str",true,0);
}
Program: 88544
Project: 88544
Buggy source:
public void run(){
  if (TicketUtils.isTicketValid(project)) {
    initializeJMS(project);
  }
 else {
    MMSLoginAction.loginAction(project);
  }
}

Fixed version (ground truth):
public void run(){
  if (TicketUtils.isTicketSet(project)) {
    initializeJMS(project);
  }
 else {
    MMSLoginAction.loginAction(project);
  }
}
Program: 88545
Project: 88545
Buggy source:
@Override public void projectOpened(final Project project){
  closeJMS(project);
  if (shouldEnableJMS(project)) {
    new Thread(){
      public void run(){
        if (TicketUtils.isTicketValid(project)) {
          initializeJMS(project);
        }
 else {
          MMSLoginAction.loginAction(project);
        }
      }
    }
.start();
  }
}

Fixed version (ground truth):
@Override public void projectOpened(final Project project){
  closeJMS(project);
  if (shouldEnableJMS(project)) {
    new Thread(){
      public void run(){
        if (TicketUtils.isTicketSet(project)) {
          initializeJMS(project);
        }
 else {
          MMSLoginAction.loginAction(project);
        }
      }
    }
.start();
  }
}
Program: 88547
Project: 88547
Buggy source:
TicketMapping(final Project project,String ticket){
  this.ticket=ticket;
  this.ticketRenewer=Executors.newScheduledThreadPool(1);
  final Runnable renewTicket=() -> {
    try {
      TicketUtils.isTicketValid(project);
    }
 catch (    Exception ignored) {
    }
  }
;
  this.ticketRenewer.scheduleAtFixedRate(renewTicket,TICKET_RENEWAL_INTERVAL,TICKET_RENEWAL_INTERVAL,TimeUnit.SECONDS);
}

Fixed version (ground truth):
TicketMapping(final Project project,String ticket){
  this.ticket=ticket;
  this.ticketRenewer=Executors.newScheduledThreadPool(1);
  final Runnable renewTicket=() -> {
    try {
      try {
        boolean isValid=MMSUtils.validateCredentials(project,ticketMappings.get(project).getTicket()).equals(username);
        if (!isValid) {
          Application.getInstance().getGUILog().log("String_Node_Str");
          MMSLogoutAction.logoutAction(project);
        }
      }
 catch (      ServerException|IOException|URISyntaxException e) {
        Application.getInstance().getGUILog().log("String_Node_Str" + e.getMessage());
        e.printStackTrace();
      }
    }
 catch (    Exception ignored) {
    }
  }
;
  this.ticketRenewer.scheduleAtFixedRate(renewTicket,TICKET_RENEWAL_INTERVAL,TICKET_RENEWAL_INTERVAL,TimeUnit.SECONDS);
}
Program: 88552
Project: 88552
Buggy source:
@Override public void run(ProgressStatus arg0){
  BranchValidator v=new BranchValidator(Application.getInstance().getProject());
  v.validate(arg0,false);
  v.showWindow();
}

Fixed version (ground truth):
@Override public void run(ProgressStatus arg0){
  BranchValidator branchValidator=new BranchValidator(Application.getInstance().getProject());
  branchValidator.validate(arg0,true);
  if (branchValidator.hasErrors()) {
    Application.getInstance().getGUILog().log("String_Node_Str");
    return;
  }
  branchValidator.showWindow();
}
Program: 88557
Project: 88557
Buggy source:
@Override public void init(){
  getVersion();
  ActionsConfiguratorsManager acm=ActionsConfiguratorsManager.getInstance();
  System.setProperty("String_Node_Str","String_Node_Str");
  MDKConfigurator mdkConfigurator=new MDKConfigurator();
  acm.addContainmentBrowserContextConfigurator(mdkConfigurator);
  acm.addSearchBrowserContextConfigurator(mdkConfigurator);
  acm.addBaseDiagramContextConfigurator(DiagramTypeConstants.UML_ANY_DIAGRAM,mdkConfigurator);
  acm.addMainMenuConfigurator(new MMSConfigurator());
  EvaluationConfigurator.getInstance().registerBinaryImplementers(MDKPlugin.class.getClassLoader());
  SRConfigurator srconfig=new SRConfigurator();
  acm.addSearchBrowserContextConfigurator(srconfig);
  acm.addContainmentBrowserContextConfigurator(srconfig);
  acm.addBaseDiagramContextConfigurator(DiagramTypeConstants.UML_ANY_DIAGRAM,srconfig);
  acm.addMainToolbarConfigurator(new OutputQueueStatusConfigurator());
  acm.addMainToolbarConfigurator(new SyncStatusConfigurator());
  getOclPlugin().init();
  getVcPlugin().init();
  MMSSyncPlugin.getInstance().init();
  (new Thread(new OutputSyncRunner())).start();
  loadExtensionJars();
  configureEnvironmentOptions();
}

Fixed version (ground truth):
@Override public void init(){
  getVersion();
  ActionsConfiguratorsManager acm=ActionsConfiguratorsManager.getInstance();
  System.setProperty("String_Node_Str","String_Node_Str");
  if (MDUtils.isDeveloperMode()) {
    System.setProperty("String_Node_Str","String_Node_Str");
    System.setProperty("String_Node_Str","String_Node_Str");
    System.setProperty("String_Node_Str","String_Node_Str");
  }
  MDKConfigurator mdkConfigurator=new MDKConfigurator();
  acm.addContainmentBrowserContextConfigurator(mdkConfigurator);
  acm.addSearchBrowserContextConfigurator(mdkConfigurator);
  acm.addBaseDiagramContextConfigurator(DiagramTypeConstants.UML_ANY_DIAGRAM,mdkConfigurator);
  acm.addMainMenuConfigurator(new MMSConfigurator());
  EvaluationConfigurator.getInstance().registerBinaryImplementers(MDKPlugin.class.getClassLoader());
  SRConfigurator srconfig=new SRConfigurator();
  acm.addSearchBrowserContextConfigurator(srconfig);
  acm.addContainmentBrowserContextConfigurator(srconfig);
  acm.addBaseDiagramContextConfigurator(DiagramTypeConstants.UML_ANY_DIAGRAM,srconfig);
  acm.addMainToolbarConfigurator(new OutputQueueStatusConfigurator());
  acm.addMainToolbarConfigurator(new SyncStatusConfigurator());
  getOclPlugin().init();
  getVcPlugin().init();
  MMSSyncPlugin.getInstance().init();
  (new Thread(new OutputSyncRunner())).start();
  loadExtensionJars();
  configureEnvironmentOptions();
}
Program: 88560
Project: 88560
Buggy source:
private static void collectClientElementsRecursively(Project project,Element element,int depth,List<Pair<Element,ObjectNode>> elements){
  ObjectNode jsonObject=Converters.getElementToJsonConverter().apply(element,project);
  if (jsonObject == null) {
    return;
  }
  elements.add(new Pair<>(element,jsonObject));
  if (depth != 0) {
    for (    Element elementChild : element.getOwnedElement()) {
      collectClientElementsRecursively(project,elementChild,--depth,elements);
    }
  }
  if (element.equals(project.getPrimaryModel())) {
    List<Package> attachedModels=project.getModels();
    attachedModels.remove(project.getPrimaryModel());
    attachedModels.forEach(attachedModel -> collectClientElementsRecursively(project,attachedModel,0,elements));
  }
}

Fixed version (ground truth):
private static void collectClientElementsRecursively(Project project,Element element,int depth,List<Pair<Element,ObjectNode>> elements){
  ObjectNode jsonObject=Converters.getElementToJsonConverter().apply(element,project);
  if (jsonObject == null) {
    return;
  }
  elements.add(new Pair<>(element,jsonObject));
  if (depth-- != 0) {
    for (    Element elementChild : element.getOwnedElement()) {
      collectClientElementsRecursively(project,elementChild,depth,elements);
    }
  }
  if (element.equals(project.getPrimaryModel())) {
    List<Package> attachedModels=project.getModels();
    attachedModels.remove(project.getPrimaryModel());
    attachedModels.forEach(attachedModel -> collectClientElementsRecursively(project,attachedModel,0,elements));
  }
}
Program: 88562
Project: 88562
Buggy source:
@Override public void configure(ActionsManager manager){
  NMAction category=manager.getActionFor("String_Node_Str");
  if (category == null) {
    category=new MDActionsCategory("String_Node_Str","String_Node_Str");
  }
  ((ActionsCategory)category).setNested(true);
  manager.addCategory((ActionsCategory)category);
  MMSLoginAction login=new MMSLoginAction();
  category.addAction(login);
  MMSLogoutAction logout=new MMSLogoutAction();
  category.addAction(logout);
  GenerateAllDocumentsAction uada=new GenerateAllDocumentsAction();
  category.addAction(uada);
  if (MDKOptionsGroup.getMDKOptions().isMDKAdvancedOptions()) {
    MDActionsCategory validateCategory=new MDActionsCategory("String_Node_Str","String_Node_Str");
    validateCategory.setNested(true);
    category.addAction(validateCategory);
    validateCategory.addAction(new ValidateBranchesAction());
  }
}

Fixed version (ground truth):
@Override public void configure(ActionsManager manager){
  NMAction category=manager.getActionFor("String_Node_Str");
  if (category == null) {
    category=new MDActionsCategory("String_Node_Str","String_Node_Str");
  }
  ((ActionsCategory)category).setNested(true);
  manager.addCategory((ActionsCategory)category);
  MMSLoginAction mmsLoginAction=new MMSLoginAction();
  category.addAction(mmsLoginAction);
  MMSLogoutAction mmsLogoutAction=new MMSLogoutAction();
  category.addAction(mmsLogoutAction);
  GenerateAllDocumentsAction generateAllDocumentsAction=new GenerateAllDocumentsAction();
  category.addAction(generateAllDocumentsAction);
  if (MDKOptionsGroup.getMDKOptions().isMDKAdvancedOptions()) {
    MDActionsCategory validateCategory=new MDActionsCategory("String_Node_Str","String_Node_Str");
    validateCategory.setNested(true);
    category.addAction(validateCategory);
    ValidateBranchesAction validateBranchesAction=new ValidateBranchesAction();
    validateCategory.addAction(validateBranchesAction);
  }
}
Program: 88565
Project: 88565
Buggy source:
@Override public void updateState(){
  setEnabled(MDKOptionsGroup.getMDKOptions().isMDKAdvancedOptions());
}

Fixed version (ground truth):
@Override public void updateState(){
  setEnabled(TicketUtils.isTicketSet(Application.getInstance().getProject()) && !super.isDisabled() && MDKOptionsGroup.getMDKOptions().isMDKAdvancedOptions());
}
Program: 88569
Project: 88569
Buggy source:
TicketMapping(final Project project,String ticket){
  this.ticket=ticket;
  this.ticketRenewer=Executors.newScheduledThreadPool(1);
  final Runnable renewTicket=() -> {
    try {
      try {
        boolean isValid=MMSUtils.validateCredentials(project,ticketMappings.get(project).getTicket()).equals(username);
        if (!isValid) {
          Application.getInstance().getGUILog().log("String_Node_Str");
          MMSLogoutAction.logoutAction(project);
        }
      }
 catch (      ServerException|IOException|URISyntaxException e) {
        Application.getInstance().getGUILog().log("String_Node_Str" + e.getMessage());
        e.printStackTrace();
      }
    }
 catch (    Exception ignored) {
    }
  }
;
  this.ticketRenewer.scheduleAtFixedRate(renewTicket,TICKET_RENEWAL_INTERVAL,TICKET_RENEWAL_INTERVAL,TimeUnit.SECONDS);
}

Fixed version (ground truth):
TicketMapping(final Project project,String ticket){
  this.ticket=ticket;
  this.ticketRenewer=Executors.newScheduledThreadPool(1);
  final Runnable renewTicket=() -> {
    try {
      try {
        boolean isValid=isTicketValid(project);
        if (!isValid) {
          Application.getInstance().getGUILog().log("String_Node_Str");
          MMSLogoutAction.logoutAction(project);
        }
      }
 catch (      ServerException|IOException|URISyntaxException e) {
        Application.getInstance().getGUILog().log("String_Node_Str" + e.getMessage());
        e.printStackTrace();
      }
    }
 catch (    Exception ignored) {
    }
  }
;
  this.ticketRenewer.scheduleAtFixedRate(renewTicket,TICKET_RENEWAL_INTERVAL,TICKET_RENEWAL_INTERVAL,TimeUnit.SECONDS);
}
Program: 88572
Project: 88572
Buggy source:
public static boolean shouldEnableJMS(Project project){
  return ((project.getPrimaryModel() != null) && project.isRemote() && MDKOptionsGroup.getMDKOptions().isChangeListenerEnabled()&& StereotypesHelper.hasStereotype(project.getPrimaryModel(),"String_Node_Str"));
}

Fixed version (ground truth):
public static boolean shouldEnableJMS(Project project){
  String url;
  return ((project.getPrimaryModel() != null) && project.isRemote() && MDKOptionsGroup.getMDKOptions().isChangeListenerEnabled()&& StereotypesHelper.hasStereotype(project.getPrimaryModel(),"String_Node_Str")) && (url=((String)StereotypesHelper.getStereotypePropertyFirst(project.getPrimaryModel(),"String_Node_Str","String_Node_Str"))) != null && !url.isEmpty();
}
Program: 88573
Project: 88573
Buggy source:
/** 
 * Logs in to MMS, using pre-specified credentials or prompting the user for new credentials. <p> If username and password have been pre-specified, will not display the dialog even if popups are enabled. Else will display the login dialog and use the returned value.
 * @return TRUE if successfully logged in to MMS, FALSE otherwise.Will always return FALSE if popups are disabled and username/password are not pre-specified
 */
public static boolean acquireMmsTicket(Project project){
  if (!username.isEmpty() && !password.isEmpty()) {
    return acquireTicket(project,password);
  }
 else   if (!Utils.isPopupsDisabled()) {
    return acquireTicket(project,getUserCredentialsDialog());
  }
 else {
    Application.getInstance().getGUILog().log("String_Node_Str");
    return false;
  }
}

Fixed version (ground truth):
/** 
 * Logs in to MMS, using pre-specified credentials or prompting the user for new credentials. <p> If username and password have been pre-specified, will not display the dialog even if popups are enabled. Else will display the login dialog and use the returned value.
 * @return TRUE if successfully logged in to MMS, FALSE otherwise.Will always return FALSE if popups are disabled and username/password are not pre-specified
 */
public static boolean acquireMmsTicket(Project project){
  if (!username.isEmpty() && !password.isEmpty()) {
    return acquireTicket(project,password);
  }
 else   if (!Utils.isPopupsDisabled()) {
    String password=getUserCredentialsDialog();
    if (password == null) {
      return false;
    }
    return acquireTicket(project,password);
  }
 else {
    Application.getInstance().getGUILog().log("String_Node_Str");
    return false;
  }
}
Program: 88574
Project: 88574
Buggy source:
@Override public void configure(ActionsManager manager){
  NMAction category=manager.getActionFor("String_Node_Str");
  if (category == null) {
    category=new MDActionsCategory("String_Node_Str","String_Node_Str");
  }
  ((ActionsCategory)category).setNested(true);
  manager.addCategory((ActionsCategory)category);
  MMSLoginAction login=new MMSLoginAction();
  category.addAction(login);
  MMSLogoutAction logout=new MMSLogoutAction();
  category.addAction(logout);
  UpdateAllDocumentsAction uada=new UpdateAllDocumentsAction();
  category.addAction(uada);
  if (MDKOptionsGroup.getMDKOptions().isMDKAdvancedOptions()) {
    MDActionsCategory validateCategory=new MDActionsCategory("String_Node_Str","String_Node_Str");
    validateCategory.setNested(true);
    category.addAction(validateCategory);
    validateCategory.addAction(new ValidateBranchesAction());
  }
}

Fixed version (ground truth):
@Override public void configure(ActionsManager manager){
  NMAction category=manager.getActionFor("String_Node_Str");
  if (category == null) {
    category=new MDActionsCategory("String_Node_Str","String_Node_Str");
  }
  ((ActionsCategory)category).setNested(true);
  manager.addCategory((ActionsCategory)category);
  MMSLoginAction login=new MMSLoginAction();
  category.addAction(login);
  MMSLogoutAction logout=new MMSLogoutAction();
  category.addAction(logout);
  GenerateAllDocumentsAction uada=new GenerateAllDocumentsAction();
  category.addAction(uada);
  if (MDKOptionsGroup.getMDKOptions().isMDKAdvancedOptions()) {
    MDActionsCategory validateCategory=new MDActionsCategory("String_Node_Str","String_Node_Str");
    validateCategory.setNested(true);
    category.addAction(validateCategory);
    validateCategory.addAction(new ValidateBranchesAction());
  }
}
Program: 88575
Project: 88575
Buggy source:
public static void generateAllDocuments(Project project){
  UpdateAllDocumentsAction uad=new UpdateAllDocumentsAction();
  validationWindow=new MDKValidationWindow(uad.updateAction(project));
}

Fixed version (ground truth):
public static void generateAllDocuments(Project project){
  GenerateAllDocumentsAction uad=new GenerateAllDocumentsAction();
  validationWindow=new MDKValidationWindow(uad.updateAction(project));
}
Program: 88577
Project: 88577
Buggy source:
private boolean handleCancel(ProgressStatus progressStatus){
  if (progressStatus.isCancel()) {
    failure=true;
    if (SessionManager.getInstance().isSessionCreated(project)) {
      SessionManager.getInstance().cancelSession(project);
    }
    Application.getInstance().getGUILog().log("String_Node_Str");
    return true;
  }
  return false;
}

Fixed version (ground truth):
private boolean handleCancel(ProgressStatus progressStatus){
  if (progressStatus.isCancel()) {
    failure=true;
    if (manageSesssions) {
      if (SessionManager.getInstance().isSessionCreated(project)) {
        SessionManager.getInstance().cancelSession(project);
      }
    }
    Application.getInstance().getGUILog().log("String_Node_Str");
    return true;
  }
  return false;
}
Program: 88578
Project: 88578
Buggy source:
public ViewPresentationGenerator(Element start,boolean recurse,boolean showValidation,PresentationElementUtils viu,Map<String,ObjectNode> images,Set<Element> processedElements){
  this.start=start;
  this.project=Project.getProject(start);
  this.images=images != null ? images : new HashMap<>();
  this.processedElements=processedElements != null ? processedElements : new HashSet<>();
  this.recurse=recurse;
  this.showValidation=showValidation;
  this.instanceUtils=viu;
  if (this.instanceUtils == null) {
    this.instanceUtils=new PresentationElementUtils();
  }
  suite.addValidationRule(uneditableContent);
  suite.addValidationRule(viewInProject);
  suite.addValidationRule(updateFailed);
  suite.addValidationRule(uneditableElements);
  suite.addValidationRule(viewDoesNotExist);
  vss.add(suite);
}

Fixed version (ground truth):
public ViewPresentationGenerator(Element start,boolean recurse,boolean showValidation,PresentationElementUtils viu,Map<String,ObjectNode> images,Set<Element> processedElements){
  this(start,recurse,showValidation,viu,images,processedElements,true);
}
Program: 88580
Project: 88580
Buggy source:
@Override public void projectPreSaved(Project project,boolean savedInServer){
  deltaSyncRunner=null;
  if ((project.isRemote() && !savedInServer) || !StereotypesHelper.hasStereotype(project.getModel(),"String_Node_Str") || CoordinatedSyncProjectEventListenerAdapter.getProjectMapping(project).isDisabled()|| JMSSyncProjectEventListenerAdapter.getProjectMapping(project).getJmsMessageListener().isDisabled()) {
    return;
  }
  if (!TicketUtils.isTicketValid(project)) {
    Application.getInstance().getGUILog().log("String_Node_Str");
    new Thread(){
      public void run(){
        MMSLoginAction.loginAction(project);
      }
    }
.start();
    return;
  }
  deltaSyncRunner=new DeltaSyncRunner(true,true,true);
  ProgressStatusRunner.runWithProgressStatus(deltaSyncRunner,"String_Node_Str",true,0);
}

Fixed version (ground truth):
@Override public void projectPreSaved(Project project,boolean savedInServer){
  deltaSyncRunner=null;
  if ((project.isRemote() && !savedInServer) || !StereotypesHelper.hasStereotype(project.getModel(),"String_Node_Str") || CoordinatedSyncProjectEventListenerAdapter.getProjectMapping(project).isDisabled()|| JMSSyncProjectEventListenerAdapter.getProjectMapping(project).getJmsMessageListener().isDisabled()) {
    return;
  }
  deltaSyncRunner=new DeltaSyncRunner(true,true,true);
  ProgressStatusRunner.runWithProgressStatus(deltaSyncRunner,"String_Node_Str",true,0);
}
Program: 88582
Project: 88582
Buggy source:
public void run(){
  if (TicketUtils.isTicketValid(project)) {
    initializeJMS(project);
  }
 else {
    MMSLoginAction.loginAction(project);
  }
}

Fixed version (ground truth):
public void run(){
  if (TicketUtils.isTicketSet(project)) {
    initializeJMS(project);
  }
 else {
    MMSLoginAction.loginAction(project);
  }
}
Program: 88583
Project: 88583
Buggy source:
@Override public void projectOpened(final Project project){
  closeJMS(project);
  if (shouldEnableJMS(project)) {
    new Thread(){
      public void run(){
        if (TicketUtils.isTicketValid(project)) {
          initializeJMS(project);
        }
 else {
          MMSLoginAction.loginAction(project);
        }
      }
    }
.start();
  }
}

Fixed version (ground truth):
@Override public void projectOpened(final Project project){
  closeJMS(project);
  if (shouldEnableJMS(project)) {
    new Thread(){
      public void run(){
        if (TicketUtils.isTicketSet(project)) {
          initializeJMS(project);
        }
 else {
          MMSLoginAction.loginAction(project);
        }
      }
    }
.start();
  }
}
Program: 88585
Project: 88585
Buggy source:
public static boolean loginAction(Project project,boolean initJms){
  if (project == null) {
    Utils.showPopupMessage("String_Node_Str");
    return false;
  }
  if (project.isRemote() && (TeamworkUtils.getLoggedUserName() == null && EsiUtils.getTeamworkService().getConnectedUser() == null)) {
    Utils.showPopupMessage("String_Node_Str" + (ProjectUtilities.isFromEsiServer(project.getPrimaryProject()) ? "String_Node_Str" : "String_Node_Str") + "String_Node_Str");
    return false;
  }
  if (!TicketUtils.loginToMMS()) {
    return false;
  }
  Application.getInstance().getGUILog().log("String_Node_Str");
  if (initJms) {
    for (    Project p : Application.getInstance().getProjectsManager().getProjects()) {
      MMSSyncPlugin.getInstance().getJmsSyncProjectEventListenerAdapter().closeJMS(p);
      MMSSyncPlugin.getInstance().getJmsSyncProjectEventListenerAdapter().initializeJMS(p);
    }
  }
  return true;
}

Fixed version (ground truth):
public static boolean loginAction(Project project){
  if (project == null) {
    Utils.showPopupMessage("String_Node_Str");
    return false;
  }
  if (project.isRemote() && (TeamworkUtils.getLoggedUserName() == null && EsiUtils.getTeamworkService().getConnectedUser() == null)) {
    Utils.showPopupMessage("String_Node_Str" + (ProjectUtilities.isFromEsiServer(project.getPrimaryProject()) ? "String_Node_Str" : "String_Node_Str") + "String_Node_Str");
    return false;
  }
  if (!TicketUtils.isTicketValid(project)) {
    if (!TicketUtils.loginToMMS(project)) {
      return false;
    }
 else {
      Application.getInstance().getGUILog().log("String_Node_Str");
    }
  }
  MMSSyncPlugin.getInstance().getJmsSyncProjectEventListenerAdapter().closeJMS(project);
  MMSSyncPlugin.getInstance().getJmsSyncProjectEventListenerAdapter().initializeJMS(project);
  return true;
}
Program: 88586
Project: 88586
Buggy source:
public synchronized boolean isDisabled(){
  return disabled;
}

Fixed version (ground truth):
public synchronized boolean isDisabled(){
  return (disabled || !MDKOptionsGroup.getMDKOptions().isCoordinatedSyncEnabled());
}
Program: 88587
Project: 88587
Buggy source:
@Override public void projectPreSaved(Project project,boolean savedInServer){
  deltaSyncRunner=null;
  boolean enabled=MDKOptionsGroup.getMDKOptions().isCoordinatedSyncEnabled();
  if (!enabled) {
    return;
  }
  CoordinatedSyncProjectMapping coordinatedSyncProjectMapping=getProjectMapping(project);
  if (coordinatedSyncProjectMapping.isDisabled()) {
    return;
  }
  if (!StereotypesHelper.hasStereotype(project.getPrimaryModel(),"String_Node_Str")) {
    return;
  }
  if (!TicketUtils.isTicketSet()) {
    Application.getInstance().getGUILog().log("String_Node_Str");
    EMSLoginAction.loginAction(project);
    return;
  }
  if (project.isRemote() && !savedInServer) {
    Application.getInstance().getGUILog().log("String_Node_Str" + (ProjectUtilities.isFromEsiServer(project.getPrimaryProject()) ? "String_Node_Str" : "String_Node_Str") + "String_Node_Str");
    return;
  }
  deltaSyncRunner=new DeltaSyncRunner(true,true,true);
  ProgressStatusRunner.runWithProgressStatus(deltaSyncRunner,"String_Node_Str",true,0);
}

Fixed version (ground truth):
@Override public void projectPreSaved(Project project,boolean savedInServer){
  deltaSyncRunner=null;
  if (!StereotypesHelper.hasStereotype(project.getModel(),"String_Node_Str") || CoordinatedSyncProjectEventListenerAdapter.getProjectMapping(project).isDisabled() || JMSSyncProjectEventListenerAdapter.getProjectMapping(project).isDisabled()|| (project.isRemote() && !savedInServer)) {
    return;
  }
  if (!TicketUtils.isTicketSet()) {
    Application.getInstance().getGUILog().log("String_Node_Str");
    EMSLoginAction.loginAction(project);
    return;
  }
  deltaSyncRunner=new DeltaSyncRunner(true,true,true);
  ProgressStatusRunner.runWithProgressStatus(deltaSyncRunner,"String_Node_Str",true,0);
}
Program: 88588
Project: 88588
Buggy source:
private static void persistChanges(Project project){
  LocalSyncTransactionCommitListener listener=LocalSyncProjectEventListenerAdapter.getProjectMapping(project).getLocalSyncTransactionCommitListener();
  if (listener != null) {
    listener.setDisabled(true);
  }
  for (  Map.Entry<SyncElement.Type,Function<Project,Changelog<String,?>>> entry : CHANGELOG_FUNCTIONS.entrySet()) {
    Changelog<String,?> changelog=entry.getValue().apply(project);
    if (!SessionManager.getInstance().isSessionCreated(project)) {
      SessionManager.getInstance().createSession(project,"String_Node_Str");
    }
    try {
      SyncElements.setByType(project,entry.getKey(),JacksonUtils.getObjectMapper().writeValueAsString(SyncElements.buildJson(changelog)));
    }
 catch (    JsonProcessingException e) {
      e.printStackTrace();
    }
  }
  if (SessionManager.getInstance().isSessionCreated(project)) {
    SessionManager.getInstance().closeSession();
  }
  if (listener != null) {
    listener.setDisabled(false);
  }
}

Fixed version (ground truth):
private static void persistChanges(Project project){
  LocalSyncTransactionCommitListener listener=LocalSyncProjectEventListenerAdapter.getProjectMapping(project).getLocalSyncTransactionCommitListener();
  if (listener != null) {
    listener.setDisabled(true);
  }
  if (!SessionManager.getInstance().isSessionCreated(project)) {
    SessionManager.getInstance().createSession(project,"String_Node_Str");
  }
  for (  Map.Entry<SyncElement.Type,Function<Project,Changelog<String,?>>> entry : CHANGELOG_FUNCTIONS.entrySet()) {
    Changelog<String,?> changelog=entry.getValue().apply(project);
    try {
      SyncElements.setByType(project,entry.getKey(),JacksonUtils.getObjectMapper().writeValueAsString(SyncElements.buildJson(changelog)));
    }
 catch (    JsonProcessingException e) {
      e.printStackTrace();
    }
  }
  if (SessionManager.getInstance().isSessionCreated(project)) {
    SessionManager.getInstance().closeSession();
  }
  if (listener != null) {
    listener.setDisabled(false);
  }
}
Program: 88589
Project: 88589
Buggy source:
public boolean isExceptionHandlerRunning(){
  return exceptionHandlerRunning;
}

Fixed version (ground truth):
public boolean isExceptionHandlerRunning(){
synchronized (this.exceptionHandlerRunning) {
    return exceptionHandlerRunning.get();
  }
}
Program: 88592
Project: 88592
Buggy source:
@Override public void projectSaved(Project project,boolean savedInServer){
  JMSSyncProjectMapping jmsSyncProjectMapping=getProjectMapping(project);
  JMSMessageListener JMSMessageListener=jmsSyncProjectMapping.getJmsMessageListener();
  if (JMSMessageListener != null) {
    JMSMessageListener.getInMemoryJMSChangelog().clear();
  }
}

Fixed version (ground truth):
@Override public void projectSaved(Project project,boolean savedInServer){
  JMSSyncProjectMapping jmsSyncProjectMapping=getProjectMapping(project);
  JMSMessageListener jmsMessageListener=jmsSyncProjectMapping.getJmsMessageListener();
  if (jmsMessageListener != null) {
    jmsMessageListener.getInMemoryJMSChangelog().clear();
  }
}
Program: 88593
Project: 88593
Buggy source:
public void setDisabled(boolean disabled){
  this.disabled=disabled;
}

Fixed version (ground truth):
public void setDisabled(boolean disabled){
  this.jmsMessageListener.setDisabled(disabled);
}
Program: 88594
Project: 88594
Buggy source:
public void run(){
  if (TicketUtils.isTicketValid()) {
    initializeJMS(project);
  }
 else {
    EMSLoginAction.loginAction(project,true);
  }
}

Fixed version (ground truth):
public void run(){
  if (TicketUtils.isTicketValid(project)) {
    initializeJMS(project);
  }
 else {
    EMSLoginAction.loginAction(project);
  }
}
Program: 88595
Project: 88595
Buggy source:
@Override public void projectOpened(final Project project){
  closeJMS(project);
  if (shouldEnableJMS(project)) {
    new Thread(){
      public void run(){
        if (TicketUtils.isTicketValid()) {
          initializeJMS(project);
        }
 else {
          EMSLoginAction.loginAction(project,true);
        }
      }
    }
.start();
  }
}

Fixed version (ground truth):
@Override public void projectOpened(final Project project){
  closeJMS(project);
  if (shouldEnableJMS(project)) {
    new Thread(){
      public void run(){
        if (TicketUtils.isTicketValid(project)) {
          initializeJMS(project);
        }
 else {
          EMSLoginAction.loginAction(project);
        }
      }
    }
.start();
  }
}
Program: 88596
Project: 88596
Buggy source:
public boolean isDisabled(){
  if (jmsMessageListener == null) {
    disabled=true;
  }
  return disabled;
}

Fixed version (ground truth):
public boolean isDisabled(){
  if (jmsMessageListener == null) {
    return true;
  }
  return this.jmsMessageListener.isDisabled();
}
Program: 88597
Project: 88597
Buggy source:
public void initializeJMS(Project project){
  JMSSyncProjectMapping jmsSyncProjectMapping=getProjectMapping(project);
  boolean initialized=initDurable(project);
  jmsSyncProjectMapping.setDisabled(!shouldEnableJMS(project) || !initialized);
}

Fixed version (ground truth):
public void initializeJMS(Project project){
  JMSSyncProjectMapping jmsSyncProjectMapping=getProjectMapping(project);
  if (!shouldEnableJMS(project)) {
    jmsSyncProjectMapping.setDisabled(true);
    return;
  }
  boolean initialized=initDurable(project);
  jmsSyncProjectMapping.setDisabled(!initialized);
}
Program: 88598
Project: 88598
Buggy source:
@Override public void projectSaved(Project project,boolean savedInServer){
  LocalSyncProjectMapping localSyncProjectMapping=LocalSyncProjectEventListenerAdapter.getProjectMapping(project);
  gov.nasa.jpl.mbee.mdk.ems.sync.local.LocalSyncTransactionCommitListener listener=localSyncProjectMapping.getLocalSyncTransactionCommitListener();
  if (listener == null) {
    projectOpened(project);
    listener=LocalSyncProjectEventListenerAdapter.getProjectMapping(project).getLocalSyncTransactionCommitListener();
  }
  listener.getInMemoryLocalChangelog().clear();
}

Fixed version (ground truth):
@Override public void projectSaved(Project project,boolean savedInServer){
  LocalSyncProjectMapping localSyncProjectMapping=LocalSyncProjectEventListenerAdapter.getProjectMapping(project);
  LocalSyncTransactionCommitListener listener=localSyncProjectMapping.getLocalSyncTransactionCommitListener();
  if (listener == null) {
    projectOpened(project);
    listener=LocalSyncProjectEventListenerAdapter.getProjectMapping(project).getLocalSyncTransactionCommitListener();
  }
  listener.getInMemoryLocalChangelog().clear();
}
Program: 88599
Project: 88599
Buggy source:
@Override public void projectOpened(Project project){
  projectClosed(project);
  LocalSyncProjectMapping localSyncProjectMapping=getProjectMapping(project);
  gov.nasa.jpl.mbee.mdk.ems.sync.local.LocalSyncTransactionCommitListener listener=localSyncProjectMapping.getLocalSyncTransactionCommitListener() != null ? localSyncProjectMapping.getLocalSyncTransactionCommitListener() : new gov.nasa.jpl.mbee.mdk.ems.sync.local.LocalSyncTransactionCommitListener(project);
  if (project.isRemote()) {
    ((MDTransactionManager)project.getRepository().getTransactionManager()).addTransactionCommitListenerIncludingUndoAndRedo(listener);
  }
  localSyncProjectMapping.setLocalSyncTransactionCommitListener(listener);
}

Fixed version (ground truth):
@Override public void projectOpened(Project project){
  closeLocalCommitListener(project);
  LocalSyncProjectMapping localSyncProjectMapping=getProjectMapping(project);
  LocalSyncTransactionCommitListener listener=(localSyncProjectMapping.getLocalSyncTransactionCommitListener() != null ? localSyncProjectMapping.getLocalSyncTransactionCommitListener() : new LocalSyncTransactionCommitListener(project));
  if (project.isRemote()) {
    ((MDTransactionManager)project.getRepository().getTransactionManager()).addTransactionCommitListenerIncludingUndoAndRedo(listener);
  }
  localSyncProjectMapping.setLocalSyncTransactionCommitListener(listener);
}
Program: 88600
Project: 88600
Buggy source:
@Override public void projectClosed(Project project){
  LocalSyncProjectMapping localSyncProjectMapping=getProjectMapping(project);
  if (localSyncProjectMapping.getLocalSyncTransactionCommitListener() != null) {
    project.getRepository().getTransactionManager().removeTransactionCommitListener(localSyncProjectMapping.getLocalSyncTransactionCommitListener());
  }
}

Fixed version (ground truth):
@Override public void projectClosed(Project project){
  closeLocalCommitListener(project);
}
Program: 88601
Project: 88601
Buggy source:
public boolean isDisabled(){
synchronized (this.disabled) {
    return disabled.get();
  }
}

Fixed version (ground truth):
public boolean isDisabled(){
synchronized (this.disabled) {
    return (disabled.get() || !MDKOptionsGroup.getMDKOptions().isChangeListenerEnabled());
  }
}
Program: 88602
Project: 88602
Buggy source:
@Override public Runnable transactionCommited(Collection<PropertyChangeEvent> events){
  if (isDisabled() || !MDKOptionsGroup.getMDKOptions().isChangeListenerEnabled()) {
    return null;
  }
  return new TransactionCommitHandler(events,project);
}

Fixed version (ground truth):
@Override public Runnable transactionCommited(Collection<PropertyChangeEvent> events){
  if (isDisabled()) {
    return null;
  }
  return new TransactionCommitHandler(events,project);
}
Program: 88603
Project: 88603
Buggy source:
@Override public void projectSaved(Project project,boolean savedInServer){
  projectOpened(project);
}

Fixed version (ground truth):
@Override public void projectSaved(Project project,boolean savedInServer){
  updateSyncStatus();
}
Program: 88604
Project: 88604
Buggy source:
@Override public void projectOpened(Project project){
  SyncStatusConfigurator.getSyncStatusAction().update();
}

Fixed version (ground truth):
@Override public void projectOpened(Project project){
  updateSyncStatus();
}
Program: 88605
Project: 88605
Buggy source:
@Override public void projectClosed(Project project){
  projectOpened(project);
}

Fixed version (ground truth):
@Override public void projectClosed(Project project){
  updateSyncStatus();
}
Program: 88607
Project: 88607
Buggy source:
public static Class createBlock(String name,Element owner){
  Class newBlock=createClass(name,owner);
  Element stereo=ElementFinder.getElementByID("String_Node_Str");
  if (!(stereo instanceof Stereotype)) {
    return null;
  }
  Stereotype block=(Stereotype)stereo;
  StereotypesHelper.addStereotype(newBlock,block);
  return newBlock;
}

Fixed version (ground truth):
public static Class createBlock(String name,Element owner){
  Class newBlock=createClass(name,owner);
  Element stereo=ElementFinder.getElementByID("String_Node_Str",Project.getProject(owner));
  if (!(stereo instanceof Stereotype)) {
    return null;
  }
  Stereotype block=(Stereotype)stereo;
  StereotypesHelper.addStereotype(newBlock,block);
  return newBlock;
}
Program: 88608
Project: 88608
Buggy source:
public static Property createPartProperty(String name,Element owner){
  Property newProp=createProperty(name,owner,null,null,null,null,null);
  Element stereo=ElementFinder.getElementByID("String_Node_Str");
  if (!(stereo instanceof Stereotype)) {
    return null;
  }
  Stereotype partProp=(Stereotype)stereo;
  StereotypesHelper.addStereotype(newProp,partProp);
  return newProp;
}

Fixed version (ground truth):
public static Property createPartProperty(String name,Element owner){
  Property newProp=createProperty(name,owner,null,null,null,null,null);
  Element stereo=ElementFinder.getElementByID("String_Node_Str",Project.getProject(owner));
  if (!(stereo instanceof Stereotype)) {
    return null;
  }
  Stereotype partProp=(Stereotype)stereo;
  StereotypesHelper.addStereotype(newProp,partProp);
  return newProp;
}
Program: 88609
Project: 88609
Buggy source:
@BeforeClass public static void setupProject() throws IOException, ServerException, URISyntaxException {
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str" + System.getProperty("String_Node_Str"));
  System.out.println("String_Node_Str");
  Assert.fail("String_Node_Str");
  MDKTestHelper.setMmsCredentials("String_Node_Str","String_Node_Str");
  MagicDrawHelper.openProject(filename);
  if (!MDKHelper.isSiteEditable()) {
    throw new IOException("String_Node_Str");
  }
  MagicDrawHelper.createSession();
  try {
    MagicDrawHelper.clearModel();
  }
 catch (  ReadOnlyElementException roee) {
    System.out.println(roee.getMessage() + "String_Node_Str" + roee.getElement().getHumanName());
  }
  MagicDrawHelper.closeSession();
  MagicDrawHelper.createSession();
  targetPackage=MagicDrawHelper.createPackage("String_Node_Str",ElementFinder.getModelRoot());
  targetElement=MagicDrawHelper.createDocument("String_Node_Str",targetPackage);
  MagicDrawHelper.setElementDocumentation(targetElement,"String_Node_Str");
  MagicDrawHelper.closeSession();
  MagicDrawHelper.saveProject(filename);
  MDKHelper.loadCoordinatedSyncValidations();
  MDKHelper.getValidationWindow().listPooledViolations();
  MDKHelper.getValidationWindow().commitAllMDChangesToMMS();
}

Fixed version (ground truth):
@BeforeClass public static void setupProject() throws IOException, ServerException, URISyntaxException {
  MDKTestHelper.setMmsCredentials("String_Node_Str","String_Node_Str");
  MagicDrawHelper.openProject(filename);
  if (!MDKHelper.isSiteEditable()) {
    throw new IOException("String_Node_Str");
  }
  MagicDrawHelper.createSession();
  try {
    MagicDrawHelper.clearModel();
  }
 catch (  ReadOnlyElementException roee) {
    System.out.println(roee.getMessage() + "String_Node_Str" + roee.getElement().getHumanName());
  }
  MagicDrawHelper.closeSession();
  MagicDrawHelper.createSession();
  targetPackage=MagicDrawHelper.createPackage("String_Node_Str",ElementFinder.getModelRoot());
  targetElement=MagicDrawHelper.createDocument("String_Node_Str",targetPackage);
  MagicDrawHelper.setElementDocumentation(targetElement,"String_Node_Str");
  MagicDrawHelper.closeSession();
  MagicDrawHelper.saveProject(filename);
  MDKHelper.loadCoordinatedSyncValidations();
  MDKHelper.getValidationWindow().listPooledViolations();
  MDKHelper.getValidationWindow().commitAllMDChangesToMMS();
}
Program: 88610
Project: 88610
Buggy source:
@BeforeClass public static void setupProject() throws IOException, ServerException, URISyntaxException {
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str" + System.getProperty("String_Node_Str"));
  System.out.println("String_Node_Str");
  Assert.fail("String_Node_Str");
  MDKTestHelper.setMmsCredentials("String_Node_Str","String_Node_Str");
  MagicDrawHelper.openProject(filename);
  if (!MDKHelper.isSiteEditable()) {
    throw new IOException("String_Node_Str");
  }
  MagicDrawHelper.createSession();
  try {
    MagicDrawHelper.clearModel();
  }
 catch (  ReadOnlyElementException roee) {
    System.out.println(roee.getMessage() + "String_Node_Str" + roee.getElement().getHumanName());
  }
  MagicDrawHelper.closeSession();
  MagicDrawHelper.createSession();
  targetPackage=MagicDrawHelper.createPackage("String_Node_Str",ElementFinder.getModelRoot());
  targetElement=MagicDrawHelper.createDocument("String_Node_Str",targetPackage);
  MagicDrawHelper.setElementDocumentation(targetElement,"String_Node_Str");
  MagicDrawHelper.closeSession();
  MagicDrawHelper.saveProject(filename);
  MDKHelper.loadCoordinatedSyncValidations();
  MDKHelper.getValidationWindow().listPooledViolations();
  MDKHelper.getValidationWindow().commitAllMDChangesToMMS();
}

Fixed version (ground truth):
@BeforeClass public static void setupProject() throws IOException, ServerException, URISyntaxException {
  MDKTestHelper.setMmsCredentials("String_Node_Str","String_Node_Str");
  MagicDrawHelper.openProject(filename);
  if (!MDKHelper.isSiteEditable()) {
    throw new IOException("String_Node_Str");
  }
  MagicDrawHelper.createSession();
  try {
    MagicDrawHelper.clearModel();
  }
 catch (  ReadOnlyElementException roee) {
    System.out.println(roee.getMessage() + "String_Node_Str" + roee.getElement().getHumanName());
  }
  MagicDrawHelper.closeSession();
  MagicDrawHelper.createSession();
  targetPackage=MagicDrawHelper.createPackage("String_Node_Str",ElementFinder.getModelRoot());
  targetElement=MagicDrawHelper.createDocument("String_Node_Str",targetPackage);
  MagicDrawHelper.setElementDocumentation(targetElement,"String_Node_Str");
  MagicDrawHelper.closeSession();
  MagicDrawHelper.saveProject(filename);
  MDKHelper.loadCoordinatedSyncValidations();
  MDKHelper.getValidationWindow().listPooledViolations();
  MDKHelper.getValidationWindow().commitAllMDChangesToMMS();
}
Program: 88613
Project: 88613
Buggy source:
public static void setProperty(Property p,JSONObject spec){
  String ptype=(String)spec.get("String_Node_Str");
  if (ptype != null) {
    Type t=(Type)ExportUtility.getElementFromID(ptype);
    if (t != null)     p.setType(t);
 else     log.info("String_Node_Str");
  }
  AggregationKind aggr=AggregationKindEnum.getByName(((String)spec.get("String_Node_Str")).toLowerCase());
  if (aggr != null) {
    p.setAggregation(aggr);
  }
}

Fixed version (ground truth):
public static void setProperty(Property p,JSONObject spec){
  String ptype=(String)spec.get("String_Node_Str");
  if (ptype != null) {
    Type t=(Type)ExportUtility.getElementFromID(ptype);
    if (t != null)     p.setType(t);
 else     log.info("String_Node_Str");
  }
  AggregationKind aggr=null;
  if (spec.get("String_Node_Str") != null)   aggr=AggregationKindEnum.getByName(((String)spec.get("String_Node_Str")).toLowerCase());
  if (aggr != null) {
    p.setAggregation(aggr);
  }
}
Program: 88614
Project: 88614
Buggy source:
@SuppressWarnings("String_Node_Str") @Override public void actionPerformed(ActionEvent ae){
  ManualSyncRunner msr=new ManualSyncRunner(false);
  ProgressStatusRunner.runWithProgressStatus(msr,"String_Node_Str",true,0);
  if (msr.getFailure()) {
    Utils.guilog("String_Node_Str");
    return;
  }
  ViewPresentationGenerator vg=new ViewPresentationGenerator(doc,true,msr.getCannotChange());
  ProgressStatusRunner.runWithProgressStatus(vg,"String_Node_Str",true,0);
  if (vg.getFailure()) {
    Utils.guilog("String_Node_Str");
    return;
  }
  Stereotype documentView=Utils.getProductStereotype();
  if (StereotypesHelper.hasStereotypeOrDerived(doc,documentView))   ProgressStatusRunner.runWithProgressStatus(new ValidateViewRunner(doc,false,true),"String_Node_Str",true,0);
  ManualSyncRunner msr2=new ManualSyncRunner(true,true);
  ProgressStatusRunner.runWithProgressStatus(msr2,"String_Node_Str",true,0);
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @Override public void actionPerformed(ActionEvent ae){
  ManualSyncRunner msr=new ManualSyncRunner(false,false);
  ProgressStatusRunner.runWithProgressStatus(msr,"String_Node_Str",true,0);
  if (msr.getFailure()) {
    Utils.guilog("String_Node_Str");
    return;
  }
  ViewPresentationGenerator vg=new ViewPresentationGenerator(doc,true,msr.getCannotChange());
  ProgressStatusRunner.runWithProgressStatus(vg,"String_Node_Str",true,0);
  if (vg.getFailure()) {
    Utils.guilog("String_Node_Str");
    return;
  }
  Stereotype documentView=Utils.getProductStereotype();
  if (StereotypesHelper.hasStereotypeOrDerived(doc,documentView))   ProgressStatusRunner.runWithProgressStatus(new ValidateViewRunner(doc,false,true),"String_Node_Str",true,0);
  ManualSyncRunner msr2=new ManualSyncRunner(true,false);
  ProgressStatusRunner.runWithProgressStatus(msr2,"String_Node_Str",true,0);
}
Program: 88616
Project: 88616
Buggy source:
public MigrationAction(MigrationKind mk){
  super(actionid,mk.title,null,null);
  this.mk=mk;
}

Fixed version (ground truth):
public MigrationAction(MigrationKind mk){
  super(actionid + mk.actionid,mk.title,null,null);
  this.mk=mk;
}