در فرآیند ایجاد نرمافزار، استثناءها اجتنابناپذیر هستند. ولیکن، استثناءها در بسیاری از موارد توسط برنامهنویسان دیگری نیز تجربه شدهاند و به احتمال زیاد در فضای مجازی راهحل آنها موجود است. با رخ دادن یک استثناء در زمان اجرا، معمولاً یک پیغام خطا و موارد بالای پشته فراخوانی ، نمایش داده میشوند. با گسترش استفاده از سایتهای پرسش و پاسخ برنامهنویسی مانند Stack Overflow و یا سایتهای حاوی کدهای متنباز مانند Source Forge، برنامهنویسان اغلب برای پیدا کردن راهحل یک استثناء، با استفاده از مرورگر و موتورهای جستوجو به دنبال مشکلات و راهحلهای مشابه میگردند. در اینجا شکاف بین محیط ایجاد نرمافزار و مرورگر وجود دارد. همچنین جستوجوی دستی، تمام اطلاعات کد برنامهنویس را دارا نمیباشد و کاری زمانبر است. در این مقاله قصد آن داریم تا Exception Tracer را معرفی نماییم. در این روش با استفاده از پشته فراخوانی مربوط به استثناء و کد برنامهنویس ابتدا در پروژههای Source Forge فایلهای مرتبط بازیابی میشوند و در ادامه با ساخت گراف GROUM از کد برنامهنویس و فایلهای مرتبط، قطعه کدها رتبهبندی میشوند و بعد از تغییر نام متغیرهای آنها به زمینه برنامهنویس، قطعه کدهایی که میتوانند حاوی راه حل استثناء باشند، به او پیشنهاد داده میشوند. GROUM گرافی است که در آن توالی فراخوانی متدها و وابستگی دادهای بین آنها را شامل میشود و نتیجه بهتری نسبت به جستوجوی متنی و یا درخت نحو میدهد. این روش،علاوه بر قطعه کد، مباحثههای مرتبط را نیز از Stack Overflow استخراج میکند و به برنامهنویس نمایش میدهد. روش پیشنهادی این مقاله، به صورت یک افزونه Eclipse پیادهسازی شده است. دقت این روش با استفاده از تعدادی از نمونه کدهای مربوط به کتابخانههای Apache جاوا اندازهگیری شده است. در ارزیابیهای انجام شده، در 75 درصد مواقع، راهحل استثناء رخداده ، در 5 نتیجه ابتدایی وجود دارد. علاوه بر محاسبه دقت، میزان صرفهجویی زمانی نسبت به استفاده ساده از مرورگر نیز از طریق مطالعه کاربران سنجیده شده است. طبق این ارزیابی، میزان صرفهجویی زمانی، در حدود 38 درصد است.
[1] J. Cordeiro, B. Antunes, and P. Gomes, "Context-basedrecommendation to support problem solving in softwaredevelopment,"Proc. 3rd Intl Workshop on RecommendationSystems for Soft. Eng., pp. 85-89, 2012.
[2] Z. Gu, E. T. Barr, D. Schleck, and Z. Su, "Reusingdebugging knowledge via trace-based bug search,"Proc.27th IntlConf. on Object Oriented Programming, pp.927-942, 2012.
[3] B. Hartmann, D. MacDougall, J. Brandt, and S. R.Klemmer, "What would other programmers do: suggestingsolutions to error messages,"Proc. 28th Conf. on HumanFactors in Computing Systems, pp. 1019-1028, 2010.
[4] L. Ponzanelli, G. Bavota, M. Di Penta, R. Oliveto , andM. Lanza, "Mining StackOverflow to turn the IDE into aself-confident programming prompter,"Proc. 11th WorkingConf. on Mining Software Repositories, pp. 102-111, 2014.
[5] M. M. Rahman, S. Yeasmin, and C. K. Roy, "Towardsacontext-aware IDE-based meta search engine forrecommendation about programming errors and exceptions," Proc. 21th Software Evolution Week-IEEE Conf. onReengineering and Reverse Engineering, pp. 194-203, 2014.
[6] P. Vekris, R. Jhala, S. Lerner, and Y. Agarwal, "Towardsverifying android apps for the absence of no-sleep energybugs,"Proc. USENIX Conf. on Power-Aware Computing andSystems,p. 3, 2012.
[7] Al-Kofahi, and T. N. Nguyen, "Graph-based mining ofmultiple object usage patterns,"Proc. 7th joint meeting of theEuropean Soft.Eng.Conf. and the ACM SIGSOFT Symp. onthe Foundations of Soft.Eng., pp. 383-392, 2009.
[8] R. Holmes, and G. C. Murphy, "Using structuralcontextto recommend source code examples,"Proc. 27thIntlConf. on Soft. Eng., pp. 117-125, 2005.
[9] R. Holmes, R. J. Walker, and G. C. Murphy, "Strathconaexample recommendation tool,"ACM SIGSOFT Soft. Eng.Notes,vol. 30, no. 5, pp. 237-240, 2005.
[10] C. McMillan, M. Grechanik, D. Poshyvanyk, Q. Xie,and C. Fu, "Portfolio: finding relevant functions and theirusage,"Proc. 33th IntlConf. on Soft. Eng.,pp. 111-120,2011.
[11] S. Thummalapenta, and T. Xie, "SpotWeb: Detectingframework hotspots and coldspots via mining open sourcecode on the web,"Proc. 23th IntlConf. on Automated Soft.Eng., pp. 327-336, 2008.
[12] H. Cai, and R. Santelices, "Diver: precise dynamicimpact analysis using dependence-based trace pruning," Proc. 29th IntlConf. on Automated Soft. Eng.,pp. 342-348,2014.
[13] G. Bavota, S. Panichella, N. Tsantalis, M. D. Penta, R.Oliveto, and G. Canfora, "Recommending refactorings basedon team co-maintenance patterns,"Proc. 29th IntlConf. onAutomated Soft. Eng.,pp. 337-342, 2014.
[14] M. Ghafari, C. Ghezzi, A. Mocci, and G. Tamburrelli, "Mining unit tests for code recommendation,"Proc. 22thIntlConf. on Program Comprehension, pp. 142-145, 2014.
[15] L. Ponzanelli, A. Bacchelli, and M. Lanza, "Seahawk:stack overflow in the ide,"Proc. 35th IntlConf. on Soft. Eng.,pp. 1295-1298, 2013.
[16] J. Yang, D. Evans, D. Bhardwaj, T. Bhat, and M. Das, "Perracotta: mining temporal API rules from imperfecttraces,"Proc. 28th IntlConf. on Soft. Eng., pp. 282-291,2006.
[17] M. Gabel, and Z. Su, "Javert: fully automatic mining ofgeneral temporal properties from dynamic traces,"Proc. 16thIntl Symposiumon Foundations of Soft. Eng., pp. 339-349,2008.
[18] S. Sankaranarayanan, F. Ivancic, and A. Gupta, "Mininglibrary specifications using inductive logic programming," Proc. 30th IntlConf. on Soft. Eng., pp. 131-140, 2008.
[19] M. Pradel, C. Jaspan, J. Aldrich, and T. R. Gross, "Statically checking API protocol conformance with minedmulti-object specifications,"Proc. 34th IntlConf. on Soft.Eng.,pp. 925-935, 2012.
[20] D. Mandelin, L. Xu, R. Bodík, and D. Kimelman, "Jungloid mining: helping to navigate the API jungle,"ACMSIGPLAN Notices,vol. 40, no. 6, pp. 48-61, 2005.
[21] N. Sahavechaphan, and K. Claypool, "XSnippet: miningfor sample code,"ACM SIGPLAN Notices,vol. 41, no. 10,pp. 413-430, 2006.
[22] C. Lv, W. Jiang, Y. Liu, and S. Hu, "APISynth: a newgraph-based API recommender system,"Proc. 36th IntlConf.on Soft. Eng., pp. 596-597, 2014.
[23] S. Thummalapenta, and T. Xie, "Parseweb: aprogrammer assistant for reusing open source code on theweb,"Proc. 22th IntlConf. on Automated Soft. Eng.,pp.204-213, 2007.
[24] R. Dyer, H. A. Nguyen, H. Rajan, and T. N. Nguyen, "BOA: A language and infrastructure for analyzing ultra-large-scale software repositories,"Proc. 35th IntlConf. onSoft. Eng., pp. 422-431, 2013.
[25] R. Pike, S. Dorward, R. Griesemer, and S. Quinlan, "Interpreting the data: Parallel analysis with Sawzall," Scientific Programming,vol. 13, no. 4, pp. 277-298, 2005.
[26] A. T. Nguyen, H. A. Nguyen, T. T. Nguyen, and T. N.Nguyen, "GraPacc: a graph-based pattern-oriented, context-sensitive code completion tool,"Proc. 34th IntlConf. on Soft.Eng.,pp. 1407-1410, 2012.
امینتبار,وحید و حیدرنوری,عباس . (1395). توصیهگر راهحل استثنائات در محیط یکپارچه ایجاد نرمافزار. (e162294). علوم رایانش و فناوری اطلاعات, 14(1), e162294
MLA
امینتبار,وحید , و حیدرنوری,عباس . "توصیهگر راهحل استثنائات در محیط یکپارچه ایجاد نرمافزار" .e162294 , علوم رایانش و فناوری اطلاعات, 14, 1, 1395, e162294.
HARVARD
امینتبار وحید, حیدرنوری عباس. (1395). 'توصیهگر راهحل استثنائات در محیط یکپارچه ایجاد نرمافزار', علوم رایانش و فناوری اطلاعات, 14(1), e162294.
CHICAGO
وحید امینتبار و عباس حیدرنوری, "توصیهگر راهحل استثنائات در محیط یکپارچه ایجاد نرمافزار," علوم رایانش و فناوری اطلاعات, 14 1 (1395): e162294,
VANCOUVER
امینتبار وحید, حیدرنوری عباس. توصیهگر راهحل استثنائات در محیط یکپارچه ایجاد نرمافزار. علوم رایانش و فناوری اطلاعات, 1395; 14(1): e162294.