
Internship | LLM-Assisted Test Code Clone Refactoring
About this position
Large C++ test suites frequently contain duplicated and near-duplicated test logic, often created through copy–paste adaptation to cover variations in configuration, inputs, or system states. While this practice accelerates test development, it leads to increased maintenance effort, inconsistent test evolution, and unnecessary growth of test code. In safety-critical and high-assurance software systems, such duplication also complicates review, traceability, and verification activities. Parameterization-based refactoring offers a promising approach to improving test code reuse by abstracting similar or partially similar test fragments into reusable methods. However, applying this technique at scale remains challenging. Similarity in test code may occur at textual, syntactic, or semantic levels, limiting the effectiveness of traditional clone detection techniques. Moreover, transforming similar fragments into clean, parameterized abstractions must preserve test intent and behavior, avoid over-generalization, and remain readable and reviewable by engineers working in safety-critical environments. This project explores how modern clone detection techniques, combined with LLM-based reasoning, can support the automated identification and extraction of reusable C++ test code in large, high-tech software systems.
What will be your role?
You will:
- Investigate techniques for identifying similar code, including clone detection (text based, token based, AST based, and semantic) and emerging LLM based similarity approaches.
- Detect reuse and parameterization opportunities in real or representative C++ test code.
- Generate parameterized refactorings, designing a method or prototype to extract repeated logic into reusable functions or modules while preserving behavior.
- Validate the quality of the refactored code, considering syntax correctness, behavioral equivalence, and maintainability (avoiding code smells like excessive parameters or over complicated abstractions).
- Build or adapt a benchmark dataset of C++ fragments for comparing different detection and refactoring strategies.
What we expect from you
You are an MSc student in Computer Science, Software Engineering, or related fields, passionate about software refactoring and applied research in safety-critical systems.
Preferred skills include:
- Solid C++ programming skills.
- Interest in code refactoring, software maintainability, and static analysis.
- Ability to work with large, complex, safety critical software systems.
- Experience with ASTs or static analysis frameworks.
- Familiarity with LLM based code reasoning or refactoring.
- Knowledge of software metrics and code smell detection.
What you'll get in return
You want an internship opportunity on the precursor of your career; an internship gives you an opportunity to take a good look at your prospective future employer. TNO goes a step further. It’s not just looking that interests us; you and your knowledge are essential to our innovation. That’s why we attach a great deal of value to your personal and professional development. You will, of course, be properly supervised during your work placement and be given the scope for you to get the best out of yourself. Furthermore, we provide:
- A highly professional, innovative internship environment, within a team of top experts.
- A suitable internship allowance (615 euro for wo-, hbo- and mbo-students, for a full-time internship).
- Possibility of eight hours of free leave per internship month (for a full-time internship).
- A free membership of Jong TNO, where you can meet other TNO professionals and join several activities, such as sports activities, (work-related) courses or the yearly ski-trip.
- Use of a laptop.
- An allowance for travel expenses in case you don’t receive an OV-card.
TNO as an employer
At TNO, we innovate for a healthier, safer and more sustainable life. And for a strong economy. Since 1932, we have been making knowledge and technology available for the common good. We find each other in wonder and ingenuity. We are driven to push boundaries. There is all the space and support for your talent and ambition. You work with people who will challenge you: who inspire you and want to learn from you. Our state-of-the-art facilities are there to realize your vision. What you do at TNO matters: impact makes the difference. Because with every innovation you contribute to tomorrow’s world. Read more about TNO as an employer.
At TNO we encourage an inclusive work environment, where you can be yourself. Whatever your story and whatever unique qualities you bring to the table. It is by combining our unique strengths and perspectives that we are able to develop innovations that make a real difference in society. Want to know more? Read what steps we are taking in the area of diversity, equity and inclusion.
The selection process
After the first CV selection, the application process will be conducted by the concerning department. TNO will provide a suitable internship agreement. If you have any questions about this vacancy, you can contact the contact person mentioned below.
Important to be aware of before applying:
- Before the start of the internship, the internship agreement from TNO needs to be signed. For students at a college or university based in the Netherlands, TNO uses the UNL-template (supplemented with a number of specific agreements from TNO). For students of foreign and MBO educational institutions, the TNO internship agreement applies. TNO does not sign any other internship agreements.
- Before the start of the internship, the educational institution will need to confirm in writing that:
- 1) you are enrolled at the educational institution during the internship, and;
- 2) the internship takes place as part of the programme of the study.
- The confirmation of educational institution takes place by signing the UNL template or forms prepared by TNO.
- Interns at TNO must be in possession of a Dutch residential address at the start of the internship. Performance of internship activities from abroad is not possible.
Has this job opening sparked your interest?
Then we’d like to hear from you! Please contact us for more information about the job or the selection process. To apply, please upload your CV and covering letter using the ‘apply now’ button.