- Python 2.7 or newer
- NiCad clone detection tool
- RQ1: Do developers release apps with code copied from Stack Overflow?
- RQ2: Do developers respect the copyright terms of code reused from Stack Overflow?
- RQ3: Do Stack Overflow users respect copyright terms when publishing code snippets on Stack Overflow?
- RQ4: How long does a Stack Overflow code snippet remains in released versions of an app?
-
data_mining_scripts folder contains the scripts to mine raw data.
- extract2json.py: extract Java and Android related code snippets from the Stack Exchange dump (please set Posts.xml's path in line 45).
- write_snippets.py: extract the results of extract2json.py (in JSON) into separate Java files (please set the input path in line 10).
- run_nicad: run NiCad clone detection tool between Stack Overflow snippets and the Android inconsistent files [1].
-
analytic_scripts folder contains the scripts to analyze the clone detection results and to answer the research questions.
- case_study.py: compute code reuse occurrences for the researh questions.
- overlap.py: compute the overlap rate (proportion) between a code reuse snippet and a license inconsistent snippet for RQ1.
- migrating.py: identify the "migrated code snippets" (in RQ3) in which the 1st app's file and the 2nd app's file are released under different licenses.
- evolution_snippet.py: extract input files for RQ4.
- RQ4_analysis folder contains scripts and data to compute code reuse snippets' lifespan.
-
match_names folder cotains scripts and data for matching developer names between the studied Android apps and Stack Overflow posts.
-
raw_data folder contains Android snippets' creation date and raw data of RQ2 & RQ3.
-
data folder contains clone detection results and some intermediate data for analyses.
-
presentation_slides.pdf shows the presentation slides for SANER 2017.
- Inconsistent files: http://swat.polymtl.ca/data/SANER16/AndroidAppsDataONF-DroidJanv2015.7z
- Stack Exchange data dump: https://archive.org/details/stackexchange (All content retrieved from Stack Overflow is licensed under CC BY-SA 3.0).
- NiCad tool: http://www.txl.ca/nicaddownload.html
- Download the Stack Exchange data dump and inconsistent files.
- Run extract2json.py, write_snippets.py, and run_nicad consecutively to obtain the clone code pairs between Stack Overflow posts and Android inconsistent files.
- Use the scripts in analytic_scripts and match_names to obtain results of the four research questions.
- Ons Mlouki, Foutse Khomh and Giuliano Antoniol, On the Detection of Licenses Violations in Android Ecosystem, in Proceedings of the 23rd IEEE International Conference on Software Analysis, Evolution, and Reengineering (SANER).
Please send email to le.an@polymtl.ca