figshare
Browse
1/1
9 files

The Human Experience of Comprehending Source Code in Virtual Reality - Replication Package

Version 2 2022-04-02, 04:20
Version 1 2022-04-01, 18:31
journal contribution
posted on 2022-04-02, 04:20 authored by James DominicJames Dominic

Data collected from the program comprehension studies

Summary responses

Date is available in: In-Study Survey Data.csv


NASA TLX Survey data

Data is available in: Post Experiment Data.csv


Demographics data

Data is available in: Demographics Survey Data.csv



Data Analysis

Data is available in: data_script.zip


Instructions for downloading the virtual reality environment executable

Download the following executable VirtualDesk_executable.zip. Unzip the folder and double click VirtualDesk.exe to run VirtualDesk.


Hardware

HTC Vive or Vive PRO

2X Vive Controller

2X Vive Base Station (w/ mount or tripod)

2X Vive Tracker w/ USB dongle

Leap Motion Controller w/VR mount

Double-sided adhesive strips (we used Mounting Squares)


3D Printing


The mouse tracker.fbx and keyboard-newfit.fbx files can be used to 3D print the mounts for the keybaord and mouse. These mounts are designed to work with HP T4E63AA keyboard and mouse.


Software

Steam Desktop Application, SteamVR

Leap Motion Orion Software

Unity 2018.3.1f1


SteamVR

Ensure that all necessary devices are recognized by SteamVR before running the virtual reality environment. This includes the headset, controllers, base stations, and trackers. If the virtual reality environment is run before this step, the application may not work properly.


Leap Motion

Setup the Leap Motion controller before using the virtual reality environment. This includes mounting the controller to the headset and downloading the Leap Motion software. Instructions for both can be found here: https://developer.leapmotion.com/vr-setup/vive


The virtual reality environment

Download virtualdesk.zip, unzip the folder, and open the project in Unity. Please download the below assets to work with the Unity project.

  1. Photon Unity Networking Classic - FREE
  2. Photon Voice
  3. VR Desktop Mirror asset - x windows and HTC Vive

Open the scene "Avatar_Test", and build the scene by going to File -> Build Settings -> Build. This will create an executable file inside the project folder.

While the virtual reality enviornment is initializing, hold both arms outwards in a t-pose.

With the the virtual reality enviornment application maximized:

  • Left Shift - toggle keyboard alignment menu on/off
  • Left Ctrl - toggle desktop view

Use the keyboard alignment menu to position and rotate the virtual keyboard. The menu can be navigated by pressing the corresponding letter on the keyboard that appears next to each menu option in parentheses.


The Java code used during the program comprehension experiments

Download the following source code: Java-Code-Snippets.zip


Each code snippet and output results

Example 1: This program outputs the median from an array of integer values.

Output: 5.0


Example 2: This program outputs the maximum and minimum values separated by a comma.

Output: 150, 2


Example 3: This program outputs the factorial of a value. The output is the value and the factorial separated by a comma.

Output: 6, 720


Example 4: This program outputs employee information using encapsulation.

Output: Mario null, 32, 112233


Example 5: This program outputs true or false depending on whether or not the input values are palindrome.

Output: false, true


Example 6: This program removes the duplicates in a sorted array in-place so each element appears only once and returns the new length.

Output: 5


Example 7: Given a string s consists of upper/lower-case alphabets and empty space characters ' ', return the length of last word (last word means the last appearing word if we loop from left to right) in the string. If the last word does not exist, return 0.

Output: 7


Example 8: This program demonstrates polymorphism and it occurs when we have many classes that are related to each other by inheritance.

Output: Pig class foo called.

Animal class bar called.


History

Usage metrics

    Licence

    Exports

    RefWorks
    BibTeX
    Ref. manager
    Endnote
    DataCite
    NLM
    DC