The assessment of code through the use of different metrics is the key goal of supporting the maintenance and development of software. The assessment and analysis are used to automatically be able to make a prediction on the code faults, recommend refactoring, and change in proneness. However, most of the applications that have a strong link between the quality of the code as analyzed by the specified metrics and professed by the developers of codes. Taking an example, most of the refractory recommenders make use of the metrics whereby they act as the fitness function to classify the sequence of refactorings so as to enhance cohesion and reduce coupling. The last people who make use of the metric tools are the software developers, which means that all the code developers are supposed to be updated on the metrics that are able to capture coupling and cohesion as perceived by the developers (Khamis, 2010). According to the already done researches, it shows that there is not enough study done in this field.
The interviewed code developers are required to examine they’re apparent towards code coupling and good quality as accessed by the quality metrics. The assessment of the quality of code through perspective metrics gives the system developers the capability to determine the quality of the code and determine how to fix the faults. However, the quality of the code is a topic to be researched so as to tackle and also adopt new methods to investigate the quality of code such as readability, coupling, complexity, and cohesion. Nevertheless, to achieve the key objective in this assessment report, we used Github Java codes by mining over 200 commits.
Section 1
The assessment and determination of the quality of code at a class level it is important that we consider the quality attribute classes and how they correspond to their respective metrics which can equally measure them. In the following attributes which expose the different qualities of code have automatic metric approaches that are selected form them specifically. Nevertheless, the perspective metrics that are implemented for the Java program.
Cohesion
Cohesion is the first quality attribute that is used in the assessment of the degree to which respective responsibilities on the implementation to which the class belongs to. When the cohesion is too high, it is desirable because it promotes and fosters the single responsibility principle hence hindering the maintainability of the code (García-Munoz, 2016). To carry the assessment of the cohesion attribute, we used two metrics to be able to access the classes.The first metric used was the Lack of Cohesion of Methods (LCOM), taking into consideration all the shared variables among the other methods that promote the cohesion of the class.Nevertheless, the other metric that was used is the Conceptual Cohesion of Classes (C3). This metric makes use of the Latent Semantic Indexing (LSI) to make the computation of the textual information in the classes of a program in defining the similarity index of the textual information.
Coupling
Coupling is described as the strength of the dependences, which acts between the classes within the code. However, the low coupling is necessary because it helps in the isolation of changes. To enable the coupling in the codes, we used two types of metrics to ensure that all codes are analyzed. The first metric approach we used was the Coupling between Object (CBO), which helps in counting the number of dependencies in each of the classes within the code.As per the CBO metric, the higher the coupling between object, the higher the respective class of coupling. Nevertheless, the other metric which is used under this attribute is the Response for a Class (RFC), which is calculated as the number of all constructors and other distinctive approaches that are invoked by the classes within a code (Makkar, 2012). The Response for a class will be able to act as a proxy for complexity and also to the coupling.
Code complexity
One of the major objectives of developing code is to keep the complexity of the code low. For the accomplishment, this attribute goal to use the Weighted Method per Class metric to conduct the assessment of the class complexity. The Weighted Method per Class (WMC) used to calculate the summation of McCabe’s code complexity cycle and its other approaches. Nevertheless, it is worth static that the direction the WMC metric, the higher the class complexity of the code.
Number of Children (NOC)
A number of children are defined as the number of instantaneous code classes in the program protocol. However, the NOC depicts the high level of re-use. The amount of the number of children per class determines the abstraction level when the children per class are large, the abstraction level of the parent class is always reduced. Nevertheless, when the class of children is many, therefore it demonstrates the misuse of sub-classing. If a class has too many children, it may indicate misuse of sub-classing. Through this metric, the influence of one particular class is determined by the number of children. If a class has a large number of children, it may require more testing.
Section 2
To perform a clear and precise assessment of the codes, we had to use some of the automated tools. We selected to use the code cover tool so as to conduct the code coverage analysis as a way of evaluating the effectiveness of all the tests carried out in the Java Unit platforms. We will discuss the reasons as to why we chose to use the code coverage tools as part of the assessment. The following are some of the main reasons for which we choose the tools.
Section 3
Code Cover Tool
The Code Cover tool is an extensible open-source code tool that offers the provisions of quality and increases the test quality. This tool demonstrates the quality of tests conducted, which acts as a part of help to the development of new test cases. So we get a higher quality and better test productivity. However, the code cover has some characteristics which make it’s suitable as our choice such as loop coverage, performance of the source code implementation to obtain the most accurate coverage measures, branch coverage, the correlation matrix to locate the redundant test case which will help in optimizing the tests, supports the statement coverage, the source code must be highlighted as per the measured date. The environment at which the testing is conducted is used to set the tests for all the input programs, which are the JUnit3.
Section 4:Analysis and Discussion of results
Figure 1: Box Plots of LCOM, C3, CBO, and RFC
Figure 2: Box PLot graph of WMC, B&w, and Spread
Analysis
From the data we have been able to obtain from the respective metrics was used to plot the above graphs in the form of boxplots which have displayed the distribution of metrics used from the user code commits. Taking the comparison in the distribution of the C3 ns LCOM metrics for the classes on how they created an impact on the code commits demonstrating a way of improving the class cohesion. All the files that were analyzed from the Github commits are present in the data that was considered and focused on the modified files. However, we analyzed and made an assessment of the codesthrough the different metric distributions for both activities. When considering all files impacted in the commits we use the unpaired version of the test. Instead, when focusing only on modified files, we employ the paired version to increase the statistical power.
Finally, we qualitatively analyze interesting cases of agreement and disagreement between the improvements in quality as perceived by developers and as assessed by quality metrics. To this aim, one of the authors (from now on “inspector”) manually inspected all commits, looking at the code diff and at the metrics profile of the impacted code components before/after the commit. The goal was to identify commits suitable and interesting for qualitative analysis. With “suitable,” we refer to commits for which the inspector was able to fully understand the context of the commit, meaning the impacted code components.
Results
Conclusion
From the start of this research, which was objected to assessing if the quality of the code as perceived by the software developers can be captured by the respective metrics. However, to test the aim of this study, we used over 1200 commits from Github through which the code quality could be improved through the four quality attributes such as coupling, readability, cohesion, and complexity of the code. Each of the commits of code used was determined through the quality of metrics, which was improved in the quality attribute to reflect on the improvement of metric values. We found that, more often than not, the considered quality metrics are not able to capture quality improvement as perceived by developers.
References
Khamis, N., Witte, R. and Rilling, J., 2010, June. Automatic quality assessment of source code comments: the JavadocMiner. International Conference on Application of Natural Language to Information Systems (pp. 68-79). Springer, Berlin, Heidelberg.
García-Munoz, J., García-Valls, M. and Escribano-Barreno, J., 2016.Improved metrics handling in SonarQube for software quality monitoring. In Distributed Computing and Artificial Intelligence, 13th International Conference (pp. 463-470). Springer, Cham.
Wu, C.S., Chang, W.C. and Sethi, I.K., 2009, June.A metric-based multi-agent system for software project management.In 2009 Eighth IEEE/ACIS International Conference on Computer and Information Science (pp. 3-8).IEEE.
Makkar, G., Chhabra, J.K. and Challa, R.K., 2012, March. Object-oriented inheritance metric reusability perspective.In 2012 International Conference on Computing, Electronics and Electrical Technologies (ICCEET) (pp. 852-859).IEEE.
Are you busy and do not have time to handle your assignment? Are you scared that your paper will not make the grade? Do you have responsibilities that may hinder you from turning in your assignment on time? Are you tired and can barely handle your assignment? Are your grades inconsistent?
Whichever your reason is, it is valid! You can get professional academic help from our service at affordable rates. We have a team of professional academic writers who can handle all your assignments.
Students barely have time to read. We got you! Have your literature essay or book review written without having the hassle of reading the book. You can get your literature paper custom-written for you by our literature specialists.
Do you struggle with finance? No need to torture yourself if finance is not your cup of tea. You can order your finance paper from our academic writing service and get 100% original work from competent finance experts.
Computer science is a tough subject. Fortunately, our computer science experts are up to the match. No need to stress and have sleepless nights. Our academic writers will tackle all your computer science assignments and deliver them on time. Let us handle all your python, java, ruby, JavaScript, php , C+ assignments!
While psychology may be an interesting subject, you may lack sufficient time to handle your assignments. Don’t despair; by using our academic writing service, you can be assured of perfect grades. Moreover, your grades will be consistent.
Engineering is quite a demanding subject. Students face a lot of pressure and barely have enough time to do what they love to do. Our academic writing service got you covered! Our engineering specialists follow the paper instructions and ensure timely delivery of the paper.
In the nursing course, you may have difficulties with literature reviews, annotated bibliographies, critical essays, and other assignments. Our nursing assignment writers will offer you professional nursing paper help at low prices.
Truth be told, sociology papers can be quite exhausting. Our academic writing service relieves you of fatigue, pressure, and stress. You can relax and have peace of mind as our academic writers handle your sociology assignment.
We take pride in having some of the best business writers in the industry. Our business writers have a lot of experience in the field. They are reliable, and you can be assured of a high-grade paper. They are able to handle business papers of any subject, length, deadline, and difficulty!
We boast of having some of the most experienced statistics experts in the industry. Our statistics experts have diverse skills, expertise, and knowledge to handle any kind of assignment. They have access to all kinds of software to get your assignment done.
Writing a law essay may prove to be an insurmountable obstacle, especially when you need to know the peculiarities of the legislative framework. Take advantage of our top-notch law specialists and get superb grades and 100% satisfaction.
We have highlighted some of the most popular subjects we handle above. Those are just a tip of the iceberg. We deal in all academic disciplines since our writers are as diverse. They have been drawn from across all disciplines, and orders are assigned to those writers believed to be the best in the field. In a nutshell, there is no task we cannot handle; all you need to do is place your order with us. As long as your instructions are clear, just trust we shall deliver irrespective of the discipline.
Our essay writers are graduates with bachelor's, masters, Ph.D., and doctorate degrees in various subjects. The minimum requirement to be an essay writer with our essay writing service is to have a college degree. All our academic writers have a minimum of two years of academic writing. We have a stringent recruitment process to ensure that we get only the most competent essay writers in the industry. We also ensure that the writers are handsomely compensated for their value. The majority of our writers are native English speakers. As such, the fluency of language and grammar is impeccable.
There is a very low likelihood that you won’t like the paper.
Not at all. All papers are written from scratch. There is no way your tutor or instructor will realize that you did not write the paper yourself. In fact, we recommend using our assignment help services for consistent results.
We check all papers for plagiarism before we submit them. We use powerful plagiarism checking software such as SafeAssign, LopesWrite, and Turnitin. We also upload the plagiarism report so that you can review it. We understand that plagiarism is academic suicide. We would not take the risk of submitting plagiarized work and jeopardize your academic journey. Furthermore, we do not sell or use prewritten papers, and each paper is written from scratch.
You determine when you get the paper by setting the deadline when placing the order. All papers are delivered within the deadline. We are well aware that we operate in a time-sensitive industry. As such, we have laid out strategies to ensure that the client receives the paper on time and they never miss the deadline. We understand that papers that are submitted late have some points deducted. We do not want you to miss any points due to late submission. We work on beating deadlines by huge margins in order to ensure that you have ample time to review the paper before you submit it.
We have a privacy and confidentiality policy that guides our work. We NEVER share any customer information with third parties. Noone will ever know that you used our assignment help services. It’s only between you and us. We are bound by our policies to protect the customer’s identity and information. All your information, such as your names, phone number, email, order information, and so on, are protected. We have robust security systems that ensure that your data is protected. Hacking our systems is close to impossible, and it has never happened.
You fill all the paper instructions in the order form. Make sure you include all the helpful materials so that our academic writers can deliver the perfect paper. It will also help to eliminate unnecessary revisions.
Proceed to pay for the paper so that it can be assigned to one of our expert academic writers. The paper subject is matched with the writer’s area of specialization.
You communicate with the writer and know about the progress of the paper. The client can ask the writer for drafts of the paper. The client can upload extra material and include additional instructions from the lecturer. Receive a paper.
The paper is sent to your email and uploaded to your personal account. You also get a plagiarism report attached to your paper.
PLACE THIS ORDER OR A SIMILAR ORDER WITH US TODAY!!!
We provide professional writing services to help you score straight A’s by submitting custom written assignments that mirror your guidelines.
Get result-oriented writing and never worry about grades anymore. We follow the highest quality standards to make sure that you get perfect assignments.
Our writers have experience in dealing with papers of every educational level. You can surely rely on the expertise of our qualified professionals.
Your deadline is our threshold for success and we take it very seriously. We make sure you receive your papers before your predefined time.
Someone from our customer support team is always here to respond to your questions. So, hit us up if you have got any ambiguity or concern.
Sit back and relax while we help you out with writing your papers. We have an ultimate policy for keeping your personal and order-related details a secret.
We assure you that your document will be thoroughly checked for plagiarism and grammatical errors as we use highly authentic and licit sources.
Still reluctant about placing an order? Our 100% Moneyback Guarantee backs you up on rare occasions where you aren’t satisfied with the writing.
You don’t have to wait for an update for hours; you can track the progress of your order any time you want. We share the status after each step.
Although you can leverage our expertise for any writing task, we have a knack for creating flawless papers for the following document types.
Although you can leverage our expertise for any writing task, we have a knack for creating flawless papers for the following document types.
From brainstorming your paper's outline to perfecting its grammar, we perform every step carefully to make your paper worthy of A grade.
Hire your preferred writer anytime. Simply specify if you want your preferred expert to write your paper and we’ll make that happen.
Get an elaborate and authentic grammar check report with your work to have the grammar goodness sealed in your document.
You can purchase this feature if you want our writers to sum up your paper in the form of a concise and well-articulated summary.
You don’t have to worry about plagiarism anymore. Get a plagiarism report to certify the uniqueness of your work.
Join us for the best experience while seeking writing assistance in your college life. A good grade is all you need to boost up your academic excellence and we are all about it.
We create perfect papers according to the guidelines.
We seamlessly edit out errors from your papers.
We thoroughly read your final draft to identify errors.
Work with ultimate peace of mind because we ensure that your academic work is our responsibility and your grades are a top concern for us!
Dedication. Quality. Commitment. Punctuality
Here is what we have achieved so far. These numbers are evidence that we go the extra mile to make your college journey successful.
We have the most intuitive and minimalistic process so that you can easily place an order. Just follow a few steps to unlock success.
We understand your guidelines first before delivering any writing service. You can discuss your writing needs and we will have them evaluated by our dedicated team.
We write your papers in a standardized way. We complete your work in such a way that it turns out to be a perfect description of your guidelines.
We promise you excellent grades and academic excellence that you always longed for. Our writers stay in touch with you via email.