Public functions 
Creates an html string containing the issues.
@param {Object} issues - the issues in viewmodel format
@param {Boolean} enableFiltering - if true renders the severity filters
@returns {String}
12960
function render(issues, enableFiltering) {
		var content = '';

		if (enableFiltering) {
			content += '<div class="filters">' + getSeverityFilters(issues) + '<div>\n';
		}

		content += '<div>' + getIssues(issues) + '</div>';

		return '<div>' + content + '</div>';
	}
1212770
def find_issues(self, criteria={}, jql=None, order='KEY ASC', verbose=False, changelog=True):
        

        query = []

        if criteria.get('project', False):
            query.append('project IN (%s)' % ', '.join(['"%s"' % p for p in criteria['project']]))

        if criteria.get('issue_types', False):
            query.append('issueType IN (%s)' % ', '.join(['"%s"' % t for t in criteria['issue_types']]))

        if criteria.get('valid_resolutions', False):
            query.append('(resolution IS EMPTY OR resolution IN (%s))' % ', '.join(['"%s"' % r for r in criteria['valid_resolutions']]))

        if criteria.get('jql_filter') is not None:
            query.append('(%s)' % criteria['jql_filter'])

        if jql is not None:
            query.append('(%s)' % jql)

        queryString = "%s ORDER BY %s" % (' AND '.join(query), order,)

        if verbose:
            print("Fetching issues with query:", queryString)

        fromRow=0
        issues = []
        while True:
            try:
                if changelog:
                    pageofissues = self.jira.search_issues(queryString, expand='changelog', maxResults=self.settings['max_results'],startAt=fromRow)
                else:
                    pageofissues = self.jira.search_issues(queryString, maxResults=self.settings['max_results'],startAt=fromRow)

                fromRow = fromRow + int(self.settings['max_results'])
                issues += pageofissues
                if verbose:
                    print("Got %s lines per jira query from result starting at line number %s " % (self.settings['max_results'],  fromRow))
                if len(pageofissues)==0:
                    break
            except JIRAError as e:
                print("Jira query error with: {}\n{}".format(queryString, e))
                return []


        if verbose:
            print("Fetched", len(issues), "issues")

        return issues
682666
private CmsPair<String, List<Object>> prepareRewriteAliasConditions(CmsRewriteAliasFilter filter) {

        List<String> conditions = new ArrayList<String>();
        conditions.add("1 = 1");
        List<Object> parameters = new ArrayList<Object>();
        if (filter.getSiteRoot() != null) {
            parameters.add(filter.getSiteRoot());
            conditions.add("SITE_ROOT = ?");
        }
        if (filter.getId() != null) {
            parameters.add(filter.getId().toString());
            conditions.add("ID = ?");
        }
        return CmsPair.create(CmsStringUtil.listAsString(conditions, " AND "), parameters);
    }
381577
function renderHtml (jsonString) {
	let messages = '';

	try {
		let msg = JSON.parse(jsonString).messages;
		messages = msg;
	} catch (e) {
		console.log(chalk.red('!!! OUTPUT ERROR'));
		if (e.message === 'Unexpected token E in JSON at position 1') {
			console.log(chalk.red('Possible cause of error - incorrect path or files were not found'));
		}
		return e.message;
	}

	if (!messages.length) {
		return jsonString;
	}

	let views = {};
	let counts = {
		groups: {
			info: 0,
			warning: 0,
			error: 0,
			fatal: 0,
			'non-document-error': 0
		},
		msgGroups: {}
	};

	messages.forEach((item, i) => {
		let key = item.url;
		let msg = item.message;
		let extract = item.extract;

		if (key in views) {
			views[key].list.push(item);
		} else {
			let viewName = key.replace(/\\/, '/').split('/').pop();
			let viewAnchor = viewName.replace(/\/|\.|[а-я]|\s/gi, '-');

			views[key] = {
				msgGroup: 1,
				name: viewName,
				anchor: viewAnchor,
				path: key,
				list: [
					item
				],
				errorGroups: {},
				errorCounts: {
					info: 0,
					warning: 0,
					error: 0,
					fatal: 0,
					'non-document-error': 0
				}
			};
		}

		let view = views[key];

		if (item.subType === 'warning' || item.subType === 'fatal') {
			item.processType = item.subType;
		} else {
			item.processType = item.type;
		}

		view.errorCounts[item.processType]++;
		counts.groups[item.processType]++;

		let processMsg = `${item.processType}: ${msg}`;

		if (!counts.msgGroups[processMsg]) {
			counts.msgGroups[processMsg] = {
				urls: {},
				count: 0
			};
		}

		if (!view.errorGroups[processMsg]) {
			view.errorGroups[processMsg] = {
				key: view.msgGroup++,
				count: 0
			};
		}
		counts.msgGroups[processMsg].count++;
		if (item.url) {
			counts.msgGroups[processMsg].urls[item.url] = true;
		}
		view.errorGroups[processMsg].count++;
		item.processGroup = view.errorGroups[processMsg].key;

		msg = msg.replace(/“/g, '<code>');
		msg = msg.replace(/”/g, '</code>');
		item.message = msg;

		item.badge = item.subType || item.type;
		item.firstLine = item.firstLine > -1 ? item.firstLine : item.lastLine;
		item.firstColumn = item.firstColumn > -1 ? item.firstColumn : item.lastColumn;

		if (item.hiliteStart !== undefined && item.hiliteLength) {
			let arr = [];
			let start = item.hiliteStart;
			let length = item.hiliteLength;
			let end = start + length;

			if (start > 0) {
				arr.push(extractParts(extract, 0, start));
			}

			arr.push(`<mark>${extractParts(extract, start, length)}</mark>`);
			arr.push(extractParts(extract, end));
			messages[i].extract = arr.join('');
		}
	});

	return _.template(layout)({views, counts});
}
112962
function QueryString(search) {
        "use strict";
    
        if (search.substr(0, 1) === '?') {
            search = search.substr(1);
        }
    
        search = search.split('&')
    
        if (search == "") return {};
    
        for (var i = 0; i < search.length; ++i) {
    
            var param = search[i].split('=', 2);
            if (param.length != 2) {
                continue;
            }
    
            this[param[0]] = decodeURIComponent(param[1].replace(/\+/g, " "));
    
        }
    
    }
420706
function run(filter) {
                var filter;
                if (typeof window !== "undefined") {
                    try {
                        it.reporter("html", "it");
                    } catch (e) {
                        it.reporter("tap");
                    }
                    var paramStr = window.location.search.substring(1);
                    var params = {};
                    if (paramStr.length > 0) {
                        _(paramStr.split('&')).forEach(function (part) {
                            var p = part.split('=');
                            params[decodeURIComponent(p[0])] = decodeURIComponent(p[1]);
                        });
                    }
                    if (params.hasOwnProperty("filter")) {
                        filter = params.filter;
                    }
                } else {
                    it.reporter("tap");
                }
                return interfaces.run(filter);
            }
1297624
function (res, args) {

            var resFromFilters = args.res;

            // set final error flag
            if (resFromFilters.errorData) {
                res.error = true;
            }

            // resFromFilters as precedence over handler response
            if (resFromFilters.data) {
                res.data = resFromFilters.data;
            }

            if (resFromFilters.errorData) {
                res.errorData = resFromFilters.errorData;
            }

            if (res.error) {
                var errorEvt = {
                    name : "error",
                    requestUrl : resFromFilters.requestUrl,
                    requestObject : args.requestObject,
                    errorData : res.errorData
                };

                // add HTTP errors if any
                if (resFromFilters.error) {
                    errorEvt.httpError = {
                        error : resFromFilters.error,
                        status : resFromFilters.status
                    };
                }
                this.$raiseEvent(errorEvt);
            }

            // finish by calling the requester callback
            this.$callback(args.cb, res, this.CALLBACK_ERROR);
        }
508561
def list_issues(context, id, sort, limit):
    

    result = component.list_issues(context, id=id, sort=sort, limit=limit)
    headers = ['id', 'status', 'product', 'component', 'title', 'url']
    utils.format_output(result, context.format, headers)
892371
function(fieldName, value) {
                var queryStringValue;
                if (!this.hasRegisteredFilterField(fieldName)) {
                    this.registerFilterableField(fieldName, '');
                }
                this.filterableFields[fieldName].value = value;
                if (_.isArray(value)) {
                    queryStringValue = value.join(',');
                } else {
                    queryStringValue = value;
                }
                this.queryParams[fieldName] = function() {
                    return queryStringValue || null;
                };
                this.isStale = true;
            }
372358
def add_issue_status(self, name, **attrs):
        
        return IssueStatuses(self.requester).create(self.id, name, **attrs)
953722
function processIssues(issues) {
			if (options.rootElement) {
				issues = issues.filter(isIssueInTestArea);
			}
			if (options.hideElements) {
				issues = issues.filter(isElementOutsideHiddenArea);
			}
			return issues.map(processIssue).filter(isIssueNotIgnored);
		}
1363011
function( filters, fieldPrefix, selectorWithoutBells ){
    return  {
      querySelector: this._makeMongoConditions( filters.conditions || {}, fieldPrefix, selectorWithoutBells ),
      sortHash:  this._makeMongoSortHash( filters.sort || {}, fieldPrefix )
    };
  }
1157853
def add_filter(filter = nil, &block)
      id = "#{filter.inspect}/#{block.inspect}".hash

      @filters[id] = if filter.kind_of?(Filter)
                       filter
                     elsif filter.kind_of?(String)
                       StringFilter.new(filter)
                     elsif filter.kind_of?(Regexp)
                       RegexpFilter.new(filter)
                     elsif block
                       BlockFilter.new(block)
                     else
                       raise ArgumentError, 'Please specify either a string, ' \
                         'filter, or block to filter source files with!'
                     end

      true
    end
393259
function checkOpenBlocks(blocks, html) {
	var issues = [];
	var lines = html.split('\n');
	blocks.forEach(function(block) {
		var issue = checkOpenBlock(block, lines);
		if (issue) issues.push(issue);
	});
	return issues;
}
83663
def join_issues(issues,
                    separator: ObjectInspector.configuration.issues_separator)
      the_issues = Array(issues).tap(&:compact!)
      the_issues.join(separator) if the_issues.any?
    end
364556
def issue_tags(issue):
    """"""
    labels = issue.get('labels', [])
    return [label['name'].replace('tag: ', '') for label in labels if label['name'].startswith('tag: ')]
773398
function (filter) {
            if (!filter) {
                filter = null;
            }
            var comments = this.__comments;

            if (filter !== null) {
                comments = comments.filter(function (c) {
                    return c.context === filter;
                });
            }

            return comments;
        }