Concatenates two span lists adding the spans of the second parameter to the
list in first parameter.

@param allSpans
the spans to which the other spans are added
@param neSpans
the spans to be added to allSpans
553765
public static final void concatenateSpans(final List<Span> allSpans,
      final Span[] neSpans) {
    for (final Span span : neSpans) {
      allSpans.add(span);
    }
  }
102881
public Span[] seqToSpans(final String[] tokens) {
    final Span[] origSpans = this.sequenceLabeler.tag(tokens);
    final Span[] seqSpans = SequenceLabelerME.dropOverlappingSpans(origSpans);
    return seqSpans;
  }
143367
public void addChildren( Iterable<AstNode> otherChildren ) {
        assert otherChildren != null;
        for (AstNode planNode : otherChildren) {
            this.addLastChild(planNode);
        }
    }
865263
@VisibleForTesting
  static void appendSpaces(StringBuilder sb, int numSpaces) {
    if (numSpaces > 16) {
      logger.warning("Tracer.appendSpaces called with large numSpaces");
      // Avoid long loop in case some bug in the caller
      numSpaces = 16;
    }
    while (numSpaces >= 5) {
      sb.append("     ");
      numSpaces -= 5;
    }

    // We know it's less than 5 now
    switch (numSpaces) {
      case 1:
        sb.append(" ");
        break;
      case 2:
        sb.append("  ");
        break;
      case 3:
        sb.append("   ");
        break;
      case 4:
        sb.append("    ");
        break;
    }
  }
110725
public void splitSpan(int n) {
		int x = (xKnots[n] + xKnots[n+1])/2;
		addKnot(x, getColor(x/256.0f), knotTypes[n]);
		rebuildGradient();
	}
1099613
func (a *AdditionalSpanTags) AddSpans(ctx context.Context, spans []*trace.Span) error {
	for _, s := range spans {
		if s.Tags == nil {
			s.Tags = make(map[string]string, len(a.tags))
		}

		for k, v := range a.tags {
			s.Tags[k] = v
		}
	}
	return a.next.AddSpans(ctx, spans)
}
505431
public static CharSequence getFormattedText(List<Span> spans) {
        CharSequence formattedText = null;

        if (spans != null) {
            int size = spans.size();
            List<SpannableString> spannableStrings = new ArrayList<>(size);

            for (Span span : spans) {
                SpannableString ss = setUpSpannableString(span);
                spannableStrings.add(ss);
            }

            formattedText = TextUtils.concat(spannableStrings.toArray(new SpannableString[size]));
        }

        return formattedText;
    }
124702
@Override
    public void appendNames(StringBuilder sb, String sep)
    {
        // Let's first get the alphabetized list of all names from main hash
        TreeSet<PrefixedName> ts = new TreeSet<PrefixedName>();
        for (int i = 0; i < mNames.length; ++i) {
            PrefixedName name = mNames[i];
            if (name != null) {
                ts.add(name);
            }
        }

        // then spill area
        if (mBuckets != null) {
            for (int i = 0; i < (mNames.length >> 2); ++i) {
                Bucket b = mBuckets[i];
                while (b != null) {
                    ts.add(b.getName());
                    b = b.getNext();
                }
            }
        }

        // And then append them:
        Iterator<PrefixedName> it = ts.iterator();
        boolean first = true;
        while (it.hasNext()) {
            if (first) {
                first = false;
            } else {
                sb.append(sep);
            }
            sb.append(it.next().toString());
        }
    }
287215
public List<T> overlapping(Span span) {
      if (span == null || root.isNull()) {
         return Collections.emptyList();
      }
      return overlapping(root, span, new ArrayList<>());
   }
939088
public void extendWith(Namespace ns) {
	if (ns==null) return;
	if (ns.getDefaultNamespace()!=null) {
	    registerDefault(ns.getDefaultNamespace());
	}
	for (String prefix: ns.prefixes.keySet()) {
	    register(prefix, ns.prefixes.get(prefix));
	}
    }
1195135
@Override
  public void collect(SpanCollector collector) throws IOException {
    for (QueueItem item : queueSpans) {
      item.sequenceSpans.spans.collect(collector);
    }
  }
1300828
@SafeVarargs
    public final void addAll(E... elements) {
        if (elements == null) throw new NullPointerException();
        addAll(Arrays.asList(elements));
    }
879426
function combine(namespaces, names) {
  var ret = [];
  var _namespaces = Array.isArray(namespaces) ? namespaces : [];
  var _names = Array.isArray(names) ? names : [];
  _namespaces.forEach(function (ns) {
    _names.forEach(function (n) {
      ret.push(ns + "." + n);
    });
  });
  ret = ret.concat(_names);
  return ret;
}
756165
private static String concat(final String... parts) {

		final StringBuilder buf = new StringBuilder();

		for (final String part : parts) {

			// handle nulls gracefully (ignore)
			if (part != null) {

				buf.append(part);
			}
		}

		return buf.toString();
	}
838753
@Pure
	public static String join(MACNumber... addresses) {
		if ((addresses == null) || (addresses.length == 0)) {
			return null;
		}
		final StringBuilder buf = new StringBuilder();
		for (final MACNumber number : addresses) {
			if (buf.length() > 0) {
				buf.append(MACNUMBER_SEPARATOR);
			}
			buf.append(number);
		}
		return buf.toString();
	}
715913
public static StringBuilder join(final StringBuilder sb, final String sep, final String... tokens) {
        boolean first = true;
        for (Object t: tokens) {
            if (!first) sb.append(sep);
            else first = false;
            sb.append(t);
        }
        return sb;
    }
831279
func (c *Counter) AddSpans(ctx context.Context, spans []*trace.Span, next trace.Sink) error {
	atomic.AddInt64(&c.TotalSpans, int64(len(spans)))
	atomic.AddInt64(&c.TotalProcessCalls, 1)
	atomic.AddInt64(&c.CallsInFlight, 1)
	start := time.Now()
	err := next.AddSpans(ctx, spans)
	atomic.AddInt64(&c.TotalProcessTimeNs, time.Since(start).Nanoseconds())
	atomic.AddInt64(&c.CallsInFlight, -1)
	if err != nil && spanfilter.IsInvalid(err) {
		atomic.AddInt64(&c.TotalProcessErrors, 1)
		atomic.AddInt64(&c.ProcessErrorSpans, int64(len(spans)))
		c.logErrMsg(ctx, err, "Unable to process spans")
	}
	return err
}