Source code summarization focuses on generating qualified natural language descriptions of a code snippet (e.g., functionality, usage and version). In an actual development environment, descriptions of the code are missing or not consistent with the code due to human factors, which makes it difficult for developers to comprehend and conduct subsequent maintenance. Some existing methods generate summaries from the sequence information of code without considering the structural information. Recently, researchers have adopted the Graph Neural Networks (GNNs) to capture the structural information with modified Abstract Syntax Trees (ASTs) to comprehensively represent a source code, but the alignment method of the two information encoder is hard to decide. In this paper, we propose a source code summarization model named SSCS, a unified transformer-based encoder–decoder architecture, for capturing structural and sequence information. SSCS is designed upon a structure-induced transformer with three main novel improvements. SSCS captures the structural information in a multi-scale aspect with an adapted fusion strategy and adopts a hierarchical encoding strategy to capture the textual information from the perspective of the document. Moreover, SSCS utilizes a bidirectional decoder which generates a summary from opposite direction to balance the generation performance between prefix and suffix. We conduct experiments on two public Java and Python datasets to evaluate our method and the result show that SSCS outperforms the state-of-art code summarization methods.
Four A 2 B-type Co III corroles (2a−2d) with electrondonating/withdrawing substituents at the A 2 meso-aryl substituents and a 4-(methylthio)phenyl ring at the B position have been synthesized and characterized, along with a series of meso-extended Co III corroles (4a−4c) with 4′-(methylthio)biphenyl moieties. The electronic structures and structure−property relationships of the dyes have been analyzed by comparing their redox and optical properties to trends predicted in density functional theory calculations. Au electrodes surface-modified with 2a−2d and 4a− 4c are highly efficient catalysts for electrocatalyzed hydrogen evolution reactions, and the electrocatalytic properties can be readily modulated by fine-tuning the electronic structure of the Co III corrole and the distance between the "Au−S" bond and Co III center.
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.