vazexqi / CodingSpectator

Watches and analyzes code edits in the Eclipse IDE non-invasively
http://codingspectator.cs.illinois.edu
Other
20 stars 14 forks source link

Write SQL queries to answer research questions #288

Closed vazexqi closed 13 years ago

vazexqi commented 13 years ago

We imported data into SQL tables in #254. Now we would like to write some queries to answer our research questions.

reprogrammer commented 13 years ago

c6a25572e3482183c626bb3da4b8b9e0cf179975 .. 7e70195d3554e083da3b73a0fe5803a8d6e50201 made it possible to import the CSV file into a database from command line. Perform the following steps to import the CSV into the database:

  1. cd CodingSpectator/plug-ins/edu.illinois.codingspectator.csvtosql/ant.
  2. ant clean; ant
  3. cd bin
  4. CS_CSV="/path/to/logs.csv" java -XX:MaxPermSize=512m -Xms40m -Xmx20G -jar csvtosql.jar

34777d87fed66a1db6446d5b3ca23fbd3cc92fd8 added the configuration file for using SqlTool.

Follow the steps below to interact with the database from commond line. I found the following instructions on the web.

  1. Get sqltool.jar and hsqldb.jar from CodingSpectator/plug-ins/org.hsqldb/ant/downloads/hsqldb-2.2.5.zip.
  2. cd CodingSpectator/plug-ins/edu.illinois.codingspectator.csvtosql/ant/bin
  3. Get the Eclipse UDC data file from our private CodingSpectator SVN directory under Experiment/UDCData/commands.csv and copy it into this directory
  4. java -XX:MaxPermSize=512m -Xms40m -Xmx10G -jar sqltool.jar --rcFile ../../hsqldb/sqltool.rc db_file
  5. A prompt would appear after successfully connecting (this could take several minutes depending on the size of the database).
  6. Enter \i /path/to/CodingSpectator/scripts/analysis-queries.sql