Showing 4,841 of 7,782 total issues
Method resolveAmbiguousMethod
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private static Method resolveAmbiguousMethod(Set<Method> candidates,
Class<?>[] paramTypes) {
// Identify which parameter isn't an exact match
Method m = candidates.iterator().next();
Method getValue
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public Object getValue(EvaluationContext ctx) throws ELException {
ctx.putContext(AstValue.class, new Integer(this.jjtGetNumChildren()));
ctx.putContext(Node.class, this.children[0]); //20110905, henrichen: bind property node
Object base = this.children[0].getValue(ctx);
ctx.putContext(Node.class, this.children[0]); //20110905, henrichen: bind property node
Method resolveAmbiguousWrapper
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private static Wrapper resolveAmbiguousWrapper(Set<Wrapper> candidates,
Class<?>[] paramTypes) {
// Identify which parameter isn't an exact match
Wrapper w = candidates.iterator().next();
Method toString
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public String toString() {
if (_type == null && _id == null && _classes.isEmpty() && _pseudoClasses.isEmpty() && _attributes.isEmpty()
&& _pseudoElements.isEmpty())
return "*";
Method next
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public boolean next() {
if (_done)
throw new IllegalStateException("Iterate twice not allowed");
if (_status == null) {
Method unwrap
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public NameSpace unwrap(Scope scope) {
if (_bshns == null) {
_bshns = BSHInterpreter.getInterpreter(scope).newNS(scope);
if (_vars != null) {
for (Map.Entry<String, Object> me : _vars.entrySet()) {
Method getAnnotateMethods
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private List<Method> getAnnotateMethods(Binder binder, Class<T> annotationClass, Class<?> vmClass) {
List<Method> methods = null;
synchronized (annoMethodCache) {
//have to synchronized cache, because it calls expunge when get.
methods = annoMethodCache.get(vmClass);
Method doExecute
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected void doExecute(Component comp, String command, Map<String, Object> commandArgs, BindContext ctx,
Set<Property> notifys) {
try {
Matcher matcher = CALL_OTHER_VM_COMMAND_PATTERN.matcher(command);
if (matcher.find()) {
Method addFormSaveBindings0
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private void addFormSaveBindings0(Component comp, String formId, String saveExpr, String[] beforeCmds,
String[] afterCmds, Map<String, Object> bindingArgs, String validatorExpr,
Map<String, Object> validatorArgs) {
final boolean prompt = isPrompt(beforeCmds, afterCmds);
if (prompt) {
Method service
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public void service(org.zkoss.zk.au.AuRequest request, boolean everError) {
final String cmd = request.getCommand();
if (cmd.equals(Events.ON_OPEN)) {
OpenEvent evt = OpenEvent.getOpenEvent(request);
Method parseFieldNames
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private Collection<FieldInfo> parseFieldNames(String fieldnames, boolean ascending) {
final Collection<String> fields = CollectionsX.parse(new ArrayList<String>(), fieldnames, ',');
final List<FieldInfo> results = new ArrayList<FieldInfo>(fields.size());
for (final Iterator<String> it = fields.iterator(); it.hasNext();) {
final String field = it.next().trim();
Method removePartial
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
@SuppressWarnings("unchecked")
private boolean removePartial(Collection<?> master, Collection<?> c, boolean isRemove, boolean byKey,
boolean byValue) {
int sz = c.size();
int removed = 0;
Function data
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
data: function( key, value ) {
var i, name, data,
elem = this[ 0 ],
attrs = elem && elem.attributes;
Function leverageNative
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function leverageNative( el, type, expectSync ) {
// Missing expectSync indicates a trigger call, which must force setup through jQuery.event.add
if ( !expectSync ) {
if ( dataPriv.get( el, type ) === undefined ) {
Function copyConfig
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function copyConfig(to, from) {
var i,
prop,
val,
momentPropertiesLen = momentProperties.length;
Function defineLocale
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function defineLocale(name, config) {
if (config !== null) {
var locale,
parentConfig = baseConfig;
config.abbr = name;
Function dayOfYearFromWeekInfo
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function dayOfYearFromWeekInfo(config) {
var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow, curWeek;
w = config._w;
if (w.GG != null || w.W != null || w.E != null) {
Function _parseTextToArray
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function _parseTextToArray(txt: string, fmt: string): string[] | undefined {
//ZK-5423
var literals = extractLiteral(fmt); //extract literal token from format
//remove literal from format and text
fmt = fmt.replace(/'.*?'/g, ' '); //remove any string enclosed by single quotes
Function scrollToElement
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
scrollToElement(dom: HTMLElement): void {
var cave = this.cave,
domTop = jq(dom).offset()!.top,
domBottom = domTop + dom.offsetHeight,
domLeft = jq(dom).offset()!.left,
Method toReadable
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
Open
public static final String toReadable(long val, String skips) {
if (skips == null) skips = SKIPS;
final int mod = 36 - skips.length();
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"