Commit messages are important complementary information used in understanding code changes. To address message scarcity, some work is proposed for automatically generating commit messages. However, most of these appro...Commit messages are important complementary information used in understanding code changes. To address message scarcity, some work is proposed for automatically generating commit messages. However, most of these approaches focus on generating summary of the changed software entities at the superficial level, without considering the intent behind the code changes (e.g., the existing approaches cannot generate such message:"fixing 'null' pointer exception"). Considering developers often describe the intent behind the code change when writing the messages, we propose ChangeDoc, an approach to reuse existing messages in version control systems for automatical commit message generation. Our approach includes syntax, semantic, pre-syntax, and pre-semantic similarities. For a given commit without messages, it is able to discover its most similar past commit from a large commit repository, and recommend its message as the message of the given commit. Our repository contains half a million commits that were collected from SourceForge. We evaluate our approach on the commits from 10 projects. The results show that 21.5% of the recommended messages by ChangeDoc can be directly used without modification, and 62.8% require minor modifications. In order to evaluate the quality of the commit messages recommended by ChangeDoc, we performed two empirical studies involving a total of 40 participants (10 professional developers and 30 students). The results indicate that the recommended messages are very good approximations of the ones written by developers and often include important intent information that is not included in the messages generated by other tools.展开更多
It is difficult to keep software architecture up to date with code changes during software evolution.Inconsistency is caused by the limitations of standard development specifications and human power resources,which ma...It is difficult to keep software architecture up to date with code changes during software evolution.Inconsistency is caused by the limitations of standard development specifications and human power resources,which may impact software maintenance.To solve this problem,we propose an incremental software architecture recovery(ISAR)technique.Our technique obtains dependency information from changed code blocks and identifies different strength-level dependencies.Then,we use double classifiers to recover the architecture based on the method of mapping code-level changes to architecture-level updates.ISAR is evaluated on 10 open-source projects,and the results show that it performs more effectively and efficiently than the compared techniques.We also find that the impact of low-quality architectural documentation on effectiveness remains stable during software evolution.展开更多
When source code is over-specific to some concrete contexts, developers have to manually change the source code retrieved from the Internet. To solve this problem, we propose the context-aware change pattern(CACP). ...When source code is over-specific to some concrete contexts, developers have to manually change the source code retrieved from the Internet. To solve this problem, we propose the context-aware change pattern(CACP). For a piece of source code, we extract the changes and changes-relevant context from the past code changes, identifying CACP that is the abstract common part of the changes and context. By using CACP, the retrieved source code could be transformed into the suitable one according to different user needs. From the Github we extracted 7 topics, collected 5-6 code snippets per topic and performed 5 different experiments which illustrated that CACP improves code transformation accuracy by 73.84%.展开更多
基金This work was(partially)supported by the Key-Area Research and Development Program of Guangdong Province of China under Grant No.2020B010164002the National Natural Science Foundation of China under Grant Nos.61902441,61722214 and 61976061+2 种基金the China Postdoctoral Science Foundation under Grant No.2018M640855the Fundamental Research Funds for the Central Universities of China under Grant Nos.20wkpy06 and 20lgpy129the Opening Project of Guangdong Key Laboratory of Big Data Analysis and Processing under Grant No.202003.
文摘Commit messages are important complementary information used in understanding code changes. To address message scarcity, some work is proposed for automatically generating commit messages. However, most of these approaches focus on generating summary of the changed software entities at the superficial level, without considering the intent behind the code changes (e.g., the existing approaches cannot generate such message:"fixing 'null' pointer exception"). Considering developers often describe the intent behind the code change when writing the messages, we propose ChangeDoc, an approach to reuse existing messages in version control systems for automatical commit message generation. Our approach includes syntax, semantic, pre-syntax, and pre-semantic similarities. For a given commit without messages, it is able to discover its most similar past commit from a large commit repository, and recommend its message as the message of the given commit. Our repository contains half a million commits that were collected from SourceForge. We evaluate our approach on the commits from 10 projects. The results show that 21.5% of the recommended messages by ChangeDoc can be directly used without modification, and 62.8% require minor modifications. In order to evaluate the quality of the commit messages recommended by ChangeDoc, we performed two empirical studies involving a total of 40 participants (10 professional developers and 30 students). The results indicate that the recommended messages are very good approximations of the ones written by developers and often include important intent information that is not included in the messages generated by other tools.
基金Project supported by the National Natural Science Foundation of China(No.61872078)。
文摘It is difficult to keep software architecture up to date with code changes during software evolution.Inconsistency is caused by the limitations of standard development specifications and human power resources,which may impact software maintenance.To solve this problem,we propose an incremental software architecture recovery(ISAR)technique.Our technique obtains dependency information from changed code blocks and identifies different strength-level dependencies.Then,we use double classifiers to recover the architecture based on the method of mapping code-level changes to architecture-level updates.ISAR is evaluated on 10 open-source projects,and the results show that it performs more effectively and efficiently than the compared techniques.We also find that the impact of low-quality architectural documentation on effectiveness remains stable during software evolution.
基金Supported by the National Natural Science Foundation of China(60373075,61640221,61562026,61672470)
文摘When source code is over-specific to some concrete contexts, developers have to manually change the source code retrieved from the Internet. To solve this problem, we propose the context-aware change pattern(CACP). For a piece of source code, we extract the changes and changes-relevant context from the past code changes, identifying CACP that is the abstract common part of the changes and context. By using CACP, the retrieved source code could be transformed into the suitable one according to different user needs. From the Github we extracted 7 topics, collected 5-6 code snippets per topic and performed 5 different experiments which illustrated that CACP improves code transformation accuracy by 73.84%.