The University of Auckland

Project #43: Supporting choosing good identifiers

Back

Description:


Every developer knows that good quality code has meaningful identifiers. However it can be difficult to decide how meaningful an identifier is, and this judgement can be subjective. Ideally there would be some form of measurement that tells us how good an identifier is, but the subjective nature of evaluating meaningfulness makes this difficult.
Nevertheless there are heuristics and proposals for forms of measurements that are referred to when discussing what makes an identifier meaningful.

The goal of this project is to explore means to provide support to developers to improve their choice of identifier. This will build on a very successful project in 2019 that used identifiers as a way to measure the cohesion of a class.

The project is fairly open-ended. There are several directions that it could take. Evaluating how good an identifier is will require the use of Information Retrieval (IR) and Natural Language Processing (NLP) techniques. One direction would be to explore which of these techniques work the best. There are online facilities to help determine information about words, such as WordNet (https://wordnet.princeton.edu). WordNet has an API allowing for programmatic access (http://www.lexicadb.com/lxserver/wn_http.html). Another direction might be to explore such facilities.

Another direction might be to, rather than just provide some kind of score of goodness for a particular choice, to instead suggest alternatives. Such a recommender system could be based on existing code (of which there is a huge amount available for data mining).

There are also different contexts that could be considered. It could be that the goal is to support developers to reduce the time the spend choosing identifiers, as there are reports that some spend quite a lot of time doing so. The goal could be to support the code review process, as evaluating choice of identifiers it a common task in code review. Another goal could be to provide automated feedback to students, and so helping them to learn to choose better identifiers.

Type:

Undergraduate

Outcome:

A tool or technique for supporting choosing good identifiers

Prerequisites

Must have successfully completed SOFTENG306

Specialisations

Categories

Supervisor

Co-supervisor

Team

Lab

Lab allocations have not been finalised