Program: 21452
Project: 21452
Buggy source:
public Object getValueAt(int rowIndex,int columnIndex){
  if (rowIndex < allLinks.size()) {
    DownloadLink downloadLink=allLinks.get(rowIndex);
switch (columnIndex) {
case COL_INDEX:
      return rowIndex;
case COL_NAME:
    if (downloadLink.getFilePackage() == null) {
      return downloadLink.getName();
    }
  return downloadLink.getFilePackage().getDownloadDirectoryName() + "String_Node_Str" + downloadLink.getName();
case COL_STATUS:
return downloadLink.getStatusText();
case COL_HOST:
return downloadLink.getHost();
case COL_PROGRESS:
if (rowIndex >= progressBars.size()) {
JProgressBar p=new JProgressBar(0,1);
progressBars.add(rowIndex,p);
}
JProgressBar p=progressBars.elementAt(rowIndex);
if (downloadLink.isInProgress() && downloadLink.getRemainingWaittime() == 0 && (int)downloadLink.getDownloadCurrent() > 0 && (int)downloadLink.getDownloadCurrent() <= (int)downloadLink.getDownloadMax()) {
p.setMaximum((int)downloadLink.getDownloadMax());
p.setStringPainted(true);
p.setBackground(Color.WHITE);
p.setValue((int)downloadLink.getDownloadCurrent());
p.setString((int)(100 * p.getPercentComplete()) + "String_Node_Str" + (double)Math.round((p.getValue() / 10000)) / 100.0 + "String_Node_Str" + (double)Math.round(p.getMaximum() / 10000) / 100.0 + "String_Node_Str");
return p;
}
 else if (downloadLink.getRemainingWaittime() > 0 && downloadLink.getWaitTime() >= downloadLink.getRemainingWaittime()) {
p.setMaximum(downloadLink.getWaitTime());
p.setBackground(new Color(255,0,0,80));
p.setStringPainted(true);
p.setValue((int)downloadLink.getRemainingWaittime());
p.setString((int)(100 * p.getPercentComplete()) + "String_Node_Str" + p.getValue() / 1000 + "String_Node_Str" + p.getMaximum() / 1000 + "String_Node_Str");
return p;
}
 else return null;
}
}
return null;
}

Fixed version (ground truth):
public Object getValueAt(int rowIndex,int columnIndex){
  if (rowIndex < allLinks.size()) {
    DownloadLink downloadLink=allLinks.get(rowIndex);
switch (columnIndex) {
case COL_INDEX:
      return rowIndex;
case COL_NAME:
    if (downloadLink.getFilePackage() == null) {
      return downloadLink.getName();
    }
  return downloadLink.getFilePackage().getDownloadDirectoryName() + "String_Node_Str" + downloadLink.getName();
case COL_STATUS:
return downloadLink.getStatusText();
case COL_HOST:
return downloadLink.getHost();
case COL_PROGRESS:
if (rowIndex >= progressBars.size()) {
JProgressBar p=new JProgressBar(0,1);
progressBars.add(rowIndex,p);
}
JProgressBar p=progressBars.elementAt(rowIndex);
if (downloadLink.isInProgress() && downloadLink.getRemainingWaittime() == 0 && (int)downloadLink.getDownloadCurrent() > 0 && (int)downloadLink.getDownloadCurrent() <= (int)downloadLink.getDownloadMax()) {
p.setMaximum((int)downloadLink.getDownloadMax());
p.setStringPainted(true);
p.setBackground(Color.WHITE);
p.setValue((int)downloadLink.getDownloadCurrent());
p.setString((int)(100 * p.getPercentComplete()) + "String_Node_Str" + JDUtilities.formatBytesToMB(p.getValue())+ "String_Node_Str"+ JDUtilities.formatBytesToMB(p.getMaximum())+ "String_Node_Str");
return p;
}
 else if (downloadLink.getRemainingWaittime() > 0 && downloadLink.getWaitTime() >= downloadLink.getRemainingWaittime()) {
p.setMaximum(downloadLink.getWaitTime());
p.setBackground(new Color(255,0,0,80));
p.setStringPainted(true);
p.setValue((int)downloadLink.getRemainingWaittime());
p.setString((int)(100 * p.getPercentComplete()) + "String_Node_Str" + p.getValue() / 1000 + "String_Node_Str" + p.getMaximum() / 1000 + "String_Node_Str");
return p;
}
 else return null;
}
}
return null;
}