zel/src/main/java/org/zkoss/zel/impl/parser/SimpleCharStream.java
File SimpleCharStream.java
has 345 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/* Generated By:JavaCC: Do not edit this line. SimpleCharStream.java Version 5.0 */
/* JavaCCOptions:STATIC=false,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */
package org.zkoss.zel.impl.parser;
/**
SimpleCharStream
has 25 methods (exceeds 20 allowed). Consider refactoring. Open
Open
@SuppressWarnings("all") // Ignore warnings in generated code
public class SimpleCharStream
{
/** Whether parser is static. */
public static final boolean staticFlag = false;
Method FillBuff
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
Open
protected void FillBuff() throws java.io.IOException
{
if (maxNextCharInd == available)
{
if (available == bufsize)
- 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 FillBuff
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected void FillBuff() throws java.io.IOException
{
if (maxNextCharInd == available)
{
if (available == bufsize)
Method ExpandBuff
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected void ExpandBuff(boolean wrapAround)
{
char[] newbuffer = new char[bufsize + 2048];
int newbufline[] = new int[bufsize + 2048];
int newbufcolumn[] = new int[bufsize + 2048];
Method adjustBeginLineColumn
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public void adjustBeginLineColumn(int newLine, int newCol)
{
int start = tokenBegin;
int len;
Method UpdateLineColumn
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected void UpdateLineColumn(char c)
{
column++;
if (prevCharIsLF)
Method adjustBeginLineColumn
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
Open
public void adjustBeginLineColumn(int newLine, int newCol)
{
int start = tokenBegin;
int len;
- 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 ReInit
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public void ReInit(java.io.InputStream dstream, String encoding, int startline,
int startcolumn, int buffersize) throws java.io.UnsupportedEncodingException