Do the actual addition.
979112
private static Element execute(SourceRange sourceRange, Property a,
			Property b) {

		assert (a != null);
		assert (b != null);

		Element result = null;

		if ((a instanceof LongProperty) && (b instanceof LongProperty)) {

			long l1 = ((Long) a.getValue()).longValue();
			long l2 = ((Long) b.getValue()).longValue();

			result = LongProperty.getInstance(l1 + l2);

		} else if ((a instanceof NumberProperty)
				&& (b instanceof NumberProperty)) {

			double d1 = ((NumberProperty) a).doubleValue();
			double d2 = ((NumberProperty) b).doubleValue();

			result = DoubleProperty.getInstance(d1 + d2);

		} else if ((a instanceof StringProperty)
				&& (b instanceof StringProperty)) {

			String s1 = (String) a.getValue();
			String s2 = (String) b.getValue();

			result = StringProperty.getInstance(s1 + s2);

		} else {
			throw new EvaluationException(MessageUtils
					.format(MSG_MISMATCHED_ARGS_ADD), sourceRange);
		}

		return result;
	}
873392
def append(self, item):
        """"""
        if len(self) == 0:
            # Special case, we make this the current item
            self.index = 0

        self.items.append(item)
603587
def add_assignment(self, value):
        """"""
        if not value in self._assignments:
            self._assignments.append(value)
378159
def append(self, exp):
        
        if self._curr_size < self.max_size:
            self._assign(self._curr_pos, exp)
            self._curr_pos = (self._curr_pos + 1) % self.max_size
            self._curr_size += 1
        else:
            self._assign(self._curr_pos, exp)
            self._curr_pos = (self._curr_pos + 1) % self.max_size
99582
def add(self, coro, args=(), kwargs={}, first=True):
        """"""
        assert callable(coro), "'%s' not a callable object" % coro
        coro = coro(*args, **kwargs)
        if first:
            self.active.append( (None, coro) )
        else:
            self.active.appendleft( (None, coro) )
        return coro
383365
def add(self, *args, **kwargs):
        """"""

        if self.start and self.start.state == 'done' and kwargs.get('log_action') != 'done':
            raise ProgressLoggingError("Can't add -- process section is done")

        self.augment_args(args, kwargs)

        kwargs['log_action'] = kwargs.get('log_action', 'add')

        rec = Process(**kwargs)

        self._session.add(rec)

        self.rec = rec

        if self._logger:
            self._logger.info(self.rec.log_str)

        self._session.commit()
        self._ai_rec_id = None

        return self.rec.id
365576
def add(self, action):
        """"""
        self._state_machine.transition_to_add()
        self._actions.append(action)
1297208
def put(self, lo, hi):
        """"""
        self.buf.append(lo)
        self.buf.append(hi)
        self.pos += 1
1089512
def added(self, context):
        """"""
        context.ansi = ANSIFormatter(self._enable)
        context.aprint = context.ansi.aprint
855191
def _add(self, codeobj):
        """"""
        assert isinstance(codeobj, CodeStatement)
        codeobj._si = len(self.body)
        self.body.append(codeobj)
564938
def add(self, item):
        """"""
        self._check_index()
        # Possibly truncate the history up to the current point.
        self._history = self._history[:self._index + 1]
        # Append the item
        self._history.append(item)
        # Increment the index.
        self._index += 1
        self._check_index()
        # Check that the current element is what was provided to the function.
        assert id(self.current_item) == id(item)
220367
def add(self, header, data) :
		""""""
		if header[0] != '>' :
			self.data.append(('>'+header, data))
		else :
			self.data.append((header, data))
600258
def action_add(self):
        

        # prepare values for new shortcut
        path = self.args['--workdir'] or os.getcwd()
        name = self.args['<name>']
        cmd = self.args['<command>']

        overwrite = self.args['--force']

        # check for conflicts in DB
        if not overwrite and self.shortcut_exists(name):
            print_err('The shortcut "%s" already exists.' % name)
            return

        # if cmd has arguments, extract the command only
        cmd_parts = [x.strip() for x in cmd.split(' ')]
        cmd_real = cmd_parts[0]
        cmd_tail = ' '.join(cmd_parts[1:])

        # if cmd_real starts with ./, remove that
        if cmd_real.startswith('./'):
            cmd_real = cmd_real[2:]

        # path to the file (if it's in the folder)
        localfile = os.path.abspath(os.path.join(path, cmd_real))

        # check if the file is present at the path given
        if os.path.isfile(localfile):

            # file extension
            ext = os.path.splitext(cmd_real)[1]

            # check for exacutable bit
            # jar is executable, but cannot be run directly
            if os.access(localfile, os.X_OK) and not ext == '.jar':
                # file is executable
                cmd = ''

                if not cmd_real.startswith('/'):
                    cmd = './'

                cmd = cmd + cmd_real + ' ' + cmd_tail

            else:
                # not executable
                # try to find interpreter for the file

                interpreter = {
                    '.py': 'python',
                    '.rb': 'ruby',
                    '.js': 'node',
                    '.pl': 'perl',
                    '.sh': 'sh',
                    '.php': 'php',
                    '.jar': 'java -jar',
                }.get(ext, None)

                # check if interpreter was found
                if interpreter is None:

                    msg = ('Could not make a shortcut to "%s":'
                           + '\n - not executable & unknown extension.') % localfile

                    print_err(msg)
                    return

                cmd = str(interpreter) + ' ' + \
                    str(cmd_real) + ' ' + str(cmd_tail)
        else:
            # use cmd, as given.
            pass

        if overwrite:
            self.db_exec('''
                    DELETE FROM shortcuts WHERE name=?
                    ''', (name,))
        # save to DB
        self.db_exec('''
            INSERT INTO shortcuts (name, path, command)
            VALUES (?, ?, ?)
            ''', (str(name), str(path), str(cmd)))

        # show OK message
        msg = ('Shortcut "%s" has been created.\n'
               + self.shortcut_str(path, cmd)) % name

        print_msg(msg)
803316
def do_add_item(self, args):
        """"""
        if args.food:
            add_item = args.food
        elif args.sport:
            add_item = args.sport
        elif args.other:
            add_item = args.other
        else:
            add_item = 'no items'

        self.poutput("You added {}".format(add_item))
251409
private int append(FA add) {
        int relocation;
        int idx;

        relocation = used;
        ensureCapacity(used + add.used);
        for (idx = 0; idx < add.used; idx++) {
            states[relocation + idx] =
                new State(add.states[idx], relocation);
        }
        used += add.used;
        return relocation;
    }
1118593
def add_numbers():
    """"""
    a = request.params.get('a', 0, type=int)
    b = request.params.get('b', 0, type=int)
    return json.dumps({'result': a+b})
311780
function (container, toAdd) {
            var entry;
            for (var i = 0, len = toAdd.length; i < len; i++) {
                entry = toAdd[i];
                this.addIfMissing(entry, container);
            }
        }