Program: 118769
Project: 118769
Buggy source:
@Override public List<NodeConnector> createConnectors(INode parentNode){
  NodeConnector nodeConnector;
  List<NodeConnector> listConnector=new ArrayList<NodeConnector>();
  ComponentConnector[] listConnectors=componentDefinition.getConnectors();
  for (  ComponentConnector componentConnector : listConnectors) {
    String originalConnectorName=componentConnector.getType().name();
    String connectorName=originalConnectorName;
    boolean isFlow_Sub_ConnectorName=IComponentConstants.MAIN_CONNECTOR_NAME.equals(originalConnectorName) || IComponentConstants.REJECT_CONNECTOR_NAME.equals(originalConnectorName);
    if (isFlow_Sub_ConnectorName) {
      connectorName="String_Node_Str";
    }
    EConnectionType currentType=EConnectionType.getTypeFromName(connectorName);
    if (currentType == null || ("String_Node_Str").equals(connectorName) || ("String_Node_Str").equals(connectorName)) {
      if (currentType == null) {
        log.warn(Messages.getString("String_Node_Str",this.getName(),connectorName));
      }
      continue;
    }
    nodeConnector=new NodeConnector(parentNode);
    nodeConnector.setDefaultConnectionType(currentType);
    nodeConnector.setLinkName(currentType.getDefaultLinkName());
    nodeConnector.setMenuName(currentType.getDefaultMenuName());
    RGB rgb=currentType.getRGB();
    Integer lineStyle=currentType.getDefaultLineStyle();
    if (!isFlow_Sub_ConnectorName) {
      nodeConnector.setMaxLinkInput(componentConnector.getMaxInput());
    }
    if ("String_Node_Str".equals(connectorName)) {
      nodeConnector.setMaxLinkOutput(componentConnector.getMaxOutput());
    }
    if (nodeConnector.getName() == null) {
      if (isFlow_Sub_ConnectorName) {
        nodeConnector.setName(originalConnectorName);
        nodeConnector.setBaseSchema(currentType.getName());
        if (IComponentConstants.REJECT_CONNECTOR_NAME.equals(originalConnectorName)) {
          nodeConnector.setMenuName("String_Node_Str");
          nodeConnector.setLinkName("String_Node_Str");
        }
      }
 else {
        nodeConnector.setName(connectorName);
        nodeConnector.setBaseSchema(currentType.getName());
      }
    }
    nodeConnector.addConnectionProperty(currentType,rgb,lineStyle);
    listConnector.add(nodeConnector);
    if ("String_Node_Str".equals(connectorName)) {
      currentType=EConnectionType.FLOW_REF;
      rgb=currentType.getRGB();
      lineStyle=currentType.getDefaultLineStyle();
      nodeConnector.addConnectionProperty(currentType,rgb,lineStyle);
      nodeConnector.getConnectionProperty(currentType).setRGB(rgb);
      currentType=EConnectionType.FLOW_MERGE;
      rgb=currentType.getRGB();
      lineStyle=currentType.getDefaultLineStyle();
      nodeConnector.addConnectionProperty(currentType,rgb,lineStyle);
      nodeConnector.getConnectionProperty(currentType).setRGB(rgb);
    }
  }
  for (int i=0; i < EConnectionType.values().length; i++) {
    EConnectionType currentType=EConnectionType.values()[i];
    if ((currentType == EConnectionType.FLOW_REF) || (currentType == EConnectionType.FLOW_MERGE)) {
      continue;
    }
    boolean exists=false;
    for (    INodeConnector curNodeConn : listConnector) {
      if (curNodeConn.getDefaultConnectionType().equals(currentType)) {
        exists=true;
      }
    }
    if (!exists) {
      nodeConnector=new NodeConnector(parentNode);
      nodeConnector.setDefaultConnectionType(currentType);
      nodeConnector.setName(currentType.getName());
      nodeConnector.setBaseSchema(currentType.getName());
      nodeConnector.addConnectionProperty(currentType,currentType.getRGB(),currentType.getDefaultLineStyle());
      nodeConnector.setLinkName(currentType.getDefaultLinkName());
      nodeConnector.setMenuName(currentType.getDefaultMenuName());
      if ((currentType == EConnectionType.PARALLELIZE) || (currentType == EConnectionType.SYNCHRONIZE)) {
        nodeConnector.setMaxLinkInput(1);
      }
 else {
        nodeConnector.setMaxLinkInput(0);
      }
      nodeConnector.setMaxLinkOutput(0);
      nodeConnector.setMinLinkInput(0);
      nodeConnector.setMinLinkOutput(0);
      if (currentType == EConnectionType.FLOW_MAIN) {
        nodeConnector.addConnectionProperty(EConnectionType.FLOW_REF,EConnectionType.FLOW_REF.getRGB(),EConnectionType.FLOW_REF.getDefaultLineStyle());
        nodeConnector.addConnectionProperty(EConnectionType.FLOW_MERGE,EConnectionType.FLOW_MERGE.getRGB(),EConnectionType.FLOW_MERGE.getDefaultLineStyle());
      }
      listConnector.add(nodeConnector);
    }
  }
  return listConnector;
}

Fixed version (ground truth):
@Override public List<NodeConnector> createConnectors(INode parentNode){
  NodeConnector nodeConnector;
  List<NodeConnector> listConnector=new ArrayList<NodeConnector>();
  ComponentConnector[] listConnectors=componentDefinition.getConnectors();
  for (  ComponentConnector componentConnector : listConnectors) {
    String originalConnectorName=componentConnector.getType().name();
    String connectorName=originalConnectorName;
    boolean isFlow_Sub_ConnectorName=IComponentConstants.MAIN_CONNECTOR_NAME.equals(originalConnectorName) || IComponentConstants.REJECT_CONNECTOR_NAME.equals(originalConnectorName);
    if (isFlow_Sub_ConnectorName) {
      connectorName="String_Node_Str";
    }
    EConnectionType currentType=EConnectionType.getTypeFromName(connectorName);
    if (currentType == null || ("String_Node_Str").equals(connectorName) || ("String_Node_Str").equals(connectorName)) {
      if (currentType == null) {
        log.warn(Messages.getString("String_Node_Str",this.getName(),connectorName));
      }
      continue;
    }
    nodeConnector=new NodeConnector(parentNode);
    nodeConnector.setDefaultConnectionType(currentType);
    nodeConnector.setLinkName(currentType.getDefaultLinkName());
    nodeConnector.setMenuName(currentType.getDefaultMenuName());
    RGB rgb=currentType.getRGB();
    Integer lineStyle=currentType.getDefaultLineStyle();
    if (!isFlow_Sub_ConnectorName) {
      nodeConnector.setMaxLinkInput(componentConnector.getMaxInput());
    }
    if ("String_Node_Str".equals(connectorName) || "String_Node_Str".equals(connectorName)) {
      nodeConnector.setMaxLinkOutput(componentConnector.getMaxOutput());
    }
    if (nodeConnector.getName() == null) {
      if (isFlow_Sub_ConnectorName) {
        nodeConnector.setName(originalConnectorName);
        nodeConnector.setBaseSchema(currentType.getName());
        if (IComponentConstants.REJECT_CONNECTOR_NAME.equals(originalConnectorName)) {
          nodeConnector.setMenuName("String_Node_Str");
          nodeConnector.setLinkName("String_Node_Str");
        }
      }
 else {
        nodeConnector.setName(connectorName);
        nodeConnector.setBaseSchema(currentType.getName());
      }
    }
    nodeConnector.addConnectionProperty(currentType,rgb,lineStyle);
    listConnector.add(nodeConnector);
    if ("String_Node_Str".equals(connectorName)) {
      currentType=EConnectionType.FLOW_REF;
      rgb=currentType.getRGB();
      lineStyle=currentType.getDefaultLineStyle();
      nodeConnector.addConnectionProperty(currentType,rgb,lineStyle);
      nodeConnector.getConnectionProperty(currentType).setRGB(rgb);
      currentType=EConnectionType.FLOW_MERGE;
      rgb=currentType.getRGB();
      lineStyle=currentType.getDefaultLineStyle();
      nodeConnector.addConnectionProperty(currentType,rgb,lineStyle);
      nodeConnector.getConnectionProperty(currentType).setRGB(rgb);
    }
  }
  for (int i=0; i < EConnectionType.values().length; i++) {
    EConnectionType currentType=EConnectionType.values()[i];
    if ((currentType == EConnectionType.FLOW_REF) || (currentType == EConnectionType.FLOW_MERGE)) {
      continue;
    }
    boolean exists=false;
    for (    INodeConnector curNodeConn : listConnector) {
      if (curNodeConn.getDefaultConnectionType().equals(currentType)) {
        exists=true;
      }
    }
    if (!exists) {
      nodeConnector=new NodeConnector(parentNode);
      nodeConnector.setDefaultConnectionType(currentType);
      nodeConnector.setName(currentType.getName());
      nodeConnector.setBaseSchema(currentType.getName());
      nodeConnector.addConnectionProperty(currentType,currentType.getRGB(),currentType.getDefaultLineStyle());
      nodeConnector.setLinkName(currentType.getDefaultLinkName());
      nodeConnector.setMenuName(currentType.getDefaultMenuName());
      if ((currentType == EConnectionType.PARALLELIZE) || (currentType == EConnectionType.SYNCHRONIZE)) {
        nodeConnector.setMaxLinkInput(1);
      }
 else {
        nodeConnector.setMaxLinkInput(0);
      }
      nodeConnector.setMaxLinkOutput(0);
      nodeConnector.setMinLinkInput(0);
      nodeConnector.setMinLinkOutput(0);
      if (currentType == EConnectionType.FLOW_MAIN) {
        nodeConnector.addConnectionProperty(EConnectionType.FLOW_REF,EConnectionType.FLOW_REF.getRGB(),EConnectionType.FLOW_REF.getDefaultLineStyle());
        nodeConnector.addConnectionProperty(EConnectionType.FLOW_MERGE,EConnectionType.FLOW_MERGE.getRGB(),EConnectionType.FLOW_MERGE.getDefaultLineStyle());
      }
      listConnector.add(nodeConnector);
    }
  }
  return listConnector;
}