{"id":{"repo_id":"calgary","oai_identifier":"oai:ucalgary.scholaris.ca:1880/115167"},"canonical_url":"https://search.ndltd.org/etd/calgary/oai:ucalgary.scholaris.ca:1880/115167","repository":{"repo_id":"calgary","name":"University of Calgary","base_url":"https://ucalgary.scholaris.ca/server/oai/request"},"display":{"title":"Domain Adaptation for Automated Program Repair","abstract":"Automated Program Repair (APR) is defined as the process of fixing a bug/defect in the source code by an automated tool. APR methods have recently experienced promising results by leveraging state-of-the-art Neural Language Processing (NLP) techniques. APR tools such as TFix and CodeXGLUE that combine text-to-text transformers with software-specific techniques are outperforming alternatives these days. However, all these methods are limited with respect to Domain Shift. In other words, APR models are trained and tested on the same set of projects (i.e., when fixing a bug from project A, the model has already seen example fixed bugs from project A in the training set). However, in the real world, APR models are meant to be generalizable to new and different projects. Therefore, there is a potential threat that the proposed APR models with high effectiveness, reported in the studies, perform poorly when the characteristics of the new project or its bugs are different (domain shift). In this study, we first define the problem of domain shift in software engineering and automated program repair. Next we measure the potential damage of domain shift on two state-of-the-art APR methods (TFix and CodeXGLUE). Based on this observation, we then propose a domain adaptation framework that can adapt an APR method for a given target project. We conduct an empirical study with three domain adaptation methods and two APR models on 611 bugs from 19 projects. The results show that our proposed framework can improve the effectiveness of TFix by 13.05% and CodeXGLUE by 23.4%, in terms of “Exact Match”. Through experiments, we also show that the framework provides high efficiency and reliability (in terms of exposure bias). Another contribution of this study is the proposal of a data synthesis method to address the lack of labeled data in APR (bugs and their fixes). We leverage transformers to create a bug generator model. We use the generated synthetic data to domain adapt TFix and CodeXGLUE on the projects with no data (Zero-shot learning), which results in an average improvement of 5.76% and 24.42% for TFix and CodeXGLUE, respectively.","abstract_html":"Automated Program Repair (APR) is defined as the process of fixing a bug/defect in the source code by an automated tool. APR methods have recently experienced promising results by leveraging state-of-the-art Neural Language Processing (NLP) techniques. APR tools such as TFix and CodeXGLUE that combine text-to-text transformers with software-specific techniques are outperforming alternatives these days. However, all these methods are limited with respect to Domain Shift. In other words, APR models are trained and tested on the same set of projects (i.e., when fixing a bug from project A, the model has already seen example fixed bugs from project A in the training set). However, in the real world, APR models are meant to be generalizable to new and different projects. Therefore, there is a potential threat that the proposed APR models with high effectiveness, reported in the studies, perform poorly when the characteristics of the new project or its bugs are different (domain shift). In this study, we first define the problem of domain shift in software engineering and automated program repair. Next we measure the potential damage of domain shift on two state-of-the-art APR methods (TFix and CodeXGLUE). Based on this observation, we then propose a domain adaptation framework that can adapt an APR method for a given target project. We conduct an empirical study with three domain adaptation methods and two APR models on 611 bugs from 19 projects. The results show that our proposed framework can improve the effectiveness of TFix by 13.05% and CodeXGLUE by 23.4%, in terms of “Exact Match”. Through experiments, we also show that the framework provides high efficiency and reliability (in terms of exposure bias). Another contribution of this study is the proposal of a data synthesis method to address the lack of labeled data in APR (bugs and their fixes). We leverage transformers to create a bug generator model. We use the generated synthetic data to domain adapt TFix and CodeXGLUE on the projects with no data (Zero-shot learning), which results in an average improvement of 5.76% and 24.42% for TFix and CodeXGLUE, respectively.","abstract_has_math":false,"creators":["Zirak, Armin"],"institution":"Schulich School of Engineering","degree_name":"Master of Science (MSc)","degree_level":null,"degree_discipline":"Engineering – Electrical & Computer","degree_department":null,"school":null,"contributors":[],"advisors":["Hemmati, Hadi"],"committee_chairs":[],"committee_members":["Pinheiro Bento, Mariana","Moshirpour, Mohammad"],"year":2022,"date_issued":"2022-09","date_published":"2022-09","updated_at":"2026-11-19T07:30:49Z","subjects":["Natural Language Processing","Transformers","Machine Learning","Automated Program Repair","Domain Adaptation"],"languages":["eng"],"rights":["University of Calgary graduate students retain copyright ownership and moral rights for their thesis. You may use this material in any way that is permitted by the Copyright Act or through licensing that has been assigned to the document. For uses that are not allowable under copyright legislation or licensing, you are required to seek permission."],"rights_urls":[],"identifier_entries":[{"key":"dc:identifier.doi","label":"DOI","values":["https://dx.doi.org/10.11575/PRISM/40189"],"render_values":[{"text":"https://dx.doi.org/10.11575/PRISM/40189","href":"https://dx.doi.org/10.11575/PRISM/40189","code":true}]},{"key":"dc:identifier.citation","label":"Dc Identifier Citation","values":["Zirak, A. (2022). Domain adaptation for Automated Program Repair (Master's thesis, University of Calgary, Calgary, Canada). Retrieved from https://prism.ucalgary.ca."],"render_values":[{"text":"Zirak, A. (2022). Domain adaptation for Automated Program Repair (Master's thesis, University of Calgary, Calgary, Canada). Retrieved from https://prism.ucalgary.ca.","href":null,"code":true}]}],"person_identifier_entries":[]},"links":{"outbound_url":"http://hdl.handle.net/1880/115167","outbound_label":"Handle","outbound_source":"dc:identifier.uri","record_url":"http://hdl.handle.net/1880/115167","record_label":"Repository record","record_kind":"handle","record_source":"dc:identifier.uri","download_url":null,"download_label":null,"download_source":null,"access_status":null,"embargo_until":null,"access_note":null},"source_record":{"url":"https://ucalgary.scholaris.ca/server/oai/request?verb=GetRecord&metadataPrefix=dim&identifier=oai%3Aucalgary.scholaris.ca%3A1880%2F115167","prefix":"dim"},"metadata_groups":[{"id":"people","label":"People","entries":[{"key":"dc:contributor.advisor","label":"Advisor","values":["Hemmati, Hadi"]},{"key":"dc:contributor.committeemember","label":"Committee Member","values":["Pinheiro Bento, Mariana","Moshirpour, Mohammad"]},{"key":"dc:creator","label":"Author","values":["Zirak, Armin"]}]},{"id":"academic_context","label":"Academic Context","entries":[{"key":"dc:date","label":"Dc Date","values":["2022-11"]},{"key":"dc:date.accessioned","label":"Dc Date Accessioned","values":["2022-09-07T17:54:10Z"]},{"key":"dc:date.available","label":"Dc Date Available","values":["2022-09-07T17:54:10Z"]},{"key":"dc:date.issued","label":"Date","values":["2022-09"]},{"key":"dc:publisher.faculty","label":"Dc Publisher Faculty","values":["Schulich School of Engineering"]},{"key":"dc:publisher.institution","label":"Dc Publisher Institution","values":["University of Calgary"]},{"key":"dc:type","label":"Dc Type","values":["master thesis"]},{"key":"thesis:degree_discipline","label":"Discipline","values":["Engineering – Electrical & Computer"]},{"key":"thesis:degree_name","label":"Degree Name","values":["Master of Science (MSc)"]},{"key":"thesis:institution_name","label":"Thesis Institution Name","values":["University of Calgary"]}]},{"id":"subjects_keywords","label":"Subjects and Keywords","entries":[{"key":"dc:subject","label":"Dc Subject","values":["Natural Language Processing","Transformers","Machine Learning","Automated Program Repair","Domain Adaptation"]},{"key":"dc:subject.classification","label":"Dc Subject Classification","values":["Artificial Intelligence","Computer Science"]}]},{"id":"language_rights","label":"Language and Rights","entries":[{"key":"dc:language.iso","label":"Language (ISO)","values":["eng"]},{"key":"dc:rights","label":"Dc Rights","values":["University of Calgary graduate students retain copyright ownership and moral rights for their thesis. You may use this material in any way that is permitted by the Copyright Act or through licensing that has been assigned to the document. For uses that are not allowable under copyright legislation or licensing, you are required to seek permission."]}]},{"id":"identifiers","label":"Identifiers","entries":[{"key":"dc:identifier.citation","label":"Dc Identifier Citation","values":["Zirak, A. (2022). Domain adaptation for Automated Program Repair (Master's thesis, University of Calgary, Calgary, Canada). Retrieved from https://prism.ucalgary.ca."]},{"key":"dc:identifier.doi","label":"DOI","values":["https://dx.doi.org/10.11575/PRISM/40189"]},{"key":"dc:identifier.uri","label":"Identifier URI","values":["http://hdl.handle.net/1880/115167"]}]},{"id":"additional","label":"Additional Metadata","entries":[{"key":"dc:description.abstract","label":"Abstract","values":["Automated Program Repair (APR) is defined as the process of fixing a bug/defect in the source code by an automated tool. APR methods have recently experienced promising results by leveraging state-of-the-art Neural Language Processing (NLP) techniques. APR tools such as TFix and CodeXGLUE that combine text-to-text transformers with software-specific techniques are outperforming alternatives these days. However, all these methods are limited with respect to Domain Shift. In other words, APR models are trained and tested on the same set of projects (i.e., when fixing a bug from project A, the model has already seen example fixed bugs from project A in the training set). However, in the real world, APR models are meant to be generalizable to new and different projects. Therefore, there is a potential threat that the proposed APR models with high effectiveness, reported in the studies, perform poorly when the characteristics of the new project or its bugs are different (domain shift). In this study, we first define the problem of domain shift in software engineering and automated program repair. Next we measure the potential damage of domain shift on two state-of-the-art APR methods (TFix and CodeXGLUE). Based on this observation, we then propose a domain adaptation framework that can adapt an APR method for a given target project. We conduct an empirical study with three domain adaptation methods and two APR models on 611 bugs from 19 projects. The results show that our proposed framework can improve the effectiveness of TFix by 13.05% and CodeXGLUE by 23.4%, in terms of “Exact Match”. Through experiments, we also show that the framework provides high efficiency and reliability (in terms of exposure bias). Another contribution of this study is the proposal of a data synthesis method to address the lack of labeled data in APR (bugs and their fixes). We leverage transformers to create a bug generator model. We use the generated synthetic data to domain adapt TFix and CodeXGLUE on the projects with no data (Zero-shot learning), which results in an average improvement of 5.76% and 24.42% for TFix and CodeXGLUE, respectively."]},{"key":"dc:title","label":"Title","values":["Domain Adaptation for Automated Program Repair"]},{"key":"dspace:entity.type","label":"Dspace Entity Type","values":["Publication"]},{"key":"local:request.copy","label":"Local Request Copy","values":["true"]},{"key":"others:access_status","label":"Others Access Status","values":["open.access"]}]}],"canonical_facts":{"dc:contributor.advisor":["Hemmati, Hadi"],"dc:contributor.committeemember":["Pinheiro Bento, Mariana","Moshirpour, Mohammad"],"dc:creator":["Zirak, Armin"],"dc:date":["2022-11"],"dc:date.accessioned":["2022-09-07T17:54:10Z"],"dc:date.available":["2022-09-07T17:54:10Z"],"dc:date.issued":["2022-09"],"dc:description.abstract":["Automated Program Repair (APR) is defined as the process of fixing a bug/defect in the source code by an automated tool. APR methods have recently experienced promising results by leveraging state-of-the-art Neural Language Processing (NLP) techniques. APR tools such as TFix and CodeXGLUE that combine text-to-text transformers with software-specific techniques are outperforming alternatives these days. However, all these methods are limited with respect to Domain Shift. In other words, APR models are trained and tested on the same set of projects (i.e., when fixing a bug from project A, the model has already seen example fixed bugs from project A in the training set). However, in the real world, APR models are meant to be generalizable to new and different projects. Therefore, there is a potential threat that the proposed APR models with high effectiveness, reported in the studies, perform poorly when the characteristics of the new project or its bugs are different (domain shift). In this study, we first define the problem of domain shift in software engineering and automated program repair. Next we measure the potential damage of domain shift on two state-of-the-art APR methods (TFix and CodeXGLUE). Based on this observation, we then propose a domain adaptation framework that can adapt an APR method for a given target project. We conduct an empirical study with three domain adaptation methods and two APR models on 611 bugs from 19 projects. The results show that our proposed framework can improve the effectiveness of TFix by 13.05% and CodeXGLUE by 23.4%, in terms of “Exact Match”. Through experiments, we also show that the framework provides high efficiency and reliability (in terms of exposure bias). Another contribution of this study is the proposal of a data synthesis method to address the lack of labeled data in APR (bugs and their fixes). We leverage transformers to create a bug generator model. We use the generated synthetic data to domain adapt TFix and CodeXGLUE on the projects with no data (Zero-shot learning), which results in an average improvement of 5.76% and 24.42% for TFix and CodeXGLUE, respectively."],"dc:identifier.citation":["Zirak, A. (2022). Domain adaptation for Automated Program Repair (Master's thesis, University of Calgary, Calgary, Canada). Retrieved from https://prism.ucalgary.ca."],"dc:identifier.doi":["https://dx.doi.org/10.11575/PRISM/40189"],"dc:identifier.uri":["http://hdl.handle.net/1880/115167"],"dc:language.iso":["eng"],"dc:publisher.faculty":["Schulich School of Engineering"],"dc:publisher.institution":["University of Calgary"],"dc:rights":["University of Calgary graduate students retain copyright ownership and moral rights for their thesis. You may use this material in any way that is permitted by the Copyright Act or through licensing that has been assigned to the document. For uses that are not allowable under copyright legislation or licensing, you are required to seek permission."],"dc:subject":["Natural Language Processing","Transformers","Machine Learning","Automated Program Repair","Domain Adaptation"],"dc:subject.classification":["Artificial Intelligence","Computer Science"],"dc:title":["Domain Adaptation for Automated Program Repair"],"dc:type":["master thesis"],"dspace:entity.type":["Publication"],"local:request.copy":["true"],"others:access_status":["open.access"],"thesis:degree_discipline":["Engineering – Electrical & Computer"],"thesis:degree_name":["Master of Science (MSc)"],"thesis:institution_name":["University of Calgary"]},"updated_at":"2026-11-19T07:30:49Z"}