Add left and right, or their merger, to builder.
509949
private static void join(ArrayList<AbstractConfigValue> builder, AbstractConfigValue origRight) {
        AbstractConfigValue left = builder.get(builder.size() - 1);
        AbstractConfigValue right = origRight;

        // check for an object which can be converted to a list
        // (this will be an object with numeric keys, like foo.0, foo.1)
        if (left instanceof ConfigObject && right instanceof SimpleConfigList) {
            left = DefaultTransformer.transform(left, ConfigValueType.LIST);
        } else if (left instanceof SimpleConfigList && right instanceof ConfigObject) {
            right = DefaultTransformer.transform(right, ConfigValueType.LIST);
        }

        // Since this depends on the type of two instances, I couldn't think
        // of much alternative to an instanceof chain. Visitors are sometimes
        // used for multiple dispatch but seems like overkill.
        AbstractConfigValue joined = null;
        if (left instanceof ConfigObject && right instanceof ConfigObject) {
            joined = right.withFallback(left);
        } else if (left instanceof SimpleConfigList && right instanceof SimpleConfigList) {
            joined = ((SimpleConfigList)left).concatenate((SimpleConfigList)right);
        } else if (left instanceof ConfigConcatenation || right instanceof ConfigConcatenation) {
            throw new BugOrBroken("unflattened ConfigConcatenation");
        } else if (left instanceof Unmergeable || right instanceof Unmergeable) {
            // leave joined=null, cannot join
        } else {
            // handle primitive type or primitive type mixed with object or list
            String s1 = left.transformToString();
            String s2 = right.transformToString();
            if (s1 == null || s2 == null) {
                throw new WrongType(left.origin(),
                        "Cannot concatenate object or list with a non-object-or-list, " + left
                                + " and " + right + " are not compatible");
            } else {
                ConfigOrigin joinedOrigin = SimpleConfigOrigin.mergeOrigins(left.origin(),
                        right.origin());
                joined = new ConfigString(joinedOrigin, s1 + s2);
            }
        }

        if (joined == null) {
            builder.add(right);
        } else {
            builder.remove(builder.size() - 1);
            builder.add(joined);
        }
    }
882565
def left_to_right(self):
        """"""
        self._entry_mode |= Command.MODE_INCREMENT
        self.command(self._entry_mode)
144395
def _add_left(self, d):
        '''
        
        '''
        if not self:
            self.board.append(d)
        elif d.first == self.left_end():
            self.board.appendleft(d.inverted())
        elif d.second == self.left_end():
            self.board.appendleft(d)
        else:
            raise dominoes.EndsMismatchException(
                '{} cannot be added to the left of'
                ' the board - values do not match!'.format(d)
            )
1269962
def merge(self, item):
        """"""
        self.name = item.name

        if item.icon:
            self.icon = item.icon

        if item.url:
            self.url = item.url

        if item.order:
            self.order = item.order

        if item.permission:
            self.permission = item.permission
32978
public void addRightWhere(int left, IntBitSet result) {
        if (line[left] != null) {
            result.addAll(line[left]);
        }
    }
1093615
public void addColumn(float[] left, float[] right) {
        ColumnDef nextDef = new ColumnDef(left, right);
        if (!nextDef.isSimple()) simple = false;
        columnDefs.add(nextDef);
    }
34166
def set_left_to_right(self):
        """"""
        self.displaymode |= LCD_ENTRYLEFT
        self.write8(LCD_ENTRYMODESET | self.displaymode)
443361
def merge_base(self, left='master', right='HEAD'):
    """"""
    return self._check_output(['merge-base', left, right], raise_type=Scm.LocalException)
880216
private function mergeConfiguration($left, $right)
	{
		if (is_array($left) && is_array($right)) {
			foreach ($left as $key => $val) {
				if (is_int($key)) {
					$right[] = $val;
				} else {
					if (isset($right[$key])) {
						$val = $this->mergeConfiguration($val, $right[$key]);
					}
					$right[$key] = $val;
				}
			}

			return $right;

		} elseif ($left === NULL && is_array($right)) {
			return $right;

		} else {
			return $left;
		}
	}
327110
def merge_from(self, other):
        """"""
        if other.pattern is not None:
            self.pattern = other.pattern
        if other.format is not None:
            self.format = other.format
        self.leading_digits_pattern.extend(other.leading_digits_pattern)
        if other.national_prefix_formatting_rule is not None:
            self.national_prefix_formatting_rule = other.national_prefix_formatting_rule
        if other.national_prefix_optional_when_formatting is not None:
            self.national_prefix_optional_when_formatting = other.national_prefix_optional_when_formatting
        if other.domestic_carrier_code_formatting_rule is not None:
            self.domestic_carrier_code_formatting_rule = other.domestic_carrier_code_formatting_rule
29697
public void merge(VersionRows other) {
		conceptRows.addAll(other.conceptRows);
		relationshipRows.addAll(other.relationshipRows);
		concreteDomainRows.addAll(other.getConcreteDomainRows());
                attributeDomainRows.addAll(other.getAttributeDomainRows());
		owlRows.addAll(other.getConcreteDomainRows());
	}
68341
public final void acceptBoth(Consumer<? super L> left, Consumer<? super R> right, L defaultLeft, R defaultRight) {
		left.accept(isLeft() ? getLeft() : defaultLeft);
		right.accept(isRight() ? getRight() : defaultRight);
	}
1257814
public void add(int left, IntBitSet right) {
        if (line[left] == null) {
            line[left] = new IntBitSet();
        }
        line[left].addAll(right);
    }
26419
public BuildableType.Builder mergeBuilder(MergeBuilderMethod mergeBuilder) {
    this.mergeBuilder = Objects.requireNonNull(mergeBuilder);
    _unsetProperties.remove(Property.MERGE_BUILDER);
    return (BuildableType.Builder) this;
  }
1014250
public Object add(Object left, Object right, ParserRuleContext errCtx) {
    if (left == null && right == null) {
      return 0;
    }

    // if either are collections... concatenate them
    if (left instanceof Collection<?> || right instanceof Collection<?>) {
      List<Object> res = newArrayList();
      res.addAll(toCollection(left));
      res.addAll(toCollection(right));
      return res;
    }

    // if either are strings... concatenate them
    if (left instanceof String || right instanceof String) {
      return toString(left).concat(toString(right));
    }

    // if both are maps... concatenate them
    if (left instanceof Map<?, ?> || right instanceof Map<?, ?>) {
      Map<Object, Object> res = newHashMap();
      res.putAll((Map<?, ?>) left);
      res.putAll((Map<?, ?>) right);
      return res;
    }

    try {

      // if either are floating point (double or float) use double
      if (isFloatingPointNumber(left) || isFloatingPointNumber(right)) {
        double l = toDouble(left);
        double r = toDouble(right);
        return new Double(l + r);
      }

      // if either are bigdecimal use that type
      if (left instanceof BigDecimal || right instanceof BigDecimal) {
        BigDecimal l = toBigDecimal(left);
        BigDecimal r = toBigDecimal(right);
        BigDecimal result = l.add(r, getMathContext());
        return narrowBigDecimal(left, right, result);
      }

      // if either are numbers use integers
      if (left instanceof Number || right instanceof Number) {
        BigInteger l = toBigInteger(left);
        BigInteger r = toBigInteger(right);
        BigInteger result = l.add(r);
        return narrowBigInteger(left, right, result);
      }

    }
    catch (java.lang.NumberFormatException nfe) {
    }

    throw new ExecutionException("invalid operands for +", interpreter.getLocation(errCtx));
  }
1176570
def MergeFrom(self, other):
    
    self._values.extend(other._values)
    self._message_listener.Modified()
137418
public static DefinitelyAssignedSet join(DefinitelyAssignedSet left, DefinitelyAssignedSet right) {
		if(left == null && right == null) {
			return null;
		} else if(left == null) {
			return right;
		} else if(right == null) {
			return left;
		} else {
			return left.join(right);
		}
	}