Showing 72 of 117 total issues
Method enter
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
public Opt<Identity> enter(final Request trequest)
throws IOException {
final Href href = new RqHref.Base(trequest).href();
final Iterator<String> code = href.param(PsFacebook.CODE).iterator();
Method cookie
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
public Iterable<String> cookie(final CharSequence key)
throws IOException {
final Map<String, String> map = this.map();
final String value = map.getOrDefault(
Method equals
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
@SuppressFBWarnings("EQ_UNUSUAL")
public boolean equals(final Object that) {
return new Unchecked<>(
new Or(
Method equals
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
@SuppressFBWarnings("EQ_UNUSUAL")
public boolean equals(final Object that) {
return new Unchecked<>(
new Or(
Method request
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
@SuppressWarnings("PMD.AvoidInstantiatingObjectsInLoops")
private com.jcabi.http.Request request(final Request req,
final URI dest) throws Exception {
final String method = new RqMethod.Base(req).method();
com.jcabi.http.Request proxied = new JdkRequest(dest).method(method);
Method freshMap
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
private Map<String, List<String>> freshMap() throws IOException {
final String body = new RqPrint(this.req).printBody();
final Map<String, List<String>> map = new HashMap<>(1);
for (final String pair : body.split("&")) {
if (pair.isEmpty()) {
Method request
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
@SuppressWarnings("PMD.AvoidInstantiatingObjectsInLoops")
private com.jcabi.http.Request request(final Request req,
final URI dest) throws Exception {
final String method = new RqMethod.Base(req).method();
com.jcabi.http.Request proxied = new JdkRequest(dest).method(method);
- 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 act
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
@Override
@SuppressWarnings("PMD.AvoidCatchingGenericException")
public Response act(final Request req) throws Exception {
final Scalar<Long> time = System::currentTimeMillis;
final long start = time.value();
- 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 map
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private Map<String, String> map() throws IOException {
final Map<String, String> map = new HashMap<>(0);
final Iterable<String> values =
new RqHeaders.Base(this).header("Cookie");
for (final String value : values) {
- 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 prepareDocType
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private static void prepareDocType(final InputStream body,
final Transformer transformer) throws IOException {
try {
final String html = "html";
final DocumentType doctype = RsPrettyXml.getDocType(body);
- 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 read
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
@Override
public int read(final byte[] buf, final int off, final int len)
throws IOException {
if (!this.eof && this.pos >= this.size) {
this.nextChunk();
- 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 route
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private static Response route(final Take take, final Fallback fbk,
final Request req) throws Exception {
final long start = System.currentTimeMillis();
Response res;
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 exec
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public void exec(final FtRemote.Script script) throws Exception {
final AtomicBoolean exit = new AtomicBoolean();
final CountDownLatch latch = new CountDownLatch(1);
final Thread thread = new Thread(
() -> {
- 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 exec
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public void exec(final MainRemote.Script script) throws Exception {
final File file = File.createTempFile("takes-", ".txt");
if (!file.delete()) {
throw new IOException(
String.format(
- 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 init
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
@Override
@SuppressWarnings("PMD.CyclomaticComplexity")
public void init() throws ServletException {
super.init();
final String cname = this.getServletConfig()
- 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 enter
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
@Override
public Opt<Identity> enter(final Request req) throws Exception {
final Iterator<String> flg = new RqHref.Base(req).href()
.param(this.flag).iterator();
Opt<Identity> user = new Opt.Empty<>();
- 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 xor
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private byte[] xor(final byte[] input) {
final byte[] output = new byte[input.length];
if (this.secret.length == 0) {
System.arraycopy(input, 0, output, 0, input.length);
} else {
- 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 printHead
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public void printHead(final OutputStream output) throws IOException {
final String eol = "\r\n";
final Writer writer =
new OutputStreamWriter(output, StandardCharsets.UTF_8);
int pos = 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 response
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private Response response(final String home, final URI dest,
final com.jcabi.http.Response rsp) {
final Collection<String> hdrs = new LinkedList<>();
hdrs.add(
String.format(
- 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 freshMap
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private Map<String, List<String>> freshMap() throws IOException {
final String body = new RqPrint(this.req).printBody();
final Map<String, List<String>> map = new HashMap<>(1);
for (final String pair : body.split("&")) {
if (pair.isEmpty()) {
- 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"