CSCI 2134 Assignment 3
1. Review the specification (specification.pdf) in the docs directory. You will absolutely need to understand it and the code you are debugging. The main method for the program is in JSim.java. Spend some time tracing through the code and creating a diagram
of how the classes and code is put together. This will help you a lot later on!
2. Fix all bugs that are identified by the tests generated by the unit tests in the following classes:
3. Create a buglist.txt file in the docs directory. For each bug that you fix add an entry
to this file that includes:
a. The file/class name where the bug was.
b. The method where the bug was
c. The line number(s) where the buggy code was
d. A description of what the bug was
e. A description of what the fix was.
4. The specification states you can assume the input is correct JSON but this is not always the
case. The previous developer made a set of example input and expected output in the system_tests directory which have strange results. The code usually exits with an error or
Exception when the input is not correct JSON but in some cases may instead report that a
correct JSON object is equal to an incorrect JSON object. Track down the reason:
• Compile and run JSim with each of the 8 input files t1.in, t2.in, … t8.in.
• Compare the output with the diff command to the expected output t1.expected, t2.expected, … t8.expected
• For each output that differs from the expected output, debug the code and determine
the reason for the mismatch. Fix any identified bugs missed by the unit tests.
• Note that fixing one of these bugs may cause some of your unit tests to fail (Hint: in ObjectValueTest) . You do not need to correct the unit tests but if you do then this is worth
a bonus point.
5. Record the identified bugs causing the code to report a correct JSON object is equal to an
incorrect JSON object in buglist.txt. Note: Do not try to make the code handle these
cases. We will do so in Assignment 4.
6. Record any other bugs found and fixed from Step 4 in the previously created buglist.txt
7. Commit and push back the bug fixes and the buglist.txt file to the remote repository
本网站支持淘宝 支付宝 微信支付 paypal等等交易。如果不放心可以用淘宝交易！
E-mail: [email protected] 微信:itcsdx