## 1 Introduction  
Studying in university involves class attendance, individual work and group work. Students interact in and out of the classroom because of previous friendships, affinities or the need for social interaction to study and to be part of the university community. Therefore, group work is usually inherent in the study process, both in the study of theory and in the implementation of practical exercises. Students communicate, help each other and exchange knowledge (and it has always been so, although by other means). Thus, information interchange is very beneficial to the learning process. At the same time, teachers can encourage and promote group work, and they try to create situations in which collaboration is necessary, i.e., go beyond group work and foster communication, reflection and the construction of knowledge among students. All these technologies favour knowledge sharing and improve individual learning. In a broad sense, technology helps to maintain active learning communities. Unlike other configurations relating to group learning, in our case, the teacher does not organise the groups, the task or any communication tools. Groups and collaboration arise at the initiative of students when they study and do their assignments. This is called spontaneous collaborative learning (SCOLL) [1]. Its main features are that collaboration is not organised or initiated by the teacher but arises from students' finding a benefit in it; groups are usually small and stable throughout the course; communication may or may not be mediated by technology. Group work is encouraged and promoted, but after several years of observing the students, from the results, this promotion of collaboration is mistaken by some students as an open door for dishonest behaviour such as cheating, copying or colluding. We cannot really speak of misunderstanding or confusion, even though that is the excuse the student offers when caught in such a situation. Plagiarism and other dishonest behaviours are alarming at university, especially in computer science studies, as has been highlighted by other studies and journalists [2; 3; 4]. As teachers, we ask ourselves: where is the boundary among help, collaboration and plagiarism? Can we establish conditions or indicators that help to distinguish between the legitimate and the deceitful? These are the same questions addressed in [5]. In this case, three levels were posed--collaboration, collusion and plagiarism--and the boundaries among them were discussed. Its author concluded that the bounds vary depending on the assignment and the course policy. It ultimately resolved that professors should establish and clearly state what the boundaries are so that programming students know the course rules and are sure that they are not acting unethically. This conclusion is correct, but it is still fuzzy and not quantifiable. The present paper tries to shed light on this situation in a subject similar to the one addressed by [PERSON]'s article [5] with quantitative methods and real data. We present a study conducted over four years with Introduction to Programming, a first-year course in the Bachelor of Mathematics that uses Haskell as a programming language. The aim of the paper was to observe how group studies are formed and how they are organised over the course of an academic year. As a result, this article studies and characterises how students construct solutions to their practical programming tasks. Our method consists of looking for similarities among students' solutions using automatic tools. We looked for answers to the following research questions:  
1. Is it possible to quantify how students share knowledge in a classroom through SCOLL? How much of the work is entirely individual and how much is done with classmates? 2. Is it possible to identify study groups in a classroom? How large are they? Do they have ethical behaviour? 3. How are successful learners organised? How do they interact with their classmates in the classroom? Are they members of the study groups?