<user-additions part="otherMethods">
428249
public function getAttribute(JSAttribute $attribute)
    {
        $ret = '';

        $ret .= '    /**' . "\n";

        if (!is_null($attribute->getDescription())) {
            $ret .= '     * ' . $attribute->getDescription() . "\n";
            $ret .= '     *' . "\n";
        }

        $ret .= '     * @protected' . "\n";
        $ret .= '     * @type {' . $attribute->getJSDocType() . '} ' . $attribute->getLowerName() . "\n";
        $ret .= '     */' . "\n";

        if ($attribute->getStatic()) {
            $ret .= $attribute->getEntity()->getName() . '.prototype.' . $attribute->getName() . (!is_null($attribute->getDefaultValue()) ? ' = ' . $attribute->getDefaultValue() . ';' : ';');
            return str_replace('    ', '', $ret);
        }

        if ($attribute->getEntity()->getProject()->getBase()) {
            if (is_null($attribute->getDefaultValue())) {
                $ret .= '    this.' . $attribute->getLowerName() . ' = undefined;' . "\n";
            }
            else {
                switch($attribute->getJSType()) {
                    case 'string':
                        if ($attribute->getDefaultValue() == 'null') {
                            $ret .= '    this.' . $attribute->getLowerName() . ' = null;' . "\n";
                        } elseif ($attribute->getDefaultValue() == '\'\'') {
                            $ret .= '    this.' . $attribute->getLowerName() . ' = \'\';' . "\n";
                        }
                        else {
                            $ret .= '    this.' . $attribute->getLowerName() . ' = \'' . str_replace('\'','\\\'',$attribute->getDefaultValue()) . '\';' . "\n";
                        }
                        break;
                    default:
                        $ret .= '    this.' . $attribute->getLowerName() . ' = ' . $attribute->getDefaultValue() . ';' . "\n";
                }

            }
        } else {
            if (is_null($attribute->getDefaultValue()))
                $ret .= '    private $' . $attribute->getLowerName() . ';' . "\n";
            else {
                switch($attribute->getJSType()) {
                    case 'string':
                        $ret .= '    private $' . $attribute->getLowerName() . ' = \'' . str_replace('\'','\\\'',$attribute->getDefaultValue()) . '\';' . "\n";
                        break;
                    default:
                        $ret .= '    private $' . $attribute->getLowerName() . ' = ' . $attribute->getDefaultValue() . ';' . "\n";
                }
            }
        }

        return $ret;
    }
659899
public function addMentionsFromBody()
    {
        $entity = $this->getItem();
        $usernames = $this->extractMentions($entity->body);

        foreach ($usernames as $username) {
            $entity->addMention(trim($username));
        }

        $this->_newly_mentioned = $usernames;
    }
1298795
public Errors add(Errors otherErrors) {
    if (otherErrors != null) {
      fieldErrors.putAll(otherErrors.fieldErrors);
      generalErrors.addAll(otherErrors.generalErrors);
    }
    return this;
  }
993483
public void addUser(UserDefinition userDef) {
        String userID = userDef.getID();
        Utils.require(!Utils.isEmpty(userID), "User ID must be set");
        Utils.require(!m_users.containsKey(userID), "Duplicate user ID: " + userID);
        m_users.put(userID, userDef);
    }
1172391
def method_added(method_name)
      # do nothing if the method that was added was an actual hook method, or
      # if it already had hooks added to it
      return if hooks.include?(method_name) || hooked_methods.include?(method_name)
      add_hooks_to(method_name)
    end
709966
public void addListeners()
    {
        super.addListeners();
        
        Record recUserInfo = this.getMainRecord();
        recUserInfo.setKeyArea(UserInfo.USER_NAME_KEY);
        
        if (m_recHeader != null)
            ((ReferenceField)this.getScreenRecord().getField(UserScreenRecord.USER_GROUP_ID)).setReference(m_recHeader);
        
        recUserInfo.addListener(new ExtractRangeFilter(UserInfo.USER_NAME, this.getScreenRecord().getField(UserScreenRecord.NAME_SORT)));
        recUserInfo.addListener(new CompareFileFilter(recUserInfo.getField(UserInfo.USER_GROUP_ID), this.getScreenRecord().getField(UserScreenRecord.USER_GROUP_ID), "=", null, true));
        
        this.getScreenRecord().getField(UserScreenRecord.NAME_SORT).addListener(new FieldReSelectHandler(this));
        this.getScreenRecord().getField(UserScreenRecord.USER_GROUP_ID).addListener(new FieldReSelectHandler(this));
        
        this.getMainRecord(). addListener(new SetupNewUserHandler(null));
    }
442434
def _add_method_dunders(self, method):
        
        try:
            method.__module__ = self._cls.__module__
        except AttributeError:
            pass

        try:
            method.__qualname__ = ".".join(
                (self._cls.__qualname__, method.__name__)
            )
        except AttributeError:
            pass

        return method
177866
public void contributeToModule() {
		final GuiceModuleAccess module = this.module.get();
		if (!this.removableBindings.isEmpty()) {
			// Ok, we are broking the Java secutiry manager.
			// But it's for having something working!
			try {
				final Field field = module.getClass().getDeclaredField("bindings"); //$NON-NLS-1$
				final boolean accessible = field.isAccessible();
				try {
					field.setAccessible(true);
					final Collection<?> hiddenBindings = (Collection<?>) field.get(module);
					hiddenBindings.removeAll(this.removableBindings);
				} finally {
					field.setAccessible(accessible);
				}
			} catch (Exception exception) {
				throw new IllegalStateException(exception);
			}
		}
		module.addAll(this.bindings);
	}
1026055
private void addMethodInfo(MethodDoc method, Content dl) {
        ClassDoc[] intfacs = method.containingClass().interfaces();
        MethodDoc overriddenMethod = method.overriddenMethod();
        // Check whether there is any implementation or overridden info to be
        // printed. If no overridden or implementation info needs to be
        // printed, do not print this section.
        if ((intfacs.length > 0 &&
                new ImplementedMethods(method, this.configuration).build().length > 0) ||
                overriddenMethod != null) {
            MethodWriterImpl.addImplementsInfo(this, method, dl);
            if (overriddenMethod != null) {
                MethodWriterImpl.addOverridden(this,
                        method.overriddenType(), overriddenMethod, dl);
            }
        }
    }
195300
public void addListeners()
    {
        super.addListeners();
        this.addMainKeyBehavior();
        this.getMainRecord().getField(UserInfo.USER_GROUP_ID).addListener(new InitFieldHandler(this.getRecord(UserControl.USER_CONTROL_FILE).getField(UserControl.ANON_USER_GROUP_ID)));
        ((UserInfo)this.getMainRecord()).addPropertyListeners();
    }
918159
function add( $other ) {
		if ( $other instanceof self ) {
			$this->parts = array_merge( $this->parts, $other->parts );
		} else {
			$this->parts[] = $other;
		}
	}
89131
public static void add() {

        String current = System.getProperties().getProperty(HANDLER_PKGS, "");
        if (current.length() > 0) {
            if (current.contains(PKG)) {
                return;
            }
            current = current + "|";
        }
        System.getProperties().put(HANDLER_PKGS, current + PKG);

    }
510
void addMethodInfo(final MethodInfoList methodInfoList, final Map<String, ClassInfo> classNameToClassInfo) {
        for (final MethodInfo mi : methodInfoList) {
            // Index method annotations
            addFieldOrMethodAnnotationInfo(mi.annotationInfo, /* isField = */ false, classNameToClassInfo);

            // Index method parameter annotations
            if (mi.parameterAnnotationInfo != null) {
                for (int i = 0; i < mi.parameterAnnotationInfo.length; i++) {
                    final AnnotationInfo[] paramAnnotationInfoArr = mi.parameterAnnotationInfo[i];
                    if (paramAnnotationInfoArr != null) {
                        for (int j = 0; j < paramAnnotationInfoArr.length; j++) {
                            final AnnotationInfo methodParamAnnotationInfo = paramAnnotationInfoArr[j];
                            final ClassInfo annotationClassInfo = getOrCreateClassInfo(
                                    methodParamAnnotationInfo.getName(), ANNOTATION_CLASS_MODIFIER,
                                    classNameToClassInfo);
                            annotationClassInfo.addRelatedClass(RelType.CLASSES_WITH_METHOD_PARAMETER_ANNOTATION,
                                    this);
                            this.addRelatedClass(RelType.METHOD_PARAMETER_ANNOTATIONS, annotationClassInfo);
                        }
                    }
                }
            }
        }
        if (this.methodInfo == null) {
            this.methodInfo = methodInfoList;
        } else {
            this.methodInfo.addAll(methodInfoList);
        }
    }
1327410
protected void addMethod(String k, ExecutableElement e, MethodModel exec) {
    ArrayList<ContractableMethod> list = methodMap.get(k);
    if (list == null) {
      list = new ArrayList<ContractableMethod>();
      methodMap.put(k, list);
    }
    list.add(new ContractableMethod(e, exec));
  }
369509
public static void add(Map<String, Class<? extends ICustomFunction>> moreCustomFunctions) {
        fs.putAll(moreCustomFunctions);
        poifs = loadPoiCustomFunctions(fs);
    }
1227158
public void addMappings(Mappings other) {
        mappings.getKeywords().addAll(other.getKeywords());
        mappings.getClasses().addAll(other.getClasses());
        mappings.getNamespaces().addAll(other.getNamespaces());
    }
335426
def addMethod(self, m):
        
        if m.nargs == -1:
            m.nargs = len([a for a in marshal.genCompleteTypes(m.sigIn)])
            m.nret = len([a for a in marshal.genCompleteTypes(m.sigOut)])
        self.methods[m.name] = m
        self._xml = None