Skip to content

Latest commit

 

History

History
61 lines (31 loc) · 1.62 KB

lab-report-2-week-4.md

File metadata and controls

61 lines (31 loc) · 1.62 KB

Lab Report 2, Week 4


Code change one


Image


Failure inducing input


Symptom of failure-inducing output

Image

The original code did not account for a markdown file that does not have any links in it. Because the java doesn't read any links inside the markdown file, it throws a StringIndexOutOfBoundsException, which is the symptom of the bug.


Code change two


Image


Failure inducing input


Symptom of failure-inducing output

Image

The original code did not account for a markdown file that has an image instead of a link. The markdown syntax for images and links is very similar, so the java would return a file pathway to the image because it thinks that it is a link, creating a symptom of the bug.


Code change three


Image


Failure inducing input


Symptom of failure-inducing output

Image

The original code did not account for a markdown file that has unexpected characters inside the link address, such as an extra set parantheses. MarkdownParse would read the first closed parantheses as the end of the link and return the link with missing characters, which is the symptom of the bug.