This function is used to set the linked references for Flows (like LinkedLists)
@param primary the current Flow
@param secondary the newly created Flow based on the primary
321218
function setRefs(primary, secondary){
        secondary.prev = primary;
        primary.next = secondary;

        secondary.rootFlow = primary.rootFlow;
    }
1202448
private void setMainTable(final SQLTable _mainTable)
    {
        SQLTable table = _mainTable;
        while (table.getMainTable() != null) {
            table = table.getMainTable();
        }
        this.mainTable = table;
    }
1020654
public void setReferences(IReferences references) throws ReferenceException {
		List<Object> counters = references.getOptional(new Descriptor(null, "counters", null, null, null));
		for (Object counter : counters) {
			if (counter instanceof ICounters && counter != this)
				_counters.add((ICounters) counter);
		}
	}
1181919
public void setReferences(IReferences references) throws ReferenceException {
		_dependencyResolver.setReferences(references);
        _logger.setReferences(references);
        _counters.setReferences(references);	
	}
735135
public static void closeSafely(@Nullable Iterable<? extends CloseableReference<?>> references) {
    if (references != null) {
      for (CloseableReference<?> ref : references) {
        closeSafely(ref);
      }
    }
  }
344515
def set_flow_node_ref_list(self, value):
        
        if value is None or not isinstance(value, list):
            raise TypeError("FlowNodeRefList new value must be a list")
        else:
            for element in value:
                if not isinstance(element, str):
                    raise TypeError("FlowNodeRefList elements in variable must be of String class")
            self.__flow_node_ref_list = value
1221662
public void set(V newReference, boolean newMark) {
        Pair<V> current = pair;
        if (newReference != current.reference || newMark != current.mark)
            this.pair = Pair.of(newReference, newMark);
    }
1306341
private void getFlowsHelper(final ArrayList<ExecutableFlow> flows,
      final Collection<Pair<ExecutionReference, ExecutableFlow>> collection) {
    collection.stream().forEach(ref -> flows.add(ref.getSecond()));
  }
839007
private void setReferent(SNode n, long index, int value)
  {
    if (n instanceof SToken)
    {
      SToken tok = (SToken) n;
      if (!referentOfToken.containsKey(tok.getId()))
      {
        HashMap<Long, Integer> newlist = new HashMap<Long, Integer>();
        newlist.put(index, value);//globalindex?
        referentOfToken.put(tok.getId(), newlist);
      }
      else
      {
        referentOfToken.get(tok.getId()).put(globalIndex, value);
      }
    }
    else
    {
      List<SRelation<SNode,SNode>> outEdges = n.getGraph().getOutRelations(n.getId());
      if(outEdges != null)
      {
        for (SRelation<? extends SNode,? extends SNode> edge : outEdges)
        {
          if(!(edge instanceof SPointingRelation))
          {
            if (edge.getSource() != null && edge.getTarget() != null)
            {
              setReferent(edge.getTarget(), index, value);
            }
          }
        }
      }
    }
  }
624545
static <K, V> void connectExpirables(ReferenceEntry<K, V> previous, ReferenceEntry<K, V> next) {
    previous.setNextExpirable(next);
    next.setPreviousExpirable(previous);
  }
44411
final void _setAsTail(LinkedList parent, Link head)
    {
        _previousLink = head;
        _parent = parent;
        _state = LinkState.TAIL;
    }
861673
public void addReferenceListener(ReferenceListener listener) {
		if (this.listeners == null) {
			this.listeners = new LinkedList<>();
		}
		final List<ReferenceListener> list = this.listeners;
		synchronized (list) {
			list.add(listener);
		}
	}
1052576
protected void secondary(final String name, final AttributeConverter<? extends Object> converter) {
        secondaries.add(name);
        converters.put(name, converter);
    }
571194
public void addFlow(Flow flow) {

    // add the flow stats to this app summary
    this.numberRuns++;
    this.jobCount += flow.getJobCount();
    this.mapSlotMillis += flow.getMapSlotMillis();
    this.reduceSlotMillis += flow.getReduceSlotMillis();
    this.totalMaps += flow.getTotalMaps();
    this.totalReduces += flow.getTotalReduces();
    this.mbMillis += flow.getMegabyteMillis();

    // add the queue of this flow to the set of queues in this app summary
    this.queues.add(flow.getQueue());

    /**  TODO add jobcost once job cost has been added to job details and flow */

    // store the latest timestamp seen for this app summary
    // since these are epoch timestamps, a bigger number means more recent
    if ((this.lastRunId == 0L) || (this.lastRunId < flow.getRunId())) {
      this.lastRunId = flow.getRunId();
    }

    // store the oldest seen timestamp seen for this app summary
    // since these are epoch timestamps, a smaller number means older run
    if ((this.firstRunId == 0L) || (this.firstRunId > flow.getRunId())) {
      this.firstRunId = flow.getRunId();
    }

  }
603196
public void setRef(Coref v) {
    if (Coref_Type.featOkTst && ((Coref_Type)jcasType).casFeat_ref == null)
      jcasType.jcas.throwFeatMissing("ref", "de.julielab.jules.types.muc7.Coref");
    jcasType.ll_cas.ll_setRefValue(addr, ((Coref_Type)jcasType).casFeatCode_ref, jcasType.ll_cas.ll_getFSRef(v));}
1151101
void linkFirst(final E e) {
    final E f = first;
    first = e;

    if (f == null) {
      last = e;
    } else {
      setPrevious(f, e);
      setNext(e, f);
    }
  }
580133
public void addChildren( AstNode first,
                             AstNode second ) {
        if (first != null) {
            this.addLastChild(first);
        }
        if (second != null) {
            this.addLastChild(second);
        }
    }