Go to any open-source repository, where software developers collaborate on the development of open-source software, and download the code from one or more open-source projects. Some potential...

1 answer below »
Go to any open-source repository, where software developers collaborate on the development of open-source software, and download the code from one or more open-source projects. Some potential repositories to explore are: JavaWorld (https://www.javaworld.com/blog/open-source-java-projects/), and Java-Source (http://java-source.net/).
You will notice that the quality of the programs and the quality of the programming varies greatly. Try to remember that these open source projects are posted by programmers of all different levels of experience, and the projects are in various stages of development. As such, they do not always embody sound programming practices.
Examine the source code for one or more open-source projects and locate an example in which: (1) the documentation and commenting within the program leaves something to be desired and (2) more than one control flow statement is used. Inspect the code for the individual source files. If you are able to build the project, run the program a few times so you understand what the author of the program was trying to achieve and how the lines of code in the project work. Think about how the commenting could be improved.
Summarize your findings. The final assignment should:
Include a link to the open-source project you chose as an example of poor commenting, or attach an example source file to your posting.Identify the methods within the example program you believe are not sufficiently documented.Examine the control flow statements to determine what they do and if their purpose is clearly documented.Explain why you feel the current commenting within the project needs improvement.Copy the example code into your assignment, replacing or adding detail to the current comments in order to make the program easier for a user to understand.Be in APA Format (Template is attached)350-500 text characters (Not including the example code you will paste)
Answered 1 days AfterNov 08, 2021

Answer To: Go to any open-source repository, where software developers collaborate on the development of...

Neha answered on Nov 08 2021
129 Votes
Code 1
https://github.com/rohinth076/Java-Projects/blob/main/Document%20Downloader/URLMainGUI.java
This code is to create a document downloader in java. This code works well for downloading the documents. The following methods are used in the code.
URLM
ainGUI – This method is for implementing the GUI code. The code shows that there is a single line of comment which is not sufficient to explain the whole method.
actionPerformed – This method in the code is to perform the action on the document. There is no comment in the code. It is a major part of this code, and it is not explained at all. It may create confusion among the users to find what it is actually doing.
Run – This method will download the document. It is called in actionperformed method. The method is documented little bit but not sufficient. It needs few more comments to be added in the code.
This code has limited number of the comments. These comments cannot be utilized to understand the code. If we try to understand the code with the help of comments, then it will not be possible. It has 2-3 comments, and it is not documented sufficiently. The actionperformed and run methods have control flow statements but none of these are documented. The comments are the most important part of the code. They are used for the documentation and allow any new user to understand the code. Currently the user has to read the whole code multiple times to understand the flow and its working.
If any new user is trying to work with the code, then it will be difficult for him to understand what libraries have been imported in the code. A user who does not have any technical background with the Java then it will be difficult for him to understand the use of the libraries which are included in the core. It is sometimes difficult to understand the action which will be performed by the particular library. For example, as we can see in the main GUI class it is extending the J frame and implements action listener but there are no comments which can explain what the use of the JFrame and action listener is. After this the code has get and set methods for the different methods of frame. It will be difficult for the user to understand the need of every get and set method. As we enter into the action performed method then it is a very complex part of the code. It will be very difficult for the person to understand what it is actually performing. It has conditions and branching. It becomes very difficult if we can not understand the conditions and their flow. It is the part where comments are...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here