# Investigation on Self-Admitted Technical Debt in Open-Source Blockchain Projects
## 3 SATD Detection in Blockchain Software Projects
### Choice of Detection Technique and Configuration  
The choice of detection technique is essentially based on considering two main aspects. The first regards the possibility of replicating the process in existing studies, i.e., accessing the method and the training dataset and the second regards having comparable results about the presence of the SATD in open source projects, which we can take as a reference for the results that will be obtained in this study. Among the techniques presented in Section 2.2, we decided to use the technique used in [11], as the authors provide the tool specifications and the training dataset, and discuss the results of the detection of the SATD in a selection of open source projects. We will then use NLP techniques and the Stanford Classifier, which is a Java implementation of a maximum entropy classifier [36]. The Stanford Classifier is a machine learning tool developed by Stanford University designed to perform text classification. The classification algorithm used by this tool is based on the Maximum Entropy (MaxEnt) method [37]. The algorithm uses several binary functions (features) that correspond to specific properties or attributes of the input text that are distinctive enough with respect to the class it belongs to. In other words, features are elementary pieces of evidence that link the fact that we observe a given d (for example, a word) with a category c that we want to predict for a new text. Examples of features are: previous word, current word; presence of suffixes; type of word (adjective, noun, verb, etc. ); presence of capital letters in a specific order; tags that precede or follow the word (in, to) [38]. The learning phase of the algorithm consists of optimizing the weights of the characteristic functions in order to maximize the joint probability of the observed data and the corresponding class labels. This process is usually completed using an optimization algorithm, such as gradient descent or coordinate optimization. The underlying principle of the MaxEnt algorithm is to find the probability distribution model that maximizes entropy (a concept related to the degree of uncertainty in a distribution) subject to specific given constraints. In other words, we try to find the most uniform model possible that is consistent with the observed information. Once trained, the Stanford Classifier can be used to assign class labels to new data based on the learned probability distribution model. The algorithm calculates the probability of each possible class label given the observation and selects the one with the highest probability as the predicted label. To that end, a tool capable of configuring the classifier via property files, training the classifier via the training dataset, and processing the data collected in the CSV files to detect the presence of SATD in the comments has been developed. The tool takes as input the configuration property file for the classifier, the training set, and the CSV file containing the comments extracted from each repository. The classifier, once trained, will be used to assign a class label to each comment in our comments dataset. The tool makes use of the \"ColumnDataClassifier\" belonging to the library \"edu.stanford.nlp.classify\", which allows the processing of labeled structured data organized into columns, as in the case of our csv file-based dataset. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Project** & **Total** & **Removed** & **Effective** & **Filtering** \\  & **Comments** & **Comments** & **Comments** & **Percentage** \\ \hline Bitcoin & 18,858 & 971 & 17,887 & 5.14\% \\ Ethereum & 43,655 & 1092 & 42,563 & 2.50\% \\ Binance & 1294 & 11 & 1283 & 0.85\% \\ USD coin & 1575 & 42 & 1533 & 2.67\% \\ Solana & 27,534 & 14 & 27,520 & 0.05\% \\ XRP & 14,224 & 625 & 13,599 & 4.39\% \\ Avalanche & 13,145 & 1265 & 11,880 & 9.62\% \\ Cardano & 24,325 & 213 & 24,112 & 0.87\% \\ Terra & 1575 & 7 & 1568 & 0.44\% \\ Polkadot & 56,007 & 6419 & 49,588 & 11.46\% \\ \hline \hline \end{tabular}
\end{table}