%% helpers
\newcommand{\entente}{\textsc{Entente}}
\newcommand{\js}{JS}
\newcommand{\javascript}{JavaScript}
\newcommand{\es}{EcmaScript}
\newcommand{\ecmascript}{\es{}}
\newcommand{\tname}{TNAME}
\newcommand{\Comment}[1]{}
\newcommand{\numsubjects}{5}
\newcommand{\etal}{and colleagues'}
\newcommand{\ie}{i.e.}
\newcommand{\eg}{e.g.}
\newcommand{\cmark}{\ding{51}}%
\newcommand{\xmark}{{\color{red}\ding{55}}}%
\newcommand{\pGoodGood}{$\mathit{P}${\small\cmark\!\cmark}}%
\newcommand{\pGoodBad}{$\mathit{P}${\small\cmark\!\xmark}}%
\newcommand{\pBadDontCare}{$\mathit{P_?}$}%
\newcommand{\sfl}{SFL\xspace}
\newcommand{\ddg}{DDG\xspace}
\newcommand{\totfiles}{$\sim$38K}

%% annotations
\newif\ifdraftmode
%% Comment or uncomment the \draftmodetrue line.
\draftmodetrue
\ifdraftmode
 \newcommand{\Fix}[1]{\textbf{[[}{\color{red} #1}\textbf{]]}}
 \newcommand{\Mar}[1]{\textbf{[[Marcelo: }{\color{magenta} #1}\textbf{]]}}
 \newcommand{\Igor}[1]{\textbf{[[Igor: }{\color{blue} #1}\textbf{]]}}
 \newcommand{\Breno}[1]{\textbf{[[Breno: }{\color{olive} #1}\textbf{]]}}
 \newcommand{\Gustavo}[1]{\textbf{[[Gustavo: }{\color{purple} #1}\textbf{]]}}
 \newcommand{\Jefferson}[1]{\textbf{[[Jefferson: }{\color{green} #1}\textbf{]]}}
 \newcommand{\notes}[1]{\todo[inline,color=red!30,caption={}]{#1}}
\else
 \newcommand{\Fix}[1]{\relax}
 \newcommand{\Mar}[1]{\relax}\\
 \newcommand{\Breno}[1]{\relax}
 \newcommand{\Igor}[1]{\relax}
 \newcommand{\notes}[1]{\relax}
\fi

% For submitted version only.
\pagenumbering{arabic}

% Uncomment this if you need more space
%% \makeatletter
%% \def\@copyrightspace{\enlargethispage{-10pt}\relax}
%% \makeatother

\newcommand{\codesize}{\small}
\newcommand{\CodeIn}[1]{\mcodeid{#1}}
\newcommand{\CodeInM}[1]{\mcodeid{#1}}
% \|name| or \mathid{name} denotes identifiers and slots in formulas
\def\|#1|{\mathid{#1}}
\newcommand{\mathid}[1]{\ensuremath{\mathit{#1}}}
% \<name> or \codeid{name} denotes computer code identifiers
\def\<#1>{\codeid{#1}}
\newcommand{\codeid}[1]{\ifmmode{\mbox{\codesize\ttfamily{#1}}}\else{\codesize\ttfamily #1}\fi}
\def\<#1>{\mcodeid{#1}}
\newcommand{\mcodeid}[1]{\mbox{\codesize\ttfamily{#1}}}
\newcommand{\CodeInSmaller}[1]{\mbox{\scriptsize\ttfamily{#1}}}

%% thumbs up down
\newcommand*{\RightThumbsUpAux}[1]{%
  \begingroup
    \sbox0{Ag}%
    \raisebox{-\dp0}{%
      \includegraphics[{%
        height=\dimexpr\dp0+\ht0\relax,
        #1%
      }]{thumbsup.pdf}%
    }%
  \endgroup
}
\newcommand*{\RightThumbsUp}{%
  \RightThumbsUpAux{}%
}
\newcommand*{\RightThumbsDown}{%
  \RightThumbsUpAux{origin=c,angle=180}%
}
\newcommand*{\LeftThumbsUp}{%
  \scalebox{-1}[1]{\RightThumbsUp}%
}
\newcommand*{\LeftThumbsDown}{%
  \scalebox{-1}[1]{\RightThumbsDown}%
}

\newcommand{\checkm}{Y}
\newcommand{\crossmark}{N}
%\begin{wraptable}[20]{t}[0pt]{0.5\textwidth}

\newcommand{\totalTestFiles}{52,676} % 38,369 (before mining) 40,041 (before adding hermes)
\newcommand{\totalTestFilesPassInPar}{7,741} % 6,949-38,306 (before mining) 7,061
\newcommand{\totalTestFilesCompileInAll}{38,209} % 35,939 (before mining) 36,448
\newcommand{\totalTestFilesPassInAll}{26,203} % 23,189 (before mining) 23,808
\newcommand{\totalTestFilesForTestTransplantation}{9,485} % 6,093 (before mining) 7,263 (without babel+blogengine)




%%%%%%%%%%%%%%%%%%%
%% numbers
%%%%%%%%%%%%%%%%%%%
\newcommand{\nofuzzAll}{209}
\newcommand{\nofuzzBugs}{\Fix{XX}}
\newcommand{\nofuzzDuplicates}{63}
\newcommand{\nofuzzFalsePositives}{24}
\newcommand{\nofuzzHITotal}{177}
\newcommand{\nofuzzLOTotal}{32}
\newcommand{\nofuzzTotalFiles}{977} % conflicting files
\newcommand{\nofuzzFilesHI}{940} % conflicting files HI
\newcommand{\nofuzzFilesLO}{37} % conflicting files LO
\newcommand{\nofuzzBucketsBugsHI}{\Fix{124}} % buckets reported (including dups)
\newcommand{\nofuzzBucketsBugsLO}{\Fix{11}} % buckets reported
\newcommand{\nofuzzDupsHI}{\Fix{X}}
\newcommand{\nofuzzDupsLO}{\Fix{Y}}
\newcommand{\tableBugsNum}{\Fix{26}} % continue updating bugs table

%% no bugs
\newcommand{\noBugsTransplantation}{35\xspace} % 28 + 7
\newcommand{\noBugsTransplantationConfirmed}{23\xspace}
\newcommand{\noBugsTransplantationFixed}{19\xspace}

\newcommand{\noBugsDifferentialTesting}{24\xspace} % 22 + 2
\newcommand{\noBugsDifferentialTestingConfirmed}{17\xspace}
\newcommand{\noBugsDifferentialTestingFixed}{10\xspace}


\newcommand{\totalBugsReported}{59\xspace}
\newcommand{\totalBugsConfirmed}{39\xspace}
%\newcommand{\noBugsTotalConfirmed}{\Fix{23}}
\newcommand{\totalBugsFixed}{29\xspace}

\newcommand{\noBugsBugsReportedSMonkey}{one\xspace}
\newcommand{\noBugsBugsConfirmedSMonkey}{one\xspace}

\newcommand{\noBugsBugsReportedHermes}{four\xspace}
\newcommand{\noBugsBugsConfirmedHermes}{two\xspace}


\newcommand{\noBugsBugsReportedGoogle}{five}
\newcommand{\noBugsBugsConfirmedGoogle}{four}


\newcommand{\percChakra}{\Fix{52\%}} %
\newcommand{\percJSC}{\Fix{45\%}}


% transplantation summary
\newcommand{\noTransConfirmed}{18}
\newcommand{\noTransSeverityTwo}{16}
\newcommand{\noTransChakraBugs}{13}
\newcommand{\noTransChakraBugsFixed}{7}
\newcommand{\noTransVeightBugsConfirmed}{two}
\newcommand{\noTransVeightBugsReported}{three}
\newcommand{\noTransVeightBugsFixed}{two}

% table transplantation
\newcommand{\noTransUndefined}{204} % 179 + 25
\newcommand{\noTransTimeout}{23} % 15 + 8
\newcommand{\noTransNotImplemented}{54} % 49 + 5
\newcommand{\noTransNonStandard}{122} % 119 + 3
\newcommand{\noTransOther}{174} % 147 + 27
\newcommand{\noTransTPDuplicated}{11} % 10
\newcommand{\noTransTPBugs}{24} % 24

% diff summary
\newcommand{\noDiffConfirmed}{16}
\newcommand{\noDiffFixed}{ten}
\newcommand{\noDiffVeight}{2}
\newcommand{\noDiffVeightConfirmed}{2}
\newcommand{\noDiffVeightFixed}{1}

\newcommand{\warningsIteration}{five} % two

%% anonymize

\ifdraftmode
\newcommand{\anonym}[1]{{\tiny\colorbox{black}{xxx}}}
\else
\newcommand{\anonym}[1]{{\tiny\colorbox{black}{#1}}}
\fi



%% names
\newcommand{\radamsa}{radamsa\xspace}
\newcommand{\quickfuzz}{quickfuzz\xspace}

\newcommand{\jsc}{JSC\xspace}
\newcommand{\veight}{V8\xspace}
\newcommand{\chakra}{ChakraCore\xspace}
\newcommand{\smonkey}{SpiderMonkey\xspace}
\newcommand{\jerry}{JerryScript\xspace}
\newcommand{\hermes}{Hermes\xspace}

\newcommand{\babel}{Babel\xspace}

\newcommand{\lo}{lo}
\newcommand{\hi}{hi}


% JS Files Mined
\newcommand{\testsThatFail}{63}
\newcommand{\testsThatFailJSC}{6}
\newcommand{\testsThatFailSM}{57}
\newcommand{\filesAttached}{490}
\newcommand{\filesAttachedSM}{110}
\newcommand{\filesAttachedJSC}{10}
\newcommand{\filesAttachedVeight}{370}
\newcommand{\filesMining}{1,240}
\newcommand{\filesMiningSM}{377}
\newcommand{\filesMiningJSC}{224}
\newcommand{\filesMiningVeight}{639}
\newcommand{\samplesEnglish}{25K}
\newcommand{\samplesJSSnippets}{25K}
\newcommand{\accuracyMining}{98\%}

% CROSS-ENGINE DIFFERENTIAL TESTING
\newcommand{\percentSuiteTestJSC}{92\%}
\newcommand{\percentSuiteTestVeight}{95\%}
\newcommand{\percentSuiteTestChakra}{75\%}
\newcommand{\percentSuiteTestSM}{93\%}
\newcommand{\percentSuiteTestHermes}{26\%}

% RESULTS
\newcommand{\failuresTestTrans}{836}
\newcommand{\failuresTestTransDistictFiles}{612} % 544 + 68 (mining)
\newcommand{\failuresTestTransPercent}{9.2\%}
\newcommand{\noBugsTransplantationSeverityTwo}{16}
\newcommand{\bugsChakra}{12}
\newcommand{\bugsChakraFixed}{3}



% seeds table
\newcommand{\testOriginal}{31,276} % 31,276
\newcommand{\testPassInPar}{-}
\newcommand{\testCompileAll}{29,846} % 29,846
\newcommand{\testNoFailAll}{17,639} % 17,639

\newcommand{\veightOriginal}{1,084} % 75 + 370 (attachments) + 639 (mining)
\newcommand{\veightPassInPar}{482} % 75 + 99 (attachments) + 308 (mining)
\newcommand{\veightCompileAll}{478} % 57 + 95 (attachments) + 326 (mining)
\newcommand{\veightNoFailAll}{426} % 57 + 74 (attachments) + 295 (mining)

\newcommand{\smOriginal}{3,122} % 2,634 + 111 (attachments) + 377 (mining)
\newcommand{\smPassInPar}{2,155} % 1,977 + 11 (attachments) + 167 (mining)
\newcommand{\smCompileAll}{2,103} % 1,932 + 11 (attachments) + 160 (mining)
\newcommand{\smNoFailAll}{1,837} % 1,686 + 12 (attachments) + 139 (mining)

\newcommand{\jscOriginal}{1,265} % 1,031 + 10 (attachments) + 224 (mining)
\newcommand{\jscPassInPar}{1,130} % 1,025 + 7 (attachments) + 98 (mining)
\newcommand{\jscCompileAll}{1,122} % 1,021 + 7 (attachments) + 94 (mining)
\newcommand{\jscNoFailAll}{1,054} % 955 + 7 (attachments) + 92 (mining)

\newcommand{\duktapeOriginal}{1,195}
\newcommand{\duktapePassInPar}{1,195}
\newcommand{\duktapeCompileAll}{921}
\newcommand{\duktapeNoFailAll}{915}

\newcommand{\jerryOriginal}{1,951}
\newcommand{\jerryPassInPar}{1,951}
\newcommand{\jerryCompileAll}{1,878}
\newcommand{\jerryNoFailAll}{1,837}

\newcommand{\jsiOriginal}{99}
\newcommand{\jsiPassInPar}{99}
\newcommand{\jsiCompileAll}{63}
\newcommand{\jsiNoFailAll}{63}

\newcommand{\tinyOriginal}{49}
\newcommand{\tinyPassInPar}{49}
\newcommand{\tinyCompileAll}{37}
\newcommand{\tinyNoFailAll}{37}

\newcommand{\hermesOriginal}{1,728}
\newcommand{\hermesPassInPar}{680}
\newcommand{\hermesCompileAll}{661}
\newcommand{\hermesNoFailAll}{632}

\newcommand{\babelOriginal}{9,953}
\newcommand{\babelPassInPar}{-}
\newcommand{\babelCompileAll}{2,198}
\newcommand{\babelNoFailAll}{1,745}

\newcommand{\blogEngineNetOriginal}{954}
\newcommand{\blogEngineNetPassInPar}{-}
\newcommand{\blogEngineNetCompileAll}{24}
\newcommand{\blogEngineNetNoFailAll}{18}

%% open science
% \url{https://figshare.com/s/ee2e3821c2f022c7f5cc}
\newcommand{\dataRepo}{{\small\url{https://github.com/damorimRG/entente/}\xspace}}
