International Journal of Engineering Trends and Technology (IJETT) – Volume 22 Number 1- April 2015 Mining Specifications for Error Detection to Improve Code Quality Boddepalli VysaGeetha1, T.Ravi Kumar2 1 1,2 Final M.Tech Student,2 Sr.Assistant Professor Dept of Computer Science and Engineering, Aditya Institute of Technology And Management,Tekkali, Srikakulam. Abstract: Automatic specifications from the code blocks is always an interesting research issue in the field of software engineering and data mining, specifications should be accurate and reliable, but in this specification mining, most of the research works are false positives.In this paper we are proposing an efficient automatic specification mining,our first experiment provides empirical evidence that our quality metrics are distinct. Our second experiment presents empirical evidence that our quality metrics improve an existing technique for automatic specification mining. I. INTRODUCTION Traditional testing process is time consuming and expensive while handling of large projects. The traditional approaches are fault prediction works with the basic metrics like Lines of code(LOC),Number of errors found, Number of errors found respect to the module, These parameters are not sufficient to measure the fault prediction and cost effectiveness. software faults may be design faults which are deterministic in nature and are identified easily and other type of software faults is classified as being temporary internal faults that are transient and are difficult to be detected through testing, It is difficult to analyze the fault prediction by simply measuring the software metrics of the project, we require a classification tool for the analysis of the predicted results. We can improve our traditional work by enhancing the classification approach, In classification based approach, analysis fails when testing sample of data not available in training dataset or new data sample and classification fails when data is inconsistent or not available for specific attributes or metrics . By improving these two features we can enhance the performance of the current proposed system. The chances of occurrence of error is more in frequently or recently modified source code is shown by the authors[4][5],it is may be due to inter connection of code block, fixing of one block may disturbs another block in the source code. So we need ISSN: 2231-5381 maintain log report which stores number of versions, modifications or rectifications taken place and that differentiate the older version and later versions for each line of code, such metrics can improves chances of correctness. Author Rank: We hypothesize that the author of a piece of code influences its quality. A senior developer who is very familiar with the project and has performed many edits may be more familiar with the project’s invariants than a less experienced developer. Source control histories track the author of each change. The rankof an author is defined as the percentage of all changes to the repository ever committed by that author. We record the rank of the last author to touch each line of code. While author rank may be led astray by certain methodologies (e.g., some projects may have a small set of committers that commit on behalf of more than one author [18]; others may assign more difficult and thus error-prone tasks to more senior developers), we note that it may be automatically collected from version control histories and is a proxy for expertise, which is otherwise challenging to approximate automatically. II. RELATED WORK Number of traditional programming languages is not formally determined. Formal specifications are problematic for the people who work on it, to investigate and alter the specification and In like manner analysts have created methods to consequently induce particulars from system source code or execution as follows. These techniques transfers’ solutions as limited state machines that shows other system practices Techniques like sql injections are error prone for the software because it is vulnerable while appending the strings or it can be followed by the other queries. To resolve the issue like these we use parameter approach for secure parameter passing between the functional calls and we allude to such properties as determinations for the rest of this article. Such determinations can be spoken to as a limited http://www.ijettjournal.org Page 10 International Journal of Engineering Trends and Technology (IJETT) – Volume 22 Number 1- April 2015 state machine that encodes legitimate successions of occasions. Data base cannot check the originality of the query, because it checks whether it is a string or not, nothing more information over it A project execution holds fast to a given particular if furthermore, just on the off chance that it ends with the comparing state machine in a tolerant state (where the machine begins in its begin state at project instatement). Something else, the project damages the particular and contains a mistake. This kind of incomplete rightness detail is particular from, and reciprocal to, full formal conduct determinations. They can be utilized to depict numerous vital accuracy properties, including asset administration, locking, security, abnormal state invariants, memory security, and then some specific properties for example the right treatment of set uid or nonconcurrent I/O demand parcels. Such particulars are utilized by all current deformity finding apparatuses. Moreover, formal particulars are instrumental in project advancement,testing,refactoring, documentation, also, repair. III. PROPOSED WORK We are proposing an empirical model for measuring the code quality, by extracting the information from the code through engineering process. Our technique identifies which input is most indicative of correct program behavior, which allows off-the-shelf techniques to learnthe same number of specifications using only 45% of their original input.Th main advantage of the proposed system isSpecification Mining, Code Readability, Path Density and QualityBased Specification Mining. Path Density We can define path density by computing the number of nodes and a number of edges between the connected paths and cyclomatic complexity can be computed with volume and density and define the path density as metric and number of traces to enumerate and it can be computed along with all object oriented metrics. Quality-Based Specification Mining Our main experiment measures the efficiency of ournew specification miner.A leave-one-out analysis showsthe including the CK metrics in the model raises boththe true and false positive rate. As our goal is usefulspecifications with few false positives, we omit features,even those that are predictive for true positives thatincrease the false positive rate substantially. Our miner takes as input: 1) The program source code P. The variable _ ranges over source code locations. The variable l represents a set of locations. 2) A set of quality metrics M1 . . . Mq. Quality metrics may map either individual locations _ to measurements, with Mi ∈ R (e.g., code churn) or entire traces to measurements, where Mi(l) ∈ R (e.g., path feasibility). 3) A set of important events Σ, generally taken to be all of the function calls in P. We use the variables a, b, etc., to range over Σ. Our miner produces as output a set of candidate Specifications C = { a,b | a should be followed by b}. We manually evaluate candidate specification validity IV. CONCLUSION Specification Mining In Specification mining, specifications can be constructed doe the actual program or source code based on the existing sourcecodes, it can be in terms of function calls and other software metricsor any other events. It can be static or dynamic approach of gathering the software metrics from the available or existing source code blocks. We are concluding our current research with specifications of the system, earlier manual system is difficult to identify the section automatically by mining it and gives more false positive chances. Our mechanism computes cyclomatic complexity metrics, lines of code and object oriented metrics for metrics calculation required for automatic specifications of mining and gives efficient and reliable results. Code Readability REFERENCES Reliability is the important factor rate of success or failure based on the metrics used to measure the software code quality, these metrics may differ from the quality metric approach, operators, operands, comments, number of classes, inherited class, reference objects and many other metrics. Reliability factor of probability lies between 0 to 1. [1] Assessing the Cost Effectiveness of Fault Prediction in Acceptance Testing AkitoMonden, akuma Hayashi, Shoji Shinoda, KumikoShirai, Junichi Yoshida, Mike Barker [2] Predicting Defect Densities in Source Code Files with Decision Tree Learners Patrick Knab, Martin Pinzger, Abraham Bernstein ISSN: 2231-5381 http://www.ijettjournal.org Page 11 International Journal of Engineering Trends and Technology (IJETT) – Volume 22 Number 1- April 2015 [3] Comparative Assessment of Software Quality Classification Techniques: An Empirical Case Study TAGHI M. KHOSHGOFTAAR, NAEEM SELIYA [4] A.S. Foulkes, Applied Statistical Genetics with R. Springer, 2009. [5] A.L. Goel and K. Okumoto, “Time-Dependent Error-Detection Rate Model for Software Reliability and Other Performance Measures,” IEEE Trans. Reliability, vol. 28, no. 3, pp. 206-211,Aug. 1979 [6] T. Ball, “A theory of predicate-complete test coverage and generation,” inFMCO, 2004, pp. 1–22. [7] V. R. Basili, L. C. Briand, and W. L. Melo, “A validation of object oriented design metrics as quality indicators,”IEEE Trans. Softw. Eng., vol. 22, no. 10, pp. 751–761, 1996. [8] R. P. L. BuseandW.Weimer, “Automatic documentation inference for exceptions,” in ISSTA, 2008, pp. 273–282. [9] ——, “A metric for software readability,” in International Symposium on Software Testing and Analysis, 2008, pp. 121–130. [10] ——, “The road not taken: Estimating path execution frequency statically,” in ICSE, 2009, pp. 144–154. [11] H. Chen, D. Wagner, and D. Dean, “Setuid demystified,” in USENIX Security Symposium, 2002, pp. 171–190. [12] S. R. Chidamber and C. F. Kemerer, “A metrics suite for object oriented design,”IEEE Trans. Softw. Eng., vol. 20, no. 6, pp. 476– 493, 1994. ISSN: 2231-5381 http://www.ijettjournal.org Page 12