- Python 2.7
- Windows path entry
- srcML (
developbranch version, or 1.0 release)
- Necessary if you intend to generate your own srcml input file
- Windows path entry
- Integrates data from core and plugins
- Computes source code tokens and syntatic context from line/col data
- Applies fixation filters to raw gaze data
- Renders highlighted tokens based on fixation data
- basic: Generic area based fixation algorithm.
- ivt: Calculate velocitiy based fixations. Remove high velocity gazes to create clusters of slower eye movements, then filter those clusters to ensure they meet a minimum fixation length to get the final set of fixations.
- idt: Calulate dispersion based fixations. These are sequences of gazes (of at least a minimum length) where the sum of the maximum difference in x values and the maximum difference in y values is less than the dispersion threshold.
Processing Source Code Using srcML
It is necessary to provide gaze2src with an XML marked up version of the source code under study using srcML. This can be done with the following command:
srcml [source code] --position -o output.xml
In the command above, source code can be individual files, a directory, a compressed archive, or any combination of the three. The position option addes details concerning line and column information of the original source code. If there are issues with position data encoded into the output XML such as invalid positions, you can supplement the above command with the option
--jobs 1 which may resolve the issue.
For additional information about srcml, please visit https://www.srcml.org/
Basic usages requires the following:
python gaze2src.py [path to core xml file] [path to plugin xml file] [path to srcml generated xml of source code] -o [Output directory to store results and intermediate files] -f [fixation filter]
More advanced usage allows for fixation filter parameters to be applied during processing. Listed below are the options and to what filters they apply.
|Parameter||BASIC FILTER||IVT FILTER||IDT FILTER|
In the event that a filter parameter is set that is not applicable to the chosen filter the value will simply be ignored.
Results from running gaze2src include:
- a complete sqlite3 database of all raw data, source code tokens and syntatic context, and fixation IDs associated with each raw gaze data point
- a TSV file showing the calculated fixations, IDs, and tokens
- an html version for each source code file viewed with the source code tokens for each fixation highlighted