WebicityBrowser/Webicity

View on GitHub

Showing 455 of 459 total issues

Similar blocks of code found in 3 locations. Consider refactoring.
Open

package com.github.webicitybrowser.spiderhtml.tokenize;
 
import java.io.IOException;
import java.util.function.Consumer;
 
SpiderHTML/src/main/java/com/github/webicitybrowser/spiderhtml/tokenize/RCDataEndTagNameState.java on lines 1..76
SpiderHTML/src/main/java/com/github/webicitybrowser/spiderhtml/tokenize/ScriptDataEndTagNameState.java on lines 1..76

Similar blocks of code found in 3 locations. Consider refactoring.
Open

package com.github.webicitybrowser.spiderhtml.tokenize;
 
import java.io.IOException;
import java.util.function.Consumer;
 
SpiderHTML/src/main/java/com/github/webicitybrowser/spiderhtml/tokenize/RawTextEndTagNameState.java on lines 1..76
SpiderHTML/src/main/java/com/github/webicitybrowser/spiderhtml/tokenize/ScriptDataEndTagNameState.java on lines 1..76

Similar blocks of code found in 3 locations. Consider refactoring.
Open

package com.github.webicitybrowser.spiderhtml.tokenize;
 
import java.io.IOException;
import java.util.function.Consumer;
 
SpiderHTML/src/main/java/com/github/webicitybrowser/spiderhtml/tokenize/RCDataEndTagNameState.java on lines 1..76
SpiderHTML/src/main/java/com/github/webicitybrowser/spiderhtml/tokenize/RawTextEndTagNameState.java on lines 1..76

Method getFitBlockPosition has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring.
Open

@Override
public float getFitBlockPosition(float blockStart, float inlineEnd, AbsoluteSize itemSize) {
// TODO: Simplify this method
Rectangle[] leftRectangles = leftFloats.toArray(Rectangle[]::new);
Rectangle[] rightRectangles = rightFloats.toArray(Rectangle[]::new);

Similar blocks of code found in 2 locations. Consider refactoring.
Open

package com.github.webicitybrowser.spiderhtml.tokenize;
 
import java.io.IOException;
import java.util.function.Consumer;
 
SpiderHTML/src/main/java/com/github/webicitybrowser/spiderhtml/tokenize/ScriptDataEscapedDashDashState.java on lines 1..54

Similar blocks of code found in 2 locations. Consider refactoring.
Open

package com.github.webicitybrowser.spiderhtml.tokenize;
 
import java.io.IOException;
import java.util.function.Consumer;
 
SpiderHTML/src/main/java/com/github/webicitybrowser/spiderhtml/tokenize/ScriptDataEscapeStartDashDashState.java on lines 1..54

Method consumeAURLToken has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
Open

public static Token consumeAURLToken(ReaderHandle reader) throws IOException {
StringBuilder url = new StringBuilder();
while (SharedTokenizer.isWhitespace(reader.peek())) {
reader.read();
}

Similar blocks of code found in 2 locations. Consider refactoring.
Open

package com.github.webicitybrowser.spiderhtml.tokenize;
 
import java.io.IOException;
import java.util.function.Consumer;
 
 
SpiderHTML/src/main/java/com/github/webicitybrowser/spiderhtml/tokenize/ScriptDataDoubleEscapedState.java on lines 1..52

Similar blocks of code found in 2 locations. Consider refactoring.
Open

package com.github.webicitybrowser.spiderhtml.tokenize;
 
import java.io.IOException;
import java.util.function.Consumer;
 
 
SpiderHTML/src/main/java/com/github/webicitybrowser/spiderhtml/tokenize/ScriptDataDoubleEscapedDashState.java on lines 1..52

ArgumentParserImp has 26 methods (exceeds 20 allowed). Consider refactoring.
Open

public class ArgumentParserImp implements ArgumentParser {
 
private final Flag[] flags;
private final boolean allowLooseArguments;
private final String helpHeader;
Severity: Minor
Found in GetOpts/src/main/java/everyos/api/getopts/imp/ArgumentParserImp.java - About 3 hrs to fix

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    package com.github.webicitybrowser.spiderhtml.tokenize;
     
    import java.io.IOException;
    import java.util.function.Consumer;
     
     
    SpiderHTML/src/main/java/com/github/webicitybrowser/spiderhtml/tokenize/ScriptDataDoubleEscapeStartState.java on lines 1..49

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    package com.github.webicitybrowser.spiderhtml.tokenize;
     
    import java.io.IOException;
    import java.util.function.Consumer;
     
     
    SpiderHTML/src/main/java/com/github/webicitybrowser/spiderhtml/tokenize/ScriptDataDoubleEscapeEndState.java on lines 1..49

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    package com.github.webicitybrowser.spiderhtml.tokenize;
     
    import java.util.function.Consumer;
     
    import com.github.webicitybrowser.spec.html.parse.ParseError;
    SpiderHTML/src/main/java/com/github/webicitybrowser/spiderhtml/tokenize/AttributeValueSingleQuotedState.java on lines 1..48

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    package com.github.webicitybrowser.spiderhtml.tokenize;
     
    import java.util.function.Consumer;
     
    import com.github.webicitybrowser.spec.html.parse.ParseError;
    SpiderHTML/src/main/java/com/github/webicitybrowser/spiderhtml/tokenize/AttributeValueDoubleQuotedState.java on lines 1..48

    Method decode has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
    Open

    public int[] decode(byte[] buffer, Charset fallbackEncoding) throws IOException {
    ByteBuffer byteBuffer = ByteBuffer.wrap(buffer);
    if (encoding == null) {
    this.encoding = bomSniff(byteBuffer);
    encoding = encoding != null ? encoding : fallbackEncoding;

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    package com.github.webicitybrowser.threadyweb.graphical.layout.util;
     
    import com.github.webicitybrowser.thready.gui.directive.core.pool.DirectivePool;
    import com.github.webicitybrowser.threadyweb.graphical.directive.border.BorderWidthDirective;
    import com.github.webicitybrowser.threadyweb.graphical.directive.border.BorderWidthDirective.BottomBorderWidthDirective;
    ThreadyWeb/src/main/java/com/github/webicitybrowser/threadyweb/graphical/layout/util/LayoutPaddingCalculations.java on lines 1..35

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    package com.github.webicitybrowser.threadyweb.graphical.layout.util;
     
    import com.github.webicitybrowser.thready.gui.directive.core.pool.DirectivePool;
    import com.github.webicitybrowser.threadyweb.graphical.directive.PaddingDirective;
    import com.github.webicitybrowser.threadyweb.graphical.directive.PaddingDirective.BottomPaddingDirective;
    ThreadyWeb/src/main/java/com/github/webicitybrowser/threadyweb/graphical/layout/util/LayoutBorderWidthCalculations.java on lines 1..35

    WindowGUI has 21 methods (exceeds 20 allowed). Consider refactoring.
    Open

    public class WindowGUI {
     
    private final Window window;
    private final BiConsumer<Component, Consumer<GUIWindow>> windowCreator;
    private final BrowserInstance browserInstance;

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

      package com.github.webicitybrowser.spiderhtml.tokenize;
       
      import java.io.IOException;
      import java.util.function.Consumer;
       
      SpiderHTML/src/main/java/com/github/webicitybrowser/spiderhtml/tokenize/HexadecimalCharacterReferenceState.java on lines 1..37

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

      package com.github.webicitybrowser.spiderhtml.tokenize;
       
      import java.io.IOException;
      import java.util.function.Consumer;
       
      SpiderHTML/src/main/java/com/github/webicitybrowser/spiderhtml/tokenize/DecimalCharacterReferenceState.java on lines 1..37
      Severity
      Category
      Status
      Source
      Language