TY - GEN
T1 - On method ordering
AU - Geffen, Yorai
AU - Maoz, Shahar
N1 - Publisher Copyright:
© 2016 IEEE.
PY - 2016/7/5
Y1 - 2016/7/5
N2 - As the order of methods in a Java class has no effect on its semantics, an engineer can choose any order she prefers. Which code conventions regarding methods ordering are common in practice, if any? Are some orders better than others in making the code easier to understand? Can good orders be computed and applied automatically? In this work we address these questions. First, we present a study of method orders in a large body of open source projects, where we identify existing common practices. Second, we present four method ordering strategies, which we automate and provide in an Eclipse plugin, as a form of refactoring. Finally, we present the results of a user study, which evaluates the effect of our methods ordering strategies on engineers' code comprehension in terms of correctness and time spent on answering.
AB - As the order of methods in a Java class has no effect on its semantics, an engineer can choose any order she prefers. Which code conventions regarding methods ordering are common in practice, if any? Are some orders better than others in making the code easier to understand? Can good orders be computed and applied automatically? In this work we address these questions. First, we present a study of method orders in a large body of open source projects, where we identify existing common practices. Second, we present four method ordering strategies, which we automate and provide in an Eclipse plugin, as a form of refactoring. Finally, we present the results of a user study, which evaluates the effect of our methods ordering strategies on engineers' code comprehension in terms of correctness and time spent on answering.
UR - http://www.scopus.com/inward/record.url?scp=84979742648&partnerID=8YFLogxK
U2 - 10.1109/ICPC.2016.7503711
DO - 10.1109/ICPC.2016.7503711
M3 - ???researchoutput.researchoutputtypes.contributiontobookanthology.conference???
AN - SCOPUS:84979742648
T3 - IEEE International Conference on Program Comprehension
BT - Proceedings of the 24th IEEE International Conference on Program Comprehension, ICPC 2016 - co-located with ICSE 2016
PB - IEEE Computer Society
T2 - 24th IEEE International Conference on Program Comprehension, ICPC 2016
Y2 - 16 May 2016 through 17 May 2016
ER -