شماره ركورد
23115
پديد آورنده
سعيد اميري
عنوان
ترميم خودكار برنامه با استفاده از الگوهاي ترميم كد
مقطع تحصيلي
كارشناسي ارشد
رشته تحصيلي
نرمافزار
سال تحصيل
1395
تاريخ دفاع
1399/3/27
استاد راهنما
دكتر سعيد پارسا
استاد مشاور
دكتر مجتبي وحيدي اصل
دانشكده
كامپيوتر
چكيده
برطرف كردن اشكالات برنامه يكي از متداولترين فعاليتها در چرخه حيات نرمافزار به شمار ميرود. با توجه به رشد پيوسته برنامههاي نرمافزاري از نظر پيچيدگي و اندازه، لازم است فعاليتهاي اشكالزدايي و نگهداري برنامه در مدت زمان كوتاهتري انجام شود. انجام اين امور هزينههاي مالي و زماني بسياري در بر دارد، بهطوريكه تقريبا نيمي از هزينههاي توسعه يك محصول را شامل ميشود. در همين راستا، طي ساليان اخير روشهاي ترميم خودكار برنامه پديد آمدند تا به صورت خودكار اصلاحات مناسبي براي برطرف كردن اشكالات برنامه ايجاد كنند. متاسفانه برطرف كردن اشكالات در روشهاي ترميم خودكار نيز ميتواند دشوار و هزينهبر باشد. بهطوريكه ممكن است اين روشها براي ترميم يك اشكال موجود در برنامه، زمان نامحدودي را براي يافتن يك وصله صرف كنند. بهعنوان نمونه وجود اشكال در يك محصول نرمافزاري تجاري ميتواند خسارت مالي سنگيني به بار آورد، لذا يافتن ترميم در كوتاهترين زمان اهميت ويژهاي پيدا ميكند. يكي از اهداف اصلي در اين پاياننامه نيز كاهش اين زمان براي يافتن يك راهحل در ترميم برنامه است. در اين پاياننامه، اصلاحات مورد نياز براي ترميم برنامه در قالب چندين الگوي ترميم دستهبندي شده است كه هر يك با توجه به ويژگيهاي موجود در برنامه، دستهاي از اشكالات را مورد هدف قرار ميدهند. اين الگوها كه اغلب بر اساس اشكالات رايج در برنامهنويسي تعريف شدهاند، با بررسي ويژگيهاي كد منبع براي برنامه وصله ايجاد ميكنند. اما متاسفانه استفاده از اين راهكار، فضاي جستجوي بزرگي از وصلههاي احتمالي را بهوجود ميآورد. براي مقابله با مشكلات اين فضاي جستجوي بزرگ، از يك مدل آموزش ديده در شبكه عصبي براي اولويتدهي به الگوهاي ترميم استفاده ميكنيم. اين اولويتبندي بر اساس تشابه كدهاي خطادار برنامه به كدهاي ترميم شده قبلي عمل ميكند. بنابراين اندازه فضاي جستجوي وصلههاي نامزد، بدون از دست رفتن قدرت روش ترميم، كاهش يافته و در نتيجه فرآيند ترميم را در زمان كمتري به سرانجام ميرسد. به اين ترتيب در روش پيشنهادي، با ارائه يك چارچوب كلي توانستيم عملگرهاي ترميم موجود در 5 روش مختلف را در يك مجموعه جمعآوري كرده و قدرت ترميم را بهبود دهيم. نتايج آزمايشات نيز نشان ميدهد كه با استفاده از يك فرآيند اولويتبندي مناسب، 84 درصد از وصلههاي قابل قبول در سه اولويت ابتدايي توليد شدند. همچنين در مورد زمان ترميم خودكار كه يكي از اهداف اصلي اين پاياننامه بود، به طور متوسط زمان ترميم در مجموعه برنامههاي بزرگ به اندازه يك چهارم كاهش يافته و براي برنامههاي كوچكتر به يك هفتم رسيد. به اين ترتيب زمان يافتن اولين ترميم نسبت به روشهاي پايه بهطور قابل توجهي كاهش پيدا كرد.
تاريخ ورود اطلاعات
1399/11/07
عنوان به انگليسي
Automatic program repair by code modification patterns
تاريخ بهره برداري
6/16/2020 12:00:00 AM
دانشجوي وارد كننده اطلاعات
سعيد اميري طايمه
چكيده به لاتين
Bug fixing is a frequent activity in the software life cycle. Due to the continuous growth of software applications in size and complexity, it's required to carry out debugging and maintenance activities in a shorter period of time. These activities involve a lot of financial and time costs, so that its accounts for about half of the total cost of developing a product. Hence, in the recent years, automatic program repair approaches have emerged to automatically generate proper fixes for program bugs. Unfortunately, fixing bug could be even hard and expensive for automatic program repair approaches. So that, to repair an existing bug in program, these techniques could spend infinite time to find a patch. For instance, a bug in a commercial software can cause severe economic damage. In this case, it is important to finding repair in the shortest time. The main goal of this thesis is to decrease the time to find a solution to fix the program. In this thesis, the modifications required to repair the program are categorized into several patterns of repair, that Each targets a batch of bugs due to the features in the program. These patterns, which are often defined based on common programming mistakes, create a number of patches to repair the program by considering the features of the source code. Unfortunately, there is still a large search space for plausible patches in using this technique. To deal with the problems of this large search space, a trained model in the neural network is used to prioritize repair patterns. This prioritization is based on the similarity of the faulty program code to the previously fixed code. In this way, it is possible to reduce the repair search space without losing repair strength. Therefore, by providing a general framework in the proposed method, we were able to combine the repair operators of 5 different methods in one set and improve the strength of repair. Experimental results show that using a proper prioritization process, 84% of plausible patches are produced in the first three priorities. In case of repair time, which was one of the main goals of this thesis, the average repair time in a large applications set is reduced by a quarter and for smaller applications it reaches one-seventh. it was reduced by on average of more than a quarter for large applications and by more than one-seventh for smaller applications, so that the time to find the first repair significantly reduced, compared to basic approach.
كليدواژه هاي فارسي
ترميم خودكار برنامه , الگوي ترميم , وصله , موارد آزمون
كليدواژه هاي لاتين
automatic program repair , modification pattern , Patch , test cases