Skip to content

Instantly share code, notes, and snippets.

View jhejderup's full-sized avatar
:octocat:

Joseph Hejderup jhejderup

:octocat:
  • Delft
  • 12:16 (UTC +02:00)
View GitHub Profile
{
"name": "portscanner",
"version": "1.0.0",
"description": "Simple Koa Web Service that checks active ports",
"main": "index.js",
"author": "jhejderup",
"license": "MIT",
"dependencies": {
"koa": "^2.3.0",
"koa-router": "^7.2.1",
@jhejderup
jhejderup / README.md
Last active April 9, 2019 13:15
Generating a list maven coordinates for top 200 Maven packages

How to run the script

curl -L https://gist.githubusercontent.com/jhejderup/47c620d0661761a4d55923b8b4cef0f3/raw/b3b4da7c939ad9f1ebbf807b423387693040f30a/gen_mvn_list.sh | bash -s API_KEY
@jhejderup
jhejderup / building_repos.sh
Last active August 1, 2019 18:05
Evaluation buildup: ground truth
# This assumes you have compiled uppdatera-agent repository
# the commit was used to build this: https://github.com/jhejderup/uppdatera-agent/tree/e9dd1b60eb863c03a20249681e1b07269b0b928d
# Compile+test run for each repository
cat sampleLockfiles.txt | awk -F'/' '{print "github/"$4"/"$5}' | parallel 'java -jar /home/jhejderup/uppdatera-study/tooling/uppdatera-agent/target/uppdatera-agent-1.0-SNAPSHOT-jar-with-dependencies.jar /usr/lib/jvm/java-1.8.0-openjdk-amd64/ {}' > >(tee -a stdout.log) 2> >(tee -a stderr.log >&2)
# Log data will be stored in the files `stdout.log` adn `stderr.log`
#Using embedded build tools can leave it in a limbo and not terminate, we have to manually terminate it after some time:
@jhejderup
jhejderup / CSV_LAYOUT.txt
Last active April 28, 2019 10:17
Dependency and Test Case extraction
Repository Module hasTest #testFiles testDirectories dependencies buildManifestPath
Explanation:
Module = name of sub-projects (can be null if not specified)
#testFiles = total number of test files (recursive search)
testDirectories = test folders as identified by Maven/Gradle
buildManifestPath = Path to the pom.xml/build.gradle
dependencies = groupId:artifactId:version:SCOPE;;groupId:artifactId:version:SCOPE
@jhejderup
jhejderup / aggregate.sh
Last active April 28, 2019 21:15
Curate dependency-application dataset
## get aggregation per dep
cat dataset_compile_depz.csv | awk -F"\t" '{print $6}' | awk '{print tolower($0)}' | sort -n | uniq -c > ../results/compile_dep_agg.txt
## generate list of uniq dependencies (removing the :compile)
cat dataset_compile_depz.csv | awk -F"\t" '{print $6}' | awk -F":" '{print $1":"$2":"$3}' | awk '{print tolower($0)}' | sort | uniq > dataset_all_uniq_dependencies.txt
@jhejderup
jhejderup / 0.uppdatera.txt
Last active May 17, 2019 11:46
Exploring Bugswarm dataset
# https://github.com/davidmoten/rxjava-jdbc/compare/a32e185515b382657025cab5a099419a0cb53ce0..f1c233ea90a8eda2f1a40fefb6914a1bc43fd386 YES
=======
Something is wrong with the call graph: the change entity is missing
Need to debug
# https://github.com/jcabi/jcabi-s3/compare/f07c20c0157179ac71dfceaaf2a9728f91346f9c..a1baac71d5de82d7f53aacbdd8bfed1000347d17 YES
=======
Cannot be built:
-> [INFO] -------------------------------------------------------------

Init

wget https://zenodo.org/record/2536573/files/Libraries.io-open-data-1.4.0.tar.gz
tar -zxvf Libraries.io-open-data-1.4.0.tar.gz 
cd libraries-1.4.0-2018-12-22/

What are the package managers in the data source?

cat dependencies-1.4.0-2018-12-22.csv  | awk -F, '{print $2}' | sort | uniq
@jhejderup
jhejderup / called-classes-dyn.txt
Last active July 25, 2019 12:23
Github repos with badges
47 org.slf4j.LoggerFactory
46 org.slf4j.helpers.SubstituteLoggerFactory
45 org.slf4j.impl.StaticLoggerBinder
32 org.slf4j.helpers.Util
17 org.apache.commons.logging.LogFactory
16 com.google.common.base.Preconditions
14 com.codahale.metrics.MetricRegistry
13 org.slf4j.helpers.MessageFormatter
13 org.slf4j.helpers.FormattingTuple
12 org.slf4j.impl.SimpleLoggerFactory
@jhejderup
jhejderup / js.bib
Last active July 26, 2019 05:32
JavaScript Reading List
@inproceedings{malik2019nl2type,
title={NL2Type: inferring JavaScript function types from natural language information},
author={Malik, Rabee Sohail and Patra, Jibesh and Pradel, Michael},
booktitle={Proceedings of the 41st International Conference on Software Engineering},
pages={304--315},
year={2019},
organization={IEEE Press}
}