Program: 123764
Project: 123764
Buggy source:
@SuppressWarnings("String_Node_Str") @Override public void keyPressed(KeyEvent e){
  if (e.keyCode == SWT.F5) {
    IContextParameter parameter=buildParameterFrom(text,process.getContextManager(),parameterName);
    if (parameter == null) {
      return;
    }
    ContextParameterWizard prmWizard=new ContextParameterWizard(process.getContextManager(),parameter);
    WizardDialog dlg=new WizardDialog(text.getShell(),prmWizard);
    if (dlg.open() == WizardDialog.OK) {
      ECodeLanguage curLanguage=LanguageManager.getCurrentLanguage();
      String replaceCode="String_Node_Str";
      if (curLanguage == ECodeLanguage.PERL) {
        replaceCode=ContextParameterUtils.getScriptCode(parameter,((RepositoryContext)CorePlugin.getContext().getProperty(Context.REPOSITORY_CONTEXT_KEY)).getProject().getLanguage());
      }
 else {
        replaceCode=ContextParameterUtils.getNewScriptCode(parameter.getName(),curLanguage);
      }
      if (text instanceof Text) {
        if (((Text)text).getSelectionCount() == 0) {
          ((Text)text).setText(replaceCode);
        }
 else {
          ((Text)text).insert(replaceCode);
        }
        saveContext(parameterName,elem,((Text)text).getText(),process);
      }
 else {
        if (text instanceof StyledText) {
          if (((StyledText)text).getSelectionCount() == 0) {
            ((StyledText)text).setText(replaceCode);
          }
 else {
            ((StyledText)text).insert(replaceCode);
          }
          saveContext(parameterName,elem,((StyledText)text).getText(),process);
        }
      }
    }
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @Override public void keyPressed(KeyEvent e){
  if (e.keyCode == SWT.F5) {
    if (process == null) {
      return;
    }
    IContextParameter parameter=buildParameterFrom(text,process.getContextManager(),parameterName);
    if (parameter == null) {
      return;
    }
    ContextParameterWizard prmWizard=new ContextParameterWizard(process.getContextManager(),parameter);
    WizardDialog dlg=new WizardDialog(text.getShell(),prmWizard);
    if (dlg.open() == WizardDialog.OK) {
      ECodeLanguage curLanguage=LanguageManager.getCurrentLanguage();
      String replaceCode="String_Node_Str";
      if (curLanguage == ECodeLanguage.PERL) {
        replaceCode=ContextParameterUtils.getScriptCode(parameter,((RepositoryContext)CorePlugin.getContext().getProperty(Context.REPOSITORY_CONTEXT_KEY)).getProject().getLanguage());
      }
 else {
        replaceCode=ContextParameterUtils.getNewScriptCode(parameter.getName(),curLanguage);
      }
      if (text instanceof Text) {
        if (((Text)text).getSelectionCount() == 0) {
          ((Text)text).setText(replaceCode);
        }
 else {
          ((Text)text).insert(replaceCode);
        }
        saveContext(parameterName,elem,((Text)text).getText(),process);
      }
 else {
        if (text instanceof StyledText) {
          if (((StyledText)text).getSelectionCount() == 0) {
            ((StyledText)text).setText(replaceCode);
          }
 else {
            ((StyledText)text).insert(replaceCode);
          }
          saveContext(parameterName,elem,((StyledText)text).getText(),process);
        }
      }
    }
  }
}