In an ordinal election, two candidates are said to be perfect clones if every voter ranks them adjacently. The independence of clones axiom then states that removing one of the two clones should not change the election outcome. This axiom has been extensively studied in social choice theory, and several voting rules are known to satisfy it (such as IRV, Ranked Pairs and Schulze). However, perfect clones are unlikely to occur in practice, especially for political elections with many voters. In this work, we study different notions of approximate clones in ordinal elections. Informally, two candidates are approximate clones in a preference profile if they are close to being perfect clones. We discuss two measures to quantify this proximity, and we show under which conditions the voting rules that are known to be independent of clones are also independent of approximate clones. In particular, we show that for elections with at least four candidates, none of these rules are independent of approximate clones in the general case. However, we find a more positive result for the case of three candidates. Finally, we conduct an empirical study of approximate clones and independence of appro
Permutation clones generalise permutation groups and clone theory. We investigate permutation clones defined by relations, or equivalently, the automorphism groups of powers of relations. We find many structural results on the lattice of all relationally defined permutation clones on a finite set. We find all relationally defined permutation clones on two element set. We show that all maximal borrow closed permutation clones are either relationally defined or cancellatively defined. Permutation clones generalise clones to permutations of $A^n$. Emil Jeřábek found the dual structure to be weight mappings $A^k\rightarrow M$ to a commutative monoid, generalising relations. We investigate the case when the dual object is precisely a relation, equivalently, that $M={\mathbb B}$, calling these relationally defined permutation clones. We determine the number of relationally defined permutation clones on two elements (13). We note that many infinite classes of clones collapse when looked at as permutation clones.
Industrial Internet of Things (IIoT) has become a prominent topic recently, with an increasing number of IIoT OSS projects emerging, also within the Eclipse Foundation. Code cloning is a common practice that can adversely affect software maintenance. In the IIoT OSS domain, developers frequently reuse code and configurations for efficiency, which can lead to code clone proliferation and maintenance challenges. However, the extent and effects of code clones in the IIoT OSS domain remain understudied. This study aims to investigate the prevalence, evolution, and co-modification of code clones within the Eclipse IIoT OSS ecosystem. We collected 90 release versions from 15 projects in the Eclipse IIoT OSS ecosystem, and investigated their code clone situations based on source code and change history using the NiCad tool and our custom analysis module. The investigation covered clone distribution, patterns, evolution trends, co-modified clones, and cross-project clones. 1) Code clones are prevalent in Eclipse IIoT OSS projects, with 16.3% of code lines involved in clones - nearly twice the proportion observed in traditional OSS projects; 2) Most code clones occur between commits, while
Social media clones are AI-powered social delegates of ourselves created using our personal data. As our identities and online personas intertwine, these technologies have the potential to greatly enhance our social media experience. If mismanaged, however, these clones may also pose new risks to our social reputation and online relationships. To set the foundation for a productive and responsible integration, we set out to understand how social media clones will impact our online behavior and interactions. We conducted a series of semi-structured interviews introducing eight speculative clone concepts to 32 social media users through a design workbook. Applying existing work in AI-mediated communication in the context of social media, we found that although clones can offer convenience and comfort, they can also threaten the user's authenticity and increase skepticism within the online community. As a result, users tend to behave more like their clones to mitigate discrepancies and interaction breakdowns. These findings are discussed through the lens of past literature in identity and impression management to highlight challenges in the adoption of social media clones by the gener
A perfect clone in an ordinal election (i.e., an election where the voters rank the candidates in a strict linear order) is a set of candidates that each voter ranks consecutively. We consider different relaxations of this notion: independent or subelection clones are sets of candidates that only some of the voters recognize as a perfect clone, whereas approximate clones are sets of candidates such that every voter ranks their members close to each other, but not necessarily consecutively. We establish the complexity of identifying such imperfect clones, and of partitioning the candidates into families of imperfect clones. We also study the parameterized complexity of these problems with respect to a set of natural parameters such as the number of voters, the size or the number of imperfect clones we are searching for, or their level of imperfection.
Semantic code clone detection is the task of detecting whether two snippets of code implement the same functionality (e.g., Sort Array). Recently, many neural models achieved near-perfect performance on this task. These models seek to make inferences based on their training data. Consequently, they better detect clones similar to those they have seen during training and may struggle to detect those they have not. Developers seeking clones are, of course, interested in both types of clones. We confirm this claim through a literature review, identifying three practical clone detection tasks in which the model's goal is to detect clones of a functionality even if it was trained on clones of different functionalities. In light of this finding, we re-evaluate six state-of-the-art models, including both task-specific models and generative LLMs, on the task of detecting clones of unseen functionality. Our experiments reveal a drop in F1 of up to 48% (average 31%) for task-specific models. LLMs perform on par with task-specific models without explicit training for clone detection, but generalize better to unseen functionalities, where F1 drops up to 5% (average 3%) instead. We propose and
Clones of functions play a foundational role in both universal algebra and theoretical computer science. In this work, we introduce clone merge monoids (cm-monoids), a unifying one-sorted algebraic framework that integrates abstract clones, clone algebras (previously introduced by the first and the third author), and Neumann's aleph0-abstract clones, while modelling the interplay of infinitary operations. Cm-monoids combine a monoid structure with a new algebraic structure called merge algebra, capturing essential properties of infinite sequences of operations.We establish a categorical equivalence between clone algebras and finitely-ranked cm-monoids.This equivalence yields by restriction a three-fold equivalence between abstract clones, finite-dimensional clone algebras, and finite-dimensional, finitely ranked cm-monoids, and is itself obtained by restriction from a categorical equivalence between partial infinitary clone algebras (which generalise clone algebras) and extensional cm-monoids.In a companion work, we develop the theory of modules over cm-monoids, offering a unified approach to polymorphisms and invariant relations,in the hope of providing new insights into algebraic
Background: Code cloning - copying and reusing pieces of source code - is a common phenomenon in software development in practice. There have been several empirical studies on the effects of cloning, but there are contradictory results regarding the connection of cloning and faults. Objective: Our aim is to clarify the relationship between code clones and faults. In particular, we focus on inconsistent (or type-3) clones in this work. Method: We conducted a case study with TWT GmbH where we detected the code clones in three Java systems, set them into relation to information from issue tracking and version control and interviewed three key developers. Results: Of the type-3 clones, 17 % contain faults. Developers modified most of the type-3 clones simultaneously and thereby fixed half of the faults in type-3 clones consistently. Type-2 clones with faults all evolved to fixed type-3 clones. Clone length is only weakly correlated with faultiness. Conclusion: There are indications that the developers in two cases have been aware of clones. It might be a reason for the weak relationship between type-3 clones and faults. Hence, it seems important to keep developers aware of clones, pote
We study the lattice of all Borel clones on $2 = \{0,1\}$: classes of Borel functions $f : 2^n \to 2$, $n \le ω$, which are closed under composition and include all projections. This is a natural extension to countable arities of Post's 1941 classification of all clones of finitary Boolean functions. Every Borel clone restricts to a finitary clone, yielding a "projection" from the lattice of all Borel clones to Post's lattice. It is well-known that each finitary clone of affine mod 2 functions admits a unique extension to a Borel clone. We show that over each finitary clone containing either both $\wedge, \vee$, or the 2-out-of-3 median operation, there lie at least 2 but only finitely many Borel clones. Over the remaining clones in Post's lattice, we give only a partial classification of the Borel extensions, and present some evidence that the full structure may be quite complicated.
This paper critiques digital cloning in academic research, highlighting how it exemplifies AI solutionism. Digital clones, which replicate user data to simulate behavior, are often seen as scalable tools for behavioral insights. However, this framing obscures ethical concerns around consent, agency, and representation. Drawing on feminist theories of agency, the paper argues that digital cloning oversimplifies human complexity and risks perpetuating systemic biases. To address these issues, it proposes decentralized data repositories and dynamic consent models, promoting ethical, context-aware AI practices that challenge the reductionist logic of AI solutionism
Having similar code fragments, also called clones, in software systems can lead to unnecessary comprehension, review and change efforts. Syntactically similar clones can often be encountered in practice. The same is not clear for only functionally similar clones (FSC). We conducted an exploratory survey among developers to investigate whether they encounter functionally similar clones in practice and whether there is a difference in their inclination to remove them to syntactically similar clones. Of the 34 developers answering the survey, 31 have experienced FSC in their professional work, and 24 have experienced problems caused by FSCs. We found no difference in the inclination and reasoning for removing FSCs and syntactically similar clones. FSCs exist in practice and should be investigated to bring clone detectors to the same quality as for syntactically similar clones, because being able to detect them allows developers to manage and potentially remove them.
We investigate the structure of the lattice of clones on an infinite set X. We first observe that ultrafilters naturally induce clones; this yields a simple proof of Rosenberg's theorem: "there are 2^2^kappa many maximal (=precomplete) clones on a set of size kappa." The clones we construct here do not contain all unary functions. We then investigate clones that do contain all unary functions. Using a strong negative partition theorem we show that for many cardinals kappa there are 2^2^kappa many such clones on a set of size kappa. Finally, we show that on a weakly compact cardinal there are exactly 2 maximal clones which contain all unary functions.
The main problem of clone theory is to describe the clone lattice for a given basic set. For a two-element basic set this was resolved by E.L. Post, but for at least three-element basic set the full structure of the lattice is still unknown, and the complete description in general is considered to be hopeless. Therefore, it is studied by its substructures and its approximations. One of the possible directions is to examine $k$-ary parts of the clones and their mutual inclusions. In this paper we study $k$-ary parts of maximal clones, for $k\geq2$, building on the already known results for their unary parts. It turns out that the poset of $k$-ary parts of maximal clones defined by central relations contains long chains.
The structure of the lattice of clones on a finite set has been proven to be very complex. To better understand the top of this lattice, it is important to provide a characterization of submaximal clones in the lattice of clones. It is known that the clones $Pol(θ)$ and $Pol(ρ)$ (where $θ$ is a nontrivial equivalence relation on $E_k = \{0,\dots, k-1\}$, and $ρ$ is among the six types of relations which characterize maximal clones) are maximal clones. In this paper, we provide a classification of relations (of Rosenberg's List) on $E_k$ such that the clone $Pol(θ) \cap Pol(ρ)$ is maximal in $Pol(θ)$.
Deep Learning applications are becoming increasingly popular. Developers of deep learning systems strive to write more efficient code. Deep learning systems are constantly evolving, imposing tighter development timelines and increasing complexity, which may lead to bad design decisions. A copy-paste approach is widely used among deep learning developers because they rely on common frameworks and duplicate similar tasks. Developers often fail to properly propagate changes to all clones fragments during a maintenance activity. To our knowledge, no study has examined code cloning practices in deep learning development. Given the negative impacts of clones on software quality reported in the studies on traditional systems, it is very important to understand the characteristics and potential impacts of code clones on deep learning systems. To this end, we use the NiCad tool to detect clones from 59 Python, 14 C# and 6 Java-based deep learning systems and an equal number of traditional software systems. We then analyze the frequency and distribution of code clones in deep learning and traditional systems. We do further analysis of the distribution of code clones using location-based taxo
Jupyter notebooks has emerged as a standard tool for data science programming. Programs in Jupyter notebooks are different from typical programs as they are constructed by a collection of code snippets interleaved with text and visualisation. This allows interactive exploration and snippets may be executed in different order which may give rise to different results due to side-effects between snippets. Previous studies have shown the presence of considerable code duplication -- code clones -- in sources of traditional programs, in both so-called systems programming languages and so-called scripting languages. In this paper we present the first large-scale study of code cloning in Jupyter notebooks. We analyse a corpus of 2.7 million Jupyter notebooks hosted on GitHJub, representing 37 million individual snippets and 227 million lines of code. We study clones at the level of individual snippets, and study the extent to which snippets are recurring across multiple notebooks. We study both identical clones and approximate clones and conduct a small-scale ocular inspection of the most common clones. We find that code cloning is common in Jupyter notebooks -- more than 70% of all code s
The Independence of Clones (IoC) criterion measures a voting rule's robustness to strategic nomination. Prior literature has established empirically that individuals may still submit costly, distortionary misreports even in strategy-proof (SP) settings, due to failure to recognize the SP property. The intersection of these issues motivates the search for mechanisms that are Obviously Independent of Clones (OIoC): where strategic nomination/exiting of clones obviously has no effect on the outcome. We construct a formal and intuitive definition of a voting rule being OIoC and examine five IoC rules to identify whether they satisfy OIoC.
There are continuum many clones on a three-element set even if they are considered up to \emph{homomorphic equivalence}. The clones we use to prove this fact are clones consisting of \emph{self-dual operations}, i.e., operations that preserve the relation $\{(0,1),(1,2),(2,0)\}$. However, there are only countably many such clones when considered up to equivalence with respect to \emph{minor-preserving maps} instead of clone homomorphisms. We give a full description of the set of clones of self-dual operations, ordered by the existence of minor-preserving maps. Our result can also be phrased as a statement about structures on a three-element set, ordered by primitive positive constructability, because there is a minor-preserving map from the polymorphism clone of a finite structure $\mathfrak A$ to the polymorphism clone of a finite structure $\mathfrak B$ if and only if there is a primitive positive construction of $\mathfrak B$ in $\mathfrak A$.
A Galois connection between clones and relational clones on a fixed finite domain is one of the cornerstones of the so-called algebraic approach to the computational complexity of non-uniform Constraint Satisfaction Problems (CSPs). Cohen et al. established a Galois connection between finitely-generated weighted clones and finitely-generated weighted relational clones [SICOMP'13], and asked whether this connection holds in general. We answer this question in the affirmative for weighted (relational) clones with real weights and show that the complexity of the corresponding valued CSPs is preserved.
We study clones on a four-element set related to the clone $\mathsf{DMA}$ of all term functions of the sub\-directly irreducible four-element De~Morgan algebra $\mathbf{DM_{4}}$. We find generating sets for the clones of all functions preserving the subalgebras of $\mathbf{DM_{4}}$, the auto\-morphisms of~$\mathbf{DM_{4}}$, the truth order and the information order on $\mathbf{DM_{4}}$, as well as clones defined by conjunctions of these conditions. We identify the covers of $\mathsf{DMA}$ in the lattice of four-valued clones and describe the lattice of clones above $\mathsf{DMA}$ which contain the discriminator function. Finally, observing that each clone above $\mathsf{DMA}$ defines an expansion of the four-valued Belnap--Dunn logic, we classify these clones by their metalogical properties, specifically by their position within the Leibniz and Frege hierarchies of abstract algebraic logic.