Automatic clustering of code changes - Kreutzer, Patrick; Dotzler, Georg; Ring, Matthias; Eskofier, Björn; Philippsen, Michael (Proceedings of the 13th International Conference on Mining Software Repositories (MSR'16), 2016)
Several research tools and projects require groups of similar code changes as input. Examples are recommendation and bug finding tools that can provide valuable information to developers based on such data. With the help of similar code changes they can simplify the application of bug fixes and code changes to multiple locations in a project. But despite their benefit, the practical value of existing tools is limited, as users need to manually specify the input data, i.e., the groups of similar code changes. To overcome this drawback, this paper presents and evaluates two syntactical similarity metrics, one of them is specifically designed to run fast, in combination with two carefully selected and self-tuning clustering algorithms to automatically detect groups of similar code changes. We evaluate the combinations of metrics and clustering algorithms by applying them to several open source projects and also publish the detected groups of similar code changes online as a reference dataset. The automatically detected groups of similar code changes work well when used as input for LASE, a recommendation system for code changes.

C++ Classes and Templates for OpenCL Kernels with PATOS - Richter-Gottfried, Franz; Kreutzer, Patrick; Ditter, Alexander; Schneider, Max; Fey, Dietmar (Proceedings of the 4th International Workshop on OpenCL, 2016)

Evaluierung von Verfahren zur Detektion von Gruppen ähnlicher Quelltext-Änderungen - Kreutzer, Patrick (Friedrich-Alexander-Universität Erlangen-Nürnberg, 2015)
Viele der während der Entwicklung und Wartung eines Software-Projekts durchgeführten Quelltext-Änderungen sind repetitiv, werden also auf ähnliche Art und Weise an verschiedenen Stellen im Code durchgeführt. Die manuelle Durchführung dieser sogenannten systematischen Änderungen ist fehleranfällig, aufwändig und schwierig, denn Entwickler müssen dazu nicht nur wissen, dass Änderungen am Quelltext notwendig sind, sondern auch welche Änderungen wo im Projekt durchzuführen sind.   Bei SIFE handelt es sich um ein Werkzeug, das Entwickler bei der Durchführung systematischer Änderungen unterstützen kann. Durch die Extraktion von Änderungen aus einem Versionskontrollsystem und die anschließende Bestimmung von Gruppen ähnlicher Änderungen ist SIFE in der Lage, Entwicklern Vorschläge über weitere zu ändernde Stellen samt der durchzuführenden Änderung zu präsentieren.   Die vorliegende Arbeit erweitert dieses Werkzeug und beschäftigt sich dabei insbesondere mit der Frage, wie unter Verwendung von Clustering-Algorithmen Gruppen ähnlicher Änderungen identifiziert werden können, aus denen SIFE Vorschläge für Entwickler erzeugen kann. Im Rahmen dieser Arbeit werden verschiedene solcher Algorithmen evaluiert. Neben Clustering-Verfahren, die auf Ähnlichkeits-Graphen arbeiten, wird außerdem erläutert, wie ein solcher Graph durch die Berechnung seiner Laplace’schen Eigenmap in einen Merkmalsraum eingebettet werden kann. Dies erlaubt den Einsatz weiterer Verfahren zur Bestimmung von Gruppen ähnlicher Änderungen.   Für eine Bewertung der Verfahren wenden wir diese auf die drei quelloffenen Software-Projekte JUnit, Disruptor, und Picasso an. Im Vergleich mit den Ergebnissen der ursprünglich in SIFE implementierten Heuristik zur Berechnung einer Gruppierung kann die Anzahl an Gruppen, aus denen sich potenziell Vorschläge für Entwickler ableiten lassen, um bis zu 43% gesteigert werden. Auch die Anzahl an Quelltext-Änderungen in diesen Gruppen kann für die analysierten Projekte um bis zu 30% erhöht werden.   Da mit den in dieser Arbeit vorgestellten Verfahren mehr Gruppen ähnlicher Änderungen identifiziert werden können, aus denen sich mehr Vorschläge für Entwickler erzeugen lassen, steigern diese den Nutzen von SIFE für Entwickler.

FAU-Inf2/ARES: PhD Thesis Version - Dotzler, Georg; Kreutzer, Patrick; Philippsen, Michael (2018)
This repository contains the ARES source code, a description of the ARES rule system and the evaluation results of the research paper "G. Dotzler, M. Kamp, P. Kreutzer, M. Philippsen: More Accurate Recommendations for Method-Level Changes". It also contains the ARES/C3 evaluation of the PhD thesis "G. Dotzler: Learning Code Transformations from Repositories, Friedrich-Alexander University Erlangen-Nürnberg, 2018".

FAU-Inf2/cthree: PhD Thesis Version - Kreutzer, Patrick; Dotzler, Georg; Philippsen, Michael (2018)
This repository contains the evaluation results of the research paper "P. Kreutzer, G. Dotzler, M. Ring, B. M. Eskofier, M. Philippsen: Automatic Clustering of Code Changes", as well as a simple Java tool to read in the data. It also contains the tree differencing evaluation of the PhD thesis "G. Dotzler: Learning Code Transformations from Repositories, Friedrich-Alexander University Erlangen-Nürnberg, 2018".

Language-Agnostic Generation of Compilable Test Programs - Kreutzer, Patrick; Kraus, Stefan; Philippsen, Michael (Proceedings of the International Conference on Software Testing, Verification and Validation (ICST 2020), 2020)
Testing is an integral part of the development of compilers and other language processors. To automatically create large sets of test programs, random program generators, or fuzzers, have emerged. Unfortunately, existing approaches are either language-specific (and thus require a rewrite for each language) or may generate programs that violate rules of the respective programming language (which limits their usefulness). This work introduces *Smith, a language-agnostic framework for the generation of valid, compilable test programs. It takes as input an abstract attribute grammar that specifies the syntactic and semantic rules of a programming language. It then creates test programs that satisfy all these rules. By aggressively pruning the search space and keeping the construction as local as possible, *Smith can generate huge, complex test programs in short time. We present four case studies covering four real-world programming languages (C, Lua, SQL, and SMT-LIB 2) to show that *Smith is both efficient and effective, while being flexible enough to support programming languages that differ considerably. We found bugs in all four case studies. For example, *Smith detected 165 different crashes in older versions of GCC and LLVM. *Smith and the language grammars are available online.

More Accurate Recommendations for Method-Level Changes - Dotzler, Georg; Kamp, Marius; Kreutzer, Patrick; Philippsen, Michael (Proceedings of 2017 11th Joint Meeting of the European Software Engineering Conference and the ACM SIGSOFT Symposium on the Foundations of Software Engineering (ESEC/FSE2017), 2017)
During the life span of large software projects, developers often apply the same code changes to different code locations in slight variations. Since the application of these changes to all locations is time-consuming and error-prone, tools exist that learn change patterns from input examples, search for possible pattern applications, and generate corresponding recommendations. In many cases, the generated recommendations are syntactically or semantically wrong due to code movements in the input examples. Thus, they are of low accuracy and developers cannot directly copy them into their projects without adjustments. We present the Accurate REcommendation System (ARES) that achieves a higher accuracy than other tools because its algorithms take care of code movements when creating patterns and recommendations. On average, the recommendations by ARES have an accuracy of 96% with respect to code changes that developers have manually performed in commits of source code archives. At the same time ARES achieves precision and recall values that are on par with other tools.
Keywords: Program transformation; refactoring; recommendation system

SeSaMe: A Data Set of Semantically Similar Java Methods - Kamp, Marius; Kreutzer, Patrick; Philippsen, Michael (Proceedings of the 16th International Conference on Mining Software Repositories (MSR 2019), 2019)
In the past, techniques for detecting similarly behaving code fragments were often only evaluated with small, artificial oracles or with code originating from programming competitions. Such code fragments differ largely from production codes. To enable more realistic evaluations, this paper presents SeSaMe, a data set of method pairs that are classified according to their semantic similarity. We applied text similarity measures on JavaDoc comments mined from 11 open source repositories and manually classified a selection of 857 pairs.<br

SeSaMe: A Data Set of Semantically Similar Java Methods [Data set] - Kamp, Marius; Kreutzer, Patrick; Philippsen, Michael (2019)
This is the data set presented in the paper Kamp, M., Kreutzer P., Philippsen M.: SeSaMe: A Data Set of Semantically Similar Java Methods. 16th International Conference on Mining Software Repositories (MSR 2019), Montreal, QC, Canada. 2019

Test Case Reduction: A Framework, Benchmark, and Comparative Study - Kreutzer, Patrick; Kunze, Tom; Philippsen, Michael (Proceedings of the International Conference on Software Maintenance and Evolution (ICSME 2021), 2021)
Given a program that triggers a bug in a compiler (or other kind of language processor), the goal of test case reduction is to cut away all code that is irrelevant for the bug, i.e., to generate a smaller program that still induces the bug. Research has proposed several language-agnostic reduction techniques that automatically reduce bug-inducing programs in arbitrary programming languages, but there is no large-scale, conclusive evaluation of these algorithms yet. Furthermore, the development of new algorithms is hampered by the unavailability of comparable implementations of previous techniques and of diverse test programs that trigger different bugs in real compilers. To close these gaps and to foster future research in this area, this paper makes three contributions: (1) A framework that includes efficient, fine-tuned implementations of 6 state-of-the-art reducers, (2) a diverse benchmark that comprises 321 fuzzer-generated programs in two programming languages that trigger 110 different bugs in real compilers, and (3) a comparative study that builds upon our framework and benchmark and compares the reduction techniques w.r.t. their effectiveness and efficiency. Our results show that there is no reduction technique yet that performs best across all test cases and languages. Our framework and benchmark are available online and we provide the necessary scripts and tools to replicate our stud
Keywords: test case reduction; compiler testing; benchmark

Vectorization of Recursive Parallel Programs - Kreutzer, Patrick (2014)