##RIMEL 1A
To use this you need:
Python3
Code-maat (https://github.com/adamtornhill/code-maat)
Neo4j (https://neo4j.com/)

First install code-maat
Then to setup python install the neo4j driver


pip install neo4j-driver


The logins setup in the script are neo4j/admin

Then clone the repository you want to analyse in the same folder as the scripts

First you want to extract the log from git
In your repository folder use
git log --all --numstat --date=short --pretty=format:'--%h--%ad--%aN' --no-renames > ../logs.txt
Then in the folder containing logs.txt:
java -jar code-maat-1.0-SNAPSHOT-standalone.jar -l logs.txt -c git2 -a entity-ownership > entity-ownership.csv

Then run neo4j, to do that in neo4j's bin folder use ./neo4j start
Once started up, extract the components using
python3 extract-components.py . your-repository-folder
Then extract the ownership
python3 extract-ownership.py entity-ownership.csv
This could take a while

Once done, all the data should be extracted in the neo4j.
You can go to http://localhost:7474/ and see the data.
To get all author for your repository with links to components use:
Match (a:author), (c:component),(c1:component) where (c)-[:OWNER_OF]->(a) and (c)-[:COMPONENT_OF]->(c1) and c1.name='your-repository-name' return a,c,c1

To run our heuristic use:
Match (a:author), (c:component),(c1:component) where (c)-[:OWNER_OF]->(a) and (c)-[:COMPONENT_OF]->(c1) and c1.name='your-repository-name' return distinct a,size(()-[:OWNER_OF]->(a)) as ownership order by ownership desc