\begin{figure*}
\scriptsize
\begin{verbatim}
     1	learn() {
     2	        X=$1
     3	        cd $Temp
     4	        cp $HOME/svns/wisp/trunk/weka/lib/weka.jar $Temp
     5	        java -cp ./weka.jar weka.core.converters.CSVLoader $X.csv > $X.arff
     6	        java   -Xmx1024M -cp ./weka.jar \
     7	                weka.filters.supervised.attribute.AttributeSelection \
     8	            -S "weka.attributeSelection.Ranker -T -1.7976931348623157E308 -N -1"  \
     9	            -E  "weka.attributeSelection.InfoGainAttributeEval"                    \
    10	            -i  $X.arff \
    11	                -o ${X}_fs.arff
    12	
    13	        for i in 100 50 25 12 6 3
    14	        do 
    15	                printf "\n\n---| $X $i  |------------------------\n\n"
    16	                java  $java  -Xmx1024M -cp ./weka.jar \
    17	                        weka.filters.unsupervised.attribute.Remove  -R "${i}-100" \
    18	                        -i ${X}_fs.arff  \
    19	                        -o ${X}_fs${i}.arff
    20	                printf "learning...\n\n"
    21	                java  $java  -Xmx1024M -cp ./weka.jar \
    22	                        weka.classifiers.rules.JRip -F 3 -N 2.0 -O 2 -S 1 \
    23	                        -i -t  ${X}_fs${i}.arff 
    24	        done 
    25	}
\end{verbatim}
\caption{Source code for the data mining.}\label{fig:reduce}
\end{figure*}

For each data mining experiment:
\bi
\item The input is \$X.arff 
(and $\$X \in \{a,b,c,d,e\}$)
which contains the frequency counts of
the top 100 terms found via TF*IDF.
\item
The output is a set of rules predicting
for issue serverity.
\ei

 
\noindent
\fig{reduce} shows the 
source code for the 
data mining:
\bi
\item Line 2 catches the name of the input file;
\item Line 3 moves the program to a temporary directory (since the code is about to
generate several intermediary files);
\item Lines 4 and 5 prepare the data for the WEKA data mining toolkit: line 4 copies the WEKA
source code to the temporary directory and line 5 converts the csv file holding the issue reports to  the
.arff file format used by the WEKA.
\item Lines 6 to 12 run the infogain feature subset selector. A new arff file is generated (\$X\_fs.arff)
that sorts the attributes top to bottom according to their information content.
\item Lines 13 to 27 build rules using the top $N \in \{100,50,25, 12, 6,3\}$ ranked terms.
Line 16 to 19 remove some of the terms from \$X\_fs.arff, store the remaining terms in \$X\_fs\$N.arff,
then learns rules from those terms using the RIPPER rule learner.
\ei

