Showing 54 of 54 total issues
File GPU.java
has 398 lines of code (exceeds 250 allowed). Consider refactoring. Open
package it.mobistego.utils;
/**
* http://blog.kibotu.net/3d/how-to-get-android-opengl-1-0-2-0-information-constrains-revisited
* <p/>
Method encodeMessage
has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring. Open
private static byte[] encodeMessage(int[] oneDPix, int imgCols, int imgRows,
MessageEncodingStatus message, ProgressHandler hand) {
int channels = 3;
int shiftIndex = 4;
- 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
File Utility.java
has 303 lines of code (exceeds 250 allowed). Consider refactoring. Open
package it.mobistego.utils;
import android.content.Context;
import android.database.Cursor;
import android.graphics.Bitmap;
Method onClick
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
public void onClick(View v) {
if (v != null) {
int id = v.getId();
switch (id) {
Method doInBackground
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
protected MobiStegoItem doInBackground(MobiStegoItem... params) {
MobiStegoItem result = null;
maxProgeress = 0;
if (params.length > 0) {
Method decodeMessage
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
private static void decodeMessage(byte[] oneDPix, int imgCols,
int imgRows, MessageDecodingStatus mesg) {
Vector<Byte> v = new Vector<>();
- 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 onActivityResult
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
//if (ActivityCompat.checkSelfPermission(getActivity(), Manifest.permission.WRITE_EXTERNAL_STORAGE) == PackageManager.PERMISSION_GRANTED) {
File f = new File(Environment.getExternalStorageDirectory(),
- 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 splitImage
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public static List<Bitmap> splitImage(Bitmap bitmap) {
//For the number of rows and columns of the grid to be displayed
- 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 encodeMessage
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static List<Bitmap> encodeMessage(List<Bitmap> splittedImages,
String str, ProgressHandler hand) {
List<Bitmap> result = new ArrayList<>(splittedImages.size());
str += END_MESSAGE_CONSTANT;
str = START_MESSAGE_CONSTANT + str;
Method getView
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
public View getView(final int position, View convertView, ViewGroup parent) {
LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
Method doInBackground
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
@Override
protected MobiStegoItem doInBackground(MobiStegoItem... params) {
MobiStegoItem result = null;
maxProgeress = 0;
if (params.length > 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 encodeMessage
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public static List<Bitmap> encodeMessage(List<Bitmap> splittedImages,
String str, ProgressHandler hand) {
List<Bitmap> result = new ArrayList<>(splittedImages.size());
str += END_MESSAGE_CONSTANT;
str = START_MESSAGE_CONSTANT + str;
- 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 decodeMessage
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
private static void decodeMessage(byte[] oneDPix, int imgCols,
int imgRows, MessageDecodingStatus mesg) {
Vector<Byte> v = new Vector<>();
Method onActivityResult
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
//if (ActivityCompat.checkSelfPermission(getActivity(), Manifest.permission.WRITE_EXTERNAL_STORAGE) == PackageManager.PERMISSION_GRANTED) {
File f = new File(Environment.getExternalStorageDirectory(),
Method saveMobiStegoItem
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static MobiStegoItem saveMobiStegoItem(String message, Bitmap srcEncoded, Context ctx) throws IOException {
String name = UUID.randomUUID().toString();
String fileNameOriginalPng = name + Constants.FILE_PNG_EXT;
Method toString
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
@NonNull
@Override
public String toString() {
return "OpenGLGles20Info{" +
"GL_RENDERER='" + GL_RENDERER + '\'' +
Method equals
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
- 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 loadOnCreate
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
protected void loadOnCreate() {
GL_RENDERER = glGetString(GLES10.GL_RENDERER);
GL_VERSION = glGetString(GLES10.GL_VERSION);
Method encodeMessage
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
private static byte[] encodeMessage(int[] oneDPix, int imgCols, int imgRows,
MessageEncodingStatus message, ProgressHandler hand) {
int channels = 3;
int shiftIndex = 4;
Method onCreateView
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
@Override
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
List<MobiStegoItem> mobiTmp;
mobiTmp = Utility.listMobistegoItem(getActivity());
- 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"