Program: 125578
Project: 125578
Buggy source:
public static Set<String> retrieveContextVar(List<? extends IElementParameter> elementParameters,Connection connection,EComponentCategory category){
  if (elementParameters == null || connection == null) {
    return null;
  }
  Set<String> addedVars=new HashSet<String>();
  String var=null;
  for (  IElementParameter param : elementParameters) {
    if (category == null || category == param.getCategory()) {
      String repositoryValue=param.getRepositoryValue();
      if (repositoryValue != null) {
        Object objectValue=RepositoryToComponentProperty.getValue(connection,repositoryValue,null);
        if (objectValue != null) {
          if (objectValue instanceof List) {
            List list=(List)objectValue;
            for (int i=0; i < list.size(); i++) {
              Object object=list.get(i);
              if (object instanceof HashMap) {
                Map map=(HashMap)object;
                if (!map.isEmpty()) {
                  Set keySet=map.keySet();
                  Iterator iterator=keySet.iterator();
                  while (iterator.hasNext()) {
                    String key=(String)iterator.next();
                    Object object2=map.get(key);
                    if (object2 instanceof String) {
                      var=ContextParameterUtils.getVariableFromCode((String)object2);
                      if (var != null) {
                        addedVars.add(var);
                      }
                    }
                  }
                }
              }
            }
          }
          if (objectValue instanceof String) {
            var=ContextParameterUtils.getVariableFromCode((String)objectValue);
            if (var != null) {
              addedVars.add(var);
            }
          }
        }
      }
 else       if ("String_Node_Str".equals(param.getName()) && connection.isContextMode() && param.getValue() instanceof String) {
        var=ContextParameterUtils.getVariableFromCode((String)param.getValue());
        if (var != null) {
          addedVars.add(var);
        }
      }
    }
  }
  return addedVars;
}

Fixed version (ground truth):
public static Set<String> retrieveContextVar(List<? extends IElementParameter> elementParameters,Connection connection,EComponentCategory category,boolean onlyConsiderShowedParam){
  if (elementParameters == null || connection == null) {
    return null;
  }
  Set<String> addedVars=new HashSet<String>();
  String var=null;
  for (  IElementParameter param : elementParameters) {
    if (onlyConsiderShowedParam && !param.isShow(elementParameters)) {
      continue;
    }
    if (category == null || category == param.getCategory()) {
      String repositoryValue=param.getRepositoryValue();
      if (repositoryValue != null) {
        Object objectValue=RepositoryToComponentProperty.getValue(connection,repositoryValue,null);
        if (objectValue != null) {
          if (objectValue instanceof List) {
            List list=(List)objectValue;
            for (int i=0; i < list.size(); i++) {
              Object object=list.get(i);
              if (object instanceof HashMap) {
                Map map=(HashMap)object;
                if (!map.isEmpty()) {
                  Set keySet=map.keySet();
                  Iterator iterator=keySet.iterator();
                  while (iterator.hasNext()) {
                    String key=(String)iterator.next();
                    Object object2=map.get(key);
                    if (object2 instanceof String) {
                      var=ContextParameterUtils.getVariableFromCode((String)object2);
                      if (var != null) {
                        addedVars.add(var);
                      }
                    }
                  }
                }
              }
            }
          }
          if (objectValue instanceof String) {
            var=ContextParameterUtils.getVariableFromCode((String)objectValue);
            if (var != null) {
              addedVars.add(var);
            }
          }
        }
      }
 else       if ("String_Node_Str".equals(param.getName()) && connection.isContextMode() && param.getValue() instanceof String) {
        var=ContextParameterUtils.getVariableFromCode((String)param.getValue());
        if (var != null) {
          addedVars.add(var);
        }
      }
    }
  }
  return addedVars;
}