講演抄録/キーワード |
講演名 |
2015-03-09 16:35
機械学習を用いた省略識別子の復元手法 ○岡嶋秀記・水野 修(京都工繊大) SS2014-68 |
抄録 |
(和) |
ソースコードの可読性はソフトウェアを開発・保守する上で重要な要素である.
識別子はソースコードを正しく理解するための重要な情報源であるが,
コーディング時にプログラマの判断でしばしば省略される場合がある.
識別子の過度な省略は初見の読者にとって理解の妨げとなりうる.
本報告では省略された識別子の元となった識別子を推定する手法を提案する.
近年,深層学習を用いて自然言語を学習し,
単語の意味を高次元のベクトルで表せるツールword2vecが注目されている.
提案手法ではword2vecを用いてソースコードから識別子の意味を表すベクトルに変換し,
ベクトル間の距離を比較する事で元の識別子を推定する.
オープンソースプロジェクトのリポジトリを用いた事例研究の結果,
本手法で省略された識別子を完全な識別子に復元できた.
また,完全に失敗した場合でも意味の関係が深い識別子を提示できるため,
プログラミング支援のツールとして有効である. |
(英) |
The readability of source code is a crucial factor on software development and maintenance. Identifier is a essential clue to understand the content of source code, but identifiers are often abbreviated to short form by programmers. Unreason- able abbreviation causes hindrance to understanding for readers faced with unfamiliar code. This paper presents an approach for expanding identifiers using a tool “word2vec.” The word2vec is a tool to learn the vector representations of the words in documents by deep learning. In this approach, the candidates of original identifier by transforming source code to the vector representation of identifiers and comparing short identifiers vector with long one are determined. The process on code of open source software repositories is evaluated and it is indicated that the proposed approach is able to successfully expand many abbreviated identifiers compares favourably with previous works. The present approach suggests some similar meaningful identifiers, of abbreviations can’t expand correctly. Therefore it is concluded that the present approach is helpful for reading source code. |
キーワード |
(和) |
word2vec / ソフトウェアリポジトリマイニング / 機械学習 / 識別子 / 復元 / / / |
(英) |
word2vec / software repository mining / machine larning / identifiers / restoration / / / |
文献情報 |
信学技報, vol. 114, no. 510, SS2014-68, pp. 79-84, 2015年3月. |
資料番号 |
SS2014-68 |
発行日 |
2015-03-02 (SS) |
ISSN |
Print edition: ISSN 0913-5685 Online edition: ISSN 2432-6380 |
著作権に ついて |
技術研究報告に掲載された論文の著作権は電子情報通信学会に帰属します.(許諾番号:10GA0019/12GB0052/13GB0056/17GB0034/18GB0034) |
PDFダウンロード |
SS2014-68 |