Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| mdd:defect_prediction [2017/12/27 12:57] – rtriangle | mdd:defect_prediction [2026/08/29 07:59] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== Автоматическое извлечение семантических признаков для предсказания дефектов ====== | ||
| + | Оригинал: | ||
| + | |||
| + | ==== Введение ==== | ||
| + | |||
| + | Предсказание дефектных блоков кода в программном обеспечении помогает разработчикам находить баги и приоритизировать тестировщикам свои усилия. Предсказания с помощью использования стандартных фичей для таких предсказаний часто работает неправильно в случае семантических различий в программах, | ||
| + | [[mdd: | ||
| + | |||
| + | ==== Основная часть ==== | ||
| + | |||
| + | Deep Belief Network - генеративная графическая модель, | ||
| + | [[mdd: | ||
| + | Подход состоит из 4 этапов: | ||
| + | |||
| + | - Парсинг исходного кода в вектор токенов | ||
| + | - Перевод токенов в числовые представления, | ||
| + | - Использование DBN для автоматической генерации семантических признаков | ||
| + | - Построение предсказательных моделей дефектов и предсказание дефектов с использованием выученных семантических признаков из train и test данных. | ||
| + | |||
| + | Синтаксическая информация из кода извлекается с помощью AST (Abstract Syntax Tree). Так как в каждой программе имена сильно привязаны к задаче, | ||
| + | |||
| + | Важный момент для обучения: | ||
| + | |||
| + | Во время обучения DBN необходимо подтьюнить 3 параметра: | ||
| + | |||
| + | - количество скрытых слоёв | ||
| + | - количество узлов в каждом слое | ||
| + | - количество итераций обучения | ||
| + | |||
| + | Для упрощения модели полагается количество узлов одинаковым в каждом слое. | ||
| + | |||
| + | Общая структура системы по обнаружению дефектов выглядит так: | ||
| + | [[mdd: | ||
| + | |||
| + | Для оценки качества предсказания используются 3 стандартные метрики задач классификации: | ||
| + | |||
| + | ==== Заключение ==== | ||
| + | |||
| + | В качестве бейзлайнов использовалось 2 алгоритма: | ||
| + | |||
| + | - Алгоритм, | ||
| + | - Алгоритм, | ||
| + | |||
| + | Ниже представлены датасеты, | ||
| + | |||
| + | [[mdd: | ||
| + | |||
| + | В статье приводится большое число различных вариантов тестирования качества: | ||
| + | |||
| + | * при фиксированном проекте (within-project): | ||
| + | * обучение на файлах одного проекта, | ||
| + | * использование различных алгоритмов для принятия решений на семантических признаках от DBN(ADTree, Naive Bayes, Logistic Regression) | ||
| + | |||
| + | В общем и целом, подход с DBN показывает более высокое качество более, чем на 90% проектах во всех способах, | ||
| + | |||
| + | [[mdd: | ||
| + | |||
| + | ==== Ссылки ==== | ||
| + | |||
| + | - S. Amasaki, Y. Takagi, O. Mizuno, and T. Kikuno. A Bayesian Belief Network for Assessing the Likelihood of Fault Content. In ISSRE’03, pages 215–226. | ||
| + | - Y. Bengio. Learning Deep Architectures for AI. Foundations and Trends in Machine Learning, 2(1): | ||
| + | - D. M. Blei, A. Y. Ng, and M. I. Jordan. Latent dirichlet allocation. the Journal of machine Learning research, 3: | ||
| + | - T.-H. Chen, S. W. Thomas, M. Nagappan, and A. E. Hassan. Explaining software defects using topic models. In MSR’12, pages 189–198. | ||
| + | - S. R. Chidamber and C. F. Kemerer. A Metrics Suite for Object Oriented Design. TSE’94, 20(6): | ||
| + | - D. Ciresan, U. Meier, and J. Schmidhuber. Multi-column deep neural networks for image classification. In CVPR’12, pages 3642–3649. | ||
| + | - F. B. e Abreu and R. Carapuça. Candidate metrics for object-oriented software within a taxonomy framework. JSS’94, 26(1): | ||
| + | - K. O. Elish and M. O. Elish. Predicting defect-prone software modules using support vector machines. JSS’08, 81(5): | ||
| + | - N. Gayatri, S. Nickolas, A. Reddy, S. Reddy, and A. Nickolas. Feature selection using decision tree induction in class level metrics dataset for software defect predictions. In WCECS’10, pages 124–129. | ||
| + | - M. H. Halstead. Elements of Software Science (Operating and programming systems series). Elsevier Science Inc., 1977. | ||
| + | - R. Harrison, S. J. Counsell, and R. V. Nithi. An evaluation of the mood set of object-oriented software metrics. TSE’98, 24(6): | ||
| + | - A. E. Hassan. Predicting faults using the complexity of code changes. In ICSE’09, pages 78–88. | ||
| + | - Z. He, F. Peters, T. Menzies, and Y. Yang. Learning from open-source projects: An empirical study on defect prediction. In ESEM’13, pages 45–54. | ||
| + | - K. Herzig, S. Just, and A. Zeller. It’s not a bug, it’s a feature: how misclassification impacts bug prediction. In ICSE’13, pages 392–401. | ||
| + | - A. Hindle, E. T. Barr, Z. Su, M. Gabel, and P. Devanbu. On the naturalness of software. In ICSE’12, pages 837–847. | ||
| + | - G. E. Hinton, S. Osindero, and Y.-W. Teh. A fast learning algorithm for deep belief nets. Neural computation’06, | ||
| + | - G. E. Hinton and R. R. Salakhutdinov. Reducing the dimensionality of data with neural networks. Science’06, | ||
| + | - T. Jiang, L. Tan, and S. Kim. Personalized defect prediction. In ASE’13, pages 279–289. | ||
| + | - X. Jing, F. Wu, X. Dong, F. Qi, and B. Xu. Heterogeneous cross-company defect prediction by unified metric representation and cca-based transfer learning. In FSE’15, pages 496–507. | ||
| + | - X.-Y. Jing, S. Ying, Z.-W. Zhang, S.-S. Wu, and J. Liu. Dictionary learning based software defect prediction. In ICSE’14, pages 414–423. | ||
| + | - T. Khoshgoftaar and N. Seliya. Tree-based software quality estimation models for fault prediction. In Software Metrics’02, | ||
| + | - S. Kim, H. Zhang, R. Wu, and L. Gong. Dealing with noise in defect prediction. In ICSE’11, pages 481–490. | ||
| + | - S. Kim, T. Zimmermann, E. J. Whitehead Jr, and A. Zeller. Predicting faults from cached history. In ICSE’07, pages 489–498. | ||
| + | - S. Kombrink, T. Mikolov, M. Karafiát, and L. Burget. Recurrent neural network based language modeling in meeting recognition. In INTERSPEECH’11, | ||
| + | - A. Krizhevsky, I. Sutskever, and G. E. Hinton. Imagenet classification with deep convolutional neural networks. In Advances in neural information processing systems’12, | ||
| + | - A. Lam, A. Nguyen, H. Nguyen, and T. Nguyen. Combining deep learning with information retrieval to localize buggy files for bug reports. In ASE’15, pages 476–481. | ||
| + | - T. Lee, J. Nam, D. Han, S. Kim, and H. P. In. Micro interaction metrics for defect prediction. In FSE’11, | ||
| + | - Z. Li and Y. Zhou. Pr-miner: automatically extracting implicit programming rules and detecting violations in large software code. In FSE’05, pages 306–315. | ||
| + | - Y. Liu, D. Poshyvanyk, R. Ferenc, T. Gyimóthy, and N. Chrisochoides. Modeling class cohesion as mixtures of latent topics. In ICSM’09, pages 233–242. | ||
| + | - C. D. Manning and H. Schütze. Foundations of statistical natural language processing. MIT press, 1999. | ||
| + | - T. J. McCabe. A complexity measure. TSE’76, (4): | ||
| + | - A. Meneely, L. Williams, W. Snipes, and J. Osborne. Predicting failures with developer networks and social network analysis. In FSE’08, pages 13–23. | ||
| + | - T. Menzies, J. Greenwald, and A. Frank. Data mining static code attributes to learn defect predictors. TSE’07, 33(1): | ||
| + | - T. Menzies, Z. Milton, B. Turhan, B. Cukic, Y. Jiang, and A. Bener. Defect prediction from static code features: current results, limitations, | ||
| + | - A. Mnih and G. E. Hinton. A scalable hierarchical distributed language model. In Advances in neural information processing systems’09, | ||
| + | - A. Mohamed, D. Yu, and L. Deng. Investigation of full-sequence training of deep belief networks for speech recognition. In INTERSPEECH’10, | ||
| + | - A.-r. Mohamed, G. E. Dahl, and G. Hinton. Acoustic modeling using deep belief networks. Audio, Speech, and Language Processing, IEEE Transactions on, 20(1): | ||
| + | - R. Moser, W. Pedrycz, and G. Succi. A comparative analysis of the efficiency of change metrics and static code attributes for defect prediction. In ICSE’08, pages 181–190. | ||
| + | - L. Mou, G. Li, Z. Jin, L. Zhang, and T. Wang. TBCNN: A tree-based convolutional neural network for programming language processing. arXiv preprint arXiv: | ||
| + | - N. Nagappan and T. Ball. Using software dependencies and churn metrics to predict field failures: An empirical case study. In ESEM’07, pages 364–373. | ||
| + | - J. Nam and S. Kim. Heterogeneous defect prediction. In FSE’15, pages 508–519. | ||
| + | - J. Nam, S. J. Pan, and S. Kim. Transfer defect learning. In ICSE’13, pages 382–391. | ||
| + | - G. Navarro. A guided tour to approximate string matching. ACM Comput. Surv., 33(1), 2001. | ||
| + | - A. T. Nguyen and T. N. Nguyen. Graph-based statistical language model for code. In ICSE’15, pages 858–868. | ||
| + | - A. T. Nguyen, T. T. Nguyen, T. N. Nguyen, D. Lo, and C. Sun. Duplicate bug report detection with a combination of information retrieval and topic modeling. In ASE’12, pages 70–79. | ||
| + | - T. T. Nguyen, H. A. Nguyen, N. H. Pham, J. M. Al-Kofahi, and T. N. Nguyen. Graph-based mining of multiple object usage patterns. In FSE’09, pages 383–392. | ||
| + | - T. T. Nguyen, T. N. Nguyen, and T. M. Phuong. Topic-based defect prediction. In ICSE’11, pages 932–935. | ||
| + | - T. J. Ostrand, E. J. Weyuker, and R. M. Bell. Programmer-based fault prediction. In PROMISE’10, | ||
| + | - S. J. Pan, I. Tsang, J. Kwok, and Q. Yang. Domain adaptation via transfer component analysis. Neural Networks, IEEE Transactions on, pages 199–210, 2011. | ||
| + | - R. Pascanu, J. W. Stokes, H. Sanossian, M. Marinescu, and A. Thomas. Malware classification with recurrent networks. In ICASSP’15, | ||
| + | - M. Pinzger, N. Nagappan, and B. Murphy. Can developer-module networks predict failures? In FSE’08, pages 2–12. | ||
| + | - F. Rahman and P. Devanbu. How, and why, process metrics are better. In ICSE’13, pages 432–441. | ||
| + | - V. Raychev, M. Vechev, and E. Yahav. Code completion with statistical language models. In PLDI’14, pages 419–428. | ||
| + | - R. Salakhutdinov and G. Hinton. Semantic hashing. RBM’07, 500(3):500. | ||
| + | - R. Sarikaya, G. E. Hinton, and A. Deoras. Application of deep belief networks for natural language understanding. Audio, Speech, and Language Processing, IEEE/ACM Transactions on, 22(4): | ||
| + | - A. Tamrawi, T. T. Nguyen, J. M. Al-Kofahi, and T. N. Nguyen. Fuzzy set and cache-based approach for bug triaging. In FSE’11, pages 365–375. | ||
| + | - M. Tan, L. Tan, S. Dara, and C. Mayeux. Online defect prediction for imbalanced data. In ICSE’15, pages 99–108. | ||
| + | - C. Tantithamthavorn, | ||
| + | - W. Tao and L. Wei-hua. Naive bayes software defect prediction model. In CiSE’10, pages 1–4. | ||
| + | - Z. Tu, Z. Su, and P. Devanbu. On the localness of software. In FSE’14, pages 269–280. | ||
| + | - B. Turhan, T. Menzies, A. B. Bener, and J. Di Stefano. On the relative value of cross-company and within-company data for defect prediction. Empirical Softw. Engg., 14(5): | ||
| + | - J. Wang, B. Shen, and Y. Chen. Compressed c4. 5 models for software defect prediction. In QSIC’12, pages 13–16. | ||
| + | - S. Watanabe, H. Kaiya, and K. Kaijiri. Adapting a fault prediction model to allow inter languagereuse. In Proceedings of the 4th International Workshop on Predictor Models in Software Engineering, | ||
| + | - E. J. Weyuker, T. J. Ostrand, and R. M. Bell. Using developer information as a factor for fault prediction. In PROMISE’07, | ||
| + | - M. White, C. Vendome, M. Linares-Vásquez, | ||
| + | - I. H. Witten and E. Frank. Data Mining: Practical machine learning tools and techniques. Morgan Kaufmann, 2005. | ||
| + | - X. Xie, W. Zhang, Y. Yang, and Q. Wang. Dretom: Developer recommendation based on topic models for bug resolution. In PROMISE’12, | ||
| + | - X. Yang, D. Lo, X. xia, Y. Zhang, and J. Sun. Deep learning for just-in-time defect prediction. In QRS’15, pages 17–26. | ||
| + | - Z. Yuan, Y. Lu, Z. Wang, and Y. Xue. Droid-sec: Deep learning in android malware detection. In SIGCOMM’14, | ||
| + | - T. Zimmermann, R. Premraj, and A. Zeller. Predicting defects for eclipse. In PROMISE’07, | ||