All Projects → GeoffreyHecht → paprika

GeoffreyHecht / paprika

Licence: AGPL-3.0 license
Paprika is a powerfull toolkit to detect some code smells in analysed Android applications.

Programming Languages

java
68154 projects - #9 most used programming language
ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to paprika

Reek
Code smell detector for Ruby
Stars: ✭ 3,693 (+5252.17%)
Mutual labels:  smell, smell-detector
GeneticAlgorithmUniversityClassScheduler
A class scheduler using adaptive-elitist genetic algorithm.
Stars: ✭ 98 (+42.03%)
Mutual labels:  research-project
ML-in-Agriculture
Prediction of Crop Yield for farmers based on weather, satellite data
Stars: ✭ 32 (-53.62%)
Mutual labels:  research-project
UAV-Stereo-Vision
A program for controlling a micro-UAV for obstacle detection and collision avoidance using disparity mapping
Stars: ✭ 30 (-56.52%)
Mutual labels:  research-project
pronto-reek
Pronto runner for Reek, code smell detector for Ruby
Stars: ✭ 27 (-60.87%)
Mutual labels:  smell-detector
cashpack
A stateless event-driven HPACK codec
Stars: ✭ 25 (-63.77%)
Mutual labels:  research-project
alprbd
Automated Bangla License Plate Detection and Recognition - Implementation. For thesis report visit- https://github.com/dipu-bd/thesis-report
Stars: ✭ 16 (-76.81%)
Mutual labels:  research-project
caffe-simnets
The SimNets Architecture's Implementation in Caffe
Stars: ✭ 13 (-81.16%)
Mutual labels:  research-project
RTX-Mesh-Shaders
Different mesh shading techniques using the NVIDIA RTX (Turing) technology.
Stars: ✭ 84 (+21.74%)
Mutual labels:  research-project
derain-net
A (WIP) TensorFlow reproduction of Fu, Huang, Ding, Liao, and Paisley's method for single-image rain removal (https://arxiv.org/abs/1609.02087)
Stars: ✭ 15 (-78.26%)
Mutual labels:  research-project
lc
JIT compiler for Scheme targeting x86-64 platforms
Stars: ✭ 24 (-65.22%)
Mutual labels:  research-project
oim
Algorithms for online influence maximization
Stars: ✭ 16 (-76.81%)
Mutual labels:  research-project
landslide
Research project on building and evaluating deep learning models for landslides detection on satellite images
Stars: ✭ 36 (-47.83%)
Mutual labels:  research-project
Fake-News-Detection-Project
Fake News Detection Final Year College Project with Project Report, PPT, Code, Research Paper and Documents.
Stars: ✭ 16 (-76.81%)
Mutual labels:  research-project
KrantikariQA
An InformationGain based Question Answering over knowledge Graph system.
Stars: ✭ 54 (-21.74%)
Mutual labels:  research-project
vein
🔮⚡️Vein is an open source high-level strictly-typed programming language with a standalone OS, arm and quantum computing support.
Stars: ✭ 31 (-55.07%)
Mutual labels:  research-project
Patterns
A catalogue of Rust design patterns, anti-patterns and idioms
Stars: ✭ 5,495 (+7863.77%)
Mutual labels:  antipatterns
go-web-app-antipatterns
Short examples of common anti-patterns in Go Web Applications.
Stars: ✭ 163 (+136.23%)
Mutual labels:  antipatterns

paprika

Paprika is a powerfull toolkit to detect some code smells in analysed Android applications.

Table of contents

Code smells detection

Paprika supports currently 16 Object-Oriented (OO) and Android code smells.

Object-Oriented code smells:

  • Blob Class (BLOB),
  • Swiss Army Knife (SAK),
  • Long Method (LM),
  • Complex Class (CC).

Android code smells:

  • Internal Getter/Setter (IGS),
  • Member Ignoring Method (MIM),
  • No Low Memory Resolver (NLMR),
  • Leaking Inner Class (LIC),
  • UI Overdraw (UIO),
  • Invalidate Without Rect (IWR),
  • Heavy AsyncTask (HAS),
  • Heavy Service Start (HSS),
  • Heavy Broadcast Receiver (HBR),
  • Init OnDraw (IOD),
  • Hashmap Usage (HMU),
  • Unsupported Hardware Acceleration (UHA),
  • Bitmap Format Usage (BFU).

How to use it ?

Paprika needs an Android plaftorm to works.
You can find many Android platforms in this Github repository.
You can find the java application in paprika/out/artifacts/Paprika_jar.

Please note that Paprika is not working correctly with Java 9, we recommend to launch it with Java 7.

You can choose between two modes: analyse and query. The analyse mode will allows you to scan with Soot your Application application, to detect contained code smells. You can use after the query mode on your Neo4J graph to request how much code smells your application contains. Note that you don't need to install Neo4J on your side since it's embedded into Paprika (however it can be useful if you want to visualize the database).

Analyse mode usage

usage: paprika analyse [-h] -a ANDROIDJARS -db DATABASE -n NAME -p PACKAGE -k KEY -dev DEVELOPER
               -cat CATEGORY -nd NBDOWNLOAD -d DATE -r RATING [-pr PRICE] -s SIZE [-u UNSAFE]
               [-vc VERSIONCODE] [-vn VERSIONNAME] [-tsdk TARGETSDKVERSION] [-sdk SDKVERSION]
               [-omp ONLYMAINPACKAGE] apk

positional arguments:
  apk                    Path of the APK to analyze

optional arguments:
  -h, --help             show this help message and exit
  -a ANDROIDJARS, --androidJars ANDROIDJARS
                         Path to android platforms jars
  -db DATABASE, --database DATABASE
                         Path to neo4J Database folder
  -n NAME, --name NAME   Name of the application
  -p PACKAGE, --package PACKAGE
                         Application main package
  -k KEY, --key KEY      sha256 of the apk used as identifier
  -dev DEVELOPER, --developer DEVELOPER
                         Application developer
  -cat CATEGORY, --category CATEGORY
                         Application category
  -nd NBDOWNLOAD, --nbDownload NBDOWNLOAD
                         Numbers of downloads for the app
  -d DATE, --date DATE   Date of download
  -r RATING, --rating RATING
                         application rating
  -pr PRICE, --price PRICE
                         Price of the application
  -s SIZE, --size SIZE   Size of the application
  -u UNSAFE, --unsafe UNSAFE
                         Unsafe mode (no args checking)
  -vc VERSIONCODE, --versionCode VERSIONCODE
                         Version Code of the application (extract from manifest)
  -vn VERSIONNAME, --versionName VERSIONNAME
                         Version Name of the application (extract from manifest)
  -tsdk TARGETSDKVERSION, --targetSdkVersion TARGETSDKVERSION
                         Target SDK Version (extract from manifest)
  -sdk SDKVERSION, --sdkVersion SDKVERSION
                         sdk version (extract from manifest)
  -omp ONLYMAINPACKAGE, --onlyMainPackage ONLYMAINPACKAGE
                         Analyze only the main package of the application

Query mode usage

usage: paprika query [-h] -db DATABASE [-r REQUEST] [-c CSV] [-k KEY] [-p PACKAGE] [-d DETAILS]

optional arguments:
  -h, --help             show this help message and exit
  -db DATABASE, --database DATABASE
                         Path to neo4J Database folder
  -r REQUEST, --request REQUEST
                         Request to execute
  -c CSV, --csv CSV      path to register csv files
  -k KEY, --key KEY      key to delete
  -p PACKAGE, --package PACKAGE
                         Package of the applications to delete
  -d DETAILS, --details DETAILS
                         Show the concerned entity in the results

Example of usage

First we launch the analysis of an app (it can be done multiple times with differents apps into the same database) :

java -Xmx2G -XX:+UseConcMarkSweepGC -jar  Paprika.jar analyse -a "/path/to/androidjars" -db "/path/to/database" -n "myapp" -p "mypackage.app" -k sha256oftheAPK -dev mydev -cat mycat -nd 100 -d "2017-01-001 10:23:39.050315" -r 1.0 -s 1024 -u "unsafe mode" /path/to/apk.apk

Then you can launch queries on this database using query mode, for example :

java -Xmx2G -XX:+UseConcMarkSweepGC -jar  Paprika.jar query -db "/path/to/database" -d TRUE -r ALLAP

Troubleshootings

paprika is still in development.
Found a bug? We'd love to know about it!
Please report all issues on the github issue tracker.

License

GNU AFFERO GENERAL PUBLIC LICENSE (version 3)

Credits

Developed by Geoffrey Hecht, SOMCA, SPIRALS - LATECE

Publications

If you want to read more about how Paprika work, how you can use it or to cite us, we recommend you to read :

Tracking the Software Quality of Android Applications along their Evolution

Detecting Antipatterns in Android Apps

An Empirical Study of the Performance Impacts of Android Code Smells

Investigating the Energy Impact of Android Smells

Détection et analyse de l’impact des défauts de code dans les applications mobiles (in French)

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].