histCounts[(int)m_data.instance(k).value(m_attribIndex)]++;
if(!m_data.instance(k).isMissing(m_attribIndex)) histCounts[(int)m_data.instance(k).value(m_attribIndex)]++;
    public void run() {      synchronized (m_locker) {        if((m_classIndex >= 0) &&        (m_data.attribute(m_classIndex).isNominal())) {          int histClassCounts[][];          histClassCounts=new int[m_data.attribute(m_attribIndex).numValues()]                                 [m_data.attribute(m_classIndex).numValues()+1];                    m_maxValue = m_as.nominalCounts[0];          for(int i=0; i<m_data.attribute(m_attribIndex).numValues(); i++) {            if(m_as.nominalCounts[i]>m_maxValue)              m_maxValue = m_as.nominalCounts[i];          }                    if(m_colorList.size()==0)            m_colorList.addElement(Color.black);          for(int i=m_colorList.size();          i < m_data.attribute(m_classIndex).numValues()+1; i++) {            Color pc = m_defaultColors[(i-1) % 10];            int ija =  (i-1) / 10;            ija *= 2;                        for (int j=0;j<ija;j++) {              pc = pc.darker();            }                        m_colorList.addElement(pc);          }                    for(int k=0; k<m_data.numInstances(); k++) {            //System.out.println("attrib: "+            //                   m_data.instance(k).value(m_attribIndex)+            //                   " class: "+            //                   m_data.instance(k).value(m_classIndex));            if(!m_data.instance(k).isMissing(m_attribIndex))              if(m_data.instance(k).isMissing(m_classIndex))                histClassCounts[(int)m_data.instance(k).value(m_attribIndex)]                               [0]++;              else                histClassCounts[(int)m_data.instance(k).value(m_attribIndex)]                              [(int)m_data.instance(k).value(m_classIndex)+1]++;          }                    //for(int i=0; i<histClassCounts.length; i++) {          //int sum=0;          //for(int j=0; j<histClassCounts[i].length; j++) {          //    sum = sum+histClassCounts[i][j];          //}          //System.out.println("histCount: "+sum+" Actual: "+          //                   m_as.nominalCounts[i]);          //}                    m_threadRun=false;          m_histBarClassCounts = histClassCounts;          //Image tmpImg = new BufferedImage(getWidth(), getHeight(),          //                                 BufferedImage.TYPE_INT_RGB);          //drawGraph( tmpImg.getGraphics() );          //img = tmpImg;          AttributeVisualizationPanel.this.repaint();        }        else {          int histCounts[];          histCounts  = new int[m_data.attribute(m_attribIndex).numValues()];                    m_maxValue = m_as.nominalCounts[0];          for(int i=0; i<m_data.attribute(m_attribIndex).numValues(); i++) {            if(m_as.nominalCounts[i]>m_maxValue)              m_maxValue = m_as.nominalCounts[i];          }                    for(int k=0; k<m_data.numInstances(); k++) {            histCounts[(int)m_data.instance(k).value(m_attribIndex)]++;          }          m_threadRun=false;          m_histBarCounts = histCounts;          //Image tmpImg = new BufferedImage(getWidth(), getHeight(),          //                                 BufferedImage.TYPE_INT_RGB);          //drawGraph( tmpImg.getGraphics() );          //img = tmpImg;          AttributeVisualizationPanel.this.repaint();        }      } //end synchronized    }  //end run()