Showing 244 of 412 total issues
Method authenticateInteractive
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
public boolean authenticateInteractive(String user, String[] submethods, InteractiveCallback cb) throws IOException
{
try
{
initialize(user);
Method readAttrs
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
private SFTPv3FileAttributes readAttrs(TypesReader tr) throws IOException
{
/*
* uint32 flags
* uint64 size present only if flag SSH_FILEXFER_ATTR_SIZE
Method rawFingerPrint
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
private static byte[] rawFingerPrint(String type, String keyType, byte[] hostkey)
{
MessageDigest dig = null;
try {
Method requestX11Forwarding
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
public void requestX11Forwarding(String hostname, int port, byte[] cookie, boolean singleConnection)
throws IOException
{
if (hostname == null)
throw new IllegalArgumentException("hostname argument may not be null");
Method decodeSSHECDSASignature
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
private byte[] decodeSSHECDSASignature(byte[] sig) throws IOException {
byte[] rsArray;
TypesReader tr = new TypesReader(sig);
Method uncompress
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
public byte[] uncompress(byte[] buffer, int start, int[] length) {
int inflated_end = 0;
inflate.next_in = buffer;
inflate.next_in_index = start;
Method receiveMessage
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public int receiveMessage(byte[] buffer, int off, int len) throws IOException
{
final int packetLength;
final int payloadLength;
- 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 13 (exceeds 5 allowed). Consider refactoring. Open
public int read(byte[] b, int off, int len) throws IOException
{
if (b == null)
throw new NullPointerException();
- 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 decodeSignature
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
private byte[] decodeSignature(byte[] sig) throws IOException
{
byte[] rsArray = null;
if (sig.length == 40)
- 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 put
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public void put(String[] localFiles, String[] remoteFiles, String remoteTargetDirectory, String mode)
throws IOException
{
Session sess = null;
- 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 waitForChannelRequestResult
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
private boolean waitForChannelRequestResult(Channel c) throws IOException
{
synchronized (c)
{
while ((c.successCounter == 0) && (c.failedCounter == 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 encode
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static char[] encode(byte[] content)
{
CharArrayWriter cw = new CharArrayWriter((4 * content.length) / 3);
int idx = 0;
Method pseudoRegex
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
private final boolean pseudoRegex(char[] pattern, int i, char[] match, int j)
{
/* This matching logic is equivalent to the one present in OpenSSH 4.1 */
while (true)
Method authenticateInteractive
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public boolean authenticateInteractive(String user, String[] submethods, InteractiveCallback cb) throws IOException
{
try
{
initialize(user);
- 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 run
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
public void run()
{
synchronized (todolist)
{
while (true)
Method requestGlobalForward
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
public int requestGlobalForward(String bindAddress, int bindPort, String targetAddress, int targetPort)
throws IOException
{
RemoteForwardingData rfd = new RemoteForwardingData();
Method write
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
public void write(SFTPv3FileHandle handle, long fileOffset, byte[] src, int srcoff, int len) throws IOException
{
checkHandleValidAndOpen(handle);
while (len > 0)
Method createAttrs
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
private byte[] createAttrs(SFTPv3FileAttributes attr)
{
TypesWriter tw = new TypesWriter();
int attrFlags = 0;
Method put
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
public void put(String[] localFiles, String[] remoteFiles, String remoteTargetDirectory, String mode)
throws IOException
{
Session sess = null;
Method addHostkeyToFile
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
public final static void addHostkeyToFile(File knownHosts, String[] hostnames, String serverHostKeyAlgorithm,
byte[] serverHostKey) throws IOException
{
if ((hostnames == null) || (hostnames.length == 0))
throw new IllegalArgumentException("Need at least one hostname specification");