C++ BUG CUB: Logical Bug Detection for C++ Code

A. Raana, M. A. Azam, M. A. Ghazanfar, A. Javed, Y. Amin, U. Naeem


Quality is seen as one of the key aspects for efficient and robust Software development. One of the ways to ensure quality is to ensure that developed software systems’ code istotally free of syntax, real time and logical bugs. Despite careful development process, there is always room for these bugs to stay in developed system. Many of the syntax and logical bugs escape from detection in testing phase, which has great impact on the quality and reliability of system and business value as well. These are usually Logical Bugs, which can be difficult to find and which can lead to frustration for the development team. To alleviate the overhead of static analysis of code performed by the developer to detect logical bugs, a system is proposed to detect these bugs in C++ code. The system has been engineered using tokenization concept -prerequisite for bug detection- followed by rule-based algorithm that is designed for logical bugs’ detection. A decision tree based approach has also been applied in order to classify the detected bugs. The system is also able to extract dependency among all the methods/functions written in the input code. Both tasks; bug(s) detection and function dependency are performed in one pass which makes the system efficient.

Full Text:



Z. Li, “Using data mining techniques to improve software

reliability”, Avaialble:https://www.ideals.illinois.edu/ handle/

/11273, 2006.

Y. Zhang, Y. Liu, L. Zhang and Y. Shi, “A data mining based

method: detecting software defects in source code”, 2nd Int. Conf.

on Software Engg. and Data Mining (SEDM), Chengdu, China, pp.

-612, 2010.

H. Uwano, M. Nakamura, A. Monden and K. Matsumoto,

“Analyzing individual performance of source code review using

reviewers‟ eye movement”, Proc. of Symposium on Eye Tracking

Research & Applications ACM Digital Library,

pp. 133-140, Mar 27, 2006, ACM.

“Common beginner C++ programming mistakes”, Available:http:


.pdf. [Accessed: 1-08, 2015].

“Eight C++ programming mistakes the compiler won‟t catch”,

Available: http://www.learncpp.com/cpp-programming/eight-cprogramming-mistakes-the-compiler-wont-catch/. [Accessed: July 2nd 2007]

“10 Common programming mistakes in C++”, Available:http://


R. Kartha and V. Nair, “Data mining for causal analysis of

software defects”, Master of Science Thesis, Technische

University Eindhoven, Int. J. Comp. Sci. Mobile Comput.

(ICMIC), pp. 1-7, December, 2013.

P. J. Kaur and Pallavi, “Data mining techniques for software defect

prediction”, International Journal of Software and Web Sciences

(IJSWS 12-347), vol. 3, no. 1, Feb 2013, pp. 54-57.

K. Shvachko, H. Kuang and S.Radia, “The hadoop Distributed file

system” Mass Storage Systems and Technologies (MSST), IEEE

th Symposium on, 3-7 May 2010, pp. 1-10, Incline Village, NV.

Available:IEEE Xplore, http://www.ieee.org.

J. Dean and S.Ghemawat, “MapReduce: simplified data processing

on large clusters”, Communications of the ACM, vol. 51, no. 1,

pp. 107-113, January 2008.

W. Peng, J. Chen and H. Zhou, “An Implementation of ID3—

Decision Tree Learning Algorithm”, Available:

http://cis.k.hosei.ac.jp/~ rhuang/Miccl/AI-2/L10 src/Decision

Tree2. pdf 2009.

H. D. Owens, B. E. Womack and M. J. Gonzalez, “software error

classification using purify”, International Conference on Software

Maintenance, CA, USA , Nov. 4-8 1996, pp. 104-113.

S. J. Dommati, R. Agrawal, G.R.M. Reddy and S. Kamath, “Bug

classification: feature extraction and comparison of event model

using naïve bayes approach”, Int. Conf. on Recent Trends in

Comp. Inform. Engg (ICRTCIE), Pattaya, April 13-15, 2012.

A. McCallum and K. Nigam. “A comparison of event models for

naive bayes text classication”, Available:http://citeseerx.ist.


pdf 1998.

M. S. Naidu and N. Geethanjali, “Classification of defects in

software using decision tree algorithm”, Int. J. Engg. Sci. Tech.

(IJEST), vol. 5, no. 6, pp. 1332-1340, June 2013.

B. Liu, Y. Ma and C.K. Wong, “Improving an association rule

based classifier”, Proc. of the Fourth European Conference on

Principles and Practice of Knowledge Discovery in Databases,

pp. 504-509, 2000.

P. Wang, J. Yang, L. Tan, R. Kroeger and J. D. Morgenthaler,

“Generating precise dependencies for large software”, Managing

Technical Debt (MTD), 2013 4th International Workshop on,

IEEE, 20-20 May, pp. 47-50, 2013, San Francisco, CA. Available:

IEEE Xplore, http://www.ieee.org.

C.A. Lattner, “LLVM: An infrastructure for multi-stage

optimization”, Graduate College of the University of Illinois at

Urbana-Champaign, 2002, pp.1-56.Avaialable: http://www.llvm.


M. Johnson and J. Zelenski, “Lexical Analysis”, http://dragonbook.


pdf, June 25, 2008.

MA Hearst, “Text data mining: Issues, techniques, and the

relationship to information access”, in journal Presentation notes

for UW/MS workshop on data mining, pp. 112-117, July 1997.

V. Neelima, Annapurna. N, V. Alekhya and B. M. Vidyavathi,

“Bug detection through text data mining”, Int. J. Adv. Res.

Comput. Sci. Softw. Engg., vol. 3, no. 5, pp. 564-569, May 2013.

KB Kumar, J. Gyani and G. Narsimha, “Sequential cyclomatic

complexity over a chain of function calls”, Int. Conf. on Networks

and Information, PCSIT, vol. 57, 2012, IACSIT Press, Singapore.

P. Devi and R. Ranjan, “enhanced bug detection by data mining

techniques”, Int. J. Comput. Engg Res. (IJCER), vol. 4, no. 7, pp.

-27, July 2014.

D. Radosevic and T. Orehovacki, “An analysis of novice

compilation behavior using Verificator”, Proceedings of the ITI


, Int. Conf. on Information Technology Interfaces, June

-30, 2011, Cavtat, Croatia. Available: IEEE Xplore,


S.H Abid, S. Zehra and H. Iftikhar, “using computer aided

software for teaching and self learning”, Proceedings of the ICL

14th Int. Conf. on Interactive Collaborative Learning, 21-23

Sept. 2011, Piestany. Available: IEEE Xplore, http://


D. Lanvanya and K. U. Rani, “performance evaluation of decision

tree classifiers on medical datasets”, Int. J. Comp. Appl., vol. 26,

no. 4, July 2011.


  • There are currently no refbacks.