Conference paper Open Access

A Structural Model for Contextual Code Changes

Brody, Shaked; Alon, Uri; Yahav, Eran


DCAT Export

<?xml version='1.0' encoding='utf-8'?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:adms="http://www.w3.org/ns/adms#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dct="http://purl.org/dc/terms/" xmlns:dctype="http://purl.org/dc/dcmitype/" xmlns:dcat="http://www.w3.org/ns/dcat#" xmlns:duv="http://www.w3.org/ns/duv#" xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:frapo="http://purl.org/cerif/frapo/" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:gsp="http://www.opengis.net/ont/geosparql#" xmlns:locn="http://www.w3.org/ns/locn#" xmlns:org="http://www.w3.org/ns/org#" xmlns:owl="http://www.w3.org/2002/07/owl#" xmlns:prov="http://www.w3.org/ns/prov#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:schema="http://schema.org/" xmlns:skos="http://www.w3.org/2004/02/skos/core#" xmlns:vcard="http://www.w3.org/2006/vcard/ns#" xmlns:wdrs="http://www.w3.org/2007/05/powder-s#">
  <rdf:Description rdf:about="https://doi.org/10.5281/zenodo.4036303">
    <dct:identifier rdf:datatype="http://www.w3.org/2001/XMLSchema#anyURI">https://doi.org/10.5281/zenodo.4036303</dct:identifier>
    <foaf:page rdf:resource="https://doi.org/10.5281/zenodo.4036303"/>
    <dct:creator>
      <rdf:Description>
        <rdf:type rdf:resource="http://xmlns.com/foaf/0.1/Agent"/>
        <foaf:name>Brody, Shaked</foaf:name>
        <foaf:givenName>Shaked</foaf:givenName>
        <foaf:familyName>Brody</foaf:familyName>
        <org:memberOf>
          <foaf:Organization>
            <foaf:name>Technion</foaf:name>
          </foaf:Organization>
        </org:memberOf>
      </rdf:Description>
    </dct:creator>
    <dct:creator>
      <rdf:Description>
        <rdf:type rdf:resource="http://xmlns.com/foaf/0.1/Agent"/>
        <foaf:name>Alon, Uri</foaf:name>
        <foaf:givenName>Uri</foaf:givenName>
        <foaf:familyName>Alon</foaf:familyName>
        <org:memberOf>
          <foaf:Organization>
            <foaf:name>Technion</foaf:name>
          </foaf:Organization>
        </org:memberOf>
      </rdf:Description>
    </dct:creator>
    <dct:creator>
      <rdf:Description>
        <rdf:type rdf:resource="http://xmlns.com/foaf/0.1/Agent"/>
        <foaf:name>Yahav, Eran</foaf:name>
        <foaf:givenName>Eran</foaf:givenName>
        <foaf:familyName>Yahav</foaf:familyName>
        <org:memberOf>
          <foaf:Organization>
            <foaf:name>Technion</foaf:name>
          </foaf:Organization>
        </org:memberOf>
      </rdf:Description>
    </dct:creator>
    <dct:title>A Structural Model for Contextual Code Changes</dct:title>
    <dct:publisher>
      <foaf:Agent>
        <foaf:name>Zenodo</foaf:name>
      </foaf:Agent>
    </dct:publisher>
    <dct:issued rdf:datatype="http://www.w3.org/2001/XMLSchema#gYear">2020</dct:issued>
    <dcat:keyword>Programming Languages</dcat:keyword>
    <dcat:keyword>Machine Learning</dcat:keyword>
    <dct:issued rdf:datatype="http://www.w3.org/2001/XMLSchema#date">2020-09-18</dct:issued>
    <owl:sameAs rdf:resource="https://zenodo.org/record/4036303"/>
    <adms:identifier>
      <adms:Identifier>
        <skos:notation rdf:datatype="http://www.w3.org/2001/XMLSchema#anyURI">https://zenodo.org/record/4036303</skos:notation>
        <adms:schemeAgency>url</adms:schemeAgency>
      </adms:Identifier>
    </adms:identifier>
    <dct:isVersionOf rdf:resource="https://doi.org/10.5281/zenodo.4036302"/>
    <dct:description>&lt;p&gt;We address the problem of predicting edit completions based on a learned model that was trained on past edits.&lt;br&gt; Given a code snippet that is partially edited, our goal is to predict a completion of the edit for the rest of the&lt;br&gt; snippet. We refer to this task as the EditCompletion&amp;nbsp;task and present a novel approach for tackling it. The&lt;br&gt; main idea is to directly represent structural edits. This allows us to model the likelihood of the edit itself, rather&lt;br&gt; than learning the likelihood of the edited code. We represent an edit operation as a path in the program&amp;rsquo;s Abstract&lt;br&gt; Syntax Tree (AST), originating from the source of the edit to the target of the edit. Using this representation, we&lt;br&gt; present a powerful and lightweight neural model for the EditCompletion&amp;nbsp;task.&lt;/p&gt; &lt;p&gt;&lt;br&gt; We conduct a thorough evaluation, comparing our approach to a variety of representation and modeling&lt;br&gt; approaches that are driven by multiple strong models such as LSTMs, Transformers, and neural CRFs. Our&lt;br&gt; experiments show that our model achieves 28% relative gain over state-of-the-art sequential models and 2&amp;times;&lt;br&gt; higher accuracy than syntactic models that learn to generate the edited code instead of modeling the edits&lt;br&gt; directly. We make our code, dataset, and trained models publicly available.&lt;/p&gt;</dct:description>
    <dct:accessRights rdf:resource="http://publications.europa.eu/resource/authority/access-right/PUBLIC"/>
    <dct:accessRights>
      <dct:RightsStatement rdf:about="info:eu-repo/semantics/openAccess">
        <rdfs:label>Open Access</rdfs:label>
      </dct:RightsStatement>
    </dct:accessRights>
    <dct:license rdf:resource="https://creativecommons.org/licenses/by/4.0/legalcode"/>
    <dcat:distribution>
      <dcat:Distribution>
        <dcat:accessURL rdf:resource="https://doi.org/10.5281/zenodo.4036303"/>
        <dcat:byteSize>97734743</dcat:byteSize>
        <dcat:downloadURL rdf:resource="https://zenodo.org/record/4036303/files/A-Structural-Model-for-Contextual-Code-Changes-Artifact.zip"/>
        <dcat:mediaType>application/zip</dcat:mediaType>
      </dcat:Distribution>
    </dcat:distribution>
    <dcat:distribution>
      <dcat:Distribution>
        <dcat:accessURL rdf:resource="https://doi.org/10.5281/zenodo.4036303"/>
        <dcat:byteSize>1084</dcat:byteSize>
        <dcat:downloadURL rdf:resource="https://zenodo.org/record/4036303/files/LICENSE"/>
      </dcat:Distribution>
    </dcat:distribution>
    <dcat:distribution>
      <dcat:Distribution>
        <dcat:accessURL rdf:resource="https://doi.org/10.5281/zenodo.4036303"/>
        <dcat:byteSize>15076</dcat:byteSize>
        <dcat:downloadURL rdf:resource="https://zenodo.org/record/4036303/files/README.md"/>
      </dcat:Distribution>
    </dcat:distribution>
  </rdf:Description>
</rdf:RDF>
73
16
views
downloads
All versions This version
Views 7373
Downloads 1616
Data volume 488.8 MB488.8 MB
Unique views 7070
Unique downloads 1313

Share

Cite as