Researchers study how code files relate to software architecture

A study examines how file text, dependencies, and folders help map code to architecture.

Researchers studied how to assign source files to modules of a reference architecture. They looked at how file text, dependencies, and directory organization affect this mapping.

The study used ten Java, C, and C++ systems with a limited labeling budget. They compared lexical, structural, and contextual file representations. They also tested these with and without dependency neighbors.

A Heterogeneous Graph Transformer (HGT) was used to compare different file-level graphs. These graphs included member nodes summarizing program elements or folder nodes. They also tested encoding folder paths directly in file representations.

Representations with dependency information outperformed lexical representations on most systems. Folder-aware variants gave the largest and most consistent gains across HGT configurations. However, a directory rule reached a median accuracy of 89-100%.

Adding folder information does not consistently improve predictions for files the directory rule misclassifies. Member nodes provide no consistent improvement over file-level graphs. Findings support assessing what file representations and directory organization already provide.

Key facts

  • Representations encoding dependency information outperformed lexical representations on most systems.
  • A directory rule achieved a per-system median accuracy of 89-100%.
  • Folder-aware variants yielded the largest and most consistent gains across HGT configurations.
  • Member nodes provide no consistent improvement over file-level graphs.

All sections

Edition