As code search is a frequent developer activity in software development
practices, improving the performance of code search is a critical task. In the
text retrieval based search techniques employed in the code search, the term
mismatch problem is a critical language issue for retrieval effectiveness. By
reformulating the queries, query expansion provides effective ways to solve the
term mismatch problem. In this paper, we propose Query Expansion based on Crowd
Knowledge (QECK), a novel technique to improve the performance of code search
algorithms. QECK identifies software-specific expansion words from the high
quality pseudo relevance feedback question and answer pairs on Stack Overflow
to automatically generate the expansion queries. Furthermore, we incorporate
QECK in the classic Rocchio's model, and propose QECK based code search method
QECKRocchio. We conduct three experiments to evaluate our QECK technique and
investigate QECKRocchio in a large-scale corpus containing real-world code
snippets and a question and answer pair collection. The results show that QECK
improves the performance of three code search algorithms by up to 64 percent in
Precision, and 35 percent in NDCG. Meanwhile, compared with the
state-of-the-art query expansion method, the improvement of QECK Rocchio is 22
percent in Precision, and 16 percent in NDCG.Comment: 14 pages, 5 figures, IEEE Transactions on Services Computing, 201
SummaryAdditive manufacturing (AM), also referred as three-dimensional printing or rapid prototyping, has been implemented in various areas as one of the most promising new manufacturing technologies in the past three decades. In addition to the growing public interest in developing AM into a potential mainstream manufacturing approach, increasing concerns on environmental sustainability, especially on energy consumption, have been presented. To date, research efforts have been dedicated to quantitatively measuring and analyzing the energy consumption of AM processes. Such efforts only covered partial types of AM processes and explored inadequate factors that might influence the energy consumption. In addition, energy consumption modeling for AM processes has not been comprehensively studied. To fill the research gap, this article presents a mathematical model for the energy consumption of stereolithography (SLA)-based processes. To validate the mathematical model, experiments are conducted to measure the real energy consumption from an SLAbased AM machine. The design of experiments method is adopted to examine the impacts of different parameters and their potential interactions on the overall energy consumption. For the purpose of minimization of the total energy consumption, a response optimization method is used to identify the optimal combination of parameters. The surface quality of the product built using a set of optimal parameters is obtained and compared with parts built with different parameter combinations. The comparison results show that the overall energy consumption from SLA-based AM processes can be significantly reduced through optimal parameter setting, without observable product quality decay.
when implementing unfamiliar programming tasks, developers commonly search code examples and learn usage patterns of APIs from the code examples or reuse them by copy-pasting and modifying. For providing high-quality code examples, previous studies present several methods to recommend code snippets mainly based on information retrieval. In this paper, to provide better recommendation results, we propose ROSF, Recommending cOde Snippets with multi-aspect Features, a novel method combining both information retrieval and supervised learning. In our method, we recommend Top-K code snippets for a given free-form query based on two stages, i.e., coarse-grained searching and fine-grained re-ranking. First, we generate a code snippet candidate set by searching a code snippet corpus using an information retrieval method. Second, we predict probability values of the code snippets for different relevance scores in the candidate set by the learned prediction model from a training set, re-rank these candidate code snippets according to the probability values, and recommend the final results to developers. We conduct several experiments to evaluate our method in a large-scale corpus containing 921,713 real-world code snippets. The results show that ROSF is an effective method for code snippets recommendation and outperforms thestate-of-the-art methods by 20% -41% in Precision and 13% -33% in NDCG.
scite is a Brooklyn-based organization that helps researchers better discover and understand research articles through Smart Citations–citations that display the context of the citation and describe whether the article provides supporting or contrasting evidence. scite is used by students and researchers from around the world and is funded in part by the National Science Foundation and the National Institute on Drug Abuse of the National Institutes of Health.