Showing 4,841 of 7,782 total issues
Method renderTab
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
public void renderTab(Tab item, final Object data, final int index) throws Exception {
final Tabbox tabbox = item.getTabbox();
final Tabs tabs = tabbox.getTabs();
final int size = tabbox.getModel().getSize();
final String tmn = "model";
- 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"
Further reading
Method coerceToUi
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
public Object coerceToUi(Object val, Component comp, BindContext ctx) {
Tree tree = (Tree) comp;
final TreeModel<Object> model = tree.getModel();
if (model != null && !(model instanceof TreeSelectableModel)) {
- 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"
Further reading
Method render
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
public String render(final Component owner, final Object data, final int index) throws Exception {
final int size = ((Selectbox) owner).getModel().getSize();
final Template tm = resolveTemplate(owner, owner, data, index, size, "model");
if (tm == null) {
return Objects.toString(data);
- 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"
Further reading
Method render
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
public void render(final Radio item, final Object data, final int index) throws Exception {
final Radiogroup radiogroup = item.getRadiogroup();
final int size = radiogroup.getModel().getSize();
final Template tm = resolveTemplate(radiogroup, item, data, index, size, "model");
if (tm == null) {
- 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"
Further reading
Method doInitRenderer
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
private void doInitRenderer() {
if (getPage() == null)
return;
final Renderer renderer = new Renderer();
try {
- 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"
Further reading
Method service
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. 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);
_open = evt.isOpen();
- 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"
Further reading
Method updateHeadercmTristate
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
private void updateHeadercmTristate(Set<?> partialSelections) {
if (getTreecols() != null) {
boolean treecolShouldBePartial = false;
int numberOfChild = 0,
selectedChild = 0;
- 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"
Further reading
Method getPreferredLocale
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
public static final Locale getPreferredLocale(HttpSession sess, ServletRequest request) {
final String s = Library.getProperty(Attributes.PREFERRED_LOCALE);
final Locale l = (s != null) ? Locales.getLocale(s) : request.getLocale();
if (sess != null) {
Object v = sess.getAttribute(Attributes.PREFERRED_LOCALE);
- 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"
Further reading
Function _overflowElement
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
function _overflowElement(self: JQZK, recursive): [HTMLElement, HTMLElement][] {
// eslint-disable-next-line zk/noNull
var el: Node | undefined | null = self.jq[0],
te, le, oels: [HTMLElement, HTMLElement][] = [];
do {
- 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"
Further reading
Function create
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
create(context) {
function checkBooleanTypeSyntax(node: TSESTree.TSTypeAnnotation | TSESTree.TSTypeAssertion | TSESTree.TSAsExpression) {
if (node.typeAnnotation.type === AST_NODE_TYPES.TSUnionType) {
let booleanType: TSESTree.TSBooleanKeyword | null | undefined;
for (const t of node.typeAnnotation.types) {
- 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"
Further reading
Method getPropertyDescriptors
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
public PropertyDescriptor[] getPropertyDescriptors(BeanInfo beanInfo, Class<?> clazz) throws IntrospectionException {
PropertyDescriptor[] introspectorPDsArray = beanInfo.getPropertyDescriptors();
List<PropertyDescriptor> introspectorPDs = introspectorPDsArray != null ? Arrays.asList(introspectorPDsArray)
: Collections.<PropertyDescriptor>emptyList();
Method render
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
public void render(final Radio item, final Object data, final int index) throws Exception {
final Radiogroup radiogroup = item.getRadiogroup();
final int size = radiogroup.getModel().getSize();
final Template tm = resolveTemplate(radiogroup, item, data, index, size, "model");
if (tm == null) {
Function chord
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
d3.svg.chord = function() {
var source = d3_svg_chordSource,
target = d3_svg_chordTarget,
radius = d3_svg_chordRadius,
startAngle = d3_svg_arcStartAngle,
Function nest
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
d3.nest = function() {
var nest = {},
keys = [],
sortKeys = [],
sortValues,
File Files.java
has 272 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* Files.java
Purpose: File related utilities.
Description:
Method processWpdForSourcemapIfAny
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
private String processWpdForSourcemapIfAny(List<String> paths, String originalPathPrefix, String path) throws Exception {
final Content content = (Content) _cache.get(path);
if (content == null) {
log.error("Failed to load the resource: " + path);
throw new java.io.FileNotFoundException("Failed to load the resource: " + path);
Method run
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
public void run() {
++_nThd;
try {
while (_ceased == null) {
if (!isIdle()) {
Method initBinder
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
private AnnotateBinder initBinder(BindEvaluatorX evalx, Component comp) {
final ComponentCtrl compCtrl = (ComponentCtrl) comp;
final Annotation idanno = compCtrl.getAnnotation(BINDER_ATTR, ID_ANNO);
final Annotation initanno = compCtrl.getAnnotation(BINDER_ATTR, INIT_ANNO);
Object binder = null;
Method encodeURL0
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
private static final String encodeURL0(ServletContext ctx, ServletRequest request, ServletResponse response,
String uri) throws Exception {
if (uri == null || uri.length() == 0)
return uri; //keep as it is
Function stack
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
d3.layout.stack = function() {
var values = Object,
order = d3_layout_stackOrders["default"],
offset = d3_layout_stackOffsets["zero"],
out = d3_layout_stackOut,