Showing 4,841 of 7,782 total issues
Function isRoundingRequired
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
isRoundingRequired(val: string | number, fmt: string, localizedSymbols?: zk.LocalizedSymbols): boolean {
if (!fmt || val == null || val == '')
return false;
var useMinsuFmt;
Function clearCSSFlex
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
clearCSSFlex(wgt: zk.Widget, o: FlexOrient, clearAllSiblings?: boolean): void {
if (!wgt._cssFlexApplied) return;
const pwgt = wgt.parent;
if (!pwgt) return;
Consider simplifying this complex logical expression. Open
Open
if (ZKBIND1_ANNO.equals(nm) || ZKBIND2_ANNO.equals(nm) || BIND_ANNO.equals(nm)
|| LOAD_ANNO.equals(nm) || SAVE_ANNO.equals(nm) || VALIDATOR_ANNO.equals(nm)
|| CONVERTER_ANNO.equals(nm) || ID_ANNO.equals(nm) || INIT_ANNO.equals(nm)) {
continue;
}
Consider simplifying this complex logical expression. Open
Open
if (x >= 0 && y >= 0 && x1 <= jq.innerWidth() && y1 <= jq.innerHeight()) {
var oels = _overflowElement(this, recursive),
inView = true;
for (var i = 0; i < oels.length; i++) {
// ZK-2619 : Errorbox not shown when WrongValueException is thrown on a multiline textbox
Method setVisible
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public boolean setVisible(boolean visible) {
final boolean old = super.setVisible(visible);
if (old != visible) {
final String style = getStyle();
if (visible) {
Method getFormat0
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private String getFormat0() throws IOException {
String format = null;
if (_data != null) {
try {
format =
Method escape
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
static void escape(String s, StringBuffer sb) {
for(int i=0;i<s.length();i++){
char ch=s.charAt(i);
switch(ch){
case '"':
Method coerceToNumber
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected static final Number coerceToNumber(final Number number,
final Class<?> type) throws ELException {
if (Long.TYPE == type || Long.class.equals(type)) {
return Long.valueOf(number.longValue());
}
Method startOperation
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private void startOperation(final String operation, final boolean evenLonger) {
final Desktop desktop = Executions.getCurrent().getDesktop();
System.out.println("current desktop: '" + desktop.getId() + "' ServerPush enabled: " + desktop.isServerPushEnabled());
if(!desktop.isServerPushEnabled()) {
Method parseEventExpression
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static Object[] parseEventExpression(Component comp, String evtexpr, Component defaultComp, boolean deferred)
throws ComponentNotFoundException {
final int j = evtexpr.lastIndexOf('.');
final String evtnm;
Object target;
Method wireComponents
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private void wireComponents(final PsdoCompFunctor functor, final boolean ignoreNonNull) {
final Class<?> ctrlClass = _controller.getClass();
// wire to fields
Reflections.forFields(ctrlClass, Wire.class, new FieldRunner<Wire>() {
public void onField(Class<?> clazz, Field field, Wire anno) {
Method wireEventListeners0
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private static void wireEventListeners0(final Component component, final Object controller, final boolean rewire) {
Reflections.forMethods(controller.getClass(), Listen.class, new MethodRunner<Listen>() {
public void onMethod(Class<?> clazz, Method method, Listen anno) {
// check method signature
if ((method.getModifiers() & Modifier.STATIC) != 0)
Method parseValueArray
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private static String[] parseValueArray(String rval, Location loc) {
final List<String> attrs = new ArrayList<String>();
final int len = rval.length();
char quot = (char) 0;
final StringBuffer sb = new StringBuffer(len);
Method parseZScript
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private void parseZScript(NodeInfo parent, Element el, AnnotationHelper annHelper) {
if (el.getAttributeItem("forEach") != null)
throw new UiException(message("forEach not applicable to <zscript>", el));
if (annHelper.clear())
log.warn(message("Annotations are ignored since <zscript> doesn't support them", el));
Method processEvent
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private void processEvent(Desktop desktop, Component comp, Event event) {
final Configuration config = desktop.getWebApp().getConfiguration();
if (config.isEventThreadEnabled()) {
EventProcessingThreadImpl evtthd = null;
synchronized (_idles) {
Method writeObject
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private synchronized void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException {
s.defaultWriteObject();
boolean written = false;
if (_sortAsc instanceof ListitemComparator) {
Method writeObject
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private synchronized void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException {
s.defaultWriteObject();
boolean written = false;
if (_sortAsc instanceof TreeitemComparator) {
Method setSelectAll
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public void setSelectAll(boolean selectAll) {
if (selectAll) {
boolean isGroupSelectable = model.isGroupSelectable();
List<E> all = new LinkedList<>();
for (int i = 0, j = model.getGroupCount(); i < j; i++) {
Method removeChild
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public boolean removeChild(Component child) {
if (_paging == child && _pgi == child && inPagingMold())
throw new IllegalStateException(
"The paging component cannot be removed manually. It is removed automatically when changing the mold");
// Feature 1906110: prevent developers from removing it accidently
Function partition
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
d3.layout.partition = function() {
var hierarchy = d3.layout.hierarchy(),
size = [1, 1]; // width, height
function position(node, x, dx, dy) {