Showing 108 of 144 total issues
Method getThumbnail
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public static Bitmap getThumbnail(Context ctx, ContentResolver cr, long origId, int kind, BitmapFactory.Options options) {
Method postEventFromNative
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
private static void postEventFromNative(Object mediaplayer_ref, int what, int arg1, int arg2, Object obj) {
Method onDownloadStart
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public void onDownloadStart(String url, String userAgent, String contentDisposition, String mimetype, long contentLength) {
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
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 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
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 true;
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 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 true;