Showing 108 of 144 total issues
Method updateSub
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
private void updateSub(int subType, byte[] bytes, String encoding, int width, int height) {
Method onLayout
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
protected void onLayout(boolean changed, int l, int t, int r, int b) {
Method transform
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
private static Bitmap transform(Matrix scaler, Bitmap source, int targetWidth, int targetHeight, int options) {
Method parseSubstring
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private int parseSubstring(String s, int start, int defaultValue) {
int length = s.length();
if (start == length)
return defaultValue;
- 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 postscan
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private void postscan(String[] directories) throws RemoteException {
Iterator<FileCacheEntry> iterator = mFileCache.values().iterator();
while (iterator.hasNext()) {
FileCacheEntry entry = iterator.next();
- 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 audioTrackWrite
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private void audioTrackWrite(byte[] audioData, int offsetInBytes, int sizeInBytes) {
if (mAudioTrack != null && mAudioTrack.getPlayState() == AudioTrack.PLAYSTATE_PLAYING) {
int written;
while (sizeInBytes > 0) {
written = sizeInBytes > mAudioTrackBufferSize ? mAudioTrackBufferSize : sizeInBytes;
- 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 onInfo
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private void onInfo(Message msg) {
switch (msg.arg1) {
case MediaPlayer.MEDIA_INFO_BUFFERING_START:
{
//Log.i("MiuiVideo: receive buffer start, isplaying " + isPlaying());
- 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 createVideoThumbnail
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public static Bitmap createVideoThumbnail(Context ctx, String filePath, int kind) {
if (!Vitamio.isInitialized(ctx)) {
return null;
}
Bitmap bitmap = 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
Avoid too many return
statements within this method. Open
return;
Avoid too many return
statements within this method. Open
return true;
Avoid too many return
statements within this method. Open
return;
Avoid too many return
statements within this method. Open
return false;
Avoid too many return
statements within this method. Open
return false;
Avoid too many return
statements within this method. Open
return;
Avoid too many return
statements within this method. Open
return;
Avoid too many return
statements within this method. Open
return;
Avoid too many return
statements within this method. Open
return false;
Avoid too many return
statements within this method. Open
return false;
Avoid too many return
statements within this method. Open
return true;
Avoid too many return
statements within this method. Open
return;