Program: 122624
Project: 122624
Buggy source:
protected void initConnectionParameters(){
  connParameters=null;
  connParameters=new ConnectionParameters();
  String type=getValueFromRepositoryName(elem,"String_Node_Str");
  if (type.equals("String_Node_Str") || type.contains("String_Node_Str")) {
    IElementParameter ele=elem.getElementParameter("String_Node_Str");
    if (ele != null) {
      type=(String)ele.getValue();
    }
 else     type="String_Node_Str";
  }
  connParameters.setDbType(type);
  String driverName=getValueFromRepositoryName(elem,"String_Node_Str");
  String dbVersionName=EDatabaseVersion4Drivers.getDbVersionName(type,driverName);
  connParameters.setDbVersion(dbVersionName);
  connParameters.setNode(elem);
  String selectedComponentName=(String)elem.getPropertyValue(EParameterName.UNIQUE_NAME.getName());
  connParameters.setSelectedComponentName(selectedComponentName);
  connParameters.setFieldType(paramFieldType);
  if (elem instanceof Node) {
    connParameters.setMetadataTable(((Node)elem).getMetadataList().get(0));
  }
  connParameters.setSchemaRepository(EmfComponent.REPOSITORY.equals(elem.getPropertyValue(EParameterName.SCHEMA_TYPE.getName())));
  connParameters.setFromDBNode(true);
  connParameters.setQuery("String_Node_Str");
  List<? extends IElementParameter> list=elem.getElementParameters();
  boolean end=false;
  for (int i=0; i < list.size() && !end; i++) {
    IElementParameter param=list.get(i);
    if (param.getFieldType() == EParameterFieldType.MEMO_SQL) {
      connParameters.setNodeReadOnly(param.isReadOnly());
      end=true;
    }
  }
  Object value=elem.getPropertyValue("String_Node_Str");
  IElementParameter compList=elem.getElementParameterFromField(EParameterFieldType.COMPONENT_LIST);
  if (value != null && (value instanceof Boolean) && ((Boolean)value) && compList != null && !isConnectionExist()) {
    Object compValue=compList.getValue();
    if (compValue != null && !compValue.equals("String_Node_Str")) {
      List<? extends INode> nodes=part.getProcess().getGraphicalNodes();
      for (      INode node : nodes) {
        if (node.getUniqueName().equals(compValue) && (node instanceof Node)) {
          connectionNode=(Node)node;
          break;
        }
      }
      if (connectionNode != null) {
        setAllConnectionParameters(type,connectionNode);
      }
    }
  }
 else {
    setAllConnectionParameters(null,elem);
  }
  if (connectionNode != null) {
    setConnectionParameterNames(connectionNode,connParameters);
  }
 else {
    setConnectionParameterNames(elem,connParameters);
  }
}

Fixed version (ground truth):
protected void initConnectionParameters(){
  connParameters=null;
  connParameters=new ConnectionParameters();
  String type=getValueFromRepositoryName(elem,"String_Node_Str");
  if (type.equals("String_Node_Str") || type.contains("String_Node_Str")) {
    IElementParameter ele=elem.getElementParameter("String_Node_Str");
    if (ele != null) {
      type=(String)ele.getValue();
    }
 else     type="String_Node_Str";
  }
  connParameters.setDbType(type);
  String driverName=getValueFromRepositoryName(elem,"String_Node_Str");
  String dbVersionName=EDatabaseVersion4Drivers.getDbVersionName(type,driverName);
  connParameters.setDbVersion(dbVersionName);
  connParameters.setNode(elem);
  String selectedComponentName=(String)elem.getPropertyValue(EParameterName.UNIQUE_NAME.getName());
  connParameters.setSelectedComponentName(selectedComponentName);
  connParameters.setFieldType(paramFieldType);
  if (elem instanceof Node) {
    connParameters.setMetadataTable(((Node)elem).getMetadataList().get(0));
  }
  connParameters.setSchemaRepository(EmfComponent.REPOSITORY.equals(elem.getPropertyValue(EParameterName.SCHEMA_TYPE.getName())));
  connParameters.setFromDBNode(true);
  connParameters.setQuery("String_Node_Str");
  List<? extends IElementParameter> list=elem.getElementParameters();
  boolean end=false;
  for (int i=0; i < list.size() && !end; i++) {
    IElementParameter param=list.get(i);
    if (param.getFieldType() == EParameterFieldType.MEMO_SQL) {
      connParameters.setNodeReadOnly(param.isReadOnly());
      end=true;
    }
  }
  Object value=elem.getPropertyValue("String_Node_Str");
  IElementParameter compList=elem.getElementParameterFromField(EParameterFieldType.COMPONENT_LIST);
  if (value != null && (value instanceof Boolean) && ((Boolean)value) && compList != null && !isConnectionExist()) {
    Object compValue=compList.getValue();
    if (compValue != null && !compValue.equals("String_Node_Str")) {
      List<? extends INode> nodes=part.getProcess().getGraphicalNodes();
      for (      INode node : nodes) {
        if (node.getUniqueName().equals(compValue) && (node instanceof Node)) {
          connectionNode=node;
          break;
        }
      }
      if (connectionNode != null) {
        setAllConnectionParameters(type,connectionNode);
      }
    }
  }
 else {
    setAllConnectionParameters(null,elem);
  }
  if (connectionNode != null) {
    setConnectionParameterNames(connectionNode,connParameters);
  }
 else {
    setConnectionParameterNames(elem,connParameters);
  }
}