<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Publishing DTD v1.1 20151215//EN" "http://jats.nlm.nih.gov/publishing/1.1/JATS-journalpublishing1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" article-type="research-article" dtd-version="1.1">
<front>
<journal-meta>
<journal-id journal-id-type="pmc">CMES</journal-id>
<journal-id journal-id-type="nlm-ta">CMES</journal-id>
<journal-id journal-id-type="publisher-id">CMES</journal-id>
<journal-title-group>
<journal-title>Computer Modeling in Engineering &#x0026; Sciences</journal-title>
</journal-title-group>
<issn pub-type="epub">1526-1506</issn>
<issn pub-type="ppub">1526-1492</issn>
<publisher>
<publisher-name>Tech Science Press</publisher-name>
<publisher-loc>USA</publisher-loc>
</publisher>
</journal-meta>
<article-meta>
<article-id pub-id-type="publisher-id">24018</article-id>
<article-id pub-id-type="doi">10.32604/cmes.2023.024018</article-id>
<article-categories>
<subj-group subj-group-type="heading">
<subject>Article</subject>
</subj-group>
</article-categories>
<title-group>
<article-title>Implementation of Rapid Code Transformation Process Using Deep Learning Approaches</article-title>
<alt-title alt-title-type="left-running-head">Implementation of Rapid Code Transformation Process using Deep Learning Approaches</alt-title>
<alt-title alt-title-type="right-running-head">Implementation of Rapid Code Transformation Process using Deep Learning Approaches</alt-title>
</title-group>
<contrib-group content-type="authors">
<contrib id="author-1" contrib-type="author">
<name name-style="western"><surname>Rong Chang</surname><given-names>Bao</given-names>
</name><xref ref-type="aff" rid="aff-1">1</xref></contrib>
<contrib id="author-2" contrib-type="author" corresp="yes">
<name name-style="western"><surname>Tsai</surname><given-names>Hsiu-Fen</given-names>
</name><xref ref-type="aff" rid="aff-2">2</xref><email>sftsai@kmu.edu.tw</email></contrib>
<contrib id="author-3" contrib-type="author">
<name name-style="western"><surname>Chou</surname><given-names>Han-Lin</given-names>
</name><xref ref-type="aff" rid="aff-1">1</xref></contrib>
<aff id="aff-1"><label>1</label><institution>Department of Computer Science and Information Engineering, National University of Kaohsiung</institution>, <addr-line>Kaohsiung, 811</addr-line>, <country>Taiwan</country></aff>
<aff id="aff-2"><label>2</label><institution>Department of Fragrance and Cosmetic Science, Kaohsiung Medical University</institution>, <addr-line>Kaohsiung, 811</addr-line>, <country>Taiwan</country></aff>
</contrib-group>
<author-notes>
<corresp id="cor1"><label>&#x002A;</label>Corresponding Author: Hsiu-Fen Tsai. Email: <email>sftsai@kmu.edu.tw</email></corresp>
</author-notes>
<pub-date publication-format="print" date-type="pub" iso-8601-date="2023-01-04">
<day>04</day>
<month>01</month>
<year>2023</year>
</pub-date>
<volume>136</volume>
<issue>1</issue>
<fpage>107</fpage>
<lpage>134</lpage>
<history>
<date date-type="received">
<day>21</day>
<month>5</month>
<year>2022</year>
</date>
<date date-type="accepted">
<day>05</day>
<month>9</month>
<year>2022</year>
</date>
</history>
<permissions>
<copyright-statement>&#x00A9; 2023 Rong Chang, Tsai and Chou</copyright-statement>
<copyright-year>2023</copyright-year>
<copyright-holder>Rong Chang, Tsai and Chou</copyright-holder>
<license xlink:href="https://creativecommons.org/licenses/by/4.0/">
<license-p>This work is licensed under a <ext-link ext-link-type="uri" xlink:type="simple" xlink:href="https://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 International License</ext-link>, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.</license-p>
</license>
</permissions>
<self-uri content-type="pdf" xlink:href="TSP_CMES_24018.pdf"></self-uri>
<abstract>
<p>Our previous work has introduced the newly generated program using the code transformation model GPT-2, verifying the generated programming codes through simhash (SH) and longest common subsequence (LCS) algorithms. However, the entire code transformation process has encountered a time-consuming problem. Therefore, the objective of this study is to speed up the code transformation process significantly. This paper has proposed deep learning approaches for modifying SH using a variational simhash (VSH) algorithm and replacing LCS with a piecewise longest common subsequence (PLCS) algorithm to faster the verification process in the test phase. Besides the code transformation model GPT-2, this study has also introduced Microsoft MASS and Facebook BART for a comparative analysis of their performance. Meanwhile, the explainable AI technique using local interpretable model-agnostic explanations (LIME) can also interpret the decision-making of AI models. The experimental results show that VSH can reduce the number of qualified programs by 22.11%, and PLCS can reduce the execution time of selected pocket programs by 32.39%. As a result, the proposed approaches can significantly speed up the entire code transformation process by 1.38 times on average compared with our previous work.</p>
</abstract>
<kwd-group kwd-group-type="author">
<kwd>Code transformation model</kwd>
<kwd>variational simhash</kwd>
<kwd>piecewise longest common subsequence</kwd>
<kwd>explainable AI</kwd>
<kwd>LIME</kwd>
</kwd-group>
</article-meta>
</front>
<body>
<sec id="s1">
<label>1</label>
<title>Introduction</title>
<p>Artificial intelligence (AI) [<xref ref-type="bibr" rid="ref-1">1</xref>] has returned to mainstream technology and developed deep learning in recent years. With the development of deep learning, the Google Brain team has developed Tensorflow, which can use for machine learning of various perception and language understanding tasks and data prediction, image feature classification, and text generation. Deep learning has introduced generation-based models, including long short-term memory (LSTM) [<xref ref-type="bibr" rid="ref-2">2</xref>] and generative adversarial network (GAN) [<xref ref-type="bibr" rid="ref-3">3</xref>]. Although LSTM can generate text, it only predicts the words that may appear next and cannot generate similar articles. In contrast, GAN generates pictures better than text. To allow machines to imitate humans more accurately, the trend of AI applications is gradually developing toward human language-related issues.</p>
<p>As the technology of AI becomes more and more mature, the related natural language processing has also developed rapidly shortly. In terms of language processing, the English natural language sentence segmentation model, natural language toolkit (NLTK) [<xref ref-type="bibr" rid="ref-4">4</xref>] based on Python programming, has been developed for years. A well-trained NLTK can segment English text into sentences or words and perform text processing such as part-of-speech tags. For more advanced text conversion models, the non-profit organization OpenAI LP has developed GPT-2 [<xref ref-type="bibr" rid="ref-5">5</xref>], the second generation of generative pre-training tool and belongs to the unsupervised learning transformer model. It is mainly engaged in English imitation creation in artificial intelligence. Besides text, people can also use it to generate fake news [<xref ref-type="bibr" rid="ref-6">6</xref>]. In addition to GPT-2, Microsoft has developed MASS and Facebook AI BART. They can also do a similar job like GPT-2 very well. Is it possible to think of a similar manner to use them to generate the code of a designated programming language, for example, the code of Python programming? The previous paper [<xref ref-type="bibr" rid="ref-7">7</xref>] introduced the newly generated program using the code transformation model GPT-2, where users can verify the generated programming codes through simhash (SH) and longest common subsequence (LCS) algorithms. However, the code transformation process has encountered the problem of being time-consuming in the previous work.</p>
<p>Therefore, the objective of this study is to propose the deep learning approaches for modifying SH and LCS algorithms where a modified SH (called variational simhash) can reassign the appropriate weighted value of keywords, and a modified LCS (called piecewise longest common subsequence) can break a long string into a few smaller pieces of string. In such a way, the proposed approaches can significantly reduce the algorithm execution time to speed up the entire process of code transformation, which is our main contribution to this study. Meanwhile, this study also introduces three code transformation models, GPT-2, MASS, and BART, and will deliver the performance evaluation among them and check which one can achieve better results.</p>
<p>The following paragraphs of this paper are arranged as follows. In <xref ref-type="sec" rid="s2">Session 2</xref>, related work will be described in text transform models, content check, predetermined generative programs, and explainable AI techniques. The way to system implementation is given in <xref ref-type="sec" rid="s3">Session 3</xref>. The experimental results and discussion will be obtained in <xref ref-type="sec" rid="s4">Session 4</xref>. Finally, we drew a brief conclusion in <xref ref-type="sec" rid="s5">Session 5</xref>.</p>
</sec>
<sec id="s2">
<label>2</label>
<title>Related Work</title>
<sec id="s2_1">
<label>2.1</label>
<title>Text Transform Model</title>
<p>The traditional text transformer model contains an Encoder and Decoder stack, as shown in <xref ref-type="fig" rid="fig-1">Fig. 1</xref>. GPT-2 [<xref ref-type="bibr" rid="ref-5">5</xref>] is an unsupervised transformer language generation model released by OpenAI in 2019. GPT-2 is composed of a Decoder stack, as shown in <xref ref-type="fig" rid="fig-2">Fig. 2</xref>. This study has received much programming information related to transformer-based models like GPT-2 from the website Github for training GPT-2 as a code transformation model.</p>
<fig id="fig-1"><label>Figure 1</label><caption><title>Traditional text transformer model</title></caption><graphic mimetype="image" mime-subtype="png" xlink:href="CMES_24018-fig-1.png"/></fig>
<fig id="fig-2"><label>Figure 2</label><caption><title>GPT-2 architecture</title></caption><graphic mimetype="image" mime-subtype="png" xlink:href="CMES_24018-fig-2.png"/></fig>
<p>MASS [<xref ref-type="bibr" rid="ref-8">8</xref>] is a transformer-based model that connects the Encoder and Decoder by attention. A continuous segment of length k randomly shields the input of the Encoder of MASS compared to the basic transformer architecture. After that, it uses a Decoder to predict the masked segment, as shown in <xref ref-type="fig" rid="fig-3">Fig. 3</xref>. BART [<xref ref-type="bibr" rid="ref-9">9</xref>] is intrinsically the architecture of a standard transformer model. Like MASS, it masks the Encoder&#x2019;s input, but the difference is that the masked words can be a few discontinuous segments, as shown in <xref ref-type="fig" rid="fig-4">Fig. 4</xref>. BART replaces the excitation function ReLU with GeLUs, and Decoder has not changed. The loss function of BART is the cross-entropy between the output of the Decoder and the original text. BART uses this cross-entropy loss to optimize its transform model and improve accuracy.</p>

<fig id="fig-3">
<label>Figure 3</label>
<caption>
<title>MASS architecture</title>
</caption>
<graphic mimetype="image" mime-subtype="png" xlink:href="CMES_24018-fig-3.png"/>
</fig>
<fig id="fig-4">
<label>Figure 4</label>
<caption>
<title>BART architecture</title>
</caption>
<graphic mimetype="image" mime-subtype="png" xlink:href="CMES_24018-fig-4.png"/>
</fig>
</sec>
<sec id="s2_2">
<label>2.2</label>
<title>Binary Code Comparison</title>
<p>Simhash [<xref ref-type="bibr" rid="ref-10">10</xref>] is a kind of locality-sensitive hash, and its main idea is to reduce dimensionality, as shown in <xref ref-type="fig" rid="fig-5">Fig. 5</xref>. It maps the high-dimensional feature vector to the low-dimensional feature vector and compares the two vectors with the similarity of the article through the Hamming distance [<xref ref-type="bibr" rid="ref-11">11</xref>]. The smaller the Hamming distance, the higher the similarity.</p>
<fig id="fig-5">
<label>Figure 5</label>
<caption>
<title>SimHash process flow</title>
</caption>
<graphic mimetype="image" mime-subtype="png" xlink:href="CMES_24018-fig-5.png"/>
</fig>
<p>After the text is segmented, the Hash calculation obtains the feature vector. Adding weight to the feature vector is weighting and accumulating all the weighted vectors. The cumulative result is more significant than zero as one and less than zero as zero, and users can obtain the fingerprint, as shown in <xref ref-type="fig" rid="fig-6">Fig. 6</xref>. Finally, we calculate the two fingerprints [<xref ref-type="bibr" rid="ref-12">12</xref>] for Hamming distance.</p>
<fig id="fig-6">
<label>Figure 6</label>
<caption>
<title>Calculate fingerprint</title>
</caption>
<graphic mimetype="image" mime-subtype="png" xlink:href="CMES_24018-fig-6.png"/>
</fig>
<p>Generally speaking, the simhash algorithm uses the formula of tf-idf to estimate the corresponding weight value for each keyword. In <xref ref-type="disp-formula" rid="eqn-1">Eq. (1)</xref>, <inline-formula id="ieqn-1"><mml:math id="mml-ieqn-1"><mml:mi>i</mml:mi><mml:mi>d</mml:mi><mml:msub><mml:mi>f</mml:mi><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> is referred to as inverse document frequency, which refers to a measure of the universal importance of a word. Furthermore, <inline-formula id="ieqn-2"><mml:math id="mml-ieqn-2"><mml:msub><mml:mi>f</mml:mi><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> represents the number of files in which the word <italic>i</italic> appears in the text <italic>j</italic>, and <inline-formula id="ieqn-3"><mml:math id="mml-ieqn-3"><mml:mi>D</mml:mi></mml:math></inline-formula> is the total number of all texts. In <xref ref-type="disp-formula" rid="eqn-2">Eq. (2)</xref>, <inline-formula id="ieqn-4"><mml:math id="mml-ieqn-4"><mml:mi>t</mml:mi><mml:msub><mml:mi>f</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>,</mml:mo><mml:mi>j</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> represents term frequency meaning the average frequency of the word <italic>i</italic> in the text <italic>j</italic>, and <inline-formula id="ieqn-5"><mml:math id="mml-ieqn-5"><mml:msub><mml:mi>f</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>,</mml:mo><mml:mi>j</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> stands for the frequency of the word <italic>i</italic> appearing in the text <italic>j</italic>. <inline-formula id="ieqn-6"><mml:math id="mml-ieqn-6"><mml:msub><mml:mo movablelimits="false">&#x2211;</mml:mo><mml:mrow><mml:msup><mml:mi>i</mml:mi><mml:mi mathvariant="normal">&#x2032;</mml:mi></mml:msup><mml:mo>&#x2208;</mml:mo><mml:mi>j</mml:mi></mml:mrow></mml:msub><mml:msup><mml:mi>i</mml:mi><mml:mi mathvariant="normal">&#x2032;</mml:mi></mml:msup><mml:mo>,</mml:mo><mml:mi>j</mml:mi></mml:math></inline-formula> is the sum of the frequency of each word appearing in the text <italic>j</italic>, which is the length of the text. In <xref ref-type="disp-formula" rid="eqn-3">Eq. (3)</xref>, <inline-formula id="ieqn-7"><mml:math id="mml-ieqn-7"><mml:mi>t</mml:mi><mml:mi>f</mml:mi><mml:mi>i</mml:mi><mml:mi>d</mml:mi><mml:msub><mml:mi>f</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>,</mml:mo><mml:mi>j</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> is the estimated weight value of the specific word, <inline-formula id="ieqn-8"><mml:math id="mml-ieqn-8"><mml:mi>t</mml:mi><mml:msub><mml:mi>f</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>,</mml:mo><mml:mi>j</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> is the term frequency meaning the frequency of a word given in the file, and <inline-formula id="ieqn-9"><mml:math id="mml-ieqn-9"><mml:mi>i</mml:mi><mml:mi>d</mml:mi><mml:msub><mml:mi>f</mml:mi><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> is the inverse document frequency, a measure of the universal importance of a word given in the file.</p>
<p><disp-formula id="eqn-1"><label>(1)</label><mml:math id="mml-eqn-1" display="block"><mml:mi>i</mml:mi><mml:mi>d</mml:mi><mml:msub><mml:mi>f</mml:mi><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:mi>log</mml:mi><mml:mo>&#x2061;</mml:mo><mml:mfrac><mml:mi>D</mml:mi><mml:msub><mml:mi>f</mml:mi><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:mfrac><mml:mo>,</mml:mo><mml:msub><mml:mi>f</mml:mi><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:mrow><mml:mo stretchy="false">|</mml:mo></mml:mrow><mml:mo fence="false" stretchy="false">{</mml:mo><mml:mi>j</mml:mi><mml:mo>&#x2208;</mml:mo><mml:mi>D</mml:mi><mml:mo>,</mml:mo><mml:mi>i</mml:mi><mml:mo>&#x2208;</mml:mo><mml:mi>j</mml:mi><mml:mo fence="false" stretchy="false">}</mml:mo><mml:mrow><mml:mo stretchy="false">|</mml:mo></mml:mrow></mml:math></disp-formula></p>
<p><disp-formula id="eqn-2"><label>(2)</label><mml:math id="mml-eqn-2" display="block"><mml:mi>t</mml:mi><mml:msub><mml:mi>f</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>,</mml:mo><mml:mi>j</mml:mi></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mfrac><mml:msub><mml:mi>f</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>,</mml:mo><mml:mi>j</mml:mi></mml:mrow></mml:msub><mml:mrow><mml:msub><mml:mo movablelimits="false">&#x2211;</mml:mo><mml:mrow><mml:msup><mml:mi>i</mml:mi><mml:mi mathvariant="normal">&#x2032;</mml:mi></mml:msup><mml:mo>&#x2208;</mml:mo><mml:mi>j</mml:mi></mml:mrow></mml:msub><mml:msup><mml:mi>i</mml:mi><mml:mi mathvariant="normal">&#x2032;</mml:mi></mml:msup><mml:mo>,</mml:mo><mml:mi>j</mml:mi></mml:mrow></mml:mfrac></mml:mstyle></mml:math></disp-formula></p>
<p><disp-formula id="eqn-3"><label>(3)</label><mml:math id="mml-eqn-3" display="block"><mml:mi>t</mml:mi><mml:mi>f</mml:mi><mml:mi>i</mml:mi><mml:mi>d</mml:mi><mml:msub><mml:mi>f</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>,</mml:mo><mml:mi>j</mml:mi></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:mi>t</mml:mi><mml:msub><mml:mi>f</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>,</mml:mo><mml:mi>j</mml:mi></mml:mrow></mml:msub><mml:mo>&#x2217;</mml:mo><mml:mi>i</mml:mi><mml:mi>d</mml:mi><mml:msub><mml:mi>f</mml:mi><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:math></disp-formula></p>
</sec>
<sec id="s2_3">
<label>2.3</label>
<title>Multimedia Content Check</title>
<p>Although there are many methods to compare different forms of media information, this study uses LCS [<xref ref-type="bibr" rid="ref-13">13</xref>] as a single effective method to detect the consistency of multimedia information, which is suitable for text, pictures, sounds, and movies. LCS finds the longest common subsequence in the sequence set. Unlike searching for the longest common substring, the position of the subsequence in the original sequence does not need to be continuous, as shown in <xref ref-type="fig" rid="fig-7">Fig. 7</xref>. The yellow part in <xref ref-type="fig" rid="fig-7">Fig. 7</xref> indicates the completion of the comparison. In this study, we convert the execution result of each qualified program and the execution result of the corresponding sample program into ASCII code or binary code and use LCS to check the conformity. To check whether the execution result of the generated program is consistent with the execution result of the sample program, please confirm that the generated program is available.</p>
<fig id="fig-7">
<label>Figure 7</label>
<caption>
<title>Longest common subsequence (LCS)</title>
</caption>
<graphic mimetype="image" mime-subtype="png" xlink:href="CMES_24018-fig-7.png"/>
</fig>
</sec>
<sec id="s2_4">
<label>2.4</label>
<title>Predetermined Generative Programs</title>
<p>We do not know the number of the code-transformed programs produced from GPT-2, MASS, and BART is appropriate and needed. Therefore, this study theoretically introduces a statistical estimation of the number of predetermined code-transformed programs, and hereafter the preliminary programs denote the code-transformed programs. This estimation implies how many preliminary programs are needed to ensure that the code transformation process can find the best-performance one. Therefore, users can first calculate the quantity of the preliminary programs generated by a sample program with a pass ratio exceeding 90% and obtain the ratio <inline-formula id="ieqn-10"><mml:math id="mml-ieqn-10"><mml:msub><mml:mi>q</mml:mi><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula>, as shown in <xref ref-type="disp-formula" rid="eqn-4">Eq. (4)</xref>. In <xref ref-type="disp-formula" rid="eqn-4">Eq. (4)</xref>, <inline-formula id="ieqn-11"><mml:math id="mml-ieqn-11"><mml:msub><mml:mi>N</mml:mi><mml:mrow><mml:mi>s</mml:mi><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> represents the total number of primary programs, and <inline-formula id="ieqn-12"><mml:math id="mml-ieqn-12"><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>s</mml:mi><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> stands for the number of primary programs whose pass ratio exceeds 90%. After the previous calculation, <xref ref-type="disp-formula" rid="eqn-5">Eq. (5)</xref> gets the average ratio <inline-formula id="ieqn-13"><mml:math id="mml-ieqn-13"><mml:mi>q</mml:mi></mml:math></inline-formula>, where <inline-formula id="ieqn-14"><mml:math id="mml-ieqn-14"><mml:mi>t</mml:mi></mml:math></inline-formula> is the total number of sample programs. Then users can find out the number of misjudgments in, <inline-formula id="ieqn-15"><mml:math id="mml-ieqn-15"><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>s</mml:mi><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> and calculate the ratio of misjudgments <inline-formula id="ieqn-16"><mml:math id="mml-ieqn-16"><mml:msub><mml:mi>q</mml:mi><mml:mrow><mml:mi>m</mml:mi><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula>, as shown in <xref ref-type="disp-formula" rid="eqn-6">Eq. (6)</xref>. In <xref ref-type="disp-formula" rid="eqn-6">Eq. (6)</xref>, <inline-formula id="ieqn-17"><mml:math id="mml-ieqn-17"><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>m</mml:mi><mml:mi>s</mml:mi><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> represents the number of misjudgments among the number of the preliminary programs with a pass ratio of more than 90%. Then <xref ref-type="disp-formula" rid="eqn-7">Eq. (7)</xref> can obtain the average percentage of misjudgments <inline-formula id="ieqn-18"><mml:math id="mml-ieqn-18"><mml:msub><mml:mi>q</mml:mi><mml:mrow><mml:mi>m</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula>.</p>
<p><disp-formula id="eqn-4"><label>(4)</label><mml:math id="mml-eqn-4" display="block"><mml:msub><mml:mi>q</mml:mi><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mfrac><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>s</mml:mi><mml:mi>i</mml:mi></mml:mrow></mml:msub><mml:msub><mml:mi>N</mml:mi><mml:mrow><mml:mi>s</mml:mi><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:mfrac></mml:mstyle><mml:mo>,</mml:mo><mml:mi>i</mml:mi><mml:mo>=</mml:mo><mml:mn>1</mml:mn><mml:mo>,</mml:mo><mml:mn>2</mml:mn><mml:mo>,</mml:mo><mml:mo>&#x2026;</mml:mo><mml:mo>,</mml:mo><mml:mi>t</mml:mi></mml:math></disp-formula></p>
<p><disp-formula id="eqn-5"><label>(5)</label><mml:math id="mml-eqn-5" display="block"><mml:mi>q</mml:mi><mml:mo>=</mml:mo><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mfrac><mml:mrow><mml:msubsup><mml:mo movablelimits="false">&#x2211;</mml:mo><mml:mrow><mml:mi>i</mml:mi><mml:mo>=</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mrow><mml:mi>t</mml:mi></mml:mrow></mml:msubsup><mml:msub><mml:mi>q</mml:mi><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mi>t</mml:mi></mml:mfrac></mml:mstyle></mml:math></disp-formula></p>
<p><disp-formula id="eqn-6"><label>(6)</label><mml:math id="mml-eqn-6" display="block"><mml:msub><mml:mi>q</mml:mi><mml:mrow><mml:mi>m</mml:mi><mml:mi>i</mml:mi></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mfrac><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>m</mml:mi><mml:mi>s</mml:mi><mml:mi>i</mml:mi></mml:mrow></mml:msub><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>s</mml:mi><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:mfrac></mml:mstyle><mml:mo>,</mml:mo><mml:mi>i</mml:mi><mml:mo>=</mml:mo><mml:mn>1</mml:mn><mml:mo>,</mml:mo><mml:mn>2</mml:mn><mml:mo>,</mml:mo><mml:mo>&#x2026;</mml:mo><mml:mo>,</mml:mo><mml:mi>t</mml:mi></mml:math></disp-formula></p>
<p><disp-formula id="eqn-7"><label>(7)</label><mml:math id="mml-eqn-7" display="block"><mml:msub><mml:mi>q</mml:mi><mml:mrow><mml:mi>m</mml:mi></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:mfrac><mml:mrow><mml:msubsup><mml:mo movablelimits="false">&#x2211;</mml:mo><mml:mrow><mml:mi>i</mml:mi><mml:mo>=</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mrow><mml:mi>t</mml:mi></mml:mrow></mml:msubsup><mml:msub><mml:mi>q</mml:mi><mml:mrow><mml:mi>m</mml:mi><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mi>t</mml:mi></mml:mfrac></mml:math></disp-formula></p>
<p>After that, users can calculate the number of the preliminary programs whose pass ratio is less than 90% to get the ratio <inline-formula id="ieqn-19"><mml:math id="mml-ieqn-19"><mml:msub><mml:mi>u</mml:mi><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula>, as shown in <xref ref-type="disp-formula" rid="eqn-8">Eq. (8)</xref>. In <xref ref-type="disp-formula" rid="eqn-8">Eq. (8)</xref>, <inline-formula id="ieqn-20"><mml:math id="mml-ieqn-20"><mml:msub><mml:mi>y</mml:mi><mml:mrow><mml:mi>s</mml:mi><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> represents the number of the preliminary programs whose pass ratio is less than 90%. Next, <xref ref-type="disp-formula" rid="eqn-9">Eq. (9)</xref> finds out the average ratio <inline-formula id="ieqn-21"><mml:math id="mml-ieqn-21"><mml:mi>u</mml:mi></mml:math></inline-formula>. Then users can find out the number of misjudgments <inline-formula id="ieqn-22"><mml:math id="mml-ieqn-22"><mml:msub><mml:mi>y</mml:mi><mml:mrow><mml:mi>s</mml:mi><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> and then calculate the proportion of misjudgments <inline-formula id="ieqn-23"><mml:math id="mml-ieqn-23"><mml:msub><mml:mi>u</mml:mi><mml:mrow><mml:mi>m</mml:mi><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula>, as shown in <xref ref-type="disp-formula" rid="eqn-10">Eq. (10)</xref>. In <xref ref-type="disp-formula" rid="eqn-10">Eq. (10)</xref>, <inline-formula id="ieqn-24"><mml:math id="mml-ieqn-24"><mml:msub><mml:mi>y</mml:mi><mml:mrow><mml:mi>m</mml:mi><mml:mi>s</mml:mi><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> represents the number of misjudgments. The preliminary programs have many misjudgments with less than a 90% pass ratio. Finally, <xref ref-type="disp-formula" rid="eqn-11">Eq. (11)</xref> gives the average percentage of misjudgments <inline-formula id="ieqn-25"><mml:math id="mml-ieqn-25"><mml:msub><mml:mi>u</mml:mi><mml:mrow><mml:mi>m</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula>.</p>
<p><disp-formula id="eqn-8"><label>(8)</label><mml:math id="mml-eqn-8" display="block"><mml:msub><mml:mi>u</mml:mi><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mfrac><mml:msub><mml:mi>y</mml:mi><mml:mrow><mml:mi>s</mml:mi><mml:mi>i</mml:mi></mml:mrow></mml:msub><mml:msub><mml:mi>N</mml:mi><mml:mrow><mml:mi>s</mml:mi><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:mfrac></mml:mstyle><mml:mo>,</mml:mo><mml:mi>i</mml:mi><mml:mo>=</mml:mo><mml:mn>1</mml:mn><mml:mo>,</mml:mo><mml:mn>2</mml:mn><mml:mo>,</mml:mo><mml:mo>&#x2026;</mml:mo><mml:mo>,</mml:mo><mml:mi>t</mml:mi></mml:math></disp-formula></p>
<p><disp-formula id="eqn-9"><label>(9)</label><mml:math id="mml-eqn-9" display="block"><mml:mi>u</mml:mi><mml:mo>=</mml:mo><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mfrac><mml:mrow><mml:msubsup><mml:mo movablelimits="false">&#x2211;</mml:mo><mml:mrow><mml:mi>i</mml:mi><mml:mo>=</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mrow><mml:mi>t</mml:mi></mml:mrow></mml:msubsup><mml:msub><mml:mi>u</mml:mi><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mi>t</mml:mi></mml:mfrac></mml:mstyle></mml:math></disp-formula></p>
<p><disp-formula id="eqn-10"><label>(10)</label><mml:math id="mml-eqn-10" display="block"><mml:msub><mml:mi>u</mml:mi><mml:mrow><mml:mi>m</mml:mi><mml:mi>i</mml:mi></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mfrac><mml:msub><mml:mi>y</mml:mi><mml:mrow><mml:mi>m</mml:mi><mml:mi>s</mml:mi><mml:mi>i</mml:mi></mml:mrow></mml:msub><mml:msub><mml:mi>y</mml:mi><mml:mrow><mml:mi>s</mml:mi><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:mfrac></mml:mstyle><mml:mo>,</mml:mo><mml:mi>i</mml:mi><mml:mo>=</mml:mo><mml:mn>1</mml:mn><mml:mo>,</mml:mo><mml:mn>2</mml:mn><mml:mo>,</mml:mo><mml:mo>&#x2026;</mml:mo><mml:mo>,</mml:mo><mml:mi>t</mml:mi></mml:math></disp-formula></p>
<p><disp-formula id="eqn-11"><label>(11)</label><mml:math id="mml-eqn-11" display="block"><mml:msub><mml:mi>u</mml:mi><mml:mrow><mml:mi>m</mml:mi></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:mfrac><mml:mrow><mml:msubsup><mml:mo movablelimits="false">&#x2211;</mml:mo><mml:mrow><mml:mi>i</mml:mi><mml:mo>=</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mrow><mml:mi>t</mml:mi></mml:mrow></mml:msubsup><mml:msub><mml:mi>u</mml:mi><mml:mrow><mml:mi>m</mml:mi><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mi>t</mml:mi></mml:mfrac></mml:math></disp-formula></p>
<p><xref ref-type="disp-formula" rid="eqn-12">Eq. (12)</xref> counts the total of preliminary programs generated by all the sample programs to get <inline-formula id="ieqn-26"><mml:math id="mml-ieqn-26"><mml:msub><mml:mi>N</mml:mi><mml:mrow><mml:mi>g</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula>. According to the statistics such as <inline-formula id="ieqn-27"><mml:math id="mml-ieqn-27"><mml:msub><mml:mi>N</mml:mi><mml:mrow><mml:mi>g</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula>, <inline-formula id="ieqn-28"><mml:math id="mml-ieqn-28"><mml:mi>q</mml:mi></mml:math></inline-formula>, <inline-formula id="ieqn-29"><mml:math id="mml-ieqn-29"><mml:msub><mml:mi>q</mml:mi><mml:mrow><mml:mi>m</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula>, <inline-formula id="ieqn-30"><mml:math id="mml-ieqn-30"><mml:mi>u</mml:mi></mml:math></inline-formula>, and <inline-formula id="ieqn-31"><mml:math id="mml-ieqn-31"><mml:msub><mml:mi>u</mml:mi><mml:mrow><mml:mi>m</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula>, <xref ref-type="disp-formula" rid="eqn-13">Eq. (13)</xref> obtains the average pass ratio of over a 90% probability <inline-formula id="ieqn-32"><mml:math id="mml-ieqn-32"><mml:msub><mml:mi>P</mml:mi><mml:mrow><mml:mi>g</mml:mi><mml:mi>q</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula>. Assuming that a pass ratio of <inline-formula id="ieqn-33"><mml:math id="mml-ieqn-33"><mml:mi>j</mml:mi></mml:math></inline-formula> programs exceeds 90%, <inline-formula id="ieqn-34"><mml:math id="mml-ieqn-34"><mml:mi>P</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mi>K</mml:mi><mml:mrow><mml:mi>j</mml:mi></mml:mrow></mml:msub><mml:mrow><mml:mo stretchy="false">|</mml:mo></mml:mrow><mml:msub><mml:mi>P</mml:mi><mml:mrow><mml:mi>g</mml:mi><mml:mi>q</mml:mi></mml:mrow></mml:msub><mml:mo stretchy="false">)</mml:mo></mml:math></inline-formula> means that for these j programs, the probability that a pass ratio of the code similarity check exceeds 90% is valid, such as <xref ref-type="disp-formula" rid="eqn-14">Eq. (14)</xref>. In <xref ref-type="disp-formula" rid="eqn-14">Eq. (14)</xref>, <inline-formula id="ieqn-35"><mml:math id="mml-ieqn-35"><mml:msub><mml:mi>K</mml:mi><mml:mrow><mml:mi>j</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> represents <inline-formula id="ieqn-36"><mml:math id="mml-ieqn-36"><mml:mi>j</mml:mi></mml:math></inline-formula> programs with a pass ratio of code similarity check of 90% or more among the generated programs. According to the above statistics, the probability of the code similarity check with the pass ratio of <inline-formula id="ieqn-37"><mml:math id="mml-ieqn-37"><mml:mi>j</mml:mi></mml:math></inline-formula> programs exceeding 90% is <inline-formula id="ieqn-38"><mml:math id="mml-ieqn-38"><mml:mi>P</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mi>K</mml:mi><mml:mrow><mml:mi>j</mml:mi></mml:mrow></mml:msub><mml:mrow><mml:mo stretchy="false">|</mml:mo></mml:mrow><mml:msub><mml:mi>P</mml:mi><mml:mrow><mml:mi>g</mml:mi><mml:mi>q</mml:mi></mml:mrow></mml:msub><mml:mo stretchy="false">)</mml:mo></mml:math></inline-formula>. Therefore, <xref ref-type="disp-formula" rid="eqn-15">Eq. (15)</xref> can infer the minimum number of preliminary programs produced from the code transformation process to ensure that at least <inline-formula id="ieqn-39"><mml:math id="mml-ieqn-39"><mml:mi>j</mml:mi></mml:math></inline-formula> programs have a code similarity check with a pass ratio of more than 90%, where <italic>N</italic> is the total number of preliminary programs to be generated.</p>
<p><disp-formula id="eqn-12"><label>(12)</label><mml:math id="mml-eqn-12" display="block"><mml:msub><mml:mi>N</mml:mi><mml:mrow><mml:mi>g</mml:mi></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:msubsup><mml:mo movablelimits="false">&#x2211;</mml:mo><mml:mrow><mml:mi>i</mml:mi><mml:mo>=</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mrow><mml:mi>t</mml:mi></mml:mrow></mml:msubsup><mml:msub><mml:mi>N</mml:mi><mml:mrow><mml:mi>s</mml:mi><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:math></disp-formula></p>
<p><disp-formula id="eqn-13"><label>(13)</label><mml:math id="mml-eqn-13" display="block"><mml:msub><mml:mi>P</mml:mi><mml:mrow><mml:mi>g</mml:mi><mml:mi>q</mml:mi></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mfrac><mml:mrow><mml:msub><mml:mi>N</mml:mi><mml:mrow><mml:mi>g</mml:mi></mml:mrow></mml:msub><mml:mo>&#x22C5;</mml:mo><mml:mi>q</mml:mi><mml:mo>&#x22C5;</mml:mo><mml:mrow><mml:mo>(</mml:mo><mml:mn>1</mml:mn><mml:mo>&#x2212;</mml:mo><mml:msub><mml:mi>q</mml:mi><mml:mrow><mml:mi>m</mml:mi></mml:mrow></mml:msub><mml:mo>)</mml:mo></mml:mrow><mml:mo>+</mml:mo><mml:msub><mml:mi>N</mml:mi><mml:mrow><mml:mi>g</mml:mi></mml:mrow></mml:msub><mml:mo>&#x22C5;</mml:mo><mml:mi>u</mml:mi><mml:mo>&#x22C5;</mml:mo><mml:msub><mml:mi>u</mml:mi><mml:mrow><mml:mi>m</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:msub><mml:mi>N</mml:mi><mml:mrow><mml:mi>g</mml:mi></mml:mrow></mml:msub></mml:mfrac></mml:mstyle></mml:math></disp-formula></p>
<p><disp-formula id="eqn-14"><label>(14)</label><mml:math id="mml-eqn-14" display="block"><mml:mrow><mml:mi mathvariant="italic">P</mml:mi></mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mi>K</mml:mi><mml:mrow><mml:mi>j</mml:mi></mml:mrow></mml:msub><mml:mrow><mml:mo stretchy="false">|</mml:mo></mml:mrow><mml:msub><mml:mi>P</mml:mi><mml:mrow><mml:mi>g</mml:mi><mml:mi>q</mml:mi></mml:mrow></mml:msub><mml:mo stretchy="false">)</mml:mo><mml:mo>=</mml:mo><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mfrac><mml:mrow><mml:mrow><mml:mi mathvariant="italic">P</mml:mi></mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mi>K</mml:mi><mml:mrow><mml:mi>j</mml:mi></mml:mrow></mml:msub><mml:mo>&#x2229;</mml:mo><mml:msub><mml:mi>P</mml:mi><mml:mrow><mml:mi>g</mml:mi><mml:mi>q</mml:mi></mml:mrow></mml:msub><mml:mo stretchy="false">)</mml:mo></mml:mrow><mml:msub><mml:mi>P</mml:mi><mml:mrow><mml:mi>g</mml:mi><mml:mi>q</mml:mi></mml:mrow></mml:msub></mml:mfrac></mml:mstyle></mml:math></disp-formula></p>
<p><disp-formula id="eqn-15"><label>(15)</label><mml:math id="mml-eqn-15" display="block"><mml:mi>N</mml:mi><mml:mo>&#x22C5;</mml:mo><mml:mi>P</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mi>K</mml:mi><mml:mrow><mml:mi>j</mml:mi></mml:mrow></mml:msub><mml:mrow><mml:mo stretchy="false">|</mml:mo></mml:mrow><mml:msub><mml:mi>P</mml:mi><mml:mrow><mml:mi>g</mml:mi><mml:mi>q</mml:mi></mml:mrow></mml:msub><mml:mo stretchy="false">)</mml:mo><mml:mo>&#x2265;</mml:mo><mml:msub><mml:mi>K</mml:mi><mml:mrow><mml:mi>j</mml:mi></mml:mrow></mml:msub></mml:math></disp-formula></p>
<p>Take four sample programs of the previous paper [<xref ref-type="bibr" rid="ref-7">7</xref>] as an example. Each sample program can generate 500 preliminary programs, respectively, and <xref ref-type="table" rid="table-1">Table 1</xref> gives the average percentage of the preliminary programs with a pass ratio over or less than 90%. We can calculate the probability <inline-formula id="ieqn-40"><mml:math id="mml-ieqn-40"><mml:msub><mml:mi>P</mml:mi><mml:mrow><mml:mi>g</mml:mi><mml:mi>q</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> indicating the preliminary programs with a pass ratio of code similarity check over indeed 90% is 8.6% in <xref ref-type="disp-formula" rid="eqn-13">Eq. (13)</xref>. Next, <xref ref-type="disp-formula" rid="eqn-14">Eq. (14)</xref> can estimate the probability <inline-formula id="ieqn-41"><mml:math id="mml-ieqn-41"><mml:mrow><mml:mi mathvariant="italic">P</mml:mi></mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mi>K</mml:mi><mml:mrow><mml:mi>j</mml:mi></mml:mrow></mml:msub><mml:mrow><mml:mo stretchy="false">|</mml:mo></mml:mrow><mml:msub><mml:mi>P</mml:mi><mml:mrow><mml:mi>g</mml:mi><mml:mi>q</mml:mi></mml:mrow></mml:msub><mml:mo stretchy="false">)</mml:mo></mml:math></inline-formula> representing the preliminary programs with a pass ratio of code similarity check over 90% is 4.91%. Suppose there are 5 preliminary programs with a pass ratio of code similarity check over 90% required. In that case, <xref ref-type="disp-formula" rid="eqn-15">Eq. (15)</xref> can infer that a specific code transformation model should produce at least 100 preliminary programs for use.</p>
<table-wrap id="table-1">
<label>Table 1</label>
<caption>
<title>The average percentage of preliminary programs with a pass ratio over or less than 90%</title>
</caption>
<table frame="hsides">
<colgroup>
<col align="left"/>
<col align="left"/>
<col align="left"/>
</colgroup>
<thead>
<tr>
<th colspan="3" align="center">Program group</th>
</tr>
<tr>
<th>Average percentage</th>
<th>Preliminary programs with a pass ratio of code similarity check over 90% where <inline-formula id="ieqn-42"><mml:math id="mml-ieqn-42"><mml:mi>q</mml:mi></mml:math></inline-formula> &#x003D; 10%</th>
<th>Preliminary programs without a pass ratio of code similarity check over 90% where <inline-formula id="ieqn-43"><mml:math id="mml-ieqn-43"><mml:mi>u</mml:mi></mml:math></inline-formula> &#x003D; 90%</th>
</tr>
</thead>
<tbody>
<tr>
<td>The average percentage of no false positives</td>
<td>81.78%</td>
<td>92.33%</td>
</tr>
<tr>
<td>The average percentage of false positives</td>
<td>18.22%</td>
<td>7.67%</td>
</tr>
<tr>
<td>The probability of a pass ratio of code similarity check over 90%</td>
<td align="center" colspan="2">8.6%</td>
</tr>
</tbody>
</table>
</table-wrap>
</sec>
<sec id="s2_5">
<label>2.5</label>
<title>Explainable AI Technique</title>
<p>Most data scientists prefer high-precision metrics when using models to solve problems, and high-precision models are too complex to understand the decision-making of their algorithms. Because the algorithms are too complex, the designers can consistently not explain why artificial intelligence can achieve specific effects. Today, researchers propose explainable artificial intelligence so that people can understand the inference of the results from AI-related algorithms. There are three classification criteria for interpretability methods: (1) Essential or ex-post interpretability, (2) Model-specific or general, and (3) Local or global interpretability. In 2016, Marco Ribeiro, Sameer Singh, and Carlos Guestrin proposed local interpretable model-agnostic explanations (LIME) [<xref ref-type="bibr" rid="ref-14">14</xref>], a post-analytical approach to interpretation after model establishment, as shown in <xref ref-type="fig" rid="fig-8">Fig. 8</xref>. The first is randomly selecting attributes from the data as data perturbations and other labels the results. Next, in LIME, we calculate the distance between the result and the attributes to get the weights of the attributes and then filter the attributes with small weights. After that, we can explain the result according to the remaining attributes. Therefore, people can use explainable AI techniques to supervise the rules discovered by AI systems, and judging those rules can explain the outcomes of their decisions.</p>
<fig id="fig-8">
<label>Figure 8</label>
<caption>
<title>LIME processing flow</title>
</caption>
<graphic mimetype="image" mime-subtype="png" xlink:href="CMES_24018-fig-8.png"/>
</fig>
</sec>
</sec>
<sec id="s3">
<label>3</label>
<title>Research Method</title>
<p>The previous paper [<xref ref-type="bibr" rid="ref-7">7</xref>] used a code transformation model to generate similar and more concise programs that can shorten execution times. Users can retrieve the corresponding sample programs from the semantic database using keywords. However, the retrieved sample programs may encounter the problem of their codes in low execution performance. Therefore, the previous work is to find a way to transform its sample program into the newly generated programs that can perform better than the original one magnificently because we have significantly improved the execution speed of the entire code transformation process in this study. The previous paper introduced the code transformation model using GPT-2 to produce the newly generated programs called the preliminary programs. Some of the preliminary programs are not exploitable. Therefore, we must confirm which programs are exploitable through the code similarity check and the execution output conformity check. Then the system chooses the best-performing one as a pocket program for this instance, as shown in <xref ref-type="fig" rid="fig-9">Fig. 9</xref>.</p>
<fig id="fig-9">
<label>Figure 9</label>
<caption>
<title>Natural language generating program process</title>
</caption>
<graphic mimetype="image" mime-subtype="png" xlink:href="CMES_24018-fig-9.png"/>
</fig>
<sec id="s3_1">
<label>3.1</label>
<title>Code Transformation Process</title>
<p>The code transformation process is done by inputting the sentence, selecting keywords after NLTK segmentation, searching the sample programs by keywords, and feeding the sample programs into the code transformation model producing the newly generated programs with better efficiency to improve their execution speed. The entire procedure includes two stages, model generation, and model use stages, as shown in <xref ref-type="fig" rid="fig-10">Figs. 10</xref> and <xref ref-type="fig" rid="fig-11">11</xref>. The first is the training phase in the model generation stage, and the next is the test phase. The training phase contains several units: word segmentation, sample program, generative program model, and generated program units. After the word segmentation, the system uses keywords to search sample programs from the semantic database to find the proper sample programs corresponding to the action initiated by the input sentence. To train the program generation model, users can submit the retrieved sample programs to the pre-trained code transformation model, e.g., GPT-2. Once users have established the program generation model, they can feed it into that code transformation model again to produce the newly generated programs. They are called preliminary programs. The first step uses the variational simhash algorithm to check code similarity between the sample program and anyone of the preliminary programs in the test phase. Then the next step uses PLCS to check the conformity of the execution results between sample programs and anyone of qualified programs. Two steps are to filter the un-qualified programs and leave a few programs with higher consistency in code similarity and output conformity. Finally, users can pick out the best-performing program as a pocket program and save it into the semantic database to replace the original sample program. Since input sentences and the program&#x2019;s code are composed of words and symbols, they are all pure text. Therefore, the training and test phases can successfully handle text streams to achieve a unified parallel analysis.</p>
<fig id="fig-10">
<label>Figure 10</label>
<caption>
<title>Training phase of model generation stage</title>
</caption>
<graphic mimetype="image" mime-subtype="png" xlink:href="CMES_24018-fig-10.png"/>
</fig>
<fig id="fig-11">
<label>Figure 11</label>
<caption>
<title>Test phase of model generation stage</title>
</caption>
<graphic mimetype="image" mime-subtype="png" xlink:href="CMES_24018-fig-11.png"/>
</fig>
<p>In the model use stage, as shown in <xref ref-type="fig" rid="fig-12">Fig. 12</xref>, if users can retrieve the pocket program from the semantic database directly, they go to execute it to retain the output. Otherwise, the code transformation process is like the model generation stage until the step has found the pocket program. After that, users can run the pocket program to obtain the execution result at once. Similarly, the model use stage can successfully deal with text streams between tasks, as mentioned earlier in the model generation stage.</p>
<fig id="fig-12">
<label>Figure 12</label>
<caption>
<title>Model use stage</title>
</caption>
<graphic mimetype="image" mime-subtype="png" xlink:href="CMES_24018-fig-12.png"/>
</fig>
</sec>
<sec id="s3_2">
<label>3.2</label>
<title>Variational Simhash Algorithm (VSH)</title>
<p>Generally speaking, the weighting method of simhash uses the TF-IDF algorithm as its weighting value. Its method counts the frequency of word occurrence, which is suitable for text comparison. But in code, unreserved words appear frequently but are not very important. Suppose we obtain the weights according to the original method. In that case, the weight of the non-reserved words will be greater than the weight of the reserved words, making the code similarity inaccurate, so the original method is unsuitable for the code. Therefore, this study proposed a variational autoencoder model suitable for code similarity comparison, called the variational simhash algorithm, and <xref ref-type="fig" rid="fig-13">Fig. 13</xref> gives its algorithm. This study will first train a set of variational autoencoder (VAE) to give weights that are reserved words greater than symbols and symbols greater than non-reserved words. After that, convert all reserved words, symbols, and non-reserved words in the code to be compared to an n-bit vector via word2vec. The weights are then directly mapped to an m-bit vector via the VAE. Compared with user-defined weights used in the simhash algorithm, the proposed variational simhash algorithm can provide weights much closer to the normal distribution. Since the user-defined weights don&#x2019;t follow any protocol or regulation, the traditional simhash algorithm cannot provide the appropriate weight for each corresponding word. Suppose a word does not exist in the list of defined words. The traditional algorithm cannot give it appropriate weight. On the contrary, the proposed approach can assign a proper weight based on the VAE&#x2019;s inference.</p>
<fig id="fig-13">
<label>Figure 13</label>
<caption>
<title>Variational simhash algorithm</title>
</caption>
<graphic mimetype="image" mime-subtype="png" xlink:href="CMES_24018-fig-13.png"/>
</fig>
<p>This study uses VAE to map weights directly. First, convert a word into a 9-dimensional vector through word2vec, as shown in <xref ref-type="fig" rid="fig-14">Fig. 14</xref>. The input layer is this vector. The Encoder has two layers, the first layer has seven neurons, and the second layer has five neurons. We then reduce the vector to a 3-dimensional vector by the mean and standard deviation, and the Decoder is responsible for restoring the data dimension to the original dimension. Then go back to the word via word2vec. This study found 550 codes from GitHub, of which 500 are training data, 40 are validation data, and 10 are test data. The loss function is MSE, the activation function is ReLU, and the optimizer is Adam. <xref ref-type="fig" rid="fig-15">Fig. 15</xref> shows the architecture diagram.</p>
<fig id="fig-14">
<label>Figure 14</label>
<caption>
<title>word2vec architecture</title>
</caption>
<graphic mimetype="image" mime-subtype="png" xlink:href="CMES_24018-fig-14.png"/>
</fig>
<fig id="fig-15">
<label>Figure 15</label>
<caption>
<title>Variational autoencoder (VAE) architecture</title>
</caption>
<graphic mimetype="image" mime-subtype="png" xlink:href="CMES_24018-fig-15.png"/>
</fig>
<p>After reducing to a three-dimensional vector, VAE substitutes the data into <xref ref-type="disp-formula" rid="eqn-16">Eq. (16)</xref> to obtain the weight value, where <italic>i</italic> is the number of neurons in the hidden layer, <inline-formula id="ieqn-44"><mml:math id="mml-ieqn-44"><mml:msub><mml:mi>h</mml:mi><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> represents the value of the i-th neuron, and <inline-formula id="ieqn-45"><mml:math id="mml-ieqn-45"><mml:mi>W</mml:mi></mml:math></inline-formula> stands for the weight value. This study has carried out an example with two simple program codes in Test1 [<xref ref-type="bibr" rid="ref-15">15</xref>] and Test2 [<xref ref-type="bibr" rid="ref-16">16</xref>] to demonstrate the efficient implementation of two methods, word2vec and VAE. It turned out that the simhash algorithm gave 68% of the code similarity check. The variational simhash algorithm, by contrast, inferred it to be 90%.</p>
<p><disp-formula id="eqn-16"><label>(16)</label><mml:math id="mml-eqn-16" display="block"><mml:mi>W</mml:mi><mml:mo>=</mml:mo><mml:msup><mml:mrow><mml:mo>(</mml:mo><mml:msubsup><mml:mo movablelimits="false">&#x2211;</mml:mo><mml:mrow><mml:mi>i</mml:mi><mml:mo>=</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mrow><mml:mi>n</mml:mi></mml:mrow></mml:msubsup><mml:msub><mml:mi>h</mml:mi><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub><mml:mo>)</mml:mo></mml:mrow><mml:mrow><mml:mfrac><mml:mn>1</mml:mn><mml:mn>2</mml:mn></mml:mfrac></mml:mrow></mml:msup></mml:math></disp-formula></p>

</sec>
<sec id="s3_3">
<label>3.3</label>
<title>Piecewise Longest Common Subsequence (PLCS)</title>
<p>This study proposed a new effective LCS-like method to rapidly check multimedia information&#x0027;s consistency. After converting the execution result of each program into a string of ASCII code or binary code, we use LCS to compute the conformity of the sample program and the generated program execution results. This study found that when the length of a string of ASCII or binary code is very long, it takes a long time to finish the conformity check. Technically speaking, supposed two strings with the length of n individually, LCS will spend <inline-formula id="ieqn-46"><mml:math id="mml-ieqn-46"><mml:msup><mml:mrow><mml:mtext>n</mml:mtext></mml:mrow><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula> times of comparisons to check the conformity between them. This study has proposed an improved LCS algorithm called the piecewise longest common subsequence (PLCS) to shorten the conformity check, as shown in <xref ref-type="fig" rid="fig-16">Fig. 16</xref>. PLCS can use a deep neural network (DNN) to predict the appropriate segmented length of a string of ASCII or binary code. First, it converts the execution result into a string ASCII or binary code, breaking it into several segments where a segment has a fixed length. After that, it uses the LCS algorithm to perform a conformity check segment by segment. After the algorithm completes the LCS operation on each segment, it will empty the memory allocated for the calculation. The algorithm will return only the LCS result of the segment as well. Finally, we add the LCS results of the segments to get the final LCS result. Supposed the length of the two strings is n, the algorithm derives every segment with k characters to perform PLCS. The PLCS will spend <inline-formula id="ieqn-47"><mml:math id="mml-ieqn-47"><mml:msup><mml:mi>k</mml:mi><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:msup><mml:mo>&#x2217;</mml:mo><mml:mrow><mml:mo>&#x230A;</mml:mo><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mfrac><mml:mi>n</mml:mi><mml:mi>k</mml:mi></mml:mfrac></mml:mstyle><mml:mo>&#x230B;</mml:mo></mml:mrow><mml:mo>+</mml:mo><mml:mo stretchy="false">(</mml:mo><mml:mi>n</mml:mi><mml:mspace width="thinmathspace" /><mml:mi>m</mml:mi><mml:mi>o</mml:mi><mml:mi>d</mml:mi><mml:mspace width="thinmathspace" /><mml:mi>k</mml:mi><mml:msup><mml:mo stretchy="false">)</mml:mo><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula> times of the comparison. The number of comparisons used in the proposed approach, PLCS, is much less than the traditional method LCS. The operation of PLCS is faster than that of LCS because a small amount of memory is allocated for a single segment computing to speed up the conformity operation. In theory, the data type or the length of the string affects how long the segment length set in the string should be. Therefore, this study employs a DNN model to predict how many characters combine a segment to infer segment lengths for long sequences as the most suitable way to compute PLCS quickly.</p>
<fig id="fig-16">
<label>Figure 16</label>
<caption>
<title>PLCS algorithm</title>
</caption>
<graphic mimetype="image" mime-subtype="png" xlink:href="CMES_24018-fig-16.png"/>
</fig>
<p>This study employs a deep neural network (DNN) model with a softmax function to predict the length of a segment, as shown in <xref ref-type="fig" rid="fig-17">Fig. 17</xref>. In <xref ref-type="fig" rid="fig-17">Fig. 17</xref>, the symbol from O<sub>1</sub> to O<sub>5</sub> represents the different lengths of a segment, and we specify these symbols to different lengths of a segment, as listed in <xref ref-type="table" rid="table-2">Table 2</xref>. The input layer contains three parts: feature and the length and width of the signal. The loss function is the sum of squared errors (SSE), the activation function is the rectified linear unit (ReLU), and the optimizer is the adaptative gradient (AdaGrad). The feature input is a one-dimensional vector with a length of 784 elements. The data set for training a DNN model consists of 100 input vectors and their corresponding 100 output labels where the model performs segmentation results of different lengths.</p>
<fig id="fig-17">
<label>Figure 17</label>
<caption>
<title>DNN estimate the length of a segment</title>
</caption>
<graphic mimetype="image" mime-subtype="png" xlink:href="CMES_24018-fig-17.png"/>
</fig>
<table-wrap id="table-2">
<label>Table 2</label>
<caption>
<title>The length of a segment (unit: bit)</title>
</caption>
<table frame="hsides">
<colgroup>
<col align="left"/>
<col align="left"/>
<col align="left"/>
</colgroup>
<thead>
<tr>
<th>Symbol</th>
<th>One hot encoding</th>
<th>Length of a segment</th>
</tr>
</thead>
<tbody>
<tr>
<td>O<sub>1</sub></td>
<td>00001<sub>2</sub></td>
<td>500</td>
</tr>
<tr>
<td>O<sub>2</sub></td>
<td>00010<sub>2</sub></td>
<td>1000</td>
</tr>
<tr>
<td>O<sub>3</sub></td>
<td>00100<sub>2</sub></td>
<td>5000</td>
</tr>
<tr>
<td>O<sub>4</sub></td>
<td>01000<sub>2</sub></td>
<td>10000</td>
</tr>
<tr>
<td>O<sub>5</sub></td>
<td>10000<sub>2</sub></td>
<td>50000</td>
</tr>
</tbody>
</table>
</table-wrap>
<p>Regarding data allocation for training a DNN model, there are 90 vectors as training data, five validation data, and five test data. There are two hidden layers in DNN. The number of neurons in the first hidden layer is 30 and in the second 40. If the input signal is text, the feature value of the input layer adopts Doc2Vec to convert the text into a vector, and the signal length is the original length of the sentence in which the signal width is 1. Users can use VGG16 to capture image features as an input signal if the input is an image. The signal length is the original length of the image, and the signal width is the image&#x2019;s original width. If the input is a voice signal, users can use the Python package librosa.display.waveplot to convert it into the waveform of an image as an input signal. The training process of a voice input will do the same task as the image input process mentioned above. If the input is a movie, users can use the YOLO v3 model to track the object&#x0027;s motion and convert the track of motion into a displacement image as an input signal. The training process of a move input will do the same task as the image input process mentioned above. <xref ref-type="fig" rid="fig-18">Fig. 18</xref> shows the loss curve during the training phase of a DNN model.</p>
<fig id="fig-18">
<label>Figure 18</label>
<caption>
<title>Loss curve during DNN training phase</title>
</caption>
<graphic mimetype="image" mime-subtype="png" xlink:href="CMES_24018-fig-18.png"/>
</fig>
<p>This study uses the execution results of four sample programs and the programs they generate for testing. The execution results are article text [<xref ref-type="bibr" rid="ref-17">17</xref>], graphic image [<xref ref-type="bibr" rid="ref-18">18</xref>], speech signal [<xref ref-type="bibr" rid="ref-19">19</xref>] and video signal [<xref ref-type="bibr" rid="ref-20">20</xref>], respectively. <xref ref-type="table" rid="table-3">Table 3</xref> shows the performance evaluation between LCS and PLCS. The LCS algorithm takes 659.50 s on average for the conformity check of execution results. In contrast, the PLCS algorithm is 173.25 s.</p>
<table-wrap id="table-3">
<label>Table 3</label>
<caption>
<title>Performance evaluation between LCS and PLCS</title>
</caption>
<table frame="hsides">
<colgroup>
<col align="left"/>
<col align="left"/>
<col align="left"/>
<col align="left"/>
<col align="left"/>
<col align="left"/>
</colgroup>
<thead>
<tr>
<th>Case</th>
<th>Predicted segment length (bit)</th>
<th>Number of comparisons using LCS</th>
<th>LCS execution time (s)</th>
<th>Number of comparisons using PLCS</th>
<th>PLCS execution time (s)</th>
</tr>
</thead>
<tbody>
<tr>
<td>Article text</td>
<td>500</td>
<td>485,809</td>
<td>0.006</td>
<td>288,809</td>
<td>0.0017</td>
</tr>
<tr>
<td>Graphic image</td>
<td>1000</td>
<td>1,227,241,024</td>
<td>298</td>
<td>35,001,024</td>
<td>78</td>
</tr>
<tr>
<td>Voice signal</td>
<td>10000</td>
<td>21,278,640,384</td>
<td>1397</td>
<td>1,434,480,384</td>
<td>431</td>
</tr>
<tr>
<td>Video signal</td>
<td>5000</td>
<td>6,430,917,249</td>
<td>943</td>
<td>400,037,249</td>
<td>184</td>
</tr>
<tr>
<td>Average</td>
<td>4125</td>
<td>7,234,321,117</td>
<td>659.50</td>
<td>467,451,866.5</td>
<td>173.25</td>
</tr>
</tbody>
</table>
</table-wrap>
</sec>
</sec>
<sec id="s4">
<label>4</label>
<title>Experimental Results and Discussion</title>
<sec id="s4_1">
<label>4.1</label>
<title>Experiment Setting</title>
<p>This study uses fast model training on an advanced GPU [<xref ref-type="bibr" rid="ref-21">21</xref>] cluster architecture to reduce the processing time spent on traditional CPU training models, as shown in <xref ref-type="fig" rid="fig-19">Fig. 19</xref>. NLTK performed sentence segmentation and keyword searches to find the corresponding sample programs, and then users fed those programs into code transformation models GPT-2, MASS, and BART. The variational simhash algorithm checks for code similarity. The Piecewise Longest Common Subsequence algorithm checks the consistency of the execution results of two different programs. Use LIME to interpret the model. Users can build all of the above tools in a cloud environment to execute most applications and generate programs. Therefore, this study uses open source packages to establish the operating environment, as listed in <xref ref-type="table" rid="table-4">Table 4</xref>.</p>
<fig id="fig-19"><label>Figure 19</label><caption><title>GPU workstation cluster</title></caption><graphic mimetype="image" mime-subtype="png" xlink:href="CMES_24018-fig-19.png"/></fig>
<table-wrap id="table-4">
<label>Table 4</label>
<caption>
<title>Open-source package</title>
</caption>
<table frame="hsides">
<colgroup>
<col align="left"/>
<col align="left"/>
</colgroup>
<thead>
<tr>
<th>Package</th>
<th>Version</th>
</tr>
</thead>
<tbody>
<tr>
<td>Anaconda2</td>
<td>5.2.0</td>
</tr>
<tr>
<td>Python</td>
<td>3.7.5</td>
</tr>
<tr>
<td>Tensorflow</td>
<td>1.14</td>
</tr>
<tr>
<td>CUDA</td>
<td>10</td>
</tr>
<tr>
<td>XAMPP</td>
<td>3.2.4</td>
</tr>
<tr>
<td>NLTK</td>
<td>3.5</td>
</tr>
<tr>
<td>GPT-2</td>
<td>0.6</td>
</tr>
<tr>
<td>SimHash</td>
<td>2.0.0</td>
</tr>
<tr>
<td>LCS</td>
<td>&#x2212;</td>
</tr>
</tbody>
</table>
</table-wrap>
</sec>
<sec id="s4_2">
<label>4.2</label>
<title>Experimental Design</title>
<p>We performed four experiments in this section. Experiment 1 has 4 example sentences, and each sentence will select the keyword and then use the keyword to retrieve the sample program from the semantic database. The second experiment was to generate 100 programs separately from each sample program. Then check the code similarity between the sample program and the generated program, and verify whether the execution results of the generated program and the sample program are consistent. And analyze the performance of the generated program. The third experiment is to analyze the execution speed of the whole system. Experiment 4 explains the model.</p>
<p>This study established a semantic database for the experiment. XAMPP [<xref ref-type="bibr" rid="ref-22">22</xref>] created the keywords, example program names, example program paths, generated model paths, and other tables in the database, as shown in <xref ref-type="fig" rid="fig-20">Fig. 20</xref>.</p>
<fig id="fig-20">
<label>Figure 20</label>
<caption>
<title>Table of four sample programs</title>
</caption>
<graphic mimetype="image" mime-subtype="png" xlink:href="CMES_24018-fig-20.png"/>
</fig>
</sec>
<sec id="s4_3">
<label>4.3</label>
<title>Experimental Results</title>
<sec id="s4_3_1">
<label>4.3.1</label>
<title>Experiment 1</title>
<p>In Experiment 1, NLTK will be used to segment words from four input example sentences and select the appropriate keywords accordingly. Experiment 1 adopted four example sentences, as listed in <xref ref-type="table" rid="table-5">Table 5</xref>. The results of word segmentation using NLTK have shown in <xref ref-type="fig" rid="fig-21">Fig. 21</xref>.</p>
<table-wrap id="table-5">
<label>Table 5</label>
<caption>
<title>Example sentences</title>
</caption>
<table frame="hsides">
<colgroup>
<col align="left"/>
<col align="left"/>
</colgroup>
<thead>
<tr>
<th>Case</th>
<th>Sentence content</th>
</tr>
</thead>
<tbody>
<tr>
<td>Example 1</td>
<td>The weather is very good today, I want to know the traffic flow.</td>
</tr>
<tr>
<td>Example 2</td>
<td>Fit approximate equations through neural network.</td>
</tr>
<tr>
<td>Example 3</td>
<td>I want to listen to piano music and relax.</td>
</tr>
<tr>
<td>Example 4</td>
<td>I want to turn the photo into a video for viewing, and recall it.</td>
</tr>
</tbody>
</table>
</table-wrap>
<fig id="fig-21">
<label>Figure 21</label>
<caption>
<title>Screenshot of NLTK word segmentation</title>
</caption>
<graphic mimetype="image" mime-subtype="png" xlink:href="CMES_24018-fig-21.png"/>
</fig>
<p>The keywords have the corresponding sample programs precisely found and pick-up from the semantic database where the corresponding sample programs have entitled Web-Crawler, Neuralnetwork, Music, and Makevideo, as listed in <xref ref-type="table" rid="table-6">Table 6</xref>. The sample programs in this study are all obtained from Github. The sample program in Example 1 is related to web crawlers [<xref ref-type="bibr" rid="ref-23">23</xref>], and the corresponding keywords are weather and traffic. Sample program 1 is to grab the corresponding data on the Internet, get the weather forecast from the weather center, and automatically assign the traffic jam spots on Google Maps. Next, in the example program of Example 2, the corresponding keyword is &#x201C;equation, neural, network&#x201D; [<xref ref-type="bibr" rid="ref-24">24</xref>] related to neural network applications. The primary purpose of the example program is to find an approximate equation by training a neural network. Third, in the sample program of Example 3, the corresponding keywords are piano and music, which is related to the program that generates music [<xref ref-type="bibr" rid="ref-25">25</xref>]. The webcam programming goal is to generate a short piece of piano music automatically. Finally, in Example 4, the keywords corresponding to the sample program are photo and video. This program can convert photos into videos for users to watch [<xref ref-type="bibr" rid="ref-26">26</xref>].</p>
<table-wrap id="table-6">
<label>Table 6</label>
<caption>
<title>The list of example programs in Experiment 1</title>
</caption>
<table frame="hsides">
<colgroup>
<col align="left"/>
<col align="left"/>
<col align="left"/>
</colgroup>
<thead>
<tr>
<th>Case</th>
<th>Extracted keywords from example sentence</th>
<th>Sample program</th>
</tr>
</thead>
<tbody>
<tr>
<td>Example 1</td>
<td>weather, traffic</td>
<td>Web-Crawler</td>
</tr>
<tr>
<td>Example 2</td>
<td>equations, neural, network</td>
<td>Neuralnetwork</td>
</tr>
<tr>
<td>Example 3</td>
<td>piano, music</td>
<td>Music</td>
</tr>
<tr>
<td>Example 4</td>
<td>photo, video</td>
<td>Makevideo</td>
</tr>
</tbody>
</table>
</table-wrap>
</sec>
<sec id="s4_3_2">
<label>4.3.2</label>
<title>Experiment 2</title>
<p>Experiment 2 with four sample programs implements in a single GPU workstation. This experiment first imported four sample programs into GPT-2, MASS, and BART to generate the preliminary programs. In <xref ref-type="sec" rid="s8">Appendix</xref>, we have demonstrated a few samples of the generated preliminary programs. After each sample program generates 100 preliminary programs, the next is to check the code similarity using the variational simhash (VSH) algorithm. We set a qualification level with the pass ratio of code similarity greater than or equal to 90%. <xref ref-type="fig" rid="fig-22">Figs. 22</xref>&#x2013;<xref ref-type="fig" rid="fig-25">25</xref> show the pass ratio of the generated preliminary programs. We have selected some of them with a higher pass ratio (&#x2265;90%) called qualified programs.</p>
<fig id="fig-22">
<label>Figure 22</label>
<caption>
<title>The pass ratio of the preliminary programs in Example 1</title>
</caption>
<graphic mimetype="image" mime-subtype="png" xlink:href="CMES_24018-fig-22.png"/>
</fig>
<fig id="fig-23">
<label>Figure 23</label>
<caption>
<title>The pass ratio of the preliminary programs in Example 2</title>
</caption>
<graphic mimetype="image" mime-subtype="png" xlink:href="CMES_24018-fig-23.png"/>
</fig>
<fig id="fig-24"><label>Figure 24</label><caption><title>The pass ratio of the preliminary programs in Example 3</title></caption><graphic mimetype="image" mime-subtype="png" xlink:href="CMES_24018-fig-24.png"/></fig>
<fig id="fig-25"><label>Figure 25</label><caption><title>The pass ratio of the preliminary programs in Example 4</title></caption><graphic mimetype="image" mime-subtype="png" xlink:href="CMES_24018-fig-25.png"/></fig>
<p>The third is to compile every qualified program. Once any program has complied successfully, we execute that program immediately. As shown in <xref ref-type="fig" rid="fig-26">Figs. 26</xref>&#x2013;<xref ref-type="fig" rid="fig-29">29</xref>, PLCS will check the results of the successfully executed programs, as listed in <xref ref-type="table" rid="table-7">Table 7</xref>. This PLCS is to find the conformity between the execution result of the sample program and the qualified program. The one with the highest compliance was called the pocket program.</p>
<fig id="fig-26"><label>Figure 26</label><caption><title>Execution result of Example 1</title></caption><graphic mimetype="image" mime-subtype="png" xlink:href="CMES_24018-fig-26.png"/></fig>
<fig id="fig-27">
<label>Figure 27</label><caption><title>Execution result of Example 2</title></caption><graphic mimetype="image" mime-subtype="png" xlink:href="CMES_24018-fig-27.png"/></fig>
<fig id="fig-28"><label>Figure 28</label><caption><title>Execution result of Example 3</title></caption><graphic mimetype="image" mime-subtype="png" xlink:href="CMES_24018-fig-28.png"/></fig>
<fig id="fig-29"><label>Figure 29</label><caption><title>Execution result of Example 4</title></caption><graphic mimetype="image" mime-subtype="png" xlink:href="CMES_24018-fig-29.png"/></fig>
<table-wrap id="table-7"><label>Table 7</label>
<caption>
<title>PLCS conformity according to the number of identical codes (unit: %)</title>
</caption>
<table frame="hsides">
<colgroup>
<col/>
<col/>
<col/>
<col/>
<col/>
<col/>
<col/>
<col/>
<col/>
<col/>
<col/>
<col/>
<col/>
</colgroup>
<thead>
<tr>
<th align="center" colspan="13">Case</th>
</tr>
<tr>
<th>Subject</th>
<th align="center" colspan="3">Example 1</th>
<th align="center" colspan="3">Example 2</th>
<th align="center" colspan="3">Example 3</th>
<th align="center" colspan="3">Example 4</th>
</tr>
<tr>
<th></th>
<th>GPT-2</th>
<th>MASS</th>
<th>BART</th>
<th>GPT-2</th>
<th>MASS</th>
<th>BART</th>
<th>GPT-2</th>
<th>MASS</th>
<th>BART</th>
<th>GPT-2</th>
<th>MASS</th>
<th>BART</th>
</tr>
</thead>
<tbody>
<tr>
<td>Sample program</td>
<td>62</td>
<td>62</td>
<td>62</td>
<td>35218</td>
<td>35218</td>
<td>35218</td>
<td>162964</td>
<td>162964</td>
<td>162964</td>
<td>68087</td>
<td>68087</td>
<td>68087</td>
</tr>
<tr>
<td>Generated program</td>
<td>62</td>
<td>63</td>
<td>62</td>
<td>36513</td>
<td>36102</td>
<td>35783</td>
<td>188218</td>
<td>179341</td>
<td>179376</td>
<td>66537</td>
<td>66983</td>
<td>67210</td>
</tr>
<tr>
<td>Identical codes</td>
<td>61</td>
<td>61</td>
<td>61</td>
<td>35218</td>
<td>35195</td>
<td>34218</td>
<td>161998</td>
<td>160301</td>
<td>163911</td>
<td>65894</td>
<td>65912</td>
<td>66548</td>
</tr>
<tr>
<td>PLCS conformity</td>
<td>98.38</td>
<td>97.60</td>
<td>98.38</td>
<td>98.19</td>
<td>98.69</td>
<td>96.3</td>
<td>92.25</td>
<td>93.65</td>
<td>95.75</td>
<td>97.89</td>
<td>97.59</td>
<td>98.37</td>
</tr>
</tbody>
</table>
</table-wrap>
<p>Finally, we have evaluated the performance of the proposed approaches, including VSH and PLCS algorithms, according to the execution result of sample programs and their respective pocket programs, as listed in <xref ref-type="table" rid="table-8">Tables 8</xref> and <xref ref-type="table" rid="table-9">9</xref>. <xref ref-type="table" rid="table-8">Table 8</xref> shows the number of code lines reduced between the sample program and the pocket program in four cases where the minimum number of code lines either in the sample program or the pocket program could be out of GPT-2, MASS, or BART. The proposed approach can reduce the number of code lines by 28.22% and program execution time by 30.98% on average. As a result, the proposed approach in this study can outperform the previous method published in 2021 [<xref ref-type="bibr" rid="ref-7">7</xref>].</p>
<table-wrap id="table-8">
<label>Table 8</label>
<caption>
<title>Number of code lines reduction</title>
</caption>
<table frame="hsides">
<colgroup>
<col align="left"/>
<col align="left"/>
<col align="left"/>
<col align="left"/>
<col align="left"/>
</colgroup>
<thead>
<tr>
<th align="center" colspan="5">Case</th>
</tr>
<tr>
<th>Subject</th>
<th>Example 1</th>
<th>Example 2</th>
<th>Example 3</th>
<th>Example 4</th>
</tr>
</thead>
<tbody>
<tr>
<td>Sample program</td>
<td>291</td>
<td>152</td>
<td>174</td>
<td>147</td>
</tr>
<tr>
<td>Pocket program</td>
<td>169<sup>&#x002A;</sup> (174<sup>^</sup>)</td>
<td>123<sup>&#x002A;</sup> (128<sup>^</sup>)</td>
<td>137<sup>#</sup> (146<sup>^</sup>)</td>
<td>102<sup>&#x002A;</sup> (111<sup>^</sup>)</td>
</tr>
<tr>
<td>Reduction ratio (%)</td>
<td>41.92<sup>&#x002A;</sup> (40.34<sup>^</sup>)</td>
<td>19.08<sup>&#x002A;</sup> (15.78<sup>^</sup>)</td>
<td>21.26<sup>#</sup> (16.09<sup>^</sup>)</td>
<td>30.61<sup>&#x002A;</sup> (24.48<sup>^</sup>)</td>
</tr>
<tr>
<td>Average reduction ratio (%)</td>
<td align="center" colspan="4">28.22 (27.21<sup>^</sup>)</td>
</tr>
</tbody>
</table>
<table-wrap-foot><fn id="table-8fn"><p>Note: p.s. abbreviated symbol <sup>^</sup>: GPT-2, <sup>#</sup>: MASS, and <sup>&#x002A;</sup>: BART and parenthesis () indicating the minimum number of code lines of a sample program.</p></fn></table-wrap-foot></table-wrap>
<table-wrap id="table-9">
<label>Table 9</label>
<caption>
<title>Program execution time reduction (unit: second)</title>
</caption>
<table frame="hsides" >
<colgroup>
<col align="left"/>
<col align="left"/>
<col align="left"/>
<col align="left"/>
<col align="left"/>
</colgroup>
<thead>
<tr>
<th align="center" colspan="5">Case</th>
</tr>
<tr>
<th>Subject</th>
<th>Example 1</th>
<th>Example 2</th>
<th>Example 3</th>
<th>Example 4</th>
</tr>
</thead>
<tbody>
<tr>
<td>Sample program</td>
<td>8.35</td>
<td>10.57</td>
<td>14.58</td>
<td>12.43</td>
</tr>
<tr>
<td>Pocket program</td>
<td>6.04<sup>&#x002A;</sup> (6.97<sup>^</sup>)</td>
<td>6.89<sup>&#x002A;</sup> (7.13<sup>^</sup>)</td>
<td>10.56<sup>#</sup> (11.71<sup>^</sup>)</td>
<td>7.97<sup>&#x002A;</sup> (8.92<sup>^</sup>)</td>
</tr>
<tr>
<td>Reduction ratio (%)</td>
<td>27.66<sup>&#x002A;</sup> (16.59<sup>^</sup>)</td>
<td>34.81<sup>&#x002A;</sup> (32.54<sup>^</sup>)</td>
<td>27.57<sup>#</sup> (19.68<sup>^</sup>)</td>
<td>35.88<sup>&#x002A;</sup> (28.23<sup>^</sup>)</td>
</tr>
<tr>
<td>Average reduction ratio (%)</td>
<td align="center" colspan="4">30.98 (24.62<sup>^</sup>)</td>
</tr>
</tbody>
</table>
<table-wrap-foot><fn id="table-9fn"><p>Note: p.s. abbreviated symbol <sup>^</sup>: GPT-2, <sup>#</sup>: MASS, and <sup>&#x002A;</sup>: BART and parenthesis () indicating the minimum execution time of a sample program.</p></fn></table-wrap-foot></table-wrap>
</sec>
<sec id="s4_3_3">
<label>4.3.3</label>
<title>Experiment 3</title>
<p>In this study, the proposed method makes the generated programs produced more efficient and increases the system&#x2019;s speed. The first part is to improve code similarity comparison using the variational simhash (VSH) algorithm that can reduce the number of qualified programs. Reducing the number of qualified programs deducts the time required to compile all qualified programs. Compared with simhash (SH) algorithm, the proposed one obtained fewer qualified programs, as shown in <xref ref-type="table" rid="table-10">Table 10</xref>. <xref ref-type="table" rid="table-10">Table 10</xref> shows that the reduction ratio of the number of qualified programs is up to 22.08%.</p>	
<table-wrap id="table-10">
<label>Table 10</label>
<caption>
<title>Comparison of the number of qualified programs produced</title>
</caption>
<table frame="hsides">
<colgroup>
<col/>
<col/>
<col/>
<col/>
<col/>
<col/>
<col/>
<col/>
<col/>
<col/>
<col/>
<col/>
<col/>
</colgroup>
<thead>
<tr>
<th>Method</th>
<th colspan="3" align="left">Example 1</th>
<th colspan="3" align="left">Example 2</th>
<th colspan="3" align="left">Example 3</th>
<th colspan="3" align="left">Example 4</th>
</tr>
<tr>
<th/>
<th>GPT-2</th>
<th>MASS</th>
<th>BART</th>
<th>GPT-2</th>
<th>MASS</th>
<th>BART</th>
<th>GPT-2</th>
<th>MASS</th>
<th>BART</th>
<th>GPT-2</th>
<th>MASS</th>
<th>BART</th>
</tr>
</thead>
<tbody>
<tr>
<td>SH</td>
<td>23</td>
<td>34</td>
<td>41</td>
<td>25</td>
<td>29</td>
<td>32</td>
<td>28</td>
<td>37</td>
<td>42</td>
<td>31</td>
<td>36</td>
<td>40</td>
</tr>
<tr>
<td>VSH</td>
<td>19</td>
<td>27</td>
<td>33</td>
<td>19</td>
<td>21</td>
<td>23</td>
<td>22</td>
<td>29</td>
<td>32</td>
<td>25</td>
<td>29</td>
<td>31</td>
</tr>
<tr>
<td>Reduction ratio (%)</td>
<td>17.39</td>
<td>20.58</td>
<td>19.51</td>
<td>24.00</td>
<td>27.58</td>
<td>28.12</td>
<td>21.43</td>
<td>21.62</td>
<td>23.81</td>
<td>19.35</td>
<td>19.44</td>
<td>22.50</td>
</tr>
<tr>
<td>Average reduction ratio (%)</td>
<td align="center" colspan="12">22.11</td>
</tr>
</tbody>
</table>
</table-wrap>
<p>Next, the proposed PLCS can perform the conformity check of the program execution results faster than the traditional LCS, as shown in <xref ref-type="table" rid="table-11">Table 11</xref>. Therefore, it makes the system run rapidly. In <xref ref-type="table" rid="table-11">Table 11</xref>, users pick up the best-performing pocket programs generated from GPT-2, MASS, or BART in Examples 1, 2, 3, and 4. Then users compare the conformity check using LCS and PLCS according to the number of string comparisons and its execution time. As a result, PLCS can reduce the number of character comparisons by 31.82% and the execution time shortened by 32.39%.</p>
<p>In contrast, the previous work [<xref ref-type="bibr" rid="ref-7">7</xref>] employed GPT-2 model, simhash algorithm, and LCS algorithm.</p>
<table-wrap id="table-11"><label>Table 11</label>
<caption>
<title>Comparison of the conformity check</title>
</caption>
<table frame="hsides">
<colgroup>
<col align="left"/>
<col align="left"/>
<col align="left"/>
<col align="left"/>
<col align="left"/>
<col align="left"/>
<col align="left"/>
</colgroup>
<thead>
<tr>
<th>Case</th>
<th>The number of string comparisons in LCS</th>
<th>The number of string comparisons in PLCS</th>
<th>Reduction ratio (%)</th>
<th>Time for string comparisons in LCS (s)</th>
<th>Time for string comparisons in PLCS (s)</th>
<th>Reduction ratio (%)</th>
</tr>
</thead>
<tbody>
<tr>
<td>Example 1</td>
<td>3721</td>
<td>3721</td>
<td>0.00</td>
<td>0.0030</td>
<td>0.0030</td>
<td>0.00</td>
</tr>
<tr>
<td>Example 2</td>
<td>1,240,307,524</td>
<td>937,040,324</td>
<td>24.45</td>
<td>392</td>
<td>279</td>
<td>28.83</td>
</tr>
<tr>
<td>Example 3</td>
<td>26,557,265,296</td>
<td>17,808,785,296</td>
<td>32.94</td>
<td>7839</td>
<td>5268</td>
<td>32.80</td>
</tr>
<tr>
<td>Example 4</td>
<td>4,635,839,569</td>
<td>3,368,007,569</td>
<td>27.35</td>
<td>894</td>
<td>622</td>
<td>30.43</td>
</tr>
<tr>
<td>Average</td>
<td>8,108,354,027.5</td>
<td>5,528,459,227.5</td>
<td>31.82</td>
<td>2,281.25</td>
<td>1542.25</td>
<td>32.39</td>
</tr>
</tbody>
</table>
</table-wrap>
 <p>The proposed approach in this study uses GPT-2, MASS, or BART models, variational simhash algorithm, and PLCS algorithm. <xref ref-type="table" rid="table-10">Tables 10</xref> and <xref ref-type="table" rid="table-11">11</xref> confirm that the proposed method improves the efficiency of producing the generated programs and the execution speed of the conformity check. Then, users can calculate the entire process&#x0027;s execution time <inline-formula id="ieqn-48"><mml:math id="mml-ieqn-48"><mml:msub><mml:mi>t</mml:mi><mml:mrow><mml:mrow><mml:mi mathvariant="italic">t</mml:mi><mml:mi mathvariant="italic">o</mml:mi><mml:mi mathvariant="italic">t</mml:mi><mml:mi mathvariant="italic">a</mml:mi><mml:mi mathvariant="italic">l</mml:mi></mml:mrow></mml:mrow></mml:msub></mml:math></inline-formula> in <xref ref-type="disp-formula" rid="eqn-17">Eq. (17)</xref>, where <inline-formula id="ieqn-49"><mml:math id="mml-ieqn-49"><mml:msub><mml:mi>t</mml:mi><mml:mrow><mml:mrow><mml:mi mathvariant="italic">s</mml:mi><mml:mi mathvariant="italic">e</mml:mi><mml:mi mathvariant="italic">g</mml:mi><mml:mi mathvariant="italic">m</mml:mi><mml:mi mathvariant="italic">e</mml:mi><mml:mi mathvariant="italic">n</mml:mi><mml:mi mathvariant="italic">t</mml:mi><mml:mi mathvariant="italic">a</mml:mi><mml:mi mathvariant="italic">t</mml:mi><mml:mi mathvariant="italic">i</mml:mi><mml:mi mathvariant="italic">o</mml:mi><mml:mi mathvariant="italic">n</mml:mi></mml:mrow></mml:mrow></mml:msub></mml:math></inline-formula> represents the time of selecting keywords after word segmentation using NLTK, <inline-formula id="ieqn-50"><mml:math id="mml-ieqn-50"><mml:msub><mml:mi>t</mml:mi><mml:mrow><mml:mrow><mml:mi mathvariant="italic">s</mml:mi><mml:mi mathvariant="italic">a</mml:mi><mml:mi mathvariant="italic">m</mml:mi><mml:mi mathvariant="italic">p</mml:mi><mml:mi mathvariant="italic">l</mml:mi><mml:mi mathvariant="italic">e</mml:mi></mml:mrow><mml:mspace width="thinmathspace" /><mml:mrow><mml:mi mathvariant="italic">p</mml:mi><mml:mi mathvariant="italic">r</mml:mi><mml:mi mathvariant="italic">o</mml:mi><mml:mi mathvariant="italic">g</mml:mi><mml:mi mathvariant="italic">r</mml:mi><mml:mi mathvariant="italic">a</mml:mi><mml:mi mathvariant="italic">m</mml:mi></mml:mrow><mml:mspace width="thinmathspace" /><mml:mrow><mml:mi mathvariant="italic">r</mml:mi><mml:mi mathvariant="italic">e</mml:mi><mml:mi mathvariant="italic">t</mml:mi><mml:mi mathvariant="italic">r</mml:mi><mml:mi mathvariant="italic">i</mml:mi><mml:mi mathvariant="italic">e</mml:mi><mml:mi mathvariant="italic">v</mml:mi><mml:mi mathvariant="italic">a</mml:mi><mml:mi mathvariant="italic">l</mml:mi></mml:mrow></mml:mrow></mml:msub></mml:math></inline-formula> stands for the time of searching the corresponding sample program in the semantic database, <inline-formula id="ieqn-51"><mml:math id="mml-ieqn-51"><mml:msub><mml:mi>t</mml:mi><mml:mrow><mml:mi>c</mml:mi><mml:mi>o</mml:mi><mml:mi>d</mml:mi><mml:mi>e</mml:mi><mml:mspace width="thinmathspace" /><mml:mrow><mml:mi mathvariant="italic">t</mml:mi><mml:mi mathvariant="italic">r</mml:mi><mml:mi mathvariant="italic">a</mml:mi><mml:mi mathvariant="italic">n</mml:mi><mml:mi mathvariant="italic">s</mml:mi><mml:mi mathvariant="italic">f</mml:mi><mml:mi mathvariant="italic">o</mml:mi><mml:mi mathvariant="italic">r</mml:mi><mml:mi mathvariant="italic">m</mml:mi><mml:mi mathvariant="italic">a</mml:mi><mml:mi mathvariant="italic">t</mml:mi><mml:mi mathvariant="italic">i</mml:mi><mml:mi mathvariant="italic">o</mml:mi><mml:mi mathvariant="italic">n</mml:mi></mml:mrow></mml:mrow></mml:msub></mml:math></inline-formula> is the time of producing the newly generated program from the code transformation models, <inline-formula id="ieqn-52"><mml:math id="mml-ieqn-52"><mml:msub><mml:mi>t</mml:mi><mml:mrow><mml:mi>c</mml:mi><mml:mi>o</mml:mi><mml:mi>d</mml:mi><mml:mi>e</mml:mi><mml:mspace width="thinmathspace" /><mml:mrow><mml:mi mathvariant="italic">s</mml:mi><mml:mi mathvariant="italic">i</mml:mi><mml:mi mathvariant="italic">m</mml:mi><mml:mi mathvariant="italic">i</mml:mi><mml:mi mathvariant="italic">l</mml:mi><mml:mi mathvariant="italic">a</mml:mi><mml:mi mathvariant="italic">r</mml:mi><mml:mi mathvariant="italic">i</mml:mi><mml:mi mathvariant="italic">t</mml:mi><mml:mi mathvariant="italic">y</mml:mi></mml:mrow><mml:mspace width="thinmathspace" /><mml:mrow><mml:mi mathvariant="italic">c</mml:mi><mml:mi mathvariant="italic">h</mml:mi><mml:mi mathvariant="italic">e</mml:mi><mml:mi mathvariant="italic">c</mml:mi><mml:mi mathvariant="italic">k</mml:mi></mml:mrow></mml:mrow></mml:msub></mml:math></inline-formula> denotes the time for checking code similarity, <inline-formula id="ieqn-53"><mml:math id="mml-ieqn-53"><mml:msub><mml:mi>t</mml:mi><mml:mrow><mml:mrow><mml:mi mathvariant="italic">c</mml:mi><mml:mi mathvariant="italic">o</mml:mi><mml:mi mathvariant="italic">m</mml:mi><mml:mi mathvariant="italic">p</mml:mi><mml:mi mathvariant="italic">l</mml:mi><mml:mi mathvariant="italic">i</mml:mi><mml:mi mathvariant="italic">n</mml:mi><mml:mi mathvariant="italic">g</mml:mi></mml:mrow><mml:mspace width="thinmathspace" /><mml:mrow><mml:mi mathvariant="italic">q</mml:mi><mml:mi mathvariant="italic">u</mml:mi><mml:mi mathvariant="italic">a</mml:mi><mml:mi mathvariant="italic">l</mml:mi><mml:mi mathvariant="italic">i</mml:mi><mml:mi mathvariant="italic">f</mml:mi><mml:mi mathvariant="italic">i</mml:mi><mml:mi mathvariant="italic">e</mml:mi><mml:mi mathvariant="italic">d</mml:mi></mml:mrow><mml:mspace width="thinmathspace" /><mml:mrow><mml:mi mathvariant="italic">p</mml:mi><mml:mi mathvariant="italic">r</mml:mi><mml:mi mathvariant="italic">o</mml:mi><mml:mi mathvariant="italic">g</mml:mi><mml:mi mathvariant="italic">r</mml:mi><mml:mi mathvariant="italic">a</mml:mi><mml:mi mathvariant="italic">m</mml:mi></mml:mrow></mml:mrow></mml:msub></mml:math></inline-formula> expresses the time for compiling all qualified programs, <inline-formula id="ieqn-54"><mml:math id="mml-ieqn-54"><mml:msub><mml:mi>t</mml:mi><mml:mrow><mml:mrow><mml:mi mathvariant="italic">c</mml:mi><mml:mi mathvariant="italic">o</mml:mi><mml:mi mathvariant="italic">n</mml:mi><mml:mi mathvariant="italic">f</mml:mi><mml:mi mathvariant="italic">o</mml:mi><mml:mi mathvariant="italic">r</mml:mi><mml:mi mathvariant="italic">m</mml:mi><mml:mi mathvariant="italic">i</mml:mi><mml:mi mathvariant="italic">t</mml:mi><mml:mi mathvariant="italic">y</mml:mi></mml:mrow><mml:mspace width="thinmathspace" /><mml:mrow><mml:mi mathvariant="italic">c</mml:mi><mml:mi mathvariant="italic">h</mml:mi><mml:mi mathvariant="italic">e</mml:mi><mml:mi mathvariant="italic">c</mml:mi><mml:mi mathvariant="italic">k</mml:mi></mml:mrow></mml:mrow></mml:msub></mml:math></inline-formula> indicates the time of the consistency check of execution result, and <inline-formula id="ieqn-55"><mml:math id="mml-ieqn-55"><mml:msub><mml:mi>t</mml:mi><mml:mrow><mml:mrow><mml:mi mathvariant="italic">p</mml:mi><mml:mi mathvariant="italic">o</mml:mi><mml:mi mathvariant="italic">c</mml:mi><mml:mi mathvariant="italic">k</mml:mi><mml:mi mathvariant="italic">e</mml:mi><mml:mi mathvariant="italic">t</mml:mi></mml:mrow><mml:mspace width="thinmathspace" /><mml:mrow><mml:mi mathvariant="italic">p</mml:mi><mml:mi mathvariant="italic">r</mml:mi><mml:mi mathvariant="italic">o</mml:mi><mml:mi mathvariant="italic">g</mml:mi><mml:mi mathvariant="italic">r</mml:mi><mml:mi mathvariant="italic">a</mml:mi><mml:mi mathvariant="italic">m</mml:mi></mml:mrow><mml:mspace width="thinmathspace" /><mml:mrow><mml:mi mathvariant="italic">e</mml:mi><mml:mi mathvariant="italic">x</mml:mi><mml:mi mathvariant="italic">e</mml:mi><mml:mi mathvariant="italic">c</mml:mi><mml:mi mathvariant="italic">u</mml:mi><mml:mi mathvariant="italic">t</mml:mi><mml:mi mathvariant="italic">i</mml:mi><mml:mi mathvariant="italic">o</mml:mi><mml:mi mathvariant="italic">n</mml:mi></mml:mrow></mml:mrow></mml:msub></mml:math></inline-formula> refers to the time to run a pocket program. Finally, users must use the code transformation model to estimate the time taken for the entire process of code transformation, as listed in <xref ref-type="table" rid="table-12">Table 12</xref>. <xref ref-type="disp-formula" rid="eqn-18">Eq. (18)</xref> has defined a performance index to express the speedup factor between two different methods. As a result, the proposed approach outperforms the method mentioned in the previous work, increasing the speed of the entire code transformation process up to 1.38 times.</p>
<p><disp-formula id="eqn-17"><label>(17)</label><mml:math id="mml-eqn-17" display="block"><mml:mtable columnalign="right left right left right left right left right left right left" rowspacing="3pt" columnspacing="0em 2em 0em 2em 0em 2em 0em 2em 0em 2em 0em" displaystyle="true"><mml:mtr><mml:mtd><mml:msub><mml:mi>t</mml:mi><mml:mrow><mml:mrow><mml:mi mathvariant="italic">t</mml:mi><mml:mi mathvariant="italic">o</mml:mi><mml:mi mathvariant="italic">t</mml:mi><mml:mi mathvariant="italic">a</mml:mi><mml:mi mathvariant="italic">l</mml:mi></mml:mrow></mml:mrow></mml:msub></mml:mtd><mml:mtd><mml:mi></mml:mi><mml:mo>=</mml:mo><mml:msub><mml:mi>t</mml:mi><mml:mrow><mml:mrow><mml:mi mathvariant="italic">s</mml:mi><mml:mi mathvariant="italic">e</mml:mi><mml:mi mathvariant="italic">g</mml:mi><mml:mi mathvariant="italic">m</mml:mi><mml:mi mathvariant="italic">e</mml:mi><mml:mi mathvariant="italic">n</mml:mi><mml:mi mathvariant="italic">t</mml:mi><mml:mi mathvariant="italic">a</mml:mi><mml:mi mathvariant="italic">t</mml:mi><mml:mi mathvariant="italic">i</mml:mi><mml:mi mathvariant="italic">o</mml:mi><mml:mi mathvariant="italic">n</mml:mi></mml:mrow></mml:mrow></mml:msub><mml:mspace width="thinmathspace" /><mml:mo>+</mml:mo><mml:mspace width="thinmathspace" /><mml:msub><mml:mi>t</mml:mi><mml:mrow><mml:mrow><mml:mi mathvariant="italic">s</mml:mi><mml:mi mathvariant="italic">a</mml:mi><mml:mi mathvariant="italic">m</mml:mi><mml:mi mathvariant="italic">p</mml:mi><mml:mi mathvariant="italic">l</mml:mi><mml:mi mathvariant="italic">e</mml:mi></mml:mrow><mml:mspace width="thinmathspace" /><mml:mrow><mml:mi mathvariant="italic">p</mml:mi><mml:mi mathvariant="italic">r</mml:mi><mml:mi mathvariant="italic">o</mml:mi><mml:mi mathvariant="italic">g</mml:mi><mml:mi mathvariant="italic">r</mml:mi><mml:mi mathvariant="italic">a</mml:mi><mml:mi mathvariant="italic">m</mml:mi></mml:mrow><mml:mspace width="thinmathspace" /><mml:mrow><mml:mi mathvariant="italic">r</mml:mi><mml:mi mathvariant="italic">e</mml:mi><mml:mi mathvariant="italic">t</mml:mi><mml:mi mathvariant="italic">r</mml:mi><mml:mi mathvariant="italic">i</mml:mi><mml:mi mathvariant="italic">e</mml:mi><mml:mi mathvariant="italic">v</mml:mi><mml:mi mathvariant="italic">a</mml:mi><mml:mi mathvariant="italic">l</mml:mi></mml:mrow></mml:mrow></mml:msub><mml:mspace width="thinmathspace" /><mml:mo>+</mml:mo><mml:mspace width="thinmathspace" /><mml:msub><mml:mi>t</mml:mi><mml:mrow><mml:mi>c</mml:mi><mml:mi>o</mml:mi><mml:mi>d</mml:mi><mml:mi>e</mml:mi><mml:mspace width="thinmathspace" /><mml:mrow><mml:mi mathvariant="italic">t</mml:mi><mml:mi mathvariant="italic">r</mml:mi><mml:mi mathvariant="italic">a</mml:mi><mml:mi mathvariant="italic">n</mml:mi><mml:mi mathvariant="italic">s</mml:mi><mml:mi mathvariant="italic">f</mml:mi><mml:mi mathvariant="italic">o</mml:mi><mml:mi mathvariant="italic">r</mml:mi><mml:mi mathvariant="italic">m</mml:mi><mml:mi mathvariant="italic">a</mml:mi><mml:mi mathvariant="italic">t</mml:mi><mml:mi mathvariant="italic">i</mml:mi><mml:mi mathvariant="italic">o</mml:mi><mml:mi mathvariant="italic">n</mml:mi></mml:mrow></mml:mrow></mml:msub><mml:mspace width="thinmathspace" /><mml:mo>+</mml:mo><mml:mspace width="thinmathspace" /><mml:msub><mml:mi>t</mml:mi><mml:mrow><mml:mi>c</mml:mi><mml:mi>o</mml:mi><mml:mi>d</mml:mi><mml:mi>e</mml:mi><mml:mspace width="thinmathspace" /><mml:mrow><mml:mi mathvariant="italic">s</mml:mi><mml:mi mathvariant="italic">i</mml:mi><mml:mi mathvariant="italic">m</mml:mi><mml:mi mathvariant="italic">i</mml:mi><mml:mi mathvariant="italic">l</mml:mi><mml:mi mathvariant="italic">a</mml:mi><mml:mi mathvariant="italic">r</mml:mi><mml:mi mathvariant="italic">i</mml:mi><mml:mi mathvariant="italic">t</mml:mi><mml:mi mathvariant="italic">y</mml:mi></mml:mrow><mml:mspace width="thinmathspace" /><mml:mrow><mml:mi mathvariant="italic">c</mml:mi><mml:mi mathvariant="italic">h</mml:mi><mml:mi mathvariant="italic">e</mml:mi><mml:mi mathvariant="italic">c</mml:mi><mml:mi mathvariant="italic">k</mml:mi></mml:mrow></mml:mrow></mml:msub><mml:mspace width="thinmathspace" /><mml:mo>+</mml:mo><mml:mspace width="thinmathspace" /><mml:msub><mml:mi>t</mml:mi><mml:mrow><mml:mrow><mml:mi mathvariant="italic">c</mml:mi><mml:mi mathvariant="italic">o</mml:mi><mml:mi mathvariant="italic">m</mml:mi><mml:mi mathvariant="italic">p</mml:mi><mml:mi mathvariant="italic">l</mml:mi><mml:mi mathvariant="italic">i</mml:mi><mml:mi mathvariant="italic">n</mml:mi><mml:mi mathvariant="italic">g</mml:mi></mml:mrow><mml:mspace width="thinmathspace" /><mml:mrow><mml:mi mathvariant="italic">q</mml:mi><mml:mi mathvariant="italic">u</mml:mi><mml:mi mathvariant="italic">a</mml:mi><mml:mi mathvariant="italic">l</mml:mi><mml:mi mathvariant="italic">i</mml:mi><mml:mi mathvariant="italic">f</mml:mi><mml:mi mathvariant="italic">i</mml:mi><mml:mi mathvariant="italic">e</mml:mi><mml:mi mathvariant="italic">d</mml:mi></mml:mrow><mml:mspace width="thinmathspace" /><mml:mrow><mml:mi mathvariant="italic">p</mml:mi><mml:mi mathvariant="italic">r</mml:mi><mml:mi mathvariant="italic">o</mml:mi><mml:mi mathvariant="italic">g</mml:mi><mml:mi mathvariant="italic">r</mml:mi><mml:mi mathvariant="italic">a</mml:mi><mml:mi mathvariant="italic">m</mml:mi></mml:mrow></mml:mrow></mml:msub></mml:mtd></mml:mtr><mml:mtr><mml:mtd /><mml:mtd><mml:mi></mml:mi><mml:mo>+</mml:mo><mml:mspace width="thinmathspace" /><mml:msub><mml:mi>t</mml:mi><mml:mrow><mml:mrow><mml:mi mathvariant="italic">c</mml:mi><mml:mi mathvariant="italic">o</mml:mi><mml:mi mathvariant="italic">n</mml:mi><mml:mi mathvariant="italic">f</mml:mi><mml:mi mathvariant="italic">o</mml:mi><mml:mi mathvariant="italic">r</mml:mi><mml:mi mathvariant="italic">m</mml:mi><mml:mi mathvariant="italic">i</mml:mi><mml:mi mathvariant="italic">t</mml:mi><mml:mi mathvariant="italic">y</mml:mi></mml:mrow><mml:mspace width="thinmathspace" /><mml:mrow><mml:mi mathvariant="italic">c</mml:mi><mml:mi mathvariant="italic">h</mml:mi><mml:mi mathvariant="italic">e</mml:mi><mml:mi mathvariant="italic">c</mml:mi><mml:mi mathvariant="italic">k</mml:mi></mml:mrow></mml:mrow></mml:msub><mml:mspace width="thinmathspace" /><mml:mo>+</mml:mo><mml:mspace width="thinmathspace" /><mml:msub><mml:mi>t</mml:mi><mml:mrow><mml:mrow><mml:mi mathvariant="italic">p</mml:mi><mml:mi mathvariant="italic">o</mml:mi><mml:mi mathvariant="italic">c</mml:mi><mml:mi mathvariant="italic">k</mml:mi><mml:mi mathvariant="italic">e</mml:mi><mml:mi mathvariant="italic">t</mml:mi></mml:mrow><mml:mspace width="thinmathspace" /><mml:mrow><mml:mi mathvariant="italic">p</mml:mi><mml:mi mathvariant="italic">r</mml:mi><mml:mi mathvariant="italic">o</mml:mi><mml:mi mathvariant="italic">g</mml:mi><mml:mi mathvariant="italic">r</mml:mi><mml:mi mathvariant="italic">a</mml:mi><mml:mi mathvariant="italic">m</mml:mi></mml:mrow><mml:mspace width="thinmathspace" /><mml:mrow><mml:mi mathvariant="italic">e</mml:mi><mml:mi mathvariant="italic">x</mml:mi><mml:mi mathvariant="italic">e</mml:mi><mml:mi mathvariant="italic">c</mml:mi><mml:mi mathvariant="italic">u</mml:mi><mml:mi mathvariant="italic">t</mml:mi><mml:mi mathvariant="italic">i</mml:mi><mml:mi mathvariant="italic">o</mml:mi><mml:mi mathvariant="italic">n</mml:mi></mml:mrow></mml:mrow></mml:msub></mml:mtd></mml:mtr></mml:mtable></mml:math></disp-formula></p>
<p><disp-formula id="eqn-18"><label>(18)</label><mml:math id="mml-eqn-18" display="block"><mml:mi>P</mml:mi><mml:msub><mml:mi>I</mml:mi><mml:mrow><mml:mrow><mml:mi mathvariant="italic">p</mml:mi><mml:mi mathvariant="italic">r</mml:mi><mml:mi mathvariant="italic">o</mml:mi><mml:mi mathvariant="italic">p</mml:mi><mml:mi mathvariant="italic">o</mml:mi><mml:mi mathvariant="italic">s</mml:mi><mml:mi mathvariant="italic">e</mml:mi><mml:mi mathvariant="italic">d</mml:mi></mml:mrow></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:mfrac><mml:mfrac><mml:mn>1</mml:mn><mml:msub><mml:mi>t</mml:mi><mml:mrow><mml:mrow><mml:mi mathvariant="italic">t</mml:mi><mml:mi mathvariant="italic">o</mml:mi><mml:mi mathvariant="italic">t</mml:mi><mml:mi mathvariant="italic">a</mml:mi><mml:mi mathvariant="italic">l</mml:mi></mml:mrow><mml:mi mathvariant="normal">&#x005F;</mml:mi><mml:mrow><mml:mi mathvariant="italic">p</mml:mi><mml:mi mathvariant="italic">r</mml:mi><mml:mi mathvariant="italic">o</mml:mi><mml:mi mathvariant="italic">p</mml:mi><mml:mi mathvariant="italic">o</mml:mi><mml:mi mathvariant="italic">s</mml:mi><mml:mi mathvariant="italic">e</mml:mi><mml:mi mathvariant="italic">d</mml:mi></mml:mrow></mml:mrow></mml:msub></mml:mfrac><mml:mfrac><mml:mn>1</mml:mn><mml:msub><mml:mi>t</mml:mi><mml:mrow><mml:mrow><mml:mi mathvariant="italic">t</mml:mi><mml:mi mathvariant="italic">o</mml:mi><mml:mi mathvariant="italic">t</mml:mi><mml:mi mathvariant="italic">a</mml:mi><mml:mi mathvariant="italic">l</mml:mi></mml:mrow><mml:mi mathvariant="normal">&#x005F;</mml:mi><mml:mrow><mml:mi mathvariant="italic">p</mml:mi><mml:mi mathvariant="italic">r</mml:mi><mml:mi mathvariant="italic">e</mml:mi><mml:mi mathvariant="italic">v</mml:mi><mml:mi mathvariant="italic">i</mml:mi><mml:mi mathvariant="italic">o</mml:mi><mml:mi mathvariant="italic">u</mml:mi><mml:mi mathvariant="italic">s</mml:mi></mml:mrow></mml:mrow></mml:msub></mml:mfrac></mml:mfrac></mml:math></disp-formula></p>
<table-wrap id="table-12">
<label>Table 12</label>
<caption>
<title>Execution time of the entire process and performance index</title>
</caption>
<table frame="hsides">
<colgroup>
<col align="left"/>
<col align="left"/>
<col align="left"/>
<col align="left"/>
</colgroup>
<thead>
<tr>
<th>Case</th>
<th><inline-formula id="ieqn-56"><mml:math id="mml-ieqn-56"><mml:msub><mml:mi>t</mml:mi><mml:mrow><mml:mrow><mml:mi mathvariant="italic">t</mml:mi><mml:mi mathvariant="italic">o</mml:mi><mml:mi mathvariant="italic">t</mml:mi><mml:mi mathvariant="italic">a</mml:mi><mml:mi mathvariant="italic">l</mml:mi></mml:mrow><mml:mi mathvariant="normal">&#x005F;</mml:mi><mml:mrow><mml:mi mathvariant="italic">p</mml:mi><mml:mi mathvariant="italic">r</mml:mi><mml:mi mathvariant="italic">e</mml:mi><mml:mi mathvariant="italic">v</mml:mi><mml:mi mathvariant="italic">i</mml:mi><mml:mi mathvariant="italic">o</mml:mi><mml:mi mathvariant="italic">u</mml:mi><mml:mi mathvariant="italic">s</mml:mi></mml:mrow></mml:mrow></mml:msub></mml:math></inline-formula> (s)</th>
<th><inline-formula id="ieqn-57"><mml:math id="mml-ieqn-57"><mml:msub><mml:mi>t</mml:mi><mml:mrow><mml:mrow><mml:mi mathvariant="italic">t</mml:mi><mml:mi mathvariant="italic">o</mml:mi><mml:mi mathvariant="italic">t</mml:mi><mml:mi mathvariant="italic">a</mml:mi><mml:mi mathvariant="italic">l</mml:mi></mml:mrow><mml:mi mathvariant="normal">&#x005F;</mml:mi><mml:mrow><mml:mi mathvariant="italic">p</mml:mi><mml:mi mathvariant="italic">r</mml:mi><mml:mi mathvariant="italic">o</mml:mi><mml:mi mathvariant="italic">p</mml:mi><mml:mi mathvariant="italic">o</mml:mi><mml:mi mathvariant="italic">s</mml:mi><mml:mi mathvariant="italic">e</mml:mi><mml:mi mathvariant="italic">d</mml:mi></mml:mrow></mml:mrow></mml:msub></mml:math></inline-formula> (s)</th>
<th>PI</th>
</tr>
</thead>
<tbody>
<tr>
<td>Example 1</td>
<td>2635.34</td>
<td>2633.62</td>
<td>1.00</td>
</tr>
<tr>
<td>Example 2</td>
<td>3045.50</td>
<td>2922.02</td>
<td>1.04</td>
</tr>
<tr>
<td>Example 3</td>
<td>10,478.24</td>
<td>5655.76</td>
<td>1.85</td>
</tr>
<tr>
<td>Example 4</td>
<td>3570.98</td>
<td>3098.50</td>
<td>1.15</td>
</tr>
<tr>
<td>Average</td>
<td>4932.52</td>
<td>3577.48</td>
<td>1.38</td>
</tr>
</tbody>
</table>
</table-wrap>
</sec>
<sec id="s4_3_4">
<label>4.3.4</label>
<title>Experiment 4</title>
<p>This study uses LIME to explain the decision-making from AI models or algorithms such as GPT-2, MASS, BART, simhash, variational simhash, LCS, and PLCS. First, users applied LIME to interpret the outcomes of the decisions made from three pre-trained code transformation models, GPT-2, MASS, and BART. Given sample program 1, GPT-2, MASS, or BART produced the newly generated programs and then sent them into LIME to obtain the explainable results, as shown in <xref ref-type="fig" rid="fig-30">Figs. 30</xref>&#x2013;<xref ref-type="fig" rid="fig-32">32</xref>. The results show the effect of each line of the program and its probability of being generated. It shows that pre-trained code transformation models can decide what code should not be generated, thus making the code transformation process more efficient. As a result, there is no difference in the code transformation results among the three models mentioned above.</p>
<fig id="fig-30">
<label>Figure 30</label>
<caption>
<title>LIME explains the results produced by GPT-2</title>
</caption>
<graphic mimetype="image" mime-subtype="png" xlink:href="CMES_24018-fig-30.png"/>
</fig>
<fig id="fig-31">
<label>Figure 31</label>
<caption>
<title>LIME explains the results produced by MASS</title>
</caption>
<graphic mimetype="image" mime-subtype="png" xlink:href="CMES_24018-fig-31.png"/>
</fig>
<fig id="fig-32">
<label>Figure 32</label>
<caption>
<title>LIME explains the results produced by BART</title>
</caption>
<graphic mimetype="image" mime-subtype="png" xlink:href="CMES_24018-fig-32.png"/>
</fig>
<p>Next, users applied LIME to explain the decision-making from the algorithms of code similarity check, both simhash and variational simhash algorithms. Given the preliminary programs and the corresponding sample program, simhash or variational simhash produced the newly qualified programs and then sent them into LIME to obtain the explainable results, as shown in <xref ref-type="fig" rid="fig-33">Figs. 33</xref>&#x2013;<xref ref-type="fig" rid="fig-34">34</xref>. The weights of the words in a code line affect the result of the code similarity check. Finally, given the qualified programs and the corresponding sample program, LCS and PLCS produced the comparison of the execution results of the sample program and the pocket program. They then sent them into LIME to obtain the explainable results, as shown in <xref ref-type="fig" rid="fig-35">Figs. 35</xref> and <xref ref-type="fig" rid="fig-36">36</xref>. Consequently, the ASCII or binary code length affects the execution time significantly.</p>
<fig id="fig-33">
<label>Figure 33</label>
<caption>
<title>LIME explains the results produced by simhash</title>
</caption>
<graphic mimetype="image" mime-subtype="png" xlink:href="CMES_24018-fig-33.png"/>
</fig>
<fig id="fig-34">
<label>Figure 34</label>
<caption>
<title>LIME explains the results produced by variational simhash</title>
</caption>
<graphic mimetype="image" mime-subtype="png" xlink:href="CMES_24018-fig-34.png"/>
</fig>
<fig id="fig-35">
<label>Figure 35</label>
<caption>
<title>LIME explains the results produced by LCS</title>
</caption>
<graphic mimetype="image" mime-subtype="png" xlink:href="CMES_24018-fig-35.png"/>
</fig>
<fig id="fig-36">
<label>Figure 36</label>
<caption>
<title>LIME explains the results produced by LCS</title>
</caption>
<graphic mimetype="image" mime-subtype="png" xlink:href="CMES_24018-fig-36.png"/>
</fig>
<p>This study uses LIME to explain the AI model or algorithm decision-making and let people learn how the system works to optimize the algorithm and increase the overall efficiency. This study complies consistently with the European Parliament-issued Ethics Guidelines for Trustworthy AI, proving that this study is trustworthy.</p>
</sec>
</sec>
<sec id="s4_4">
<label>4.4</label>
<title>Discussion</title>
<p>In terms of code transformation models GPT-2, MASS, and BART introduced in <xref ref-type="sec" rid="s2">Section 2</xref>, this study has validated that we used a pre-trained model for the transfer learning technique to train a generative program model running two passes through code transformation models. Then it can produce higher-performance generated programs newly. However, the followed verification process in the test phase will encounter the time-consuming problem for the checks of code similarity and execution result conformity, mainly a considerable amount of output data taking a long time. Therefore, the proposed variational simhash algorithm can appropriately adjust the weighted values of keywords or reserved words of Python programming. The accuracy of the code similarity check can increase by 24%, superior to the simhash algorithm, as described in <xref ref-type="sec" rid="s3_2">Section 3.2</xref>. Moreover, compared with LCS described in <xref ref-type="sec" rid="s3_3">Section 3.3</xref>, the proposed PLCS algorithm can reduce the number of comparisons by 31.82% of conformity checks and speed up the computation by 32.39%. Finally, in the experimental results in <xref ref-type="sec" rid="s4">Section 4</xref>, the performance evaluation outcomes have testified that both proposed approaches can effectively speed up the entire code transformation process significantly.</p>
<p>In <xref ref-type="sec" rid="s4_3_2">Section 4.3.2</xref>, according to the execution results of use cases of text, pictures, and videos, <xref ref-type="table" rid="table-7">Tables 7</xref> and <xref ref-type="table" rid="table-8">8</xref> have shown that the performance of BART is better than that of GPT-2 and MASS. Regarding the execution result of the use case of speech, the performance of MASS is better than that of GPT-2 and BART. In <xref ref-type="sec" rid="s4_3_3">Section 4.3.3</xref>, compared with simhash algorithm, the proposed variational simhash algorithm can reduce the number of qualified programs effectively, as listed in <xref ref-type="table" rid="table-10">Table 10</xref>. Accordingly, it has taken less time to compile all qualified programs. Compared with LCS algorithm, the proposed PLCS algorithm can reduce the number of string comparisons for performing the conformity check of program execution results, as shown in <xref ref-type="table" rid="table-11">Table 11</xref>. Thus, it has considerably reduced the time for the outcome verification and speeds up the entire code transformation process. In <xref ref-type="sec" rid="s4_3_4">Section 4.3.4</xref>, this study uses LIME to interpret the decision-making mechanism of applied algorithms or models. <xref ref-type="fig" rid="fig-30">Figs. 30</xref>&#x2013;<xref ref-type="fig" rid="fig-36">36</xref> enable readers to understand better how to produce the outputs from algorithms or models, such as GPT-2, MASS, BART, SH, VSH, LCS, and PLCS.</p>
<p>Regarding limitations, because this study only designs variational simhash algorithm for Python programming code, this algorithm for other programming languages is not applicable. Users must recode such an algorithm according to the keywords or reserved words of the designated programming language separately. Furthermore, the proposed approach PLCS in this study only has divided a long string into five different lengths of a segment to implement a segment-by-segment comparison between two strings. If there are more than five different lengths of a segment to carry out the PLCS algorithm, it may be possible to get a faster job execution. So far, there are not many keywords and sample programs stored in the semantic database. As more and more keywords and sample programs have stored in the semantic database, it will result in slower keyword searching in the semantic database and poor overall performance of the code transformation process.</p>
</sec>
</sec>
<sec id="s5">
<label>5</label>
<title>Conclusion</title>
<p>The main contribution of this paper is to improve the execution efficiency on both the similarity check of the program&#x2019;s code and the conformity check of program execution results, which can speed up the entire code transformation process significantly. In other words, the proposed approaches have achieved the objective of this study to implement a high-efficient code transformation process by reducing the execution time considerably. Compared with the previous work, the proposed approaches can significantly speed up the entire code transformation process by 1.38 times. Meanwhile, explainable AI techniques can also interpret the decision-making of AI models. Here we use LIME to let people learn how the system works to optimize the algorithm and increase the overall efficiency.</p>
<p>In future work, we must devote ourselves to database searching and variational simhash algorithm improvements. Regarding database searching, users can develop deep learning methods to optimize data storage to rapidly retrieve keywords and sample or pocket programs in a semantic database. For the variational simhash algorithm, we should consider extending the variational simhash algorithm to several popular programming languages except for Python. Thus, the above improvements can hopefully conquer the limitations stated in the discussion section.</p>
</sec>
</body>
<back>
<fn-group>
<fn fn-type="other"><p><bold>Data Availability:</bold> Readers can find the Sample Program.zip data used to support this study&#x0027;s findings deposited in the <uri>https://drive.google.com/file/d/1SPfMmKr43bQDvxU5iY9O1jpab7H-GUGn/view?</uri> The article has included the sample sentence data used to support the findings of this study.</p>
</fn>
<fn fn-type="other"><p><bold>Author Contributions:</bold> B.R.C. and H.-L.C. conceived and designed the experiments; H.-F.T. collected the experimental dataset and proofread the paper; B.R.C. wrote the paper.</p>
</fn>
<fn fn-type="other"><p><bold>Funding Statement:</bold> This work is fully supported by the Ministry of Science and Technology, Taiwan, under Grant Nos. MOST 111-2221-E-390-012 and MOST 111-2622-E-390-001.</p>
</fn>
<fn fn-type="conflict"><p><bold>Conflicts of Interest:</bold> The authors declare that they have no conflicts of interest to report regarding the present study.</p>
</fn>
</fn-group>
<ref-list content-type="authoryear">
<title>References</title>
<ref id="ref-1"><label>1.</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><surname>Chakaravarthy</surname>, <given-names>R. V.</given-names></string-name>, <string-name><surname>Jiang</surname>, <given-names>H.</given-names></string-name></person-group> (<year>2020</year>). <article-title>Special session: XTA: Open source extensible, scalable and adaptable tensor architecture for AI acceleration</article-title>. <conf-name>2020 IEEE 38th International Conference on Computer Design (ICCD)</conf-name>, pp. <fpage>53</fpage>&#x2013;<lpage>56</lpage>. Hartford, CT, USA.</mixed-citation></ref>
<ref id="ref-2"><label>2.</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><surname>Kumar</surname>, <given-names>S. D.</given-names></string-name>, <string-name><surname>Subha</surname>, <given-names>D. P.</given-names></string-name></person-group> (<year>2019</year>). <article-title>Prediction of depression from EEG signal using long short term memory (LSTM)</article-title>. <conf-name>2019 3rd International Conference on Trends in Electronics and Informatics (ICOEI)</conf-name>, pp. <fpage>1248</fpage>&#x2013;<lpage>1253</lpage>. Tirunelveli, India.</mixed-citation></ref>
<ref id="ref-3"><label>3.</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><surname>&#x00D6;nder</surname>, <given-names>M.</given-names></string-name>, <string-name><surname>Akg&#x00FC;l</surname>, <given-names>Y. S.</given-names></string-name></person-group> (<year>2020</year>). <article-title>Automatic generation of matching clothes design using generative adversarial networks</article-title>. <conf-name>2020 28th Signal Processing and Communications Applications Conference (SIU)</conf-name>, pp. <fpage>1</fpage>&#x2013;<lpage>4</lpage>. Gaziantep, Turkey.</mixed-citation></ref>
<ref id="ref-4"><label>4.</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Bird</surname>, <given-names>S.</given-names></string-name>, <string-name><surname>Klein</surname>, <given-names>E.</given-names></string-name>, <string-name><surname>Loper</surname>, <given-names>E.</given-names></string-name></person-group> (<year>2010</year>). <article-title>Natural language processing with python, analyzing text with the natural language toolkit</article-title>. <source>Language Resources and Evaluation</source><italic>,</italic> <volume>44</volume><italic>(</italic><issue>4</issue><italic>),</italic> <fpage>421</fpage>&#x2013;<lpage>424</lpage>.</mixed-citation></ref>
<ref id="ref-5"><label>5.</label><mixed-citation publication-type="other"><person-group person-group-type="author"><string-name><surname>Radford</surname>, <given-names>A.</given-names></string-name>, <string-name><surname>Narasimhan</surname>, <given-names>K.</given-names></string-name>, <string-name><surname>Salimans</surname>, <given-names>T.</given-names></string-name>, <string-name><surname>Sutskever</surname>, <given-names>I.</given-names></string-name></person-group> (<year>2019</year>). <article-title>Improving language understanding by generative pre-training</article-title>. <uri xlink:href="https://s3-us-west-2.amazonaws.com/openai-assets/research-covers/language-unsupervised/language_understanding_paper.pdf">https://s3-us-west-2.amazonaws.com/openai-assets/research-covers/language-unsupervised/language_understanding_paper.pdf</uri>.</mixed-citation></ref>
<ref id="ref-6"><label>6.</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><surname>Yanagi</surname>, <given-names>Y.</given-names></string-name>, <string-name><surname>Orihara</surname>, <given-names>R.</given-names></string-name>, <string-name><surname>Sei</surname>, <given-names>Y.</given-names></string-name>, <string-name><surname>Tahara</surname>, <given-names>Y.</given-names></string-name>, <string-name><surname>Ohsuga</surname>, <given-names>A.</given-names></string-name></person-group> (<year>2020</year>). <article-title>Fake news detection with generated comments for news articles</article-title>. <conf-name>2020 IEEE 24th International Conference on Intelligent Engineering Systems (INES)</conf-name>, pp. <fpage>85</fpage>&#x2013;<lpage>90</lpage>. Reykjav&#x00ED;k, Iceland.</mixed-citation></ref>
<ref id="ref-7"><label>7.</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Chang</surname>, <given-names>B. R.</given-names></string-name>, <string-name><surname>Tsai</surname>, <given-names>H. F.</given-names></string-name>, <string-name><surname>Su</surname>, <given-names>P. W.</given-names></string-name></person-group> (<year>2021</year>). <article-title>Code transform model producing high-performance program</article-title>. <source>Computer Modeling in Engineering &#x0026; Science</source><italic>,</italic> <volume>129</volume><italic>(</italic><issue>1</issue><italic>),</italic> <fpage>253</fpage>&#x2013;<lpage>277</lpage>. DOI <pub-id pub-id-type="doi">10.32604/cmes.2021.015673</pub-id>.</mixed-citation></ref>
<ref id="ref-8"><label>8.</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Song</surname>, <given-names>K.</given-names></string-name>, <string-name><surname>Tan</surname>, <given-names>X.</given-names></string-name>, <string-name><surname>Qin</surname>, <given-names>T.</given-names></string-name>, <string-name><surname>Lu</surname>, <given-names>J.</given-names></string-name>, <string-name><surname>Liu</surname>, <given-names>T. Y.</given-names></string-name></person-group> (<year>2019</year>). <article-title>Mass: Masked sequence to sequence pre-training for language generation</article-title>. <source>arXiv preprint arXiv: 1905.02450.</source></mixed-citation></ref>
<ref id="ref-9"><label>9.</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Lewis</surname>, <given-names>M.</given-names></string-name>, <string-name><surname>Liu</surname>, <given-names>Y.</given-names></string-name>, <string-name><surname>Goyal</surname>, <given-names>N.</given-names></string-name>, <string-name><surname>Ghazvininejad</surname>, <given-names>M.</given-names></string-name>, <string-name><surname>Mohamed</surname>, <given-names>A.</given-names></string-name> <etal>et al.</etal></person-group> (<year>2019</year>). <article-title>Bart: Denoising sequence-to-sequence pre-training for natural language generation, translation, and comprehension</article-title>. <source>arXiv preprint arXiv: 1910.13461.</source></mixed-citation></ref>
<ref id="ref-10"><label>10.</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><surname>Yuan</surname>, <given-names>Y.</given-names></string-name>, <string-name><surname>Li</surname>, <given-names>R.</given-names></string-name>, <string-name><surname>Wang</surname>, <given-names>Y.</given-names></string-name>, <string-name><surname>Cao</surname>, <given-names>T.</given-names></string-name>, <string-name><surname>Yang</surname>, <given-names>J.</given-names></string-name> <etal>et al.</etal></person-group> (<year>2020</year>). <article-title>Application of the maintenance text data of transformers based on SimHash and Hamming distance algorithm</article-title>. <conf-name>2020 IEEE International Conference on High Voltage Engineering and Application (ICHVE)</conf-name>, pp. <fpage>1</fpage>&#x2013;<lpage>4</lpage>. Beijing, China.</mixed-citation></ref>
<ref id="ref-11"><label>11.</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><surname>Qin</surname>, <given-names>M.</given-names></string-name></person-group> (<year>2018</year>). <article-title>Hamming-distance-based binary representation of numbers</article-title>. <conf-name>2018 Information Theory and Applications Workshop (ITA)</conf-name>, pp. <fpage>1</fpage>&#x2013;<lpage>9</lpage>. San Diego, CA, USA: <publisher-name>IEEE</publisher-name>.</mixed-citation></ref>
<ref id="ref-12"><label>12.</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><surname>Chen</surname>, <given-names>X.</given-names></string-name>, <string-name><surname>Peng</surname>, <given-names>A.</given-names></string-name>, <string-name><surname>Tang</surname>, <given-names>B.</given-names></string-name></person-group> (<year>2020</year>). <article-title>Automatic radio map adaptation for wifi fingerprint positioning systems</article-title>. <conf-name>2020 5th International Conference on Communication, Image and Signal Processing (CCISP)</conf-name>, pp. <fpage>64</fpage>&#x2013;<lpage>69</lpage>. Chengdu, China.</mixed-citation></ref>
<ref id="ref-13"><label>13.</label><mixed-citation publication-type="other"><person-group person-group-type="author"><string-name><surname>Burghardt</surname>, <given-names>J.</given-names></string-name></person-group> (<year>2021</year>). <article-title>Longest common subsequence problem</article-title>. <uri xlink:href="https://en.wikipedia.org/wiki/Longest_common_subsequence_problem">https://en.wikipedia.org/wiki/Longest_common_subsequence_problem</uri>.</mixed-citation></ref>
<ref id="ref-14"><label>14.</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><surname>Ribeiro</surname>, <given-names>M. T.</given-names></string-name>, <string-name><surname>Singh</surname>, <given-names>S.</given-names></string-name>, <string-name><surname>Guestrin</surname>, <given-names>C.</given-names></string-name></person-group> (<year>2016</year>). &#x201C;<article-title>Why should i trust you?&#x201D;: Explaining the predictions of any classifier</article-title>. <conf-name>Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining (KDD)</conf-name>, pp. <fpage>1135</fpage>&#x2013;<lpage>1144</lpage>. San Francisco, CA, USA.</mixed-citation></ref>
<ref id="ref-15"><label>15.</label><mixed-citation publication-type="other"><person-group person-group-type="author"><string-name><surname>Chou</surname>, <given-names>H. L.</given-names></string-name></person-group> (<year>2021</year>). <article-title>Test1</article-title>. <uri>https://github.com/m1085504/Data-exsaple/blob/main/test</uri>.</mixed-citation></ref>
<ref id="ref-16"><label>16.</label><mixed-citation publication-type="other"><person-group person-group-type="author"><string-name><surname>Chou</surname>, <given-names>H. L.</given-names></string-name></person-group> (<year>2021</year>). <article-title>Test2</article-title>. <uri>https://github.com/m1085504/Data-exsaple/blob/main/test1</uri>.</mixed-citation></ref>
<ref id="ref-17"><label>17.</label><mixed-citation publication-type="other"><person-group person-group-type="author"><string-name><surname>Chou</surname>, <given-names>H. L.</given-names></string-name></person-group> (<year>2021</year>). <article-title>Exchange-rate</article-title>. <uri>https://github.com/m1085504/Data-exsaple/blob/main/Exchange-Rate</uri>.</mixed-citation></ref>
<ref id="ref-18"><label>18.</label><mixed-citation publication-type="other"><person-group person-group-type="author"><string-name><surname>Chou</surname>, <given-names>H. L.</given-names></string-name></person-group> (<year>2021</year>). <article-title>Picture</article-title>. <uri>https://github.com/m1085504/Data-exsaple/blob/main/picture</uri>.</mixed-citation></ref>
<ref id="ref-19"><label>19.</label><mixed-citation publication-type="other"><person-group person-group-type="author"><string-name><surname>Chou</surname>, <given-names>H. L.</given-names></string-name></person-group> (<year>2021</year>). <article-title>Voice</article-title>. <uri>https://github.com/m1085504/Data-exsaple/blob/main/voice</uri>.</mixed-citation></ref>
<ref id="ref-20"><label>20.</label><mixed-citation publication-type="other"><person-group person-group-type="author"><string-name><surname>Chou</surname>, <given-names>H. L.</given-names></string-name></person-group> (<year>2021</year>). <article-title>Video</article-title>. <uri>https://github.com/m1085504/Data-exsaple/blob/main/video</uri>.</mixed-citation></ref>
<ref id="ref-21"><label>21.</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><surname>Mantor</surname>, <given-names>M.</given-names></string-name></person-group> (<year>2019</year>). <article-title>7NM &#x201C;NAVI&#x201D; GPU&#x2013;A GPU built for performance and efficiency</article-title>. <conf-name>2019 IEEE Hot Chips 31 Symposium (HCS)</conf-name>, Cupertino, CA, USA.</mixed-citation></ref>
<ref id="ref-22"><label>22.</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><surname>Agustin</surname>, <given-names>F.</given-names></string-name>, <string-name><surname>Kurniawan</surname>, <given-names>H.</given-names></string-name>, <string-name><surname>Yusfrizal</surname>, <given-names>Y.</given-names></string-name>, <string-name><surname>Ummi</surname>, <given-names>K.</given-names></string-name></person-group> (<year>2019</year>). <article-title>Comparative analysis of application quality between AppServ and XAMPP webserver using AHP based on ISO/IEC 25010:2011</article-title>. <conf-name>2018 6th International Conference on Cyber and IT Service Management (CITSM)</conf-name>. Parapat Nort Sumatera, Indonesia.</mixed-citation></ref>
<ref id="ref-23"><label>23.</label><mixed-citation publication-type="other"><person-group person-group-type="author"><string-name><surname>Lin</surname>, <given-names>J. W.</given-names></string-name></person-group> (<year>2020</year>). <article-title>Web-crawler</article-title>. <uri>https://github.com/jwlin/web-crawler-tutorial</uri>.</mixed-citation></ref>
<ref id="ref-24"><label>24.</label><mixed-citation publication-type="other"><person-group person-group-type="author"><string-name><surname>Chou</surname>, <given-names>H. L.</given-names></string-name></person-group> (<year>2021</year>). <article-title>Network</article-title>. <uri>https://github.com/m1085504/Data-exsaple/blob/main/Network</uri>.</mixed-citation></ref>
<ref id="ref-25"><label>25.</label><mixed-citation publication-type="other"><person-group person-group-type="author"><string-name><surname>Chou</surname>, <given-names>H. L.</given-names></string-name></person-group> (<year>2021</year>). <article-title>Music</article-title>. <uri>https://github.com/m1085504/Data-exsaple/blob/main/Mucis</uri>.</mixed-citation></ref>
<ref id="ref-26"><label>26.</label><mixed-citation publication-type="other"><person-group person-group-type="author"><string-name><surname>Chou</surname>, <given-names>H. L.</given-names></string-name></person-group> (<year>2021</year>). <article-title>Makevideo</article-title>. <uri>https://github.com/m1085504/Data-exsaple/blob/main/Makevideo</uri>.</mixed-citation></ref>
</ref-list>
<app-group>
<app id="app-1">
<title></title>
<sec id="s8">
<title/>
<p><bold>Appendix</bold></p>
<p>In the Experiment 2, samples of the generated programs are shown in <xref ref-type="fig" rid="fig-37">Figs. 37</xref>&#x2013;<xref ref-type="fig" rid="fig-40">40</xref>.</p>
<fig id="fig-37">
<label>Figure 37</label>
<caption>
<title>Sampled preliminary program associated with sample program 1 in Experiment 2</title>
</caption>
<graphic mimetype="image" mime-subtype="png" xlink:href="CMES_24018-fig-37.png"/>
</fig>
<fig id="fig-38">
<label>Figure 38</label>
<caption>
<title>Sampled preliminary program associated with sample program 2 in Experiment 2</title>
</caption>
<graphic mimetype="image" mime-subtype="png" xlink:href="CMES_24018-fig-38.png"/>
</fig>
<fig id="fig-39">
<label>Figure 39</label>
<caption>
<title>Sampled preliminary program associated with sample program 3 in Experiment 2</title>
</caption>
<graphic mimetype="image" mime-subtype="png" xlink:href="CMES_24018-fig-39.png"/>
</fig>
<fig id="fig-40">
<label>Figure 40</label>
<caption>
<title>Sampled preliminary program associated with sample program 4 in Experiment 2</title>
</caption>
<graphic mimetype="image" mime-subtype="png" xlink:href="CMES_24018-fig-40.png"/>
</fig>
</sec>
</app>
</app-group>
</back>
</article>
