Showing 4,841 of 7,782 total issues
Method parseRange
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private static int[] parseRange(String range) {
range = range.toLowerCase(java.util.Locale.ENGLISH);
for (int j = 0, k, len = range.length(); (k = range.indexOf("bytes", j)) >= 0;) {
for (k += 5; k < len;) {
char cc = range.charAt(k++);
Method browser
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private static boolean browser(String userAgent, String type) {
if (userAgent == null) //Bug ZK-1582: userAgent could be null if it is robot.
return false;
int last = (type = type.trim()).length();
Method removeFromQueryString
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static final StringBuffer removeFromQueryString(StringBuffer sb, String name)
throws UnsupportedEncodingException {
name = encodeURIComponent(name);
if (name == null || name.isEmpty())
Function load
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
jQuery.fn.load = function( url, params, callback ) {
var selector, type, response,
self = this,
off = url.indexOf( " " );
Function isValid
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function isValid(m) {
if (m._isValid == null) {
var flags = getParsingFlags(m),
parsedParts = some.call(flags.parsedDateParts, function (i) {
return i != null;
Function Request
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function Request(input, options) {
options = options || {}
var body = options.body
if (Request.prototype.isPrototypeOf(input)) {
if (input.bodyUsed) {
Function clientInfo
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function clientInfo(dtid?: string): void {
zAu._cInfoReg = true;
var orient = '',
dpr = 1.0;
Function _rmDesktop
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function _rmDesktop(dt: zk.Desktop, dummy?: boolean): void {
var url = zk.ajaxURI(undefined, { desktop: dt, au: true }),
data = jq.param({
dtid: dt.id,
cmd_0: dummy ? 'dummy' : 'rmDesktop',
Function relativeTime$1
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function relativeTime$1(posNegDuration, withoutSuffix, thresholds, locale) {
var duration = createDuration(posNegDuration).abs(),
seconds = round(duration.as('s')),
minutes = round(duration.as('m')),
hours = round(duration.as('h')),
Function addAft
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function addAft(wgt: zk.Widget, ...codes: string[]): void {
const p = wgt.parent,
onSizeChildren: zk.Widget[] = [],
fn = function (child: zk.Widget): void {
var act = _beforeAction(child, 'show') as never;
Function rounding
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
rounding(valStr: string, ri: number, rounding: number, minus: boolean): string {
switch (rounding) {
case 0: //UP
valStr = up(valStr, ri);
break;
Function _escapeQuote
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_escapeQuote(fmt: string, localizedSymbols: zk.LocalizedSymbols): Efmt {
//note we do NOT support mixing of quoted and unquoted percent
var cc, q = -2, shift = 0, ret = '', jdot = -1, purejdot = -1, pure = '', prej = -1,
validPercent = fmt ? !new RegExp('(\'[' + localizedSymbols.PERCENT + '|' + localizedSymbols.PER_MILL + ']+\')', 'g').test(fmt) : true;
//note we do NOT support mixing of quoted and unquoted percent|permill
Function _scroll
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_scroll(): void {
var current = new Date(),
delta = current.valueOf() - this.lastScrolled!.valueOf();
this.lastScrolled = current;
if (this.opts.scroll == window) {
Function constructor
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
constructor(widget: zk.Widget, currentTarget: object) {
super(); // FIXME: params?
this.$view = widget;
this.$currentTarget = currentTarget;
this._aftercmd = {};
Function getForSourceFile
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function getForSourceFile(sourceFilePath: string): TSDocConfigFile {
const sourceFileFolder = path.dirname(path.resolve(sourceFilePath));
// First, determine the file to be loaded. If not found, the configFilePath will be an empty string.
const configFilePath = TSDocConfigFile.findConfigPathForFolder(sourceFileFolder);
// If configFilePath is an empty string, then we'll use the folder of sourceFilePath as our cache key.
Function getTsdocConfig
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function getTsdocConfig(): TSDocConfiguration | undefined {
const tsdocConfig = new TSDocConfiguration();
try {
const tsdocConfigFile = getForSourceFile(context.getFilename());
if (!tsdocConfigFile.fileNotFound) {
Function Literal
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Literal(node) {
if (node.raw === 'null') {
let parent = node.parent;
while (parent) {
if (visitedNode[parent.range.toString()]) {
Method zzRefill
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private boolean zzRefill() throws java.io.IOException {
/* first: make room (if you can) */
if (zzStartRead > 0) {
System.arraycopy(zzBuffer, zzStartRead,
Method normalize
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static final String normalize(String path) {
if (path == null)
return "";
//remove consecutive slashes
Method checkNamespacePrefix
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static final void checkNamespacePrefix(String prefix, Locator loc) {
if (prefix == null || prefix.length() == 0)
return; //OK: null or empty
String reason = null;