Showing 7,775 of 7,775 total issues
Method render
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static final void render(ServletContext ctx, HttpServletRequest request, HttpServletResponse response,
Richlet richlet, String path, boolean pageDOM, Writer out) throws ServletException, IOException {
if (path == null)
path = Https.getThisServletPath(request);
Method putAll
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
public void putAll(Map<? extends K, ? extends V> c) {
if (c == _map) //special case
return;
if (_map instanceof LinkedHashMap) {
Method getAttributeNames
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
public Enumeration getAttributeNames() {
final Enumeration _e = _req.getAttributeNames();
final Iterator _it = _attrs.keySet().iterator();
return new Enumeration() {
Object _next;
Function d3_dispatch
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
function d3_dispatch(type) {
var dispatch = {},
listeners = [];
dispatch.add = function(listener) {
Function firstWalk
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
function firstWalk(node, previousSibling) {
var children = node.children,
layout = node._tree;
if (children && (n = children.length)) {
var n,
Function drag
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
d3.behavior.drag = function() {
var event = d3.dispatch("drag", "dragstart", "dragend");
function drag() {
this
Function wiggle
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
"wiggle": function(data) {
var n = data.length,
x = data[0],
m = x.length,
max = 0,
Function finish
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
finish: function( type ) {
if ( type !== false ) {
type = type || "fx";
}
return this.each( function() {
Function off
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
off: function( types, selector, fn ) {
var handleObj, type;
if ( types && types.preventDefault && types.handleObj ) {
// ( event ) dispatched jQuery.Event
Function parseHTML
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
jQuery.parseHTML = function( data, context, keepScripts ) {
if ( typeof data !== "string" ) {
return [];
}
if ( typeof context === "boolean" ) {
Function addChd
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function addChd(wgt: zk.Widget, ...rargs: string[]): void {
if (wgt) {
const onSizeChildren: zk.Widget[] = [],
fn = function (child: zk.Widget): void {
const act = _beforeAction(child, 'show') as never,
Function _deconstructPacket
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function _deconstructPacket(data: ArrayBufferView | unknown & { buffer?} | undefined, buffers: unknown[]): unknown {
if (!data) return data;
if (_isBinary(data)) {
const placeholder = { _placeholder: true, num: buffers.length };
Function setLoaded
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function setLoaded(pkg: string, wait?: boolean): void { //internal
_xloadings.$remove(pkg);
_loading[pkg] = true;
if (wait) {
Function isParameter
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
isParameter: function (node: TSESTree.Node, expr: TSESTree.Node) {
if (expr.type === 'CallExpression') {
// Check whether any of the call arguments equals the node.
Function _swipeEnd
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
_swipeEnd(devt: JQuery.TriggeredEvent): void {
jq(this.node).off(moveEvt, this.proxy(this._swipeMove));
if (start && stop && this.opts) {
var dispX: number | undefined, dispY: number | undefined,
dispT = stop.time - start.time, dir: 'left' | 'right' | 'up' | 'down' | undefined;
Function snap
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
function snap(dg: zk.Draggable, pointer: zk.Offset): zk.Offset {
var x = pointer[0],
y = pointer[1];
if (dg._isVer) {
var move = y;
Function CallExpression
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
CallExpression(node) {
const { callee } = node;
if (callee.type !== AST_NODE_TYPES.MemberExpression ||
callee.object.type !== AST_NODE_TYPES.Identifier ||
callee.object.name !== 'zk' ||
Function AssignmentExpression
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
AssignmentExpression: function (node) {
const left = node.left as TSESTree.Expression & {property?: {name: string}, object: {name: string, property?: TSESTree.Identifier}};
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
const isHref: boolean = left.property?.name === 'href';
if (!isHref) {
Similar blocks of code found in 6 locations. Consider refactoring. Open
public void afterShadowAttached(ShadowElement shadow, Component host) {
final UiLifeCycle[] ary = _uiCycles.toArray();
for (int j = 0; j < ary.length; ++j) {
try {
ary[j].afterShadowAttached(shadow, host);
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 77.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 6 locations. Consider refactoring. Open
public void afterShadowDetached(ShadowElement shadow, Component prevhost) {
final UiLifeCycle[] ary = _uiCycles.toArray();
for (int j = 0; j < ary.length; ++j) {
try {
ary[j].afterShadowDetached(shadow, prevhost);
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 77.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76