Program: 117981
Project: 117981
Buggy source:
/** 
 * Test if the selected item is a node.
 * @return true/false
 */
@SuppressWarnings("String_Node_Str") private boolean canPerformAction(){
  if (getSelectedObjects().isEmpty()) {
    return false;
  }
  List parts=getSelectedObjects();
  if (parts.size() == 1) {
    Object o=parts.get(0);
    if (!(o instanceof NodePart)) {
      return false;
    }
    nodePart=(NodePart)o;
    if (!(nodePart.getModel() instanceof Node)) {
      return false;
    }
    Node node=(Node)nodePart.getModel();
    if (!node.isActivate()) {
      return false;
    }
    if (node.getJobletNode() != null) {
      return false;
    }
    if (connecType.hasConnectionCategory(IConnectionCategory.EXECUTION_ORDER)) {
      if (!(Boolean)node.getPropertyValue(EParameterName.STARTABLE.getName()) || (!node.getProcessStartNode(false).equals(node))) {
        if (!node.isELTMapComponent()) {
          boolean jobletOk=false;
          if (PluginChecker.isJobLetPluginLoaded()) {
            IJobletProviderService service=(IJobletProviderService)GlobalServiceRegister.getDefault().getService(IJobletProviderService.class);
            if (service != null && service.isJobletComponent(node)) {
              jobletOk=true;
            }
          }
          if (!jobletOk) {
            return false;
          }
        }
      }
    }
    menuList=new ArrayList<String>();
    if (curNodeConnector == null) {
      curNodeConnector=node.getConnectorFromType(connecType);
      if (curNodeConnector == null) {
        return false;
      }
    }
    if (curNodeConnector.getMaxLinkOutput() != -1) {
      if (curNodeConnector.getCurLinkNbOutput() >= curNodeConnector.getMaxLinkOutput()) {
        return false;
      }
    }
    if (curNodeConnector.getMaxLinkOutput() == 0) {
      return false;
    }
    if (curNodeConnector.getName().equals(EConnectionType.TABLE.getName())) {
      List<? extends IConnection> tableRefs=node.getOutgoingConnections(EConnectionType.TABLE_REF);
      if (tableRefs != null && 0 < tableRefs.size()) {
        return false;
      }
    }
    if (!curNodeConnector.isMultiSchema()) {
    }
    if (curNodeConnector.isMultiSchema()) {
      for (int i=0; i < node.getMetadataList().size(); i++) {
        IMetadataTable table=(node.getMetadataList().get(i));
        String value=table.getAdditionalProperties().get(ISINPUT);
        if (value != null && value.equals(TRUE)) {
          continue;
        }
        String name=table.getTableName();
        if (name.equals(node.getUniqueName())) {
          continue;
        }
        if (table.getAttachedConnector() == null || table.getAttachedConnector().equals(curNodeConnector.getName())) {
          if (connecType == EConnectionType.TABLE) {
            name=table.getLabel() + "String_Node_Str" + name+ "String_Node_Str";
          }
          boolean nameUsed=false;
          for (          Connection connec : (List<Connection>)node.getOutgoingConnections()) {
            if (connec.getLineStyle().hasConnectionCategory(IConnectionCategory.FLOW)) {
              if (connec.getMetadataTable().getTableName().equals(table.getTableName())) {
                nameUsed=true;
              }
            }
          }
          if (!nameUsed) {
            menuList.add(name);
          }
        }
      }
      if ((curNodeConnector.getMaxLinkOutput() == -1 || node.getMetadataList().size() < curNodeConnector.getMaxLinkOutput()) && curNodeConnector.isBuiltIn()) {
        menuList.add(getNewOutputMenuName());
      }
    }
 else {
      String menuName;
      boolean addDefaultName=false;
      IMetadataTable table=null;
      for (int i=0; i < node.getMetadataList().size(); i++) {
        table=(node.getMetadataList().get(i));
        if (table.getTableName().equals(node.getUniqueName())) {
          break;
        }
      }
      if (node.getComponent().getName().contains("String_Node_Str") && node.checkSchemaForEBCDIC(table) && curNodeConnector.getCurLinkNbOutput() > 0) {
        return false;
      }
      if (connecType == EConnectionType.TABLE) {
        addDefaultName=addDefaultName();
        menuName=getNewOutputMenuName();
      }
 else {
        menuName=curNodeConnector.getMenuName();
      }
      if (!addDefaultName) {
        setText(menuName);
        menuList.add(menuName);
      }
    }
    return true;
  }
  return false;
}

Fixed version (ground truth):
/** 
 * Test if the selected item is a node.
 * @return true/false
 */
@SuppressWarnings("String_Node_Str") private boolean canPerformAction(){
  if (getSelectedObjects().isEmpty()) {
    return false;
  }
  List parts=getSelectedObjects();
  if (parts.size() == 1) {
    Object o=parts.get(0);
    if (!(o instanceof NodePart)) {
      return false;
    }
    nodePart=(NodePart)o;
    if (!(nodePart.getModel() instanceof Node)) {
      return false;
    }
    Node node=(Node)nodePart.getModel();
    if (!node.isActivate()) {
      return false;
    }
    if (node.getJobletNode() != null) {
      return false;
    }
    if (curNodeConnector != null && "String_Node_Str".equals(curNodeConnector.getName())) {
      if (node.getProcess() != null && !ComponentCategory.CATEGORY_4_DI.getName().equals(node.getProcess().getComponentsType())) {
        return false;
      }
    }
    if (connecType.hasConnectionCategory(IConnectionCategory.EXECUTION_ORDER)) {
      if (!(Boolean)node.getPropertyValue(EParameterName.STARTABLE.getName()) || (!node.getProcessStartNode(false).equals(node))) {
        if (!node.isELTMapComponent()) {
          boolean jobletOk=false;
          if (PluginChecker.isJobLetPluginLoaded()) {
            IJobletProviderService service=(IJobletProviderService)GlobalServiceRegister.getDefault().getService(IJobletProviderService.class);
            if (service != null && service.isJobletComponent(node)) {
              jobletOk=true;
            }
          }
          if (!jobletOk) {
            return false;
          }
        }
      }
    }
    menuList=new ArrayList<String>();
    if (curNodeConnector == null) {
      curNodeConnector=node.getConnectorFromType(connecType);
      if (curNodeConnector == null) {
        return false;
      }
    }
    if (curNodeConnector.getMaxLinkOutput() != -1) {
      if (curNodeConnector.getCurLinkNbOutput() >= curNodeConnector.getMaxLinkOutput()) {
        return false;
      }
    }
    if (curNodeConnector.getMaxLinkOutput() == 0) {
      return false;
    }
    if (curNodeConnector.getName().equals(EConnectionType.TABLE.getName())) {
      List<? extends IConnection> tableRefs=node.getOutgoingConnections(EConnectionType.TABLE_REF);
      if (tableRefs != null && 0 < tableRefs.size()) {
        return false;
      }
    }
    if (!curNodeConnector.isMultiSchema()) {
    }
    if (curNodeConnector.isMultiSchema()) {
      for (int i=0; i < node.getMetadataList().size(); i++) {
        IMetadataTable table=(node.getMetadataList().get(i));
        String value=table.getAdditionalProperties().get(ISINPUT);
        if (value != null && value.equals(TRUE)) {
          continue;
        }
        String name=table.getTableName();
        if (name.equals(node.getUniqueName())) {
          continue;
        }
        if (table.getAttachedConnector() == null || table.getAttachedConnector().equals(curNodeConnector.getName())) {
          if (connecType == EConnectionType.TABLE) {
            name=table.getLabel() + "String_Node_Str" + name+ "String_Node_Str";
          }
          boolean nameUsed=false;
          for (          Connection connec : (List<Connection>)node.getOutgoingConnections()) {
            if (connec.getLineStyle().hasConnectionCategory(IConnectionCategory.FLOW)) {
              if (connec.getMetadataTable().getTableName().equals(table.getTableName())) {
                nameUsed=true;
              }
            }
          }
          if (!nameUsed) {
            menuList.add(name);
          }
        }
      }
      if ((curNodeConnector.getMaxLinkOutput() == -1 || node.getMetadataList().size() < curNodeConnector.getMaxLinkOutput()) && curNodeConnector.isBuiltIn()) {
        menuList.add(getNewOutputMenuName());
      }
    }
 else {
      String menuName;
      boolean addDefaultName=false;
      IMetadataTable table=null;
      for (int i=0; i < node.getMetadataList().size(); i++) {
        table=(node.getMetadataList().get(i));
        if (table.getTableName().equals(node.getUniqueName())) {
          break;
        }
      }
      if (node.getComponent().getName().contains("String_Node_Str") && node.checkSchemaForEBCDIC(table) && curNodeConnector.getCurLinkNbOutput() > 0) {
        return false;
      }
      if (connecType == EConnectionType.TABLE) {
        addDefaultName=addDefaultName();
        menuName=getNewOutputMenuName();
      }
 else {
        menuName=curNodeConnector.getMenuName();
      }
      if (!addDefaultName) {
        setText(menuName);
        menuList.add(menuName);
      }
    }
    return true;
  }
  return false;
}