Java代写:CS350 Debugging



Important Note

Homeworks are solo work. You may not share details of your solution/code with anyone else in the class. No Late work will be accepted.

Part 1 - Debugging Basics and Problem Reporting

  1. a) What are the differences between testing and debugging? b) How testing and debugging complement each other? c) Is testing necessarily a prerequisite of debugging? Explain. (2 points)

  2. What are the major differences between a dedicated problem-tracking system such as BUGZILLA and a general organizing and messaging tool such as Microsoft Outlook? (2 points)

  3. Here is a link to an actual problem report on BUGZILLA about Firefox browser. Is this a bug report or feature request? What is the current status of the problem? What is the priority level? Who is assigned to work on this problem? Is this a perfect problem report? Justify your answer to the last question by elaborating on 1) what necessary information are included?, and 2) what necessary/important/“good-to-have” information are missing? (4 points)

Part 2 - Simplification

  1. The function bool geegg(String s) returns:
    • true, i.e.failure, if the string s contains three g characters or more
    • true, i.e. failure, if the string s contains two e characters or more
    • false, i.e. no failure, otherwise.
      For instance, geeg(“good eggs tomorrow”) returns true, and geeg(“no eggs today”) returns false.
      Apply ddmin() algorithm on the following inputs:
    • a. a-debugging-exam
    • b. as-easy-as-pie

Write down all the steps ddmin() would take to simplify these inputs. (6 points)

  1. The ddmin() algorithm finds only one possible 1-minimal input (i.e. an input where removing any single character makes the failure disappear). Sketch an extension of ddmin() algorithm that finds all possible 1-minimal inputs. (7 points)

Part 3 - Debugging by Observation

  1. Follow the instructions in Also, find here. As part of the requirements, you will need to work with Log4j. A straightforward way to do so is to download Log4j binary and place “log4j-api-2.12.1.jar”, “log4j-core-2.12.1.jar”, and “log4j-1.2-api-2.12.1.jar” files in your classpath. Also, you may find this useful which provides explanations on Log4j’s architecture and how it works. (24 points)