{dynamic_docstring}
176848
def EBook(self, data=None, subset=None):
        """"""
        return self.factory.get_object(jssobjects.EBook, data, subset)
467568
def process_docstring(app, what, name, obj, options, lines):
    """"""
    # pylint: disable=unused-argument
    # pylint: disable=too-many-arguments
    lines.extend(_format_contracts(what=what, obj=obj))
1329480
def _handle_docstrings(self):
        
        #Docstrings have to be continuous sets of lines that start with !!
        #When they change in any way (i.e. any of the three modes), we 
        #have to reparse the entire block because it has XML dependencies
        #Because of that, the cached version of the docstrings is actually
        #pointless and we only need to focus on the buffered.
        blocks = self._docstring_getblocks()

        if len(blocks) == 0:
            return

        xmldict = self._docstring_parse(blocks)
        delta = 0

        if isinstance(self.docelement, Module):
            delta += self.docparser.rt_update_module(xmldict, self.docelement)
        else:
            #We just need to handle the type and executable internal defs.
            if self.docelement.name in xmldict:
                docs = self.docparser.to_doc(xmldict[self.docelement.name][0],
                                             self.docelement.name)
                self.docparser.process_memberdocs(docs, self.docelement, False)
            #Also update the docstrings for any embedded types or executables.
            if isinstance(self.docelement, Executable):
                delta += self.docparser.process_embedded(xmldict, 
                                                         self.docelement, False)

        #Finally, we need to handle the overall character length change
        #that this update caused to the element first and then for the
        #operation as a whole for updating the module and its children.
        buffertot = sum([len(self.context.bufferstr[i]) for i in self._doclines])
        cachedtot = 0
    
        for i in range(self.icached[0],self.icached[1]):
            if self.docparser.RE_DOCS.match(self.context.cachedstr[i]):
                cachedtot += len(self.context.cachedstr[i])

        self.length = buffertot - cachedtot

        if delta == 0:
            #The update must have been to members variables of the module or the
            #executables/types. The element who owns the members is going to get
            #missed when the module updates its children.
            self.docelement.end += self.length
        else:
            #All the individual elements have been updated already, so just
            #set the length change for this operation.
            self.docdelta = delta
1061591
@Override
	public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery) {
		return commerceTaxMethodPersistence.findWithDynamicQuery(dynamicQuery);
	}
464497
def is_docstring(self, node):
        """"""
        return isinstance(node, ast.Str) or (isinstance(node, ast.Expr) and
                                             isinstance(node.value, ast.Str))
554059
public void generateMethodTypesScript(Map<String,Integer> typeMap,
            Set<MethodTypes> methodTypes) {
        String sep = "";
        StringBuilder vars = new StringBuilder("var methods = {");
        for (Map.Entry<String,Integer> entry : typeMap.entrySet()) {
            vars.append(sep);
            sep = ",";
            vars.append("\"")
                    .append(entry.getKey())
                    .append("\":")
                    .append(entry.getValue());
        }
        vars.append("};").append(DocletConstants.NL);
        sep = "";
        vars.append("var tabs = {");
        for (MethodTypes entry : methodTypes) {
            vars.append(sep);
            sep = ",";
            vars.append(entry.value())
                    .append(":")
                    .append("[")
                    .append("\"")
                    .append(entry.tabId())
                    .append("\"")
                    .append(sep)
                    .append("\"")
                    .append(configuration.getText(entry.resourceKey()))
                    .append("\"]");
        }
        vars.append("};")
                .append(DocletConstants.NL);
        addStyles(HtmlStyle.altColor, vars);
        addStyles(HtmlStyle.rowColor, vars);
        addStyles(HtmlStyle.tableTab, vars);
        addStyles(HtmlStyle.activeTableTab, vars);
        script.addContent(new RawHtml(vars.toString()));
    }
768620
def compile(attributes, object_ref, dynamic_attributes)
      if object_ref != :nil || !AttributeParser.available?
        return [:dynamic, AttributeCompiler.runtime_build(attributes, object_ref, dynamic_attributes)]
      end

      parsed_hashes = [dynamic_attributes.new, dynamic_attributes.old].compact.map do |attribute_hash|
        unless (hash = AttributeParser.parse(attribute_hash))
          return [:dynamic, AttributeCompiler.runtime_build(attributes, object_ref, dynamic_attributes)]
        end
        hash
      end
      attribute_values = build_attribute_values(attributes, parsed_hashes)
      AttributeBuilder.verify_attribute_names!(attribute_values.map(&:key))

      [:multi, *group_values_for_sort(attribute_values).map { |value_group|
        compile_attribute_values(value_group)
      }]
    end
991030
function(doc, def, labelTemplate) {
	return Object.keys(doc)
		.map(key => {
			const field = doc[key]
			const fieldDef = def[key]

			if (!field || (!fieldDef && key != '_id')) {
				return null
			}

			const name = key == '_id' ? 'id' : fieldDef.label
			const template = labelTemplate || '%s'
			const label = util.format(template, name)

			if (typeof field == 'object' && !Array.isArray(field) && key != '_id') {
				return getDocumentOutput(field, fieldDef.schemaType, label + ' (%s)')
			}

			return `${chalk.yellow(label)}: ${field}`

		})
		.filter(line => { return line !== null })
		.join('\n')
}
349563
def parse_docstring(docstring, cls=None):
    
    def_arg_dict = lambda: {'description': None,
                            'type_name': None,
                            'required': False,
                            }
    description, fields_lines = split_docstring(docstring)
    arguments_dict = defaultdict(def_arg_dict)
    return_value_types = []
    #parse fields
    return_description = ''
    for docstring_line in fields_lines:
        if _ignored_field(docstring_line):
            continue
        #parse inherits
        if docstring_line.startswith('@inherits'):
            if not cls:
                raise MethodParsingException()
            inherit_tmp = docstring_line.split(None, 1)[1]
            inherit_str = inherit_tmp.split(':class:', 1)[1]
            result = _parse_inherit(cls, inherit_str)

            description = description or result['description']
            for arg_name, update_dict in result['arguments'].items():
                arguments_dict[arg_name].update(update_dict)
            return_value_types = result['return']['type_name']
            return_description = result['return']['description']
        #parse return value
        elif docstring_line.startswith(':rtype:'):
            class_name = __get_class_name(cls)
            types_str = docstring_line.split(None, 1)[1]
            return_value_types = types_str.replace('\n', '').strip(':').strip()
            if return_value_types.startswith('class:`.'):
                return_value_types = return_value_types.replace('class:`.', 'class:`'+class_name+'.')
        #parse return description
        elif docstring_line.startswith(':return:'):
            return_description = docstring_line.split(None, 1)[1].strip()
        #parse arguments
        else:
            arg_name, update_dict = _parse_docstring_field(cls, docstring_line)
            arguments_dict[arg_name].update(update_dict)
    #check fields
    _check_arguments_dict(arguments_dict)
    if not return_value_types:
        raise MethodParsingException('Can not get return types for method')
    return {'description': description,
            'arguments': arguments_dict,
            'return': {'description': return_description,
                       'type_name': return_value_types}}
1029626
def __make_dynamic(self, method):
        '''
        
        '''
        def dynamic(*args):
            self.plugin_info['status'] = method
            if not args:
                args = None
            self.output(args)
            sys.exit(getattr(self.exit_code, method))

        method_lc = method.lower()
        dynamic.__doc__ = "%s method" % method_lc
        dynamic.__name__ = method_lc
        setattr(self, dynamic.__name__, dynamic)
1138859
function dynamic (val, toType, ctx) {
  if (Array.isArray(val)) {
    return _.map(val, function (v) {
      return dynamic(v, toType, ctx);
    });
  }
  return (new Dynamic(val, ctx)).to(toType);
}
163412
def _get_dynamic_attr(self, attname, obj, default=None):
        
        try:
            attr = getattr(self, attname)
        except AttributeError:
            return default
        if callable(attr):
            # Check co_argcount rather than try/excepting the function and
            # catching the TypeError, because something inside the function
            # may raise the TypeError. This technique is more accurate.
            try:
                code = six.get_function_code(attr)
            except AttributeError:
                code = six.get_function_code(attr.__call__)
            if code.co_argcount == 2:       # one argument is 'self'
                return attr(obj)
            else:
                return attr()
        return attr
956174
def dynamic_import(import_string):
    
    # Use rfind rather than rsplit for Python 2.3 compatibility.
    lastdot = import_string.rfind('.')
    if lastdot == -1:
        return __import__(import_string, {}, {}, [])
    module_name, attr = import_string[:lastdot], import_string[lastdot + 1:]
    parent_module = __import__(module_name, {}, {}, [attr])
    return getattr(parent_module, attr)
251975
function parse(doc,context){
	var vs;
	var cmds=[];
	var pats;
	var exprs;
	var subpats;
	var mode=context.mode;

	var vs=splitLine_(doc);
	for(var i=0;i<vs.length;i++){
		if(pats=vs[i].match(macroRegex)){
			if(mode=='tcmd'){
				console.log(pats[1]+','+pats[2]);
			}
			exprs=null;
			switch(pats[1]){
			case 'define':
				if(subpats=pats[2].match(defineRegex)){
					exprs=[subpats[1],subpats[2]];
				}else{
					console.log("error: invalid format in define statement "+pats[1]+" in line "+(i+1));
				}
				break;
			case 'include':
			case 'include_once':
			case 'include_code':
			case 'include_code_once':
				exprs=toExpr(pats[2],i+1);
				break;
			case 'if':
			case 'elseif':
			case 'elif':
				exprs=toExpr(pats[2],i+1);
				break;
			case 'else':
			case 'endif':
				break;
			case 'namespace':
				if(subpats=pats[2].match(nsRegex)){
					setNamespace_(subpats[1]);
				}else{
					console.log("error: invalid format in namespace statement "+pats[1]+" in line "+(i+1));
				}
				break;
			default:
				if(pats[1].charAt(0)!='@'){
					console.log("error: unknown statement "+pats[1]+" in line "+(i+1));
				}
				break;
			}
			cmds.push({type:pats[1], exprs:exprs});
		}else{
			cmds.push({type:'text', value:vs[i]});
		}
	}
	if(mode=='cmd'){
		for(var i=0;i<cmds.length;i++){
			console.log(JSON.stringify(cmds[i]));
		}
	}
	return cmds;
}
37808
function(doc) {
      var that = this;
      doc = that._in_map(doc);

      return this._init.then(function() {
        return that.isAdmissible(doc);
      }).then(function(admissible) {
        if (!admissible) {
          throw new Error('Document not admissible');
        }

        doc = that.clean(doc);

        if (that._index) {
          delete doc[that._index];
        }

        return that.getNextIndex();
      }).then(function(max) {
        if (that._index && typeof max === 'number') {
          doc[that._index] = max;
        }

        return that._dbApi.create(doc).then(function(doc) {
          if (!doc) {
            throw new Error('Document not created');
          }

          return doc;
        });
      });
    }
854232
function merge(docs){
  var byFullId = {};

  docs.forEach(function(doc) {
    byFullId[doc.section + '/' + doc.id] = doc;
  });

  for(var i = 0; i < docs.length;) {
    if (findParent(docs[i], 'method') || findParent(docs[i], 'property') || findParent(docs[i], 'event')) {
      docs.splice(i, 1);
    } else {
      i++;
    }
  }

  function findParent(doc, name) {
    var parentName = doc[name + 'Of'];
    if (!parentName) return false;

    var parent = byFullId[doc.section + '/' + parentName];
    if (!parent)
      throw new Error("No parent named '" + parentName + "' for '" +
        doc.name + "' in @" + name + "Of.");

    var listName = (name + 's').replace(/ys$/, 'ies');
    var list = parent[listName] = (parent[listName] || []);
    list.push(doc);
    list.sort(orderByName);
    return true;
  }

  function orderByName(a, b){
    return a.name < b.name ? -1 : (a.name > b.name ? 1 : 0);
  }
}
1297429
function documentParam(param, paramDictionary, procedureOrService) {
    let typeString = getTypeStringFromCode(param.type, null, param);
    let name = getParamName(param);
    let options = {
        type: param.type,
        paramDictionary: paramDictionary,
        paramName: name
    };
    let description = getParamDescription(options);
    if (description !== '') {
        return ' * @param ' + typeString + ' ' + name + ' - ' + description;
    }
    return ' * @param ' + typeString + ' ' + name;
}